Giter Club home page Giter Club logo

resilient_dynamic_estimation's Introduction

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)$.

resilient_dynamic_estimation's People

Contributors

zs-li avatar zs-li-zz avatar

Watchers

 avatar

Forkers

zs-li

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.