You are on page 1of 23

Rensselaer Polytechnic Institute

ECSE-4760
Real-Time 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 write-up):

Κσ
Γ π ( σ) =
Νσ(τ µ σ+ 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 2250
Γ π ( σ) = = (1)
σ(0.16 σ+ 1) σ( σ+ 6.25)

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 GP-6 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 BNC-2110 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
BNC-2110 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 T-connectors; 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 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
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] Kv 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 Kv for a type 1 system (one free integrator) is given by
equation (2):

Κϖ =λ ι µσ Γχ( σ)Γ π ( σ) (2)


σ→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 u(t) - Ke(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 3.

fn

QIN - QOUT
+
e
g + Γ π (s)
-

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 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].

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 + a) - 1
Γ χ (s) = b ( ) (3)
(s + b) 10

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.

-1

U(s) -1 -1
-10 _ _ -1
+ _a_ + -1
10 Y(s)
º 100 +
-1 -10

-10 _b_

+
100
Ψ(s) (s+a) æ-1ö
U(s)=b(s+b)×çè10÷
ø

FIGURE 4. Analog computer simulation of the compensator. (The


−1 is
( 10 )
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 (4)
σ + 2ζω ν σ+ ω ν2

Important timing measures defined in relation with a second order process are:

4
Settling Time: Τσ =
ζω ν
π
Peak Time: Τπ =
ω ν 1− ζ 2 (5)

and response measures for a step input are:


 

Peak Response: Μ πτ = 1 + εξπ 


−ζπ 
 1− ζ 2 
 

Μ πτ − 1
Percent Overshoot: Π.Ο. = × 100% (6)
1
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 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 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 (7)
1 + Γ χ ( σ)Γ π ( σ) ( σ + 2ζω ν σ+ ω ν2 )(γσ+ 1)

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
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 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 Κ ( σ+ α)
Φ( σ) = ΚΓ χ ( σ)Γ π ( σ) = β × = (9)
σ+ β σ( σ+ 6.25) σ( σ+ 6.25)( σ+ β)

The "extended" block diagram for the DC motor containing the compensator block is
shown in Figure 5.

9
10

σ+α -1
σ+β
−β
10 −10

13
7

FIGURE 5. Extended Block Diagram including the compensator.

Κ
From (9) it's clear that β = (no attenuator taken into consideration here)
2250

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:

Κα
Κϖ = λιµ σΓ χ ( σ)Γ π ( σ) = (10)
σ→0 6.25 β

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

1
We are given a second order process Γ π ( σ) = . A feedback compensator
( σ+ 1)( σ+ 2)
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 constant1 Κ π = 100 .
The specifications are translated using equations (5) and (6) as follows:

4
Τσ = 0.8 = ⇒ ζω ν = 5 (δεσιρεδ)
ζω ν
 
−ζπ
Π.Ο . = 10 = 100 εξπ   ⇒ ζ = 0.6
 
 1− ζ 2

which means
θ = χοσ−1 ζ = 53 .13 ° (δεσιρεδ)

1The system is of type 0 (no free integrator) hence the error characteristic is defined as the
position error constant Κ π = λιµΓ χ ( σ)Γ π ( σ) .
σ→0

10
The product −ζω ν (for 2nd 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 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 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.125
2

FIGURE 6. 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 (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


Κ( σ+ α)
Φ( σ) = Γ χ ( σ)Γ π ( π) = with the process poles at p 1 = -1 and p2 =-2.
( σ+ 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. Again only the upper Left Hand plane is drawn due to
symmetry. Two attempts for a solution (pc, zc), (pc', zc') 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 (pc, zc) & (pc', zc')

Let the point s1 (-5, 5) be selected as a closed loop root, and place the compensator
zero zc 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 Kp, are calculated as
follows:

13
52 +(5−1) 2 52 +(5− 2) 2 52 +(1 8.4 9−5) 2 Κ
Κ= = 1 0 .74 3⇒ Κ π = = 5 3.7 2
52 + 0 2 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
zc' (-7, 0). Again the same angle calculations take place:

θ 1′ = α ρ χ τ−67 α= ν1 3 .06°, θ 2′ = α ρ χ τ−57 α= ν1 2 .55 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 Kp:

7 2 +(7 −1) 2 7 2 +(7 − 2) 2 7 2 +(3 5.3 7− 7) 2 Κ


Κ= = 3 3 .17 ⇒ Κ π = = 1 6 .55 4
7 2 +0 2 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:

Σσι = Σπι ⇒ σ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 HARDWARE-SOFTWARE 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).

2( ζ − 1)
By substituting σ= into the continuous compensator equation (3) a discrete
Τ ( ζ + 1)
transfer function is obtained:
ζ+χ
∆ ( ζ) = Α (11)
ζ+ δ
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:
0.70
∆εαδ Ζονε (ιν δεγρεεσ) = (12)
∆ (1)

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:
Κϖ
Γ ( σ) = (13)
σ(τ µ σ+ 1)

the corresponding z-transform is given by:

ì Γ (s) ü
Z {Γ 0 (s)G (s)} = (1 - z ) Z í
-1
ý
î s þ
or
 τ µ (1− ε −Τ /τ µ ) ζ−1 
 Τζ−1 
Γ ( ζ) = Κ ϖ(1− ζ ) −1

 (1− ζ−1 ) 2 (1− ζ−1 )(1− ζ−1ε −Τ /τ µ ) 
 

Simplifying the above expression,

 τ µ (1− ε −Τ /τ µ )   0.16(1− ε −6.25Τ ) 


 Τ   Τ 
Γ ( ζ) = Κϖ − = 360 −
 ( ζ − 1) (ζ− ε
−Τ / τ µ
)   ( ζ − 1) (ζ− ε
−6.25Τ
) 
 

And finally:

16
Τε −6.25Τ − 0.16(1− ε −6.25Τ )
ζ−
Τ − 0.16(1− ε −6.25Τ )
Γ ( ζ) = 360 [Τ − 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 ζ − ε −6.25 Τ
∆ ( ζ) = = ×
( ζ − 1)Γ ( ζ) 360 [Τ − 0.16 (1− ε −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 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:

ΤΕ − τ µ (1− Ε )
ζ−
Τ − τ µ (1− Ε )
Γ ( ζ) = Κ ϖ[Τ − τ µ (1− Ε )]
( ζ − 1)( ζ − Ε )

where for clarity:


Ε = ε −6.25Τ = ε −Τ /τ µ
Let c equal the zero of G(z), i.e.,

ΤΕ − τ µ (1− Ε )
χ= (14)
Τ − τ µ (1− Ε )

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:

17
Κ( ζ) = (1− χζ−1 )(α0 + α1 ζ−1 ) (15)

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− Κ( ζ) = (1− ζ−1 )(1 + β0 ζ−1 ) (16)


To determine a0, a1, and b0 substitute (15) into (16):

1− (1− χζ −1 )(α0 + α1 ζ−1 ) = (1− ζ−1 )(1 + β0 ζ−1 )

and applying coefficient matching:


α0 = 0
1
α1 = (17)
1− χ
−χ
β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 ζ − ε −6.25Τ
∆ ( ζ) = ×
360 Τ (1− ε −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 HARDWARE-SOFTWARE 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.

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

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. 119-122.
[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. 364-366.
[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. 357-369.
[6] Dorf, R. C., Modern control Systems, A. Wesley 1980, pp. 112-115.
[7] Dorf, R. C., Modern control Systems, A. Wesley 1980, pp. 357-394.
[8] Dorf, R. C., Modern control Systems, A. Wesley 1980, pp. 116-119.
[9] Dorf, R. C., Modern control Systems, A. Wesley 1980, pp. 372-279.
[10] Kailath, T., Linear Systems, Prentice Hall, 1980, pp. 31-35.
[11] Frederick, D. K. and Carlson, A. B., Linear Systems in Communication and Control,
J. Wiley & Sons, 1971, pp. 83-84.
[12] Frederick, D. K. and Carlson, A. B., Linear Systems in Communication and Control,
J. Wiley & Sons, 1971, pp. 382-383.
[13] Cadzow, J. A., and Martens, H. R., Discrete-Time and Computer Control Systems,
Prentice Hall, 1970, Chapter 3.
[14] Cadzow, J. A., and Martens, H. R., Discrete-Time 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

-1
AMP 7
U(s) -1 -1
S ocke t 4 -10 _ _ -1
+ _a_ + -1
10 Y(s)
º 100 AMP 8 +
-1 AMP 1 -10 AMP 4
PO T 3 S ocke t 7
AMP 3 AMP 6
PO T 2

-10 _b_

+
100
Ψ(s) (s+a) æ-1ö
PO T 1 U(s)=b(s+b)×çè10÷
ø
AMP 2

22

AMP 2 POT 1
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

You might also like