Part 2
Part 2
A general op-amp model is described above. In practice, the input resistance, Rin is very large
(> 1012 ohm ), and the gain, A, is very large ( > 105 ).
Vi – V1 = Vi – 0 = I1 . Z1 .…..(b)
Since the admittances of parallel components add, Z1(s) is the reciprocal of the sum of the
admittances, or
Since [EB(s)- EA (s) ] A =Eo(s) and A ≫1, we must have EA(s)= EB(s) Thus
The Characteristics of P, I, and D
PID controller
In this section, we shall obtain the response of a typical second-order control system to a step
input. A general form of a second order system is:
Transfer function:
2- A plot of this response appears in Figure below for various values of . We now see the
relationship between the value of and the type of response obtained: The lower the value of ,
the more oscillatory the response. The natural frequency is a time-axis scale factor and does not
affect the nature of the response other than to scale it in time.
Depending on the value of (ζ) three distinct cases present as shown in table below
We see that the various cases of second-order response are a function of ζ, they are
summarized in figure below.
We now summarize our observations. In this section we defined the following natural
responses and found their characteristics:
2
System Poles 1,2 !* ± $!* +1 = '( ± $!(
1- Overdamped responses
Poles: Two real at : ' , '
Response : , - . / 01 2 + . / 01 2
3- Underdamped responses
Poles: Two complex at : '( ± $!(
Response : , - 4 / 01 2 , !( - ∅
4- Undamped responses
Poles: Two imaginary at : ±$!*
Response : , - 4 , !" - ∅
The step responses for the four cases of damping discussed in this section are
superimposed in Figure below.
1. Delay time Td: The delay time is the time required for the response to reach half the final
value the very first time.
9 + :. < =
67 ≈
2. Rise time Tr: The time required for the waveform to go from 0.1 of the final value to 0.9 of
the final value.
3. Peak time Tp: The peak time is the time required for the response to reach the first peak of
? ?
the overshoot.
6J
%9 =A 7
4. Maximum (percent) overshoot Mp: The maximum overshoot is the maximum peak value
of the response curve measured from unit. If the final steady-state value of the response differs
from unity, then it’s common to use the maximum percent overshoot.
E?
0P Q
KJ % MN% O %90= A
. 9::
U 2S 0U V XYZ[ 0X\ ]Z^
RS % T % .100 .100
U V X\ ]Z^
5. Settling time Ts: The time required for the transient's damped oscillations to reach and stay
within ±2% of the steady-state value.
_ _
6I
= `7
b
For varying within 5% of the final value, the setting time is a ≈
cd]
a. with constant real part b. with constant imaginary part c. with constant damping
ratio
Damping Ratio and Damping Factor
The effects of the system parameters e and !" „ on the step response y(t) of the prototype
second-order system can be studied by referring to the roots of the characteristic equation.
The corresponding time responses for the following figure are obtained by the following
sequence of MATLAB functions.
clc
clf
w=10;
for zeta=[ 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2]
num = [w^2 ] ;
den= [1 2*zeta*w w^2];
t=0:0.01:2;
step(num,den, t)
hold on;
disp('zeta and poles')
zeta
roots([1 2*zeta*w w^2])
end
xlabel('Time(sees)')
ylabel('Amplitude')
title( 'Step Response for different
values of zeta' )
grid
clc
clf
zeta=0.7 ;
for w=[ 5 10 15 20 25 ]
num = [w^2 ] ;
den= [1 2*zeta*w w^2];
t=0:0.01:2;
step(num,den, t)
hold on;
disp('zeta and poles')
w
roots([1 2*zeta*w w^2])
end
xlabel('Time')
ylabel('Amplitude')
title( 'Step Response for different values of w' )
grid
Example
For the following mechanical system. Find D and J, if TS=20 s and 20% overshoot.
Example
For the second-order systems that follow, find e , !" ,Tr, Tp, Ts and OS.
(a)
af 0.35
clf
num=16;
t=0:0.01:10;
den=[1 3 16];
G=tf(num,den);
omegan=sqrt(den(3));
zeta=den(2)/(2*omegan);
Ts=4/(zeta*omegan);
Tp=pi/(omegan*sqrt(1-zeta^2));
OS=exp(-zeta*pi/sqrt(1-zeta^2))*100;
Tra=(1.76*zetaa^3 - 0.417*zetaa^2 + 1.039*zetaa + 1)/omegana
[y,t] = step(G,t);
step(G,t)
disp(' omega zeta Tr Tp Ts OS%')
[omegan zeta Tr Tp Ts OS]
% another solution
clc
num=16;
t=0:0.01:5;
den=[1 3 16];
G=tf(num,den);
omegan=sqrt(den(3));
zeta=den(2)/(2*omegan);
[y,t] = step(G,t);
y1= find(y>=0.1);
y9= find(y>=0.9);
ys= find(y>0.98 & y<1.02);
yd= find(y>=0.5);
n= max(y)
yp= find(y>=n);
Td= t(yd(1)) % time delay
Tr=t(y9(1))-t(y1(1)) % rise time
Tp=t(yp(1)) % peak time
Ts=t(ys(45)) % settling time
os = (max(y) -y(end)/y(end))*100 % overshoot
step(G,t)
- The formulas for Tp, Ts, Tr and OS%... are specific to second-order systems (Two
complex poles and no zero). However, sometimes systems with additional poles or
zeroes are well approximated as second-order.
- Under certain conditions, a system with more than two poles or with zeros can be
approximated as a second-order system that has just two complex dominant poles.
- Once we justify this approximation, the formulas for percent overshoot, settling
time, and peak time can be applied to these higher-order systems.
- Consider a three-pole system with complex poles and a third pole on the real axis. Assuming
that the complex poles are at !" ± $!" %1 and the real pole is at if .
-
- If |if | ≫ | !" | the pure exponential will die out much more rapidly than the second-order
underdamped step response. If the pure exponential term decays to an insignificant value at
the time of the first overshoot, such parameters as percent overshoot, settling time, and
peak time will be generated by the second-order underdamped step response component.
Thus, the total response will approach that of a pure second-order system.
- If the third pole is near the other two then its effect is strong. However, as it is moved to the
left it decays at a faster rate and therefore has less effect on the overall signal.
- We can show, through a partial fraction expansion, that the residue of the third pole, in a
three-pole system with dominant second-order poles and no zeros, will actually decrease in
magnitude as the third pole is moved farther into the left half-plane.
As G → ∞ , m → :. Thus, for a third-pole that is far to the left of the dominant poles,
the system response is approximately second-order. How far is far enough to discount
this third pole?
Rule of thumb If the real pole is five times farther to the left than the dominant poles,
|n> | > p|E | we assume that the system is represented by its dominant second-order
pair of poles.
Example
num=5;
den=poly([ -1 -2 -20])
[r,p,k]= residue(num,den)
r= p=
0.0146 -20
-0.2778 -2
0.2632 -1
Example
Determine the validity of a second-order approximation for each of these two transfer functions:
num1= 700;
den1=conv([1 15],[1 4 100]);
poles1=roots(den1)
g1= tf(num1,den1);
num2= 360;
den2=conv([1 4],[1 2 90]);
poles2=roots(den2)
g2= tf(num2,den2);
step(g1,g2)
poles1 =
-15.0000
-2.0000 + 9.7980i
-2.0000 - 9.7980i
poles2 =
-1.0000 + 9.4340i
-1.0000 - 9.4340i
-4.0000
Example Find the step response of each of the following transfer functions using
a-
MATLAB
num1 =[24.542];
den1=[ 1 4 24.542]
T1= tf(num1,den1)
num2 =[245.42];
den2=conv([1 10],[1 4 24.542])
T2= tf(num2,den2)
num3 =[73.626];
den3=conv([1 3],[1 4 24.542])
T3= tf(num3,den3)
step(T1,T2,T3)
legend('T1','T2','T3')
b- Simulink
c- GUI: Another method to obtain systems response is though the use ltiview>> ltiview
1- Select file 2- select import from file menu
System Response with Zeros
Starting with a two-pole system with poles at (-1 ±j2.828),
we consecutively add zeros at -3, -5, and -10.
9 3 +3 1.8 + 5 0.9 + 10
a , ar , as , aU
+ 2 +9 + 2 +9 + 2 +9 + 2 +9
The results, normalized to the steady-state value, are plotted in Figure below.
deng=[1 2 9];
Ta=tf ([1 3]*9/3,deng);
Tb=tf([1 5] *9/5,deng);
Tc=tf ([1 10] * 9/10, deng);
T=tf (9,deng);
step(T,Ta,Tb,Tc)
text (0.5, 0.6, 'no zero')
text(0.4,0.7,'zero at -10')
text(0.35, 0.8, 'zero at -5')
text (0.3,0.9,'zero at -3')
Evaluating Pole-Zero Cancellation Using Residues
If the pole term, + wb , and the zero term ( s + z ), cancel out, we are left with as a second-
order transfer function.
From another perspective, if the zero at - z is very close to the pole at –p3 , then a partial-
fraction expansion of T(s) will show that the residue of the exponential decay is much smaller
than the amplitude of the second-order response. Let us look at an example.
Example
Determine the validity of a second-order step-response approxima-tion for each transfer
function shown below, find the approximate response.
The residue of the pole at -3.5, which is closest to the zero at -4, is equal to 1 and is not
negligible compared to the other residues. Thus, a second-order step response
approximation cannot be made for C1(s).
The partial-fraction expansion of C2(s)
The residue of the pole at -4.01, which is closest to the zero at -4, is equal to 0.033, about two
orders of magnitude below any of the other residues. Hence, we make a second-order
approximation by neglecting the response generated by the pole at -4.01:
Summary
Based on our discussions, we can make the following observations:
• Adding a LHP zero to the transfer function makes the step response faster (decreases the rise
time and the peak time) and increases the overshoot.
• Adding a RHP zero to the transfer function makes the step response slower, and can make the
response undershoot.
• Adding a LHP pole to the transfer function makes the step response slower.
• If the system has a cluster of poles and zeros that are much closer (5 times or more) to the
origin than the other poles and zeros, the system can be approximated by a lower order system
with only those dominant poles and zeros.
Laplace Transform Solution of State Equations
Consider the state equation
z{ = Ax + Bu
and the output equation
y = Cx + Du
Taking the Laplace transform of both sides of the state equation yields
Example
Given the system represented in state space
do the following:
a. Solve for y(t) using state-space and Laplace transform techniques.
b. Find the eigenvalues and the system poles.
MATLAB code
clc
syms s
A=[0 2;-3 -5];
B=[ 0;1];
C=[ 1 3];
X0=[2;1];
U=1/(s+1) ; %u(t)=exp(-t)
I=eye(2);
X=((s*I-A)^-1)*(X0+B*U);
x1=ilaplace(X(1));
x2=ilaplace(X(2));
y=x1+3*x2;
pretty(y)
'Eigen valus'
E=eig(A)
∅ 0 I and ∅{ 0 4
Example
For the following state equation and initial state vector. Find the state-transition matrix and
then solve for x(t). Where u(t) is a unit step.
MATLAB code
clc
syms s t tau
A=[0 1;-8 -6];
B=[ 0;1];
X0=[1;0];
U=1 ; %u(t)=step function
I=eye(2);
E=((s*I-A)^-1);
Fi= ilaplace(E);
pretty(Fi)
Fitmtau=subs(Fi,t,t-tau);
'Fi(t-ta)'
pretty(Fitmtau)
x= Fi*X0+int(Fitmtau*B*1,tau,0,t);
'x(t)'
pretty(x)
Example
Determine the validity of a second-order step-response approxima-tion for each transfer function
shown below.
Example
For the system shown in Figure below, a step torque is applied at „ (t). Find
a. The transfer function, G(s) = „ (t) / T(t) b. The percent overshoot, settling time, and peak time.
Example
For the system shown in figure below, (a) find an equation that relates settling time of the velocity of
the mass to M; (b) find an equation that relates rise time of the velocity of the mass to M.
Example
For each of the transfer functions shown below, find the locations of the poles and zeros, plot
them on the s.-plane, and then write an expression for the general form of the step response
without solving for the inverse Laplace transform. State the nature of each response
(overdamped, underdamped, and so on).
Example
Write the general form of the capacitor voltage for the electrical network shown in Figure
below.
Steady State Errors
Control systems analysis and design focus on three specifications: -
1. Transient response and steady state response (Final value).
2. Stability.
3. Steady-state errors.
The concept of transient response ,steady state response and stability are covered in previous
lectures. Now we are ready to examine steady state error.
One of the control purpose of system is to follow specified reference path with zero steady
state error. Tracking capability of any control system is classified in term of the input functions
polynomials degree. Test inputs used for steady-state error analysis and design are summarized
in the following table.
Step inputs
Represent constant position and thus are useful in determining the ability of the control system
to position itself with respect to a stationary target. An antenna position control is an example of
a system that can be tested for accuracy using step inputs.
Ramp inputs
Represent constant-velocity inputs to a position control system by their linearly increasing
amplitude. These waveforms can be used to test a system’s ability to follow a linearly increasing
input or, equivalently, to track a constant velocity target. For example, a position control
system that tracks a satellite that moves across the sky at a constant angular velocity.
Parabolas inputs
Whose second derivatives are constant, represent constant acceleration inputs to position
control systems and can be used to represent accelerating targets, such as a missile.
In figure below, a step input and two possible outputs are shown.
Output 1 has zero steady-state error
output 2 has a finite steady-state error.
A similar example which has a ramp input is shown in the following figure.
Output 1 has a zero steady-state error. Output 2 has a finite steady-state error.
Output 3 has a infinite steady state error as time goes to infinity.
Tracking System
- One of the control purposes of systems is to follow specified reference path with zero
steady state error. Thus, it is important to analyze any control system for the capability of zero
steady state error.
To establish a systematic study of the error in steady state for linear systems, we will
classify the control systems as follows:
Steady-state error can be calculated from a system’s closed loop transfer function, T(s),
or the open loop transfer function, G(s), for unity feedback systems as shown in figure.
Steady-State Error in Terms of T(s)
T(s): closed loop transfer function
Steady-State Error in Terms of G(s)
G(s): forward transfer function with unity feedback
†
…
1+‡
†
/ ∞ lim .
→ 1+‡
Step input
1
. 1 1
/ ∞ / ∞ lim lim
2‹S
→0 1+‡ →0 1 + ‡ 1 + lim ‡
→0
Ramp input
1
. 1 1
/ ∞ /frŒS ∞ lim lim lim
→0 1 + ‡ →0 + ‡ →0 ‡
Parabolic input
1
. b 1 1
/ ∞ /Srfrs•Žr ∞ lim lim lim
→0 1 + ‡ →0 + ‡ →0 ‡
Note
Statics Error Constant
The steady-state error may be found by use of the Final Value Theorem (FVT)
as follows:
The steady state error depends upon the input R(s) and the forward transfer function G(s) .
The expression for steady-state errors for various types of standard test signals are derived
next. The three terms in the denominator that are taken to the limit determine the steady-state
error. The limits are called static error constants.
↔
1
.S ‡ / ∞ / 2‹S ∞
1 + .w
.• ‡ ↔ / ∞ /frŒS ∞
‘•
.r ‡ ↔ / ∞ /Srfrs•Žr ∞
‘r
Example
A unity feedback system has the following forward transfer function:
a. Find the steady-state error for the following inputs: 15u(r), 15t u(t), and 15t2u(t).
b. Repeat for
System Type
By using the static error constant, the ess, for the system can be obtained based on the
system type.
The system type is defined as:
- The value of n in the denominator, or
- The number of pure integrations in the forward path.
- Number of poles at origin of s-plane.
Steady-state errors in closed loop systems
Example
A system has Kp=4. What steady-state error can be expected for inputs of 30u(t) , 30t u(t) and
30t2u(t)?
b b
For 30u(t) , / ∞ / 2‹S ∞ = 6
‘S ’
b b
For 30t u(t) , / ∞ /frŒS ∞ = ∞
‘•
b b
For 30t2u(t) , / ∞ /Srfr ∞ = ∞
‘r
numg=500*poly([-2 -5 -6]) ;
deng=poly([0 -8 -10 -12]) ;
G=tf(numg,deng);
'Check Stability'
T=feedback(G,1);
poles=pole(T)
'Step Input'
Kp=dcgain(G)
ess=1/(1+Kp)
'Ramp Input'
numsg=conv([1 0],numg) ;
densg=poly ([0 -8 -10 -12]);
sG=tf(numsg,densg);
sG=minreal(sG);
Kv=dcgain(sG)
ess=1/Kv
'Parabolic Input'
nums2g=conv ([1 0 0],numg) ,
dens2g=poly([0 -8 -10 -12]);
s2G=tf(nums2g,dens2g);
s2G=minreal(s2G);
Ka=dcgain(s2G)
ess=1/Ka
Check Stability
poles =
-516.9544 -5.7623 -5.4278 -1.8554
Step Input
Kp = Inf ess = 0
Ramp Input
Kv = 31.2500 ess = 0.0320
Parabolic Input
Ka = 0 ess = Inf
Example
For the system shown in Figure below
a. Find Kp ,Kv and Ka.
b. Find the steady-state error for an input of
50u(t) , 50t u(t) , and 50t2 u(t).
Example
For the unity feedback system of Figure below
Input should be ramp, because only ramp yields a finite error in Type 1 system.
KvdK = 0.0149
ess = 0.1000
K = 672.0000
Check Stability
poles =
-14.6663
-0.6909 + 6.7667i
-0.6909 - 6.7667i
-4.9518
Steady-State Error Specifications
If a control system has the specification Kv=1000, we can draw a conclusions:
1. The system is stable.
2. The system is of type 1.
3. A ramp input is the test signal.
4. The steady-state error between the input ramp and the output ramp is 1/Kv per unit of
input slope.
B. Steady-State Error for Nonunity Feedback Systems
Control systems often do not have unity feedback because of the compensation used to
improve performance or because of the physical model for the system. The feedback path can
be a pure gain other than unity or have some dynamic representation. A general feedback
system, showing in figure below.
Example
For each of the following systems find
a. The system type
b. The appropriate static error constant
c. The input waveform to yield a constant error
d-The steady-state error for a unit input of the waveform found in Part c
e. The steady-state value of the actuating signal
System 1 System 2
System1
system2
Example
For each of the systems shown in figure below, find the appropriate static error constant as well
as the steady-state error, (} ∞ ” ∞ , for unit step, ramp, and parabolic inputs.
System1
System 2
Example
Given the system shown in figure below, find the following
a. The system type.
b. The value of K to yield 0.1% error in the steady state.
Example
Given the unity feedback control system, where