This action might not be possible to undo. Are you sure you want to continue?
ECSE4760
RealTime Applications in Control &
Communications
ANALOG AND DIGITAL CONTROL OF A DC MOTOR
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 (p. 1.11 of the ES130
manual appended to this writeup):
Γ
π
(σ) ·
Κ
σ
Νσ(τ
µ
σ+1)
1
For the motor in the ES130 these constants are:
Κ
σ
· 165, Ν · 16, τ
µ
· 0.16
A scaling conversion factor of 34.9 Volts/rad is also present in the feedforward path,
resulting in the overall transfer function of the motor given by equation (1):
Γ
π
(σ) ·
360
σ(0.16 σ+1)
·
2250
σ(σ+ 6.25)
(1)
Due to the age and wear of the Feedback Ltd. ES130 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
Γ
π
(σ) ·
Κ
σ(τ
µ
σ+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.2 secs.
3) Dead zone at the output ≤ 4˚.
• 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
Attached at the end of this handout are parts of the ES130 technical manual covering
the theory and circuit details regarding the DC motor. Parts of the GP6 Analog Computer
Operator's Manual for details on programming the Comdyna have been included in the
course handouts. 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:
2
1) An armature controlled DC motor used as the process 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. (See p. 5 of the ES130 manual.) The servo system TYPE ES130
manufactured by Feedback Ltd., will provide the motor, the motor power supply, a servo
amplifier to drive the motor, the position sensor, and attenuators.
2) The Comdyna analog computer is used to build the analog compensator during the
first part 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 floppy disc 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 ES130 is divided into two sections, the SC125 control unit and the SA135 servo
assembly. The SC125 provides all the electrical networks and amplifiers while the SA135
provides the motor and the sensor. Once you have located these sections on the front
panel of the ES130, follow the setup procedure outlined below:
• On the SA135, connect socket 1 to socket 4. Connect socket 5 to ground.
• On the SC125, socket 1 outputs a voltage proportional to the difference between the
input angular position and the output angular position. The angular difference is
multiplied by 34.9 Volts/rad to convert from radians to Volts. Thus, if the input dial on
the SA135 is moved one radian with respect to the output dial, the voltage at socket 1
of the SC125 will be 34.9 Volts. This voltage can be attenuated by connecting socket 1
to socket 3, and using socket 4 as the input to the compensator (see the warning at the
end of the section). The output of the compensator should go to socket 18, an input to
the servo amplifier. The servo amplifier in turn drives the motor. Set the control
characteristic switch to ARMATURE.
• The motor is not energized unless the power dial is at ARM ON. Thus, if the motor goes
into oscillations, turn the dial to H.T. ON. Each time prior to using the motor, check and
recalibrate the Zero adjust on the SC125 when the power dial is on H.T. ON.
• To produce the step input required during the control runs, the polarity switch S1
located on the SA135 is flipped from direct to reverse. When the output has settled,
3
return the switch to direct again before the next run.
Even though adequate, the above explanation is by no means complete. The reader is
urged to refer to the ES130 manual for a more complete description of setup procedures as
well as answers to probable questions.
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 to perform 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 and
proportionally boosting the gain on the SC125 input.
One of the DSO channels must be connected to the process output SA135 socket 6 (and
ground), and the other one to the control signal SC125 socket 18 (or BNC2110 AO 0 port
on the PC for the discrete part), or to SC125 socket 4 (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. It is
therefore required that the 0.1 attenuator on the SC125 unit be used, before the % error
potentiometer, since the voltage at socket 1 can be as high as 50 Volts. The SC125 should
be set up so that socket 1 is connected to socket 3, and socket 4 is connected to the PC
BNC2110 AI 0 port. With the above configurations the % error potentiometer must be set
to 100%, so that no additional attenuation is inserted. It's suggested that all calculations
be done with the original transfer functions (attenuator = 1), and whenever the attenuator .
1 is used, the proportional gain is to be augmented accordingly with the amp on the SC125
set to a gain of 10.
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 very cautiously (under the TA's presence), be applied:
• Turn the % error pot to 10% and flip the 0.1 attenuator switch to 1.0;
• Start slowly incrementing the % error 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:
4
• 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 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 times, 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 the Tconnectors; make sure the connection is good. If when wiggling
you notice a difference in the response, change connectors. Occasionally the PC may
need to be restarted.
Proper sampling time T depends on the algorithm used to derive the gains, and for the
continuous implementations the general notion is the faster the sampling, the closer the
computer controller resembles the analog model (20 ms or less).
Sometimes the calculated values for the control signal exceed the ±10 Volts (D/A
limits). In these cases a softwareimplemented 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
DSO 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.
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]
K
v
by:
∆εαδ Ζονε (δεγρεεσ) ·
250
ϖελοχιτψ ερρορ χονσταντ
·
250
Κ
ϖ
This friction can be modeled as an external disturbance and must be taken into account
during the calculations. Figure 2 shows a typical block diagram with the disturbance f
n
and
the proportional gain g, and Figure 3 shows the phase plane trajectories for such a motor.
For more information on these figures and the motor friction in general see
[2]
.
5
The velocity error constant K
v
for a type 1 system (one free integrator) is given by
equation (2):
Κ
ϖ
·
σ→0
λ ι µ
σ Γ
χ
(σ)Γ
π
(σ)
(2)
(Note: for a type 0 system  no free integrators, K
v
will be zero.)
Prior to designing a dynamic compensator, it would be desirable to try a pure
proportional feedback controller of the form u(t)  Ke(t). Despite the fact that this is a type
1 system there is a possible nonzero 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 3.
g
Γ
π
(s)
e
+ +


Q
OUT
Q
IN
f
n
FIGURE 2. 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.2 s, one at a time? Why?
6
FIGURE 3. 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
Γ
χ
(σ)Γ
π
(σ)
is drawn
[3]
. Assume that each of the specifications is
individually satisfied, solve for the resulting gain K
p
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 K
p
. A detailed presentation of the root locus analysis can be found in
[5]
.
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 (3) 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.
Γ
χ
(s) = b
(s + a)
(s +b)
 1
10
( )
(3)
The scaling factor 0.1 incorporates the proportional gain and the minus sign offsets the
10 gain (0.1 × 10 = 1) introduced in the feedforward path by the ES130 op amp used to
keep the amplifiers on the Comdyna from overloading. The analog computer simulation of
the compensator is shown in Figure 4. For more accurate control, it is important to note that
the gain of the operational amplifier on the SC125 is nominally 10 but is off by a few
percent and the offset for the amp must be zeroed manually. This will have an effect on
gain calculations for all controllers, both analog and digital, that use the op amp. It is
7
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.
_a_
100
_b_
100
_ _
10
1
1
1
1
+
10
+
+
+
1
10
10
1
º
Y(s)
U(s)
Ψ(s)
U(s)
=b
(s+a)
(s+b)
×
1
10
æ
è
ç
ö
ø
÷
FIGURE 4. Analog computer simulation of the compensator. (The
−1
10
( )
is
cancelled by the
10 gain of the DC MOTOR ES130 Op Amp for an overall gain of +1.)
A general second order process
[6]
is described by its natural frequency ω
n
, and the
damping ratio ζ as:
Γ
χ
(Σ) ·
ω
ν
2
σ
2
+ 2ζω
ν
σ+ω
ν
2
(4)
Important timing measures defined in relation with a second order process are:
Settling Time:
Τ
σ
·
4
ζω
ν
Peak Time:
Τ
π
·
π
ων 1−ζ
2 (5)
and response measures for a step input are:
Peak Response:
Μπτ
·1+εξπ
−ζπ
1−ζ
2

.
`
,
Percent Overshoot:
Π.Ο. ·
Μ
π
τ
−1
1
×100%
(6)
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
8
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 rootlocus and
Bode plot (phasegain 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 DSO screen shots!
The first technique
[8]
assumes that the third order process is described by a closed loop
transfer function of the form:
Τ(σ) ·
Γ
χ
(σ)Γ
π
(σ)
1+Γ
χ
(σ)Γ
π
(σ)
·
ω
ν
2
(σ
2
+ 2ζω
ν
σ+ω
ν
2
)(γσ+1)
(7)
and imitates a second order one if the real root g of the characteristic equation obeys the
following:
1
γ
≥ 10ζω
ν
(8)
Thus using the specifications given, the coefficients of the model T(s) are computed. Since
G
p
(s) is known the above equation can in general be solved (coefficient matching) for the
unknown polynomial G
c
(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 phaselead 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 from poles and zeros to the desired root is odd multiple of 180° (root locus
angle criterion).
5) 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.
The DC motor compensated open loop transfer function F(s), for use in the root locus is:
Φ(σ) · ΚΓ
χ
(σ)Γ
π
(σ) · β
σ+α
σ+ β
×
2250
σ(σ+ 6.25)
·
Κ(σ+α)
σ(σ+ 6.25)( σ+ β)
(9)
The "extended" block diagram for the DC motor containing the compensator block is
shown in Figure 5.
9
13 7
−β −10
10
σ+α
σ+β
1
10
FIGURE 5. Extended Block Diagram including the compensator.
From (9) it's clear that
β ·
Κ
2250
(no attenuator taken into consideration here)
The admissibility criterion for any design meeting the P.O. and settling time
requirements, will be the error velocity constant K
v
which is computed using (2) as:
Κ
ϖ
· λιµ
σ→0
σΓ
χ
(σ)Γ
π
(σ) ·
Κα
6.25β
(10)
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 described above, and serve as a model for
the DC motor design.
EXAMPLE
We are given a second order process
Γ
π
(σ) ·
1
(σ+1)( σ+ 2)
. A feedback compensator
is to be designed so that the process response satisfies the following specifications:
settling time Ts = 0.8 sec;
percent overshoot P.O. = 10%;
position error constant
1
Κ
π
· 100
.
The specifications are translated using equations (5) and (6) as follows:
Τ
σ
· 0.8 ·
4
ζω
ν
⇒ζω
ν
· 5 (δεσιρεδ)
Π.Ο. · 10 · 100 εξπ
−ζπ
1−ζ
2

.
`
,
⇒ζ · 0.6
which means
θ · χοσ
−1
ζ · 53.13° (δεσιρεδ)
1
The system is of type 0 (no free integrator) hence the error characteristic is defined as the
position error constant
Κ
π
· λιµ
σ→0
Γ
χ
(σ)Γ
π
(σ)
.
10
The product
−ζω
ν
(for 2
nd
order systems) is equal to the real part of the closed loop
complex conjugate roots.
A. Pure Proportional Control
Figure 6 is the root locus of the open loop transfer function
Φ(σ) · ΚΓ
π
(σ) ·
Κ
(σ+1)( σ+ 2)
The open loop poles p
1
, p
2
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 6 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
θ · χοσ
−1
ζ · 53.13°, as
shown in Figure 6. The proportional gain is then calculated by applying the gain criterion
(and standard trigonometry), and from the gain the position error constant is evaluated:
Κ· (0.5)
2
+(1.5τ α ν θ )
2
(−0.5)
2
+(1.5τ α ν θ )
2
· 4.2 5
Κ
π
· Γ
χ
(0)Γ
π
(0) ·
Κ
2
· 2.125
FIGURE 6. Root locus for proportional feedback.
Obviously the position error constant K
p
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 (5),(6) ζ and θ are calculated, yielding the P.O.:
11
Κ · 2Κ
π
· 200
2 0 0 · (0.5)
2
+(1.5τ α ν θ)
2
(−0.5)
2
+(1.5τ α ν θ )
2
⇒ τ α ν θ · 9.4 2 2
Therefore
θ · 83.94° ⇒χοσθ ·ζ · 0.1055
and
Π.Ο. · 71.65%
Again the Percent Overshoot is unacceptable compared with the 10% requirement.
B. Feedback Compensator Design Method #1.
From equation (7) the compensator general solution can be found as:
Γ
χ
(σ)Γ
π
(σ)
1+Γ
χ
(σ)Γ
π
(σ)
·Τ(σ) ⇒Γ
χ
(σ) ·
Τ(σ)
[1−Τ(σ)]Γ
π
(σ)
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.
C. Feedback Compensator Design Method #2.
Figure 7 is the root locus of the transfer function
Φ(σ) · Γ
χ
(σ)Γ
π
( π) ·
Κ(σ+α)
(σ+1)( σ+ 2)( σ+ β)
with the process poles at p
1
= 1 and p
2
=2.
Since the compensator pole p
c
= b and zero z
c
= a are variable the locus itself is variable
and is not drawn at any instance. Again only the upper Left Hand plane is drawn due to
symmetry. Two attempts for a solution (p
c
, z
c
), (p
c
', z
c
') were made and for readability
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 7.
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 7. This means that all admissible solutions
should lie on the left of the boundary defined by the points K, L, M, N.
12
FIGURE 7. Root locus diagram containing solution trials (p
c
, z
c
) & (p
c
', z
c
')
Let the point s
1
(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
+θ
2
+θ
χ
−φ
χ
· θ180°, (θ· 1, 3, 5, ...) ⇒θ
χ
· 20.34°
therefore
π
χ
· −5−
5
τανθ
χ
· −18.49
Applying the locus magnitude criterion the gain K and from it the K
p
, are calculated as
follows:
13
Κ·
5
2
+(5−1)
2
5
2
+(5− 2)
2
5
2
+(1 8.4 9−5)
2
5
2
+ 0
2
· 1 0 7 .4 3⇒Κ
π
·
Κ
2
· 5 3.7 2
Comparing the result with the requested K
p
= 100 the solution is not accepted.
As a second attempt the point s
c
' (7, 7) is selected. The compensator zero is placed at
z
c
' (7, 0). Again the same angle calculations take place:
′ θ
1
· α ρ χ τ α ν
7
−6
· 1 3 0 .6°, ′ θ
2
· α ρ χ τ α ν
7
−5
· 1 2 5 .5 4°, ′ φ
χ
· 9 0°
′ θ
1
+ ′ θ
2
+ ′ θ
χ
− ′ φ
χ
· θ180°, (θ· 1, 3, 5, ...) ⇒ ′ θ
χ
· 13.86°
therefore
′ π
χ
· −7 −
7
ταν ′ θ
χ
· −35.37
And the magnitude criterion gives for the K and K
p
:
Κ ·
7
2
+(7 −1)
2
7
2
+(7 − 2)
2
7
2
+(3 5.3 7− 7)
2
7
2
+0
2
· 3 3 1 .7 ⇒Κ
π
·
Κ
2
· 1 6 5 .5 4
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:
Σσ
ι
· Σπ
ι
⇒σ
3
− 7 + ϕ7 − 7 − ϕ7 · −35.37 − 2−1⇒σ
3
· −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 best solution seems to be an acceptable design with the
smallest gain K required.
EXPERIMENTAL PROCEDURE
Follow the setup under the HARDWARESOFTWARE SETUP section for analog feedback
control and modified as shown in Figure 5 for B.
A. Proportional Control
Using equation (2) and the preceding Dead Zone equation calculate the required
feedback gain to 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.
B. Phase Lead Compensation
Using either method #1 or #2, design a phase lead compensator meeting all the
14
specifications simultaneously.
15
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
σ·
2( ζ−1)
Τ( ζ+1)
into the continuous compensator equation (3) a discrete
transfer function is obtained:
∆( ζ) · Α
ζ+χ
ζ+ δ
(11)
Since the rest of the experiment will extensively use ztransforms, 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:
∆εαδ Ζονε (ιν δεγρεεσ) ·
0.70
∆(1)
(12)
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:
Γ(σ) ·
Κ
ϖ
σ(τ
µ
σ+1)
(13)
the corresponding ztransform is given by:
Z
Γ
0
(s)G(s) { } = 1 z
 1
( ) Z
Γ (s)
s
ì
í
î
ü
ý
þ
or
Γ( ζ) · Κ
ϖ
1− ζ
−1
( )
Τζ
−1
(1− ζ
−1
)
2
−
τ
µ
1−ε
−Τ /τ
µ
( )
ζ
−1
1− ζ
−1
( )
1− ζ
−1
ε
−Τ /τ
µ
( )
]
]
]
]
Simplifying the above expression,
Γ( ζ) · Κ
ϖ
Τ
( ζ−1)
−
τ
µ
1−ε
−Τ /τ
µ
( )
ζ−ε
−Τ /τ
µ
( )
]
]
]
]
· 360
Τ
( ζ−1)
−
0.16 1−ε
−6.25Τ
( )
ζ−ε
−6.25Τ
( )
]
]
]
]
And finally:
16
Γ( ζ) · 360 Τ − 0.16 1−ε
−6.25Τ
( ) [ ]
ζ−
Τε
−6.25Τ
− 0.16(1−ε
−6.25Τ
)
Τ − 0.16(1−ε
−6.25Τ
)
( ζ−1)( ζ−ε
−6.25Τ
)
For a minimal prototype response to a step input, we want the overall transfer function
K(z) to be selected such that
1−Κ( ζ) · 1− ζ
−1
( ) . Therefore
Κ( ζ) · ζ
−1
The digital compensator D(z) is related to G(z) by the relation:
∆( ζ) ·
Κ( ζ)
Γ( ζ)[1−Κ( ζ)]
Substitution of K(z) and G(z) gives:
∆( ζ) ·
1
( ζ−1)Γ( ζ)
·
1
360 Τ −0.16 1−ε
−6.25Τ
( ) [ ]
×
ζ−ε
−6.25Τ
ζ−
Τε
−6.25Τ
− 0.16 1−ε
−6.25Τ
( )
Τ −0.16 1−ε
−6.25Τ
( )
This controller has the same general form as equation (11) 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 ztransform method. A derivation in the time domain may be found in
[14]
.
From the minimal prototype part it is known that the ztransform of the motor response
with zero order hold is:
Γ( ζ) · Κ
ϖ
Τ −τ
µ
(1−Ε)
[ ]
ζ−
ΤΕ −τ
µ
(1−Ε)
Τ −τ
µ
(1−Ε)
( ζ−1)( ζ−Ε)
where for clarity:
Ε · ε
−6.25Τ
· ε
−Τ /τ
µ
Let c equal the zero of G(z), i.e.,
χ·
ΤΕ −τ
µ
(1−Ε)
Τ −τ
µ
(1−Ε)
(14)
For ripple free response, there are two requirements. The first requirement is the error
sequence e
2
(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:
17
Κ( ζ) · 1−χζ
−1
( )
α
0
+α
1
ζ
−1
( ) (15)
where a
0
and a
1
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−Κ( ζ) · 1− ζ
−1
( )
1+ β
0
ζ
−1
( ) (16)
To determine a
0
, a
1
, and b
0
substitute (15) into (16):
1− 1−χζ
−1
( )
α
0
+α
1
ζ
−1
( )
· 1− ζ
−1
( )
1+ β
0
ζ
−1
( )
and applying coefficient matching:
α
0
· 0
α
1
·
1
1−χ
(17)
β
0
·
−χ
1−χ
As previously derived, the compensator transfer function is:
∆( ζ) ·
Κ( ζ)
Γ( ζ)[1−Κ( ζ)]
Substituting equations (15), (16) and (17) in the transfer function above we get:
∆( ζ) ·
1−χζ
−1
( )
1
1−χ
ζ
−1

.
`
,
Κ
ϖ
Τ −τ
µ
(1−Ε)
[ ]
ζ−χ
( ζ−1)( ζ−Ε)
1− ζ
−1
( )
1−
1
1−χ
ζ
−1

.
`
,
which reduces to:
∆( ζ) ·
1
1−χ
( ζ−Ε)
Κ
ϖ
[Τ −τ
µ
(1−Ε)] ζ−
χ
1−χ

.
`
,
Substituting for c from (14) and further reducing:
∆( ζ) ·
1
Κ
ϖ
Τ(1−Ε)
×
ζ−Ε
ζ+
τ
µ
Τ
−
Ε
1−Ε

.
`
,
gives
∆( ζ) ·
1
360Τ(1−ε
−6.25Τ
)
×
ζ−ε
−6.25Τ
ζ+
.16
Τ
−
ε
−6.25Τ
1−ε
−6.25Τ

.
`
,
18
Again this controller has the same general form as equation (11) 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 HARDWARESOFTWARE SETUP section for feedback control.
The hardware implementation is exactly the same as in the continuous feedback part
(Figure 5), yet now the controller will be implemented on the PC. To setup and execute the
program, follow the instructions under 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. When calculating the A factor, make sure that the attenuator (.1 or 1.) as well as
the 10 op amp gain is taken 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 a DSO between socket 6 of the SA135 and ground, and another channel of the
DSO between socket 4 of the SA135 and ground to measure the error.
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 DSO screen shots
and compare the response with that of the minimal prototype case for a given T.
WRITEUP
The writeup is one of the most important items when an experiment is performed. It is
intended that a part of the writeup be done during the lab session. Results of all three
parts of the experiment must be submitted in a formal writeup.
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
19
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.
20
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] Dorf, R. C., Modern control Systems, A. Wesley 1980, pp. 119122.
[2] Cosgriff, R. L., Nonlinear Control Systems, Sections 6.8 and 5.4.
[3] Frederick, D. K. and Carlson, A. B., Linear Systems in Communication and Control,
J. Wiley & Sons, 1971, pp. 364366.
[4] Dorf, R. C., Modern control Systems, A. Wesley 1980, p. 118.
[5] Frederick, D. K. and Carlson, A. B., Linear Systems in Communication and Control,
J. Wiley & Sons, 1971, pp. 357369.
[6] Dorf, R. C., Modern control Systems, A. Wesley 1980, pp. 112115.
[7] Dorf, R. C., Modern control Systems, A. Wesley 1980, pp. 357394.
[8] Dorf, R. C., Modern control Systems, A. Wesley 1980, pp. 116119.
[9] Dorf, R. C., Modern control Systems, A. Wesley 1980, pp. 372279.
[10] Kailath, T., Linear Systems, Prentice Hall, 1980, pp. 3135.
[11] Frederick, D. K. and Carlson, A. B., Linear Systems in Communication and Control,
J. Wiley & Sons, 1971, pp. 8384.
[12] Frederick, D. K. and Carlson, A. B., Linear Systems in Communication and Control,
J. Wiley & Sons, 1971, pp. 382383.
[13] Cadzow, J. A., and Martens, H. R., DiscreteTime and Computer Control Systems,
Prentice Hall, 1970, Chapter 3.
[14] Cadzow, J. A., and Martens, H. R., DiscreteTime and Computer Control Systems,
Prentice Hall, 1970, Chapter 7 and 9.
[15] Ragazzini, J. R., and Franklin, G. F., Sampled Data Control Systems, McGraw Hill,
1958, Chapter 7.
21
APPENDIX A – ANALOG COMPUTER WIRING DIAGRAMS
_a_
100
_b_
100
_ _
10
1
1
1
1
+
10
+
+
+
1
10
10
1
º
Y(s)
U(s)
Ψ(s)
U(s)
=b
(s+a)
(s+b)
×
1
10
æ
è
ç
ö
ø
÷
AMP 1
AMP 8
POT 2
POT 1
POT 3
AMP 7
AMP 2
AMP 6
AMP 4
AMP 3
Socket 4
Socket 7
22
POT 1 AMP 2
APPENDIX B – Feedback LTD. ES130 Technical Manual
Make sure a PDF copy of the manual for the ES130 DC Motor system has been
downloaded from the class web site (http:/www.rpi.edu/dept/ecse/rta/WebCT) and has been
read in preparation for this experiment.
23
For the motor in the ES130 these constants are:
Κσ = 165,
Ν = 16,
τ µ = 0.16
A scaling conversion factor of 34.9 Volts/rad is also present in the feedforward path, resulting in the overall transfer function of the motor given by equation (1):
Γ π(σ = )
360
σ (0.16 σ+ 1)
=
2250
σ σ+ 6.25) (
(1)
Due to the age and wear of the Feedback Ltd. ES130 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
Γ π(σ = )
Κ σ τ µ σ+ 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.2 secs. 3) Dead zone at the output ≤ 4˚. • 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 Attached at the end of this handout are parts of the ES130 technical manual covering the theory and circuit details regarding the DC motor. Parts of the GP6 Analog Computer Operator's Manual for details on programming the Comdyna have been included in the course handouts. 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:
2
ON. (See p. Set the control characteristic switch to ARMATURE. the position sensor.T. FIGURE 1. This voltage can be attenuated by connecting socket 1 to socket 3. refer to the Comdyna manual. Some experimentation with the time scale will be necessary so that responses are recorded with maximum detail. and attenuators. check and recalibrate the Zero adjust on the SC125 when the power dial is on H. The angular difference is multiplied by 34. In case of problems. Setting up the hardware connections is relatively straightforward.T. 2) The Comdyna analog computer is used to build the analog compensator during the first part of the experiment. the voltage at socket 1 of the SC125 will be 34. the SC125 control unit and the SA135 servo assembly. The ES130 is divided into two sections. follow the setup procedure outlined below: • On the SA135. The output of the compensator should go to socket 18.. 3) A PC running the relevant program used to implement the digital compensator. turn the dial to H. 4) A dual trace digital sampling oscilloscope (DSO).9 Volts/rad to convert from radians to Volts. if the input dial on the SA135 is moved one radian with respect to the output dial.1) An armature controlled DC motor used as the process to be controlled. Figure 1 shows an "extended" block diagram of the whole process containing all the necessary figures and connection links. Connect socket 5 to ground. socket 1 outputs a voltage proportional to the difference between the input angular position and the output angular position. When the output has settled. This is accomplished by means of an internal feedback path in the servo amplifier. The SC125 provides all the electrical networks and amplifiers while the SA135 provides the motor and the sensor. and the armature excitation is controlled. Thus. All the basic mathematical functions are available here and its usage is straightforward. No PC specific knowledge is required other than following the instructions included. • On the SC125.9 Volts. Each time prior to using the motor. DC Motor diagram with proportional feedback. for recording the input and motor response. an input to the servo amplifier. ON. You will want to save the screens of the digital oscilloscope to floppy disc files. • To produce the step input required during the control runs. 3 . the motor power supply. a servo amplifier to drive the motor. Thus. the polarity switch S1 located on the SA135 is flipped from direct to reverse.) The servo system TYPE ES130 manufactured by Feedback Ltd. will provide the motor. Once you have located these sections on the front panel of the ES130. and using socket 4 as the input to the compensator (see the warning at the end of the section). • The motor is not energized unless the power dial is at ARM ON. It is called as such because a constant field current is applied to the motor. The servo amplifier in turn drives the motor. connect socket 1 to socket 4. 5 of the ES130 manual. if the motor goes into oscillations.
This distinguishes this lab from the other control labs where the analog computer is used as the plant to be controlled. The Comdyna dial must be on the Pot Set position during setup. the proportional gain is to be augmented accordingly with the amp on the SC125 set to a gain of 10. • Return the settings to their original positions and modify the design so that the proportional gain is increased.1 attenuator switch to 1. One of the DSO channels must be connected to the process output SA135 socket 6 (and ground). before the % error potentiometer. since the voltage at socket 1 can be as high as 50 Volts. no response will take place. Here the DC motor is the plant and the Comdyna is the controller. try manually adjusting the parameters around their calculated points and rerun the experiment. A sustained overload condition. be applied: • Turn the % error pot to 10% and flip the 0. WARNING: Even though the D/A converters are protected from overload. If it is suspected that the error signal is too low. It is therefore required that the 0.return the switch to direct again before the next run. It's suggested that all calculations be done with the original transfer functions (attenuator = 1). 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. There will be cases where even though the control signal will be active. and the other one to the control signal SC125 socket 18 (or BNC2110 AO 0 port on the PC for the discrete part). The reader is urged to refer to the ES130 manual for a more complete description of setup procedures as well as answers to probable questions. and whenever the attenuator . during operation the dial must stay on Oper and pushbuttons switched between OP at the start and IC at and end of each run. however.1 attenuator on the SC125 unit be used. • Try running the experiment again.0. will affect the controller's operation. There is no problem if the indicator flashes on briefly during operation. then the following procedure must very cautiously (under the TA's presence). With the above configurations the % error potentiometer must be set to 100%. (DIGITAL) COMPUTER USAGE To access the LabVIEW program do the following: 4 . • Start slowly incrementing the % error pot and run the simulation until the output starts responding. the above explanation is by no means complete. 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. Even though adequate. so that no additional attenuation is inserted. Later the PC running LabVIEW will be used to perform as the digital controller. Special care must be taken when implementing the gains because of the sign inversions at the output of the amplifiers. or to SC125 socket 4 (and ground) to observe the error. and socket 4 is connected to the PC BNC2110 AI 0 port. The analog controllers are to be built on the Comdyna computer. These effects may be minimized by reducing the input step size or reducing the overall gain of the analog computer block and proportionally boosting the gain on the SC125 input. Use the maximum voltage range possible for more detailed results. 1 is used. • If problems persist. an input voltage in excess of +10 or 10 Volts can result in permanent damage to the A/D converter. The SC125 should be set up so that socket 1 is connected to socket 3.
PART I . nonlinear (static & Coulomb) friction is present in the motor. Try using a different sampling time or coefficients. If you notice the controller isn’t working properly: o Press the stop button then run the LabVIEW program again. To abort the program. If when wiggling you notice a difference in the response. For more information on these figures and the motor friction in general see [2]. Using smaller input step changes will also help. related to the error velocity constant[1] Kv by: ∆εαδ Ζονε (δεγρεεσ) = 250 250 = ϖελοχιτψ ερρορ χονσταντΚ ϖ This friction can be modeled as an external disturbance and must be taken into account during the calculations. and reset the output). the closer the computer controller resembles the analog model (20 ms or less). In many cases 10 ms will be around the lowest possible time. Figure 2 shows a typical block diagram with the disturbance f n and the proportional gain g. raise it until you find a workable value. make sure the connection is good. 5 . not the stop sign at the top of the page (this will prompt the program to calculate the actual sampling times. Proper sampling time T depends on the algorithm used to derive the gains. Occasionally the PC may need to be restarted. the controller needs to be stopped (by using the STOP button) before altering input values. Be warned though that if the signal remains at these levels very long (saturated). change connectors. and Figure 3 shows the phase plane trajectories for such a motor. press the STOP button on the screen. and for the continuous implementations the general notion is the faster the sampling. Not using the STOP button to halt execution may yield incorrect results on subsequent runs. This should reset the program and enable you to start from scratch. Press the right arrow icon at the top left corner of the window to start execution. resulting in a dead zone at the output of the motor. Although some values can be changed during execution by user input. There may be a few seconds delay before the VI completely halts. then erroneous results occur. A LabVIEW program will open with several parameter fields in the front panel.vi to load the program. it is important to note that to properly ensure correct measurements.ANALOG CONTROL PROPORTIONAL FEEDBACK CONTROLLER Even though the model of the motor is assumed linear. Double click DC Motor DAQmx+. Also if the average actual sample time observed on the DSO is higher than the sampling time entered in the front panel. In these cases a softwareimplemented clipper prevents the D/A control values from "wrapping" around by forcing them to stay at their respective max/min values. o Wiggle the Tconnectors. Sometimes the calculated values for the control signal exceed the ±10 Volts (D/A limits).• • • • • Turn the PC on (if off) and go to the DC_Motor subdirectory (My Computer\Local Disk): C:\CStudio\RTA_lab\DC_Motor. You could also simply take the average sample time as your sampling time for the test.
Kv will be zero. it would be desirable to try a pure proportional feedback controller of the form u(t) . Block diagram including friction input. the error velocity constant is specified. Despite the fact that this is a type 1 system there is a possible nonzero steady state error that depends on the size of the step input. fn QIN + e g + Γ π (s) QOUT FIGURE 2.Ke(t).no free integrators. one at a time? Why? 6 . Also note that the dead zone is twice the maximum absolute value of the steady state error. the system is completely determined for the proportional controller.) Prior to designing a dynamic compensator. Can you explain why this occurs? Typical phase plane trajectories are given in Figure 3. Notice that once you specify the dead zone. Therefore. 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. can you meet the specifications of overshoot ≤ 10%.2 s. or a settling time ≤ 0. For a dead zone of 4°.The velocity error constant Kv for a type 1 system (one free integrator) is given by equation (2): Κϖ =λ ι µ Γ( σ)Γ π ( σ) σχ σ→0 (2) (Note: for a type 0 system .
For more accurate control. The analog computer simulation of the compensator is shown in Figure 4. Use [4] for help in computing gain Kp.1 ( ) (s + b) 10 (3) The scaling factor 0.FIGURE 3. Note that the relation between the dead zone and the error velocity constant still holds. A detailed presentation of the root locus analysis can be found in [5]. it is important to note that the gain of the operational amplifier on the SC125 is nominally 10 but is off by a few percent and the offset for the amp must be zeroed manually. and β to satisfy the given criteria. Γ χ (s) = b (s + a) . b. Assume that each of the specifications is individually satisfied. Phase plane trajectories for the friction. a lead compensator (called phase lead because a < b) as in equation (3) is required to relocate the roots of the closed loop characteristic equation of the system. that use the op amp. DYNAMIC FEEDBACK CONTROLLER Since pure proportional feedback cannot produce a closed loop system meeting the specified requirements. Even though the questions can be answered by using only the equations in the following section. 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). both analog and digital. This will have an effect on gain calculations for all controllers.1 × 10 = 1) introduced in the feedforward path by the ES130 op amp used to keep the amplifiers on the Comdyna from overloading.1 incorporates the proportional gain and the minus sign offsets the 10 gain (0. it will be helpful for further analysis if the root locus for the open loop ) ) transfer function Γ χ ( σ Γ π ( σ is drawn[3]. The task is to determine the proper variables a. It is 7 .
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. = Μ πτ − 1 1 × 100% (6) There are various design techniques that yield an acceptable compensator satisfying all the specifications for the output. Since we're dealing with a second order process and a first order compensator. yet it must be noted that no unique solution exists and no first time success is guaranteed. 1 U(s) 1 1 1 + 1 10 10 º _b_ 100 _a_ 100 + 10 1 _ _ 10 + Y(s) + Ψ (s+a æ ö (s) ) 1 U =b(s+ )×10 (s) bç ÷ è ø FIGURE 4. are defined for a second order process. and the damping ratio ζ as: 2 ων Γ χ (Σ ) = 2 2 σ + 2ζω ν σ+ ω ν (4) Important timing measures defined in relation with a second order process are: Settling Time: Peak Time: and response measures for a step input are: Peak Response: Percent Overshoot: −ζπ Μ πτ = 1 + εξπ 1− ζ 2 Τσ = Τπ = π ω ν 1− ζ 2 4 ζω ν (5) Π.worthwhile to devise a quick experiment with an oscilloscope and function generator to measure the actual gain and zero the offset. by trial and error. a possible modification of the parameters. Also remember the nominal gain of 10 must be considered when calculating the gain A for the digital controllers. The overshoot and settling time specifications on the other hand. Analog computer simulation of the compensator. the resulting closed loop transfer function will be of third order.) A general second order process [6] is described by its natural frequency ωn. Two techniques will briefly be 8 . (The ( 10 ) −1 is cancelled by the 10 gain of the DC MOTOR ES130 Op Amp for an overall gain of +1. until all requirements are met might be necessary.
and the student is urged to use either them or his own favorite one. even using different compensator types can be found in [7]. 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). 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. If they are not admissible start the procedure again. Since Gp(s) is known the above equation can in general be solved (coefficient matching) for the unknown polynomial Gc(s). 4) Place the compensator pole in such a location that the algebraic sum of the angles of all vectors from poles and zeros to the desired root is odd multiple of 180° (root locus angle criterion). 3) Else a compensator is needed to modify the locus curves.25)( σ+ β) ( ( (9) The "extended" block diagram for the DC motor containing the compensator block is shown in Figure 5. The DC motor compensated open loop transfer function F(s). 2) Draw the uncompensated transfer function root locus and see if it passes nearby the desired roots. Place its zero directly under the desired roots. 5) Evaluate the new gain K as in step (2) and compare the design results with the specifications set.25) σ σ+ 6. for use in the root locus is: Φ( σ = ΚΓ χ ( σ Γ π ( σ = β ) ) ) σ+ α 2250 Κ ( σ+ α) × = σ+ β σ σ+ 6. An extensive analysis of both rootlocus and Bode plot (phasegain margin) techniques. the coefficients of the model T(s) are computed. The second technique [9] is a classic root locus phaselead compensator design. Remember the decisive factor for success or failure of a design is the experimental measuring of the specification values from the saved DSO screen shots! The first technique [8] assumes that the third order process is described by a closed loop transfer function of the form: Τ ( σ) = 2 Γ χ ( σ)Γ π ( σ) ων = 2 2 1 + Γ χ ( σ)Γ π ( σ) ( σ + 2ζω ν σ+ ω ν )(γσ+ 1) (7) and imitates a second order one if the real root g of the characteristic equation obeys the following: 1 γ ≥ 10ζω ν (8) Thus using the specifications given. 9 . applying his/her experience and initiative. and is broken down to the following steps: 1) Translate the design specifications (ζ.mentioned here. ωn) into desired dominant closed loop root locations.
EXAMPLE 1 . The specifications are translated using equations (5) and (6) as follows: ) We are given a second order process Γ π ( σ = Τσ = 0. The following example should clarify the methods described above.O.8 sec. = 10%. σ→0 10 .O.6 θ = χοσ−1 ζ = 53 . position error constant1 Κ π = 100 . and settling time requirements. = 1 = 1 0 ε π . A feedback compensator ( σ+ 1)( σ+ 2) is to be designed so that the process response satisfies the following specifications: settling time Ts = 0. and serve as a model for the DC motor design.25 β (10) 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.10 σ+α −β σ+β 1 10 7 −10 13 FIGURE 5. 0 0 ξ −ζπ 1− ζ 2 ⇒ ζ = 0.13 ° (δεσιρεδ) 1The system is of type 0 (no free integrator) hence the error characteristic is defined as the position error constant Κ π = λιµΓ χ ( σ)Γ π ( σ) . From (9) it's clear that β = Κ (no attenuator taken into consideration here) 2250 The admissibility criterion for any design meeting the P. will be the error velocity constant Kv which is computed using (2) as: Κϖ = λιµ σΓ χ ( σ Γ π ( σ = ) ) σ →0 Κα 6. Extended Block Diagram including the compensator. percent overshoot P.8 = which means 4 ⇒ ζω ν = 5 (δεσιρεδ) ζω ν Π Ο.
one following a course parallel to the Im[s] axis and the other parallel to the Im[s] axis.5 intersection point as their real part. Pure Proportional Control Figure 6 is the Φ( σ = ΚΓ π ( σ = ) ) Κ root locus of the open loop transfer function ( σ+ 1)( σ+ 2) The open loop poles p1. meet at 1. Obviously the position error constant Kp is not satisfied since the resulting 2. • Satisfying the P. yielding the P.13 ° .2 5 ν Κ π = Γ χ (0)Γ π (0) = Κ = 2.5τ θα)2 =4.The product −ζω ν (for 2nd order systems) is equal to the real part of the closed loop complex conjugate roots.O.O.(6) ζ and θ are calculated. as shown in Figure 6.6 and an angle θ = χοσ−1 ζ = 53 . The proportional gain is then calculated by applying the gain criterion (and standard trigonometry). 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. therefore the settling time requirement cannot be met by any proportional gain. p2 are located at 1 and 2. For simplicity only the upper Left Half Plane is shown in Figure 6 as the lower one is symmetric.: 11 . and from the gain the position error constant is evaluated: Κ = (0. From the gain and equations (5).125 2 FIGURE 6. • Satisfying the position error constant immediately defines the gain K. Root locus for proportional feedback. A.5)2 +(1. From the locus it is obvious that any closed loop complex roots will have the 1. requirement yields a ζ = 0.5τ θα)2 ν(−0.5 and split.5)2 +(1.125 is far below the required 100.
N.65% Again the Percent Overshoot is unacceptable compared with the 10% requirement.Ο.5)2 +(1. in fact it probably won't be. B.O. ( σ+ 1)( σ+ 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. Feedback Compensator Design Method #2. in order to satisfy the settling time criterion the dominant complex roots must have real parts ≤ 5. In order to satisfy the P.94° ⇒ χοσ = ζ = 0. Two attempts for a solution (pc. Feedback Compensator Design Method #1. (pc'. L. unless very careful manipulations of the coefficients take place. criterion ζ must be ≥ .5)2 +(1. Κ( σ+ α) Φ( σ = Γ χ ( σ Γ π ( π) = ) ) with the process poles at p 1 = 1 and p2 =2.13° defined by the angle K0N in Figure 7. As mentioned before. are unaltered in this case too. zc). From equation (7) the compensator general solution can be found as: Γ χ( σ Γ π ( σ ) ) Τ(σ ) = Τ (σ ⇒ Γ χ( σ = ) ) 1 + Γ χ( σ Γ π ( σ ) ) [1− Τ ( σ Γ π ( σ )] ) The only problem with the above formula is that it doesn't guarantee that the resulting compensator will be a lead compensator. For the scope of this experiment the analysis will stop here.4 2 2 Therefore and θ = 83. Again only the upper Left Hand plane is drawn due to symmetry.Κ = 2Κ π = 200 2 2 2 0 =0 (0. The student is requested to neglect this inconvenience and assume that all regular upper plane conventions (length and angle signs). C.5τ αθ )ν ⇒ τ αθ =ν9. This means that all admissible solutions should lie on the left of the boundary defined by the points K. zc') were made and for readability reasons the second attempt was drawn "mirror image like" on the lower Left Half Plane.1055 θ Π. = 71.5τ αθ )ν (−0.6 hence the angle θ must be less than 53. M. defined by the vertical line LM at 5 in Figure 7. Figure 7 is the root locus of the transfer function 12 .
3. 0) according to the method instructions.FIGURE 7.. zc') Let the point s1 (5. are calculated as follows: 13 . zc) & (pc'.34° therefore πχ = −5− 5 = −18. Root locus diagram containing solution trials (pc. and place the compensator zero zc at (5. 5) be selected as a closed loop root.) ⇒ θ χ = 20.5. Applying the locus angle criterion.. ( θ = 1..49 ταν χ θ Applying the locus magnitude criterion the gain K and from it the Kp. we find the angle of the compensator pole θc and its position on the Im[s] axis as follows: θ 1 + θ 2 + θ χ − φ χ = θ180 °.
Try other values for the feedback gain in the range and note the system’s response. Phase Lead Compensation Using either method #1 or #2. commenting on the limitations of pure proportional feedback.7 3⇒ Κ π = = 5 3. The compensator zero is placed at zc' (7. Proportional Control Using equation (2) and the preceding Dead Zone equation calculate the required feedback gain to meet the Dead Zone specification. design a phase lead compensator meeting all the 14 . the best solution seems to be an acceptable design with the smallest gain K required. B. thus the design is acceptable and the unknown compensator coefficients are a = 7 and b = 35..3 7− 7) 2 7 2 +0 2 Κ = 3 3 .1 ⇒ Κ π = = 1 6 . the third real closed loop root can be found [12] from the sum of the poles as: Σσ = Σπι ⇒ σ − 7 + ϕ − 7 − ϕ = −35.. ( θ = 1.37 7 7 ι 3 3 A final note about the design: from the way the roots were selected it's obvious that there are infinite valid solutions.55 4°. φ χ′ = 9 0° =1 =1 −6 −5 ′ ′ ′ ′ θ 1′ + θ 2 + θ χ − φ χ = θ180°. 3.5.37 − 2 − 1 ⇒ σ = −24.. As a second attempt the point sc' (7. An important hidden restriction is the power requirements (translated in increased gain K) needed for moving the complex poles to the desired positions.4 9−5) 2 52 + 0 2 Κ = 1 0 .06°. A. Using a root locust plot for the system and ζ from equation (6) find the gain that meets the percent overshoot specified. 7) is selected. 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.Κ= 52 +(5−1) 2 52 +(5− 2) 2 52 +(1 8. As a compromise.) ⇒ θ χ = 13.37 ταν χ θ′ therefore And the magnitude criterion gives for the K and Kp: Κ= 7 2 +(7 −1) 2 7 2 +(7 − 2) 2 7 2 +(3 5.37.5 4 7 5 2 The position error criterion is met since 100 ≤ 165. EXPERIMENTAL PROCEDURE Follow the setup under the HARDWARESOFTWARE SETUP section for analog feedback control and modified as shown in Figure 5 for B. Again the same angle calculations take place: θ 1′ = α ρ χ τ7 α ν 3 .54.86° ′ πχ = −7 − 7 = −35.7 2 4 2 Comparing the result with the requested Kp = 100 the solution is not accepted. θ 2′ = α ρ χ τ7 α ν 2 . 0).
15 .specifications simultaneously.
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: Γ ( σ) = the corresponding ztransform is given by: Κϖ σ τ µ σ+ 1) ( (13) ì Γ (s) ü 1 ý Z {Γ 0 (s)G (s)} = (1 . its digital approximation can be derived by using the Tustin approximation.16(1− ε −6. (an approximation of the differential by a difference equation).25Τ ) Τ − µ( = 360 Τ − Γ ( ζ) = Κϖ −6.PART II – DIGITAL CONTROL TUSTIN APPROXIMATION Once an acceptable analog compensator has been found. it is recommended that the student review the relevant material by reading [13] or his/her favorite book. a relation between the dead zone and the digital controller D(z) can be found: 0.z ) Z í î s þ or −1 τ µ (1− ε −Τ /τ µ ) ζ−1 Τζ Γ ( ζ) = Κ ϖ(1− ζ ) − (1− ζ−1 ) 2 (1− ζ−1 )(1− ζ−1ε −Τ /τ µ ) −1 Simplifying the above expression.70 ∆εαδ Ζονε (ιν δεγρεεσ) = (12) ∆ (1) This relation will be used to calculate the third specification (velocity error constant). Using an approach similar to that of PART I.25Τ −Τ / τ µ ( ζ − 1) ( ζ − 1) (ζ− ε ) (ζ− ε ) And finally: 16 . By substituting σ= 2( ζ − 1) into the continuous compensator equation (3) a discrete Τ ( ζ + 1) transfer function is obtained: ∆ ( ζ) = Α ζ+χ ζ+ δ (11) Since the rest of the experiment will extensively use ztransforms. τ 1− ε −Τ /τ µ ) 0.
we want the overall transfer function K(z) to be selected such that 1− Κ( ζ) = (1− ζ−1 ) .25Τ ) −6.16 (1− ε )] ( ζ − 1)( ζ − ε −6. Therefore Κ( ζ) = ζ−1 The digital compensator D(z) is related to G(z) by the relation: Κ ( ζ) ∆ ( ζ) = Γ ( ζ)[1− Κ( ζ)] Substitution of K(z) and G(z) gives: ∆ ( ζ) = 1 1 = × ( ζ − 1)Γ ( ζ) 360 [Τ − 0..16(1− ε −6.16 (1− ε −6. i.25Τ = ε −Τ /τ µ Let c equal the zero of G(z). the following equation must hold: 17 . Thus exactly the same procedure is used for this part of the experiment as in the Tustin approximation.16(1− ε −6. A derivation in the time domain may be found in[14].25Τ ) ζ− Τ − 0.16 (1− ε −6.Τε −6. If the system is to reach steady state within 2 sample periods. χ= ΤΕ − τ µ (1− Ε ) Τ − τ µ (1− Ε ) (14) For ripple free response.25 Τ ) Τ − 0. 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).25Τ ) For a minimal prototype response to a step input.16 (1− ε −6. 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].25 Τ ) This controller has the same general form as equation (11) in the discrete approximation.25 Τ )] ζ − ε −6.25 Τ ζ− Τε −6. From the minimal prototype part it is known that the ztransform of the motor response with zero order hold is: ζ− Γ ( ζ) = Κ ϖ[Τ − τ µ (1− Ε )] where for clarity: ΤΕ − τ µ (1− Ε ) Τ − τ µ (1− Ε ) ( ζ − 1)( ζ − Ε ) Ε = ε −6.e.25 Τ − 0.25Τ − 0.25Τ Γ ( ζ) = 360 [Τ − 0. there are two requirements. This derivation is based on the ztransform method.
Κ( ζ) = (1− χζ−1 )(α0 + α ζ−1 ) 1 (15) where a0 and a1 must be determined. (16) and (17) in the transfer function above we get: 1 −1 ζ−1 (1− χζ ) 1− χ ∆ ( ζ) = ζ− χ 1 −1 Κ ϖ[Τ − τ µ (1− Ε )] ζ−1 (1− ζ )1− ( ζ − 1)( ζ − Ε ) 1− χ which reduces to: 1 ( ζ− Ε ) 1− χ ∆ ( ζ) = χ Κ ϖ[Τ − τ µ (1− Ε )] ζ − 1− χ Substituting for c from (14) and further reducing: ∆ ( ζ) = gives 1 × Κ ϖΤ (1− Ε ) ζ− Ε τ Ε ζ+ µ − 1− Ε Τ ∆ ( ζ) = 1 × 360 Τ (1− ε −6.25Τ .16 ε −6. 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− Κ( ζ) = (1− ζ−1 )(1 + β0 ζ−1 ) To determine a0.25Τ ζ+ − 1− ε −6. a1.25Τ ) ζ − ε −6. and b0 substitute (15) into (16): (16) 1− (1− χζ −1 )(α0 + α ζ−1 ) = (1− ζ−1 )(1 + β0 ζ−1 ) 1 and applying coefficient matching: α0 = 0 1 α = 1 1− χ −χ β0 = 1− χ (17) As previously derived.25Τ Τ 18 . the compensator transfer function is: ∆ ( ζ) = Κ ( ζ) Γ ( ζ)[1− Κ( ζ)] Substituting equations (15).
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). you should find a digital approximation that will satisfactory control the motor's position.01 seconds. The step input may be applied using the S1 switch as before. A. the discrete compensator zero c and pole d. follow the instructions under COMPUTER USAGE. What happens for large values of T (> 2 s)? Include saved DSO screen shots and compare the response with that of the minimal prototype case for a given T. record the motor's response by using a DSO between socket 6 of the SA135 and ground. To setup and execute the program. the proportional gain offset A. Again. EXPERIMENTAL PROCEDURE Follow the setup under the HARDWARESOFTWARE SETUP section for feedback control. with appropriate scales and labels (set of 19 . Thus exactly the same procedure is used for this part of the experiment as in the Tustin approximation. Results of all three parts of the experiment must be submitted in a formal writeup. Minimal Prototype Compensation Using the Minimal Prototype coefficients. The data input menu consists of the sampling period T. try to find the useful range of T for this controller. and d.1 or 1. WRITEUP The writeup is one of the most important items when an experiment is performed.0 to . 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. yet now the controller will be implemented on the PC. 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. Ripple Free Compensation Using the Ripple Free coefficients. When calculating the A factor.) as well as the 10 op amp gain is taken into consideration. make sure that the attenuator (. Tustin Approximation Compensation Calculate the Tustin approximation coefficients A.Again this controller has the same general form as equation (11) in the discrete approximation. c. The hardware implementation is exactly the same as in the continuous feedback part (Figure 5). C. B. with analytical calculations and explanations of the assumptions made. By choosing an appropriate sampling period. It is intended that a part of the writeup be done during the lab session. and another channel of the DSO between socket 4 of the SA135 and ground to measure the error. it is recommended that appropriate sampling times for this controller range from 1. 2) Digital oscilloscope printouts of all runs.
so that using his own set of requirements he would be able to select the proper controller. settling time. and even backlash and quantizing error must be noted for each run. 5) Answer to all questions raised in the handout. dead zone. 6) A table summarizing the pros and cons of each controller along with its characteristics. 4) Comparisons of the various runs among different controllers using the same sampling period. steady state error.coefficients used) with short comments/explanations for each run. 20 . percent overshoot. 3) Observations regarding the rising time. This table should serve as a guide for a "design engineer". and among different periods for the same controller.
.. Sampled Data Control Systems. Wesley 1980.. 1971. pp. Linear Systems in Communication and Control. A. 8384. K. L. Melsa. R. 357369. 118. F.. pp. 1971. C. R. Chapter 3. [9] Dorf. D. Chapter 7 and 9. [10] Kailath.. A. A.8 and 5. J. Wesley 1980. Modern control Systems. K. 1969.. [11] Frederick. pp. 1971. R. J. G. A. Linear Systems in Communication and Control.. [13] Cadzow. [2] Cosgriff. Wiley & Sons. Linear Systems in Communication and Control. A. and Carlson. 112115. Sections 6. pp. Modern control Systems. Modern control Systems. [7] Dorf. and Carlson. 357394. Nonlinear Control Systems. A. B. Modern control Systems. pp. C. C.. B. pp. R. Linear Systems in Communication and Control. Modern control Systems. D. [12] Frederick. A. McGraw Hill.. A.. T. 364366. 1958. and Martens. McGraw Hill. K. R. pp..M. [8] Dorf. Prentice Hall. pp. Modern control Systems.. Linear Systems... R. R. 1970. the first two entries contain general information pertaining to the broader area this experiment covers. [1] Dorf. 1972. 116119.. D. J. 3135. [3] Frederick.. J. pp.REFERENCES In addition to context specific references listed below with their relevant numbers on the left. Wiley & Sons. Wesley 1980. [5] Frederick. and Carlson. pp. Linear Control Systems. A. [14] Cadzow. 1970. B. and Carlson.4. 21 . D. Shinners S... DiscreteTime and Computer Control Systems. Chapter 7. 119122. Wesley 1980. H. K. Shultz. R. R. J. C. J. Prentice Hall. B. J. C. A. Modern Control System Theory and Application.. 372279. Addison Wesley. Wesley 1980. A. R. A. 1971. H. Wesley 1980. and Franklin. [4] Dorf. and Martens. Wiley & Sons. Wiley & Sons. [15] Ragazzini. C. 1980. 382383. Prentice Hall. DiscreteTime and Computer Control Systems. [6] Dorf. p.
APPENDIX A – ANALOG COMPUTER WIRING DIAGRAMS 1 U(s) S ocke t 4 1 AMP 7 1 _a_ 100 PO T 2 + 1 AMP 1 10 º AMP 3 + 10 AMP 4 1 AMP 8 _ _ 10 PO T 3 1 + AMP 6 Y(s) S ocke t 7 10 + AMP 2 _b_ 100 PO T 1 Ψ (s+a) æ ö (s) 1 U =b(s+ )×10 (s) bç ÷ èø 22 AMP 2 POT 1 .
23 . ES130 Technical Manual Make sure a PDF copy of the manual for the ES130 DC Motor system has been downloaded from the class web site (http:/www.APPENDIX B – Feedback LTD.edu/dept/ecse/rta/WebCT) and has been read in preparation for this experiment.rpi.
This action might not be possible to undo. Are you sure you want to continue?
We've moved you to where you read on your other device.
Get the full title to continue reading from where you left off, or restart the preview.