Laboratory Report
Laboratory Report
Control
Team 1:
Professor:
16 July 2024
1. Introduction.
In the field of system control, overshoot (overshoot) is defined as the maximum
deviation of a system output from its reference value after a change in input. This
phenomenon can be undesirable in various applications, as it can generate instability
in the system or even cause damage to physical components. [1,2]
In this practice we will see in detail the behavior of the gain curve and of phase when
there are variations of gain, the main feature as an introduction to the topic is that its
obtaining is immediate for any linear system (with or without delays of time)
2. Objective.
2.1. General.
Calculate the profit needed to limit the overkill of the proposed systems
2.2. Specific.
▫ Obtain the proposed block diagram simplification.
▫ Get the equation in closed loop.
▫ Calculate the required gain to limit overshooting.
3.1. Materials
In this practice the required material was a PC with Octave software
3.2. Methodology .
FIRST YEAR
For the first exercise proposed from the block diagrams shown in [Illustration 1] we
must obtain the closed loop system.
The first step as explained in the previous part is to simplify our block diagram in Figure
2, the correct way to do this is to put everything together as a multiplication so we
would be left as the next equation.
𝐾(25)
𝐺(𝑠) =
𝑠(𝑠 + 25)(𝑠 + 130)
Already having our equation posed, the next thing is to transform it into a closed loop
(by our feedback).
𝐾(25)
𝐺(𝑠) =
𝑠(𝑠 + 25)(𝑠 + 130)
𝑘(25)
1+
𝑠(𝑠 + 25)(𝑠 + 130)
Now having the equation in this way what follows is to simplify it so that it remains only
with a numerator and a denominator, in the way that following the procedure would
give the following result.
𝐾(25)
𝐺(𝑠) =
𝑠(𝑠 + 25)(𝑠 + 130) + 𝐾(25)
This equation resulting from the closed loop will later be used to graph it in Octave’s
mathematical processing software. What follows is to replace K at low frequency, to
do this from the original equation the "s" are 0 and the "s" that is multiplying alone is
replaced to 0.1 this way would be as follows
25
𝐾= = 13
(0.1)(25)(130)
Considering what the proposed K is worth, this will help us see the gain offset, what
follows is to obtain the Фmpara %Os of 10% and 20% the first equation proposed by the teacher was to find the
damping factor that is determined as follows.
%𝑂𝑆
−𝐼𝑛 ( )
𝜀= 100
√𝜋 2 + 𝐼𝑛2 (%𝑂𝑆)
100
The substitution of the values would be as follows, for a simpler way what has to be
done is the division of %OS/100 which for 10% would give us 0.1 and for 20% would
be 0.2.
• For 10
−𝐼𝑛(0.1)
𝜀= = 0.5911
√𝜋2 +𝐼𝑛2 (0.1)
• For 20%
−𝐼𝑛(0.2)
𝜀= = 0.4559
√𝜋2 +𝐼𝑛(0.2)
With this result we proceed to draw m For this what we occupy is the following equation
proposed by the professor where we substitute the values that gave us the damping
factor for each case.
2(𝜀)
∅𝑚 = tan−1
√ 2 4
( −2(𝜀) + √1 + 4(𝜀) )
2(.5911)
∅𝑚 = tan−1 ( )=58.5811
√−2(.5911)2 +√1+4(.5911)4
2(. 4559)
∅𝑚 = tan−1 = 48.1434
√ 2 4
( −2(. 4559) + √1 + 4(. 4559) )
With this result what we have to find is for 10% and 20% and that is achieved with the
following subtraction
∅ = ∅𝑚 − 180
The next thing to consider is to carry out the programming of what was achieved in the
closed loop carried out previously from the block diagram of the [Illustration 2].
The commands to consider are:
• >>s=tf(’s')
The same software will consider that you will write a control system with previously
written commands so now you have to give a value to k which is the proposed k before
and then write your specified closed loop transfer function previously.
• >>k=13
• >>g=(k*(25))/(s*(s+25)*(s+130)+(k*(25)))
Having our equation this way in the software, the next thing is to draw the ω in the
phase/frequency graph and from that ω find mg this way would finally be substituted
mg to find the gain to compensate in both cases.
SECOND EXERCISE
In the second proposed exercise the development of the [Illustration 3] will be carried
out first by obtaining the simplified closed loop system and by developing find a gain
to limit the overkill to %OS=20% and 10%.
The first step as explained in the previous part is to simplify our block diagram in Figure
3, the correct way to do this is to put everything together as a multiplication so we
would be like the following equation.
𝐾
𝐺(𝑠) =
𝑠(𝑠 + 30)(𝑠 + 170)
Having already the equation posed, the next thing is to transform it into a closed loop.
𝐾
𝐺(𝑠) =
𝑠(𝑠 + 30)(𝑠 + 170)
𝑘
1+
𝑠(𝑠 + 30)(𝑠 + 170)
Now having the equation the following will be to simplify so that there is only one
numerator and denominator following the following procedure would result
𝐾
𝐺(𝑠) =
𝑠(𝑠 + 30)(𝑠 + 170) + 𝐾
This equation resulting from the closed loop will serve us to graph in Octave’s
mathematical processing software.
The next step is to replace K at low frequency, to do this from the original equation the
"s" are 0 and the "s" that is multiplying alone is replaced to 0.1 so it would look like
this.
1
𝐾 = (0.1)(30)(170)= =510
Considering what the proposed K is worth, this will help us see the gain offset, what
follows is to obtain the Фm for him %OS of 10% and 20% the second equation
proposed by the teacher was to find the damping factor that is determined as follows.
−𝐼𝑛(%𝑜𝑠)
𝜁=
√𝜋 2 + 𝐼𝑛(%𝑜𝑠)
The substitution of the values would be as follows, for a simpler way what has to be
done is the division of %OS/100 which for 10% would give us . 1 and for 20% would
be . 2
• For 10
−𝐼𝑛(0.1)
𝜁= = 0.5911
√𝜋 2 + 𝐼𝑛(0.1)
• For 20%
−𝐼𝑛(0.2)
𝜁= = 0.4559
√𝜋 2 + 𝐼𝑛(0.2)
With this result we proceed to extract m, continuing with the following equation where
we replaced the values that gave us the damping factor for each case
2(𝜁)
𝜃𝑚 = 𝑡𝑎𝑚−1
√ 2 4
( −2(𝜁) + √1 + 4(𝜁) )
2(0.5911)
𝜃𝑚 = tan−1 = 58.5893
√−2(0.5911)2 + √1 + 4(0.5911)4
( )
2(0.4559)
𝜃𝑚 = tan−1 = 48.1434
√ 2 4
( −2(0.4559) + √1 + 4(0.4559) )
With this result what we have to find is for 10% and 20% and that is achieved with the
following subtraction
𝜃 = 𝜃𝑚 − 180
𝜃 = −180 + 58.5893
𝜃 = −180 + 48.1434
The next thing to consider is to carry out the programming of the achieved in the
realized closed loop
• >>s=tf(’s')
The same software will consider that you will write a control system with previously
written commands so now you have to give a value to k which is the proposed k before
and then write your specified closed loop transfer function previously.
• >>k=510
• >>g=(k)/(s*(s+30)*(s+170)+(k)
Having our equation this way in the software, the next thing is to draw the ω in the
phase/frequency graph and from that ω find mg this way would finally be substituted
mg to find the gain to compensate in both cases.
4. Results.
Below is the octave programming of the first transfer function in the [Illustration 4].
Now from the graph obtained the value of ω for 10% will be displayed in the [Illustration
6]
In the behavior of this graph what we did to give us an almost exact value was to
enlarge the phase/frequency graph, what is observed in illustration 5 at the bottom left
was the value of (ω, ) that replacing them (12.382, -121.43).
The same applies to 20% in illustration 6 you see the result for this case
Illustration 6. ω from 20%
• For 10
Illustration 7. mg in 10%
For this case illustration 7 tells us that mg= -42.837 extending the image to its
respective point of ω
For 20% we have that ω is 17.202 then from this point we find mg
Illustration 8. mg in 20%
In this case mg was -46.426 from these results the following is to find the gain to
compensate (KG)
• By 10
𝑚𝑔
𝐾𝐺 = 𝐾𝑝𝑟𝑜𝑝 ⋅ 10 20 = 1802.160026
• By 20
𝑚𝑔
𝐾𝐺 = 𝐾𝑝𝑟𝑜𝑝 ⋅ 10 20 = 2724.227372
In [Illustration 9] we show the programming in the octave software to get the bode
diagram of the second transfer function.
With the programming of the [Illustration 9], we obtain the bode diagram shown in the
[Illustration 10], which will help us to know the phase crossing frequencies and the
Profit margin to obtain the value of K to have the desired %OS
For the %OS of 10% we must find in our Phase diagram of -121.41°, in which we have a
frequency of 15.09 rads/s and a gain margin of -44.69 dB, and with this data we can calculate
our desired K
𝑀𝑔
𝑘 = 𝑘𝑝𝑟𝑜𝑝𝑢𝑒𝑠𝑡𝑟𝑎 𝑥 10 20
We repeat the above steps and using the Bode diagram in figure 10 we obtain that our phase
crossing frequency which has a value of 20.66 rads/s and a Gain margin of -48.62 dB, we
replace the values in our formula to get the K for the %OS of 20
48.62
𝑘 = 510 𝑥 10 20 = 137,584.711
With this gain we can replace the value of k in the octave program and get a response to the
step with a %OS of 20%, as shown in illustration 12
The results showed that the "k" gain is fundamental in limiting the overkill of the
system. A specific value of "k" was identified that allowed to reduce the overkill to an
acceptable level, without significantly affecting the stability of the system or its
response time. [1,2]
It is important to note that the selection of the "k" gain depends largely on the specific
characteristics of the control system and the application requirements. Therefore,
frequency response analysis is presented as a valuable tool for determining the
optimal "k" gain in each particular case. [1,2]
6. References.