Solution of linear differential equations in state space form
Vivek Yadav
1. Continuous systems
In general, dynamic systems can be modeled as,
In special case of linear time invariant systems, these equations can be written as
We now wish to solve these systems of equation to obtain closed form solutions of the state vector \( x(t) \) and measurement vector \( y(t) \).
1. When \(u(t) =0 \) for all \( t \).
We first consider the simple example where \( u(t) = 0 \) for all \( t \). In this case, the equations reduce to,
Recall, that solution for scalar case \( \dot{\alpha} = a \alpha \) is \( \alpha(t) = \alpha_0 exp(at) \), a similar solution can be obtained for the case when \( \alpha \) is a vector and \(A \) a matrix. In this case, the solution is,
Note, as \(A \) is a matrix, we need to define its exponent.
If the state at some other instant \( \tau \) is known, then the solution of \( \dot{x} = Ax \) becomes
We will next investigate the properties of this solution. Say the matrix A can be written as \( A = V \Lambda V^{-1} \), i.e. A has linearly independent eigen vectors. In this case, the solution can be rewritten as,
Rewriting \( A = V \Lambda V^{-1} \), and expanding,
where \(e^{\Lambda t}\) is the matrix with zero off-diagonal entires and whose \(i^{th}\) diagonal entry is \(e^{\lambda_i t}\). If all the real parts of the eigen values of \(A\) are negative, then the solution \(x(t) \rightarrow 0\), else \(x(t) \rightarrow \infty\). This property is crucial in designing control systems. As we will see later in this course, we want to design the control law in such a way that the modified eigenvalues of system dynamics have negative real parts.
2. General solution.
We now seek a particular solution to the full equation \( \frac{d x(t) }{dt} = A x(t) + B u(t) \) of the form \(x(t) = e^{At} c(t)\). Substituting \(x(t) = e^{At} c(t)\) and expanding,
Simplifying and rearranging,
Integrating with respect to time,
Therefore, the solution for \( \frac{d x(t) }{dt} = A x(t) + B u(t) \) is
Noting that \(x(0) = x_0\),
Therefore, the solution of the differential equation in state space form is,
For the case where \(x \) is known at some intermediate point \(\tau\),
This solution has the following properties,
- The solution for \(x(t) \) depends only on the control signals between 0 (or \(\tau\)) and current time (t).
- The solutions for \(x(t) \) are bounded if \(e^{At} \) (or \(e^{A(t-\tau)} \) is bounded is no longer valid, because the solution depends on $B$ and control history \(u(t)\) also.
2. Discrete systems
Discrete systems are given by,
In general, dynamic systems can be modeled as,
In the special case of linear time invariant systems, these equations can be written as
When u[k] = 0
When \(u[k] = 0\), the system dynamics reduces to,
It can easily be shown that the solution in this case is,
Recall, \(A^{k+1} = V \Lambda^{k+1} V^{-1}\), therefore,
If the absolute value of the eigen values of \(A\) are all less than 1, then the solutions \(x[k+1]\) converge to \(0\), else they go to \(\infty\).
Note: For continuous case, we got the condition for the solutions to go to zero as eigen values being negative, and for discrete case we got the condition that the absolute values of the eigen values must be less than 1. These two critera refer to the same condition, and this will be explained later in this section.
Solution by induction
The equation for the first point is,
The equation for \(x[2]\) is.
Substituting \(x[1]\) and rearranging,
Similarly, \(x[3]\) is,
Based on the trends above, we propose that solution for \(x[k]\) is,
Given \(x[k]\) above, \(x[k+1]\) is,
Substituting \(x[k]\) and rearranging,
As the equation for \(x[k+1]\) has the same form as \(x[k]\) with the iterator \(k\) replaced by \(k+1\), we can conclude that the solution is
This solution has the following properties,
- The solution for \(x[k]\) depends only on the control signals between 0 and current time instant (k).
- The solutions for \(x[k]\) are bounded if \(A^{k}\) is bounded is no longer valid, because the solution depends on $B$ and control history \(u[k]\) also.
3. Relation between continuous and discrete representations
Until now, we treated continuous and discrete systems independently, however, a continuous system can be written in discrete form too. Consider the continuous time system equation
The derivative of $x[t]$ can be approximated as,
where \(\Delta t\) is a ‘reasonable’ choice of discretization step. Appropriate choice of \(\Delta t\) is crucial in designing control laws and in studying dynamic systems via simulations. A smaller \(\Delta t\) although guarantees better accuracy results in large simulation times, where as a larger \(\Delta t\) gives faster simulation results but has poorer accuracy. Choosing \(\Delta t\) correctly can give accurate results in reasonable time. Simulation of dynamic systems will be dealt in a different section. Typically \(\Delta t\) is chosen as a very small number \(0.001s\), however, if the system is highly nonlinear and has millions of parameters (neural networks for example) a much smaller \(\Delta t\) (of the order of \(10^{-6}\)) is warranted.
The system dynamics equations now become,
Note, if all the eigen values of \(A\) have negative real parts, then the real parts of eigen values of \((I+ A \Delta t)\) for a sufficiently small \(\Delta t\) are less than 1, and \(e^{At}\) or \((I+ A \Delta t)^k\) both converge to \(0\) as \(t,k \rightarrow \infty \).
Conclusion:
In this section, we saw how solutions of system dynamics equations represetented in state space form can be calculated. We also saw that if the real part of eigen values of a continuous system are negative or a discrete system have magnitudes less than 1, then the system’s state go to zero when no control is applied. This property is crucial and will be exploited to design control laws. However, before designing control laws, it is important to test if the system is actually controllable. Further, as control law is a function of estimated states, it is important to verify if all the states can be estimated, i.e. are observable. Concepts of controllability and observability are developed to address these specific questions, and we will study them next.