Modelling, Feedback Control Design and Simulation of An Industrial Application
Modelling, Feedback Control Design and Simulation of An Industrial Application
of an Industrial Application
Dean P. Stavrou#1
#
Electrical Engineering Dept., Cleveland State University
2121 Euclid Ave, Cleveland Ohio 44115-2214, USA
1
[email protected]
Abstract— These instructions outline the process and reasoning used The positioning control system consists of a digital controller, a
to design and model a feedback control system to a positioning control DC motor drive and a load of 235 lbs which is to be moved linearly
system for an industrial motion application. The system must be by 12 inches in 0.3 seconds with an accuracy of 1% or better.
designed so that a load can be moved 12 inches in 0.3 seconds with an
accuracy of 1% or better. To meet the design requirements a negative II. SYSTEM PARAMETERS
feedback control system and a PID controller will be utilized.
The part selection, system parameters and plant model for the
I. INTRODUCTION positioning control system has already been completed by
Modern control theory is based on the same principles from the Professors Donald Zeller and Jack Zeller. Their results can be
late 1700’s. James Watt invented his centrifugal governor in 1788. found below
This device utilized feedback control to regulate the amount of fuel
given to an engine to maintain a constant speed. This device paved A. Electrical Parameters
the way for the internal combustion engine and modern control
Winding resistance and inductance: Ra = 0.4 Ω La = 8 mH (The
theory.
transfer function of the armature voltage to the current is
Negative feedback control is used to establish equilibrium in a
system by feeding back the systems output to the input. This
feedback is measured to the reference of the system and will
produce an error which is then adjusted by a controller. This error
( R1 )
a
application. V
A Proportional-Integral-Derivative or PID controller is a K e =1.49
Back EMF constant: rad
mechanism used for feedback control. A PID controller corrects the
error between a measured process variable and a desired setpoint
( ) sec
by calculating then outputting a corrective action that can adjust the Power Amplifier Gain: K pa=80
process accordingly. V
The PID controllers algorithm consists of three parameters, the Current Feedback Gain: K cf =.075
Proportional, Integral and Derivative gains. The Proportional gain amp
determines the reaction to the current error, the Integral gain B. Mechanical Parameters
determines the reaction based on the sum of recent errors, and the
Derivative gain determines the reaction to the rate at which the ¿∗lb
Torque Constant: K t =13.2
error has been changing. The weighted sum of these three amp
parameters is used to adjust the process via a control element, Motor Inertia: J M =.05 lb∗¿∗sec
2
which in this case would be load position. When calculating
transfer functions for control systems including a PID controller, Pulley Radius: R p =1.25∈¿
the controller can be represented mathematically by the equation Load Weight: W =235 lbs ( including the assembly )
t
de W 2
K p e (t)+ K I ∫ e ( t ) dt+ K d
0 dt
Total Inertia: J t =J m + J 1=.05+
g ( )
Rp
This can be simplified by taking the Laplace Transform yielding ¿ 1.0 lb∗¿∗sec 2
ki Maximum Armature Current=100 A
k p+ +k s Maximum Torque=K t I a , max=1320∈¿ lbs
s d
1320 rad
Maximum Angular Acceleration= =1320
Jt sec 2
1650
Maximum Linear Acceleration=1320 R p=1650 ¿ 2 =4.27 g
sec 386 ( )
Kcf
Current Feedback Gain 3
la
1.49
Ke
Back EMF Constant
80
2.5
.02s+1
13.2
s
1.25
Vout
1
s
Xout
(
1+ ( 80∗G1 ( s ) ) (.075 ) ( 13.2s ))
Step Kpa Aramture Dynamic Acc To Vel*Total Inertia (Jt)*Torque Constant (Kt) Rp Vel To Pos Scope
Power Amp Pulley Radius
165000
G 2 ( s )= 2
( s +800 s +2462.48)
1.49
Ke
Back EMF Constant
s
.075
13.2
Kcf Vel to Acc
Current Feedback Gain
Reference
Figure 2: Manipulated Block Diagram G2(s) Vout 1 Xout
1.25
1 s
The feedback paths have been moved to the same point on the Step G1(s) Rp Vel To Pos Scope
block diagram and multiple blocks have been compressed into one Transfer Function Pulley Radius
V out 165000
= 2
V c (s +800 s +2462.48)
Figure 3: Innermost feed-back loop equals G1(s)
X out V out 1
1650 =
G 1 ( s )= 2 Vc Vc s
s +50 s+2458.5
X out 165000
=
V c s ( s¿¿ 2+800 s +2462.48)¿
V out
V. DC GAIN, POLES AND ZEROS OF
Vc
V out
A DC ( )
Vc
=53.605
Since transfer function
V out
Vc
is a second order, overdamped
VIII. VERIFICATION
V out X out
−800 ± √ 8002−4∗1∗2462.48 The transfer functions for and can be verified by
¿ Vc Vc
2∗1
using Matlab’s Simulink tool. This can be done by setting up a
simulation of the derived transfer function along with the block
V out V out
P1 ( )
Vc
=−3.09 P2
Vc( ) =−796.915 diagram model of the actual system. Then a mux block can be used
to impose the two outputs on top of each other. This is will show if
the transfer function is a correct approximation to the actual
There are no zeros for this transfer function. system.
132000
s2 +800s+2458.5
Step
Vc To Vout Transfer Function
Scope2
X out 80
2.5
13.2 1
1
1.25
Vc .075
Gain5
1.49
X out
( )
Gain4
A DC =∞ 132000
Vc
s3 + 800s 2 +2458.5s
Vc To Xout Transfer Function
Scope5
2.5 1 1.25
80 13.2 1
.02s+1 s s
Gain6 Transfer Fcn2 Gain7 Gain8 Transfer Fcn4 Transfer Fcn5
X out −b ± √ b −4 a c
2
( )
.075
P1,2 = Gain11
Vc 2a 1.49
Gain10
V out 600
Block Diagram
VII. TIME CONSTANT, SETTLING TIME & OVERSHOOT FOR Transfer Function
Vc 500
V out V out
For since P2
( ) =−796.915, is much larger than
Position (in)
400
Vc Vc
300
V out
P1 ( )
Vc
=−3.09, P1 is the dominant pole which means that P2
200
can be disregarded.
100
Therefore
1
τ= 0
0 500 1000 1500 2000 2500
1 Time (ms)
¿ P1∨¿ = =0.324 sec ¿
3.09 V out
Figure 7: Graph of the Transfer Function & Block Diagram
t s=4 τ =4∗0.324=1.296 sec Vc
Figure 10: Kp set to 1, Effectively No PID Control
Xout/Vc
6000
It can be seen from the graph that the system response is
Block Diagram
Transfer Function severely overdamped, but does achieve stability after
5000 approximately 1 second. To correct this and meet the design
requirements the PID controller’s parameters must be tuned to the
4000 proper values.
Position (in)
Constant
Plant
la Vout term which means setting the I parameter of the PID to zero. Doing
this yields,
Fi 165000 ( k p s +k d s2 )
gure 9: PID Implementation of the Position Control System
s 3+ 800 s 2+ 2458.5 s+165000 ( k p s+ k d s2 )
The design requirement for this system is to move the load 10 This simplifies to,
inches in 0.3 seconds. R ( s) 165000 ( k p+ k d s )
The first step is to observe the response of the system with no = 2
error correction. This means with the P set to 1, I and D set to 0. X out ( s) s + 800 s+165000 k d s +2458.5+165000 k p
Doing this will yield the following result.
Negative Feedback Control Without PID Controller There are now only two parameters that must be tuned, P and D;
18
Load Velocity this is a PD controller instead of a PID. It is very common to not
16 use all three parameters of the PID controller.
14
To further simplify this equation the D parameter can be set to 1.
12 Leaving only the P parameter to be calculated, this can be done
using many different mathematical methods.
Position (in)
10
The second way to select PID parameters is to tune the
8 parameters manually, this is the method selected for this control
6
system.
Initially the I parameter was set to 0; the P and D parameters
4 were set to 1. Simulating this, the following response was attained.
2
0
0 500 1000 1500 2000 2500
Time (ms)
Feedback Control With PD Controller
11
Armature Current Change With PD Controller
Load Velocity 100
10 Armature Current
9
50
8
5 -50
3 -100
1 -150
0 500 1000 1500 2000 2500 3000
Time (ms)
0
0 500 1000 1500 2000 2500 3000
Time (ms) Figure 14: Armature Current Adjusment By PID Controller
Figure 11: PD Controller Response; KP & KD = 1
XI. SYSTEMATIC PID DESIGN
This is a much better response than the previous output with no
A. Elimination of non-dominant pole/zero locations
PID control, but this still does not meet the design requirements of
12 inches in 0.3 seconds. To meet this requirement the P parameter
The new design requirement for the position control system is to
was increased by 1 until the requirement was met. When the P
move a load 12 inches in 0.3 seconds. This means that the settling
parameter was set to 25, the design requirement was met.
time (TS) has to be under 0.3 seconds. Another constraint is that the
Feedback Control With PD Controller
12 overshoot percentage has to remain under 2%.
Load Velocity The first step towards reaching the design requirements is to
10 observe the transfer function of the plant’s model and eliminate any
non-dominant poles and zeros. This helps the process by reducing
8 the transfer function’s order.
The transfer function that provides the data for the position is a
Position (in)
6
To fully eliminate the pole, the numerator must be divided by the
pole location to ensure that the gain remains the same.
4
165000
2
X out 796.915
=
V c s ( s+3.09 )
0
0 100 200 300 400 500 600 700 800 900 1000
Time (ms) X out 207.05
Figure 13: Adjusted X Axis To Better Identify Design =
V c s ( s+3.09 )
Requirement.
Now this is a simpler transfer function to work with. The equality After inputting these commands SISOTOOL loads and displays
of this transfer function can be verified by a simple Matlab the Root-Locus plot of the transfer function as well as the open-
simulation (Figure 15). loop Bode plots for gain and phase. Also using the SISO Design
PID
207.05 Tool, design constraints can be added to provide visual
Step PID Controller1
s2 +3.09s
Simplified Xc To Xout Transfer Function Xout Model representation of where poles or zeros can be placed to achieve the
simout1
desired outcomes. Setting the constraints of settling time (T S) less
To Workspace1 than 0.3 seconds and overshoot of less than 2%, the Root-Locus
plot will display right and wrong locations for pole/zero placement
Xout Comparison
(Figure 17).
PID Xout
Vc
Vout
PID Controller Torque Disturbance Xout
la
0 Subsystem
Vout
Constant la
simout
To Workspace
Xout Comparison
12
Real Xout
Modeled Xout
10
8
Figure 17: Root-Locus and Bode Plots from SISOTOOL
Position (in)
6
From Figure 15 it can been observed that a pole/zero placement
anywhere before -13 on the real axis will yield undesired results, as
4
well as any damping coefficient (ζ) less than 0.78. These two
values will aid in the tuning of the PID controller to meet the
2
design requirements.
0
0 500 1000 1500 2000 2500 C. PID Parameter Selection
Time (ms)
Figure 16: Plot of Simplified Transfer Function and Real Xout The PID can now be properly tuned by using the information
obtained from the SISO Design Tool. First though the PID
B. SISO Design Tool parameters must be incorporated into the plants transfer function.
Doing this will yield the closed loop transfer function of ,
Now that the transfer function is in a more workable form, the KI
next step is to provide some constraints in reaching the design 207.05[K p+ +K d s]
X out s
requirement of moving the load 12 inches in 0.3 seconds while =
maintaining an overshoot of less than 2% and a settling time (T S) of Vc K
0.3 seconds. These constraints can be seen visually by using a tool
s ( s+3.09 )+ 207.05[K p+ I + K d s ]
s
built into Matlab called SISOTOOL. Since it has already been established that an integral gain does not
The SISO Design Tool is a graphical user interface (GUI) that apply in this situation the transfer function simplifies to,
allows you to analyse and tune SISO feedback control systems. X out 207.05[ K p+ K d s ]
Using the SISO Design Tool, you can graphically tune the gains =
and dynamics of the compensator (C) and prefilter (F) using a mix V c s ( s+3.09 )+ 207.05[K p+ K d s ]
of root locus and loop shaping techniques. Now the Kd parameter can be set equal to 1 and the K p parameter
The first step in using this tool is to set-up the transfer function can be set to 13. This will place a zero at -13 which is what the
in Matlab. This can be done in various ways. The method used here Root-Locus plot from the SISO Design Tool displayed.
is to define ‘s’ as a transfer function and then define H(s). Then the X out 207.05[13+ s ]
function can be passed into SISOTOOL using a simple command. =
The coding for this operation is very simple and, is as follows. V c s ( s+3.09 )+ 207.05[13+ s ]
s = tf(‘s’); This simplifies to,
H = (207.05/(s*(s+3.09))) X out 2691.65+207.05 s
sisotool(H) = 2
V c s + 210.14 s +2691.65
Effectively changing the poles locations to
X out −b ± √b 2−4 ac Feedback Control With PD Controller
P1,2 ( )
Vc
=
2a 12
Load Position
X out −210.14 ± √210.14 −4∗2691.65 2
P1,2 ( ) Vc
=
2
10
8
X out X out
( )
P1 =−13.7 P2 =−196.4 ( )
Position (in)
Vc Vc 6
4
Therefore the new transfer function is
X out 207.05 [13+ s] 2
=
V c ( s +13.7 ) (s+196.4) 0
Since the pole at -161.27 is ten times further away from the pole at
-13.9 it can be discarded as a non-dominant pole. This will simplify -2
50 100 150 200 250 300 350 400 450 500 550
the transfer function even further. Time (ms)
X out 1.05[13+s ]
= Figure 20: Zoomed In Plot of the System Response
Vc ( s +13.7 )
Our design requirement has been met the load is moved 12 inches
Now it is time to set the PID parameters in Matlab and evaluate the in 0.3 seconds with no overshoot.
systems response (Figure 18). Plugging in Kp = 13 and Kd = 1 into
the simulation for the positioning control system yields the output XII. TRAPEZOIDAL PROFILE
seen in Figure 19. In industry a basic step function is never used as a reference.
PID Vc
Xout
Vout
Instead a Trapezoidal Profile is used to simulate systems. The
Step PID Controller
0
Torque Disturbance
Subsystem
la
Xout
Trapezoidal Profile can be set up in Matlab by using a 1-D lookup
Constant la
Vout
simout table and setting up the input vector as [0 .1 .2 .3 .4] and the output
To Workspace
vector as [0 1.5 1.5 0 0].
Figure 18: Matlab Block Diagram
1
10 1/0.3 12
s
Feedback Control With PD Controller Clock
Normalzing Integrator Final Scope
14 Trapezoid
Gain Position
Load Position
simout
12
To Workspace
10
Figure 21: Block Diagram of the Trapezoidal Profile
8
Position (in)
-2
0 500 1000 1500 2000 2500
Time (ms)
Zooming into the plot the, it can be seen that the load does move 12
in 0.3 seconds (Figure 20). Figure 22: 1D-Lookup Table Settings for Trapezoidal Profile
Trapezoidal Profile Reference
Now by using the Trapezoidal Profile as the reference instead of
12
the basic step function for the control system, the control system
will be just as it would be in industry.
10 10 1/0.3
1
12 PID Vc
Xout
s Vout
Clock Torque Disturbance Xout
Normalzing Integrator Final PID Controller la
Trapezoid Position
Gain 0 Subsystem
la Vout
Constant
simout
8 To Workspace
Position (in)
12
Load Position
2 10
Position (in)
0 6
0 5 10 15 20 25 30 35 40 45 50
Time (s)
4
0
0 500 1000 1500 2000 2500
Basic Step Reference Time (ms)
12
Trapezoidal Profile
8 10 Step Response
Position (in)
8
Position (in)
6
6
4
4
2
0
2 0 500 1000 1500 2000 2500
Time (ms)
12
6
12
4
Step Input
10 Trapezoidal Profile 2
0
150 200 250 300 350 400 450 500 550
8 Time (ms)
Position (in)
80
12
Velocity (in/s)
60
10
40
8
20
Position (in)
0 6
-20
0 50 100 150 200 250 300 350 400 450 500
Time (ms)
4
60 -2
0 500 1000 1500 2000 2500 3000 3500 4000 4500
40
Time(ms)
20
-20
-40
0.01% White Noise Introduced
-60 12.2
-80 System Response
-100
0 50 100 150 200 250 300 350 400 450 500
Time (ms) 12.1
Profile does have a major effect on the motor voltage and motor
Position (in)
11.8
XIII. MOTION PROFILE IMPACT ON PID PARAMETERS
The use of the Trapezoidal Motion Profile does have an impact
11.7
on PID gain selection. The amount of error which can be deemed
negligible for this application is 1%. Therefore the proportional
11.6
gain parameter of the PID controller can remain the same. This can 200 300 400 500 600 700 800 900 1000 1100
be seen from Figure 28 and Figure 29. Time(ms)
It must be noted though that for a more sensitive system this Figure 39: Closer Look, Effect of 0.01% White Noise
error may not be able to be tolerated, therefore PID parameters
must be adjusted to account for the Trapezoidal Motion Profile. Next the amount of noise was increased until the system became
unstable. The system became unstable at approximately 0.15%
XIV. WHITE NOISE
noise. The increase of noise to the point of instability can be seen
Noise can greatly affect a system’s response. For this simulation in Figure 40 and Figure 41.
a small amount of white noise will be added to the input signal and
then increased until the system is unstable. First 0.01% noise will
be added to the signal. The effect of adding 0.01% noise can be
observed in Figure 38 and Figure 39.
0.15% White Noise Introduced Constant Torque Disturbance Set at 132
14 14
System Response No Torque Disturbance
10% Constant Torque Disturbance
12 12
10
10
8
Position (in)
Position (in)
8
6
6
4
4
2
0 2
-2 0
0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 0 500 1000 1500 2000 2500 3000
Time(ms) Time(ms)
Figure 40: Effect of 0.15% White Noise Figure 32: 10% Torque Disturbance VS 0 Torque Disturbance
12.1 12.1
12 12
Position (in)
Position (in)
11.9 11.9
11.8
11.8
11.7
11.7
11.6
11.6
150 200 250 300 350 400 450 500 550 600
11.5
Time(ms)
200 400 600 800 1000 1200 1400
Time(ms)
Figure 33: Closer Look, 10% Torque Disturbance VS 0 Torque
Figure 40: Closer Look, Effect of 0.15% White Noise Disturbance
Any amount greater than 0.15% of noise will cause instability. Constant Torque Disturbance Set at 175
14
The control signal will go beyond the 1% accuracy constraint for No Torque Disturbance
this problem. If the system does go outside of the 1% accuracy 13.26% Constant Torque Disturbance
12
specification, this can cause major issues because the system being
controlled is used for position control and a greater margin of error 10
can cause many problems for the system.
Position (in)
8
XV. CONSTANT TORQUE DISTURBANCE
Adding in a constant torque disturbance at 10% of the maximum 6
torque (132 in-lbs), the system response does change (Figure 32).
The load would go beyond 12 inches and the reverse and try to 4
steady out at 12 inches. This could cause major problems for any
precise motion system. The maximum amount of constant torque 2
disturbance that this system can handle is 13.26%. This value was
found by increasing the amount of disturbance until the system 0
0 500 1000 1500 2000 2500 3000
achieved an accuracy error greater than 1%. The effect of 13.26% Time(ms)
constant torque disturbance can be seen in Figure 34. Figure 34: 13.26% Torque Disturbance VS 0 Torque
Disturbance
Constant Torque Disturbance Set at 175
System: G
Bode Diagram
12.25 No Torque Disturbance Frequency (rad/sec): 14.8
System: G Magnitude (dB): 13.3
13.26% Constant Torque Disturbance 20
Frequency (rad/sec): 10.1
12.2 Magnitude (dB): -0.205
0
Magnitude (dB)
12.15
-20
12.1
System: G
Frequency (rad/sec): 4.05
Position (in)
12.05 -40
Magnitude (dB): -19.3
System: G
12 -60 Frequency (rad/sec): 0.33
180 Magnitude (dB): -46.1
11.95
135
11.9 System: G
Phase (deg)
Phase Margin (deg): -33.8
90 Delay Margin (sec): 0.56
11.85 At frequency (rad/sec): 10.2
Closed Loop Stable? Yes
45
11.8
0
200 300 400 500 600 700 10
-1
10
0 1
10
Time(ms) Frequency (rad/sec)
Figure 35: Closer Look, 13.26% Torque Disturbance VS 0 Figure 41: Sinusoidal Torque Disturbance, Freq = 1 rad/s
Torque Disturbance
11.8
1
Loop Gain= 11.7
1+Gc (s)G p (s) 11.6
11.5
s ( s +3.09 )
¿ 11.4
s ( s+3.09 )+207
11.3
At any frequency, the system will remain stable and within the 200 400 600 800 1000 1200 1400 1600 1800
Time(ms)
accuracy requirement of 1%. As the frequency of the sinusoid
increases the system will remain stable until it hits a high enough Figure 42: Sinusoidal Torque Disturbance, Freq = 1 rad/s
frequency which will cause attenuation of the sinusoid. By
observing Figures 42 through Figures 47 it can be seen that the Sinusoidal Torque Disturbance Vs No Torque Disturbance
12.05
Position (in)
12
11.95
11.9
11.85
Phase (Degrees)
12.0015
Position (in)
12
12.001
11.95
12.0005
11.9
12
11.85 11.9995
11.8 11.999
200 400 600 800 1000 1200 1400 1600 1800 2000 500 550 600 650 700 750 800
Time(ms) Time(s)
Figure 44: Sinusoidal Torque Disturbance, Freq = 20 rad/s Figure 47: Sinusoidal Disturbance, Freq = 1000 rad/s
Torque Disturbance = 0
12.1 Torque Disturbance, f = 100 rad/s
12.05 thing that must be done is to calculate the loop gain transfer
function.
1
Loop Gain=
12 1+G c (s)G p (s)
s ( s +3.09 )
¿
11.95
s ( s+3.09 )+207
200 300 400 500 600 700
Time(s)
A Nyquist Plot can be obtained using Matlab. First the loop gain
Figure 45: Sinusoidal Torque Disturbance, Freq = 100 rad/s transfer function has to be defined. Next the ‘nyquist’ function can
be used to produce the plot. The Matlab code is as follows.
Sinusoidal Torque Disturbance VS No Torque Disturbance s = tf(‘s’);
Torque Disturbance = 0
12.1 Torque Disturbance, f = 1000 rad/s N = (s*(s+3.09))/(s*(s+3.09)+207)
12.08 Nyquist(N)
12.06
Phase (Degrees)
12.02
12
11.98
11.96
400 600 800 1000 1200 1400 1600 1800 2000 2200
Time(s)
12.08
3
System: G
2 dB -2 dB
2
Phase Margin (deg): -33.8 12.06
Delay Margin (sec): 0.56
Position (Degrees)
At frequency (rad/sec): 10.2
4 dB -4 dB
1 Closed Loop-6Stable? Yes 12.04
6 dB dB
Imaginary Axis
10 dB -10 dB
0 12.02
System: G
Phase Margin (deg): -180
-1 12
Delay Margin (sec): 0
At frequency (rad/sec): Inf
-2 Closed Loop Stable? Yes 11.98
-3
11.96
-4
11.94
-5
-2 -1 0 1 2 3 4 200 300 400 500 600 700 800 900
Real Axis Time(s)
Figure 73: Nyquist Plot of the Loop Gain Transfer Function Figure 48: Inertia Gain = 1, Initial System Parameter
10
Position (Degrees)
-20
System: G
Frequency (rad/sec): 4.05
-40 8
Magnitude (dB): -19.3
System: G
-60 Frequency (rad/sec): 0.33
180
6
Magnitude (dB): -46.1
135 4
System: G
Phase (deg)
0
0 0 500 1000 1500 2000 2500 3000 3500 4000
-1 0 1
10 10 10 Time(s)
Frequency (rad/sec)
Figure 74: Stability Margins, Loop Gain Transfer Function Figure 49: Inertia Gain = 1vs Inertia Gain = .1
12.1
20
Position (Degrees)
12.05
Position (Degrees)
15
12
10
11.95
5
11.9
Figure 50: Inertia Gain = 1vs Inertia Gain = .01 As the transport delay becomes longer, from 1 Pico-second to
6.5 Milli-second delays the signal begins to oscillate. This
As the inertia gain is decreased even further, the system will problem can be examined in Figure 53 through Figure 55.
become more underdamped until it becomes unstable (Figure 51). Effect of Transport Delay
12.15
Transport Delay = 0
Effect of Increasing Inertia Gain Transport Delay = 1 ns
14
Inertia Gain = 1 12.1
Inertia Gain = .0001
12
12.05
Position (Degrees)
10 12
Position (Degrees)
8 11.95
6 11.9
4 11.85
2 11.8
550 600 650 700 750 800
Time(s)
0
0 500 1000 1500 2000 2500 3000 3500 4000 Figure 53: 1 Nano-second Transport Delay
Time(s)
Figure 51: Inertia Gain = 1vs Inertia Gain = .0001 Effect of Transport Delay
12.14
Transport Delay = 0
12.12 Transport Delay = 1 us
XX. TRANSPORT DELAY
12.1
The introduction of a transport delay in the feedback loop of the
12.08
system can cause the system to become unstable. The transport
Position (Degrees)
delay is used to delay the output from being fed back into the 12.06
11.96
11.94
540 560 580 600 620 640 660 680 700 720
Time(s)
12.1
50
Position (Degrees)
12.09
Position (Degrees)
12.08 0
12.07
-50
12.06
12.05 -100
12.04
-150
12.03 0 500 1000 1500 2000 2500 3000 3500
Time(s)
330 340 350 360 370 380 390 400 410 420 430
Time(s)
Figure 56: 1 second Transport Delay
Figure 55: 1 Milli-second Transport Delay
12.06
.05 and ωn unknown. By adding this into the simulation and
12.04 varying the natural frequency (ωn) the lowest resonant frequency
that the system can handle can be determined. To determine the
12.02
resonant frequency the natural frequency (ω n) and damping
12 coefficient (ζ) can be substituted into the equation
11.98 ω r=ωn 1−2 ζ 2 with ζ = .05 and ωn varying.
√
11.96 It was found that the lowest frequency the system can handle is
ωn = 855 rad/s, which is ωn = 852.86 rad/s. This value was found by
200 300 400 500 600 700 800 900 1000 1100
Time(s)
performing many guess and check simulations. Figure 57 shows
the output with a natural frequency of 100 rad/s or resonant
Figure 55: 6.5 Milli-second Transport Delay frequency of 99.75 rad/s.
At 1 second transport delay the system reaches saturation about its 4 Effect of Varying Resonant Frequency
x 10
oscillation. The system can be deemed unstable due the 1.5
Resonant Frequency = 99.75
oscillations.
1
0.5
Position (in)
-0.5
-1
-1.5
0 200 400 600 800 1000 1200 1400
Time(s)
Magnitude (dB)
Frequency (rad/sec): 10
20
higher than 1000 rad/s will allow the system to remain stable. 0
System: H
Frequency (rad/sec): 1.14
Magnitude (dB): 0 System: H
Frequency (rad/sec): 117
Magnitude (dB): -25.1
-20 Magnitude (dB): 21.3
14 -60
-90
Resonant Frequency = 997.5
12 System: H
-120 Phase Margin (deg): 78.6
Phase (deg)
Delay Margin (sec): 0.137
At frequency (rad/sec): 10
10 Closed Loop Stable? Yes
-150
-180
Position (in)
8 -1 0 1 2 3
10 10 10 10 10
Frequency (rad/sec)
40
System: G
20
14 Frequency (rad/sec): 14.8
Magnitude (dB): -0.648
Resonant Frequency = 852.86 0
12 -20
-40
10 -90
-120
Phase (deg)
System: G
Position (in)
0
Now a transfer function must be derived which can morph the
0 1000 2000 3000 4000 5000 6000 7000 Bode Plot of GP(s) into the generic loop shaping Bode Plot of
Time(s)
Figure 60. This can be done by starting at the low frequency high
Figure 59: Resonance Frequency = 997.5 rad/s gain and working to high frequency low gain.
XXII. LOOP SHAPING One transfer function that resembles the loop shaping Bode Plot
Loop shaping is a method of controller design which uses a
predetermined transfer function as the system controller instead of
a PID controller. For loop shaping to work effectively the loop gain is
( 1s +1) . The next step now is to try and modify GP(s) into
transfer function must have high gain at low frequency and cross s
s (
100 )
2
the 0 dB axis at -20 dB per decade then have low gain for high +1
frequency. An example of a proper loop shaping bode plot can be
seen in Figure 60. this form. This can be done by eliminating the pole at -3.09 and
s White Noise Effect On Loop Shaping Control
multiplying by
1
+1 ( )
. This will produce a GC(s) transfer
14
12
White Noise = 0.01%
s
s
100
+1 ( ) 10
s s 8
+1 +1 ( )( )
Position (in)
3.09 1 6
function ofG C ( s )= . This new transfer
s
s
100
+1 ( ) 4
2
function is what will be used to replace the PID controller. The
new Matlab simulation diagram will be of that in Figure 62. The 0
plot of the system response can be seen in Figure 63.
-2
0 500 1000 1500 2000 2500 3000
1 0.3236s2+1.324s+1 Xout
Time(s)
10 1/0.3 12 Vc
s 0.01s2+s Vout
Clock Xout
12
8
Position (in)
10
6
Position (in)
8
4
6
2
4 0
2 -2
0 500 1000 1500 2000 2500 3000
Time(s)
0
0 500 1000
Time(s)
1500 2000 2500
Figure 65: Loop Shaping 0.15% White Noise
Figure 63: Loop Shaping System Response Once again when the white noise level hits 0.15% the system
Since the output meets the design specification the specified goes out of spec and is not good anymore. This can be seen in
controller GC(s) can be utilized. Figure 66.
XXIII. LOOP SHAPING AND WHITE NOISE
White Noise Effect On Loop Shaping Control
Now noise will be introduced into the loop shaping simulation 12.3
White Noise = 0.15%
and compared to the effect of noise with the PID Controller. The
12.2
first simulation was performed with white noise set to 0.01%
(Figure 64). When comparing Figure 64 with Figure 38 it can be 12.1
11.9
11.8
11.7
11.6
11.5
100 200 300 400 500 600 700 800 900 1000
Time(s)
Figure 66: Loop Shaping 0.15% White Noise
Bode Diagram
0
XXIV. LOOP SHAPING WITH CONSTANT TORQUE DISTURBANCE
Magnitude (dB)
Adding in a constant torque disturbance at 10% of the maximum -50
torque (132 in-lbs), the system response does change (Figure 67).
-100
The load would go beyond 12 inches and the reverse and try to
steady out at 12 inches. -150
180
Constant Torque Disturbance On Loop Shaping Control System: K
135 Phase Margin (deg): -119
Delay Margin (sec): 0.0739
Phase (deg)
12.8 Constant Torque Disturbance = 0%
At frequency (rad/sec): 57
Constant Torque Disturbance = 10% 90
Closed Loop Stable? Yes
12.6 45
0
12.4 -2 -1 0 1 2 3
10 10 10 10 10 10
Frequency (rad/sec)
Position (in)
12.2
Figure 68: Bode Plot of the Loop Gain Transfer Function
12
At any frequency, the system will remain stable and within the
11.8 accuracy requirement of 1%. As the frequency of the sinusoid
increases the system will remain stable until it hits a high enough
11.6 frequency which will cause attenuation of the sinusoid. By
observing Figure 69 it can be seen that the system will be out of
100 200 300 400 500 600 700 specifications even at low frequency. By observing Figure 70 and
Time(s)
Figure 71, it can be seen that at high frequency the system will
Figure 67: Loop Shaping, 10% Constant Torque Disturbance never go unstable. The outside disturbance will only cause
vibrations which can be accounted for by using mechanical
This could cause major problems for any precise motion system. components with a high tolerance for these vibrations.
The maximum amount of constant torque disturbance that this
system can handle is 0%. Any amount of disturbance higher than Sinusoidal Torque Disturbance On Loop Shaping Control
0% will not cause instability but it will bring the system out of 12.5 No Torque Disturbance
specifications. Sinusoidal Torque Disturbance, f = .01
12
1
Loop Gain= 9.5
1+Gc (s)G p (s)
200 400 600 800 1000 1200 1400 1600 1800 2000
Time(s)
3 2
s +100 s Figure 69: Sinusoidal Torque Disturbance, Freq = .01 rad/s
¿
s + 100 s2 +6700 s+6700
3
Sinusoidal Torque Disturbance On Loop Shaping Control
14 Nyquist Diagram
No Torque Disturbance 1
Sinusoidal Torque Disturbance, f = 1000 2 dB 0 dB -2 dB -4 dB
4 dB
12 0.8 System: K
-6 dB Phase Margin (deg): -119
0.6 6 dB Delay Margin (sec): 0.0739
10 At frequency (rad/sec): 57
0.4 10 dB -10 dB Closed Loop Stable? Yes
Position (in)
8 0.2
Imaginary Axis
20 dB -20 dB
0
6 System: K
-0.2 Phase Margin (deg): -180
Delay Margin (sec): 0
At frequency (rad/sec): Inf
4 -0.4
Closed Loop Stable? Yes
-0.6
2
-0.8
0 -1
0 500 1000 1500 2000 2500 3000 3500 -1 -0.5 0 0.5 1 1.5
Time(s) Real Axis
Figure 70: Sinusoidal Torque Disturbance, Figure 75: Nyquist Plot of the Loop Gain Transfer Function
Freq = 1000 rad/s
12.028 0
Magnitude (dB)
12.0275 -50
12.027 -100
-150
12.0265
180
System: K
12.026 135 Phase Margin (deg): -119
Delay Margin (sec): 0.0739
Phase (deg)
XXVI. LOOP SHAPING NYQUIST Figure 76: Bode Plot of the Loop Gain Transfer Function
A Nyquist Plot can be obtained using Matlab. First the loop
gain transfer function has to be defined. Next the ‘nyquist’ function
can be used to produce the plot. The Matlab code is as follows. XXVIII. EFFECTS OF CHANGING INERTIA GAIN WITH LOOP SHAPING
s = tf(‘s’); As in the previous simulation involving inertia gain change, the
system will respond by at first becoming under-damped. As the
N = (s^3+100*s^2)/(s^3+100*s^2+6700*s+6700) inertia gain grows smaller the system response will become more
and more under-damped until it becomes unstable. This change can
Nyquist(N) be observed in Figure 77.
-10 20
Position (in)
-20 10
0 500 1000 1500 2000 2500
Time(s) 0
-20
50 6
0
4
-50
2
-100
-150 0
0 2000 4000 6000 8000 10000 12000
Time(s)
-200
0 500 1000 1500 2000 2500 3000
Time(s) Figure 79: Effects of Increasing Resonance Frequency
Figure 77: Effects of Increasing Transport Delay Effect Of Increasing Resonance Frequency
14
Resonance Frequency = 150 rad/s
Resonance Frequency = 165 rad/s
12
XXX. RESONANT MODE WITH LOOP SHAPING METHOD Resonance Frequency
Resonance Frequency
=
=
175 rad/s
180 rad/s
Resonance Frequency = 1000 rad/s
A resonant mode function will now be added to the simulation. 10
1
Position (in)
8
2
The resonant mode can be defined as s s with ζ
( ) +2 ζ +1 6
ωn ωn 4
= .05 and ωn unknown. By adding this into the simulation and
varying the natural frequency (ωn) the lowest resonant frequency 2
12.13 Resonance
Resonance
Frequency
Frequency
=
=
150 rad/s
165 rad/s
Constant 13.26% 0%
12.125
Resonance Frequency = 175 rad/s Torque
12.12 Resonance Frequency = 180 rad/s
Resonance Frequency = 1000 rad/s Disturbance
12.115
12.11
Sinusoidal 40 rad/s 100 rad/s
Position (in)
12.105
Torque
12.1
Disturbance
12.095
Attenuation
12.09
12.085
Gain Margin -33..8 degrees 119 degrees
12.08