Skip to content

zs-li/resilient_dynamic_estimation

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Inverted pendulum for simulation

We use an inverted pendulum for simulation, the physical parameters are shown in the following figure:

Based on the knowledge of theoretical mechanics, one obtains the inverted pendulum system dynamic:

Rewrite it as a non-linear state space model :

, where $b$ is the coefficient of friction for cart movement and is set as $0$ in the simulation.

Reformulate the system as and linearize system at . Then one obatins a continuous time LTI system: $\dot{x}(t)=A_c x(t) +B_c u(t)$. Sample the continuous time system with period $T_s$, then the discrete system is $x(k+1)=Ax(k)+Bu(k)$ where

The system output equation is

where $v(k)$ is the output noise and $a(k)$ is the injected attack. There are 3 sensors monitoring the cart position and 1 sensor monitoring the pendulum angle.

The system is simulated with sampling time $T_s=0.1 s$.

The system noise process has covariance and the measurement noise is , i.e., the noise is scaled according to sampling time $T_s$. The initial state is set as $x_0=[0,1,0,1]'$, and the estiamtor is assumed to know the initial state.

Remark on state transformation

In order to better analyze the observability structure, the matrix $A$ is transformed into a Jordan canonical form:

And the simulation is performed on the following system where $\bar{x}=U^{-1}x$:

The estimation of $x(k)$ can be obtained by performing transformation $U$ on the estimation of $\hat{x}(k)$.

About

Code for research on resilient dynamic estimation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Julia 100.0%