基于matlab的控制系统与仿真-2

2020-10-30 11:03:12 浏览数 (1)

试求其零极点模型和状态空间模型。

代码语言:javascript复制
>> sys1=tf([2 18 40],[1 6 11 6 ])

sys1 =
 
    2 s^2   18 s   40
  ----------------------
  s^3   6 s^2   11 s   6
 
Continuous-time transfer function.

>> sys2=zpk(sys1)

sys2 =
 
    2 (s 5) (s 4)
  -----------------
  (s 3) (s 2) (s 1)
 
Continuous-time zero/pole/gain model.
 
>> sys3=ss(sys1)

sys3 =
 
  A = 
          x1     x2     x3
   x1     -6  -2.75   -1.5
   x2      4      0      0
   x3      0      1      0
 
  B = 
       u1
   x1   4
   x2   0
   x3   0
 
  C = 
          x1     x2     x3
   y1    0.5  1.125    2.5
 
  D = 
       u1
   y1   0
 
Continuous-time state-space model.
代码语言:javascript复制
>>  z=[-4;-5];p=[-1;-2;-3];k=2;
>>  [num,den]=zp2tf(z,p,k);G=tf(num,den)

G =
 
    2 s^2   18 s   40
  ----------------------
  s^3   6 s^2   11 s   6
 
Continuous-time transfer function.

>> [a,b,c,d]=zp2ss(z,p,k)

a =

   -1.0000         0         0
    1.0000   -5.0000   -2.4495
         0    2.4495         0


b =

     1
     0
     0


c =

    2.0000    8.0000   11.4310


d =

     0

代码语言:javascript复制
>> g1=tf([2 6 5],[1 4 5 2])

g1 =
 
     2 s^2   6 s   5
  ---------------------
  s^3   4 s^2   5 s   2
 
Continuous-time transfer function.

>> g2=tf([1 4 1],[1 9 8 0])

g2 =
 
    s^2   4 s   1
  -----------------
  s^3   9 s^2   8 s
 
Continuous-time transfer function.

>> g3=zpk([-3,-7],[-1,-4,-6],5)

g3 =
 
    5 (s 3) (s 7)
  -----------------
  (s 1) (s 4) (s 6)
 
Continuous-time zero/pole/gain model.

 
>> g=series(g1,g2)

g =
 
        2 s^4   14 s^3   31 s^2   26 s   5
  ----------------------------------------------
  s^6   13 s^5   49 s^4   79 s^3   58 s^2   16 s
 
Continuous-time transfer function.

>> g4=series(g,g3)

g4 =
 
  10 (s 3) (s 3.732) (s 7) (s 0.2679) (s^2   3s   2.5)
  ----------------------------------------------------
           s (s 1)^4 (s 2) (s 4) (s 6) (s 8)
 
Continuous-time zero/pole/gain model.

代码语言:javascript复制
>> G1=zpk([-3],[-1,-1,-2],1)

G1 =
 
      (s 3)
  -------------
  (s 1)^2 (s 2)
 
Continuous-time zero/pole/gain model.

>> G2=tf([3 1 4],[5 12 3])

G2 =
 
   3 s^2   s   4
  ----------------
  5 s^2   12 s   3
 
Continuous-time transfer function.

>> G=parallel(G1,G2)

G =
 
  0.6 (s 0.3913) (s^2   3.896s   3.819) (s^2   0.04608s   3.793)
  --------------------------------------------------------------
                (s 1)^2 (s 2) (s 2.117) (s 0.2835)
 
Continuous-time zero/pole/gain model.

>> 

0 人点赞