Lec 02
Lec 02
4.1 Introduction
In this chapter we will treat transient and steady state system response of first and second order
systems. It is one of the most important chapter in Control Engineering course and Electrical
Engineering in general.
Page 28 of 50
Table 4.1 Summary of Input Signals
SN Signal Graph 𝒇(𝒕) 𝑭(𝒔)
1
2 Step 𝑓(𝑡) = 1
𝑠
1
3 Ramp 𝑓(𝑡) = 𝑡
𝑠2
1
4 Sine wave 𝑓(𝑡) = sin(𝜔𝑡)
𝜔2 + 𝑠2
1
5 Exponential 𝑓(𝑡) = 𝑒 𝑎𝑡
𝑠−𝑎
You can observe that the step unit signal is the integral of the impulse function, while ramp signal
is the integral of the unit step signal. All these formulas will be used in further analysis in other
Electrical Engineering courses.
Page 31 of 50
b. Compute 𝑌(𝑠) = 𝐺(𝑠) 𝑋(𝑠)
c. Take the inverse Laplace Transform of 𝑌(𝑠) as 𝑦(𝑡) = ℒ −1 {𝑌(𝑠)}
d. Using any technique you can compute 𝑦(𝑡) by varying 𝑡 from 0 to any desited value or
even infinity.
e. Plot the response of 𝑦(𝑡) against 𝑡.
Examples 4.1:
1
A system gives an output of 𝑌(𝑠) = 𝑠 + 5 What is the output as a function of time?
Sol: The output is of the form given in Laplace table as item 4 with 𝑎 = 5. Hence the time function
is 𝑦 = 𝑒 −5𝑡 and thus describes an output which decays exponentially with time.
Examples 4.2:
10
A system gives an output of 𝑌(𝑠) = 𝑠(𝑠+5) What is the output as a function of time?
𝑎
Sol: The nearest form we have in Laplace table to the output is item 5: as 2 𝑥 [𝑠(𝑠 + 𝑎)] with 𝑎 =
c. 𝑦(𝑡) = 2.5(1 − 𝑒 −2𝑡 ) from item 5 of Laplace table. (Note you can use partial fraction
methods mathematicaly to reduce the equations to a more simpler form. See section 3.3.1,
page 74 of “Control Systems” W. Bolton)
d. Now, to find actual values of 𝑦(𝑡) we just input values of 𝑡 in in the equation and compute
the response 𝑦(𝑡).
Let say we compute 𝑦(0) = 2.5(1 − 𝑒 −2(0) ) = 2.5(1 − 1) = 0,
𝑦(0.1) = 2.5(1 − 𝑒 −2(0.1) ) = 2.5(1 − 0.819) = 0.453
similarly 𝑦(0.5) = 1.58 and so on.
Page 32 of 50
We can write a python function to compute values 𝑦(𝑡) from 𝑡 = 0 to 𝑡 = 3.5 in step of 0.1
and then plot the result. OR a better way using the control python library!
Page 33 of 50
We can use MATLAB code, MATLAB Simulink or Python Control library to directly calculate
the system response for us and even plot the response. We will treat Python method here. The
MATLAB is similar and even easier.
To solve example 4.3, we need the following python code:
Code Explanation:
• Line 1: Is just a bit of habit to always import numpy, but as you can see it is not used
• Line 2: The most import library is the control which is imported as cnt
• Line 3: The library for plotting the results
• Line 5: s=cnt.tf(‘s’): this line set the variable 𝑠 as Laplace domain variable. So we
can now use 𝑠 in python algebra just like
• G =1/(s+2): we can write the model 𝐺 directly using 𝑠 since we define it in line 5 (line 6)
• t,y = cnt.step_response(5*G): we use function step_response of the
control class to directly get the step response (which is the response of the system due to
step input) as 𝑦 and the corresponding time value as 𝑡. Remember that the input to our example
is 5v, so it is 5 times the unit step signal hence we must multiply our model 𝐺(𝑠) with 5 to
take care of the actual input. So, in summary what does cnt.step_response do?
1
1. Multiply the given model with 𝑠 (unit step Laplace transform)
2. Find the inverse Laplace of the overall product with time 𝑡 as the independent
variable
3. Then simulate the system for 𝑡 = 0 𝑡𝑜 𝑡 = 𝑣𝑎𝑙𝑢𝑒 𝑤ℎ𝑒𝑟𝑒 𝑡ℎ𝑒 𝑠𝑦𝑠𝑡𝑒𝑚 𝑠𝑒𝑡𝑡𝑙𝑒𝑠
4. Returns the vector of output 𝑦 with corresponding values of time 𝑡
Page 34 of 50
• Line 10-16 is plotting the response using matplotlib. The graph for example 4.3 is given in
figure 4.2
Page 35 of 50
Suppose we set the quanity of heat to be 100 joules, what will be the output 𝑇2 of the system after
some time? The model of the whole plant is given as 𝐺(𝑠)
𝑇2(𝑠) 0.28
𝐺(𝑠) = =
𝑄1(𝑠) 456000𝑠 + 28850𝑠 2 + 334.1𝑠 + 1
3
To solve this analytiacally we need to find the inverse of 4th order system using hand and then keep
inputing values for 𝑡 and solving! Alternatively just use the following code.
Okay, now that we can get the system response from input signal, we still need to understand
the behaviuors of basic systems. Lets start with first order systems.
Page 36 of 50
4.5.1 First Order Systems in Real Life
When you design a control system, the time behavior is the most important aspect of its' behavior.
For instance, if you are controlling a temperature, how long it takes the temperature to reach a
steady state is important. Some systems have similar transient behavior based on similar natural
properties. Consider the water tank system shown in figure 4.3.
Suppose the water tank is empty and then water start to flow in the tank with a constant rate, if our
set point is to get the water level to height 𝐻, at time 𝑡 = 0, 𝐻 = 0, then the height start increasing
until the height reaches 𝐻. Then the valve will be blocked by hook G, and water stops flowing.
Figure 4.3 shows the response of the height of water level with time. Remember the flow rate of
the water is constant, hence it is a step input.
When the time 𝑡 = 𝜏 then we have 𝑦 = 𝑘(1 − 𝑒 −1 ) = 0.6321𝑘. Thus, the time 𝝉 for a first order
system, when subject to a step input, where the output reaches approximately 63.21% of the steady
state value is called time constant.
For a first order system, the parameters used to specify the transient performance are:
1. Delay time 𝒕𝒅 : The delay time 𝑡𝑑 is the time required for the output response to reach 50%
of its steady state value. Thus, since 𝑘 is the final value, the time taken to reach 50% of this
value is given by:
𝑡
𝑦 = 𝑘 (1 − 𝑒 −𝜏 )
1 𝑡𝑑 1 𝑡𝑑
𝑘 = 𝑘 (1 − 𝑒 − 𝜏 ) = = 𝑒 − 𝜏
2 2
𝑡𝑑
In2 = ln𝑒 𝜏 , ℎ𝑒𝑛𝑐𝑒 𝒕𝒅 = 𝝉 𝐈𝐧𝟐
2. Rise time 𝒕𝒓 : The rise time 𝑡𝑟 is the time required for the output to rise from 10% to 90%
of its steady state value. Using similar derivation
Page 38 of 50
𝒕𝒓 = 𝝉𝒍𝒏𝟗
3. Settling time 𝒕𝒔 : The settling time 𝑡𝑠 is the time required for the output to rise to 98%
of its steady state value.
𝒕𝒔 ≈ 𝟒𝝉
Example 4.5
A mercury-in-glass thermometer acts as a first order system with an input of temperature and an
output of the mercury position against a scale. The thermometer is initially at 0o C and is then
suddenly placed in water at 100o C After 80s the thermometer reads 98o C Determine (a) the time
constant, (b) the delay time, (c) the rise time (d) the settling time.
Sol:
(a) For such a system the output 𝜃 is related to the input by the equation:
𝑡
𝜃 = 100 (1 − 𝑒 −𝜏 ) Hence:
−80 −80
98 = 100 (1 − 𝑒 𝜏 ) = 0.02 = 𝑒 𝜏
80
In 50 = ln𝑒 𝜏 ℎ𝑒𝑛𝑐𝑒 𝜏 = 20.45s
(b) the delay time is: 𝑡𝑑 = 𝜏 In 2 = 20.45 In 2 = 14.7s
(c) the rise time is: 𝑡𝑟 = 𝑡90 −𝑡10 = 𝜏 In 9 = 44.9s
(d) the settling time is: 𝑡𝑠 = 4𝜏 = 4 ∗ 20.45 = 81.8s
Page 39 of 50
Some systems have energy storage in them, if you remove the input signal in this type of systems,
for some amount of time they will continue exhibiting output due to the stored energy in the
system. Examples include mechanical mass-spring-damper system, in which the spring store some
energy and later release it in the system. Similarly, an RLC circuit exhibit these behaviours. If you
throw a tennis ball or kick a ball on a hard surface, you don’t expect it to just land and stay on the
ground for ever at first hit, it will oscillate first each time bouncing up with less energy than before
and after few bounces it will eventually come to rest. This response is shown in figure 4.4
If 𝜁 < 1
The poles now are totally depended on the damping ratio 𝜁. Now let’s test 3 possible values of 𝜁
and solve the time domain equation to find the step response.
Case 1: 𝜻 > 𝟏
In this case square root term is real and will factorise. Using item 10 of our Laplace transform table
we have solution given as
𝑘𝜔𝑛2 𝑝2 𝑝1 4.9
𝑦(𝑡) = [1 − 𝑒 𝑝1𝑡 + 𝑒 𝑝2𝑡 ]
𝑝1 𝑝2 𝑝2 − 𝑝1 𝑝2 − 𝑝1
This describes an output which does not oscillate but dies away with time and thus the system is
overdamped. As the time 𝑡 tends to infinity then the exponential terms tend to zero and the output
2
𝑘𝜔𝑛
becomes the steady value of 𝑝 . We know 𝜔𝑛2 = 𝑝1 𝑝2 hence 𝑦(∞) = 𝑘.
1 𝑝2
Page 41 of 50
The response is shown in figure 4.6
Case 2: 𝜻 = 𝟏
With this case the square root term is zero and so 𝑝1 = 𝑝2 = −𝜔𝑛 both roots are real and both the
same. The output equation then becomes
𝑦(𝑡) = 𝑘[1 − 𝑒 −𝜔𝑛 𝑡 − 𝜔𝑛 𝑡𝑒 −𝜔𝑛 𝑡 ] 4.9
This describes an output which does not oscillate but dies away with time and thus the system is
critically damped. As the time 𝑡 tends to infinity then the exponential terms tend to zero and the
output becomes the steady value 𝑘.
The response is shown in figure 4.7
Page 43 of 50
Case 4: 𝜻 = 𝟎
In this case the general equation becomes
𝑘𝜔𝑛 2
𝐺(𝑠) =
𝑠2+ 𝜔𝑛 2
The response in time domain becomes:
𝑦(𝑡) = 𝑘(1 − cos 𝑤𝑛 𝑡)
The response becomes oscillatory infinitely. The oscillation never dies since there is no damping
as shown in figure 4.9. This type of response is called undamped response.
𝜋 4.10
𝑇𝑝 =
𝜔𝑛 √1 − 𝜁2
ii. Percentage overshoot (%OS):
𝜁𝜋 4.11
−
%𝑂𝑆 = 𝑒 √1−𝜁 2 × 100%
iii. Settling time (𝒕𝒔 ):
4 4.12
𝑡𝑠 ≅
𝜁𝜔𝑛
iv. Number of Oscillation (𝒏𝟎 ):
4.13
2 1
𝑛0 = √ −1
𝜋 𝜁2
Page 44 of 50
𝑠 = 𝜎 + 𝑗𝜔 4.14
Both 𝜎 and 𝜔 are real numbers and have units of frequency hertz or sec −1. The real part 𝜎 is called
neper frequency, it determines the rate of decay or growth of the system, while 𝜔 is the frequency
used to determine the oscillation of the system. For systems with complex poles
𝑠 = 𝜎 + 𝑗𝜔, the imaginary part 𝜔 represents energy storage (in capacitance and inductance,
potential and kinetic energy, etc.) and the real part, 𝜎, represents energy dissipation. The energy
dissipation can be due to electrical resistance, mechanical friction, etc.
Let’s look at the responses with consideration of pole location. The summary is given in table 3.
The python control pzmap command is use to draw the pole-zero plot. This plot gives the pole
(x) and zero (o) of the system in s-plane. We use the following python script to generate the plots:
Table 3 Summary of second order systems
𝑠1 = −14.9
𝑠2 = −1.1
Case: 𝜻 = 𝟏 16 critically
𝜁=1 𝑠 2 + 8𝑠 + 16 damped
𝑠1 = −4.0
𝑠2 = −4.0
Page 45 of 50
Case: 𝜻 > 𝟎 16 Under-
and 𝜻 < 𝟏 𝑠 2 + 2𝑠 + 16 damped
𝜁 = 0.25
𝑠1 = −1 + 𝑗3.87
𝑠2 = −1 − 𝑗3.87
Case: 𝜻 = 𝟎 16 Undamped
𝜁 = 0.0 𝑠 2 + 16
𝑠1 = 𝑗4.0
𝑠2 = −𝑗4.0
Table 3 summarize the response of the systems with corresponding poles and 𝜁 values.
4.7 Summary
This chapter is the heart of classical control engineering, as a control engineer, you should be able
to know majority of the stuff of this chapter by heart. Especially how poles position affects the
response of a system, the relationship of pole position with damping and natural frequency. Now,
a curious student may ask what happen if 𝜻 < 𝟎? ? ? ? or all the poles of section 4.6.3 and 4.6.4
have the value of 𝜎 ≤ 0, what happen if 𝜎 > 0? All these questions are what we will be discussing
in the next chapter of stability.
𝒗𝒊𝒏 0.0 0.35 0.70 1.05 1.4 1.74 2.1 2.4 2.79 3.13 3.45
𝒗𝒐𝒖𝒕 0.0 2.5 3.76 4.38 4.7 4.84 4.9 4.96 4.98 4.99 4.99
Page 46 of 50
2
3. A control system has a forward path transfer function of 𝐺1 (𝑠) = (𝑠+2) and a negative
feedback loop with transfer function 𝐺2 (𝑠) = 4. What will be the response of the system
to a unit step input? Write a python script to calculate and plot the response of the system
to step and ramp response.
4. From the block diagram is given below
𝑠+15
If 𝐺1 = 5, 𝐺2 = 𝑠(𝑠 + 0.1), 𝐺3 = 𝑠+1000 , 𝐾𝑐 = 2000, 𝐻 = 0.5
i. Find the step response of the system using python. The time step should be 20
seconds and evenly spaced by 0.01 seconds. Hint: [use the parameters in the
cnt.step_response function]
ii. Calculate the overshoot,
iii. time to reach maximum overshoot
iv. Settling time
5. Determine the natural angular frequency, the damping factor, the rise time, percentage
overshoot and 2% settling time for systems with the following transfer functions:
100 49
𝐺1 (𝑠) = 𝑠2 +4𝑠+100 and 𝐺2 (𝑠) = 𝑠2 +4𝑠+49
6. For the following block diagram what gain 𝐾 should be used to give a rise time of 2s?
7. From section 4.6.4, consider the case 𝜻 ≥ 𝟎 𝒂𝒏𝒅 𝜻 ≤ 𝟏 now using python script
cnt.poles(G) calculate the poles of the system
16
𝐺=
𝑠 2 + 8𝜁𝑠 + 16
𝜎
for 𝜁 from 0 to 1 in step of 0.05. In each case of the poles 𝑠1,2 = 𝜎 ± 𝑗𝜔, calculate 𝑤𝑛
where 𝑤𝑛 = 4. Draw your conclusion for 𝜁.
Page 47 of 50
Simulation Lab 1: Model Reduction via Identification
We are going to do system identification laboratory. Given a system of order greater than two,
how do we approximate it to second order? This technique is called model reduction.
Given the model shown in fig A, suppose
𝑠 + 15
𝐺1 = 5, 𝐺2 = 𝑠(𝑠 + 0.1), 𝐺3 = , 𝐾 = 1, 𝐻 = 0.5
𝑠 + 1000 𝑐
2. Type the command >>Gp in the console window to view the model. It is given below:
5𝑠 2 + 5075𝑠 + 75000
𝐺𝑝 =
5𝑠 4 + 10000𝑠 3 + 5001003.5𝑠 2 + 504537.5𝑠 + 1037500
Clearly this is a fourth order model which is difficult to predict its behaviour without
simulating in computer. Now we will try to find equivalent second order model that
approximate the model.
3. Now run a step response for 100 seconds with time interval of 0.01 and plot the response
as ‘figure Gp’.
4. What type of second order system behaviour does it shows? Meaning is it damped, under
damped, over damped or undamped?
Page 48 of 50
5. If we are going to approximate the behaviour of 𝐺𝑝 , with second order system, we need
three constants, 𝑘, 𝜁 𝑎𝑛𝑑 𝜔𝑛 . Recall the second order TF
𝑘𝜔𝑛2
𝐺𝑠2 = 2
𝑠 + 2𝜁𝜔𝑛 𝑠 + 𝜔𝑛2
We know 𝑘 is the final value when the systems settle entirely. Therefore, from figure Gp
what is 𝑘?
6. To find 𝜁 𝑎𝑛𝑑 𝜔𝑛 we use another formula given in Control Systems, Bolton page 92,
number of oscillations 𝑛0 .
2 1
𝑛0 = √ −1
𝜋 𝜁2
We count from figure Gp how many oscillations does it have? Simply count the number of
humps. Now make 𝜁 the subject formula in the above 𝑛0 formula. Write python script using
np to calculate 𝜁 given 𝑛0 .
7. Now that we have 𝜁, we can use the settling time formula
4
𝑡𝑠 ≅ 𝜁𝜔 to calculate 𝜔𝑛 . From figure Gp get the settling time as 𝑡𝑠 . What is 𝑡𝑠 ? Make 𝜔𝑛
𝑛
Page 49 of 50
Simulation Lab 2: PID Tuning
Using your identified model 𝐺𝑠2 , we will use it to tune a PID controller to control the above model.
Clearly 𝐾𝑐 is the controller in the overall block diagram of 𝐺𝑝. Therefore, let us define 𝐾𝑐 = 𝑘𝑝 +
𝑘𝑖
+ 𝑘𝑑 𝑠 to control the system with desired transient and steady state response. Follow these steps:
𝑠
2. Instead of 𝐺𝑝 in line 14, use the identified model in Lab 1. Now keep changing
𝑘𝑝 , 𝑘𝑖 𝑎𝑛𝑑 𝑘𝑑 in line 10 until desired response is achieved in the closed loop response 𝐺𝑐𝑙 .
3. After having satisfactory response, use the 𝐺𝑝 with the same 𝐾𝑐 and plot the response.
Page 50 of 50