DC Motor Control Lab-LabVIEW - Rensselaer Polytechnic Institute

advertisement
Rensselaer Polytechnic Institute
ECSE-4760
Real-Time Applications in Control & Communications
ANALOG AND DIGITAL CONTROL OF A DC MOTOR
(2013)
Number of Sessions – 4
INTRODUCTION
Over the past several years, the digital computer has been used in a broad range of engineering
applications. One of these is in Control Systems. Major advantages of using digital computers in the
Control field include the great computational speed and accuracy, the relative ease with which
simple parameters or even complete program modules can be modified (with virtually no new
equipment cost), and the decision making capability. The last one lately has reached new heights
with fuzzy controllers and expert systems, replacing delicate human operators. Large numbers of
processes can be controlled simultaneously and effectively by a single computer and detailed reports
can be generated, tasks previously unthinkable with an analog computer.
The purpose of this experiment is to acquaint the student with the advantages and shortcomings
of using microcomputers in Control System applications, by designing and implementing regulators
to control the angular position of an armature controlled DC motor made by Feedback Ltd. Both
analog and digital designs will be implemented so that direct comparisons can be made of the pros
and the cons of each approach. It is assumed that the experimenter is reasonably familiar
with the basic principles of analog feedback control, preferably root locus techniques,
and can design compensators to satisfy a set of required specifications.
PROBLEM FORMULATION
The objective of the experiment is to design both analog as well as digital compensators to control
the angular position of an armature controlled DC motor. A step input, created by changing the
polarity of the motor, will be used as a reference signal. In general an armature-controlled motor can
be regarded as a linear system over a finite operating range and is described by the following
transfer function:
Gp (s) 
Ks
s( m s 1)
For the motor in the Feedback 33-033 these constants are:

 m  0.4839
Ks  3.986,
For the first part of this lab, a gain factor of 25 is added in the feedforward path, resulting in the

1
overall transfer function of the motor given by equation (1):
Gp (s)  25G p (s)  25
3.986
8.2369
 25
s(4839s  1)
s(s  2.0664)
(1)
Due to manufacturing variations, nonlinearities, and wear of the Feedback Instruments Ltd. 33-033
DC servo system, the parameters in equation (1) are not exact. This will lead to discrepancies
between the theoretical and actual responses during the course of the experiment when various

controller designs are implemented. Because of this, you must justify why your results do not match
the theoretical expectations. For extra credit, you may assume
Gp (s) 
K
s( m s 1)
and estimate K and m for a step response for the proportional feedback case. The MATLAB System
Identification toolbox provides some functions that will simplify this process.

For this motor the following compensators must be designed and implemented:
• A pure proportional feedback controller.
• An analog feedback compensator that will force the motor output to satisfy the following
specifications:
1) Overshoot to a step input ≤ 10%.
2) 2% settling time ≤ 0.75 seconds (or better).
3) Dead zone at the output ≤ 4˚ (or 5°).
• The Tustin digital approximation to the analog compensator designed previously.
• A digital controller, using the following design schemes:
1) The minimal prototype design criterion.
2) The ripple free response design criterion.
Note that for the analog part relaxing these requirements slightly permits the design of a
controller that can be implemented more easily on a digital computer. To ensure success in obtaining
the above desired results, it is very important that the compensator design be done on paper before
the implementation is attempted.
HARDWARE – SOFTWARE SETUP
EQUIPMENT DESCRIPTION
Available on the course web site is the 33-033 Reference Manual covering the theory and circuit
details regarding the DC motor. Parts of the GP-6 Analog Computer Operator's Manual for details on
programming the Comdyna have also been included on the course web site. The student is expected
to read both manuals and become familiar with the systems before starting the experiment.
The equipment to be used for the experiment consists of the following:
1) An armature controlled DC motor used as the process or plant to be controlled. It is called
as such because a constant field current is applied to the motor, and the armature excitation is
controlled. This is accomplished by means of an internal feedback path in the servo amplifier. The
servo system 33-033 manufactured by Feedback Instruments Ltd. will provide the motor, the motor
power supply, a servo amplifier to drive the motor, the position sensor, attenuators, and other
features.
2) The Comdyna analog computer is used to build the analog compensator during the second part
2
of the experiment. All the basic mathematical functions are available here and its usage is
straightforward. In case of problems, refer to the Comdyna manual.
3) A PC running the relevant program used to implement the digital compensator. No PC specific
knowledge is required other than following the instructions included.
4) A dual trace digital sampling oscilloscope (DSO), for recording the input and motor response.
Some experimentation with the time scale will be necessary so that responses are recorded with
maximum detail. You will want to save the screens of the digital oscilloscope to flash drive files.
Setting up the hardware connections is relatively straightforward. Figure 1 shows an "extended"
block diagram of the whole process containing all the necessary figures and connection links.
FIGURE 1. DC Motor diagram with proportional feedback.
The 33-033 is divided into two sections, the Mechanical Unit 33-100 servo motor assembly unit
and the Servo Fundamentals 33-125 control unit. The 33-125 provides all the electrical networks and
amplifiers while the 33-100 provides the motor and the sensors. Once you have located these sections
of the 33-033, follow the setup procedure outlined below:
• Make sure the ribbon cable from the 33-100 is plugged into the 33-125 in the upper right corner
and that the Power Supply 01-100 is connected to the 33-100 (+5 V, +15 V, 0 V, & -15 V).
• Following the wiring diagram below, on the 33-125, connect the inverted motor output (upper
right) to a 100k op-amp input resistor. Connect the op-amp output to the 2M resistor and to
the Attenuator (middle left). The output of the Attenuator connects to the Power amplifier
(-) input. The reference input to the summing op-amp’s other 100k input comes from EITHER
the Input potentiometer OR the Sweep function generator Output amplitude potentiometer,
who’s input is connected to the center Sweep function generator output (step function output).
If the function generator is used for the input signal, the Output amplitude potentiometer
should be set to about 0.5. The reference input is one signal to be observed on the scope along
with the (non-inverted) motor output.
• The 33-125, Input potentiometer outputs a voltage proportional to the input angular position
of the Mechanical Unit’s dial. The angular position is multiplied by 10 Volts/180° to convert from
degrees to Volts. Thus, if the input dial on the 33-100 is moved ±90°, the voltage on the 33-125
will be ±5 Volts. The output of the potentiometer should go to the op-amp 100k input resistor and
the op-amp’s output drives the Power amplifier. The servo Power amplifier in turn drives the
motor. Note that the DC motor input can be wired to come from the manually adjusted dial
potentiometer or the function generator’s step function output.
• The motor is not energized unless the 33-100 power switch is ON. Thus, if the motor goes
unstable or into oscillations, turn the power switch OFF. Each time prior to using the motor,
check and recalibrate the zero offset on the 33-125 when the power switch is ON.
• To produce clean step inputs required during the control runs, it is best to use the square wave
output from the Sweep function generator with both the Min freq & Max freq dials turned
all the way counter-clockwise and the amplitude adjusted appropriately with the potentiometer.
• The dashed connections from the inverted Tacho generator output, through a second
3
Attenuator, to a 3rd 100k op-amp input will be used to provide velocity feedback. When
combined with the position feedback this implements a PD controller. The Attenuator adjusts
the gain on the derivative term.
Even though adequate, the above explanation is by no means complete. The reader is urged to
refer to the 33-033 manual for a more complete description of setup procedures as well as answers to
probable questions.
To
Scope
To
Scope
FIGURE 2. DC Motor wiring diagram with proportional (& derivative) feedback.
ANALOG COMPUTER USAGE
The analog controllers are to be built on the Comdyna computer. This distinguishes this lab from
the other control labs where the analog computer is used as the plant to be controlled. Here the DC
motor is the plant and the Comdyna is the controller. Later the PC running LabVIEW will be used as
the digital controller. Special care must be taken when implementing the gains because of the sign
inversions at the output of the amplifiers. The Comdyna dial must be on the Pot Set position during
setup; during operation the dial must stay on Oper and pushbuttons switched between OP at the
start and IC at and end of each run.
You should also note that the analog controllers implemented on the Comdyna analog computer
may light the "OVLD" lamp when the amps begin to saturate. There is no problem if the indicator
flashes on briefly during operation. A sustained overload condition, however, will affect the
controller's operation. These effects may be minimized by reducing the input step size or reducing
the overall gain of the analog computer block.
4
One of the oscilloscope channels must be connected to the process output (with ground), and the
other one to the control signal (or AO 0 port on the PC for the discrete part), or the op-amp output
(and ground) to observe the error. Use the maximum voltage range possible for more detailed results.
WARNING: Even though the D/A converters are protected from overload, an input voltage in excess
of +10 or -10 Volts can result in permanent damage to the A/D converter.
There will be cases where even though the control signal will be active, no response will take
place. If it is suspected that the error signal is too low, then the following procedure must be very
cautiously applied (the TA's presence is advised if you are unsure of what you are doing):
• Start slowly incrementing the Attenuator pot and run the simulation until the output starts
responding;
• Return the settings to their original positions and modify the design so that the proportional
gain is increased;
• Try running the experiment again;
• If problems persist, try manually adjusting the parameters around their calculated points and
rerun the experiment. The justification for this action stems from the fact that the motor model
is a linear function of a nonlinear process and its parameters themselves are estimated.
DIGITAL COMPUTER USAGE
•
•
•
•
•
To access the LabVIEW program do the following:
Turn the PC on (if off) and go to the DC_Motor subdirectory (My Computer\Local Disk):
C:\CStudio\RTA_lab\DC_Motor.
Double click New DC Motor DAQmx+.vi to load the program. A LabVIEW program will open
with several parameter fields in the front panel.
Press the right arrow icon at the top left corner of the window to start execution. To abort the
program, press the STOP button on the screen, not the stop sign at the top of the page.
This will prompt the program to calculate the actual sampling time for the run, and
reset the output. Not using the STOP button to halt execution may yield incorrect
results on subsequent runs. There may be a few seconds delay before the VI completely halts.
Although some values can be changed during execution by user input, it is important to note that
to properly ensure correct measurements, the controller needs to be stopped (by using the STOP
button) before altering input values.
If you notice the controller isn’t working properly:
o Press the stop button then run the LabVIEW program again. This should reset the program
and enable you to start from scratch.
o Wiggle all connectors make sure they are good. If when wiggling wire you notice a difference
in the response, change connectors. Occasionally LabVIEW or the PC may need to be restarted.
The algorithm used to derive the gains depends on appropriate values for the sampling time T.
For approximating continuous implementations the general notion is the faster the sampling, the
better the controller approximates the analog model (20 ms or less), but direct digital control can use
much larger values for T. Values for T that are too small may result in excessively large gains.
Sometimes the calculated values for the control signal exceed the ±10 Volts (D/A limits). In these
cases a software-implemented clipper prevents the D/A control values from "wrapping" around by
forcing them to stay at their respective max/min values. Be warned though that if the signal
remains at these levels very long (saturated), then erroneous results occur. Try using a different
sampling time or coefficients. Using smaller input step changes will also help. Also if the average
actual sample time observed on the oscilloscope is higher than the sampling time entered in the front
panel, raise it until you find a workable value. In many cases 10 ms will be around the lowest
possible time. You could also simply take the average sample time as your sampling time for the test.
5
PART I - ANALOG CONTROL
PROPORTIONAL FEEDBACK CONTROLLER
Even though the model of the motor is assumed linear, nonlinear (static & Coulomb) friction is
present in the motor, resulting in a dead zone at the output of the motor, related to the error velocity
constant[1] Kv by:
Dead Zone (degrees) 
250
250

velocity error constant K v
This friction can be modeled as an external disturbance and must be taken into account during the
calculations. Figure 3 shows a typical block diagram with the disturbance f n and the proportional

gain g, and Figure 4 shows the phase plane trajectories for such a motor. For more information on
these figures and the motor friction in general see [2].
The velocity error constant Kv for a type 1 system (one free integrator) is given by equation (2):
Kv lim sGc (s)Gp (s)
(2)
s0
(Note: for a type 0 system - no free integrators, Kv will be zero.)
Prior to designing a dynamic compensator, it would be desirable to try a pure proportional

feedback controller of the form K[u(t) - e(t)]. Despite the fact that this is a type 1 system there is a
possible non-zero steady state error that depends on the size of the step input. Can you explain why
this occurs? Typical phase plane trajectories are given in Figure 4.
fn
 IN
+
-
e
g
G p (s)
+



OUT

FIGURE 3. Block diagram including friction input.
Notice that once you specify the dead zone, the error velocity constant is specified. Therefore, the
system is completely determined for the proportional controller. Also note that the dead zone is twice
the maximum absolute value of the steady state error. To experimentally measure the dead zone
move the input shaft both clockwise and counterclockwise until the output shaft barely moves
and add the two displacements. For a dead zone of 4°, can you meet the specifications of overshoot ≤
10%, or a settling time ≤ 0.84 s, one at a time? Why?
6
FIGURE 4. Phase plane trajectories for the friction.
Even though the questions can be answered by using only the equations in the following section,
it will be helpful for further analysis if the root locus for the open loop transfer function Gc (s)G p (s) is
drawn[3]. Assume that each of the specifications is individually satisfied, solve for the resulting gain
Kp and the other parameters and check your results in the locus line (see the example at the end of
PART I). Use [4] for help in computing gain Kp. A detailed presentation of the rootlocus analysis can
be found in [5]. Save response plots of the system satisfying the requirements individually.
The gain in the proportional control is adjusted by simply turning the Attenuator pot.
Unfortunately estimating the quantitative value for a particular setting is not trivial. At this point
the best way to measure the attenuation after adjusting the gain to provide a desired control
characteristic on the oscilloscope traces, is to put oscilloscope probes on both the input and output
terminals of the pot and directly measure the input and output voltages, as shown in Figure 5. It
may be easier to provide a fixed DC voltage from the Variable dc supply (approx. -1.35 V to +1.25 V)
to facilitate the measurement. The gain (more accurately, the attenuation) will be:
gain 
VCH 2
VCH1
To Scope CH 1

To Scope CH 2
FIGURE 5. Measuring Attenuator value.
7
(3)
PD CONTROLLER
Although not always available on every plant to be controlled, the 33-033 system does provide a
velocity output that can be used to implement a derivative term in the feedback controller. Simply
adding the dashed connections in Figure 2 sets up a PD controller. Optimize the response of the
proportional controller by adding in the derivative damping term to achieve the required original
specifications. After adjust both the overall gain and the derivative (tacho) gain for the best response,
save the input & output response plots and determine the values of the attenuators.
DYNAMIC FEEDBACK CONTROLLER
Since pure proportional feedback cannot produce a closed loop system meeting the specified
requirements, a lead compensator (called phase lead because a < b) as in equation (4) is required to
relocate the roots of the closed loop characteristic equation of the system. The task is to determine
the proper variables a, b, and  to satisfy the given criteria. Note that the relation between the dead
zone and the error velocity constant still holds.
Gc (s)  
(s  a)
(s  b)
(4)
The analog computer simulation diagram of the compensator is shown in Figure 6. For more
accurate control, it is important to note that the gain of the operational amplifiers are nominally -1
or -10 but may off by a few percent and the offsets for the power amp must be zeroed manually. This

will have an effect on gain calculations for all controllers, both analog and digital, that use the op
amps. It is worthwhile to devise a quick experiment with an oscilloscope and function generator to
measure the actual gain and zero the offset. Also remember the nominal gain of -10 must be
considered when calculating the gain A for the digital controllers.
Since we're dealing with a second order process and a first order compensator, the resulting
closed loop transfer function will be of third order. The overshoot and settling time specifications on
the other hand, are defined for a second order process, hence a typical strategy is to choose the real
closed loop transfer function pole so far away in the Left Hand plane, that the remaining (complex
conjugate poles) will behave as dominant ones giving a response similar to the regular second order
processes.
FIGURE 6. Analog computer simulation of the compensator.
A general second order process[6] is described by its natural frequency n, and the damping
8
ratio  as:
Gc (s) 
 n2
s2  2 n s   n2
(5)
Important timing measures defined in relation with a second order process are:
Settling Time:

Peak Time: T p 

and response measures for a step input are:
Ts 
4
 n

 n 1  2


 
M pt  1 exp 
 1  2 


M pt  1
 100%
Percent Overshoot: P.O. 
1

(6)

Peak Response:
(7)
There are various design techniques that yield an acceptable compensator satisfying all the
specifications for the output, yet it must be noted that no unique solution exists and no first time

success is guaranteed; a possible modification of the parameters, by trial and error, until all
requirements are met might be necessary. Two techniques will briefly be mentioned here, and the
student is urged to use either them or his own favorite one, applying his/her experience and
initiative. An extensive analysis of both root-locus and Bode plot (phase-gain margin) techniques,
even using different compensator types can be found in [7]. Remember the decisive factor for success
or failure of a design is the experimental measuring of the specification values from the saved
oscilloscope screen shots!
The first technique[8] assumes that the third order process is described by a closed loop transfer
function of the form:
T (s) 
Gc (s)G p (s)
1 Gc (s)G p (s)

 n2
(s  2 n s   n2 )(s  1)
2
(8)
and imitates a second order one if the real root g of the characteristic equation obeys the following:

1

10  n
(9)
Thus using the specifications given, the coefficients of the model T(s) are computed. Since Gp(s) is
known the above equation can in general be solved (coefficient matching) for the unknown
polynomial Gc(s). If the transfer function T(s) contains any finite zeros then the closer they are

located to the dominant complex poles the less accurate the approximation becomes.
The second technique[9] is a classic root locus phase-lead compensator design, and is broken
down to the following steps:
1) Translate the design specifications (, n) into desired dominant closed loop root locations.
2) Draw the uncompensated transfer function root locus and see if it passes nearby the desired
roots; if yes then evaluate the proportional gain K required by algebraically summing the
lengths of the vectors from the open loop poles and zeros to the desired root (root locus
magnitude criterion).
3) Else a compensator is needed to modify the locus curves. Place its zero directly under the
desired roots.
4) Place the compensator pole in such a location that the algebraic sum of the angles of all vectors
9
from poles and zeros to the desired root is an odd multiple of 180° (root locus angle criterion).
Evaluate the new gain K as in step (2) and compare the design results with the specifications
set. If they are not admissible start the procedure again.
5)
The DC motor compensated open loop transfer function F(s), for use in the root locus is:
F(s)  KGc (s)G p (s)  
s a
8.2369
K(s  a)


s  b s(s  2.0664) s(s  2.0664)(s  b)
(10)
The block diagram for the DC motor containing the compensator block is shown in Figure 7 and
matching wiring in Figure 8. Note that the summing op-amp is reconfigured for 1x or 5x gain. If the
compensator requires a gain larger than 10, use the 5x setting and /5 in the compensator (pot=/50).

FIGURE 7. Extended Block Diagram including the compensator.
To
Scope
Control output
FROM
Analog Computer
-ORLabVIEW AO 0
Yellow jumper: gain=5
-ORGreen Jumper: gain=1
To
Scope
Error input
TO
Analog Computer
-ORLabVIEW AI 0
FIGURE 8. DC Motor phase lead & digital control wiring diagram.
10
From (10) it's clear that

K
.
8.2369
The admissibility criterion for any design meeting the P.O. and settling time requirements, will
be the error velocity constant Kv which is computed using (2) as:

K v  lim sGc (s)Gp (s) 
s0
Ka
2.0664b
(11)
The student must be warned that the only design that is automatically rendered unacceptable is
the pole cancellation process (compensator zeros coinciding with process poles) for reasons[10][11]
extending far beyond the scope of this experiment. The following example should clarify the methods
 as a model for the DC motor design.
described above, and serve
EXAMPLE
We are given a second order process G p (s) 
1
. A feedback compensator is to be designed
(s  1)(s  2)
so that the process response satisfies the following specifications:
settling time Ts = 0.8 sec;
percent overshoot P.O. = 10%;

position error constant1 K p  100 .
The specifications are translated using equations (6) and (7) as follows:
Ts  0.8 


which means
4
 n
  n  5 (desired)


P.O.  10  100exp 
 1  2


   0.6


  cos 1   53.13 (desired)

nd


The product
order systems) is equal to the real part of the closed loop complex
n (for 2

conjugate roots.
A. Pure
 Proportional Control
Figure 9 is the root locus of the open loop transfer function F(s)  KG p (s) 
K
(s  1)(s  2)
The open loop poles p1, p2 are located at -1 and -2. The root locus for the closed loop system
consists of two straight line segments that start from -1 and -2 respectively, going towards each
other, meet at -1.5 and split, one following a course parallel to the Im[s] axis and the other parallel to
the -Im[s] axis. For simplicity only the upper Left Half Plane is shown in Figure 9 as the lower one is
symmetric. From the locus it is obvious that any closed loop complex roots will have the -1.5
intersection point as their real part, therefore the settling time requirement cannot be met by any
proportional gain.
•Satisfying the P.O. requirement yields a   0.6 and an angle   cos 1   53.13 , as shown in
1
The system is of type 0 (no free integrator) hence the error characteristic is defined as the

Gc (s)G p (s) . 
position error constant K p  lim
s0

11
Figure 9. The proportional gain is then calculated by applying the gain criterion (and standard
trigonometry), and from the gain the position error constant is evaluated:
K  (0.5) 2  (1.5tan ) 2 (0.5) 2  (1.5tan ) 2  4.25
K p  Gc (0)G p (0) 
K
 2.125
2

Im[s]

s'1
s1
’n
n
P2
-2
-Re[s]
P1
 n
-1.5

-1
FIGURE 9. Root locus for proportional feedback.
Obviously the position error constant Kp is not satisfied since the resulting 2.125 is far below the
required 100.
•Satisfying the position error constant immediately defines the gain K. From the gain and
equations (6) and (7),  and  are calculated, yielding the P.O.:
K  2K p  200
200  (0.5)  (1.5tan ) 2 (0.5) 2  (1.5tan ) 2  tan  9.422
2
Therefore
and
  83.94  cos    0.1055

P.O. 71.65%
Again the Percent Overshoot isunacceptable compared with the 10% requirement.
 Method #1.
B. Feedback Compensator Design
From equation (8) the compensator general solution can be found as:
Gc (s)G p (s)
1 Gc (s)G p (s)
 T (s)  Gc (s) 
T (s)
[1T (s)]G p (s)
The only problem with the above formula is that it doesn't guarantee that the resulting compensator
will be a lead compensator, in fact it probably won't be, unless very careful manipulations of the

coefficients take place. For the scope of this experiment the analysis will stop here.
12
C. Feedback Compensator Design Method #2.
Figure 10 is the root locus of the transfer function F(s)  Gc (s)G p ( p) 
K(s  a)
with the
(s  1)(s  2)(s  b)
process poles at p1 = -1 and p2 = -2. Since the compensator pole pc = -b and zero zc = -a are variable
the locus itself is variable and is not drawn at any instance. Again only the upper Left Hand plane is
 (pc, zc), (pc', zc') were made and for readability
drawn due to symmetry. Two attempts for a solution
reasons the second attempt was drawn "mirror image like" on the lower Left Half Plane. The student
is requested to neglect this inconvenience and assume that all regular upper plane conventions
(length and angle signs) are unaltered in this case too.
As mentioned before, in order to satisfy the settling time criterion the dominant complex roots
must have real parts ≤ -5, defined by the vertical line LM at -5 in Figure 10. In order to satisfy the
P.O. criterion  must be ≥ .6 hence the angle  must be less than 53.13° defined by the angle K0N in
Figure 10. This means that all admissible solutions should lie to the left of the boundary defined by
the points K, L, M, N.
pc
p2
p1
p'c
FIGURE 10. Root locus diagram containing solution trials (pc, zc) & (pc', zc').
13
Let the point s1 (-5, 5) be selected as a closed loop root, and place the compensator zero z c at (-5,
0) according to the method instructions. Applying the locus angle criterion, we find the angle of the
compensator pole c and its position on the -Im[s] axis as follows:
 1  arctan 45  128.66,  2  arctan 35  120.96,  c  90
 1   2   c   c  q180, (q  1, 3,5,...)   c  20.34
therefore

pc  5

5
 18.49
tan c
Applying the locus magnitude criterion the gain K and from it the Kp, are calculated as follows:
K

52  (5 1) 2 52  (5 2) 2 52  (18.49  5) 2
5 0
2
2
 107.43  K p 
K
 53.72
2
Comparing the result with the requested Kp = 100 the solution is not accepted.

As a second attempt the point sc' (-7, 7) is selected. The compensator zero is placed at z c' (-7, 0).
Again the same angle calculations take place:
1 arctan 67  130.6, 2 arctan 57  125.54, c 90
1 2 c c q180, (q  1, 3,5,...)  c 13.86
therefore

p
c  7 

7
 35.37
tanc
And the magnitude criterion gives for the K and Kp:
K

7 2  (7  1) 2 7 2  (7  2) 2 7 2  (35.37  7) 2
7 0
2
2
 331.7  K p 
K
 165.54
2
The position error criterion is met since 100 ≤ 165.54, thus the design is acceptable and the unknown
compensator coefficients are a = -7 and b = -35.37. The complex conjugate roots of the closed loop

transfer function are -7 ± 7j and since the difference between the open loop poles (3) and the zeros (1)
is 2, the third real closed loop root can be found[12] from the sum of the poles as:
si  pi  s3  7  j7  7  j7  35.37  2 1 s3  24.37
A final note about the design: from the way the roots were selected it's obvious that there are
infinite valid solutions. An important hidden restriction is the power requirements (translated in
increased gain K) needed for moving the complex poles to the desired positions. As a compromise, the
 seems to be an acceptable design with the smallest gain K required.
best solution
EXPERIMENTAL PROCEDURE
Follow the setup under the HARDWARE-SOFTWARE SETUP section for analog feedback
control and modified as shown in Figures 7 and 8 for B. For all runs, the error output voltage should
be monitored to insure that it doesn’t try to exceed the range of op amp (saturate & clip the control).
A. Proportional Control
Using equation (2) and the preceding Dead Zone equation calculate the required feedback gain to
14
meet the Dead Zone specification. Using a root locust plot for the system and  from equation (6) find
the gain that meets the percent overshoot specified. Try other values for the feedback gain in the
range and note the system’s response, commenting on the limitations of pure proportional feedback.
After investigating pure proportional control, add in the tacho feedback for PD control and find a set
of near-optimal gains for low overshoot and fast settling time.
B. Phase Lead Compensation
Using either method #1 or #2, design a phase lead compensator meeting all the specifications
simultaneously.
PART II – DIGITAL CONTROL
TUSTIN APPROXIMATION
Once an acceptable analog compensator has been found, its digital approximation can be derived
by using the Tustin approximation, (an approximation of the differential by a difference equation).
By substituting s 
2( z  1)
into the continuous compensator equation (4) a discrete transfer
T ( z  1)
function is obtained:
D( z)  A

z c
z d
(12)
Since the rest of the experiment will extensively use z-transforms, it is recommended that the
student review the relevant material by reading [13] or his/her favorite book.

Using an approach similar to that of PART I, a relation between the dead zone and the digital
controller D(z) can be found:
Dead Zone (degrees) 
0.70
D(1)
(13)
This relation will be used to calculate the third specification (velocity error constant).

MINIMAL PROTOTYPE COMPENSATOR
This part of the experiment deals with the design and implementation of a digital controller
based on the minimal prototype method[14]. For a zero order hold D/A converter and a system
with the transfer function:
G(s) 
Kv
s( m s  1)
(14)
the corresponding z-transform (using z = esT) is given by:



 1  m

 m 



 (1 z1 )Z K v 
2

1 
s (s   m ) 

s ( m s  1) 
 s

 K
G(s) 
Z G0 (s)G(s)  1 z G(z)  1 z1Z 

 (1 z1 )Z  2 v
1
 s 
or



 Tz1
 Tz1

 m 1 eT /  m z1 
 1  m

 m 
m
m
1
1



G(z)  Z K v 



K
1
z



K
1
z








v
v
1 2
1
1 2
1
1 T /  m
 2 s (s  1 ) 
1 z1eT /  m 

(1 z ) 1 z



 m 
(1 z ) 1 z 1 z e
 s
15
Simplifying the above expression,
 T
 T
 m 1 eT /  m 
0.48391 e2.0664T 
 3.986

G(z)  K v 


T /  m
2.0664T
(z
1)
(z
1)
z

e
z

e












And finally:


z

G(z)  3.986 T  0.48391 e2.0664T 
Te2.0664T  0.4839(1 e2.0664T )
T  0.4839(1 e2.0664T )
(z 1)(z  e2.0664T )
For a minimal prototype response to a step input, we want the overall transfer function K(z) to be
selected such that 1K( z)  1 z 1 . Therefore K( z)  z 1

The digital compensator D(z) is related to G(z) by the relation:


D( z) 
K( z)
G( z)[1 K( z)]
Substitution of K(z) and G(z) gives:

1
1
D(z) 


(z 1)G(z) 3.986 T  0.48391 e2.0664T 


z
z  e2.0664T
Te2.0664T  0.48391 e2.0664T 
T  0.48391 e2.0664T 
This controller has the same general form as equation (12) in the discrete approximation. Thus
exactly the same procedure is used for this part of the experiment as in the Tustin approximation.

RIPPLE FREE COMPENSATOR
The last part of the experiment is to design and run a digital controller based on the ripple free
(also called Finite Settling Time) design method[15]. This derivation is based on the z-transform
method. A derivation in the time domain may be found in [14].
From the minimal prototype part it is known that the z-transform of the motor response with
zero order hold is:
G( z)  K v T   m (1 E )
where for clarity:
TE   m (1 E )
T   m (1 E )
( z 1)( z E )
z
E  e2.0664T  eT /  m

Let c equal the zero of G(z), i.e.,
c

TE   m (1 E )
T   m (1 E )
(15)
For ripple free response, there are two requirements. The first requirement is the error sequence
e2(k) be of finite length, so that K(z) must contain all the zeros of G(z). If the system is to reach

steady state within 2 sample periods, the following equation must hold:


K( z)  1cz 1 a0 a1 z 1

16

(16)
where a0 and a1 must be determined. The second requirement for Ripple Free response is that the
system be able to follow a step input with zero steady state error. This gives the second relation:


1K( z)  1 z 1 1 b0 z 1

(17)
To determine a0, a1, and b0 substitute (16) into (17):


 

1
a0 a1 z 1  1 z 1 1 b0 z 1
 1 1cz

and applying coefficient matching:
a0  0

1
1 c
c
b0 
1c
(18)
a1 


As previously derived, the compensator
transfer function is:
 D( z) 
K( z)
G( z)[1 K( z)]
Substituting equations (16), (17) and (18) in the transfer function above we get:

D( z) 

1 cz 11 c z
1
K v T   m (1 E )
1




z c
1 1 
1 z 1 1
z 
( z  1)( z  E )
 1 c 


which reduces to:
1
(z E)
1
c
D( z) 

c 
K v [T   m (1 E )]z 

 1 c 

Substituting for c from (15) and further reducing:

D( z) 
1

K vT (1 E )
z E

E 
z   m 

T 1 E 
gives
D(z) 

1

3.986T(1 e2.0664T )
z  e2.0664T
0.4839
e2.0664T 
z  


1 e2.0664T 
 T
Again this controller has the same general form as equation (12) in the discrete approximation.
Thus exactly the same procedure is used for this part of the experiment as in the Tustin

approximation.
EXPERIMENTAL PROCEDURE
Follow the setup under the HARDWARE-SOFTWARE SETUP section for feedback control. The
hardware implementation is exactly the same as in the continuous feedback part (Figures 7 and 8),
yet now the controller will be implemented on the PC. To setup and execute the program, follow the
instructions under DIGITAL COMPUTER USAGE. The data input menu consists of the sampling
period T, the proportional gain offset A, the discrete compensator zero c and pole d. NOTE: the
17
LabVIEW digital controller works very well with the 33-125 op-amp set for unity gain (100k feedback
resistor). Make sure the wiring is consistent with your controller gain value calculations. If the 5x
gain is used the overall compensator gain must take it into consideration.
A. Tustin Approximation Compensation
Calculate the Tustin approximation coefficients A, c, and d. By choosing an appropriate sampling
period, you should find a digital approximation that will satisfactory control the motor's position. It is
suggested that you begin with a sampling time of about 100 ms and decrease it by steps of
approximately 20 ms down to 5 ms.
The step input may be applied using the S1 switch as before. Watch the oscilloscope traces to
note their position when the step is applied (apply the step when the traces cross a line on the
screen).
B. Ripple Free Compensation
Using the Ripple Free coefficients, it is recommended that appropriate sampling times for this
controller range from 1.0 to .01 seconds. Again, record the motor's response by using an oscilloscope
on the input signal on one channel and another channel on the motor position output.
C. Minimal Prototype Compensation
Using the Minimal Prototype coefficients, try to find the useful range of T for this controller.
What happens for large values of T (> 2 s)? Include saved oscilloscope screen shots and compare the
response with that of the minimal prototype case for a given T.
WRITE-UP
The write-up is one of the most important items when an experiment is performed. It is intended
that a part of the write-up be done during the lab session. Results of all three parts of the experiment
must be submitted in a formal write-up.
The following are minimum requirements to be included in the report:
1) Detailed description of the design of the analog compensator and the derivations of the
approximation and the discrete compensators, with analytical calculations and explanations of
the assumptions made.
2) Digital oscilloscope printouts of all runs, with appropriate scales and labels (set of coefficients
used) with short comments/explanations for each run.
3) Observations regarding the rising time, percent overshoot, settling time, steady state error, dead
zone, and even backlash and quantizing error must be noted for each run.
4) Comparisons of the various runs among different controllers using the same sampling period,
and among different periods for the same controller.
5) Answer to all questions raised in the handout.
6) A table summarizing the pros and cons of each controller along with its characteristics. This
table should serve as a guide for a "design engineer", so that using his own set of requirements
he would be able to select the proper controller.
NOTE: For practical discrete models of the analog motor system with sampling periods on the
order of hundreds of milliseconds, a significant delay of a few tenths of a second between when the
input step function is applied and when the digital controller first responds to it will impact the
18
perceived settling time of the implemented controller. It is appropriate to start at the leading edge of
the first controller output pulse after the step was applied to measure the system’s settling time.
REFERENCES
In addition to context specific references listed below with their relevant numbers on the left, the
first two entries contain general information pertaining to the broader area this experiment covers.
Melsa, Shultz, Linear Control Systems, McGraw Hill, 1969.
Shinners S.M., Modern Control System Theory and Application, Addison Wesley, 1972.
[1]
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
[10]
[11]
[12]
[13]
[14]
[15]
Dorf, R. C., Modern control Systems, A. Wesley 1980, pp. 119-122.
Cosgriff, R. L., Nonlinear Control Systems, Sections 6.8 and 5.4.
Frederick, D. K. and Carlson, A. B., Linear Systems in Communication and Control, J.
Wiley & Sons, 1971, pp. 364-366.
Dorf, R. C., Modern control Systems, A. Wesley 1980, p. 118.
Frederick, D. K. and Carlson, A. B., Linear Systems in Communication and Control, J.
Wiley & Sons, 1971, pp. 357-369.
Dorf, R. C., Modern control Systems, A. Wesley 1980, pp. 112-115.
Dorf, R. C., Modern control Systems, A. Wesley 1980, pp. 357-394.
Dorf, R. C., Modern control Systems, A. Wesley 1980, pp. 116-119.
Dorf, R. C., Modern control Systems, A. Wesley 1980, pp. 372-279.
Kailath, T., Linear Systems, Prentice Hall, 1980, pp. 31-35.
Frederick, D. K. and Carlson, A. B., Linear Systems in Communication and Control, J.
Wiley & Sons, 1971, pp. 83-84.
Frederick, D. K. and Carlson, A. B., Linear Systems in Communication and Control, J.
Wiley & Sons, 1971, pp. 382-383.
Cadzow, J. A., and Martens, H. R., Discrete-Time and Computer Control Systems,
Prentice Hall, 1970, Chapter 3.
Cadzow, J. A., and Martens, H. R., Discrete-Time and Computer Control Systems,
Prentice Hall, 1970, Chapter 7 and 9.
Ragazzini, J. R., and Franklin, G. F., Sampled Data Control Systems, McGraw Hill, 1958,
Chapter 7.
19
APPENDIX A – ANALOG COMPUTER WIRING DIAGRAM & 33-033
FIGURES
FIGURE 11. Comdyna GP-6 phase lead controller patch panel wiring.
FIGURE 12. Phase lead controller GP-6 device-annotated block diagram.
20
FIGURE 13. Feedback Instruments Ltd. 33-100 Mechanical Unit.
FIGURE 14. Feedback Instruments Ltd. 33-125 Servo Fundamentals.
21
APPENDIX B – Feedback Instruments LTD. 33-033 Reference Manual
Make sure the Reference Manual for the 33-033 DC Motor system has been downloaded from the
class web site (http:/www.rpi.edu/dept/ecse/rta/) and has been read in preparation for this
experiment.
22
Download