Apunte Advanced Control

  • Upload
    willys8

  • View
    214

  • Download
    0

Embed Size (px)

Citation preview

  • 8/22/2019 Apunte Advanced Control

    1/29

    Advanced ControlModeling Problem by Using MATLAB

    Solved By

    Abdulrahman Yossri Mahmoud

    Presented To

    Ass. Prof. Dr. Saber M Abdrabbo

    Benha University

    Faculty of Engineering Shoubra

    Mechanical Design & Production

    Department

  • 8/22/2019 Apunte Advanced Control

    2/29

    2

    Assignment #1Modeling Problem by Using Laplace Transforms

    Plotting Graph bet. Displacement & Time

  • 8/22/2019 Apunte Advanced Control

    3/29

    3

    Case1:

    Due to F.B.D

    =

    = + +

    By using Laplace transform

    ( ) = [ + + ] ( )

    Assume that;

    M = 1 C = 2 K = 1 F = 1

    = [ + 2 + 1] ( )

    ( ) = 1[ + 2 + 1]

    = 1( + 1)

    By using partial fraction

    ( ) = ++ 1

    +( + 1)

    1

    ( + 1) =

    ( + 1) + ( + 1) +

    ( + 1)

    Sub S = 0 A = 1

    Sub S = -1 C = -1

    Sub S = 1 B = -1

    ( ) =1

    1

    + 1

    1

    ( + 1)

    By using Inverse Laplace

    ( ) = 1

    Solving Using MATLAB

  • 8/22/2019 Apunte Advanced Control

    4/29

    4

    >> syms x s

    >> x = 1/(s*((s^2)+ (2*s)+1));

    >> ilaplace (x)

    ans =

    1+(-1-t)*exp(-t)

    Then plot a graph between X and t Using MATLAB

    >> t = 0:0.1:exp(2);

    >> x = 1+(-1-t).*exp(-t);

    >> Plot (t,x)

  • 8/22/2019 Apunte Advanced Control

    5/29

    5

    Case2:

    Due to F.B.D

    =

    = + +

    By using Laplace transform

    ( ) = [ + + ] ( )

    Assume that;

    M = 1 C = 7 K = 12 F = 1

    = [S + 7S+ 12] X(s)

    X(s) = 1S[S + 7S+ 12]

    =1

    S( S+ 3)( S+ 4)

    By using partial fraction

    X(s) =A

    S+

    B

    ( S+ 3)+

    C

    ( S+ 4)

    1S( S+ 3)( S+ 4)

    =A( S+ 3)( S+ 4) + BS( S+ 4) + CS( S+ 3)

    S( S+ 3)( S+ 4)

    Sub S = 0 A =

    Sub S = -3 B =

    Sub S = -4 C =

    X(s) = 112

    1S

    13

    1S+ 3

    + 14

    1S+ 4

    By using Inverse Laplace

    X(t) =1

    12

    1

    3e +

    1

    4e

  • 8/22/2019 Apunte Advanced Control

    6/29

    6

    Solving Using MATLAB

    >> syms x s

    >> x = 1/(s*((s^2)+ (7*s)+12);

    >> ilaplace (x)

    ans =

    1/4*exp(-4*t)+1/12-1/3*exp(-3*t)

    Then plot a graph between X and t Using MATLAB

    >> t = 0:0.1:exp(2_;

    >> x = 1/4*exp(-4*t)+1/12-1/3*exp(-3*t));

    >> Plot (t,x)

  • 8/22/2019 Apunte Advanced Control

    7/29

    7

    Case3:

    Due to F.B.D

    = + +

    By using Laplace transform

    ( ) = [ + + ] ( )

    Assume that;

    M = 1 C = 1 K = 2 F = 1

    = [S + S + 2] X(s) X(s) =[ ]

    Solving Using MATLAB

    >> syms x s

    >> x = 1/(s*((s^2)+ (s)+2));

    >> ilaplace (x)

    ans =

    -1/2*exp(-1/2*t)*cos(1/2*7^(1/2)*t)-

    1/14*7^(1/2)*exp(-1/2*t)*sin(1/2*7^(1/2)*t)+1/2

    Then plot a graph between X and t Using MATLAB

    >> t = 0:0.1:exp(3);

    >> x = -1/2.*exp(-1/2.*t).*cos(1/2*7^(1/2).*t)-

    1/14*7^(1/2).*exp(-1/2.*t).*sin(1/2*7^(1/2).*t)+1/2;

    >> Plot (t,x)

  • 8/22/2019 Apunte Advanced Control

    8/29

    8

    Assignment #2Modeling Problem by Using SIMULINK

    Plotting Graph bet. Displacement & Time

  • 8/22/2019 Apunte Advanced Control

    9/29

    9

    Case1:

    Assuming:

    R=1 L=1 J=2 C=7 Km=1.5 Ka=1.5

    The block diagram given by:

    The simulation will be:

  • 8/22/2019 Apunte Advanced Control

    10/29

    10

    Case2 (using T.F):

    Assuming:

    R=1 L=2 J=2 C=7 Km=1.5 Ka=1.5

    The block diagram given by:

    The simulation will be:

  • 8/22/2019 Apunte Advanced Control

    11/29

    11

    Case3:

    Assuming:

    R=2 L=1 J=2 C=5 Km=0.5 Ka=3

    The block diagram given by:

    The simulation will be:

  • 8/22/2019 Apunte Advanced Control

    12/29

    12

    Assignment #3Modeling Problem of a Pneumatic System

    Getting Response by Using SIMULINK

  • 8/22/2019 Apunte Advanced Control

    13/29

    13

    Pneumatic Modeling Problem

    System Analysis

    System Equations Laplace Transform

    =+

    ( ) =+

    ( )

    =+

    ( ) =+

    ( )

    = ( ) = ( ) ( )

    = ( ) = ( )

    = ( ) = ( + 1) ( )

    = ( ) = ( + 1) ( )

    = ( ) ( ) = ( ( ) ( ))

    = ( ) =( )

  • 8/22/2019 Apunte Advanced Control

    14/29

    14

    The Block Diagram Given By

    Assuming That

    a = 2 b = 5 k =3 A = 6 C = 4 R1=R2=9

    By Using SIMULINLK, The Block Diagram Given By

    The Time response of The System

  • 8/22/2019 Apunte Advanced Control

    15/29

    15

    Assignment #4Derivative of LOGARITHMIC DECREMENT

  • 8/22/2019 Apunte Advanced Control

    16/29

    16

    From the general equaon of 2nd

    order system

    ( )

    ( )=

    + 2 +

    Assume Impulse Input

    ( ) = ( )

    ( ) = 1

    So,

    ( ) =+ 2 +

    ( ) =+ + 1 + 1

    By using partial fraction

    ( ) =

    + + 1

    +

    + 1

    = = 2 1

    Inverse Laplace

    ( ) =

    =

    But,

    = 1

    ( ) =

  • 8/22/2019 Apunte Advanced Control

    17/29

    17

    From trigonometric

    sin =

    2

    So,

    ( ) = sin( )

    Where

    =

    1

    = 1

    To get the LOGARITHMIC DECREMENT()

    Let the response equation be

    = sin( )

    =sin( )

    ( )sin( ( + ))

    Since the sin may be equal for tiny increase (d) so,

    sin( ( + )) sin( )

  • 8/22/2019 Apunte Advanced Control

    18/29

    18

    =( )

    ln = ln ( )

    ln = ln

    ln = ln =

    But, from the graph of response

    = 2 = 2

    1

    ln =2

    1

    = ln =2

    1

    The relation between the logarithmic decrement and damping factor is

    given by:

    =4 +

  • 8/22/2019 Apunte Advanced Control

    19/29

    19

    Assignment #5Solving a STEADY STATE ERROR problem

  • 8/22/2019 Apunte Advanced Control

    20/29

    20

    Problem

    For the shown system and corresponding response graph find: M, C

    and K

    Given

    Mp = 0.095 Tp = 5 sec F = 2N

    Solution

    From the given data, the maximum peak = 0.095

    = 0.095 =

    ln0.095 =

    1

    ln 0.095=

    1 = 1.33

    1 = 1.33

    1 = 2.78

  • 8/22/2019 Apunte Advanced Control

    21/29

    21

    So, the damping factor is

    = 0.599

    By substituting at the peak time

    = 5 = =1

    5 =1 0.599

    =51 0.599

    = 0.784

    So, the natural frequency is

    = 0.784

    From the mechanical motion of the system

    Due to F.B.D

    =

    = + +

    By using Laplace transform

    ( ) = [ + + ] ( )

    ( )

    ( )=

    1

    [ + + ]

    But

    ( ) = 2

    ( ) =2

    So, the transfer function given by

    ( ) =2

    [ + + ]

  • 8/22/2019 Apunte Advanced Control

    22/29

    22

    From the final value theorem

    () = lim

    ( ) = lim

    ( )

    So,

    lim

    ( ) =2

    [ + + ]=

    2

    But

    () = 0.1

    0.1 =2

    = 20

    From The general Formula of 2nd

    order response equation

    + 2 +

    2 =

    =

    So,

    = =20

    0.784= 32.5

    And

    = 2 = 2 32.5 0.599 0.784 = 30.56

  • 8/22/2019 Apunte Advanced Control

    23/29

    23

    Assignment #6Solving a NYQUIST PLOTTING problem

  • 8/22/2019 Apunte Advanced Control

    24/29

    24

    Problem:

    =( + )( + )

    Draw the Nyquist diagram, then:1) Find value of K for stability.

    2) For K = 4 the phase margin and gain margin.

    3) Find K at phase margin = 30.

    4) Find K at gain margin =10 dB.

    Solution:

    Assume K = 1, So

    ( ) ( ) =

    1

    ( + 1)( + 2)Along C1, convert from S-domain to frequency

    domain substitute with S j

    ( ) ( ) =1

    ( + 1)( + 2)

    The amplitude M is given by:

    =1

    ( + 1)( + 4)

    The angle is given by:

    = 0 90 tan1

    tan2

    For any assumed get and M

    M

    0 -90

    0.1 4.966 -98.57

    0.25 1.924 -111.1

    0.5 0.867 -130.6

    1 0.316 -161.5

    2 0.079 -198.4

    5 0.007 -236.8

    10 0.001 -252.9

    0 -270

  • 8/22/2019 Apunte Advanced Control

    25/29

    25

    Along C2 is the mirror of C1 around X-axis

    Along C3 tends to be zero

    = lim

    = 0

    Along C4 is given by:

    = lim

    So,

    =1

    2lim

    lim

    + 112 lim

    + 1

    But

    lim

    + 1 =12

    lim

    + 1 = 1

    =1

    2lim

    =

    So, it is an arc of radius and ploe d from 90 -90. Then draw a

    polar plot of Nyquist criterion.

  • 8/22/2019 Apunte Advanced Control

    26/29

    26

    The problem may plotted by using MATLAB as following

    >> Num = [1];

    >> Dum = [1 3 2 0];

    >> T = tf(Num,Dum);

    >> Nyquist(T)

    1) To get the value of K for stability, find the intersection at = -180

    = 0 90 tan1

    tan2

    = 180

    By using trail and error method, we get

    = 1.415

    The stability occurred at M = 1. So,

    =( + 1)( + 4)

    = ( + 1)( + 4)

    = 1 1.415 (1.415 + 1)(1.415 + 4)

    = 6

  • 8/22/2019 Apunte Advanced Control

    27/29

    27

    2) The gain margin at K = 4, subst ut e in the equaon of phas e angl e at

    condition of = -180

    = 0 90 tan1

    tan2

    = 180

    So, as result before using trail and error method

    = 1.415

    Subst ut e at K = 4 to get the amp l itude of the gai n ma r gi n

    =4

    1.415 (1.415 + 1)(1.415 + 4)= 0.67

    The gain margin is given by

    . = 20 log 1

    . = 20 log1

    0.67= 3.48

    The phase margin at K = 4, subst ut e in the equaon of ampl i tude at

    condition of M = 1

    =4

    ( + 1)( + 4)= 1

    So,

    ( + 1)( + 4) = 4

    ( + 1)( + 4) = 16

    Using trail and error method

    = 1.145

    Subst ut e at K = 4 to get the angl e of the phas e ma r gi n

    = 0 90 tan1.145

    1 tan

    1.145

    2= 168.65

    The phase margin is given by

    . = 180

    . = 168.65 180 = 348.65

    . = 11.35

  • 8/22/2019 Apunte Advanced Control

    28/29

    28

    3) To get K at phase margin = 30= -330

    . = 180

    330 = 180

    = 150

    The corresponding frequency is given by

    = 150 = 0 90 tan1

    tan2

    Using trail and error method

    = 0.79

    Substitute in the equation of amplitude at condition of M = 1

    =( + 1)( + 4)

    = 1

    = 1 0.79 (.079 + 1)(0.79 + 4)

    = 2.16

    4) To get K at gain margin = 10 dB

    . = 20 log 1

    10

    20= log

    1

    1= 3.18

    So,

    0.314

    The corresponding frequency is given by

    = 180 = 0 90 tan1

    tan2

    Using trail and error method

    = 1.415

  • 8/22/2019 Apunte Advanced Control

    29/29

    Substitute in the equation of amplitude at condition of = -180

    =( + 1)( + 4)

    So,

    0.314 =1.415 (1.415 + 1)(1.415 + 4)

    = 0.314 1.415 (1.415 + 1)(1.415 + 4)

    = 1.88