Control Home Work-1

download Control Home Work-1

of 15

Transcript of Control Home Work-1

  • 7/29/2019 Control Home Work-1

    1/15

    1

    0 1 2 3 4 5 6 7 8 9

    0

    0.2

    0.4

    0.6

    0.8

    1

    1.2

    1.4

    1.6(step response)

    t (seconds)

    y(t)

    Step response of second order systems

    clc

    clear

    clf

    numa = 9;

    dena = [1 1.2 9];

    Ta = tf(numa, dena);

    %percenta = exp(-zetaa*pi/ sqrt(1-zetaa^2))*100

    step(Ta)

    title('(step response)')xlabel(' t')

    ylabel('y(t)')

    sys = tf([9],[1 1.2 9]);

    S = stepinfo(sys,'RiseTimeLimits',[0.01,1])

    RiseTime : 0.5768 SettlingTime : 6.5273

    Overshoot : 52.5701 SettlingMax : 1.5257

    Undershoot : 0 SettlingMin : 0.7246Peak : 1.5257 PeakTime : 1.0492

  • 7/29/2019 Control Home Work-1

    2/15

    2

    0 2 4 6 8 10 12-1.5

    -1

    -0.5

    0

    0.5

    1

    1.5

    2

    2.5

    impulse response

    Time (seconds)

    Amplitude

    Impulse response of second order systems

    clf

    clc

    clear

    numa = 9;

    dena = [1 1.2 9];

    Ta = tf(numa, dena);

    %percenta = exp(-zetaa*pi/ sqrt(1-zetaa^2))*100

    impulse(Ta)

    title('impulse response')

    sys = tf([9],[1 1.2 9]);

  • 7/29/2019 Control Home Work-1

    3/15

    3

    0 2 4 6 8 10 120

    0.2

    0.4

    0.6

    0.8

    1

    1.2

    1.4

    1.6

    1.8

    2

    Second Order Step Response

    Normalized Time n

    t

    y(t)

    = 0

    = 0.1

    = 0.2

    = 0.4

    = 0.5

    = 0.6

    = 0.8

    = 1

    Step Response of Second-Order Systems Versus clf

    clc

    cleart = [0:.01:12];

    y = zeros(max(size(t)),8);

    zetas = [0,0.1,0.2,0.4,0.5,0.6,0.8,1]

    for index = 1:8

    y(:,index) = step(tf([1],[1 2*zetas(index) 1]),t);

    end;

    plot(t,y(:,1),t,y(:,2),t,y(:,3),t,y(:,4),t,y(:,5),t,y(:,6),t,y(:,7),t,y(:,8))

    title('Second Order Step Response')xlabel('Normalized Time \omega_n t')

    ylabel('y(t)')

    legend('\zeta = 0 ','\zeta = 0.1','\zeta = 0.2','\zeta = 0.4','\zeta = 0.5',...

    '\zeta = 0.6 ','\zeta = 0.8 ','\zeta = 1 ')

    grid

  • 7/29/2019 Control Home Work-1

    4/15

    4

    Discussion step response of the second order system:

    1. The damping frequency (actual frequency) inverse proportional to the

    damping ratio where damping frequency decreases slightly as the damping

    ratio increases.

    2. The response oscillate for very low damping while for large damping

    shows no oscillation

    3. The system becomes more stable with increasing of damping ratio, and vice

    versa.

    4.

  • 7/29/2019 Control Home Work-1

    5/15

    5

    Plot of the peak overshoot Mp versus the damping ratio

    for the second order system

    Matlab command

    clf

    clc

    clear

    >> fplot('100*exp(-pi*h/sqrt(1-h^2))', [0, 1])

  • 7/29/2019 Control Home Work-1

    6/15

    6

    -7 -6 -5 -4 -3 -2 -1 0 1 2-5

    -4

    -3

    -2

    -1

    0

    1

    2

    3

    4

    50.160.30.460.60.72

    0.84

    0.92

    0.98

    0.160.30.460.60.720.84

    0.92

    0.98

    123456

    System: sy s

    Gain: 1.43

    Pole: -0.29 + 0.711i

    Damping: 0.378Overshoot (%): 27.8

    Frequency (rad/s): 0.767

    Root Locus

    Real Axis (seconds-1

    )

    ImaginaryAxis(seconds

    -1)

    ROOT LOCUS PLOT

    >> %MATLAB Program

    >> clf

    >> clc>> clear

    >> num = [01 ];>> den = [1 3 2 0];

    >> rlocus(num, den);

  • 7/29/2019 Control Home Work-1

    7/15

    7

    -1.8 -1.6 -1.4 -1.2 -1 -0.8 -0.6 -0.4 -0.2 0 0.2-1.5

    -1

    -0.5

    0

    0.5

    1

    1.5

    0.97

    0.120.240.360.480.620.76

    0.88

    0.97

    0.20.40.60.811.21.41.6

    0.120.240.360.480.620.76

    0.88

    Root Locus

    Real Axis (seconds-1

    )

    ImaginaryAxis

    (seconds-1)

    >> %MATLAB Program

    clf;

    num = [1 0 ];

    den = [1 0 1 ];

    rlocus(num, den);

  • 7/29/2019 Control Home Work-1

    8/15

    8

    -80

    -60

    -40

    -20

    0

    20

    40

    Magnitude(dB)

    10-1 100 101 102

    -180

    -135

    -90

    -45

    0

    Phase(deg)

    Bode Diagram

    Frequency (rad/s)

    Magnitude and phase of a second-order system

    clf

    clcclear

    H1=tf([0 9],[1 0.3 9])

    H2=tf([0 9],[1 0.6 9])

    H3=tf([0 9],[1 1.2 9])

    H4=tf([0 9],[1 1.8 9])

    H5=tf([0 9],[1 3 9])

    H6=tf([0 9],[1 4.2 9])

    H7=tf([0 9],[1 5.4 9])

    bode(H1,H2,H3,H4,H5,H6,H7)

  • 7/29/2019 Control Home Work-1

    9/15

    9

    -150

    -100

    -50

    0

    50

    Magnitude(dB)

    10-2

    10-1

    100

    101

    102

    -270

    -225

    -180

    -135

    -90

    Phase(deg)

    Bode DiagramGm = 6.02 dB (at 1 rad/s) , Pm = 21.4 deg (at 0.682 rad/s)

    Frequency (rad/s)

    -100

    -50

    0

    50

    100

    Magnitude(dB)

    10-2

    10-1

    100

    101

    102

    -270

    -225

    -180

    -135

    -90

    Phase(deg)

    Bode Diagram

    Gm = -7.96 dB (at 1 rad/s) , Pm = -23.2 deg (at 1.52 rad/s)

    Frequency (rad/s)

    GM and PM for the following transfer function for (K=1 ,K=5)

    ()

    ()

  • 7/29/2019 Control Home Work-1

    10/15

    10

    Calculate gain constant (K) for the following transfer function

    ()

    (), when a PM of (i) 45

    o, and (ii) 70

    o

    Solution steps:

    1- Draw the magnitude and phase margin for (k=1) by MATLAB program as

    follows

    >>hd = tf([0 1],[1 2 1 0])

    >> [Gm,Pm,Wg,Wp] = margin(hd);

    >>margin(hd)

    2- By click on the curve of PM and adjust the angle to (-110, -135) we can

    find the conjugate frequency.

    3- By click on the curve of GM and adjust the frequency which appears on

    the curve to the same value that we find in the second step.

    4- Read the value of GM appears on the curve after adjust the frequency as

    mentioned in previous step and apply the following equation to calculate

    gain constant

    GM dB=20 log10 GM

    K= 1/GM

  • 7/29/2019 Control Home Work-1

    11/15

    11

    Bode Diagram

    Gm = 6.02 dB (at 1 rad/s) , Pm = 21.4 deg (at 0.682 rad/s)

    Frequency (rad/s)

    10-2

    10-1

    100

    101

    102

    -270

    -225

    -180

    -135

    -90

    System: hd

    Frequency (rad/s): 0.179

    Phase (deg): -110

    Phase(deg)

    -150

    -100

    -50

    0

    50

    System: hd

    Frequency (rad/s): 0.179

    Magnitude (dB): 14.7

    Magnitude(dB)

    Bode Diagram

    Gm = 6.02 dB (at 1 rad/s) , Pm = 21.4 deg (at 0.682 rad/s)

    Fre uenc rad/s

    -150

    -100

    -50

    0

    50System: hd

    Frequency (rad/s): 0.417

    Magnitude (dB): 6.17

    Magn

    itude(dB)

    10-2

    10-1

    100

    101

    102

    -270

    -225

    -180

    -135

    -90

    System: hd

    Frequency (rad/s): 0.417

    Phase (deg): -135

    P

    hase(deg)

  • 7/29/2019 Control Home Work-1

    12/15

    12

    Effect of closed-loop pole position in the S-plane on system transient

    response

    The systems response to any input will also include these features.

    The following figures show a selection of pole locations, with their corresponding

    contribution to the total response.

    Note:

    1- The real part of the pole, determines both stability and the time

    constant, .

    2- The imaginary part of the pole, !, determines the damped natural

    frequency (actual frequency of oscillation) in rad/sec.

    3- The magnitude of the pole determines the natural frequency.

    4- The argument of the pole determines the damping ratio

    1- Zeta (1)2- System is stable3- Root is complex conjugate

    1- Zeta ( =1)2- System is stable3- Root is real

  • 7/29/2019 Control Home Work-1

    13/15

    13

    1- Zeta ( = 0)2- System is stable3- Root is imaginary

    1- Zeta ( =1)2- System is stable3-

    Root is real

    1- Zeta (1)2- System is unstable3- Root is complex conjugate

    1- Zeta (1)2- System is unstable3- Root is complex conjugate

    1- Zeta (1)2- System is unstable3- Root is real

  • 7/29/2019 Control Home Work-1

    14/15

    14

    1- Zeta ( =0)2- System is stable3- Root is real

    1- Zeta (1)2-

    System is unstable3- Root is real

  • 7/29/2019 Control Home Work-1

    15/15

    15

    Stability Theorem

    It should be clear from these examples that if any of the poles of G(s) have a

    positive real part then the impulse response will have a term that blows up

    exponentially (consider the partial fraction expansion of G(s)). Also, if G(s) has a

    repeated imaginary axis pole then the impulse response will have a term that still

    blows up, although more slowly. In either of these cases, the system is unstable.

    Isolated poles on the imaginary axis, on the other hand, give rise

    to terms in the impulse response which remain bounded (e.g. steps or sinusoids).

    In this case the system is not asymptotically stable but is nevertheless marginallystable (provided it has no RHP or repeated imaginary axis poles). In fact, (for

    systems with proper rational transfer functions) it can

    be shown that Stability Theorem:

    1- A system is asymptotically stable if all its poles have negative real parts.

    2- A system is unstable if any pole has a positive real part, or if there are any

    repeated poles on the imaginary axis.

    3- A system is marginally stable if it has one or more distinct poles

    on the imaginary axis, and any remaining poles have negative real

    parts. Repeated poles on the imaginary axis.