pidpendulum_9158439_abaradanielnsor

11
A REPORT ON PID PENDULUM CONTROL BY ABARA, DANIEL NSOR STUDENT ID: 9158439 SUBMMTTED TO DR. MARTIN BROWN IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE COURSE UNIT EEEN60115 INTELLIGENT CONTROL & ROBOTICS M.SC ADVANCED CONTROL & SYSTEMS ENGINEERING 2014-15 SESSION

Upload: daniel-abara

Post on 12-Sep-2015

218 views

Category:

Documents


5 download

DESCRIPTION

Report of PID pendulum control as a Compass gait manipulator (walking gait)

TRANSCRIPT

  • A REPORT

    ON

    PID PENDULUM CONTROL

    BY

    ABARA, DANIEL NSOR STUDENT ID: 9158439

    SUBMMTTED TO

    DR. MARTIN BROWN

    IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE COURSE UNIT

    EEEN60115 INTELLIGENT CONTROL & ROBOTICS

    M.SC ADVANCED CONTROL & SYSTEMS ENGINEERING

    2014-15 SESSION

  • 1

    INTRODUCTION

    This report is based on the standard single link manipulator (SLM) operating in the vertical plane. The link is of

    uniform total length = 0.5 and mass 2.

    Figure 1: Single Link Manipulator

    Where, =

    = . , = the joint angle, = the applied Torque and = . / is the acceleration due to

    gravity acting in the downwards direction. The Inertia of the uniform rod acting around its COM is given as:

    =1

    32 (1)

    Thus, for the single link manipulator under consideration, the Inertia is =1

    3 2 0.0625 = . .

    ANALYSIS OF PLANT DYNAMICS

    Linearization Process:

    To obtain the Manipulators non-linear equation of motion, the Potential and Kinetic energies of the SLM are

    computed using the forwards and velocity kinematics of the SLM. Then, the Lagrangian is computed from the

    difference between the Kinetic and Potential energies (KE-PE) to yield equation (2) below.

    (, ) = (, ) () =

    ( + ) () (2)

    The Euler-Lagrange expression given in equation (3) is then used to evaluate the Lagrange equation to obtain the

    non-linear equation of motion given in equation (4).

    The Euler-Lagrange expression is,

    (

    (,)

    )

    (,)

    = (3)

    The Non-linear equation of motion is, ( + ) + () = (4)

    where, ( + 2) represents the Mass/Inertia matrix, cos() represents the gravity vector and is the

    Torque applied to the manipulator. Substituting the parameters for the manipulator under consideration, the non-

    linear equation of motion is given as, + . () = (5)

    The non-linear equation in (5) is then linearized using a Multivariate Taylor series which involves performing partial

    derivatives. Equation (5) can be re-arranged by making the acceleration term subject of formula, hence,

    = ( cos())/( + 2) (6)

    Equation (6) above is in the form, = (, ) and a 1st order multivariate Taylor series for = (, ) is used to

    linearize the manipulator about an equilibrium point {, }. The 1st order multivariate Taylor series is given by the

    expression, ( + , + ) = (, ) +((,)

    +

    ((,)

    (7)

    Applying equation (7) to equation (6) yields a linear 2nd order ordinary differential equation for the manipulator as

    follows: ()

    (+) =

    (+) (8)

    where, = represents the gravity component, and = is the applied Torque.

    Analysis of Locally linear dynamic behaviour

    The single link manipulator was analysed about two equilibrium points = {1.8, 1.8}.

    Figure 2(a) & (b): SLM equilibrium points = {1.8, 1.8}

    Linearizing around equilibrium point = . rad:

    Linearizing the manipulator about, = 1.8 was done by substituting the parameters of the single link manipulator

    with = 1.8 rad into equation (8) to yield the second order equation below:

    28.63 = 6 (9)

    = 2

    ,

    x

    1.8 1030 -1.8 1030

  • 2

    Equation (9) is in the form, 28.63 = 6 (10)

    where, = = is the output signal, and = = is the input signal. Taking Laplace transform of

    equation (10), we obtain, (2 28.63)() = 6() to yield the transfer function relating the input and output

    as, ()

    ()=

    6

    228.63 (11)

    The poles of the single link manipulator around = 1.8 rad are given by the roots of 2 28.63 = 0.

    It follows that, = 28.63 = . . From the pole values obtained, the single link manipulator has a pole in

    the right half plane, = +5.35 and hence, this equilibrium point is unstable. This means the system exponentially

    diverges. Furthermore, the impulse response of the system can be represented as,

    = 5.35 + 5.35 (12)

    where, A and B are constants. The first term with A as coefficient represents exponential growth (unstable mode)

    while the term with B as coefficient represents exponential decay (stable mode). The time constant of the response

    is obtained from the inverse of the pole as, 1

    5.35= 0.19 = . approximately.

    This implies that in every 0.2 of a second the unstable mode will make the error grow by a factor of 3.

    Linearizing around equilibrium point = . rad:

    Substituting the parameters of the single link manipulator together with = 1.8 rad into equation (8) yields the

    linearized system, + 28.63 = 6 (13)

    which is in the form, + 28.63 = 6 (14)

    Similar to the previous case; taking Laplace transform of equation (14) and rearranging, we obtain the transfer

    function relating the input and output as, ()

    ()=

    6

    2+28.63 (15)

    The poles of the single link manipulator around = 1.8 are given by the roots of 2 + 28.63 = 0. It follows

    that, 2 = 28.63. Hence, = 28.63 = . . Thus, linearizing around = 1.8 rad yields two poles on

    the imaginary axis and none on the real axis, therefore the system is marginally stable. The systems impulse

    response is given as, = 5.35 + 5.35 (16)

    This implies that the system oscillates with a time period of =2

    , where, = 5.35 / and hence the time

    period of the oscillation =2

    5.35= 1.17 = . approximately.

    Matlab/Simulink Implementation

    To simulate the manipulators dynamics, we re-arrange the computed equation of motion in equation (5) and make

    the subject of the formula to yield,

    = 6 29.4 cos() (17)

    Figure 3 shows the model used to simulate the unforced response ( = 0) of the non-linear system with an initial

    angle of 1.5 rad. The output angle is obtained by computing and then integrating it twice using two integrator

    blocks in Simulink. The first integration yields , which is in turn integrated to yield . The initial conditions are set

    in the integrators as {(0), (0)} = {0,1.5}. For the linearized dynamics, the equilibrium torque was computed and

    used as the input to the system. In equilibrium, {, } = 0 respectively. Thus, equation (4) becomes,

    cos() = (18)

    Equation (18) gives the needed torque to keep the system at a given equilibrium point. For the equilibrium point,

    = 1.8, = 2 9.8 0.25 cos(1.8) = . (19)

    Similarly, the equilibrium torque for the equilibrium point = 1.8 is given as,

    = 2 9.8 0.25 cos(1.8) = . (20)

    Figure 3: Unforced non-linear dynamics simulation Figure 4: Linearized dynamic simulation around q = 1.8rad

  • 3

    For = 1.8, the system is started at {(0), (0)} = {0,1.5} which is close to the equilibrium point. The linearized

    dynamics is given in equation (10). Making subject of formula, we obtain,

    = 6 + 28.63 (21)

    where, = and = , represent the change in angle and torque respectively. Thus, for the linearized

    simulation around {, } = {1.8, 1.1133}, the input = = = 0 (1.1133) = . .

    Similarly the initial angle = = = 1.5 1.8 = . . The change in angle was used as the initial

    value of the angle in the simulation and the change in applied Torque was used as the input Torque in the

    linearized simulation. In the simulation, was computed using equation (21) and integrated twice to obtain =

    . Using = , the output angle was then computed as = + . Figure 4 shows the model used to

    simulate the linearization around = 1.8.

    For = 1.8, a similar process was used. The system was started at {(0), (0)} = {0, 1.6} which is close

    to the equilibrium point. The linearized dynamics is given by equation (14). Making the subject of formula yields,

    = 6 28.63 (22)

    For the linearized simulation around {, } = {1.8, 1.1133}, the input = = = 0 + 1.1133 =

    . and the initial angle = = = 1.6 (1.8) = . . This was simulated in a similar

    way as for = 1.8. The main difference is the change in sign of the summation block in computing . The output

    angle from the simulation was also computed as = + just as for the previous equilibrium point. Figure 5

    below shows the model used for the simulation.

    Figure 5: Linearized dynamic simulation around q*=-1.8rad Figure 6: Non-linear unforced SLM {(0) = 1.5}

    The unforced response of the non-linear dynamic SLM is given in figure 6 above. From the response (red), it is

    observed that the SLM oscillates between = 1.5 (about 86 deg.) and = 4.62 (about -265 deg.) with a

    period of approximately 3.3 seconds (red). This oscillation is continuous as there is no damping in the system. After

    about 6 seconds, the initial velocity (blue) becomes large enough and the SLM keeps rotating in the same direction.

    The responses of the linearized SLM are given below:

    Figure 7: Linearized SLM around {, } ={1.8,-1.1133} Figure 8: Linearized SLM around {, } ={-1.8,-1.1133}

    Figure 7 shows the response of the SLM when linearized around = 1.8 and started at an initial angle of =

    1.5 . From the response, it can be concluded that the equilibrium is unstable because the system diverges from

    the equilibrium point exponentially. This divergence is due to gravity acting on the system. Furthermore, we can

    0 2 4 6 8 10

    -10

    -5

    0

    5

    10

    15

    Time (s)

    q(rad)

    q

    dq

    0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.5-120

    -100

    -80

    -60

    -40

    -20

    0

    Time t(s)

    q(rad)

    0 0.5 1 1.5 2 2.5 3-1.6

    -1.59

    -1.58

    -1.57

    -1.56

    -1.55

    -1.54

    -1.53

    Time t(s)

    q(rad)

  • 4

    confirm that the system has a time constant of 0.2 seconds because the error grows by a factor of 3 in every 0.2 of

    a second. This is evident from the change in angle from -20 rad to -60 rad (factor of 3) between time 1.2 seconds

    and 1.4 seconds. This results also agree with the analysis done earlier on the poles of the linearized SLM. Figure 8

    shows the response of the SLM when linearized around = 1.8, and started at an initial value of = 1.6. It

    is observed from the response that the SLM is marginally stable at this equilibrium point, because it oscillates

    continuously between -1.6 rad and -1.535 rad since there is no damping in the system. From the graph, the period

    of oscillation is approximately 1.2seconds. Again, this agrees with the results obtained when the poles of the

    linearized SLM around = 1.8 were analysed.

    The limit cycle of the non-linear model is plotted against the linear model, and is given in figure 9 below.

    From figure 9, it is observed that both the linearized and non-linearized dynamics start in the same direction, having

    similar angle and velocity. This implies that the linearized SLM dynamics is approximately locally equivalent to the

    non-linearized dynamics. However, it is observed that after approximately 0.6 rad, the linearized response begins

    to diverge continuously. This divergence is due to the effect of gravity acting on the linear model. Gravity has a

    linear effect on the linearized dynamics and a non-linear effect on the non-linearized dynamics. This divergence

    seen in the linear dynamics also explains the exponential divergence of the system from the equilibrium point as

    seen previously in figure 7.

    Figure 9: Non-linear/linear models showing local equivalence

    PID JOINT CONTROL

    A Proportional-Integral-Derivative (PID) controller was designed to ensure that the settling time of the SLM is

    approximately 0.5 seconds. This was done using the pole placement design method for PID controllers. Equation

    (8) gives the linearized model for the SLM. This model can be put in the following form,

    + () = (23)

    where, () = sin()

    (+2), =

    (+), = , = and =

    The PID controller was designed using the linearized model in the form of equation (23), and then the controller

    was analysed for the equilibrium points chosen previously. The design point (linearization point) selected for the

    controller was = 0.2 rad which is somewhere halfway between the two equilibrium points used to linearize the

    SLM, = {1.8, 1.8}. The expression for a PID controller is given as,

    = + + (24)

    where, = Proportional gain, = Integral gain, = derivative gain, the error = and = reference input.

    Often when the reference input is a step or a sequence of steps (as used in this design), output feedback is usually

    used in place of error feedback and the derivative part of the controller is simplified to,

    = (25)

    This is done based on the assumption that the derivative of the reference input is 0. Derivative of a step yields

    impulse which is 0 everywhere except at time t = 0. Hence, = = 0 = and therefore, =

    and so equation (25) is true. So the output of the PID controller becomes,

    = + (26)

    This removes one of the zeros in the closed loop system and prevents derivative kick due to sudden changes in the

    reference input. Substituting equation (26) into (23) and evaluating, we obtain,

    + () = ( + )

    + () = ( ) + ( )

    -5 -4 -3 -2 -1 0 1 2-15

    -10

    -5

    0

    5

    10

    15

    q(rad)

    dq(rad/s)

    non-linear

    linear

  • 5

    Differentiating, + () = ( ) + ( )

    + () = + To yield, + + ((

    ) + ) + = ( + ) (27)

    Equation (27) represents the closed loop system. As observed, this yields 1 zero and 3 poles in the closed loop

    system. Taking Laplace transform of equation (27), the closed loop transfer function is,

    () =( + /)

    3 + 2 + (() + ) + (28)

    The denominator of equation (28) gives the poles of the closed loop system while the numerator gives the zeros.

    Hence, we can design the gains, , , such that the closed loop poles are at some specified location. This is the

    idea behind the pole placement design method. For the PID used for this design, the poles were specified as real

    and distinct so that parameter variation does not lead to poles in the closed loop system that would produce

    oscillations. Also, to avoid demanding too much actuator energy, the poles were chosen not to be too fast. From

    knowledge of dynamic system behaviour, the settling time of a system is approximately 4 times the time constant

    of the system. Hence, for the required settling time of 0.5 seconds, the time constant of the system would be 0.5

    4= 0.125 seconds. Furthermore, the time constant of a system is the inverse of the pole (the slowest pole if not

    a first order system). For our SLM system with the PID controller, we need 3 poles. The slowest pole usually

    dominates, and determines the time constant of the system. Thus, we must place the slowest pole at 1

    0.125= 8,

    which yields = or equivalently ( + 8). Two other poles were specified at = and = . Thus, the

    pole specification is given as ( + 8)( + 13)( + 23) = 0. This yields the characteristic equation,

    + + + = (29)

    Comparing equation (29) with the closed loop denominator in equation (28),

    3 + 2 + (() + ) + = 0 (30)

    where, for the linearization point, = . rad, () = ()

    (+)= . , =

    (+)= , the closed

    loop poles are the roots of, + + (. + ) + = (31)

    Equating coefficients of (31) and (29), the PID gains are obtained as, = . , = . , = . .

    Analysis of Dynamic Behaviour

    For the equilibrium points chosen previously, = {1.8, 1.8}, the parameter variation based on () is between

    28.63 and 28.63 therefore the closed loop denominator will have the form,

    + + ([. , . ] + ) + = (32)

    It follows that the SLM manipulator will always be stable as long as,

    28.63 + 6 > 0 (33)

    For equation (33) to be true, must be greater than, 4.77. Hence, since the calculated Proportional gain is

    greater than 4.77, the SLM will be stable for other linearization points apart from the design point = 0.2rad.

    However, the transient response will change as the pole locations would change as shown next.

    For = 1.8, () = 28.63. Using equation (30) and the computed PID gains, we obtain,

    3 + 442 + 564.23 + 2392 = 0 (34)

    which has poles at, {. , . . }

    This has all poles in the left half plane and is therefore stable. It has 2 poles as a conjugate pair with poles on the

    imaginary axis. However, the oscillation will be mild and less visible because the real part is higher than the

    imaginary part of the pole. The dominant (slowest) pole, = . . yields a time constant of 1

    9.19= 0.12

    seconds which has a corresponding settling time of 0.48 seconds, which is approximately equal to the desired 0.5

    seconds. Hence, the PID controller meets its design objective at this equilibrium point.

    For = 1.8, () = 28.63 so the resulting closed loop denominator is,

    3 + 442 + 621.49 + 2392 = 0 (35)

    which has poles at, {. , . . }

    Again, all the poles are in the left half plane therefore the SLM is stable at this point. There are also 2 poles which

    are a pair of conjugates (18.92 5.52), but just as in the previous case, the oscillations are less obvious because

    the real part of the pole is greater than the imaginary part. The dominant pole = . yields a time constant

  • 6

    of 1

    6.16= 0.16 seconds, which corresponds to a settling time of 0.6 seconds. This value is approximately equal to

    the desired 0.5 seconds hence it is safe to say that the PID controller meets the design objective. These behaviours

    are also seen in the responses from the linearized system when simulated with a step demand of 0.5 rad.

    Figure 10: Response at = 0.2 (design point) with PID Figure 11: Response at = 1.8 rad with PID

    Figure 12: Response at = 1.8 rad with PID Figure 13: Control (actuator) action required

    As observed from the figures above, the output has some overshoot at both equilibrium points and also at the

    design point due to the zero in the closed loop. For all three cases, the tracking error is 0.5 rad initially when the

    simulation starts but then converges to 0 as time tends to after about 0.6 seconds. This convergence of the error

    to 0 is due to integral action in the controller. The settling time is approximately equal to 0.5s which corresponds

    to the desired. The control input which is the demanded torque is of considerable magnitude is largest at time 0

    when the error is at its maximum. As error tends to 0, the demanded Torque reduces to a constant value. Higher

    control action reduces the effect gravity has on the variation.

    PID with the Non-linear system

    The PID gains were applied to the original non-linear plant. Figure 14 gives the Simulink model used for the

    simulation. The derivative gain is applied to the output rather than the error. This has the advantage of removing

    one of the zeros from the closed loop system and preventing derivative kick, as described in the first section. The

    left hand side within the blue square represents the controller. The output of the controller is the input Torque .

    This is applied to the nonlinear plant (equation 5) which is represented by the red square in the figure below.

    Figure 14: Simulation of Non-linear SLM with PID controller

    0 0.5 1 1.5-0.2

    0

    0.2

    0.4

    0.6

    t (s)

    q (rad)

    r

    y

    e

    0 0.5 1 1.5-0.2

    0

    0.2

    0.4

    0.6

    t (s)

    q(rad)

    r

    y

    e

    0 0.5 1 1.5-0.2

    0

    0.2

    0.4

    0.6

    t (s)

    q(rad)

    r

    y

    e

    0 0.5 1 1.5-20

    -10

    0

    10

    20

    30

    40

    50

    t

    u

    q*=0.2

    q*=1.8

    q*= -1.8

    Non-linear Plant PID Controller

  • 7

    As shown in figure 14, the output of the plant is fed back into the controller and the error is computed using

    standard negative feedback. The reference command is a series of step changes between -1.8 rad and 1.8 rad which

    are the two equilibrium points chosen earlier. The resulting responses are given below.

    Figure 15: Non-linear system response with PID Controller

    As seen from figure 15 above, the system takes about 0.6 seconds to settle which is roughly equal to the desired

    0.5 seconds. There is also some considerable overshoot because of the zero in the closed loop system. The variation

    in parameter between = 1.8 rad and = 1.8 rad has little effect on the stability of the non-linear system

    because, the controller gains are high enough thereby yielding high control action (actuator energy) which in turn,

    reduces the effect of gravity on the SLM. It is also observed that the tracking error is at maximum at the time instant

    where there is a new step demand. The controller then acts on the error to make the output track the step input

    thereby making the error converge to zero. Figure 16 below gives the control action.

    Figure 16: PID controller action for non-linear plant

    It is observed that the peak control (actuator) magnitude required to drive the plant to track the set point is about

    350 which represents the applied Torque (350Nm). The higher the control gains, the higher the control (actuator)

    action and equivalently the applied Torque, which drives the plant to track the set point. This is because more

    control energy reduces the relative effect or variation by gravity. This is however limited by actuator constraints

    and saturation. If the gains are too high, the system may not be feasible in reality or may be very expensive to

    implement.

    MOTOR EFFECT

    Considering that an idealized motor is used to generate the Torque, represented by a damping factor of 0.8, the

    non-linear equation of motion in equation (5) becomes,

    + . + . () = (36)

    For the equilibrium point = . , the linearized equivalent is,

    + 0.8 28.63 = 6 (37)

    This is in the form, + 0.8 28.63 = 6 (38)

    0 0.5 1 1.5 2 2.5 3 3.5 4 4.5-4

    -3

    -2

    -1

    0

    1

    2

    3

    4

    t (s)

    q (rad)

    r

    e

    q

    0 0.5 1 1.5 2 2.5 3 3.5 4 4.5-400

    -300

    -200

    -100

    0

    100

    200

    300

    400

    t (s)

    u

  • 8

    Taking Laplace Transforms and rearranging, the transfer function relating input and output is obtained as,

    ()

    ()=

    6

    2+0.828.63 (39)

    The poles of the linearized system around = 1.8 rad are given by the roots of 2 + 0.8 28.63 = 0 as,

    = {. , . }. There is a pole in the right half plane at = . therefore the system is unstable. Therefore,

    for this equilibrium point, the stability does not change with the addition of the damping term. The slowest pole is

    4.97 and the corresponding time constant is 1

    4.97= 0.2 seconds, which is the same as when the analysis was done

    without the damping term. Therefore, at this equilibrium point, the speed of the response does not change with

    the addition of the damping term.

    For the equilibrium point = . , the linearized equivalent is,

    + 0.8 + 28.63 = 6 (40)

    This is in the form, + 0.8 + 28.63 = 6 (41)

    Just as before, taking Laplace transform and rearranging yields the transfer function as,

    ()

    ()=

    6

    2+0.8+28.63 (42)

    The poles of the linearized system around = 1.8 rad are given by the roots of 2 + 0.8 + 28.63 = 0 as,

    = {. . }. There are two poles which are a conjugate pair. Both poles are in the left half plane and

    hence this equilibrium point is stable. An oscillatory response is expected because the imaginary part is much larger

    than the real part. The time constant associated with the response is 1

    0.4= 2.5 seconds, and the Period of the

    oscillation is =2

    5.34= 1.2 seconds which is the same as what was obtained without damping. Thus, for this

    equilibrium point, the inclusion of damping term, makes a significant change. The oscillations reduce as time goes

    to infinity thereby making the SLM stabilize. The following figures show the results obtained when the unforced

    (Torque = 0) response linearized systems for both equilibrium points were simulated with the same initial conditions

    as without the damping term.

    Figure 16: Unforced response with damping (nonlinear) Figure 17: Damped response around = 1.8 rad

    Figure 18: Damped response around = 1.8 rad

    0 1 2 3 4 5 6 7-10

    -5

    0

    5

    10

    t (s)

    q(rad)

    q

    dq

    0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6-300

    -250

    -200

    -150

    -100

    -50

    0

    50

    t (s)

    q(rad)

    0 5 10 15-1.6

    -1.59

    -1.58

    -1.57

    -1.56

    -1.55

    -1.54

    -1.53

    t (s)

    q (rad)

  • 9

    From the response in figure 16, it is observed that the unforced SLM oscillates just like before but this time the

    angle of oscillation reduces (is damped) as time tends to infinity. Figure 17 gives the response of the SLM when

    linearized around = 1.8. We can confirm that the system is unstable as suggested by the pole analysis done

    previously because the SLM diverges from the equilibrium point. The time constant is still 0.2 seconds so that the

    unstable mode grows by a factor of 3 in every 0.2 of a second. This is evident between time = 1.6 s and = 1.8 s

    as the system goes from -100 to -300 rad. Figure 18 gives the response when linearized around = 1.8. As

    suggested in the pole analysis, the system is stable. The oscillations dampen out as time goes to infinity until the

    pendulum stabilizes somewhere around 15 seconds approximately. The response can be said to be underdamped

    as the damping factor is very low.

    Why Speed damping term is Representative of a DC Motor

    The DC motor can simply be represented by a speed damping term because by incorporating the DC motor

    dynamics with the mechanical dynamics of the SLM, the equation of motion which relates the voltage to the link

    angle is derived as a second order system with a damping term. The simplified electrical motor dynamics is given

    as, = + (43)

    = (44)

    The Gear box is given as, = (45)

    And, = (46)

    The motor Inertia is, 2 =

    22 (47)

    And SLM dynamics is, ( + 2) + () = (48)

    From equation (43), = (49)

    Multiplying both sides of (49) by gives,

    = ( ) (50)

    Putting = (45) in (50) yields,

    = 2 (51)

    Substituting = (44) in (51) above yields,

    = 2 (52)

    Now using the link plus motor mechanical relationship as,

    ( + 2 +

    2) + () = (53)

    Substituting = (46) in (53) yields,

    ( + 2 +

    2) + () = (54)

    Multiplying both sides of (54) by , we obtain,

    ( + 2 +

    2) + () = (55)

    Putting (52) in (55) and rearranging terms yields,

    ( + 2 +

    2) + 2 + () = (56)

    Making subject of formula yields,

    +2

    (+2+2) +

    ()

    (+2+2)=

    (+2+2)

    (57)

    While the values of the mass-inertia, gravity and gain terms are modified, they are not qualitatively changed

    Assuming the DC motor inertia = 0, equation (57) becomes,

    +

    (+) +

    ()

    (+)=

    (+)

    (58)

    For our SLM under consideration, the 0.8 represents

    (+).

    PID with damping introduced

    With the damping term introduced, the new closed loop transfer function for the system with the PID controller is,

    () =( + /)

    3 + (0.8 + )2 + (() + ) + (59)

    The denominator is thus, + (. + ) + ([. , . ] + ) + (60)

    For the design point = . , the closed loop poles are the roots of,

    + (. + ) + (. + ) + = (61)

    To place the poles at the same locations as in section 2, we map coefficients between equations (29) and (61) to

    obtain the PID gains as = . , = . , = . . The gains are basically the same as when there was

    no damping term with only a difference of about 0.1 in the derivative gain. Also, from equation (60), it is observed

  • 10

    that the system will always be stable as long as 28.63 + 6 > 0. The damping term does not affect the

    parameter variation.

    For = 1.8, () = 28.63. Using equation (60) and the computed PID gains, we obtain,

    3 + 43.22 + 564.23 + 2392 = 0 (62)

    which has poles at, {. , . . }

    This has all poles in the left half plane and is therefore stable. It has 2 poles as a conjugate pair however, the

    oscillation will be mild and less visible because the real part is higher than the imaginary part of the pole. The

    dominant (slowest) pole, = . . yields a time constant of 1

    9.82= 0.1 seconds which has a

    corresponding settling time of 0.4 seconds, which is approximately equal to the desired 0.5 seconds. In addition,

    this result is similar to the case where the damping term was not included. An important point is that the imaginary

    part is reduced (from 2.99 to 2.26) which implies reduced oscillations.

    For = 1.8, () = 28.63 so the resulting closed loop denominator is,

    3 + 43.22 + 621.49 + 2392 = 0 (63)

    which has poles at, {. , . . }

    Again, all the poles are in the left half plane therefore the SLM is stable at this point. There are also 2 poles which

    are a pair of conjugates (18.59 7.22), but just as in the previous case, the oscillations are less obvious because

    the real part of the pole is greater than the imaginary part. The dominant pole = . yields a time constant

    of 1

    6.01= 0.17 seconds, which corresponds to a settling time of about 0.7 seconds.

    The PID controller was then applied to the non-linear plant with the damping term included and the following

    response was obtained.

    Figure 19: Response of Nonlinear plant with damping term using PID

    As observed from figure 19, the response is almost identical to the previous case where the damping term was not

    used in the non-linear system. This is because the damping factor is very small (0.8) so the damping effect is not

    felt. The settling time is about 0.6 seconds which is roughly equal to the required 0.5seconds.

    0 0.5 1 1.5 2 2.5 3 3.5 4-4

    -2

    0

    2

    4

    t (s)

    (rad)

    r

    q

    e