lecture 02
DESCRIPTION
matalabTRANSCRIPT
-
054414 PROCESS CONTROL SYSTEM DESIGNLECTURE TWO
Daniel R. Lewin, Technion1
Frequency Domain AnalysisPROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin1-2
054414 Process Control System Design
LECTURE 2: FREQUENCY DOMAIN ANALYSIS
Daniel R. LewinDepartment of Chemical Engineering
Technion, Haifa, Israel
Frequency Domain AnalysisPROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin2-2
Objectives
n Draw Bode and Nyquist plots of an arbitrary SISO linear system Both by hand and using MATLAB
o Sketch the temporal response of a SISO linear system, given its Bode plot Both by hand and using MATLAB/SIMULINK
p Determine an appropriate transfer function given the Bode plot of a SISO linear system. Both by hand and using MATLAB
On completing this section, you should be able to:
-
054414 PROCESS CONTROL SYSTEM DESIGNLECTURE TWO
Daniel R. Lewin, Technion2
Frequency Domain AnalysisPROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin3-2
Frequency Response
P(s)( )Usin t ( )Ysin t + ( ) ( )s ip s p i=
( )Amplitude ratio, AR = Y U p i= ( ){ } ( ){ }( ){ }1
Im p iPhase shift, arg p i tan
Re p i = =
Frequency Domain AnalysisPROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin4-2
Frequency Response Example Response of dead sea pond to cyclic perturbation:
( ) ( ) ( )dc 0.05c 0.02E,c 0 0;E t 3sin t , rad/hdt 12
= + = = = Solution: ( ) ( )( )
( )( )
= + = = =
= =
0.05tc t 0.0225e 0.0229 sin t 1.383p 12 0.0229 3 0.0076
12 1.383 rad (phase lag)
-
054414 PROCESS CONTROL SYSTEM DESIGNLECTURE TWO
Daniel R. Lewin, Technion3
Frequency Domain AnalysisPROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin5-2
Frequency Response 1o System
( )( ) ( ){ } ( ){ }( ){ } ( )
p
2 2
1 1
KAR p i
1Im p i
arg p i tan tanRe p i
= = + = = =
( ) pKp ss 1
= + The ultimate response has the following characteristics:
( )( )( )
pK 1 i1 i 1 i
+ ( )pKp i
i 1 = +
( )( )p 2 2K 1 i
1 +
Example (Dead Sea Pond):( ) 0.002 0.04p s
s 0.05 20s 1= =+ +
( )( ) ( )
2
1
0.04AR p i . For 12,AR 0.00761 400
tan 20 . For 12, 1.383= = = =+
= = = 9 9
Frequency Domain AnalysisPROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin6-2
Freq. Response Plots 1o System Bode Plot
Log
(AR)
Pha
se
In the Bode magnitude plot, log (AR) is plotted against log ()
In the Bode phase plot, Phase (in rad or degrees) is plotted against log ()
( ) ( )1tan =
( )2
1p i1
= + AR(0.01) = 1.000AR(0. 10) = 0.995
AR(1.00) = 0.707AR(10.0) = 0.099
AR(100) = 0.010
(0.01) = -0.57o(0.10) = -5.71o
(1.00) = -45o(10.0) = -84.2o
(100) = -89.4o
( ) 1p ss 1
= +
-
054414 PROCESS CONTROL SYSTEM DESIGNLECTURE TWO
Daniel R. Lewin, Technion4
Frequency Domain AnalysisPROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin7-2
Freq. Response Plots 1o System Log
(AR)
Pha
se
pp2 20
Klim K
1=+ p
p2 2
Klim K
1= +
( )1 olim tan 90
= ( )1 o
0lim tan 0
=
Asymptotes
Asymptotes join at breakpointlocated at = 1/ rad/min
Asymptotes join at break point
Bode Plot( ) 1p ss 1
= +
-1
Gradient of high frequencyasymptote is -1 on a log-log scale
Frequency Domain AnalysisPROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin8-2
Freq. Response Plots 1o System
w=logspace(-2,2,200);s=i*w;p=1./(s+1);AR=abs(p);ph=180*phase(p)/pi;subplot(2,1,1)loglog(w,AR,'-r)subplot(2,1,2)semilogx(w,ph,'-r')
Generating Bode Plots with MATLAB
-
054414 PROCESS CONTROL SYSTEM DESIGNLECTURE TWO
Daniel R. Lewin, Technion5
Frequency Domain AnalysisPROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin9-2
Freq. Response Plots 1o System Nyquist Plot In the Nyquist plot, p(i),
which is a complex number, is plotted directly, as a locus from = 0, to = .
-0.571.0000.01
-89.40.010100-84.20.09910.0-45.00.7071.00-5.710.9950.10
(o)AR
w=logspace(-2,2,200);s=i*w;p=1./(s+1);plot(p)
Frequency Domain AnalysisPROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin10-2
Frequency Response 1o System Nyquist Plot
Bode Plot
-
054414 PROCESS CONTROL SYSTEM DESIGNLECTURE TWO
Daniel R. Lewin, Technion6
Frequency Domain AnalysisPROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin11-2
Frequency ResponseIntegrator
( )( ) ( ){ } ( ){ }( ){ } ( )
p
1 1
KAR p i
Im p iarg p i tan tan
Re p i 2
= = = = = =
( ) pKp ss
=
The ultimate response has the following characteristics:
( )pK i
i i ( )
pKp ii 1
= +piK
Frequency Domain AnalysisPROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin12-2
Frequency ResponseIntegrator Nyquist Plot
Bode Plot
-
054414 PROCESS CONTROL SYSTEM DESIGNLECTURE TWO
Daniel R. Lewin, Technion7
Frequency Domain AnalysisPROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin13-2
Frequency Response Interpretation
Consider two first order systems: ( ) ( )1 21 1p s and p s5s 1 s 1= =+ +These two systems are excited by a series of steps (a square wave, approximately) as shown below.
Note that p1 responds more sluggishly than p2, because its time constant is 5 times larger.
Note also that the exciting signal is only approximately a square wave...
Frequency Domain AnalysisPROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin14-2
Frequency Response InterpretationThis is because it is actually made up of a series of harmonic terms. In fact, it can be shown that a true square wave can be expressed as the infinite series:
( ) ( )( )( ) ( ) ( ) ( )i 1 1 13 5sin 2 i 1 1 t
u t sin t sin 3t sin 5t2 i 1 1
=
+ = = + + + + More accurate approximations of the true square wave are obtained by using more terms in the above expansion.
Any signal can be expressed as a Fourier expansion of the form:
( ) ( ) ( )u t sin t
= where () is the amplitude of the signal at .
-
054414 PROCESS CONTROL SYSTEM DESIGNLECTURE TWO
Daniel R. Lewin, Technion8
Frequency Domain AnalysisPROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin15-2
Frequency Response Interpretation
( ) ( ) ( ) ( ) ( )7 1 1 13 5 13u t sin t sin 3t sin 5t sin 13t= + + + +Lets display the magnitudes of the terms in the expansion to seven terms:
on the Bode magnitude plot. This is equivalent to a step (integrator)
Frequency Domain AnalysisPROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin16-2
Frequency Response Interpretation
Equivalent to the square wave (step)
-
054414 PROCESS CONTROL SYSTEM DESIGNLECTURE TWO
Daniel R. Lewin, Technion9
Frequency Domain AnalysisPROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin17-2
Frequency Response Interpretation
Frequency Domain AnalysisPROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin18-2
Frequency Response Lead/Lag
( ) ( )( ) ( ){ } ( ){ }( ){ } ( )( ) ( ){ } ( ){ }( ){ } ( )
2 21 2 p
11 11 1
1
21 12 2
2
AR p i p i K 1Im p i
arg p i tan tanRe p iIm p i
arg p i tan tanRe p i
= = = + = = = = = =
( ) ( )1 pp s K s 1= +
The ultimate response has the following characteristics:
( ) ( )1 pp i K i 1 = +( ) ( )2 pp s K s 1= + ( ) ( )2 pp i K i 1 = +
-
054414 PROCESS CONTROL SYSTEM DESIGNLECTURE TWO
Daniel R. Lewin, Technion10
Frequency Domain AnalysisPROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin19-2
Frequency Response Lead/Lag
Nyquist Plot Bode Plot
+1
Gradient of high frequencyasymptote is +1 on a log-log scale
Frequency Domain AnalysisPROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin20-2
Frequency Response 2o System
( ) ( ) ( )( ) ( ){ } ( ){ }( ){ }
p
2 22 2
1 12 2
KAR p i
1 2Im p i 2arg p i tan tanRe p i 1
= = +
= = =
( ) p2 2 Kp s s 2 s 1= + +
The ultimate response has the following characteristics:
( ) ( )p2 2K
p i1 i2
= +
( ) ( )( )( )( ) ( )( )2 2
p
2 2 2 2
K 1 i2p i
1 i2 1 i2
= + ( ) ( )( ) ( )
( )( ) ( )
2 2p p
2 22 22 2 2 2
K 1 K 2p i i
1 2 1 2
= + +
-
054414 PROCESS CONTROL SYSTEM DESIGNLECTURE TWO
Daniel R. Lewin, Technion11
Frequency Domain AnalysisPROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin21-2
Frequency Response 2o System
( )p 2 2
p22 2
Klim K
1=
+ Bode Plot
1 o2 2
2lim tan 1801
=
-2
Gradient of high frequencyasymptote is -2 on a log-log scale
Frequency Domain AnalysisPROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin22-2
Frequency Response Complex p(s)
On the Bode log AR plot, the amplitudes of each component add upadd up:
To construct asymptotes in Bode plots for:
( ) ( ) ( ) ( )( ) ( ) ( )1 2 m sp 1 2 na s 1 a s 1 a s 1
p s K eb s 1 b s 1 b s 1
+ + += + + +
( ) p 1 21 2
log p s logK log a s 1 log a s 1 log b s 1 log b s 1
= + + + + + + +
On the Bode linear phase plot scale, the phase of each component add upadd up: ( ){ } { } { }
{ } { } = = + + + +
+ +
1 2
1 1
arg p s arg a s 1 arg a s 1 arg b s 1 arg b s 1 s
For large , log AR() vs. log has an asymptotic slope of (n m)
For large , for MP p(s) [no positive zeros or delay terms], approaches asymptotic value of (/2)(n m)
-
054414 PROCESS CONTROL SYSTEM DESIGNLECTURE TWO
Daniel R. Lewin, Technion12
Frequency Domain AnalysisPROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin23-2
Frequency Response MP/NMP MP = Minimum phase, NMP = Non-minimum phase.
RHP zeros: It is convenient to factor the RHP zero with its LHP mirror image: . The AR of this component is AR = 1, which has a phase lag of zero. In contrast, for large , pz has a phase lag of:
( ) ( ) ( )zp s zs 1 zs 1= + +
( ){ } { } { }zlim arg p s lim arg zs 1 lim arg zs 12 2
= + += =
NMP systems are those that feature phase lags greater than anticipated based on the systems AR alone. Those whose phase lag corresponds to the systems AR are MP systems. NMP components are either: (a) Right-half plane (RHP) zeros, or (b) Dead time
Dead time: The phase lag of is . The AR of this component is AR = 1, which has a phase lag of zero.
( ) sdp s e=
Frequency Domain AnalysisPROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin24-2
Class Exercise 1 - Sketch p(i) Generate a Bode plot for the following transfer function:
( ) ( )0.5s
2s 1p s e
10s 1+= +
Solution.
( )0.5s
21s 1, and e
10s 1+ +
The Bode plot is plotted by combining the contributions of the components:
-
054414 PROCESS CONTROL SYSTEM DESIGNLECTURE TWO
Daniel R. Lewin, Technion13
Frequency Domain AnalysisPROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin25-2
Class Exercise 1 - Sketch p(i)Solution (Contd).
( ) ( )0.5s
2s 1p s e
10s 1+= +
s 1+
0.5se
( )21
10s 1+
s 1+
( )21
10s 1+
-0.2870.01
-28710.0-28.71.00-2.870.10
(e-0.5s)
Frequency Domain AnalysisPROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin26-2
Class Exercise 2 - Determine p(s)
Determine the transfer function, p(s) for the process whose Bode diagram is given above.
-
054414 PROCESS CONTROL SYSTEM DESIGNLECTURE TWO
Daniel R. Lewin, Technion14
Frequency Domain AnalysisPROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin27-2
Class Exercise 2 - Solution
1 zero @ = 0.1
2 poles @ = 1
Kp = 1
( ) ( )( )( )
( )+ += + +2 2
10s 1 10s 1p s or s 1 s 1
Frequency Domain AnalysisPROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin28-2
Class Exercise 2 - Solution
High asymptote -270o (a) No delay
(b) NMP system
( ) ( )( )( )
( )+ += + +2 2
10s 1 10s 1p s or s 1 s 1
-
054414 PROCESS CONTROL SYSTEM DESIGNLECTURE TWO
Daniel R. Lewin, Technion15
Frequency Domain AnalysisPROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin29-2
Summary
n Draw Bode and Nyquist plots of an arbitrary SISO linear system Compute each component separately and combine in
Bode plot
o Sketch the response of a SISO linear system, given its Bode plot Based on interpretation of frequency response
p Determine an appropriate transfer function given the Bode plot of a SISO linear system. Uses skills developed in n
On completing this section, you should be able to: