lucid  0.0.1
Lifting-based Uncertain Control Invariant Dynamics
Loading...
Searching...
No Matches
lucid::BarrierCertificate Class Referenceabstract

Control barrier certificates (CBCs) are often used to certify the safety of a stochastic systems. More...

#include <BarrierCertificate.h>

Inheritance diagram for lucid::BarrierCertificate:
lucid::FourierBarrierCertificate

Public Member Functions

 BarrierCertificate (int T, double gamma, double eta=0, double c=0)
 Construct a new BarrierCertificate object.
 
double operator() (ConstVectorRef x) const
 Evaluate the barrier certificate at the given point.
 
bool is_synthesized () const
 Check whether the barrier certificate is synthesized.
 
double norm () const
 Get read-only access to the norm describing the complexity of the barrier of the barrier certificate.
 
double gamma () const
 Get read-only access to the \( \) \( \) \( \gamma \) \( \) \( \) value in the CBC definition of the barrier certificate.
 
double eta () const
 Get read-only access to the \( \) \( \) \( \eta \) \( \) \( \) value in the CBC definition of the barrier certificate.
 
double c () const
 Get read-only access to the \( c \) value in the CBC definition of the barrier certificate.
 
double safety () const
 Get read-only access to the safety probability of the system of the barrier certificate.
 
int T () const
 Get read-only access to the time horizon of the barrier certificate.
 
virtual std::unique_ptr< BarrierCertificateclone () const =0
 Clone the barrier certificate.
 
virtual std::string to_string () const
 Obtain the string representation of this object.
 

Protected Member Functions

virtual double apply_impl (ConstVectorRef x) const =0
 Concrete implementation of operator()().
 

Protected Attributes

int T_
 Time horizon.
 
double gamma_
 \( \gamma \) value in the CBC definition
 
double eta_
 \( \eta \) value in the CBC definition
 
double c_
 \( c \) value in the CBC definition
 
double norm_
 Norm describing the complexity of the barrier. It is 0 if the barrier has not been synthesized.
 
double safety_
 Safety probability of the system. It is 0 if the barrier has not been synthesized.
 

Detailed Description

Control barrier certificates (CBCs) are often used to certify the safety of a stochastic systems.

A CBC over a domain \( \texttip{\mathcal{X}}{Polish sample vector space} \subseteq \mathbb{R}^d \) with respect to an unsafe set \( \texttip{\mathcal{X}}{Usafe set}_u \) and transition function \( f: \mathcal{X} \times \mathcal{U} \to \mathcal{X} \), where \( \mathcal{U} \subseteq \mathbb{R}^m \) is the set of control inputs, is a function \( B: \mathcal{X} \to \mathbb{R} \) with the following properties:

\[\begin{align*} &\forall x \in \mathcal{X} && B(x) \geq 0 \\ &\forall x_0 \in \mathcal{X}_0 && B(x_0) \leq \eta \newline &\forall x_u \in \mathcal{X}_u && B(x_u) \geq \gamma \newline &\forall x \in \mathcal{X}, \forall u \in \mathcal{U} && \mathbb{E}[B(x_+)] - B(x) \leq c \end{align*} \]

for some \( \) \eta \(, \) \gamma \(, c \in \mathbb{R} \) with \( \) \gamma \( > \) \eta \( \geq 0\) and \( c \geq 0 \). In this context, \( x_+ \) is the next state of the system after applying the control input \( u \) at state \( \texttip{x}{Element of the vector space} \). If such a function exists, then the safety probability of the system can be bounded by

\[P_\text{safe} \geq 1 - \frac{\eta + c T}{\gamma} \]

where \( T \) is the time horizon, i.e., the number of time steps to consider.

Constructor & Destructor Documentation

◆ BarrierCertificate()

lucid::BarrierCertificate::BarrierCertificate ( int T,
double gamma,
double eta = 0,
double c = 0 )
explicit

Construct a new BarrierCertificate object.

Precondition
T must be greater than 0.
gamma must be greater than or equal to 0.
eta must be greater than or equal to 0.
c must be greater than or equal to 0.
Parameters
Ttime horizon
gamma\( \gamma \) value in the CBC definition
eta\( \eta \) value in the CBC definition
c\( c \) value in the CBC definition

Member Function Documentation

◆ apply_impl()

virtual double lucid::BarrierCertificate::apply_impl ( ConstVectorRef x) const
nodiscardprotectedpure virtual

Concrete implementation of operator()().

Parameters
xinput vector
Returns
value of the barrier certificate at the given point

Implemented in lucid::FourierBarrierCertificate.

◆ c()

double lucid::BarrierCertificate::c ( ) const
inlinenodiscard

Get read-only access to the \( c \) value in the CBC definition of the barrier certificate.

Returns
\( c \) value in the CBC definition of the barrier certificate

◆ clone()

virtual std::unique_ptr< BarrierCertificate > lucid::BarrierCertificate::clone ( ) const
nodiscardpure virtual

Clone the barrier certificate.

Create a new instance of the barrier certificate with the same parameters. If the barrier was synthesized, the new instance will have the same synthesis results.

Returns
new instance of the barrier certificate

Implemented in lucid::FourierBarrierCertificate.

◆ eta()

double lucid::BarrierCertificate::eta ( ) const
inlinenodiscard

Get read-only access to the \( \) \( \) \( \eta \) \( \) \( \) value in the CBC definition of the barrier certificate.

Returns
\( \) \( \) \( \eta \) \( \) \( \) value in the CBC definition of the barrier certificate

◆ gamma()

double lucid::BarrierCertificate::gamma ( ) const
inlinenodiscard

Get read-only access to the \( \) \( \) \( \gamma \) \( \) \( \) value in the CBC definition of the barrier certificate.

Returns
\( \) \( \) \( \gamma \) \( \) \( \) value in the CBC definition of the barrier certificate

◆ is_synthesized()

bool lucid::BarrierCertificate::is_synthesized ( ) const
inlinenodiscard

Check whether the barrier certificate is synthesized.

Returns
true if the barrier certificate is synthesized
false if the barrier certificate is not synthesized

◆ norm()

double lucid::BarrierCertificate::norm ( ) const
inlinenodiscard

Get read-only access to the norm describing the complexity of the barrier of the barrier certificate.

Returns
norm describing the complexity of the barrier of the barrier certificate

◆ operator()()

double lucid::BarrierCertificate::operator() ( ConstVectorRef x) const
nodiscard

Evaluate the barrier certificate at the given point.

Precondition
x must belong to the input space of the barrier certificate.
Parameters
xinput vector
Returns
value of the barrier certificate at the given point

◆ safety()

double lucid::BarrierCertificate::safety ( ) const
inlinenodiscard

Get read-only access to the safety probability of the system of the barrier certificate.

Returns
safety probability of the system of the barrier certificate

◆ T()

int lucid::BarrierCertificate::T ( ) const
inlinenodiscard

Get read-only access to the time horizon of the barrier certificate.

Returns
time horizon of the barrier certificate

◆ to_string()

std::string lucid::BarrierCertificate::to_string ( ) const
nodiscardvirtual

Obtain the string representation of this object.

Returns
string representation of this object

Reimplemented in lucid::FourierBarrierCertificate.


The documentation for this class was generated from the following files: