Top Banner

of 21

Project 3 Final Report (2)

Apr 09, 2018

Download

Documents

jttatsumi
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 8/8/2019 Project 3 Final Report (2)

    1/21

    Modelling, Feedback Control Design and Simulation

    of an Industrial ApplicationDean P. Stavrou#1

    #Electrical Engineering Dept., Cleveland State University

    2121 Euclid Ave, Cleveland Ohio 44115-2214, USA

    [email protected]

    Abstract These instructions outline the process and reasoningused to design and model a feedback control system to a

    positioning control system for an industrial motion application.The system must be designed so that a load can be moved 12inches in 0.3 seconds with an accuracy of 1% or better. To meet

    the design requirements a negative feedback control system anda PID controller will be utilized.

    I. INTRODUCTION

    Modern control theory is based on the same principles from

    the late 1700s. James Watt invented his centrifugal governor

    in 1788. This device utilized feedback control to regulate the

    amount of fuel given to an engine to maintain a constant speed.This device paved the way for the internal combustion engine

    and modern control theory.

    Negative feedback control is used to establish equilibrium

    in a system by feeding back the systems output to the input.

    This feedback is measured to the reference of the system andwill produce an error which is then adjusted by a controller.

    This error is continuously adjusted to try to reduce it to its

    minimum, while also keeping the system stable. Negative

    feedback control will be used for the positioning control

    system for an industrial motion application.

    A Proportional-Integral-Derivative or PID controller is a

    mechanism used for feedback control. A PID controller

    corrects the error between a measured process variable and a

    desired setpoint by calculating then outputting a correctiveaction that can adjust the process accordingly.

    The PID controllers algorithm consists of three parameters,

    the Proportional, Integral and Derivative gains. TheProportional gain determines the reaction to the current error,

    the Integral gain determines the reaction based on the sum of

    recent errors, and the Derivative gain determines the reaction

    to the rate at which the error has been changing. The weighted

    sum of these three parameters is used to adjust the process via

    a control element, which in this case would be load position.

    When calculating transfer functions for control systems

    including a PID controller, the controller can be represented

    mathematically by the equation

    This can be simplified by taking the Laplace Transform

    yielding

    The positioning control system consists of a digitalcontroller, a DC motor drive and a load of 235 lbs which is to

    be moved linearly by 12 inches in 0.3 seconds with an

    accuracy of 1% or better.

    II. SYSTEM PARAMETERS

    The part selection, system parameters and plant model for

    the positioning control system has already been completed by

    Professors Donald Zeller and Jack Zeller. Their results can be

    found below

    A.Electrical ParametersWinding resistance and inductance: Ra = 0.4 La = 8 mH

    (The transfer function of the armature voltage to the current is

    Back EMF constant: Power Amplifier Gain: Current Feedback Gain:

    B.Mechanical ParametersTorque Constant:

    Motor Inertia: Pulley Radius: Load Weight: Total Inertia:

  • 8/8/2019 Project 3 Final Report (2)

    2/21

  • 8/8/2019 Project 3 Final Report (2)

    3/21

    There are no zeros forthis transfer function.

    VII. TIME CONSTANT, SETTLING TIME & OVERSHOOT FOR

    For since , is much larger

    than , P1is the dominant pole which meansthat P2 can be disregarded.

    Therefore

    Since transfer function is a second order, overdampedsystem, which means there are two real poles, there is no

    overshoot.

    VIII. VERIFICATION

    The transfer functions for and

    can be verified by

    using Matlabs Simulinktool. This can be done by setting up a

    simulation of the derived transfer function along with the

    block diagram model ofthe actual system. Then a mux block

    can be used to impose the two outputs on top of each other.

    This is will show if the transfer function is a correct

    approximation to the actual system.

    Figure 6:Block diagram ofthe system coupled with the

    derived transfer functions for and

    .

    A step function was used as the reference with the step time

    setto 1, and the step size setto 10. By observing the graphs of

    the outputs it can be seen thatthe transfer functions are indeed

    an accurate model ofthe system.

    Figure 7: Graph ofthe Transfer Function & Block

    Diagram

    Figure 8:

    Graph ofthe Transfer Function & Block

    Diagram

    IX.CLOSING THE LOOP WITH A PID CONTROLLER

    Now that the system operation has been verified, the loop

    can be closed and control can begin. To simulate the

    implementation of a PID controller with this system is an easy

    task. Again Matlabs Simulink software will be used. The

    following block diagram can be set up in Simulink and used to

    simulate actual operation.

    Figure 9: PID Implementation ofthe Position Control System

    The design requirement forthis system is to move the load

    10 inches in 0.3 seconds.

    0 500 1000 1500 2000 25000

    100

    200

    300

    400

    500

    600

    700

    Position(in)

    Time (ms)

    Vout/Vc Output

    Block Diagram

    Transfer Function

    0 500 1000 1500 2000 25000

    1000

    2000

    3000

    4000

    5000

    6000

    Time (ms)

    Position(in)

    Xout/Vc

    Block Diagram

    Transfer Function

    Reference

    la

    Xout

    Vout

    Step

    Vc

    Torque Di

    turbance

    Xout

    Vout

    la

    Plant

    PID

    PID Controller

    0

    Constant

    s + 800s + 2458.5s3 2132000

    To X

    ut Tran

    erFun

    ti

    n

    +800

    +2458.52 132000

    To V

    ut Tran

    erFun

    ti

    n

    1.25

    Tran

    erF n51

    Tran

    erF n4

    1

    Tran

    erF n3

    2.5.02

    +1Tran

    erF n2

    2.5.02 +1

    Tran

    erF n1

    Step

    S

    pe5

    S

    pe2

    1Gain8

    13.2Gain7

    80Gai n6

    .075Gain5

    1.49Gain4

    1.25Gai n31Gain2

    .075Gai n11

    1.49Gain10

    13.2Gain180Gain

  • 8/8/2019 Project 3 Final Report (2)

    4/21

    The first step is to observe the response of the system with

    no error correction. This means with the P set to 1, I and D set

    to 0. Doing this will yield the following result.

    Figure 10: Kp set to 1, Effectively No PID Control

    It can be seen from the graph that the system response is

    severely overdamped, but does achieve stability after

    approximately 1 second. To correct this and meet the design

    requirements the PID controllers parameters must be tuned to

    the proper values.

    X. MANUAL TUNING OF A PID CONTROLLER

    Selection of the proper PID values can be done in two ways.

    The first way is to do it mathematically. This can be done by

    calculating the closed loop transfer function for the system

    including the PID controller. Since the transfer function of the

    system

    , has already been calculated, it can be used inconjunction with the algorithm for the PID controller to attain

    the transfer function.

    This simplifies to,

    This equation can then be further simplified by eliminating the

    ki term which means setting the I parameter of the PID to zero.

    Doing this yields,

    This simplifies to,

    There are now only two parameters that must be tuned, P and

    D; this is a PD controller instead of a PID. It is very common

    to not use all three parameters of the PID controller.

    To further simplify this equation the D parameter can be set

    to 1. Leaving only the P parameter to be calculated, this can

    be done using many different mathematical methods.

    The second way to select PID parameters is to tune the

    parameters manually, this is the method selected for this

    control system.

    Initially the I parameter was set to 0; the P and D

    parameters were set to 1. Simulating this, the following

    response was attained.

    Figure 11: PD Controller Response; KP & KD = 1

    This is a much better response than the previous output

    with no PID control, but this still does not meet the design

    requirements of 12 inches in 0.3 seconds. To meet this

    requirement the P parameter was increased by 1 until the

    requirement was met. When the P parameter was set to 25, the

    design requirement was met.

    Figure 12: PD Controller Response, KP = 25 & KD = 1

    0 500 1000 1500 2000 25000

    2

    4

    6

    8

    10

    12

    14

    16

    18

    P

    s

    t

    !

    (

    !

    )

    "#

    $

    e ($

    s)

    Ne%

    at#

    ve&

    eedback C' (

    t) '

    0

    W#

    th' 1

    t PI2

    C' (

    t) '

    0 0

    e)

    L'

    a d V e0

    '

    c#

    ty

    0 500 1000 1500 2000 2500 30000

    1

    2

    3

    4

    5

    6

    7

    8

    9

    10

    11

    P

    s

    t

    !

    (

    !

    )

    "#

    $

    e ($

    s)

    &

    eedback C' (

    t) '

    0

    W#

    th P2

    C' (

    t) '

    0 0

    e)

    L'

    a d V e0

    '

    c#

    ty

    0 500 1000 1500 2000 2500 30000

    2

    4

    6

    8

    10

    12

    " #

    $

    e ($

    s)

    P

    st

    !

    (

    !

    )

    &

    eedback C' (

    t) '

    0

    W#

    th P2

    C' (

    t) '

    0 0

    e)

    L'

    a d V e0

    '

    c#

    ty

  • 8/8/2019 Project 3 Final Report (2)

    5/21

  • 8/8/2019 Project 3 Final Report (2)

    6/21

    seen visually by using a tool built into Matlab called

    SISOTOOL.

    The SISO Design Tool is a graphical user interface (GUI)

    that allows you to analyse and tune SISO feedback control

    systems. Using the SISO Design Tool, you can graphically

    tune the gains and dynamics of the compensator (C) and

    prefilter (F) using a mix of root locus and loop shaping

    techniques.

    The first step in using this tool is to set-up the transfer

    function in Matlab. This can be done in various ways. Themethod used here is to define s as a transfer function andthen define H(s). Then the function can be passed into

    SISOTOOL using a simple command. The coding for this

    operation is very simple and, is as follows.

    s = tf(s);

    H = (207.05/(s*(s+3.09)))

    sisotool(H)

    After inputting these commands SISOTOOL loads and

    displays the Root-Locus plot of the transfer function as well as

    the open-loop Bode plots for gain and phase. Also using the

    SISO Design Tool, design constraints can be added to provide

    visual representation of where poles or zeros can be placed to

    achieve the desired outcomes. Setting the constraints of

    settling time (TS) less than 0.3 seconds and overshoot of lessthan 2%, the Root-Locus plot will display right and wrong

    locations for pole/zero placement (Figure 17).

    Figure 17: Root-Locus and Bode Plots from SISOTOOL

    From Figure 15 it can been observed that a pole/zero

    placement anywhere before -13 on the real axis will yield

    undesired results, as well as any damping coefficient () less

    than 0.78. These two values will aid in the tuning of the PID

    controller to meet the design requirements.

    C.PID Parameter SelectionThe PID can now be properly tuned by using the

    information obtained from the SISO Design Tool. First thoughthe PID parameters must be incorporated into the plants

    transfer function. Doing this will yield the closed loop transfer

    function of ,

    Since it has already been established that an integral gain does

    not apply in this situation the transfer function simplifies to,

    Now the Kd parameter can be set equal to 1 and the Kp

    parameter can be set to 13. This will place a zero at -13 whichis what the Root-Locus plot from the SISO Design Tooldisplayed.

    This simplifies to,

    Effectively changing the poles locations to

    Therefore the new transfer function is

    Since the pole at -161.27 is ten times further away from the

    pole at -13.9 it can be discarded as a non-dominant pole. This

    will simplify the transfer function even further.

    Now it is time to set the PID parameters in Matlab and

    evaluate the systems response (Figure 18). Plugging in Kp =

    13 and Kd = 1 into the simulation for the positioning controlsystem yields the output seen in Figure 19.

    Figure 18: Matlab Block Diagram

    la

    Xout

    ou t

    simout

    To

    ors

    ace

    Vc

    Tor

    ue

    istur

    ance

    Xout

    Vout

    la

    Subs

    stem

    Step

    PID

    PIDon troller

    onstan t

  • 8/8/2019 Project 3 Final Report (2)

    7/21

    Figure 19: PD Controller Response, KP = 13 & KD = 1

    Zooming into the plot the, it can be seen that the load does

    move 12 in 0.3 seconds (Figure 20).

    Figure 20: Zoomed In Plot of the System Response

    Our design requirement has been met the load is moved 12

    inches in 0.3 seconds with no overshoot.

    XII. TRAPEZOIDAL PROFILE

    In industry a basic step function is never used as a reference.

    Instead a Trapezoidal Profile is used to simulate systems. The

    Trapezoidal Profile can be set up in Matlab by using a 1-D

    lookup table and setting up the input vector as [0 .1 .2 .3 .4]and the output vector as [0 1.5 1.5 0 0].

    Figure 21: Block Diagram of the Trapezoidal Profile

    Figure 22: 1D-Lookup Table Settings for TrapezoidalProfile

    Figure 23: Plot of the Trapezoidal Profile

    0 500 1000 1500 2000 2500-2

    0

    2

    4

    6

    8

    10

    12

    14

    Pos

    ition(in)

    Time (ms)

    Fe e

    ack

    ontrol

    it

    PD

    ontroller

    oa

    Position

    50 100 150 200 250 300 350 400 450 500 550-2

    0

    2

    4

    6

    8

    10

    12

    Position(in)

    Time (ms)

    Fe e

    ack

    ontrol

    it

    PD

    ontroller

    oa

    Position

    Trapezoid

    simout

    To Workspace

    Scope

    1/0.3

    Normalzing

    Gain

    1

    s

    Integrator

    12

    Final

    Position

    10

    Clock

    0 5 10 15 20 25 30 35 40 45 500

    2

    4

    6

    8

    10

    12

    Trapezoi

    al P rofile

    eference

    Time (s)

    Position(in)

  • 8/8/2019 Project 3 Final Report (2)

    8/21

    Figure 24: Plot of a Basic Step Response

    Figure 25: Step Response VS Trapezoidal Profile

    Now by using the Trapezoidal Profile as the referenceinstead of the basic step function for the control system, the

    control system will be just as it would be in industry.

    Figure 26: Trapezoidal Profile Used As Reference

    Figure 27: Trapezoidal Profile PD Controller Response,

    KP = 13 & KD = 1

    Figure 28: Trapezoidal Profile Vs Step Input, PD Controller

    Figure 29: Zoomed In View Of Trapezoidal Profile VS

    Step Input Plot

    By observing Figure 29, the Trapezoidal Function does

    change the system response. There is now some overshoot but

    it is below the 2% design constraint. Another observance that

    can be made is that both responses settle at the same time, and

    this also stayed within the constraint of 0.3 settling time.

    Figure 30: Trapezoidal Profile VS Step Input For Vout

    0 5 10 15 20 25 30 35 40 45 500

    2

    4

    6

    8

    10

    12

    Time (s)

    Basic Step

    eference

    Pos

    ition(in)

    0 5 10 15 20 25 30 35 40 45 500

    2

    4

    6

    8

    10

    12

    Time (ms)

    Position(in)

    Step

    nput V s. Trapezoi

    al P rofile

    nput

    Step

    nputTrapezoi

    al P rofile

    la

    Xout

    Vout

    Trapezoid

    simout

    To Workspace

    Vc

    Torque Disturbance

    Xout

    Vout

    la

    Subsystem

    PID

    PIDController

    1/0.3

    Normalzing

    Gain

    1

    s

    Integrator

    12

    Final

    Position 0

    Constant

    10

    Clock

    0 500 1000 150 0 200 0 25000

    2

    4

    6

    8

    10

    12

    Time (ms)

    Position

    (in)

    PD Res ponse With Trapezoidal Profile As Reference

    Load Position

    0 500 1000 150 0 200 0 25000

    2

    4

    6

    8

    10

    12

    System S tep Response V s S ystem Trapezoidal Profi le

    Time (ms)

    Position

    (in)

    Trapezoidal P rofile

    Step Response

    15 0 200 250 300 350 400 450 500 5 50

    0

    2

    4

    6

    8

    10

    12

    System S tep Response V s S ystem Trapezoidal Profi le

    Time (ms)

    Position

    (in)

    Trapezoidal P rofile

    Step Response

    0 5 0 100 150 2 00 250 300 350 400 4 50 500-20

    0

    20

    40

    60

    80

    100

    120Trapezoidal Vout VS Step Input Vout

    Time (ms)

    Velocity

    (in/s)

    Trapezoidal P rofile

    Step Input

  • 8/8/2019 Project 3 Final Report (2)

    9/21

  • 8/8/2019 Project 3 Final Report (2)

    10/21

  • 8/8/2019 Project 3 Final Report (2)

    11/21

    XVI. SINUSOIDAL TORQUE DISTURBANCE

    Adding in a sinusoidal torque disturbance at 10% of the

    maximum torque (132 in-lbs) will change the system response

    greatly depending on the frequency of the sinusoid. By

    observing the loop gain transfer function of the system andthen observing the bode plot of the transfer function (Figure

    41) it can be observed that the system is acting as a low pass

    filter.

    At any frequency, the system will remain stable and within

    the accuracy requirement of 1%. As the frequency of the

    sinusoid increases the system will remain stable until it hits a

    high enough frequency which will cause attenuation of the

    sinusoid. By observing Figures 42 through Figures 47 it can

    be seen that the system will in-fact never become unstable.

    The outside disturbance will only cause vibrations which canbe accounted for by using mechanical components with a high

    tolerance for these vibrations.

    Figure 41: Sinusoidal Torque Disturbance, Freq = 1 rad/s

    Figure 42: Sinusoidal Torque Disturbance, Freq = 1 rad/s

    Figure 43: Sinusoidal Torque Disturbance, Freq = 10 rad/s

    Figure 44: Sinusoidal Torque Disturbance, Freq = 20 rad/s

    Bode Diagram

    Frequency (rad/sec)

    -6 0

    -4 0

    -2 0

    0

    20

    System: G

    Frequency (rad/sec): 4 .05

    Magnitude (dB): -19.3

    System: G

    Frequency (rad/sec): 10 .1

    Magnitude (dB): -0.205

    System: G

    Frequency (rad/sec): 14 .8

    Magnitude (dB): 13.3

    Magnitude(dB)

    System: G

    Frequency (rad/sec): 0 .33

    Magnitude (dB): -46.1

    10-1

    100

    101

    0

    45

    90

    13 5

    18 0

    Phase(deg) System: G

    Phase Margin (deg): -33.8

    Delay Margin (sec): 0.56

    At frequency (rad/sec): 10 .2

    Closed Loop Stable? Yes

    200 400 600 800 1000 1200 1400 1600 1800

    11.3

    11.4

    11.5

    11.6

    11. 7

    11.8

    11.9

    12

    12.1

    12.2

    Time(ms)

    Position(in)

    Sinusoidal Torque Disturbance V s No Torque Disturbance

    Torque Disturbance = 0

    Torque Disturbance,f = 1 rad/s

    200 400 600 800 1000 1200 1400 1600 1800

    11.85

    11.9

    11.95

    12

    12.05

    12.1

    12.15

    12.2

    Time(ms)

    Position(in)

    Sinusoidal Torque Disturbance V s No Torque Disturbance

    Torque Disturbance = 0

    Torque Disturbance,f = 10 rad/s

    200 400 600 800 1000 1200 1400 1600 1800 2000

    11.8

    11.85

    11.9

    11.95

    12

    12.05

    12.1

    12.15

    Time(ms)

    Position(in)

    Sinusoidal Torque Disturbance V s No Torque Disturbance

    Torque Disturbance = 0

    Torque Disturbance,f = 20 rad/s

  • 8/8/2019 Project 3 Final Report (2)

    12/21

    Figure 45: Sinusoidal Torque Disturbance, Freq = 100 rad/s

    Figure 46: Sinusoidal Disturbance, Freq = 1000 rad/s

    Figure 47: Sinusoidal Disturbance, Freq = 1000 rad/s

    XVII. NYQUIST PLOT

    A Nyquist Plot can be used to verify system stability. The

    first thing that must be done is to calculate the loop gain

    transfer function.

    A Nyquist Plot can be obtained using Matlab. First the loop

    gain transfer function has to be defined. Next the nyquist

    function can be used to produce the plot. The Matlab code is

    as follows.s = tf(s);

    N = (s*(s+3.09))/(s*(s+3.09)+207)

    Nyquist(N)

    This code will produce the Nyquist Plot in Figure 73.

    Figure 73: Nyquist Plot of the Loop Gain Transfer Function

    XVIII. STABILITY MARGINS

    The stability of the closed loop system can be determined by

    examining the loop gain transfer function and the associated

    stability margins. From Figure 74, the phase margin is -33.6

    degrees and the gain margin is infinite.

    200 300 400 500 600 700

    11.95

    12

    12.05

    12.1

    Time(s)

    Phase(Degrees)

    Sinusoidal Torque Disturbance VS No Torque Disturbance

    Torque Disturbance

    0

    Torque Disturbance f

    100 rad/s

    400 600 800 1000 1200 1400 1600 1800 2000 220011.96

    11.98

    12

    12.02

    12.04

    12.06

    12.08

    12.1

    Time(s)

    Phase(Degrees)

    Sinusoidal Torque Disturbance VS N o Torque Disturbance

    Torque Disturbance

    0

    Torque Disturbance f

    1000 rad/s

    500 550 600 650 700 750 800

    11.999

    11.9995

    12

    12.0005

    12.001

    12.0015

    12.002

    12.0025

    12.003

    Time(s)

    Phase(Degrees)

    Sinusoidal Torque Disturbance VS No Torque Disturbance

    Torque Disturbance

    0

    Torque Disturbance f

    1000 rad/s

    N

    quist Diagram

    Real

    xis

    Imaginar

    xis

    2 1 0 1 2 3 45

    4

    3

    2

    1

    0

    1

    2

    3

    4

    5

    S

    stem z

    Phase{

    argin (deg)

    180

    Dela

    {

    argin (sec)

    0

    t frequenc

    (rad/sec) InfClosed

    |

    oo}

    Stable~

    es

    0 d

    10 d

    6 d 4 d

    2 d

    10 d

    6 d 4 d

    2 d

    S

    stem

    z

    Phase{

    argin (deg)

    33.8

    Dela

    {

    argin (sec)

    0.56

    t frequenc

    (rad/sec)

    10.2

    Closed|

    oo}

    Stable~

    es

  • 8/8/2019 Project 3 Final Report (2)

    13/21

    Figure 74: Stability Margins, Loop Gain Transfer Function

    XIX. INERTIA CHANGE

    Inertia is another system parameter that can affect the

    stability of the system. This stability was examined by

    increasing the inertia gain constant block in the simulation ofthe system. The inertia gain is calculated as bring 1/Jt which

    initially is set to 1. The system output can be seen in Figure 48.

    Figure 48: Inertia Gain = 1, Initial System Parameter

    As the inertia (Jt) is increased the gain (1/Jt) decreases. As

    the inertia gain is decreases the system becomes underdamped

    (Figure 49 & 50).

    Figure 49: Inertia Gain = 1vs Inertia Gain = .1

    Figure 50: Inertia Gain = 1vs Inertia Gain = .01

    As the inertia gain is decreased even further, the system

    will become more underdamped until it becomes unstable

    (Figure 51).

    Bode Diagram

    Frequency (rad/sec)

    -6 0

    -4 0

    -2 0

    0

    20

    System: G

    Frequency (rad/sec): 4 .05

    Magnitude (dB): -19.3

    System: G

    Frequency (rad/sec): 10 .1

    Magnitude (dB): -0.205

    System: G

    Frequency (rad/sec): 14 .8

    Magnitude (dB): 13.3

    M

    agnitude(dB)

    System: G

    Frequency (rad/sec): 0 .33

    Magnitude (dB): -46.1

    10-1

    100

    101

    0

    45

    90

    13 5

    18 0

    Phase(deg) System: G

    Phase Margin (deg): -33.8

    Delay Margin (sec): 0.56

    At frequency (rad/sec): 10 .2

    Closed Loop Stable? Yes

    200 300 400 500 600 700 800 900

    11.94

    11.96

    11.98

    12

    12.02

    12.04

    12.06

    12.08

    12.1

    12.12

    Time(s)

    Position(Degrees)

    Effect of Increasing Inertia Gain

    Inertia Gain

    1

    0 500 1000 1500 2000 2500 3000 3500 40000

    2

    4

    6

    8

    10

    12

    14

    16

    Time(s)

    Position

    (Degrees)

    Effect of Increasing Inertia Gain

    Inertia Gain

    1

    Inertia Gain

    .1

    0 500 1000 1500 2000 2500 3000 3500 40000

    5

    10

    15

    20

    25

    Time(s)

    Position(Degrees)

    Effect of Increasing Inertia Gain

    Inertia Gain

    1Inertia Gain

    .0 1

  • 8/8/2019 Project 3 Final Report (2)

    14/21

    Figure 51: Inertia Gain = 1vs Inertia Gain = .0001

    XX. TRANSPORT DELAY

    The introduction of a transport delay in the feedback loop

    of the system can cause the system to become unstable.

    The transport delay is used to delay the output from being

    fed back into the controller immediately making the

    controller wait before it adjusts the setpoint. The first

    simulation run was with a delay of 1 Pico-second (Figure

    52). This did not cause much of an issue but a definite

    change can be seen.

    Figure 52: 1 Pico-second Transport Delay

    As the transport delay becomes longer, from 1 Pico-

    second to 6.5 Milli-second delays the signal begins to

    oscillate. This problem can be examined in Figure 53

    through Figure 55.

    Figure 53: 1 Nano-second Transport Delay

    Figure 54: 1 micro-second Transport Delay

    Figure 55: 1 Milli-second Transport Delay

    0 500 1000 1500 2000 2500 3000 3500 40000

    2

    4

    6

    8

    10

    12

    14

    Time(s)

    Pos

    ition(Degrees)

    Effect ofIncreasing Inertia Gain

    Inertia Gain = 1

    Inertia Gain = .0001

    500 550 600 650 700 750 800

    11.9

    11.95

    12

    12.05

    12.1

    12.15

    Time(s)

    Position

    (Degrees)

    Effect of Trans

    ort De

    ay

    Trans

    ort De

    ay = 0

    Trans

    ort De

    ay = 1

    s

    550 600 650 700 750 80011.8

    11.85

    11.9

    11.95

    12

    12.05

    12.1

    12.15

    Time(s)

    Pos

    ition(Degrees)

    Effect of Trans

    ort De

    ay

    Trans

    ort De

    ay = 0

    Trans

    ort De

    ay = 1 ns

    540 560 580 600 620 640 660 680 700 720

    11.94

    11.96

    11.98

    12

    12.02

    12.04

    12.06

    12.08

    12.1

    12.12

    12.14

    Time(s)

    Position(Degrees)

    Effect of Trans

    ort De

    ay

    Trans

    ort De

    ay = 0

    Trans

    ort De

    ay = 1 us

    330 340 350 360 370 380 390 400 410 420 430

    12.03

    12.04

    12.05

    12.06

    12.07

    12.08

    12.09

    12.1

    12.11

    12.12

    Time(s)

    Position(Degrees)

    Effect of Trans

    ort De

    ay

    Trans

    ort De

    ay = 0

    Trans

    ort De

    ay = 1 ms

  • 8/8/2019 Project 3 Final Report (2)

    15/21

    Figure 55: 6.5 Milli-second Transport Delay

    At 1 second transport delay the system reaches saturation

    about its oscillation. The system can be deemed unstable due

    the oscillations.

    Figure 56: 1 second Transport Delay

    XXI. RESONANT MODE

    A resonant mode function will now be added to the

    simulation. The resonant mode can be defined as

    with = .05 and n unknown. By adding this

    into the simulation and varying the natural frequency (n) the

    lowest resonant frequency that the system can handle can be

    determined. To determine the resonant frequency the natural

    frequency (n) and damping coefficient () can be substituted

    into the equation with = .05 and nvarying.It was found that the lowest frequency the system can

    handle is n = 855 rad/s, which is n = 852.86 rad/s. This

    value was found by performing many guess and check

    simulations. Figure 57 shows the output with a natural

    frequency of 100 rad/s or resonant frequency of 99.75 rad/s.

    Figure 57: Resonance Frequency = 99.75 rad/s

    From the figure it can be observed that the frequency needs

    to be higher.

    Figure 58 shows the natural frequency set at 1000 rad/s or

    the resonant frequency of 997.5 rad/s. The system remains

    stable and meets the desired specifications. Any natural

    frequency setting higher than 1000 rad/s will allow the system

    to remain stable.

    Figure 58: Resonance Frequency = 997.5 rad/s

    Figure 59 shows the lowest natural frequency possible, 855

    rad/s or 852.86 rad/s when converted to resonant frequency.

    Any resonant frequency lower 852.86 rad/s will take the

    system outside of the desired specifications, and eventuallycause it to become unstable as the frequency becomes small.

    200 300 400 500 600 700 800 900 1000 1 100

    11 .96

    11 .98

    12

    12 .02

    12 .04

    12 .06

    12 .08

    12 .1

    12 .12

    Ti

    (

    )

    iti

    (

    r

    )

    ff

    t

    fTr

    rt

    l

    Tr

    rt

    l

    = 0

    Tr

    rt

    l

    = 6.5

    0 500 1000 1500 2000 2500 3000 3500

    -150

    -100

    -50

    0

    50

    100

    150

    Ti

    (

    )

    iti

    (

    r

    )

    ff

    t

    fTr

    rt

    l

    Tr

    rt

    l

    = 0

    Tr

    rt

    l

    = 1

    0 200 400 600 800 1000 1200 1400-1.5

    -1

    -0.5

    0

    0.5

    1

    1.5x 10

    4

    Ti

    (

    )

    iti

    (i

    )

    ff

    t

    fV

    r

    i

    R

    t

    r

    q

    R

    t

    r

    q

    = 99 .75

    0 200 400 600 800 1000 1200 14000

    2

    4

    6

    8

    10

    12

    14

    Ti

    (

    )

    iti

    (i

    )

    ff

    t

    fV

    r

    i

    R

    t

    r

    q

    R

    t

    r

    q

    = 997 .5

  • 8/8/2019 Project 3 Final Report (2)

    16/21

    Figure 59: Resonance Frequency = 997.5 rad/s

    XXII. LOOP SHAPING

    Loop shaping is a method of controller design which uses a predetermined transfer function as the system controller

    instead of a PID controller. For loop shaping to work

    effectively the loop gain transfer function must have high gain

    at low frequency and cross the 0 dB axis at -20 dB per decade

    then have low gain for high frequency. An example of a

    proper loop shaping bode plot can be seen in Figure 60.

    Figure 60: Loop Shaping Bode Plot

    To apply the loop shaping design method for this plant, the

    first thing that must be done is to bode plot the open loop

    transfer function of the plant. The open loop transfer function

    of the plant in standard form is

    and the bode plot is show in Figure 61.

    Figure 61: Bode Plot of GP(s)

    Now a transfer function must be derived which can morph

    the Bode Plot of GP(s) into the generic loop shaping Bode Plot

    of Figure 60. This can be done by starting at the low

    frequency high gain and working to high frequency low gain.

    One transfer function that resembles the loop shaping Bode

    Plot is . The next step now is to try and modify GP(s)

    into this form. This can be done by eliminating the pole at -

    3.09 and multiplying by

    . This will produce a GC(s)

    transfer function of

    . This new transfer

    function is what will be used to replace the PID controller.The new Matlab simulation diagram will be of that in Figure

    62. The plot of the system response can be seen in Figure 63.

    Figure 62: Loop Shaping Matlab Simulation Diagram

    Figure 63: Loop Shaping System Response

    0 1000 2000 3000 4000 5000 6000 70000

    2

    4

    6

    8

    10

    12

    14

    Time(s)

    Position(in)

    Effect of Varying

    esonant Fre

    uency

    esonant Fre

    uency = 852.86

    -60

    -40

    -20

    0

    20

    40

    60

    80

    System: H

    Fre

    uency (ra

    sec): 0.113

    agnitu

    e (

    ): 57.

    System: H

    Fre

    uency (ra

    sec) : 1.14

    agnitu e ( ): 21.3

    System: H

    Fre

    uency (ra

    sec): 10

    agnitu

    e (

    ) : 0 System: H

    Fre

    uency (ra

    sec) : 117

    agnitu

    e (

    ) :-25.1

    agnitu

    e(

    )

    o

    e

    iagram

    Fre

    uency (ra

    sec)

    10-1

    100

    101

    102

    103

    -180

    -150

    -120

    -

    0

    System: H

    P

    ase

    argin (

    eg) : 78.6

    e ay argin (sec): 0.137

    t fre uency (ra

    sec): 10

    ose

    oo

    Sta

    e? Y es

    P

    ase(

    eg)

    o

    e

    iagram

    Fre

    uency (ra

    sec)

    -40

    -20

    0

    20

    40

    60

    agnitu

    e(

    )System:

    -

    Fre

    uency (ra

    sec): 14.8

    agnitu e ( ):-0.648

    10-1

    100

    101

    102

    -180

    -150

    -120

    -

    0

    System:-

    P

    ase

    argin (

    eg) : 12.3

    e

    ay

    argin (sec): 0.015

    t fre

    uency (ra

    sec) : 14.2

    ose oo Sta e? Y es

    System:-

    P

    ase

    argin (

    eg) : 12.3

    e

    ay

    argin (sec): 0.015

    t fre

    uency (ra

    sec) : 14.2

    ose oo Sta e? Y esP

    ase(

    eg)

    l

    X

    V

    z

    i

    i

    V

    i

    b

    X

    V

    l

    b

    y

    lzi

    i

    6

    +

    4

    +

    +

    L

    h

    i

    i

    l

    P

    i

    i

    l

    0 500 1000 1500 2000 25000

    2

    4

    6

    8

    10

    12

    14

    Time(s)

    Position(in)

    oo

    S

    a

    ing S ystem

    es

    onse

    S ystem

    es

    onse

  • 8/8/2019 Project 3 Final Report (2)

    17/21

    Since the output meets the design specification the specified

    controller GC(s) can be utilized.

    XXIII. LOOP SHAPING AND WHITE NOISE

    Now noise will be introduced into the loop shaping

    simulation and compared to the effect of noise with the PID

    Controller. The first simulation was performed with white

    noise set to 0.01% (Figure 64). When comparing Figure 64

    with Figure 38 it can be seen that they look very similar.

    Figure 64: Loop Shaping 0.01% White Noise

    Figure 65: Loop Shaping 0.15% White Noise

    Once again when the white noise level hits 0.15% thesystem goes out of spec and is not good anymore. This can be

    seen in Figure 66.

    Figure 66: Loop Shaping 0.15% White Noise

    XXIV. LOOP SHAPING WITH CONSTANT TORQUEDISTURBANCE

    Adding in a constant torque disturbance at 10% of the

    maximum torque (132 in-lbs), the system response does

    change (Figure 67). The load would go beyond 12 inches and

    the reverse and try to steady out at 12 inches.

    Figure 67: Loop Shaping, 10% Constant Torque Disturbance

    This could cause major problems for any precise motion

    system. The maximum amount of constant torque disturbance

    that this system can handle is 0%. Any amount of disturbancehigher than 0% will not cause instability but it will bring the

    system out of specifications.

    XXV. LOOP SHAPING AND SINUSOIDAL TORQUEDISTURBANCE

    Adding in a sinusoidal torque disturbance at 10% of the

    maximum torque (132 in-lbs) will change the system response

    greatly depending on the frequency of the sinusoid. By

    observing the loop gain transfer function of the system and

    0 500 1000 1500 2000 2500 3000-2

    0

    2

    4

    6

    8

    10

    12

    14

    Tim

    (

    )

    o

    ition(in)

    it

    N

    i

    ff

    t O n

    oop

    ping

    ontrol

    it

    N

    i

    = 0.01 %

    0 500 1000 1500 2000 2500 3000-2

    0

    2

    4

    6

    8

    10

    12

    14

    Tim

    (

    )

    o

    ition(in)

    it

    N

    i

    ff

    t O n

    oop

    ping

    ontrol

    it

    N

    i

    = 0.15 %

    100 200 300 400 500 600 700 800 900 1000

    11 .5

    11 .6

    11 .7

    11 .8

    11 .9

    12

    12 .1

    12 .2

    12 .3

    Tim

    (

    )

    o

    ition(in)

    it

    N

    i

    ff

    t O n

    oop

    ping

    ontrol

    it

    N

    i

    = 0.15 %

    100 200 300 400 500 600 700

    11 .6

    11 .8

    12

    12 .2

    12 .4

    12 .6

    12 .8

    Tim

    (

    )

    o

    ition(in)

    on

    t

    nt Tor

    u

    Di

    tur

    n

    On

    oop

    ping

    ontrol

    on

    t

    nt Tor

    u

    Di

    tur

    n

    = 0%

    n

    t

    nt Tor

    u

    Di

    tur

    n

    = 10 %

  • 8/8/2019 Project 3 Final Report (2)

    18/21

    then observing the bode plot of the transfer function (Figure

    68) it can be observed that the system is acting as a low pass

    filter.

    Figure 68: Bode Plot of the Loop Gain Transfer Function

    At any frequency, the system will remain stable and within the

    accuracy requirement of 1%. As the frequency of the sinusoid

    increases the system will remain stable until it hits a high

    enough frequency which will cause attenuation of the sinusoid.

    By observing Figure 69 it can be seen that the system will beout of specifications even at low frequency. By observing

    Figure 70 and Figure 71, it can be seen that at high frequency

    the system will never go unstable. The outside disturbance

    will only cause vibrations which can be accounted for by

    using mechanical components with a high tolerance for thesevibrations.

    Figure 69: Sinusoidal Torque Disturbance, Freq = .01 rad/s

    Figure 70: Sinusoidal Torque Disturbance,Freq = 1000 rad/s

    Figure 71: Closer Look, Sinusoidal Torque Disturbance,Freq = 1000 rad/s

    XXVI. LOOP SHAPING NYQUIST

    A Nyquist Plot can be obtained using Matlab. First the

    loop gain transfer function has to be defined. Next the

    nyquist function can be used to produce the plot. The Matlab

    code is as follows.

    s = tf(s);

    N = (s^3+100*s^2)/(s^3+100*s^2+6700*s+6700)

    Nyquist(N)

    This code will produce the Nyquist Plot in Figure 73.

    -15 0

    -10 0

    -50

    0

    a

    it

    e(

    )

    e

    ia

    ra

    re

    e

    cy (ra

    /se c )

    10-2

    10-1

    100

    101

    102

    103

    0

    45

    90

    13 5

    18 0

    Sys te

    K

    P as e

    a r i (

    e ): - 11 9

    e lay

    a r

    i

    (se c ): 0 .0739

    t fre

    e cy (ra

    /se c ): 57

    l

    se

    S ta

    le ? Yes

    P

    ase(

    e

    )

    200 400 600 800 1000 1200 1400 1600 1800 2000

    9.5

    10

    10 .5

    11

    11 .5

    12

    12 .5

    Ti

    e(s)

    P

    siti

    (i

    )

    S i

    s

    i

    al Tor

    e

    ist

    r

    a

    ce

    oopS

    api

    ontrol

    oTor

    e

    ist

    r

    ance

    S inusoi

    al Tor

    ue

    istur

    ance, f = .01

    0 500 1000 1500 2000 2500 3000 35000

    2

    4

    6

    8

    10

    12

    14

    Ti

    e(s)

    Position

    (in)

    S inusoi

    al Tor

    ue

    istur

    ance

    n

    oopS

    aping

    ontrol

    oTor

    ue

    istur

    ance

    S inusoi

    al Tor

    ue

    istur

    ance, f = 1000

    605 610 615 620 625 63012 .026

    12 .0265

    12 .027

    12 .0275

    12 .028

    12 .0285

    12 .029

    12 .0295

    Ti

    e(s)

    Position

    (in)

    S inusoi

    al Tor

    ue

    istur

    ance

    n

    oopS

    aping

    ontrol

    oTor

    ue

    istur

    ance

    S inusoi

    al Tor

    ue

    istur

    ance, f = 1000

  • 8/8/2019 Project 3 Final Report (2)

    19/21

    Figure 75: Nyquist Plot of the Loop Gain Transfer Function

    XXVII. LOOP SHAPING STABILITY MARGINS

    The stability of the closed loop system can be determined

    by examining the loop gain transfer function and the

    associated stability margins. From Figure 76, the phase

    margin is -119 degrees and the gain margin is infinite.

    Figure 76: Bode Plot of the Loop Gain Transfer Function

    XXVIII. EFFECTS OF CHANGING INERTIA GAIN WITH LOOPSHAPING

    As in the previous simulation involving inertia gain change,

    the system will respond by at first becoming under-damped.

    As the inertia gain grows smaller the system response will become more and more under-damped until it becomes

    unstable. This change can be observed in Figure 77.

    Figure 77: Effects of Changing Inertia Gain

    XXIX. TRANSPORT DELAY

    The introduction of a transport delay in the feedback loop

    of the system can cause the system to become unstable. The

    transport delay is used to delay the output from being fed back

    into the controller immediately making the controller wait

    before it adjusts the setpoint. As the transport delay increases

    the system response will begin to oscillate until it goes out of

    control.

    Figure 77: Effects of Increasing Transport Delay

    XXX. RESONANT MODE WITH LOOP SHAPING METHOD

    A resonant mode function will now be added to thesimulation. The resonant mode can be defined as

    with = .05 and n unknown. By adding this

    into the simulation and varying the natural frequency (n) the

    lowest resonant frequency that the system can handle can be

    determined. To determine the resonant frequency the natural

    frequency (n) and damping coefficient () can be substituted

    N qui t Di gr m

    !

    "

    l # xi

    Im

    $

    gin

    $

    r%

    &

    xi

    '

    - 1 -0 .5 0 0 .5 1 1 .5-1

    -0 .8

    -0 .6

    -0 .4

    -0 .2

    0

    0 .2

    0 .4

    0 .6

    0 .8

    10 ( B

    -20 ( B

    -10 (

    B

    - 6 ( B

    - 4 ( B-2 ( B

    20 ( B

    10 ( B

    6 (

    B

    4 ( B2 ( B

    )

    t"

    m:0

    1

    2

    "

    3

    rgin ((

    "

    g): - 18 0

    D"

    l 3

    rgin ( "

    4 ): 0

    A t fr"

    qu"

    n 4 (r ( / "

    4 ): Inf5

    lo

    "

    (

    6

    oop)

    t 7

    l"

    8

    Y"

    )

    t"

    m: 01

    2

    "

    3

    rgin ((

    "

    g): -11 9

    D"

    l

    3

    rgin (

    "

    4

    ): 0 .0 7 3 9

    A t fr"

    qu"

    n 4 (r ( / "

    4 ): 57

    Clo "

    ( 6

    oop)

    t 7 l"

    8

    Y"

    -15 0

    -10 0

    - 50

    0

    50

    M

    agnitu

    9

    @

    (9

    B)

    Bo ("

    Dia gram

    Fr"

    qu"

    n4

    (rad/

    "

    4

    )

    10-2

    10-1

    100

    101

    102

    103

    0

    45

    90

    13 5

    18 0

    Sys t"

    m: 01

    2 as e Ma rgin ( de g): - 11 9

    De lay Ma rgin (se c ): 0 .0 7 3 9

    A t freque ncy (rad/se c ): 57

    Close d 6

    oop S tab le? Y es

    Phase

    (deg)

    0 500 1000 1500 2000 2500-20

    -10

    0

    10

    20

    30

    40

    50

    60

    70

    80

    Time(s)

    P

    A

    sition(in)

    B

    ffec t O fCha nging Inertia G ain

    Inertia G ain = 1

    Inertia G ain = .1

    Inertia G ain = .01

    Inertia G ain = .001

    Inertia G ain = .0001

    1.1

    .01.001

    .0001

    0 500 1000 1500 2000 2500 3000-200

    -150

    -100

    -50

    0

    50

    100

    150

    200

    250

    Time(s)

    P

    A

    sition(in)

    B

    ffec t O fIncreas ing Transport D elay

    Transport De lay = 0

    Transport De lay = .25 s

    Transport De lay = .5s

    Transport De lay = .75 s

    Transport De lay = 1s

  • 8/8/2019 Project 3 Final Report (2)

    20/21

    into the equation with = .05 and nvarying.

    Figure 78 shows the effect of increasing resonance

    frequency has on the system response. The lowest resonance

    frequency that the system can handle is approximately 180

    rad/s. This can be seen by observing Figure 79 throughFigure 81.

    Figure 78: Effects of Increasing Resonance Frequency

    Figure 79: Effects of Increasing Resonance Frequency

    Figure 80: r = 180 rad/s VS r = 1000 rad/s

    Figure 81: r = 180 rad/s VS r = 1000 rad/s

    XXXI. CONCLUSIONS

    The design requirement for the position control system was

    to move a load 12 inches in 0.3 seconds using manual tuning

    methods for a PID Controller. This was met by implementing

    negative feedback control and a PID controller. Using the

    SISO Design Tool, the PID parameters were found to be KP =13, KI = 0 and KD = 1.

    A Trapezoidal Profile was used to replace the basic step

    input as the reference to the control system. This was done

    because the Trapezoidal Profile is an industry standard and I

    am sure to encounter it in the future.White Noise was introduced into the system to represent

    the various vibrations and effects which the mechanical

    components have on the system. This noise can cause the

    system to go out of control if the proper mechanical parts are

    not used to compensate or these mechanical disturbances.

    Torque Disturbance can be a major issue when designing a

    control system. I learned that by neglecting the Torque

    disturbance the entire control system would have to be re-

    evaluated to incorporate this. Another way to deal with thedisturbance is using various disturbance rejection methods,

    which is something I did not explore for this control system. Nyquist Plots can be used to predict and verify system

    stability. For this control system adding any poles or zeros

    outside of the encirclement will keep the system stable. This

    can be seen in the Nyquist Plot generated for this control

    system.

    I found there to be many differences between the system

    being controlled by a PID and the system being controlled by

    loop shaping. These differences can be seen in Table 1 below.

    0 500 100 0 150 0 2 000 250 0 30 00 350 0 400 0 4 500 5000-40

    -30

    -20

    -10

    0

    10

    20

    30

    40

    50

    60

    Time(s)

    P

    C

    sition(in)

    D

    ffec t O fIncreas ingE

    esF

    nance Frequency

    E

    esF

    nance Frequency = 100 rad/sRes

    F

    nance Frequency = 150 rad/s

    ResF

    nance Frequency = 200 rad/s

    ResF

    nance Frequency = 250 rad/s

    ResF

    nance Frequency = 1000 rad/s

    0 2000 4000 6000G

    000 10000 120000

    2

    4

    6

    G

    10

    12

    14

    Time(s)

    P

    C

    sition(in)

    D

    ffec t O fIncreas ing ResF

    nance Frequency

    Re sF

    nance Frequency = 150 rad/s

    Re sF

    nance Frequency = 165 rad/s

    Re sF

    nance Frequency = 1H

    5 rad/s

    Re sF

    nance Frequency = 1G

    0 rad/s

    Re sF

    nance Frequency = 1000 rad/s

    0 2 0 00 40 0 0 6 0 00 I 00 0 10 0 0 0 1 2 00 00

    2

    4

    6

    I

    10

    12

    14

    Tim e(s )

    P

    P

    sition

    (in)

    Q

    ffec t O fIncreas ing Re sR

    na nce Fre que ncy

    Re sR

    na nce Fre quency = 150 rad/s

    Re sR

    na nce Fre quency = 165 rad/s

    Re sR

    na nce Fre quency = 1S

    5 rad/s

    Re sR

    na nce Fre quency = 1I

    0 rad/s

    Re s R na nce Fre quency = 1 0 0 0 rad/ s

    3 6 0 3S

    0 3I

    0 3T

    0 4 0 0 4 10 4 20

    1 2 .0I

    1 2 .0I

    5

    1 2 .0T

    1 2 .0T

    5

    1 2 .1

    1 2 .1 0 5

    1 2 .1 1

    1 2 .1 1 5

    1 2 .1 2

    1 2 .1 2 5

    1 2 .1 3

    Tim e (s )

    P

    P

    sition

    (in)

    Q

    ffec t O fInc rea s ing Re sR

    na nce Frequency

    Re sR

    na nce Fre que ncy = 150 rad/s

    Re sR

    na nce Fre que ncy = 165 rad/s

    Re sR

    na nce Fre que ncy = 1S

    5 rad/s

    Re sR

    na nce Fre que ncy = 1I

    0 rad/s

    Re sR

    na nce Fre que ncy = 1 0 0 0 rad/ s

  • 8/8/2019 Project 3 Final Report (2)

    21/21

    Parameter PID Loop Shaping

    Maximum White

    Noise

    0.15% 0.15%

    Constant

    Torque

    Disturbance

    13.26% 0%

    Sinusoidal

    Torque

    Disturbance

    Attenuation

    40 rad/s 100 rad/s

    GainMargin -33..8 degrees 119 degrees

    PhaseMargin

    Inertia Gain

    Change

    .0001 .1

    Maximum

    Transport Delay

    6.5 ms 250ms

    LowestResonance

    Frequency

    852.86 rad /s 180 rad/s

    Table 1: Comparing the Parameters of PID Design Method

    Against The Parameters Found for Loop Shaping Design

    Method

    This project was very beneficial to me. I was able to get

    hands on experience with Matlabs Simulink software and

    also tuning of a PID controller. I was also able to apply the

    loop shaping design method which I found much more

    intuitive than playing around with various PID parameters. I

    was also able to use the theoretical knowledge of control

    theory and apply it in a real world application. This was also

    my first experience with the IEEE standard document format.This is a benefit because the format will be used for the rest of

    my engineering career and must be perfected so that I can

    convey my work in a professional, intelligent, and precisemanner.