Chapter9.1: Basics of State Space for Linear Systems (Part 2)

This series of blogs mainly describes the application of Matlab software in automatic control. If you have no theoretical basis for automatic control, please learn the series of blog posts on automatic control first. This series of blogs will not explain the theoretical knowledge of automatic control in detail.
Links related to the theoretical basis of automatic control: https://blog.csdn.net/qq_39032096/category_10287468.html?spm=1001.2014.3001.5482
Blog reference books: "MATLAB/Simulink and Control System Simulation".



1. Basics of state space for linear systems

1.3 Solution of state equation of linear steady continuous system
1.3.1 The solution of the homogeneous equation of state

The state equation is:
x ˙ ( t ) = A x ( t ) \dot{x}(t)=Ax(t)x˙(t)=The above formula of A x ( t )
is called the homogeneous state equation, which is usually solved by power series method and Laplace transform method;

  1. power series method

    Let the solution of the homogeneous equation of state be ttThe vector power series of t
    , x ( t ) = b 0 + b 1 t + b 2 t 2 + ⋯ + bktk + ⋯ + x(t)=b_0+b_1t+b_2t^2+\dots+b_kt^k+\ dots+x(t)=b0+b1t+b2t2++bktk++
    式中, x , b 0 , b 1 , … , b k , … x,b_0,b_1,\dots,b_k,\dots x,b0,b1,,bk,... allnnn维向量;
    x ˙ ( t ) = b 1 + 2 b 2 t + ⋯ + k b k t k − 1 + ⋯ = A ( b 0 + b 1 t + b 2 t 2 + ⋯ + b k t k + …   ) \dot{x}(t)=b_1+2b_2t+\dots+kb_kt^{k-1}+\dots=A(b_0+b_1t+b_2t^2+\dots+b_kt^k+\dots) x˙(t)=b1+2 b2t++kbktk1+=A(b0+b1t+b2t2++bktk+)
    可得:
    x ( t ) = ( I + A t + 1 2 A 2 t 2 + ⋯ + 1 k ! A k t k + ⋯ + ) x ( 0 ) x(t)=\left(I+At+\frac{1}{2}A^2t^2+\dots+\frac{1}{k!}A^kt^k+\dots+\right)x(0) x(t)=(I+At+21A2t _2++k!1Aktk++)x(0)
    定义:
    e A t = I + A t + 1 2 A 2 t 2 + ⋯ + 1 k ! A k t k + ⋯ + = ∑ k = 0 ∞ 1 k ! A k t k {\rm e}^{At}=I+At+\frac{1}{2}A^2t^2+\dots+\frac{1}{k!}A^kt^k+\dots+=\sum_{k=0}^\infty\frac{1}{k!}A^kt^k eAt=I+At+21A2t _2++k!1Aktk++=k=0k!1Aktk
    then:
    x ( t ) = e A tx ( 0 ) x(t)={\rm e}^{At}x(0)x(t)=eA t x(0)
    scalar differential equationx ˙ = ax \dot{x}=axx˙=ax的解为: x ( t ) = e a t x ( 0 ) , e a t x(t)={\rm e}^{at}x(0),{\rm e}^{at} x(t)=eatx(0)eat称为指数函数,向量微分方程具有相似形式的解,故把 e A t {\rm e}^{At} eAt称为矩阵指数函数,简称矩阵指数;由于 x ( t ) x(t) x(t) x ( 0 ) x(0) x(0)转移而来,对于线性定常系统, e A t {\rm e}^{At} eAt亦称状态转移矩阵,记为 Φ ( t ) \Phi(t) Φ(t),即:
    Φ ( t ) = e A t \Phi(t)={\rm e}^{At} Φ(t)=eAt

  2. Laplace transform method

    Equation of state:
    x ˙ ( t ) = A x ( t ) \dot{x}(t)=Ax(t)x˙(t)=A x ( t )
    Laplace transform the above formula,
    s X ( s ) = AX ( s ) + x ( 0 ) sX(s)=AX(s)+x(0)sX(s)=AX(s)+x ( 0 )
    则有:
    X ( s ) = ( s I − A ) − 1 x ( 0 ) X(s)=(sI-A)^{-1}x(0)X(s)=( s IA)1 x(0)
    inverse Laplace transform:
    x ( t ) = L − 1 [ ( s I − A ) − 1 ] x ( 0 ) x(t)=L^{-1}\left[(sI -A)^{-1}\right]x(0)x(t)=L1[ ( s IA)1]x(0)
    可得:
    e A t = L − 1 [ ( s I − A ) − 1 ] {\rm e}^{At}=L^{-1}\left[(sI-A)^{-1}\right] eAt=L1[ ( s IA)1]

1.3.2 Operational properties of state transition matrix

State transition matrix Φ ( t ) \Phi(t)The power series expansion of Φ ( t )
: Φ ( t ) = e A t = I + A t + 1 2 A 2 t 2 + ⋯ + 1 k ! A ktk + ⋯ \Phi(t)={\rm e}^{At}=I+At+\frac{1}{2}A^2t^2+\dots+\frac{1}{k!}A^kt^k+\cdotsΦ ( t )=eAt=I+At+21A2t _2++k!1Aktk+

  1. Φ ( 0 ) = I \Phi(0)=IΦ ( 0 )=I

  2. Φ ˙ ( t ) = A Φ ( t ) = Φ ( t ) A \dot{\Phi}(t)=A\Phi(t)=\Phi(t)APhi˙(t)=AΦ(t)=Φ ( t ) A

  3. Φ ( t 1 ± t 2 ) = Φ ( t 1 ) Φ ( ± t 2 ) = Φ ( ± t 2 ) Φ ( t 1 ) \Phi(t_1±t_2)=\Phi(t_1)\Phi(±t_2 )=\Phi(±t_2)\Phi(t_1)Φ ( t1±t2)=Φ ( t1) Φ ( ± t2)=Φ ( ± t2) Φ ( t1)

  4. Φ − 1 ( t ) = Φ ( − t ), Φ − 1 ( − t ) = Φ ( t ) \Phi^{-1}(t)=\Phi(-t),\Phi^{-1} (-t)=\Phi(t)Phi1(t)=Φ ( t ) ,Phi1(t)=Φ ( t )

  5. x ( t 2 ) = Φ ( t 2 − t 1 ) x ( t 1 ) x(t_2)=\Phi(t_2-t_1)x(t_1)x(t2)=Φ ( t2t1)x(t1)

  6. Φ ( t 2 − t 0 ) = Φ ( t 2 − t 1 ) Φ ( t 1 − t 0 ) \Phi(t_2-t_0)=\Phi(t_2-t_1)\Phi(t_1-t_0)Φ ( t2t0)=Φ ( t2t1) Φ ( t1t0)

  7. [ Φ ( t ) ] k = Φ ( kt ) [\Phi(t)]^k=\Phi(kt)[ Φ ( t ) ]k=Φ(kt)

  8. If Φ ( t ) \Phi(t)Φ(t) x ˙ ( t ) = A x ( t ) \dot{x}(t)=Ax(t) x˙(t)=The state transition matrix of A x ( t ) , then introduce a non-singular transformationx = P x ‾ x=P\overline{x}x=PxThe state transition matrix after is: Φ ‾ ( t ) = P − 1 e A t P \overline{\Phi}(t)=P^{-1}{\rm e}^{At}PPhi(t)=P1 eAtP;

  9. Two common state transition matrices; let A = diag [ λ 1 , λ 2 , … , λ n ] A={\rm diag}[\lambda_1,\lambda_2,\dots,\lambda_n]A=diag[λ1,l2,,ln],即 A A A为对角阵,且具有互异元素,则:
    Φ ( t ) = [ e λ 1 t e λ 2 t ⋱ e λ n t ] \Phi(t)= \begin{bmatrix} {\rm e}^{\lambda_1t}& & &\\ & {\rm e}^{\lambda_2t} & & \\ &&\ddots\\ &&&{\rm e}^{\lambda_nt} \end{bmatrix} Φ(t)= eλ1teλ2teλnt
    A A A阵为 m × m m\times{m} m×m约当阵:
    A = [ λ 1 λ ⋱ ⋱ 1 λ ] A= \begin{bmatrix} \lambda & 1 & &\\ &\lambda & \ddots\\ &&\ddots & 1\\ &&&\lambda \end{bmatrix} A= λ1λ1λ
    则:
    Φ ( t ) = [ e λ t t e λ t t 2 2 e λ t ⋯ t m − 1 ( m − 1 ) ! e λ t 0 e λ t t e λ t ⋯ t m − 2 ( m − 2 ) ! e λ t ⋮ ⋮ ⋮ ⋮ 0 0 0 ⋯ t e λ t 0 0 0 ⋯ e λ t ] \Phi(t)= \begin{bmatrix} {\rm e}^{\lambda{t}} & t{\rm e}^{\lambda{t}} & \displaystyle\frac{t^2}{2}{\rm e}^{\lambda{t}}&\cdots & \displaystyle\frac{t^{m-1}}{(m-1)!}{\rm e}^{\lambda{t}}\\ 0 & {\rm e}^{\lambda{t}} & t{\rm e}^{\lambda{t}} & \cdots & \displaystyle\frac{t^{m-2}}{(m-2)!}{\rm e}^{\lambda{t}}\\ \vdots & \vdots & \vdots & &\vdots\\ 0 & 0 & 0 & \cdots & t{\rm e}^{\lambda{t}}\\ 0 & 0 & 0 & \cdots & {\rm e}^{\lambda{t}} \end{bmatrix} Φ ( t )= et _000t et _et _002t2et _t et _00(m1)!tm1eλt(m2)!tm2eλtteλteλt
    实例分析:

    Example4: 设状态方程为:
    [ x ˙ 1 ( t ) x ˙ 2 ( t ) ] = [ 0 1 − 2 − 3 ] [ x 1 ( t ) x 2 ( t ) ] \begin{bmatrix} \dot{x}_1(t)\\ \dot{x}_2(t) \end{bmatrix}= \begin{bmatrix} 0 & 1\\ -2 & -3 \end{bmatrix} \begin{bmatrix} x_1(t)\\ x_2(t) \end{bmatrix} [x˙1(t)x˙2(t)]=[0213][x1(t)x2(t)]
    求状态方程的解.

    解:

    Solve with Laplace transform:
    s I − A = [ s 0 0 s ] − [ 0 1 − 2 − 3 ] = [ s − 1 2 s + 3 ] sI-A= \begin{bmatrix} s & 0\\ 0 & s \end{bmatrix}- \begin{bmatrix} 0 & 1 \\ -2 & -3 \end{bmatrix}= \begin{bmatrix} s & -1 \\ 2 & s+3 \end{bmatrix }and IA=[s00s][0213]=[s21s+3]

    ( s I − A ) − 1 = a d j ( s I − A ) ∣ s I − A ∣ = 1 ( s + 1 ) ( s + 2 ) [ s + 3 1 − 2 s ] = [ 2 s + 1 − 1 s + 2 1 s + 1 − 1 s + 2 − 2 s + 1 + 2 s + 2 − 1 s + 1 + 2 s + 2 ] \begin{aligned} (sI-A)^{-1}&=\frac{ {\rm adj}(sI-A)}{|sI-A|}=\frac{1}{(s+1)(s+2)} \begin{bmatrix} s+3 & 1 \\ -2 & s \end{bmatrix}\\\\&= \begin{bmatrix} \displaystyle\frac{2}{s+1}-\displaystyle\frac{1}{s+2} & \displaystyle\frac{1}{s+1}-\displaystyle\frac{1}{s+2}\\\\ \displaystyle\frac{-2}{s+1}+\displaystyle\frac{2}{s+2} & \displaystyle\frac{-1}{s+1}+\displaystyle\frac{2}{s+2} \end{bmatrix} \end{aligned} ( s IA)1=sIAadj (sIA)=(s+1)(s+2)1[s+321s]= s+12s+21s+12+s+22s+11s+21s+11+s+22

    可得:
    Φ ( t ) = L − 1 [ ( s I − A ) − 1 ] = [ 2 e − t − e − 2 t e − t − e − 2 t − 2 e − t + 2 e − 2 t − e − t + 2 e − 2 t ] \Phi(t)=L^{-1}\left[(sI-A)^{-1}\right]= \begin{bmatrix} 2{\rm e}^{-t}-{\rm e}^{-2t} & {\rm e}^{-t}-{\rm e}^{-2t}\\ -2{\rm e}^{-t}+2{\rm e}^{-2t} & -{\rm e}^{-t}+2{\rm e}^{-2t} \end{bmatrix} Φ ( t )=L1[ ( s IA)1]=[2e _te-2t _ _−2e _ _t+2e _2 tete-2t _ _et+2e _2 t]
    状态方程的解为:
    [ x 1 ( t ) x 2 ( t ) ] = Φ ( t ) [ x 1 ( 0 ) x 2 ( 0 ) ] = [ 2 e − t − e − 2 t e − t − e − 2 t − 2 e − t + 2 e − 2 t − e − t + 2 e − 2 t ] [ x 1 ( 0 ) x 2 ( 0 ) ] \begin{bmatrix} x_1(t)\\ x_2(t) \end{bmatrix}= \Phi(t)\begin{bmatrix}x_1(0)\\x_2(0)\end{bmatrix}= \begin{bmatrix} 2{\rm e}^{-t}-{\rm e}^{-2t} & {\rm e}^{-t}-{\rm e}^{-2t}\\ -2{\rm e}^{-t}+2{\rm e}^{-2t} & -{\rm e}^{-t}+2{\rm e}^{-2t} \end{bmatrix} \begin{bmatrix} x_1(0)\\ x_2(0) \end{bmatrix} [x1(t)x2(t)]=Φ ( t )[x1(0)x2(0)]=[2e _te-2t _ _−2e _ _t+2e _2 tete-2t _ _et+2e _2 t][x1(0)x2(0)]

1.3.3 Solutions of inhomogeneous state equations

The non-homogeneous state equation is as follows:
x ˙ ( t ) = A x ( t ) + B u ( t ) \dot{x}(t)=Ax(t)+Bu(t)x˙(t)=Ax(t)+B u ( t )
equational solution:
x ( t ) = Φ ( t ) x ( 0 ) + ∫ 0 t Φ ( t − τ ) B u ( τ ) d τ x(t)=\Phi(t) x(0)+\int_0^t\Phi(t-\tau)Bu(\tau){\rm d}\taux(t)=Φ(t)x(0)+0tΦ(tτ)Bu(τ)dτ
式中第一项是对初始状态的响应,第二项是对输入作用的响应;

亦可表示为:
x ( t ) = Φ ( t ) x ( 0 ) + ∫ 0 t Φ ( τ ) B u ( t − τ ) d τ x(t)=\Phi(t)x(0)+\int_{0}^t\Phi(\tau)Bu(t-\tau){\rm d}\tau x(t)=Φ(t)x(0)+0tΦ(τ)Bu(tτ)dτ
实例分析:

Example5: 系统状态方程为:
[ x ˙ 1 x ˙ 2 ] = [ 0 1 − 2 − 3 ] [ x 1 x 2 ] + [ 0 1 ] u \begin{bmatrix} \dot{x}_1\\ \dot{x}_2 \end{bmatrix}= \begin{bmatrix} 0 & 1\\ -2 & -3 \end{bmatrix} \begin{bmatrix} x_1\\ x_2 \end{bmatrix}+ \begin{bmatrix} 0\\ 1 \end{bmatrix}u [x˙1x˙2]=[0213][x1x2]+[01]u
x ( 0 ) = [ x 1 ( 0 ) x 2 ( 0 ) ] T x(0)=\begin{bmatrix}x_1(0) & x_2(0)\end{bmatrix}^T x(0)=[x1(0)x2(0)]T;求在 u ( t ) = 1 ( t ) u(t)=1(t) u(t)=1(t)作用下状态方程的解;

解:

由于:u ( t ) = 1 , u ( t − ) = 1 u(t)=1,u(t-\tau)=1u(t)=1,u(tt )=1,可得:
x ( t ) = Φ ( t ) x ( 0 ) + ∫ 0 t Φ ( t ) B d τ x(t)=\Phi(t)x(0)+\int_{0}^ t\Phi(t)B{\rm d}\taux(t)=Φ ( t ) x ( 0 )+0tΦ ( t ) B d t

s I − A = [ s 0 0 s ] − [ 0 1 − 2 − 3 ] = [ s − 1 2 s + 3 ] sI-A= \begin{bmatrix} s & 0\\ 0 & s \end{bmatrix}- \begin{bmatrix} 0 & 1 \\ -2 & -3 \end{bmatrix}= \begin{bmatrix} s & -1 \\ 2 & s+3 \end{bmatrix} and IA=[s00s][0213]=[s21s+3]

( s I − A ) − 1 = a d j ( s I − A ) ∣ s I − A ∣ = 1 ( s + 1 ) ( s + 2 ) [ s + 3 1 − 2 s ] = [ 2 s + 1 − 1 s + 2 1 s + 1 − 1 s + 2 − 2 s + 1 + 2 s + 2 − 1 s + 1 + 2 s + 2 ] \begin{aligned} (sI-A)^{-1}&=\frac{ {\rm adj}(sI-A)}{|sI-A|}=\frac{1}{(s+1)(s+2)} \begin{bmatrix} s+3 & 1 \\ -2 & s \end{bmatrix}\\\\&= \begin{bmatrix} \displaystyle\frac{2}{s+1}-\displaystyle\frac{1}{s+2} & \displaystyle\frac{1}{s+1}-\displaystyle\frac{1}{s+2}\\\\ \displaystyle\frac{-2}{s+1}+\displaystyle\frac{2}{s+2} & \displaystyle\frac{-1}{s+1}+\displaystyle\frac{2}{s+2} \end{bmatrix} \end{aligned} ( s IA)1=sIAadj (sIA)=(s+1)(s+2)1[s+321s]= s+12s+21s+12+s+22s+11s+21s+11+s+22

Φ ( t ) = L − 1 [ ( s I − A ) − 1 ] = [ 2 e − t − e − 2 t e − t − e − 2 t − 2 e − t + 2 e − 2 t − e − t + 2 e − 2 t ] \Phi(t)=L^{-1}\left[(sI-A)^{-1}\right]= \begin{bmatrix} 2{\rm e}^{-t}-{\rm e}^{-2t} & {\rm e}^{-t}-{\rm e}^{-2t}\\ -2{\rm e}^{-t}+2{\rm e}^{-2t} & -{\rm e}^{-t}+2{\rm e}^{-2t} \end{bmatrix} Φ ( t )=L1[ ( s IA)1]=[2e _te-2t _ _−2e _ _t+2e _2 tete-2t _ _et+2e _2 t]

∫ 0 t Φ ( τ ) B d τ = ∫ 0 t [ e − τ − e − 2 τ − e − τ + 2 e − 2 τ ] d τ = [ − e − τ + 1 2 e − 2 τ e − τ − e − 2 τ ] ∣ 0 t = [ − e − t + 1 2 e − 2 t + 1 2 e − t − e − 2 t ] \int_0^t\Phi(\tau)B{\rm d}\tau=\int_0^t \begin{bmatrix}{\rm e}^{-\tau}-{\rm e}^{-2\tau}\\ -{\rm e}^{-\ tau}+2{\rm e}^{-2\tau} \end{bmatrix}{\rm d}\tau= \left.\begin{bmatrix} -{\rm e}^{-\tau}+ \displaystyle\frac{1}{2}{\rm e}^{-2\tau}\\ {\rm e}^{-\tau}-{\rm e}^{-2\tau}\end {bmatrix}\right|_0^t= \begin{bmatrix} -{\rm e}^{-t}+\displaystyle\frac{1}{2}{\rm e}^{-2t}+\displaystyle \frac{1}{2}\\{\rm e}^{-t}-{\rm e}^{-2t}\end{bmatrix}0tΦ ( τ ) B d τ=0t[ete2 sqet+2e _- 2 sq]dτ=[et+21e2 sqete- 2 sq] 0t=[et+21e-2t _ _+21ete2 t]

因此:
x ( t ) = [ x 1 ( t ) x 2 ( t ) ] = [ 2 e − t − e − 2 t e − t − e − 2 t − 2 e − t + 2 e − 2 t − e − t + 2 e − 2 t ] [ x 1 ( 0 ) x 2 ( 0 ) ] + [ − e − t + 1 2 e − 2 t + 1 2 e − t − e − 2 t ] x(t)= \begin{bmatrix} x_1(t)\\ x_2(t) \end{bmatrix}= \begin{bmatrix} 2{\rm e}^{-t}-{\rm e}^{-2t} & {\rm e}^{-t}-{\rm e}^{-2t}\\ -2{\rm e}^{-t}+2{\rm e}^{-2t} & -{\rm e}^{-t}+2{\rm e}^{-2t} \end{bmatrix} \begin{bmatrix} x_1(0)\\ x_2(0) \end{bmatrix}+ \begin{bmatrix} -{\rm e}^{-t}+\displaystyle\frac{1}{2}{\rm e}^{-2t}+\displaystyle\frac{1}{2}\\ {\rm e}^{-t}-{\rm e}^{-2t} \end{bmatrix} x(t)=[x1(t)x2(t)]=[2e _te-2t _ _−2e _ _t+2e _2 tete-2t _ _et+2e _2 t][x1(0)x2(0)]+[et+21e-2t _ _+21ete2 t]

1.4 Transfer function matrix of the system

When the initial condition is zero, the transfer relationship between the Laplace transform of the output vector and the Laplace transform of the input vector is called the transfer function matrix, referred to as the transfer matrix; let the dynamic equation be: x ˙ ( t ) = A x
( t ) + B u ( t ) , y ( t ) = C x ( t ) + D u ( t ) \dot{x}(t)=Ax(t)+Bu(t),y(t)=Cx (t)+Du(t)x˙(t)=Ax(t)+B u ( t ) ,y(t)=Cx(t)+Du(t)
令初始条件为零,进行拉氏变换:
Y ( s ) = [ C ( s I − A ) − 1 B + D ] U ( s ) = G ( s ) U ( s ) Y(s)=\left[C(sI-A)^{-1}B+D\right]U(s)=G(s)U(s) Y(s)=[C(sIA)1B+D]U(s)=G(s)U(s)
系统的传递函数矩阵表达式为:
G ( s ) = C ( s I − A ) − 1 B + D G(s)=C(sI-A)^{-1}B+D G(s)=C(sIA)1B+D
若输入 u u u p p p维向量,输出 y y y q q q维向量,则 G ( s ) G(s) G(s) q × p q\times{p} q×p矩阵;

展开式:
[ Y 1 ( s ) Y 2 ( s ) ⋮ Y q ( s ) ] = [ G 11 ( s ) G 12 ( s ) ⋯ G 1 p ( s ) G 21 ( s ) G 22 ( s ) ⋯ G 2 p ( s ) ⋮ ⋮ ⋮ G q 1 ( s ) G q 2 ( s ) ⋯ G q p ( s ) ] [ U 1 ( s ) U 2 ( s ) ⋮ U p ( s ) ] \begin{bmatrix} Y_1(s)\\ Y_2(s)\\ \vdots\\ Y_q(s) \end{bmatrix}= \begin{bmatrix} G_{11}(s) & G_{12(s)} & \cdots & G_{1p}(s)\\ G_{21}(s) & G_{22(s)} & \cdots & G_{2p}(s)\\ \vdots & \vdots & & \vdots\\ G_{q1}(s) & G_{q2(s)} & \cdots & G_{qp}(s) \end{bmatrix} \begin{bmatrix} U_1(s)\\ U_2(s)\\ \vdots\\ U_p(s) \end{bmatrix} Y1(s)Y2(s)Yq(s) = G11(s)G21(s)Gq1(s)G12(s)G22(s)Gq2(s)G1p(s)G2p(s)Gqp(s) U1(s)U2(s)Up(s)
式中: G i j ( s ) ( i = 1 , 2 , … , q ; j = 1 , 2 , … , p ) G_{ij}(s)(i=1,2,\dots,q;j=1,2,\dots,p) Gij(s)(i=1,2,,q;j=1,2,,p)表示第 i i i个输出量与第 j j j个输入量之间的传递函数;

实例分析:

Example6: 已知系统动态方程为:
[ x ˙ 1 x ˙ 2 ] = [ 0 1 0 − 2 ] [ x 1 x 2 ] + [ 1 0 0 1 ] [ u 1 u 2 ] [ y 1 y 2 ] = [ 1 0 0 1 ] [ x 1 x 2 ] \begin{aligned} &\begin{bmatrix} \dot{x}_1\\ \dot{x}_2 \end{bmatrix}= \begin{bmatrix} 0 & 1\\ 0 & -2 \end{bmatrix}\begin{bmatrix} {x}_1\\ {x}_2 \end{bmatrix}+\begin{bmatrix} 1 & 0\\ 0 & 1 \end{bmatrix}\begin{bmatrix} {u}_1\\ {u}_2 \end{bmatrix}\\\\ &\begin{bmatrix} y_1\\ y_2 \end{bmatrix}=\begin{bmatrix} 1 & 0\\ 0 & 1 \end{bmatrix}\begin{bmatrix} {x}_1\\ {x}_2 \end{bmatrix} \end{aligned} [x˙1x˙2]=[0012][x1x2]+[1001][u1u2][y1y2]=[1001][x1x2]
求系统的传递矩阵.

解:

由题设可知,
A = [ 0 1 0 − 2 ] , B = [ 1 0 0 1 ] , C = [ 1 0 0 1 ] , D = 0 A= \begin{bmatrix} 0 & 1\\ 0 & -2 \end{bmatrix},B= \begin{bmatrix} 1 & 0\\ 0 & 1 \end{bmatrix},C= \begin{bmatrix} 1 & 0\\ 0 & 1 \end{bmatrix},D=0 A=[0012],B=[1001],C=[1001],D=0
故:
( s I − A ) − 1 = [ s − 1 0 s + 2 ] − 1 = [ 1 s 1 s ( s + 2 ) 0 1 s + 2 ] (sI-A)^{-1}= \begin{bmatrix} s & -1\\ 0 & s+2 \end{bmatrix}^{-1}=\begin{bmatrix} \displaystyle\frac{1}{s} & \displaystyle\frac{1}{s(s+2)}\\\\ 0 & \displaystyle\frac{1}{s+2} \end{bmatrix} (sIA)1=[s01s+2]1= s10s(s+2)1s+21
The system transfer matrix can be obtained:
G ( s ) = C ( s I − A ) − 1 B + D = [ 1 0 0 1 ] [ 1 s 1 s ( s + 2 ) 0 1 s + 2 ] [ 1 0 0 1 ] = [ 1 s 1 s ( s + 2 ) 0 1 s + 2 ] G(s)=C(sI-A)^{-1}B+D=\begin{bmatrix} 1 & 0\\ 0 & 1 \end{bmatrix}\begin{bmatrix} \displaystyle\frac{1}{s} & \displaystyle\frac{1}{s(s+2)}\\\\ 0 & \displaystyle\frac{1 }{s+2} \end{bmatrix} \begin{bmatrix} 1 & 0\\ 0 & 1 \end{bmatrix}= \begin{bmatrix} \displaystyle\frac{1}{s} & \displaystyle\frac {1}{s(s+2)}\\\\ 0 & \displaystyle\frac{1}{s+2} \end{bmatrix}G(s)=C ( with IA)1B+D=[1001] s10s(s+2)1s+21 [1001]= s10s(s+2)1s+21

1.5 Establishment and solution of state space expression for linear discrete system
  • 离散系统特点:系统中的各个变量被处理成为只在离散时刻取值,其状态空间描述只反映离散时刻的变量组间的因果关系和转换关系,因而这类系统通常称为离散时间系统,简称离散系统;
  • 线性离散系统的动态方程可以利用系统的差分方程建立,可以利用线性连续动态方程的离散化得到;
1.5.1 由差分方程建立动态方程

经典控制理论中离散系统通常用差分方程或脉冲传递函数描述,单输入-单输出线性定常离散系统差分方程的一般形式为:
y ( k + n ) + a n − 1 y ( k + n − 1 ) + ⋯ + a 1 y ( k + 1 ) + a 0 y ( k ) = b n u ( k + n ) + b n − 1 u ( k + n − 1 ) + ⋯ + b 1 u ( k + 1 ) + b 0 u ( k ) \begin{aligned} &y(k+n)+a_{n-1}y(k+n-1)+\dots+a_1y(k+1)+a_0y(k)\\\\ =&b_nu(k+n)+b_{n-1}u(k+n-1)+\dots+b_1u(k+1)+b_0u(k) \end{aligned} =y(k+n)+an1y(k+n1)++a1y(k+1)+a0y(k)bnu(k+n)+bn1u(k+n1)++b1u(k+1)+b0u(k)
其中: k k k表示 k T kT kT时刻, T T T为采样周期, y ( k ) , u ( k ) y(k),u(k) y(k),u(k)分别为 k T kT kT时刻的输出量和输入量; a i , b i ( i = 0 , 1 , 2 , … , n , 且 a n = 1 ) a_i,b_i(i=0,1,2,\dots,n,且a_n=1) ai,bi(i=0,1,2,,n,an=1)为表征系统特性的常系数;

考虑初始条件为零时的 z z z电影全线有:
Z [ y ( k ) ] = Y ( z ) , Z [ y ( k + i ) ] = zi Y ( z ) Z[y(k)]=Y(z),Z[y( k+i)]=z^iY(z)Z[y(k)]=Y(z),Z[y(k+i)]=zi Y(z)zz
for the difference equationz变换,可得:
G ( z ) = Y ( z ) U ( z ) = b n z n + b n − 1 z n − 1 + ⋯ + b 1 z + b 0 z n + a n − 1 z n − 1 + ⋯ + a 1 z + a 0 = b n + β n − 1 z n − 1 + ⋯ + β 1 z + β 0 z n + a n − 1 z n − 1 + ⋯ + a 1 z + a 0 = b n + N ( z ) D ( z ) \begin{aligned} G(z)&=\frac{Y(z)}{U(z)}=\frac{b_nz^n+b_{n-1}z^{n-1}+\dots+b_1z+b_0}{z^n+a_{n-1}z^{n-1}+\dots+a_1z+a_0}\\\\ &=b_n+\frac{\beta_{n-1}z^{n-1}+\dots+\beta_1z+\beta_0}{z^n+a_{n-1}z^{n-1}+\dots+a_1z+a_0}=b_n+\frac{N(z)}{D(z)} \end{aligned} G(z)=U(z)Y(z)=zn+an1zn1++a1z+a0bnzn+bn1zn1++b1z+b0=bn+zn+an1zn1++a1z+a0bn1zn1++b1z+b0=bn+D(z)N(z)
G ( z ) G(z) G ( z ) is called the pulse transfer function;

N ( z ) / D ( z ) N(z)/D(z) N ( z ) / D ( z ) serial decomposition, introducing intermediate variableQ ( z ) Q(z)Q(z),有:
z n Q ( z ) + a n − 1 z n − 1 Q ( z ) + ⋯ + a 1 z Q ( z ) + a 0 Q ( z ) = U ( z ) Y ( z ) = β n − 1 z n − 1 Q ( z ) + ⋯ + β 1 z Q ( z ) + β 0 Q ( z ) \begin{aligned} &z^nQ(z)+a_{n-1}z^{n-1}Q(z)+\dots+a_1zQ(z)+a_0Q(z)=U(z)\\\\ &Y(z)=\beta_{n-1}z^{n-1}Q(z)+\dots+\beta_1zQ(z)+\beta_0Q(z) \end{aligned} zn Q(z)+an1zn1Q(z)++a1zQ(z)+a0Q(z)=U(z)Y(z)=bn1zn1Q(z)++b1zQ(z)+b0Q(z)
The final vector-matrix form is:
[ x 1 ( k + 1 ) x 2 ( k + 1 ) ⋮ xn − 1 ( k + 1 ) xn ( k + 1 ) ] = [ 0 1 0 ⋯ 0 0 0 1 ⋯ 0 ⋮ ⋮ ⋮ ⋮ 0 0 0 ⋯ 1 − a 0 − a 1 − a 2 ⋯ − an − 1 ] [ x 1 ( k ) x 2 ( k ) ⋮ xn − 1 ( k ) xn ( k ) ] + [ 0 0 ⋮ 0 1 ] u ( k ) \begin{bmatrix} x_1(k+1)\\ x_2(k+1)\\ \vdots\\ x_{n-1}(k+1)\\ x_n(k +1) \end{bmatrix}= \begin{bmatrix} 0 & 1 & 0 & \cdots & 0\\ 0 & 0 & 1 & \cdots & 0\\ \vdots & \vdots & \vdots & & \vdots \\ 0 & 0 & 0 & \cdots & 1\\ -a_0 & -a_1 & -a_2 & \cdots & -a_{n-1} \end{bmatrix} \begin{bmatrix} x_1(k)\\ x_2 (k)\\ \vdots\\ x_{n-1}(k)\\ x_n(k) \end{bmatrix}+ \begin{bmatrix} 0\\ 0\\ \vdots\\ 0\\ 1 \ end{bmatrix}u(k) x1(k+1)x2(k+1)xn1(k+1)xn(k+1) = 000a0100a1010a2001an1 x1(k)x2(k)xn1(k)xn(k) + 0001 u(k)

y ( k ) = [ β 0 β 1 ⋯ β n − 1 ] x ( k ) + bnu ( k ) y(k)=\begin{bmatrix}\beta_0 & \beta_1 & \cdots & \beta_{n-1 }\end{bmatrix}x(k)+b_nu(k)and ( k )=[b0b1bn1]x(k)+bnu(k)

简记:
x ( k + 1 ) = G x ( k ) + h u ( k ) y ( k ) = c x ( k ) + d u ( k ) \begin{aligned} &x(k+1)=Gx(k)+hu(k)\\\\ &y(k)=cx(k)+du(k) \end{aligned} x(k+1)=Gx ( k ) _+h u ( k )and ( k )=cx(k)+d u ( k )
Among them: GGG is a friend matrix,G , h G,hG,h is controllable standard type;

The discrete system equation of state describes ( k + 1 ) T (k+1)T(k+1 ) The state at time T is related to k T kTThe relationship between the state at time k T and the input quantity, and its output equation describesk T kTk T kT output andk T kTThe relationship between the state at time k T and the input quantity;

The dynamic equation of a linear steady multiple-input-multiple-output discrete system is:
x ( k + 1 ) = G x ( k ) + H u ( k ) y ( k ) = C x ( k ) + D u ( k ) \begin {aligned} &x(k+1)=Gx(k)+Hu(k)\\\\ &y(k)=Cx(k)+Du(k) \end{aligned}x(k+1)=Gx ( k ) _+H u ( k )and ( k )=Cx(k)+D u ( k )

1.5.2 Discretization of steady continuous dynamic equations

Known steady continuous system state equation: x ˙ = A x + B u \dot{x}=Ax+Bux˙=Ax+B ux ( t 0 ) x(t_0)x(t0) u ( t ) u(t) The solution under the action of u ( t )
is: x ( t ) = Φ ( t − t 0 ) x ( t 0 ) + ∫ t 0 T Φ ( t − τ ) B u ( τ ) d τ x(t)= \Phi(t-t_0)x(t_0)+\int_{t_0}^T\Phi(t-\tau)Bu(\tau){\rm d}\taux(t)=Φ ( tt0)x(t0)+t0TΦ ( tτ ) B u ( τ ) d τ
discretized equation of state is:
x ( k + 1 ) = Φ ( T ) x ( k ) + G ( T ) u ( k ) x(k+1)=\Phi(T )x(k)+G(T)u(k)x(k+1)=Φ ( T ) x ( k )+G ( T ) u ( k )
任何:
G ( T ) = ∫ 0 T Φ ( τ ′ ) B d τ ′ 和 Φ ( T ) = Φ ( t ) ∣ t = TG(T)=\int_0^T\ Phi(\tau')B{\rm d}\tau'和\Phi(T)=\Phi(t)|_{t=T}G(T)=0TF ( t)Bdτ andΦ(T)=Φ ( t ) t=T
The output equation of the discretized system:
y ( k ) = C x ( k ) + D u ( k ) y(k)=Cx(k)+Du(k)and ( k )=Cx(k)+D u ( k )

1.5.3 Solutions of steady discrete dynamic equations

The solution of the discretized state equation, also known as the discretized state transition equation:
x ( k ) = Φ k ( T ) x ( 0 ) + ∑ i = 0 k − 1 Φ k − 1 − i ( T ) G ( T ) u ( i ) x(k)=\Phi^k(T)x(0)+\sum_{i=0}^{k-1}\Phi^{k-1-i}(T)G(T )u(i)x(k)=Phik(T)x(0)+i=0k1Phik1i(T)G(T)u(i)
u ( i ) = 0 ( i = 0 , 1 , ⋯   , k − 1 ) u(i)=0(i=0,1,\cdots,k-1) u(i)=0(i=0,1,,k1 )时,有:
x ( k ) = Φ k ( T ) x ( 0 ) = Φ ( k T ) x ( 0 ) = Φ ( k ) x ( 0 ) x(k)=\Phi^k(T )x(0)=\Phi(kT)x(0)=\Phi(k)x(0)x(k)=Phik(T)x(0)=Φ(kT)x(0)=Φ ( k ) x ( 0 )
where:Φ ( k ) \Phi(k)Φ ( k ) is called the dynamic transfer matrix of the discretized system;

输出方程为:
y ( k ) = C x ( k ) + D u ( k ) = C Φ k ( T ) x ( 0 ) + C ∑ i = 0 k − 1 Φ k − 1 − i ( T ) G ( T ) u ( i ) + D u ( k ) y(k)=Cx(k)+Du(k)=C\Phi^k(T)x(0)+C\sum_{i=0}^{k-1}\Phi^{k-1-i}(T)G(T)u(i)+Du(k) and ( k )=Cx(k)+D u ( k )=CΦk(T)x(0)+Ci=0k1Phik1i(T)G(T)u(i)+D u ( k )
can obtain the solution of the discrete dynamic equation by using the recurrence method:
x ( k ) = G kx ( 0 ) + ∑ i = 0 k − 1 G k − 1 − i H u ( i ) y ( k ) = CG kx ( 0 ) + C ∑ i = 0 k − 1 G k − 1 − i H u ( i ) + D u ( k ) \begin{aligned} &x(k)=G^kx(0)+\ sum_{i=0}^{k-1}G^{k-1-i}Hu(i)\\ &y(k)=CG^kx(0)+C\sum_{i=0}^{k -1}G^{k-1-i}Hu(i)+Du(k) \end{aligned}x(k)=Gkx(0)+i=0k1Gk 1 i Hu(i)and ( k )=CGkx(0)+Ci=0k1Gk 1 i Hu(i)+D u ( k )
Where: G k G^kGk meanskkk GGs_G multiply;

Case Analysis:

Example8: The state equation of the known continuous-time system is:
x ˙ = [ 0 1 − 2 − 3 ] x + [ 0 1 ] u \dot{x}= \begin{bmatrix} 0 & 1\\ -2 & - 3 \end{bmatrix}x+ \begin{bmatrix} 0\\ 1 \end{bmatrix}ux˙=[0213]x+[01]uLet T = 1 T=
1T=1 , find the corresponding discrete-time state equation.

解:
s I − A = [ s 0 0 s ] − [ 0 1 − 2 − 3 ] = [ s − 1 2 s + 3 ] sI-A= \begin{bmatrix} s & 0\\ 0 & s \end{bmatrix}- \begin{bmatrix} 0 & 1 \\ -2 & -3 \end{bmatrix}= \begin{bmatrix} s & -1 \\ 2 & s+3 \end{bmatrix} and IA=[s00s][0213]=[s21s+3]

( s I − A ) − 1 = a d j ( s I − A ) ∣ s I − A ∣ = 1 ( s + 1 ) ( s + 2 ) [ s + 3 1 − 2 s ] = [ 2 s + 1 − 1 s + 2 1 s + 1 − 1 s + 2 − 2 s + 1 + 2 s + 2 − 1 s + 1 + 2 s + 2 ] \begin{aligned} (sI-A)^{-1}&=\frac{ {\rm adj}(sI-A)}{|sI-A|}=\frac{1}{(s+1)(s+2)} \begin{bmatrix} s+3 & 1 \\ -2 & s \end{bmatrix}\\\\&= \begin{bmatrix} \displaystyle\frac{2}{s+1}-\displaystyle\frac{1}{s+2} & \displaystyle\frac{1}{s+1}-\displaystyle\frac{1}{s+2}\\\\ \displaystyle\frac{-2}{s+1}+\displaystyle\frac{2}{s+2} & \displaystyle\frac{-1}{s+1}+\displaystyle\frac{2}{s+2} \end{bmatrix} \end{aligned} ( s IA)1=sIAadj (sIA)=(s+1)(s+2)1[s+321s]= s+12s+21s+12+s+22s+11s+21s+11+s+22

Φ ( t ) = L − 1 [ ( s I − A ) − 1 ] = [ 2 e − t − e − 2 t e − t − e − 2 t − 2 e − t + 2 e − 2 t − e − t + 2 e − 2 t ] Φ ( T ) = Φ ( t ) ∣ t = T = 1 = [ 0.6004 0.2325 − 0.4651 − 0.0972 ] \begin{aligned} &\Phi(t)=L^{-1}\left[(sI-A)^{-1}\right]= \begin{bmatrix} 2{\rm e}^{-t}-{\rm e}^{-2t} & {\rm e}^{-t}-{\rm e}^{-2t}\\ -2{\rm e}^{-t}+2{\rm e}^{-2t} & -{\rm e}^{-t}+2{\rm e}^{-2t} \end{bmatrix}\\\\ &\Phi(T)=\Phi(t)|_{t=T=1}= \begin{bmatrix} 0.6004 & 0.2325\\ -0.4651 & -0.0972 \end{bmatrix} \end{aligned} Φ ( t )=L1[ ( s IA)1]=[2e _te-2t _ _−2e _ _t+2e _2tete2tet+2e2t]Φ(T)=Φ(t)t=T=1=[0.60040.46510.23250.0972]

G ( T ) = ∫ 0 T Φ ( τ ) B d τ = ∫ 0 T [ e − τ − e − 2 τ − e − τ + 2 e − 2 τ ] d τ = [ 1 2 − e − T + 1 2 e − 2 T e − T − e − 2 T ] G(T)=\int_0^T\Phi(\tau)B{\rm d}\tau=\int_0^T\begin{bmatrix}{\ rm e}^{-\tau}-{\rm e}^{-2\tau}\\-{\rm e}^{-\tau}+2{\rm e}^{-2\tau} \end{bmatrix}{\rm d}\tau= \begin{bmatrix}\displaystyle\frac{1}{2}-{\rm e}^{-T}+\frac{1}{2}{\ rm e}^{-2T}\\{\rm e}^{-T}-{\rm e}^{-2T}\end{bmatrix}G(T)=0TΦ ( τ ) B d τ=0T[ete2 sqet+2e _- 2 sq]dτ=[21eT+21e−2 T _eTe2 T]

G ( T ) ∣ T = 1 = [ 1 2 − e − T + 1 2 e − 2 T e − T − e − 2 T ] ∣ T = 1 = [ 0.1998 0.2325 ] G(T)|_{T=1}=\left.\begin{bmatrix} \displaystyle\frac{1}{2}-{\rm e}^{-T}+\frac{1}{2}{\rm e}^{-2T}\\ {\rm e}^{-T}-{\rm e}^{-2T} \end{bmatrix}\right|_{T=1}=\begin{bmatrix}0.1998\\0.2325\end{bmatrix} G(T)T=1=[21eT+21e−2 T _eTe2 T] T=1=[0.19980.2325]

1.6 Application of MATLAB/SIMULINK in State Space Description of Linear System
1.6.1 Practice 1: Finding the state space model of the control system

Experimental requirements: known system G 1 ( s ) G_1(s)G1( s ) andG 2 ( s ) G_2(s)G2( s ) models are:G 1 ( s ) = 2 s 2 + 8 s + 6 s 3 + 8 s 2 + 16 s + 6 , G 2 ( s ) = 2 ( s + 1 ) ( s + 3 ) s ( s + 2 ) ( s + 8 ) G_1(s)=\displaystyle\frac{2s^2+8s+6}{s^3+8s^2+16s+6}, G_2(s)=\ displaystyle\frac{2(s+1)(s+3)}{s(s+2)(s+8)}G1(s)=s3+8 s2+16s+62s2+8 s+6G2(s)=s(s+2)(s+8)2(s+1)(s+3), find the state-space model of the system.

untie:

% 实例Chapter9.1.6.1
clc;clear;

% 建立系统传递函数模型
num1=[2,8,6];den1=[1,8,16,6];
[A1,B1,C1,D1]=tf2ss(num1,den1)

z=[-1,-3];p=[0,-2,-8];k=2;
[A2,B2,C2,D2]=zp2ss(z,p,k)
% G1的状态空间模型
A1 =
    -8   -16    -6
     1     0     0
     0     1     0
B1 =
     1
     0
     0
C1 =
     2     8     6
D1 =
     0

% G2的状态空间模型
A2 =
     0     0     0
     1   -10    -4
     0     4     0
B2 =
     1
     0
     0
C2 =
    2.0000  -12.0000   -6.5000
D2 =
     0
  • System G 1 ( s ) G_1(s)G1The state space expression of ( s )
    : { X ˙ = [ − 8 − 16 − 6 1 0 0 0 1 0 ] X + [ 1 0 0 ] UY = [ 2 8 6 ] X \begin{cases} &\dot {X}=\begin{bmatrix} -8 & -16 & -6\\ 1 & 0 & 0\\ 0 & 1 & 0 \end{bmatrix}X+\begin{bmatrix} 1\\0\\0 \ end{bmatrix}U\\\\ &Y=\begin{bmatrix} 2 & 8 & 6 \end{bmatrix}X \end{cases} X˙= 8101601600 X+ 100 UY=[286]X

  • System G 2 ( s ) G_2(s)G2The state space expression of ( s )
    : { X ˙ = [ 0 0 0 1 − 10 − 4 0 4 0 ] X + [ 1 0 0 ] UY = [ 2 − 12 − 6.5 ] X \begin{cases} &\ dot{X}=\begin{bmatrix} 0 & 0 & 0\\ 1 & -10 & -4\\ 0 & 4 & 0 \end{bmatrix}X+\begin{bmatrix} 1\\0\\0 \ end{bmatrix}U\\\\ &Y=\begin{bmatrix} 2 & -12 & -6.5 \end{bmatrix}X \end{cases} X˙= 0100104040 X+ 100 UY=[2126.5]X

1.6.2 Actual Combat 2: Finding the State Space Model of the Control System

Experimental requirements: The dynamic differential equation of the known control system is:
y ( 3 ) ( t ) + 3 y ( 2 ) ( t ) + 3 y ( 1 ) ( t ) + y ( t ) = u ( 2 ) ( t ) + 2 u ( 1 ) ( t ) + u ( t ) y^{(3)}(t)+3y^{(2)}(t)+3y^{(1)}(t)+y (t)=u^{(2)}(t)+2u^{(1)}(t)+u(t)y(3)(t)+3 y(2)(t)+3 y(1)(t)+y(t)=u(2)(t)+2 and(1)(t)+u ( t )
Find the state-space model of the system.

untie:

% 实例Chapter9.1.6.2
clc;clear;

% 建立传递函数模型
num=[1,2,1];den=[1,3,3,1];
G=tf(num,den);

sys=ss(G)
% 状态空间模型
sys =
  A = 
         x1    x2    x3
   x1    -3  -1.5    -1
   x2     2     0     0
   x3     0   0.5     0 
  B = 
       u1
   x1   2
   x2   0
   x3   0 
  C = 
        x1   x2   x3
   y1  0.5  0.5  0.5 
  D = 
       u1
   y1   0
  • State-space model of the control system:
    { X ˙ = [ − 3 − 0.75 − 0.25 4 0 0 0 1 0 ] X + [ 1 0 0 ] UY = [ 1 0.5 0.25 ] X \begin{cases} &\dot{X }=\begin{bmatrix} -3 & -0.75 & -0.25\\ 4 & 0 & 0\\ 0 & 1 & 0 \end{bmatrix}X+\begin{bmatrix} 1\\0\\0 \end{ bmatrix}U\\\\ &Y=\begin{bmatrix} 1 & 0.5 & 0.25 \end{bmatrix}X \end{cases} X˙= 3400.75010.2500 X+ 100 UY=[10.50.25]X
1.6.3 Combat 3: find the diagonal standard form of the system

Experimental requirements: The state space model of the known control system is:
{ X ˙ = [ 0 1 0 0 0 1 − 6 − 11 − 6 ] X + [ 1 0 0 ] UY = [ 1 1 0 ] X \begin{cases } &\dot{X}=\begin{bmatrix} 0 & 1 & 0\\ 0 & 0 & 1\\ -6 & -11 & -6 \end{bmatrix}X+\begin{bmatrix} 1\\0 \\0 \end{bmatrix}U\\\\ &Y=\begin{bmatrix} 1 & 1 & 0 \end{bmatrix}X \end{cases} X˙= 0061011016 X+ 100 UY=[110]X
Find the diagonal normal form of the system.

untie:

% 实例Chapter9.1.6.3
clc;clear;

% 建立状态空间模型
A=[0,1,0;0,0,1;-6,-11,-6];
B=[1;0;0];C=[1,1,0];D=0;
% ss(A,B,C,D)

% 生成对角标准型
% Ts:所作的线性变换;'mod':转化成对角型
[As,Bs,Cs,Ds,Ts]=canon(A,B,C,D,'mod')
As =
   -3.0000         0         0
         0   -2.0000         0
         0         0   -1.0000
Bs =
   -7.7621
  -14.6969
    8.6168
Cs =
    0.2577   -0.2041    0.0000
Ds =
     0
Ts =
   -7.7621  -11.6431   -3.8810
  -14.6969  -19.5959   -4.8990
    8.6168    7.1807    1.4361
  • The diagonal normal form of the system is:
    { X ˙ = [ − 3 0 0 0 − 2 0 0 0 − 1 ] X + [ − 7.7621 − 14.6969 8.6168 ] UY = [ 0.2577 − 0.2041 0.0000 ] X \begin{cases} & \dot{X}=\begin{bmatrix} -3 & 0 & 0\\ 0 & -2 & 0\\ 0 & 0 & -1 \end{bmatrix}X+\begin{bmatrix} -7.7621\\ -14.6969 \\ 8.6168 \end{bmatrix}U\\\\ &Y=\begin{bmatrix} 0.2577 & -0.2041 & 0.0000 \end{bmatrix}X \end{cases} X˙= 300020001 X+ 7.762114.69698.6168 UY=[0.25770.20410.0000]X
1.6.4 Practice 4: Seek the Jordan Standard Form of the system

Experimental requirements: The transfer function of the known control system is: G 1 ( s ) = 2 s + 1 s 3 + 7 s 2 + 14 s + 8 , G 2 ( s ) = 2 s 2 + 5 s + 3 ( s − 1 ) 3 G_1(s)=\displaystyle\frac{2s+1}{s^3+7s^2+14s+8}, G_2(s)=\displaystyle\frac{2s^2+5s+3}{ (s-1)^3}G1(s)=s3+7s _2+14s+82s+1G2(s)=(s1)32s2+5s+3, find the equivalent standard form of the system respectively.

untie:

% 实例Chapter9.1.6.4
clc;clear;

% 建立系统1模型
num1=[2,1];den1=[1,7,14,8];
[r1,p1,k1]=residue(num1,den1);      % 求系统的分式表达式

A1=diag(p1);B1=ones(length(r1),1);
C1=rat(r1);D1=0;

% 建立系统2模型
num2=[2,5,3];den2=conv([1,-1],conv([1,-1],[1,-1]));
[r2,p2,k2]=residue(num2,den2);      % 求系统的分式表达式

A2=diag(p2);B2=rot90(r2);
C2=ones(1,length(r2));D2=0;

A1,B1,C1,D1,A2,B2,C2,D2
% G1约当标准型
A1 =
   -4.0000         0         0
         0   -2.0000         0
         0         0   -1.0000
B1 =
     1
     1
     1
C1 =
  3×11 char 数组
    '-1 + 1/(-6)'
    '2 + 1/(-2) '
    '-0 + 1/(-3)'
D1 =
     0

% G2约当标准型
A2 =
    1.0000         0         0
         0    1.0000         0
         0         0    1.0000
B2 =
     2     9    10
C2 =
     1     1     1
D2 =
     0
  • System G 1 ( s ) G_1(s)G1(s)约当标准型:
    { X ˙ = [ − 4 0 0 0 − 2 0 0 0 − 1 ] X + [ 1 1 1 ] U Y = [ − 7 6 3 2 − 1 3 ] X \begin{cases} &\dot{X}=\begin{bmatrix} -4 & 0 & 0\\ 0 & -2 & 0\\ 0 & 0 & -1 \end{bmatrix}X+\begin{bmatrix} 1\\1\\1 \end{bmatrix}U\\\\ &Y=\begin{bmatrix} -\displaystyle\frac{7}{6} & \displaystyle\frac{3}{2} & -\displaystyle\frac{1}{3} \end{bmatrix}X \end{cases} X˙= 400020001 X+ 111 UY=[672331]X

  • System G 2 ( s ) G_2(s)G2( s ) Standard equation:
    { X ̇ = [ 1 0 0 0 1 0 0 0 1 ] X + [ 1 1 1 ] UY = [ 2 9 10 ] X \begin{cases} &\dot{X}= \begin {bmatrix} 1 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & 1 \end{bmatrix}X+\begin{bmatrix}1\\1\\1 \end{bmatrix}U\\ \\ &Y=\begin{bmatrix}2&9&10\end{bmatrix}X\end{cases} X˙= 100010001 X+ 111 UY=[2910]X

1.6.5 Practice 5: Finding the System State Transition Matrix

Experimental requirements: known matrix: A = [ 0 1 0 0 0 1 1 − 3 3 ] A=\begin{bmatrix}0&1&0\\0&0&1\\1&-3&3\end{bmatrix}A= 001103013 ,当 t = 0.2 s t=0.2{\rm s} t=At 0.2 s , find the state transition matrix.

untie:

% 实例Chapter9.1.6.4
clc;clear;

A=[0,1,0;0,0,1;1,-3,3];
t=0.2;
Phi=expm(A*t)               % 状态转移矩阵
Phi =
    1.0016    0.1954    0.0244
    0.0244    0.9283    0.2687
    0.2687   -0.7817    1.7344
  • 状态转移矩阵为:
    Φ ( t ) = [ 1.0016 0.1954 0.0244 0.0244 0.9283 0.2687 0.2687 − 0.7817 1.7344 ] \Phi(t)=\begin{bmatrix} 1.0016 & 0.1954 & 0.0244\\ 0.0244 & 0.9283 & 0.2687\\ 0.2687 & - 0.7817 & 1.7344 \end{bmatrix}Φ ( t )= 1.00160.02440.26870.19540.92830.78170.02440.26871.7344
1.6.6 Actual Combat 6

Experimental requirements: The state space model of the known control system is:
A = [ − 2 − 2.5 − 0.5 1 0 0 0 1 0 ] , B = [ 1 0 0 ] , C = [ 0 1.5 1 ] , D = 0 A= \begin{bmatrix} -2 & -2.5 & -0.5\\ 1 & 0 & 0\\ 0 & 1 & 0 \end{bmatrix}, B=\begin{bmatrix} 1\\0\\0 \end{ bmatrix}, C=\begin{bmatrix} 0 & 1.5 & 1 \end{bmatrix}, D=0A= 2102.5010.500 B= 100 C=[01.51]D=0
seek:

  1. The impulse response and step response of the system;
  2. In the initial state: x ( 0 ) = [ 1 0 2 ] T x(0)=\begin{bmatrix}1 & 0 & 2\end{bmatrix}^Tx(0)=[102]Under the condition of T , input: u ( t ) = { 2 , 0 ≤ t < 2 0.5 , t ≤ 2 u(t)=\begin{cases}&2,&0≤t<2\\&0.5,&t≤ 2\end{cases}u(t)={ 2,0.5,0t<2t2, the state variable: X ( t ) = [ x 1 ( t ) , x 2 ( t ) , x 3 ( t ) ] TX(t)=\begin{bmatrix}x_1(t),x_2(t),x_3 (t)\end{bmatrix}^TX(t)=[x1(t),x2(t),x3(t)]T response curve.

untie:

S T E P 1 {\rm STEP1} STEP1 ]: Find the system impulse response and step response.

% 实例Chapter9.1.6.5
clc;clear;

% 建立空间状态模型
A=[-2,-2.5,-0.5;1,0,0;0,1,0];
B=[1;0;0];C=[0,1.5,1];D=0;

G=ss(A,B,C,D);
t=[0:0.1:20];

% 单位阶跃响应和单位脉冲响应
figure(1);
impulse(G,t);grid;
set(findobj(get(gca,'Children'),'LineWidth',0.5),'LineWidth',1.5);

figure(2);
step(G,t);grid;
set(findobj(get(gca,'Children'),'LineWidth',0.5),'LineWidth',1.5);

1

2

S T E P 2 {\rm STEP2} STEP2】: Solve the response curve.

% 计算响应曲线
x0=[1;0;2];
u(1,1:20)=2*ones(1,20);
u(1,21:201)=0.5*ones(1,181);    % 输入量u
[y,t,x]=lsim(G,u,t,x0);         

figure(3);
plot(t,x(:,1),'-',t,x(:,2),'--',t,x(:,3),'-.');
xlabel('时间/秒');ylabel('幅值');grid;
legend('x_1(t)','x_2(t)','x_3(t)');
set(findobj(get(gca,'Children'),'LineWidth',0.5),'LineWidth',1.5);

3

【Complete code】

% 实例Chapter9.1.6.5
clc;clear;

% 建立空间状态模型
A=[-2,-2.5,-0.5;1,0,0;0,1,0];
B=[1;0;0];C=[0,1.5,1];D=0;

G=ss(A,B,C,D);
t=[0:0.1:20];

% 单位阶跃响应和单位脉冲响应
figure(1);
impulse(G,t);grid;
set(findobj(get(gca,'Children'),'LineWidth',0.5),'LineWidth',1.5);

figure(2);
step(G,t);grid;
set(findobj(get(gca,'Children'),'LineWidth',0.5),'LineWidth',1.5);

% 计算响应曲线
x0=[1;0;2];
u(1,1:20)=2*ones(1,20);
u(1,21:201)=0.5*ones(1,181);    % 输入量u
[y,t,x]=lsim(G,u,t,x0);         

figure(3);
plot(t,x(:,1),'-',t,x(:,2),'--',t,x(:,3),'-.');
xlabel('时间/秒');ylabel('幅值');grid;
legend('x_1(t)','x_2(t)','x_3(t)');
set(findobj(get(gca,'Children'),'LineWidth',0.5),'LineWidth',1.5);

Guess you like

Origin blog.csdn.net/qq_39032096/article/details/129843496