System dynamics allow a control designer to predict how the plant or a system responds to actuator commands and external disturbances.
System dynamics are used to design optimal control signals and observers to estimate variables that define the current state of the system.
“All models are wrong, some are useful” ~ George Box.
It is not possible nor is necessary to design a detailed model of the system that we wish to control. The system modeling process often involves several simplifying assumptions. This leads to an important question How much detail is enough for modeling?
Two extremes
Equations of motion of a car
Use different models for different aspects of control (receding horizon control example).
Continuous models: Continuous system dynamic models are models that are continuous in time. Such models are described using differential equations.
Discrete models: Discrete system dynamic models are models that are discrete in time, where values describing the system are defined at fixed intervals of time.
Hybrid models: In some cases, it is not possible to describe the system using either continuous or discrete models, and both are required to capture what the system is doing. Example, walking, running, bouncing ball, etc.
State-space representation is a mathematical model of a physical system as a set of input, output and state variables related by first-order differential (or difference) equations. ‘State space’ refers to the multi-dimensional space spanned by the state variables. The state of the system can be represented as a vector within this space.
If the states satisfy an additional contraint on that given the current state of the system, the future states of the system are completely determined by the current state and applied control input. The system dynamics described in this way is memoryless, i.e. the future states do not depend on the past state history or how the current state was achieved. Such processes are also refered as Markov processes (for continuous time) or Markov chains (for discrete time). In cases where the system dynamics is of second order, we split the second order equations into two first order equations.
If the system dynamics can be expressed as
$$ \dot{x} = f(x) + g(x) u, $$the system is called control-affine.
and
$$ y[k] = h(x[k],u[k]). $$A control affine discrete system can be represented as, $$ x[k+1] = f(x[k]) + g(x[k]) u[k] $$
Continuous time linear system dynamics are modeled as,
$$ \dot{x} = A(t) x(t) + B(t) u(t), $$where \( A(t) \) is called the system matrix and \( B(t) \) is called the input matrix. Measurements in this case are given by
$$ y(t) = C(t) x(t) + D(t) u(t) ,$$and \( C(t) \) is the output matrix and \( D(t) \) is the feedforward matrix.
If the matrices are time-invariant, we get Linear Time-Invariant (LTI) systems
$$ \dot{x} = A x(t) + B u(t), $$ $$ y(t) = C x(t) + D u(t) .$$Define 2 variables, position and velocity.
$$ x_1 = x $$$$ x_2 = \dot{x}_1 = v $$$$ \dot{x}_2 = \frac{F}{m} . $$System dynamics:
$$ \underbrace{\frac{d}{dt} \left[ \begin{array}{c} x_1 \\ x_2 \end{array} \right]}_{\dot{X}} = \underbrace{\left[ \begin{array}{cc} 0 & 1 \\ 0 & 0 \end{array} \right]}_A \underbrace{\left[ \begin{array}{c} x_1 \\ x_2 \end{array} \right]}_X + \underbrace{\left[ \begin{array}{c} 0 \\ \frac{1}{m} \end{array} \right]}_B \underbrace{F}_u $$Measurements: positon \( (x) \) and force \( (F) \),
$$ y_1 = x$$$$ y_2 = F$$Measurements:
$$ y = \underbrace{\left[ \begin{array}{cc} 1 & 0 \\ 0 & 0 \end{array} \right]}_C \underbrace{\left[ \begin{array}{c} x_1 \\ x_2 \end{array} \right]}_X + \underbrace{\left[ \begin{array}{c} 0 \\ 1 \end{array} \right]}_D \underbrace{F}_u $$Hybrid systems are systems that are continous over some interval of time, and discrete over others. One example is a bouncing ball. The equations governing motion of bouncing ball are given by,
$$ \dot{x} = v_x $$ $$ \ddot{y} = -g $$At impact with ground, the velocity changes as,
$$ \dot{y}^+ = -0.9 \dot{y}^- $$This is a hybrid system that involves a continuous time formulation for when the ball is in the air, and a discrete time-type of formulation for impact.
States \( X_1 = x \) , \( X_2 = y \) and \( X_3 = \dot{y} \) with driving inputs \( v_x \) and \( g \).
$$ \dot{X_1 } = v_x $$$$ \dot{X_2 } = X_3 $$$$ \dot{X_3 } = -g $$At impact, \( X_3^+ = - 0.9 X_3^- \)
Why linearize?
Consider a nonlinear system with an 'equilibrium trajectory' \( x_o, u_o \), such that \( \dot{x}_o = f( x_o, u_o ) \). Small perturbations about this trajectory can be approximated using a simpler linear system.
System dynamics and measurement:
$$ \dot{x} = f(x,u), $$ $$ y = h(x,u), $$Derivatives above are derivatives of a vector with respect to a vector.
System dynamics:
$$ \frac{d(x_o + \delta x)}{dt} = \dot{x}_o + \dot{\delta x} \approx f(x_o ,u_o) + \left. \frac{\partial f}{ \partial x} \right|_{(x_o,u_o)} \delta x + \left. \frac{\partial f}{ \partial y} \right|_{(x_o,_o)} \delta u . $$ $$ \dot{\delta x} \approx \left. \frac{\partial f}{ \partial x} \right|_{(x_o,u_o)} \delta x + \left. \frac{\partial f}{ \partial y} \right|_{(x_o,_o)} \delta u . $$Measurements:
$$ \delta y \approx \left. \frac{\partial h}{ \partial x} \right|_{(x_o,u_o)} \delta x + \left. \frac{\partial h}{ \partial y} \right|_{(x_o,_o)} \delta u . $$Linearize the system about \( \dot{\theta} = 0 \) and \( \theta = 0 \).
\( x_1 = \theta \) and \( x_2 = \dot{\theta} \)
$$ \dot{x}_1 = x_2 $$$$ \dot{x}_2 = -\frac{g}{l} sin(x_1) $$ $$ \frac{d}{dt} \left[ \begin{array}{c} x_1 \\ x_2 \end{array} \right] =\left[ \begin{array}{c} x_2 \\ -\frac{g}{l} sin(x_1) \end{array} \right] = f(x_1, x_2) $$Taking derivatives,
$$ \frac{\partial f}{\partial x} = \left[ \begin{array}{cc} 0 & 1 \\ -\frac{g}{l} cos(x_1) & 0 \end{array} \right] $$Derivative at \( x_1 = \theta=0 \) and \( x_2 = \dot{\theta}=0 \) ,
$$ \left. \frac{\partial f}{\partial x} \right|_{0,0}= \left[ \begin{array}{cc} 0 & 1 \\ -\frac{g}{l} cos(0) & 0 \end{array} \right] = \left[ \begin{array}{cc} 0 & 1 \\ -\frac{g}{l} & 0 \end{array} \right] $$Linearized system is,
$$ \delta \dot{x} = \left. \frac{\partial f}{\partial x} \right|_{0,0} \delta x= \left[ \begin{array}{cc} 0 & 1 \\ -\frac{g}{l} & 0 \end{array} \right] \delta x$$Almost all real-world phenomena can be represented using state-space methods. Applications range from predicting regions in brain that are involved in mental processes, developing optimal drug delivary schemes to minimize viral load, parameter estimation for machine learning/artificial intelligence algorithms, and control of self-driven cars and robots. Below are some examples,