Ejercicio ing de control

download Ejercicio ing de control

of 19

  • date post

    18-Nov-2015
  • Category

    Documents

  • view

    7
  • download

    2

Embed Size (px)

description

implementacion de matlab para resolucion de un ejercicio de ingenieria de control

Transcript of Ejercicio ing de control

  • Amirhossein Haghpanah IVEZOO

    software engineering control engineering homework

    The given values are:

    m M J L0 Y0

    2 0.9 1.2e-4 0.03 0.7 0.5

    and Value of gravity acceleration g = 9.81m/ s 2 .

    [

    + 0 0 0 0

    0 0 +

    ].()= (

    /

    )

  • 1. Use the above expressions to get the linear state equation of the crane and the

    transfer functions Wr, f (s) and Wl,(s) . Use the parameter values from Table 1 to get the state equation and the transfer functions numerically as well. Compute the

    eigenvalues and the poles!

    [

    + 0 0 0 0

    0 0 +

    ].()= (

    /

    ) =>

    ()= [

    + 0 0 0 0

    0 0 +

    ]

    1

    . (

    /

    ) =>

    ()= [

    2 + 0.9 2 0.7 02 2 0.7 0

    0 0 2 + (1.2104

    0.032)]

    1

    . (

    2 (9.81) /0.03

    ) =>

    ()= [

    2.9 1.4 02 1.4 00 0 2.133

    ]

    1

    . (

    19.62/0.03

    ) =>

    By using inverse function in matlab: inv() we get:

    ()= [

    1.11 1.11 01.5873 2.3016 0

    0 0 0.4688]

    1

    . (

    19.62/0.03

    ) =>

    ()= (

    1.11 + 21.771.58 45.15

    15.62

    ), { = + = +

    , x=

    (

    )

    , u=(), y=(

    )

    So now we find the values of A,B,C,D from them:

  • A=

    (

    0 0 10 0 00 21.77 00 45.15 00 0 00 0 0

    0 0 01 0 00 0 00 0 00 0 10 0 0)

    , B=

    (

    0 00 01.11 01.58 00 00 15.62)

    C=(1 0 0 0 1 0) , D=0

    For simpler calculation we can see that the state space could be separated into

    two SiSo systems:

    x=

    (

    )

    so x1=(

    ) and x2=()

    u=() so u1=() and u2=()

    y=() so y1= () and y2=()

    so we will get these values after separation:

    A1=(

    0 0 1 00 0 0 10 21.77 0 00 45.15 0 0

    ) , A2=(0 10 0

    )

    B1=(

    001.111.58

    ) , B2=(0

    15.62)

    C1=(1 0 0 0) , C2=(1 0)

    Wr,f (s) = 1( 1)11 +

    Wl, (s) = 2( 2)12 +

  • For finding Wr,f we will use the values of the first system by the matlab commands bellow:

  • And for finding Wl, we use the values of the second system with matlab

    commands as bellow:

    For finding eigen values we can use the matlab command eig(A1)and eig(A2)

    and we will get:

  • 2. Design a state-space controller in continuous time which includes a state feedback, a

    state observer and gains to take into consideration the reference signals. Use the

    following specification for the design:

    First of all with substituting the values in the given equations we get the following results:

    a=(2+0.9)9.81

    20.7 = 4.5 w0=a/2=2.25 xi=0.7 sc= -4.5 so= -9

    Using this formula we will find the values of S1 and S2 (poles)using matlab as bellow:

  • State feedback design:

    In the case of state feedback the control architecture is:

    Where u= -Kx As we separated two systems we will have two different K values (K1,K2) that are for

    system1 and system2 and we can compute their values by matlab but first regarding to the

    formula we will need to find () for both systems: To do so we need to know the dimension of A1 and A2 which are:

    Dim(A1)=4, Dim(A2)=2 so,

    (1)= (s1,s2, sc, sc) we called this in matlab as phic1 (2)= (s1,s2) we called this in matlab as phic2

  • And now we can find the values of K1 and K2 from the ackers formula using matlab

    command as bellow:

    Using Simulink command in matlab we are able to construct the diagram which I have

    done in the following way separately for each of systems:

    sysRFss:

    sysLTss:

  • State observer design:

    The observer pole : so= -9

  • Then For sysRFss we have the following diagram:

  • And For sysLTss:

    State Feedback with using Tracking Reference Signal:

  • We should set the values independently as we have 2 separated systems:

    sysRFss:

  • sysLTss:

  • Y0= 0.5 L0= 0.7 T=1 are given.

    As we have 2 separated systems we can define the values (graphs) of

    From our first system by the reference signal:

    = 0.1*0.5*(1-e-t/1

    )= 0.05(1-e-t)

    And the initial value is only one: x(0)=(0,0,0,0)T

    Where the block diagram of the first system with reference signal is as bellow:

    This diagram has been saved as :sys1eqninput

    After running this diagram we are able to see the values of Y,F,r and r hat,theta and theta hat.

  • Here are they:

    Y(t):

    r and r hat:

    We see that they are the same!

  • F:

    Theta and theta hat:

  • Now the values of

    Can be find from the second system where the reference is

    But we have 2 different initial values:

    XLT1=(0,0)T

    and XLT2(0)=(0.35,0)T

    For LT1 we have the following diagram:

    As the initial value is zero we can see that we get the same graph for Y and I and I hat and

    Tau as bellow:

  • For LT2 we have the following diagram:

    Now we can measure the values of the Y, Tau, l and l hat.

    Y:

  • Tau:

    L and l hat:

    The End.