MCLECTURE20

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 41

11/2/2013 (C) 2001, Ernest L.

Hall, University of Cincinnati 1


Manufacturing
Controls
FALL 2001
Lecture 20
11/2/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, time and frequency response Ch. 4

11. Oct. 25 DC Motor Model, Ch. 4,
Notes
12. Oct. 30 Examples Ch. 5
13. Nov. 1 Boolean Logic ,Programmable Logic Controllers Ch. 5, Notes
14. Nov. 6 Stability and Compensators, P, PI and PD Ch. 6
15. Nov. 8 PID Controllers - Review 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 Review for Final Exam
22. Dec. 6 FINAL EXAM (In Class - Closed Book) 1:30 3:30 PM
Comprehensive
11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 3
Todays objective
Review for the
final exam by
trying some
practice
problems.
11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 4
For a linear system, y = T (x), two conditions must be satisfied:
1. If a constant, a, is multiplied by the input, x, such that ax is applied as the input, then
the output must be multiplied by the same constant, as in Equation 8:
2. If the sum of two inputs is applied, the output must be the sum of the individual
outputs and the principal of superposition must hold as demonstrated by the following
equations:

where
and

T x y ( )
2 2
=
(11)
T x x y y ( )
1 2 1 2
+ = +
(9)
T ax ay ( ) =
(8)
T x y ( )
1 1
=
(10)
11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 5
1. Are the following systems
linear?
Y = x
Y = sin(x)
Y = x
1
+ x
2
Y = tan(x)
Y = dx/dt
Y=d
2
x/dt
2
Y=exp(-x)

11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 6
2.Use Newtons Second Law to balance forces in the tangent direction and
derive a differential equation for the flexible link pendulum shown below.
Tangent direction
( ) 1

=
t
t t
Ma F
u
s
L
M
(a) Physical
diagram



(b) Free body
diagram
s
T
De
W=Mg
u
11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 7
u
s
L
M
(a) Physical
diagram



(b) Free body
diagram
s
T
De
W=Mg
u
Balancing the forces in the tangential direction:

This gives the following equation:

= Mg D
d
dt
Ma
t
sinu
u
(2)
( ) 1

=
t
t t
Ma F
11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 8
3. Laplace transform
What is the main reason for using the
Laplace transform?
11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 9
Laplace transform
Transformational techniques, such as the
Laplace transforms, can be used to convert
the convolution into an equivalent product in
the transform domain.
This simplifies the solution for any linear
system.
11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 10
Convolution reduced to
product
) ( ) ( ) (
) ( ) ( ) (
0
s H s F s G
then
d t h f t g
t
=
=
}
t t t
11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 11
4. Develop the following Simulink model and determine
the output response. The initial velocity is 0. The initial
position is 45 degrees. The step input is 1.

Figure 8. Block diagram of the non-linear rigid link system with torque input

180/3.14
rad to degree
Sum
Torque Input
40*3/(2*4.27)
MgL/(2J)
s
1
Integrator1
s
1
Integrator
0.1/4.27
D/J
Auto-Scale
Graph
1/4.27
1/J
Sin(u)

u
11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 12
5. Find the transfer function.
The following system
has input, r(t), and
output, x(t).
Determine the Laplace
transfer function
T(s)=X(s)/R(s).
Assume zero initial
conditions

) ( 2 ) ( 3 t r t x
dt
dx
= +
11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 13
Solution
1 3
2
) (
) (
) (
) ( 2 ) 1 3 )( (
) ( 2 ) ( ) ( 3
+
= =
= +
= +
s s R
s X
s T
s R s s X
s R s X s sX
11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 14
6. Determine open and closed
loop transfer functions and
characteristic equation.
G(s)=s+1/(s+2)
H(s)=1
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))
11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 15
Solution
2
3 2
) ( ) ( 1
3 2
1
2
1
1
2
1
) ( ) ( 1
) (
2
1
) ( ) (
+
+
= +
+
+
=
+
+
+
+
+
=
+
+
+
=
s
s
s H s G
s
s
s
s
s
s
s H s G
s G
s
s
s H s G
11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 16
7. Reduce the following block
diagram to a single block
text A
C
D
B
-
-
11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 17
Step 4
AB/(1+AC+ABD)
-
11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 18
General rule for relative stability
When the characteristic
equation
1+G(s)H(s) = 0
Then
G(s)H(s) =-1
Or Magnitude = 1 which
is 0 dB
Phase = + or 180
degrees
This indicates instability
Frequency (rad/sec)
P
h
a
s
e

(
d
e
g
)
;

M
a
g
n
i
t
u
d
e

(
d
B
)
Bode Diagrams
-30
-20
-10
0
From: U(1)
10
-2
10
-1
10
0
10
1
-180
-160
-140
-120
-100
-80
T
o
:

Y
(
1
)
11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 19
8. Determine if the following system is
relatively stable using a bode plot or margin.
num = [0,1];
den=[3,1];
sys=tf(num,den);
impulse(sys)
bode(sys)
There is no frequency
where the magnitude is
0 dB and the phase is +
or 180 degrees.
This is the basis of our
criteria for relative or
practical stability.
Frequency (rad/sec)
P
h
a
s
e

(
d
e
g
)
;

M
a
g
n
i
t
u
d
e

(
d
B
)
Bode Diagrams
-30
-20
-10
0
From: U(1)
10
-2
10
-1
10
0
10
1
-100
-80
-60
-40
-20
0
T
o
:

Y
(
1
)
11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 20
9. Determine if the system with open loop transfer
function T2(s)=1/(s
2
+s+2) is absolutely stable by
examining the pole- zero map.
G(s)=1/(s
2
+s+1)
H(s)=1
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))=1/(s
2
+s+2)
11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 21
pzmap(sys)- conjugate poles in lhp-
absolutely stable
Real Axis
I
m
a
g

A
x
i
s
Pole-zero map
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
-1.5
-1
-0.5
0
0.5
1
1.5

11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 22
9. Which of the following are stable
forms of second order systems?
Look at signs of
coefficients with a>0
and b> 0
Which of these are
absolutely stable, i.e.
have poles in the left
half plane?


0
0
0
0
0
0
0
0
2
2
2
2
2
2
2
2
=
= +
= +
= + +
=
= +
= +
= + +
b as s
b as s
b as s
b as s
b as s
b as s
b as s
b as s
11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 23

Construct Routh Hurwitz table
s
2
1

b 0
s
1
a

0 0
s
0
b

0 0
0
2
= + + b as s
11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 24
10.Determine if the second order system is
overdamped, underdamped or critically damped?
num=[0,0,1];
den=[1,8,12];
sys=tf(num,den);
pzmap(sys)
pole(sys)
ans =
-6
-2
damp(sys)
Eigenvalue Damping Freq. (rad/s)

-2.00e+000 1.00e+000 2.00e+000
-6.00e+000 1.00e+000 6.00e+000

overdamped
12 8
12
) (
) (
2
+ +
=
s s s R
s C
Real Axis
I
m
a
g

A
x
i s
Pole-zero map
-6 -5 -4 -3 -2 -1 0 1
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1

Time (sec.)
A
m
p
l i t
u
d
e
Step Response
0 0.5 1 1.5 2 2.5 3
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
From: U(1)
T
o
: Y
(
1
)
11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 25
11. Medium-Scale
Unconstrained Example
Unconstrained example
Consider the problem of finding a set of
values[x
1
,x
2
] that solves


) 2 4 2 4 2 ( ) ( min
2 2 1
2
2
2
1
1
+ + + + = x x x x x x f
x
x
c
11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 26
12. Is the system with this Bode
plot stable or unstable? Why?
Frequency (rad/sec)
P
h
a
s
e

(
d
e
g
)
;

M
a
g
n
i
t
u
d
e

(
d
B
)
Bode Diagrams
-100
-50
0
50
100
Gm=-401.23 dB (at 0 rad/sec), Pm=44.089 deg. (at 198.5 rad/sec)
10
0
10
1
10
2
10
3
10
4
-180
-160
-140
-120
11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 27
State variables
Num=[24];
Den=[1,9,26,24];
[A,B,C,D]=tf2ss(num,den)

A =

-9 -26 -24
1 0 0
0 1 0

B =

1
0
0

C =

0 0 24

D =

0

c y
dt c d x
dt dc x
c x
iables State
s s s s R
s C
=
=
=
=
+ + +
=
2 2
2 3
/
/
var
24 26 9
24
) (
) (
3
2
1
11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 28
13. Practice exercises
Given a differential
equation
Write the transfer
function

) ( ) ( 24 26 9
2
2
3
3
t r t c
dt
dc
dt
c d
dt
c d
= + + +
11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 29
Answer
24 26 9
1
) (
) (
2 3
+ + +
=
s s s s R
s C
11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 30
14. Given a transfer function write
the differential equation
6 2 9
2
) (
) (
2 3
+ + +
=
s s s s R
s C
11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 31
Answer
) ( 2 ) ( 6 2 9
2
2
3
3
t r t c
dt
dc
dt
c d
dt
c d
= + + +
11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 32
15. Given a transfer function compute
the step response with Matlab
24 26 9
24
) (
) (
2 3
+ + +
=
s s s
s R
s C
11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 33
Answer
Num=[24];
Den=[1,9,26,24];
Sys=tf(num,den);
Step(Sys)
Time (sec.)
A
m
p
l
i
t
u
d
e
Step Response
0 0.5 1 1.5 2 2.5 3
0
0.2
0.4
0.6
0.8
1
1.2
1.4
From: U(1)
T
o
:

Y
(
1
)
11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 34
16. Cascade two transfer function into a
single equivalent block diagram
H1=1/(s+1) H2=s+1
G(s)
F(s)
G1(s)
=?
F(s)
G(s)
11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 35
Answer
1
11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 36
17. Compute the transfer function of a
closed loop system
=(s+2)/(s+3)
1
R(s)
C(s)
-
+
E(s)
F(s)
G
c
(s)=K
E(s)
11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 37
Answer
) 2 ( 3
) 2 (
) (
) (
+ + +
+
=
s K s
s K
s R
s C
11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 38
18. Determine if a system is relatively stable
using the Matlab margin function.
G(s) = (s+2)/(s+3)
H(s) = 1
11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 39
Answer
Num=[1,2];
Den=[1,3];
Margin(Num,Den)
As shown the phase
margin is greater than
40 degrees and the
gain margin is greater
than 10 dB so the
system is relatively
stable.
Frequency (rad/sec)
P
h
a
s
e

(
d
e
g
)
;

M
a
g
n
i
t
u
d
e

(
d
B
)
Bode Diagrams
-4
-3
-2
-1
0
Gm = Inf, Pm=-179.64 deg. (at 158.09 rad/sec)
10
-1
10
0
10
1
10
2
10
3
0
50
100
150
200
11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 40
Final Exam
Thursday, Dec. 6, 2001
1:30 3:30 PM
This room with Matlab and computers.
Format, similar to last quiz with questions on
PPT and answers typed or computed.
11/2/2013 (C) 2001, Ernest L. Hall, University of Cincinnati 41
Any questions?

You might also like