You are on page 1of 44

10/30/2013 (C) 2001, Ernest L.

Hall, University of Cincinnati 1


Manufacturing
Controls
FALL 2001
Lecture 8
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 2
Syllabus
DATE TOPIC NOTES
1. Sep. 20 Mechatronics Design Process Ch. 1
2. Sep. 25 System Modeling and Simulation Ch. 2
3. Sep. 27 Laplace Transforms and Transfer Functions Ch. 2
4. Oct. 2 Electrical Examples Ch.2, Notes
5. Oct. 4 Mechanical Examples Ch.2, Notes
6. Oct. 9 More Examples, Thermal and Fluid Examples, QUIZ 1 (Take Home)
7. Oct. 11 Sensors and Transducers Ch. 3
8. Oct. 16 Digital control, Advanced MATLAB
9. Oct. 18 Analog and Digital Sensing Ch. 3,
Notes
10. Oct. 23 Actuating Devices Ch. 4

11. Oct. 25 DC Motor Model Ch. 4,
Notes
12. Oct. 30 Boolean Logic Ch. 5
13. Nov. 1 Programmable Logic Controllers Ch. 5, Notes
14. Nov. 6 Stability and Compensators, P, PI and PD Ch. 6
15. Nov. 8 PID Controllers Ch. 7
16. Nov. 13 QUIZ 2 (In Class - Open Book)
17. Nov. 15 Practical and Optimal Compensator Design Ch. 8
18. Nov. 20 Frequency Response Methods Ch. 9, Notes
19. Nov. 22 THANKSGIVING HOLIDAY Ch. 9, Notes
20. Nov. 27 Optimal Design of a Motion Control System Ch. 9, Notes
21. Nov. 29 QUIZ 3 (In Class - Closed Book)
22. Dec. FINAL EXAM (In Class - Closed Book) Comprehensive
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 3
Todays objective
To continue the introduction
to systems theory by
introducing the concept of
digital control for
compensation of a feedback
control for the motorized
arm.
By the end of this class you
will be able to describe the
advantage of using
computers for control
compensation of a system.
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 4
Example
Suppose a DC motor is used to drive a robot
arm horizontally as shown in Figure 12.

Mg
x
y
L
Figure 12. A single joint robot arm driven by an armature-controlled DC motor
horizontally
z
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 5
Parameters
The link has a mass, M=5Kg, length L=1 m,
and viscous damping factor D = 0.1.
Assume the system input is a voltage signal
with a range of 0-10 volts.
This input signal is used to provide the
control voltage and current to the motor.
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 6
Goal- Specifications
The goal is to design a compensation
strategy so that an input voltage of 0 to 10
volts corresponds linearly of an angle of 0 to
an angle of 90.
A rise time less than 5 seconds.

10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 7
The motor parameters are
J
a
= 0.001 kg-m2/ s2
D
a
= 0.01 N-m s/rad
R
a
= 1 Ohm
L
a
= 0 H
K
b
= 1 V-s/rad
K
t
= 1 N-m/A


n = 1
2
2 2
. 4167 . 0
12
1 5
12
m kg
ML
J
L
=

= =
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 8
Impedence reflection to motor
side
According to the impedance reflection model
established before, the total inertia J and total
damping factor D are:
J = J
a
+ J
L
= 0.001+0.4167 = 0.4177 Kg.m2
D= D
a
+ D
L
= 0.01+0.1=0.11
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 9
Transfer function
Substituting the known
values gives

| | 1 1 ) 0 1 )( 11 . 0 4177 . 0 (
1
) (
) (
) (
+ + +
=
O
=
s s s s E
s
s G
L
) 11 . 1 4177 . 0 (
1
) (
+
=
s s
s G
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 10
Matlab m-file for motor only
D=0.1+0.01;
Num=Kt*n;
Den=[J*La J*Ra+La*D D*Ra+Kt*Kb 0];
step(Num, Den);
title(Step Response of the Motorized Robot
Arm);
End;
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 11
Response

0 2 4 6 8 10
0
500
1000
1500
Time (Seconds)
Step Response of Motorized Robot Arm
D
e
g
r
e
e

Figure 13. The motorized robot arm with velocity feedback step
response
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 12
Add feedback
Measure corresponding angle change. In this
case, Kp=(10-0)/(90-0)=0.1111 V/degree
The gear ratio is 1.
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 13
Feedback system
G(s)
H(s)=Kp
R(s)
C(s)
-
+
E(s)
F(s)
C(s) = G(s)E(s)
F(s) = H(s)C(s)
E(s) = R(s)-F(s)
C(s) = G(s)(R(s)-F(s)
C(s) = G(s)(R(s)-H(s)C(s))
C(s)=G(s)R(s)-G(s)H(s)C(s)
C(s)(1+G(s)H(s))=G(s)R(s)
C(s)/R(s) = G(s)/(1+G(s)H(s))
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 14

The new transfer function is:
0011 . 0 11 . 1 4177 . 0
1
) ( '
) ( 1
) (
) ( '
2
+ +
=
+
=
s s
s G
K s G
s G
s G
p
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 15
Matlab step response
computation
V=10;
Angle=90;
Kp=V/Angle; %feedback voltage/angle constant
G=tf([1],[0.4177 1.11 0]);
% the transfer function of the velocity loop
sysclose=feedback(G,Kp);
%the closed loop function of position feedback
step(sysclose);
end
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 16
Try this example
Does the response fit specifications.
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 17
Unit step response
Input of 1 volt
Figure 15. Step response of the position feedback uncompensated
system
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 18
Better but still not good
enough
After position feedback, the steady response
tends to be stable as shown in Figure 15.
However, the system response is too slow, to
make it have faster response speed, further
compensation is needed.
The following example describes the outline
of building a compensator for feedback
control system.
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 19
Other criteria
Rise time the time required for the
response to go from 0.1 to 0.9 of its final
value.
Settling time the time required for the
response to reach and stay within 2% of its
final value.
Steady state error difference between the
input and output for a given test input as time
approaches infinity.
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 20
New specification
The required response
could have an
overshoot below 10%
A settling time below
0.2 second
and a steady state error
of zero.
These seem OK.

Figure 15. Step response of the position feedback
uncompensated system
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 21
Rise time
The rise time is about 45 seconds.
So an improved rise time might be the
needed specification for this example.
Lets try a serial compensator.
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 22
Serial compensator
G(s)
H(s)
R(s)
C(s)
-
+
E(s)
F(s)
C(s) = G
c
(s)G(s)E(s)
F(s) = H(s)C(s)
E(s) = R(s)-F(s)
C(s) = G
c
(s)G(s)(R(s)-F(s)
C(s) = G
c
(s)G(s)(R(s)-H(s)C(s))
C(s)=G
c
(s)G(s)R(s)-G
c
(s)G(s)H(s)C(s)
C(s)(1+G
c
(s)G(s)H(s))=G
c
(s)G(s)R(s)
C(s)/R(s) = G
c
(s)G(s)/(1+G
c
(s)G(s)H(s))
G
c
(s)
E(s)
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 23
Compensator added


um(s) s u m (s) Ia(s) T(s)
output
180/t
rad 2 deg1
1/n
gear ratio1
n
gear ratio
compensator 1
La.s+Ra
Kt
Torque Constant
Sum2
Sum1
Kb
Motor angle velocity feedback
Kp
Load angle velocity feedback
s
1 1
Js+D
Input
uL(s)
Motor
Figure 14. Position and velocity feedback model of the motorized
rigid link
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 24
How do we design the
compensator?
Analog system
Digital system
We will explore the use of a digital
compensator using a digital filter in a
computer controller.
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 25
Digital Motion Control
With the many computer applications in
control systems, digital control systems have
become more important.
A digital system usually employs a
computerized controller to control continuous
components of a closed loop system.
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 26
The block diagram of the digital system is shown
below.
Two representations of digital control systems
(a) digital control system (b) digital controller
input Digital
Controller
plant output
(a)
c
T
0

+
_
c
m(z) c(z)
Sample switch
ADC
Digital
computer
DAC
(b)
E(z)
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 27
Sampling, A/D and D/A
Conversion
The digital system first samples the continuous
difference data, c, and then, with an A/D converter,
changes the sample impulses into digital signals and
transfers them into the computer controller.
The computer will processes these digital signals
with programmed control rules.
At last, through the digital to analog (D/A) converter,
the computing results are converted into an analog
signal, m(t), to control those continuous
components.
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 28
Sampling frequency must be
fast enough to prevent aliasing
The sampling switch closes every T
0

seconds. Each time it closes for a time span
of h with h<T
0
.
The sampling frequency, f
s
, is the reciprocal
of T
0
, fs= 1/T
0
. And e
s
=2t/T
0
is called the
sampling angular frequency.
Digital controller provides the system with
great flexibility. It can achieve compensation
values that are hard for analog controllers to
obtain.

10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 29
Sampling Theorem
Lets look at this reference
http://www.digitalfilter.com/cfs1.html
And this one for a graphical view
http://rkb.home.cern.ch/rkb/AN16pp/node253.html
And finally for a mathematical look
http://www-ccrma.stanford.edu/~jos/r320/Shannon_s_Sampling_Theorem.html
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 30
Digital-controlled Servo
System
A servo system is a motor control system that
combines various components to
automatically control a machines operation.
It is generally composed of a servo drive, a
motor, and feedback device.
A computer interfaced digital controller is a
key element.
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 31
Control components
The controller gets a feedback signal and outside
control signal and controls the servo drive and motor
together to precisely control torque, velocity, or
position of the motor shaft.
The feedback continuously reports the real time
status, which is compared to the command value.
Differences between the command position and
feedback signals are automatically adjusted by the
closed-loop servo system.
This closed-loop provides the servo system with
accurate, high performance control of a machine.
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 32
Digital Motion Control System
Design Example Bearcat Robot
Designing a PID controller for the drive motor
feedback system of Bearcat II Robot, the
autonomous unmanned vehicle was considered one
important step for its success.
Selecting the right parameters for the Proportional
Integral Derivative (PID) controller was required.
The motion control system of the AGV enables the
robot to maneuver, negotiate curves and drive
around obstacles on the course.
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 33
Short and long term responses
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 34
Feedback control
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 35
PID Compensator
P - current value of the error,
I - integral of the error over a recent time
interval
D - the current derivative of the error signal to
determine not only how much of a correction
to apply, but for how long.
Those three quantities are each multiplied by
tuning constants and added together to
produce the current controller output
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 36
PID equation
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 37
Effects of PID constants
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 38
Proportional
With proportional band, the
controller output is proportional
to the error or a change in
measurement
With a proportional controller,
offset (deviation from set-point)
is present. Increasing the
controller gain will make the
loop become unstable. Integral
action was included in
controllers to eliminate this
offset.
) ( ) (
) ( ) (
s E K s O
t e K t o
p
p
=
=
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 39
Integral
With integral action, the
controller output is
proportional to the amount
of time the error is present.
Integral action eliminates
offset.
The response is somewhat
oscillatory and can be
stabilized some by adding
derivative action.
s
s E
K s O
dt t e K O
I
I
) (
) (
) ) ( (
=
=
}
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 40
Derivative
With derivative action, the
controller output is
proportional to the rate of
change of the measurement
or error.
Derivative action can
compensate for a changing
measurement. Thus, the
derivative takes action to
inhibit more rapid changes of
the measurement than
proportional action. When a
load or set point change
occurs, the derivative action
causes the controller gain to
move the "wrong" way when
the measurement gets near
the set point. Derivative is
often used to avoid overshoot.
) ( ) (
) (
s sE K s O
dt
de
K t o
D
D
=
=
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 41
Frequency response descriptions
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 42
Frequency response
Derivative action can stabilize loops since it adds phase lead.
Generally, if one uses derivative action, more controller gain and reset
can be used. With a PID controller the amplitude ratio now has a dip
near the center of the frequency response. Integral action gives the
controller high gain at low frequencies, and derivative action causes the
gain to start rising after the "dip. At higher frequencies the filter on
derivative action limits the derivative action. At very high frequencies
(above 314 radians/time; the Nyquist frequency) the controller phase
and amplitude ratio increase and decrease quite a bit because of
discrete sampling. If the controller had no filter the controller amplitude
ratio would steadily increase at high frequencies up to the Nyquist
frequency (1/2 the sampling frequency). The controller phase now has
a hump due to the derivative lead action and filtering. The time
response is less oscillatory than with the PI controller. Derivative action
has helped stabilize the loop.
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 43
PID controller
PID controllers are designed to eliminate the need
for continuous operator attention.
Cruise control in a car and a house thermostat are
common examples of how controllers are used to
automatically adjust some variable to hold the
measurement (or process variable) at the set point.
A PID controller performs much the same function
as a thermostat but with a more elaborate algorithm
for determining its output
10/30/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 44
Any questions?

You might also like