Makteo3 Otocon Position Prelab
Makteo3 Otocon Position Prelab
-Deriving the dynamics equation and transfer function for the SRV02 servo plant using the
first-principles.
- Design of a proportional-velocity (PV) controller for position control of the servo load shaft
to meet certain time-domain requirements.
Modeling
The objective of this experiment is to find a transfer function that describes the rotary motion
of the SRV02 load shaft. The dynamic model is derived analytically from classical mechanics
principles and using experimental methods.
Topics Covered
    •   Deriving the dynamics equation and transfer function for the SRV02 servo plant using
        the first-principles.
    •   Obtaining the SRV02 transfer function using a frequency response experiment.
    •   Obtaining the SRV02 transfer function using a bump test.
    •   Tuning the obtained transfer function and validating it with the actual system response.
Prerequisites
In order to successfully carry out this laboratory, the user should be familiar with the
following:
    •   Data acquisition device (e.g. Q2-USB), the power amplifier (e.g. VoltPAQ-X1), and the
        main components of the SRV02 (e.g. actuator, sensors), as described in References [2],
        [4], and [6], respectively.
    •   Wiring and operating procedure of the SRV02 plant with the amplifier and data-aquisition
        (DAQ) device, as discussed in Reference [6].
    •   Transfer function fundamentals, e.g. obtaining a transfer function from a differential
        equation.
• Laboratory described in Appendix A to get familiar with using QUARCrwith the SRV02.
1.1 Background
The angular speed of the SRV02 load shaft with respect to the input motor voltage can be
described by the following first-order transfer function
                                                                                             (1.1.1)
where Ωl(s) is the Laplace transform of the load shaft speed ωl(t), Vm(s) is the Laplace
transform of motor input voltage vm(t), K is the steady-state gain, τ is the time constant, and s
is the Laplace operator.
The SRV02 transfer function model is derived analytically in Section 1.1.1 and its K and τ
parameters are evaluated. These are known as the nominal model parameter values. The
model parameters can also be found experimentally. Sections 1.1.2.1 and 1.1.2.2 describe
how to use the frequency response and bump-test methods to find K and τ. These methods are
useful when the dynamics of a system are not known, for example in a more complex system.
After the lab experiments, the experimental model parameters are compared with the nominal
values.
The DC motor armature circuit schematic and gear train is illustrated in Figure 1.1. As
specified in [6], recall that Rm is the motor resistance, Lm is the inductance, and km is the back-
emf constant.
                 Figure 1.1: SRV02 DC motor armature circuit and gear train
The back-emf (electromotive) voltage eb(t) depends on the speed of the motor shaft, ωm, and
the back-emf constant of the motor, km. It opposes the current flow. The back emf voltage is
given by:
                                                                                          (1.1.3)
Since the motor inductance Lm is much less than its resistance, it can be ignored. Then, the
equation becomes
(1.1.5)
In this section the equation of motion describing the speed of the load shaft, ωl, with respect
to the applied motor torque, τm, is developed.
Since the SRV02 is a one degree-of-freedom rotary system, Newton's Second Law of Motion
can be written as:
J·α=τ (1.1.6)
where J is the moment of inertia of the body (about its center of mass), α is the angular
acceleration of the system, and τ is the sum of the torques being applied to the body. As
illustrated in Figure 1.1, the SRV02 gear train along with the viscous friction acting on the
motor shaft, Bm, and the load shaft Bl are considered. The load equation of motion is
                                                                                            (1.1.7)
where Jl is the moment of inertia of the load and τl is the total torque applied on the load. The
load inertia includes the inertia from the gear train and from any external loads attached, e.g.
disc or bar. The motor shaft equation is expressed as:
                                                                                            (1.1.8)
where Jm is the motor shaft moment of inertia and τml is the resulting torque acting on the
motor shaft from the load torque. The torque at the load shaft from an applied motor torque
can be written as:
where Kg is the gear ratio and ηg is the gearbox efficiency. The planetary gearbox that is
directly mounted on the
SRV02 motor (see [6] for more details) is represented by the N1 and N2 gears in Figure 1.1
and has a gear ratio of
(1.1.10)
This is the internal gear box ratio. The motor gear N3 and the load gear N4 are directly meshed
together and are visible from the outside. These gears comprise the external gear box which
has an associated gear ratio of
                                                                                          (1.1.11)
The gear ratio of the SRV02 gear train is then given by:
                                           Kg = KgeKgi                                     (1.1.12)
Thus, the torque seen at the motor shaft through the gears can be expressed as:
                                                                                          (1.1.13)
Intuitively, the motor shaft must rotate Kg times for the output shaft to rotate one
revolution.
                                         θm(t) = Kgθl(t)                             (1.1.14)
We can find the relationship between the angular speed of the motor shaft, ωm, and the
angular speed of the load shaft, ωl by taking the time derivative:
                                               ωm(t) = Kgωl(t)                        (1.1.15)
To find the differential equation that describes the motion of the load shaft with respect to an
applied motor torque substitute (1.1.13), (1.1.15) and (1.1.7) into (1.1.8) to get the following:
                                                                                         (1.1.16)
Collecting the coefficients in terms of the load shaft velocity and acceleration gives
(1.1.17)
(1.1.20)
In this section the electrical equation derived in Section 1.1.1.1 and the mechanical equation
found in Section 1.1.1.2 are brought together to get an expression that represents the load
shaft speed in terms of the applied motor voltage. The motor torque is proportional to the
voltage applied and is described as
where kt is the current-torque constant (N.m/A), ηm is the motor efficiency, and Im is the
armature current. See [6] for more details on the SRV02 motor specifications.
We can express the motor torque with respect to the input voltage Vm(t) and load shaft speed
ωl(t) by substituting the motor armature current given by equation 1.1.5 in Section 1.1.1.1,
into the current-torque relationship given in equation 1.1.21:
                                                                                         (1.1.22)
To express this in terms of Vm and ωl, insert the motor-load shaft speed equation 1.1.15, into
1.1.21 to get:
(1.1.23)
(1.1.24)
                                                                                         (1.1.25)
This equation can be re-written as:
                                                                                         (1.1.26)
where the equivalent damping term is given by:
                                                                                         (1.1.27)
and the actuator gain equals
(1.1.28)
In Section 1.1.1 you learned how the system model can be derived from the first-principles. A
linear model of a system can also be determined purely experimentally. The main idea is to
experimentally observe how a system reacts to different inputs and change structure and
parameters of a model until a reasonable fit is obtained. The inputs can be chosen in many
different ways and there are a large variety of methods. In Sections 1.1.2.1 and 1.1.2.2, two
methods of modeling the SRV02 are outlined: (1) frequency response and, (2) bump test.
In Figure 1.2, the response of a typical first-order time-invariant system to a sine wave input is
shown. As it can be seen from the figure, the input signal (u) is a sine wave with a fixed
amplitude and frequency. The resulting output (y) is also a sinusoid with the same frequency
but with a different amplitude. By varying the frequency of the input sine wave and observing
the resulting outputs, a Bode plot of the system can be obtained as shown in Figure 1.3.
The magnitude of the frequency response of the SRV02 plant transfer function given in
equation 1.1.1 is defined as:
(1.1.29)
where ω is the frequency of the motor input voltage signal Vm. We know that the transfer
function of the system has the generic first-order system form given in Equation 1.1.1. By
substituting s = j w in this equation, we can find the frequency response of the system as:
                                                                                         (1.1.30)
Then, the magnitude of it equals
(1.1.31)
Let's call the frequency response model parameters Ke,f and τe,f to differentiate them from the
nominal model parameters, K and τ, used previously. The steady-state gain or the DC gain
(i.e. gain at zero frequency) of the model is:
                                               Ke,f = |Gwl,v(0)|                     (1.1.32)
The bump test is a simple test based on the step response of a stable system. A step input is
given to the system and its response is recorded. As an example, consider a system given by
the following transfer function:
(1.1.33)
The step response shown in Figure 1.4 is generated using this transfer function with K = 5
rad/V.s and τ = 0.05 s.
The step input begins at time t0. The input signal has a minimum value of umin and a
maximum value of umax. The resulting output signal is initially at y0. Once the step is applied,
the output tries to follow it and eventually settles at its steady-state value yss. From the output
and input signals, the steady-state gain is
(1.1.34)
Figure 1.4: Input and output signal used in the bump test method
where ∆y = yss −y0 and ∆u = umax −umin. In order to find the model time constant, τ, we can
first calculate where the output is supposed to be at the time constant from:
Then, we can read the time t1 that corresponds to y(t1) from the response data in Figure 1.4.
From the figure we can see that the time t1 is equal to:
                                                   t1 = t0 + τ                              (1.1.36)
                                                                                            (1.1.38)
where Av is the amplitude of the step and t0 is the step time (i.e. the delay). If we substitute this
input into the system transfer function given in Equation (1.1.1), we get:
(1.1.39)
We can then find the SRV02 load speed step response, wl(t), by taking inverse Laplace of this
equation. Here we need to be careful with the time delay t0 and note that the initial condition
is ωl(0−) = ωl(t0).
(1.1.40)
Before you start the lab experiments given in Section 1.3, you should study the background
materials provided in Section 1.1 and work through the questions in this Section.
  1. In Section 1.1.1.3 we obtained an equation (1.1.26) that described the dynamic behavior
     of the load shaft speed as a function of the motor input voltage. Starting from this
     equation, find the transfer function      .
Answer 1.2.1
           Outcome     Solution
              A-1 Taking the Laplace transform of the equations and assuming ωl(0−) = 0
                    gives
                                                                                  (Ans.1.2.2)
  2. Express the steady-state gain (K) and the time constant (τ) of the process model
     (Equation (1.1.1)) in terms of the Jeq, Beq,v, and Am parameters.
          Answer 1.2.2
         Outcome     Solution
           A-1      We need to match the coefficients of the transfer function found in
                     (Ans.1.2.2) to the coefficients of the transfer function
                     in equation 1.1.1.
           A-2      The time constant parameter is
                                                                              (Ans.1.2.3)
                     and the steady-state gain is
                                                                              (Ans.1.2.4)
3. Calculate the Beq,v and Am model parameters using the system specifications given in [6].
   The parameters are to be calculated based on an SRV02-ET in the high-gear
   configuration.
Answer 1.2.3
         Outcome     Solution
           A-2 The Beq,v viscous damping expression is given in Equation
                  1.1.27. All the parameters are defined in Reference [6]
                  including the experimentally determined equivalent
                  viscous damping parameter Beq = 0.015N ms/rad (in
                  the high-gear configuration). Substituting all the
                  specifications into 1.1.27 gives
4. Calculate the moment of inertia about the motor shaft. Note that Jm = Jtach + Jm,rotor where
   Jtach and Jm,rotor are the moment of inertia of the tachometer and the rotor of the SRV02
   DC motor, respectively. Use the specifications given in [6].
Answer 1.2.4
         Outcome     Solution
           A-2     The moment of inertia about the motor shaft equals
Answer 1.2.5
         Outcome      Solution
            A-2 The formula to calculate the moment of inertia of a disc is
                                                                                     (Ans.1.2.9)
                      where m is the mass and r is the radius. Assuming the
                      gears are discs and using the parameters given in
                      Reference [6], the moment of inertia of the 24-tooth,
                      72-tooth, and 120-tooth gears are
                                      J24 = 1.01 × 10−7 kg m2             (Ans.1.2.10)
                                      J72 = 5.44 × 10−6 kg m2                   (Ans.1.2.11)
                      and
                                     J120 = 4.18 × 10−5 kg m2                   (Ans.1.2.12)
                      which equals
                                      Jg = 5.52 × 10−5 kg m2                    (Ans.1.2.14)
6. Assuming the disc load is attached to the load shaft, calculate the inertia of the disc load,
   Jext,l, and the total load moment of inertia, Jl.
        Answer 1.2.6
         Outcome      Solution
            A-2      Using the formula in Ans.1.2.9 with the mb and rb disc
                     load parameters found in Reference [6], the external
                     load moment of inertia equals
        Outcome     Solution
           A-2 Using Equation 1.1.18 with the gear train and motor
                   specifications listed in Reference [6] and the load
                   inertia found in 1.2.6, the equivalent moment of
                   inertia acting on the SRV02 motor shaft is
8. Calculate the steady-state model gain K and time constant τ. These are the nominal
   model parameters and will be used to compare with parameters that are later found
   experimentally.
Answer 1.2.8
        Outcome     Solution
           A-2 Using equations Ans.1.2.3 and Ans.1.2.4 with the Beq,v,
                   Am, and Jeq parameters found in equations Ans.1.2.5,
                   Ans.1.2.6, and Ans.1.2.17, the steady-state gain is
τ = 0.0253 s (Ans.1.2.19)
9. Referring to Section 1.1.2.1, find the expression representing the time constant τ of the
   frequency response model given in Equation 1.1.31. Begin by evaluating the magnitude
   of the transfer function at the cutoff frequency ωc.
Answer 1.2.9
        Outcome     Solution
           A-1      By definition, the DC gain drops 3 dB (or     ) at this
                    frequency. Therefore,
(Ans.1.2.20)
                                                                              (Ans.1.2.21)
                    We can then solve for the time constant as:
                                                                              (Ans.1.2.22)
10. Referring to Section 1.1.2.2, find the steady-state gain of the step response and
compare it with Equation 1.1.34. Hint: The the steady-state value of the load shaft speed
can be defined as ωl,ss = lim t→∞ ωl(t).
          Answer 1.2.10
            Outcome     Solution
               A-2 Using the definition of the steady-state value of the load shaft
(Ans.1.2.25)
            Outcome     Solution
               A-2    Substituting t = t0 + τ in equation 1.1.40 gives the load shaft rate
The objective of this laboratory is to develop feedback systems that control the position of the
rotary servo load shaft. Using the proportional-integral-derivative (PID) family, controllers
are designed to meet a set of specifications.
Topics Covered
   •   Design of a proportional-velocity (PV) controller for position control of the servo load
       shaft to meet certain time-domain requirements.
   •   Actuator saturation.
   •   Design of a proportional-velocity-integral (PIV) controller to track a ramp reference
       signal.
   •   Simulation of the PV and PIV controllers using the developed model of the plant to ensure
       the specifications are met without any actuator saturation.
   •   Implementation of the controllers on the Quanser SRV02 device to evaluate their
       performance.
Prerequisites
In order to successfully carry out this laboratory, the user should be familiar with the
following:
   •   Data acquisition device (e.g. Q2-USB), the power amplifier (e.g. VoltPAQ-X1), and the
       main components of the SRV02 (e.g. actuator, sensors), as described in References [2],
       [4], and [6], respectively.
   •   Wiring and operating procedure of the SRV02 plant with the amplifier and data-aquisition
       (DAQ) device, as discussed in Reference [6].
   •   Transfer function fundamentals, e.g. obtaining a transfer function from a differential
       equation.
• Laboratory described in Appendix A to get familiar with using QUARCrwith the SRV02.
2.1 Background
The block diagram shown in Figure 2.1 is a general unity feedback system with compensator
(controller) C(s) and a transfer function representing the plant, P(s). The measured output,
Y(s), is supposed to track the reference signal R(s) and the tracking has to match to certain
desired specifications.
                               Figure 2.1: Unity feedback system.
(2.1.2)
As you can see from this equation, the plant is a second order system. In fact, when a second
order system is placed in series with a proportional compensator in the feedback loop as in
Figure 2.1, the resulting closed-loop transfer function can be expressed as:
                                                                                            (2.1.4)
where ωn is the natural frequency and ζ is the damping ratio. This is called the standard
second-order transfer function. Its response proporeties depend on the values of ωn and ζ.
Consider a second-order system as shown in Equation 2.1.4 subjected to a step input given by
(2.1.5)
with a step amplitude of R0 = 1.5. The system response to this input is shown in Figure 2.2,
where the red trace is the response (output), y(t), and the blue trace is the step input r(t). The
maximum value of the response is denoted by the variable ymax and it occurs at a time tmax.
For a response similar to Figure 2.2, the percent overshoot is found using
                                                                                            (2.1.6)
                        Figure 2.2: Standard second-order step response.
From the initial step time, t0, the time it takes for the response to reach its maximum value is
tp = tmax − t0 (2.1.7)
In a second-order system, the amount of overshoot depends solely on the damping ratio
parameter and it can be calculated using the equation
                                                                                             (2.1.8)
The peak time depends on both the damping ratio and natural frequency of the system and it
can be derived as:
                                                                                        (2.1.9)
Generally speaking, the damping ratio affects the shape of the response while the natural
frequency affects the speed of the response.
Steady-state error is illustrated in the ramp response given in Figure 2.3 and is denoted by the
variable ess. It is the difference between the reference input and output signals after the system
response has settled. Thus, for a time t when the system is in steady-state, the steady-state
error equals
where rss(t) is the value of the steady-state input and yss(t) is the steady-state value of the
output.
We can find the error transfer function E(s) in Figure 2.1 in terms of the reference R(s), the
plant P(s), and the compensator C(s). The Laplace transform of the error is
Solving for Y (s) from equation 2.1.3 and substituting it in equation 2.1.11 yields
(2.1.12)
We can find the the steady-state error of this system using the final-value theorem:
In this equation, we need to substitute the transfer function for E(s) from 2.1.12. The E(s)
transfer function requires, R(s), C(s) and P(s). For simplicity, let C(s)=1 as a compensator.
The P(s) and R(s) were given by equations 2.1.3 and 2.1.5, respectively. Then, the error
becomes:
                                                                                         (2.1.14)
Applying the final-value theorem gives
                                                                                         (2.1.15)
When evaluated, the resulting steady-state error due to a step response is
                                              ess = 0                                   (2.1.16)
Based on this zero steady-state error for a step input, we can conclude that the SRV02 is a
Type 1 system.
2.1.1.3 SRV02 Position Control Specifications
The desired time-domain specifications for controlling the position of the SRV02 load shaft
are:
and
                                                 PO = 5.0 %                                 (2.1.19)
Thus, when tracking the load shaft reference, the transient response should have a peak time
less than or equal to 0.20 seconds, an overshoot less than or equal to 5 %, and the steady-state
response should have no error.
The proportional-velocity (PV) compensator to control the position of the SRV02 has the
following structure
                                                                                            (2.1.20)
where kp is the proportional control gain, kv is the velocity control gain, θd(t) is the setpoint or
reference load shaft angle, θl(t) is the measured load shaft angle, and Vm(t) is the SRV02
motor input voltage. The block diagram of the PV control is given in Figure 2.4. We need to
find the closed-loop transfer function Θl(s)/Θd(s) for the closed-loop
position control of the SRV02. Taking the Laplace transform of equation 2.1.20 gives
From the Plant block in Figure 2.4 and equation 2.1.3, we can write
                                                                                           (2.1.22)
Substituting equation 2.1.21 into 2.1.22 and solving for Θl(s)/Θd(s) gives the SRV02 position
closed-loop transfer function as:
(2.1.23)
From our previous steady-state analysis, we found that the closed-loop SRV02 system is a
Type 1 system. In this section, we will investigate the steady-state error due to a ramp input
when using PV controller.
                                                                                           (2.1.25)
we can find the error transfer function by substituting the SRV02 closed-loop transfer
function in equation 2.1.23 into the formula given in 2.1.11. Using the variables of the
SRV02, this formula can be rewritten as E(s) = Θd(s)−Θl(s). After rearranging the terms we
find:
                                                                                        (2.1.26)
Substituting the input ramp transfer function 2.1.25 into the Θd(s) variable gives
(2.1.27)
Adding an integral control can help eliminate any steady-state error. We will add an integral
signal (middle branch in Figure 2.6) to have a proportional-integral-velocity (PIV) algorithm
to control the position of the SRV02. The motor voltage will be generated by the PIV
according to:
(2.1.28)
where ki is the integral gain. We need to find the closed-loop transfer function Θl(s)/Θd(s) for
the closed-loop position control of the SRV02. Taking the Laplace transform of equation
2.1.28 gives
(2.1.29)
From the Plant block in Figure 2.6 and equation 2.1.3, we can write
(2.1.30)
Substituting equation 2.1.29 into 2.1.30 and solving for Θl(s)/Θd(s) gives the SRV02 position
closed-loop transfer function                                               as:
                                                                            (2.1.31)
                  Figure 2.6: Block diagram of PIV SRV02 position control.
To find the steady-state error of the SRV02 for a ramp input under the control of the PIV
substitute the closed-loop transfer function from equation 2.1.31 into equation 2.1.11
(2.1.32)
Then, substituting the reference ramp transfer function 2.1.25 into the Θd(s) variable gives
(2.1.33)
It takes a certain amount of time for the output response to track the ramp reference with zero
steady-state error. This is called the settling time and it is determined by the value used for the
integral gain.
In steady-state, the ramp response error is constant. Therefore, to design an integral gain the
velocity compensation (the V signal) can be neglected. Thus, we have a PI controller left as:
                                                                                           (2.1.35)
where the variable ti is the integration time.
Before you start the lab experiments given in Section 2.3, you should study the background
materials provided in Section 2.1 and work through the questions in this Section.
  1. Calculate the maximum overshoot of the response (in radians) given a step setpoint of 45
     degrees and the overshoot specification given in Section 2.1.1.3.
     Hint: By substituting ymax = θ(tp) and step setpoint R0 = θd(t) into equation 2.1.6, we can
    obtain θ(tp) =              . Recall that the desired response specifications include 5%
    overshoot.
          Answer 2.2.1
        Outcome     Solution
            A-2 Substituting a step reference of θd(t) = 0.785 rad and PO =
                     5 % into this equation gives the maximum overshoot
                     as θ(tp) = 0.823 rad.
2. The SRV02 closed-loop transfer function was derived in equation 2.1.23 in Section
   2.1.2.1. Find the control gains kp and kv in terms of ωn and ζ. Hint: Remember the
   standard second order system equation.
       Answer 2.2.2
        Outcome     Solution
           A-1 The characteristic equation of the SRV02 closed-loop
                  transfer function in 2.1.7 is
                                         τ s2 + (1 + K kv)s + K kp            (Ans.2.2.1)
                    and can be re-structured into the form
                                                                              (Ans.2.2.2)
                    Equating this with the standard second order system
                    equation gives the expressions
                                                                              (Ans.2.2.3)
                    and
                                                                (Ans.2.2.4)
                                                                              (Ans.2.2.5)
                    and the velocity gain is
                                                                              (Ans.2.2.6)
3. Calculate the minimum damping ratio and natural frequency required to meet the
   specifications given in Section 2.1.1.3.
Answer 2.2.3
      Outcome
        A-2 Substitute the percent overshoot specifications given in
               2.1.19 into Equation 2.1.8 to get the required damping
               ratio
ζ = 0.690 (Ans.2.2.7)
4. Based on the nominal SRV02 model parameters, K and τ, found in Laboratory 1: SRV02
   Modeling, calculate the control gains needed to satisfy the time-domain response
   requirements given in Section 2.1.1.3.
Answer 2.2.4
        Outcome     Solution
           A-2     Using the model parameters
                                         K = 1.53 rad/(V s)                 (Ans.2.2.9)
and
                                               τ = 0.0254 s                (Ans.2.2.10)
                    as well as the desired natural frequency found in
                    Ans.2.2.8 with Equation Ans.2.2.5, generates the
                    proportional control gain
Answer 2.2.5
        Outcome
           A-1 The maximum proportional gain leads to providing the
                  maximum voltage to the motor. Therefore, the PV
                  control in 3.1.15 becomes
                                                                           (Ans.2.2.13)
           A-2 after substituting the maximum SRV02 input voltage 2.1.24
                   for Vm(t), the reference step of π/4, and kv = 0 (to ignore
                   the velocity control). Thus, the maximum proportional
                   gain before saturating the SRV02 motor is
(Ans.2.2.14)
Answer 2.2.6
        Outcome     Solution
           A-1      Applying the final-value theorem to the error transfer
                    function yields the expression
(Ans.2.2.15)
                                                                          (Ans.2.2.16)
                    The steady-state error is a constant, which is as expected
                    since the closed-loop SRV02 position system is Type 1.
                    Evaluating the expression with the reference slope of
                    3.36 rad/s, the model gain parameter K = 1.53, the
                    proportional and velocity gains kp = 7.82 and kv = 0.157,
                    gives the steady-state error
7. What should be the integral gain ki so that when the SRV02 is supplied with the maximum
   voltage of Vmax = 10V it can eliminate the steady-state error calculated in question 6 in 1
   second? Hint: Start from equation 2.1.35 and use ti = 1, Vm(t) = 10, the kp you found in
   question 4 and ess found in question 6. Remember that ess is constant.
Answer 2.2.7
 Outcome
           A-2 Since ess is constant, evaluating the integral in Equation 2.1.35 yields
                                                                           (Ans.2.2.19)
              By substituting ti = 1.0sec, the maximum SRV02 voltage Vm(t) = 10V , kp = 7.82
              and the PV control steady-state error ess = 0.214 we find
The main goal of this laboratory is to explore position control of the SRV02 load shaft using
PV and PIV controllers.
You will need to design the third experiment yourself. In each experiment, you will first
simulate the closed-loop response of the system. Then, you will implement the controller
using the SRV02 hardware and software to compare the real response to the simulated one.
2.3.1.1 Simulation
First, you will simulate the closed-loop response of the SRV02 with a PV controller to step
input. Our goals are to confirm that the desired reponse specifications in an ideal situation are
satisfied and to verify that the motor is not saturated. Then, you will explore the effect of
using a high-pass filter, instead of a direct derivative, to create the velocity signal V in the
controller.
Experimental Setup
The s_srv02_pos Simulinkrdiagram shown in Figure 2.7 will be used to simulate the closed-
loop position control response with the PV and PIV controllers. The SRV02 Model uses a
Transfer Fcn block from the Simulinkrlibrary. The PIV Control subsystem contains the PIV
controller detailed in Section 2.1.3. When the integral gain is set to zero, it essentially
becomes a PV controller.
     Figure 2.7: Simulink model used to simulate the SRV02 closed-loop position response.
IMPORTANT: Before you can conduct these experiments, you need to make sure that the
lab files are configured according to your SRV02 setup. If they have not been configured
already, then you need to go to Section 2.4.2 to configure the lab files first.
3.   In the Simulinkrdiagram, set the Amplitude (rad) gain block to π/8(rad) to generate a step
     with an amplitude of 45 degrees (i.e., square wave goes between ±π/8 which results in a step
     amplitude of π/4) .
4.   Inside the PIV Control subsystem, set the Manual Switch to the upward position so the
     Derivative block is used.
5.   Open the load shaft position scope, theta_l (rad), and the motor input voltage scope, Vm (V).
6.   Start the simulation. By default, the simulation runs for 5 seconds. The scopes should be
     displaying responses similar to figures 2.8 and 2.9 Note that in the theta_l (rad) scope, the
     yellow trace is the setpoint position while the purple trace is the simulated position
     (generated by the SRV02 Model block). This simulation is called the Ideal PV response as it
     uses the PV compensator with the derivative block.
                Figure 2.8: Ideal PV position           Figure 2.9: Ideal PV motor
                response.                               input voltage.
                     r
7. Generate a Matlab figure showing the Ideal PV position response and the ideal input voltage.
   After each simulation run, each scope automatically saves their response to a variable in the
   Matlabrworkspace. That is, the theta_l (rad) scope saves its response to the variable called
   data_pos and the Vm (V) scope saves its data to the data_vm variable. The data_pos variable
   has the following structure: data_pos(:,1) is the time vector, data_pos(:,2) is the setpoint,
   and data_pos(:,3) is the simulated angle. For the data_vm variable, data_vm(:,1) is the time
   and data_vm(:,2) is the simulated input voltage.
       Answer 2.3.1
          Outcome Solution
          K-3 The closed-loop position response with the straight
                 derivative, i.e. the ideal response, is shown in Figure
                 2.10. This is generated using the sample_meas_tp_os.m
                 script. To use this script, do the following:
                    (a)   Execute the setup_srv02_exp02_pos.m script with
                          CONTROL_TYPE = 'AUTO_PV'.
                    (b)Run the s_srv02_pos Simulinkrmodel.
                   (c) Run the sample_meas_tp_os.m script.
  8.Measure the steady-state error, the percent overshoot and the peak time of the simulated
response.
  Does the response satisfy the specifications given in Section 2.1.1.3? Hint: Use the
  Matlabrginput command to take measurements off the figure.
                     Figure 2.10: Ideal closed-loop PV position response.
Answer 2.3.2
           Outcome Solution
            K-1 Directly from the response shown in Figure 2.10, it is clear
                    that the steady-state error is zero, thus
ess = 0 (Ans.2.3.1)
Using Equation 2.1.7, the peak time of the response in Figure 2.10 is
tp = 0.20 s (Ans.2.3.2)
PO = 5.0 % (Ans.2.3.3)
10.   Start the simulation. The response in the scopes should still be similar to figures 2.8 and
      2.9. This simulation is called the Filtered PV response as it uses the PV controller with the
      high-pass filter block.
11.   Generate a Matlabrfigure showing the Filtered PV position and input voltage responses.
          Answer 2.3.3
            Outcome Solution
             K-3    The Filtered PV step response is illustrated in Figure
                    2.11. This is generated by executing the
                    sample_meas_tp_os.m script after running the
                    s_srv02_pos simulation.
Answer 2.3.4
            Outcome Solution
             K-1 As with the ideal response, the steady-state error of the
                    filtered response in Figure 2.11 is
                                                     ess = 0                     (Ans.2.3.4)
                       and the peak time is
                                                   tp = 0.20 s                  (Ans.2.3.5)
                      Thus, the PV Filtered response satisfies the error and
                      peak time specifications given in Section 2.1.1.3.
                      The percent overshoot of the response shown in Figure
                      2.11 is
PO = 5.76 % (Ans.2.3.6)
In this experiment, we will control the angular position of the SRV02 load shaft, i.e. the disc
load, using the PV controller. Measurements will then be taken to ensure that the
specifications are satisfied.
Experimental Setup
The q_srv02_pos Simulinkrdiagram shown in Figure 2.12 is used to implement the position
control experiments. The SRV02-ET subsystem contains QUARC blocks that interface with
the DC motor and sensors of the SRV02 system, as discussed in Section A. The PIV Control
subsystem implements the PIV controller detailed in Section 2.1.3, except a high-pass filter is
used to obtain the velocity signal (as opposed to taking the direct derivative).
 Figure 2.12: Simulink model used with QUARC to run the PV and PIV position controllers
                                     on the SRV02.
IMPORTANT: Before you can conduct these experiments, you need to make sure that the
lab files are configured according to your SRV02 setup. If they have not been configured
already, then you need to go to Section 2.4.3 to configure the lab files first.
  8.   When a suitable response is obtained, click on the Stop button in the Simulinkr diagram
       toolbar
       (or select QUARC | Stop from the menu) to stop running the code. Generate a
       Matlabrfigure showing the PV position response and its input voltage.
       As in the s_srv02_pos Simulink diagram, when the controller is stopped each scope
       automatically saves their response to a variable in the Matlabrworkspace. Thus the
       theta_l (rad) scope saves its response to the data_pos variable and the Vm (V) scope
       saves its data to the data_vm variable.
If the experimental procedure is followed correctly, the measured SRV02 closed-loop position
step response with the PV controller should be similar to Figure 2.15.
Answer 2.3.5
       To generate this response, execute the sample_meas_tp_os.m script with the saved
       MAT files data_step_rsp_theta.mat and data_step_rsp_Vm.mat. Alternatively, to
       generate a Matlabrfigure from a new experimental run do the following:
        (a)   Execute the setup_srv02_exp02_pos.m script with CONTROL_TYPE =
              'AUTO_PV'
        (b)   Run the q_srv02_pos Simulinkrmodel until a response fills the scopes.
        (c)   Stop QUARCr.
        (d)   Execute the sample_meas_tp_os.m script.
         Answer 2.3.6
            Outcome Solution
              K-1 The steady-state error measured in Figure 2.15 at 1.1
                     second after the peak time is
                                              ess = 0.0138 rad            (Ans.2.3.7)
                       Thus, there is an error of about 0.79 degrees.
                       The peak time and percent overshoot of the
                       response shown in Figure 2.15, using Equation
                       2.1.7
                       and Equation 2.1.6, are
                                                   tp = 0.147 s           (Ans.2.3.8)
and
                                                 PO = 4.88 %              (Ans.2.3.9)
             B-9 The actual measured SRV02 response does not
                      quite satisfy the specifications given in Section
                      2.1.1.3 because the steady-state error is not
                      zero. However, without saturating the servo
                      motor the peak time does not exceed 0.20
                      seconds and the percent overshoot is below or
                      equal to 5 %. Thus, the peak time and overshoot
                      specifications are satisfied. The system,
                      generally speaking, is more damped than
                      predicted which leads to a lower overshoot. The
                      constant steady-state error obtained along with
                      the lower overshoot is due to un-modeled
                      effects, notably friction. To find the steadystate
                      error, peak time and percent overshoot of a
                      response saved in data_pos automatically, run
                      the sample_meas_tp_os.m script after running
                      q_srv02_pos or using the responses saved in the
                      MAT files data_step_rsp_theta.mat and
                      data_step_rsp_Vm.mat.
 10. Click the Stop button on the Simulinkrdiagram toolbar (or select QUARC | Stop from the
     menu) to stop the experiment.
 11.   Turn off the power to the amplifier if no more experiments will be performed on the
       SRV02 in this session.
2.3.2 Ramp Response Using PV Controller
2.3.2.1 Simulation
In this simulation, the goal is to verify that the system with the PV controller can meet the
zero steady-state error specification without saturating the motor.
As in the Step Response experiment in Section 2.3.1, in this experiment you need to use the
s_srv02_pos Simulinkrdiagram shown in Figure 2.7 in Section 2.3.1.1 again.
1.   Enter the proportional and velocity control gains found in Pre-Lab question 4.
2.   Set the SRV02 Signal Generator parameters to the following to generate a triangular
     reference (which corresponds to a ramp input):
         •   Signal Type = triangle
         •   Amplitude = 1
         •   Frequency = 0.8 Hz
3.   Setting the frequency to 0.8 Hz will generate an increasing and decreasing ramp signal with
     the same slope used in the Pre-Lab question 6. The slope is calculated from the Triangular
     Waveform amplitude, Amp, and frequency, f, using the expression.
                                                    R0 = 4Ampf                          (2.3.36)
7. Start the simulation. The scopes should display responses similar to figures 2.16 and 2.17.
Answer 2.3.8
          Outcome Solution
            K-1   The error between the reference and the simulated
                  response after running for 1.1 second is
                                           ess = −0.213 rad                (Ans.2.3.10)
In this experiment, we will control the angular position of the SRV02 load shaft, i.e. the disc
load, using a PV controller. The goal is to examine how well the system can track a triangular
(ramp) position input. Measurements will then be taken to ensure that the specifications are
satisfied.
As in the Step Response experiment in Section 2.3.1, in this experiment you also need to use
the q_srv02_pos Simulinkrdiagram shown in Figure 2.12 to implement the position control
experiments.
9. Measure the steady-state error and compare it with the steady-state error calculated in Pre-
   Lab question 6.
Answer 2.3.10
           Outcome Solution
             K-1 The error between the reference and the measured
                    response taken at the 1.0 second mark is
                                                 ess = 0.189 rad             (Ans.2.3.11)
Design an experiment to see if the steady-state error can be eliminated when tracking a ramp
input. First simulate the response, then implement it using the SRV02 system.
  1. How can the PV controller be modified to eliminate the steady-state error in the ramp
     response? State your hypothesis and describe the anticipated cause-and-effect leading to
     the expected result. Hint: Look through Section 1.
         Answer 2.3.11
           Outcome     Solution
           B-1 Hypothesis: Adding an integral control will eliminate the
                    steady-state error. Because, the integrator will
                    accumulate the error over time causing the input
                    voltage to the motor to increase to make up for the
                    additional voltage needed to eliminate the steady-state
                    error.
       Answer 2.3.12
           Outcome     Solution
           B-2        Refering to the controller in Figure 2.6, the dependent
                      variable is Vm(s) and the independent variables are kp,
                      kv, ki, θd(s) and θl(s).
3. Your proposed control, like the PV compensator, are model-based controllers. This means
   that the control gains generated are based on mathematical representation of the system.
   Given this, list the assumptions you are making in this control design. State the reasons for
   your assumptions.
Answer 2.3.13
           Outcome     Solution
           B-3 We assume that the friction in the system is negligable
                  because it is a well-designed system. Also, noise in the
                     measured signals is neglected since its magnitude is very
                     small compared to the magnitude of the measured
                     signals.
4. Give a brief, general overview of the steps involved in your experimental procedure for two
   cases: (1) Simulation, and (2) Implementation.
Answer 2.3.14
        Outcome
             Solution B-4
             Simulation
          case:
                  (a) Enter the integral gain computed in Pre-Lab question
                          7 into Matlabr(Simulink diagram given in Figure 2.7).
                    (b) Start the simulation. The Ramp PIV response in the
                        scopes should be similar to figures 2.22 and 2.23.
                    Implementation case:
                    (a) Enter the integral gain computed in Pre-Lab question
                        7 into Matlabr(Simulink diagram given in Figure
                        2.12. Start the QUARC controller. The Ramp PIV
                        response in the scopes should be similar to figures
                        2.24 and 2.25.
        K-3 Simulation case: After setting the integral gain in Ans.2.3.3 in Matlabr, the
               PIV Ramp response will be as shown in Figure 2.26. This plot can be
               generated by:
                 (a)   Executing the   setup_srv02_exp02_pos.m
                           script with CON-
                       TROL_TYPE = 'AUTO_PV'
                 (b) Running the s_srv02_pos Simulink model.
                 (c) Running the sample_meas_ess.m script.
Answer 2.3.16
         Outcome     Solution
   K-1 Simulation case: The steady-state PIV error measured from the response in Figure
          2.26 is
          and the input voltage is always below 10.0 V. This value is reasonably close to
          0.00 rad. Therefore, the specification is satisfied. To measure the steady-state
          error saved in data_pos automatically, run the sample_meas_ess.m script after
          running s_srv02_pos.
   K-1 Implementation case: The steady-state PIV error measured from the response in
          Figure 2.27 at the 1.0 second mark is
Answer 2.3.17
            Outcome     Solution
           B-9 Both cases: Given that the servo motor is not saturated and
                    the obtained error is reasonably close to 0.00 rad, the
                    specification are satisfied in both cases.
8. Click the Stop button on the Simulinkrdiagram toolbar (or select QUARC | Stop from the
   menu) to stop the experiment.
9.   Turn off the power to the amplifier if no more experiments will be performed on the SRV02
     in this session.
2.3.4 Results
Fill out Table 2.2 below with your answers to the Pre-Lab questions and your results from the
lab experiments.
           Section /        Description                           Symbol Value        Unit
           Question
           Question 4       Pre-Lab: Model Parameters
                            Open-Loop Steady-State Gain           K         1.53      rad/(V.s)
                            Open-Loop Time Constant               τ         0.0254    s
           Question 4       Pre-Lab: PV Gain Design
                            Proportional gain                     kp        7.82      V/rad
                            Velocity gain                         kv        -0.157    V.s/rad
           Question 5       Pre-Lab: Control Gain Limits
                            Maximum proportional gain             kp,max    12.7      V/rad
           Question 6       Pre-Lab: Ramp Steady-State
                            Error
                            Steady-state error using PV           ess       0.214     rad
           Question 7       Pre-Lab: Integral Gain Design
                            Integral gain                         ki        38.9      V/(rad.s)
           2.3.1.1          Step Response Simulation
                            Peak time                             tp        0.20      s
                            Percent overshoot                     PO        5.0       %
                            Steady-state error                    ess       0.00      rad
           2.3.1.1          Filtered Step Response Using PV
                            Peak time                             tp        0.20      s
                            Percent overshoot                     PO        5.76      %
                            Steady-state error                    ess       0.00      rad
           2.3.1.2          Step Response Implementation
                            Peak time                             tp        0.147     s
                          Percent overshoot                      PO        4.88       %
                          Steady-state error                     ess       0.0138     rad
           2.3.2.1        Ramp Response Simulation with
                          PV
                          Steady-state error                     ess       -0.213     rad
           2.3.2.2        Ramp Response Implementation
                          with
                          PV
                          Steady-state error                     ess       0.189      rad
           2.3.3          Ramp Response Simulation with
                          no
                          steady-state error Steady-
                          state error                            ess       -0.0125    rad
           2.3.3          Ramp Response Implementation
                          with
                          no steady-state error Steady-
                          state error                            ess       -0.0343    rad
           Table 2.2: Summary of results for the SRV02 Position Control laboratory.
Before beginning the lab experiments on the SRV02 device, the q_srv02_pos
Simulinkrdiagram and the setup_srv02_exp02_pos script must be configured.
Follow these steps to get the system ready for this lab:
  1.   Setup the SRV02 in the high-gear configuration and with the disc load as described
       in Reference [6].
  3.   Browse through the Current Directory window in Matlabrand find the folder that
       contains the SRV02 position control files, e.g. q_srv02_pos.mdl.
The objective of this laboratory is to develop feedback systems that control the speed of the
rotary servo load shaft. A proportional-integral (PI) controller and a lead compensator are
designed to regulate the shaft speed according to a set of specifications.
Topics Covered
   •   Design of a proportional-integral (PI) controller that regulates the angular speed of the
       servo load shaft.
   •   Design of a lead compensator.
   •   Simulation of the PI and lead controllers using the plant model to ensure the specifications
       are met without any actuator saturation.
   •   Implemention of the controllers on the Quanser SRV02 device to evaluate their
       performance.
Prerequisites
In order to successfully carry out this laboratory, the user should be familiar with the
following:
   •   Data acquisition device (e.g. Q2-USB), the power amplifier (e.g. VoltPAQ-X1), and the
       main components of the SRV02 (e.g. actuator, sensors), as described in References [2],
       [4], and [6], respectively.
   •   Wiring and operating procedure of the SRV02 plant with the amplifier and data-aquisition
       (DAQ) device, as discussed in Reference [6].
   •   Transfer function fundamentals, e.g. obtaining a transfer function from a differential
       equation.
• Laboratory described in Appendix A to get familiar with using QUARCrwith the SRV02.
3.1 Background
The time-domain requirements for controlling the speed of the SRV02 load shaft are:
ess = 0 (3.1.1)
PO ≤ 5 % (3.1.3)
Thus, when tracking the load shaft reference, the transient response should have a peak time
less than or equal to 0.05 seconds, an overshoot less than or equal to 5 %, and zero steady-
state error.
and
                                              ωg = 75.0 rad/s                           (3.1.5)
The phase margin mainly affects the shape of the response. Having a higher phase margin
implies that the system is more stable and the corresponding time response will have less
overshoot. The overshoot will not go beyond 5% with a phase margin of at least 75.0 degrees.
The crossover frequency is the frequency where the gain of the Bode plot is 1 (or 0 dB).
This parameter mainly affects the speed of the response, thus having a larger ωg decreases the
peak time. With a crossover frequency of 75.0 radians the resulting peak time will be less
than or equal to 0.05 seconds.
3.1.1.2 Overshoot
                                                     2.5 rad/s t ≤ t0
                                        ωd(t) ={                                  (3.1.6)
                                                     7.5 rad/s t > t0
where t0 is the time the step is applied. Initially, the SRV02 should be running at 2.5 rad/s and
after the step time it should jump up to 7.5 rad/s. From the standard definition of overshoot in
step response, we can calculate the maximum overshoot of the response (in radians):
                                                                                            (3.1.7)
with the given values the maximum overshoot of the response is
The closed-loop speed response should therefore not exceed the value given in Equation
3.1.8.
Consider the speed control system with unity feedback shown in Figure 3.1. Let the
compensator be C(s) = 1.
We can find the steady-state error using the final value theorem:
where
                                                                                         (3.1.10)
The voltage-to-speed transfer function for the SRV02 was found in Section 1 as:
                                                                                         (3.1.11)
Substituting           and C(s) = 1 gives:
(3.1.12)
(3.1.13)
(3.1.14)
The proportional-integral (PI) compensator used to control the velocity of the SRV02 has the
following structure:
where kp is the proportional control gain, ki is the integral control gain, ωd(t) is the setpoint or
reference angular speed for the load shaft, ωl(t) is the measured load shaft angular speed, bsp
is the setpoint weight, and Vm(t) is the voltage applied to the SRV02 motor. The block
diagram of the PI control is given in Figure 3.2.
                                                                                            (3.1.16)
To find the closed-loop speed transfer function, Ωl(s)/Ωd(s), we can use the process transfer
function from Equation 3.1.11 and solve for Ωl(s)/Ωd(s) as:
                                                                                          (3.1.17)
In this section, we will first calculate the minimum damping ratio and natural frequency
required to meet the specifications given in Section 3.1.1.1. Then, using these values we will
calculate the necessary control gains kp and ki to achieve the desired performance with a PI
controller.
The minimum damping ratio and natural frequency needed to satisfy a given percent
overshoot and peak time are:
                                                                                          (3.1.18)
and
                                                                                          (3.1.19)
                         −
Substituting the percent overshoot specifications given in 3.1.3 into Equation 3.1.18 gives the
required damping ratio
ζ = 0.690 (3.1.20)
Then, by substituting this damping ratio and the desired peak time, given in 3.1.2, into
Equation 3.1.19, the minimum natural frequency is found as:
                                             ωn = 86.7 rad/s                             (3.1.21)
Now, let's look at how we can calculate the gains. When the setpoint weight is zero, i.e. bsp =
0, the closed-loop SRV02 speed transfer function has the structure of a standard second-
order system. We can find expressions for the control gains kp and ki by equating the
characteristic equation (denominator) of the SRV02 closed-loop transfer function to the
standard characteristic equation: s2 + 2ζ ωn s + ωn2.
The denominator of the transfer function can be re-structured into the following:
                                                                                          (3.1.22)
equating the coefficients of this equation to the coefficients of the standard characteristic
equation gives:
                                                                                          (3.1.23)
and
                                                                                          (3.1.24)
                                                                                          (3.1.25)
and the integral gain ki is
(3.1.26)
Alternatively, a lead or lag compensator can be designed to control the speed of the servo.
The lag compensator is actually an approximation of a PI control and this, at first, may seem
like the more viable option. However, due to the saturation limits of the actuator the lag
compensator cannot achieve the desired zero steady-state error specification. Instead, a lead
compensator with an integrator, as shown in Figure 3.3, will be designed.
To obtain zero steady-state error, an integrator is placed in series with the plant. This system
is denoted by the transfer function
                                                                                         (3.1.27)
where P(s) is the plant transfer function in Equation 3.1.11.
The phase margin and crossover frequency specifications listed in equations 3.1.4 and 3.1.5 of
Section 3.1.1.1 can then be satisfied using a proportional gain Kc and the lead transfer function
(3.1.28)
The a and T parameters change the location of the pole and the zero of the lead compensator
which changes the gain and phase margins of the system. The design process involves
examining the stability margins of the loop transfer function, L(s) = C(s) · P(s), where the
compensator is given by:
(3.1.29)
                                                                                          (3.1.30)
The proportional gain Kc is designed to attain a certain crossover frequency. Increasing the
gain crossover frequency essentially increases the bandwidth of the system which decreases
the peak time in the transient response (i.e. makes the response faster). However, as will be
shown, adding a gain Kc > 1 makes the system less stable. The phase margin of the Lp(s)
system is therefore lower than the phase margin of the Pi(s) system and this translates to
having a large overshoot in the response. The lead compensator is used to dampen the
overshoot and increase the overall stability of the system, i.e increase its phase margin.
                                                                                         (3.1.31)
and its corresponding magnitude and phase equations are
(3.1.32)
and
− (3.1.33)
In this section, we will use Matlabrto design a lead compensator that will satisfy the
frequency-based specifications given in Section 3.1.1.1.
1. Bode plot of the open-loop uncompensated system, Pi(s), must first be found. To
  generate the Bode plot of Pi(s), enter the following commands in Matlabr. NOTE: If
  your system has not been set up yet, then you need to first run the the
  setup_srv02_exp03_spd.m script. This script will store the model parameter K and tau in
  the Matlabrworkspace. These parameters are used with the commands tf and series to
  create the Pi(s) transfer function. The margin command generates a Bode plot of the
  system and it lists the gain and phase stability margins as well as the phase and gain
  crossover frequencies.
The entire Lead compensator design is given in the d_lead.m script file. Run this script
after running the setup_srv02_exp03_spd.m script when CONTROL_TYPE = 'AUTO' to
generate a collection of Bode diagrams including the Bode of Pi(s) given in Figure 3.5.
Kc = 34.5 dB (3.1.34)
     or
                                                  Kc = 53.1 V/rad                         (3.1.35)
     in the linear range is required. The Bode plot of the loop transfer function Lp(s) (from
     Section 3.1.3) is given in Figure 3.6. This initial estimate of the gain was found using the
     ginput command. The gain was then adjusted according to the crossover frequency
     calculated in the generated Bode plot of the Lp(s) system. The commands used to generate
     the Bode plot are given in the d_lead.m script.
3.   Gain needed for specified phase margin must be found next so that the lead compensator
     can achieve the specified phase margin of 75 degrees. Also, to ensure the desired
     specifications are reached, we'll add another 5 degrees to the maximum phase of the lead.
     To attain the necessary phase margin, the maximum phase of the lead can be calculated
     using
Given that the desired phase margin in Equation 3.1.4 and the phase margin of Lp(s) is
                                                                                         (3.1.40)
     The gain needed is found by inserting the max phase into this equation to get
                                              a = 4.96                                    (3.1.41)
     which is
                                       20 log 10(a) = 13.9 dB                           (3.1.42)
4. The frequency at which the lead maximum phase occurs must be placed at the new gain
   crossover frequency ωg,new. This is the crossover frequency after the lead compensator is
   applied. As illustrated in Figure 3.4, ωm occurs halfway between 0 dB and 20 log10(a), i.e.
   at 10 log10(a). So, the new gain crossover frequency in the Lp(s) system will be the
   frequency where the gain is −10 log10(a).
     From Figure 3.6, it is found that the frequency where the −10 log10(a) gain in the Lp(s)
     system occurs is at about 80.9 rad/s. Thus, the maximum phase of the lead will be set to
                                                                                         (3.1.44)
     is used to attain a certain maximum phase frequency. This changes where the Lead
     compensator breakpoint frequencies 1/(a ∗ T) and 1/T shown in Figure 3.4 occur. The
     slope of the lead compensator gain changes at these frequencies. We can find the parameter
     T by substituting ωm = 80.9 and the lead gain value from Equation 3.1.41 into Equation
     3.1.44:
                                               T = 0.00556                              (3.1.45)
     s/rad Therefore, the lead breakpoint frequencies are:
                                                            rad/s                        (3.1.46)
     and
rad/s (3.1.47)
5.   Bode plot of the lead compensator Clead(s), defined in 3.1.28 can be generated using the
     d_lead.m script.
                         Figure 3.7: Bode of lead compensator Clead(s).
6.   Bode plot of the loop transfer function L(s), as described in 3.1.30, can be generated using
     the d_lead.m script. The phase margin of L(s) is 68.1 degrees and is below the desired phase
     margin of 75.0 degrees, as specified in Section 3.1.1.
7.   Check response by simulating the system to make sure that the time-domain specifications
     are met. Keep in mind that the goal of the lead design is the same as the PI control, the
     response should meet the desired steady-state error, peak time, and percentage overshoot
     specifications given in Section 3.1.1. Thus, if the crossover frequency and/or phase margin
     specifications are not quite satisfied, the response should be simulated to verify if the time-
     domain requirements are satisfied. If so, then the design is complete. If not, then the lead
     design needs to be re-visited.
     You will work on this later in the laboratory as described in Section 3.3.2.1.
                        Figure 3.8: Bode of loop transfer function L(s).
When using analog sensors, such as a tachometer, there is often some inherent noise in the
measured signal.
The peak-to-peak noise of the measured SRV02 load gear signal can be calculated using
                                                                                         (3.1.48)
where Kn is the peak-to-peak ripple rating of the sensor and ωl is the speed of SRV02 load
gear. The rated peakto-peak noise of the SRV02 tachometer is given in Appendix B of
Reference [6] as:
                                                 Kn = 7 %                                (3.1.49)
Based on this specification, the peak-to-peak noise, when the load shaft runs at 7.5 rad/s, will
be
Equation 3.1.7 was used to find the peak value of the load gear response for a given percent
overshoot. To take into account the noise in the signal, this formula is modified as follows:
                                                                                         (3.1.51)
Given a reference signal that goes between 2.5 rad/s to 7.5 rad/s, as described in Section
3.1.1.1, and the peak-topeak ripple estimate in Equation 3.1.50, the peak speed of the load
gear, including the noise, can be found as:
                                                                                         (3.1.53)
the new maximum percent overshoot for a 5.0 rad/s step is
PO ≤ 10.2 % (3.1.54)
  1. Based on the steady-state error result of a step response from Equation ,what type of
     system is the SRV02 when performing speed control (Type 0, 1, or 2) and why?
         Answer 3.2.1
           Outcome    Solution
              A-3 This is a Type 0 system because the steady-state error is a
                      constant given a step reference.
  2. The nominal SRV02 model parameters, K and τ, found in SRV02 Modeling Laboratory
     (Section 1) should be about 1.53 (rad/s-V) and 0.0254 sec, respectively. Calculate the PI
     control gains needed to satisfy the time-domain response requirements.
Answer 3.2.2
           Outcome    Solution
             A-2     Using the nominal SRV02 model parameters
                      and
                                                 τ = 0.0254 s                 (Ans.3.2.2)
                      along with the damping ratio given in Equation 3.1.20
                      with Equation 3.1.25 generates the proportional
                      control gain
Answer 3.2.3
           Outcome    Solution
             A-2      The frequency response of Pi(s) is found by substituting s = j ω in
                      3.1.27.
(Ans.3.2.5)
Answer 3.2.4
           Outcome        Solution
             A-2 Substituting ω = 1 rad/s gives the approximate DC gain of
                                                                                (Ans.3.2.7)
                     Substituting the nominal SRV02 model parameters in
                     the above expression results in the DC gain estimate of
                     or
                                              |Pi(1)|dB = 3.70 dB               (Ans.3.2.9)
5. The gain crossover frequency, ωg, is the frequency at which the gain of the system is 1 or 0
   dB. Express the crossover frequency symbolically in terms of the SRV02 model parameters
   K and τ. Then, evaluate the expression using the nominal SRV02 model parameters K =
   1.53 and τ = 0.0254, (or use what you found for K and τ in Section 1).
Answer 3.2.5
           Outcome        Solution
             A-1     The crossover frequency is found by setting |Pi(ωg)| = 1 in equation
                     Ans.3.2.6 and solving for ωg
           A-2
                                                                               (Ans.3.2.10)
                     When evaluated with the nominal SRV02 parameters,
                     the frequency where the gain is 0 dB is
3 SRV02 SPECIFICATIONS
Table 3.1 lists and characterizes the main parameters associated with the SRV02. Some of
these are used in the mathematical model. More detailed information about the gears is
given in Table 3.2 and the calibration gains for the various sensors on the SRV02 are
summarized in Table 3.3.
     Symbol Description                               Value                   Variation
     Vnom     Motor nominal input voltage             6.0 V
     Rm       Motor armature resistance               2.6 Ω                   ± 12%
     Lm       Motor armature inductance               0.18 mH
     kt       Motor current-torque constant           7.68×10−3 N-m/A         ± 12%
     km       Motor back-emf constant                 7.68×10−3 V/(rad/s)     ± 12%
     Kg       High-gear total gear ratio              70
              Low-gear total gear ratio               14
     ηm       Motor efficiency                        0.69                    ± 5%
     ηg       Gearbox efficiency                      0.90                    ± 10%
     Jm,rotor Rotor moment of inertia                 3.90×10−7 kg-m2         ± 10%
     Jtach    Tachometer moment of inertia            7.06×10−8 kg-m2         ± 10%
     Jeq      High-gear equivalent moment of          2.087×10−3 kg-m2
              inertia without external load
              Low-gear equivalent moment of            9.7585×10−5 kg-m2
              inertia without external load
     Beq      High-gear Equivalent viscous             0.015 N-m/(rad/s)
              damping coefficient
              Low-Gear Equivalent viscous              1.50×10−4 N-
              damping coefficient                      m/(rad/s)
     mb       Mass of bar load                         0.038 kg
     Lb       Length of bar load                       0.1525 m
     md       Mass of disc load                        0.04 kg
     rd       Radius of disc load                      0.05 m
     mmax     Maximum load mass                        5 kg
     f Maximum input voltage frequency                 50 Hz
      max
                 Maximum input current            1A
     ωmax        Maximum motor speed              628.3 rad/s
                                Table 3.1: Main SRV02 Specifications
References