0% found this document useful (0 votes)
64 views6 pages

AF 6 Tarea PIDs

This document describes the design of PID controllers and prefilters for two control systems. For the first system, the plant transfer function is given along with specifications for damping ratio, settling time, and steady state error. The document shows the steps to: 1) Simplify the plant transfer function, 2) Define the desired closed loop transfer function, 3) Propose an initial PID controller, 4) Equate the closed loop transfer functions and solve for the PID gains, and 5) Design a prefilter if possible. MATLAB is used to verify the prefilter poles are stable. The process results in PID gains and a valid prefilter design for the first system.

Uploaded by

Leonardo Cortez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views6 pages

AF 6 Tarea PIDs

This document describes the design of PID controllers and prefilters for two control systems. For the first system, the plant transfer function is given along with specifications for damping ratio, settling time, and steady state error. The document shows the steps to: 1) Simplify the plant transfer function, 2) Define the desired closed loop transfer function, 3) Propose an initial PID controller, 4) Equate the closed loop transfer functions and solve for the PID gains, and 5) Design a prefilter if possible. MATLAB is used to verify the prefilter poles are stable. The process results in PID gains and a valid prefilter design for the first system.

Uploaded by

Leonardo Cortez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Tarea #3

Tarea de PIDs Jueves 2:30pm 005 17/Marzo/2021


Ramírez García Gerardo 1803050
Martínez Rodríguez Genaro Aldair 1843691
Cortez González Leonardo 1847362
González Maldonado Alexandra Jacqueline 1877458

Abstract. – In this electronic document we will


solve two different problems in which we must 10(𝑠 + 10)
design PID controllers and prefilters for each 𝐺(𝑠) =
(𝑠 + 100)(𝑠 + 𝑠 + 1)
system. Then we will simulate the ideal and real
response in MATLAB Simulink to verify if the PID We have that 𝑎 = 100 and 𝜉𝜔 = 0.5, this means that
controller with the prefilter we designed is correct. 𝑎 > 5𝜉𝜔 . Therefore, the transfer function can be
simplified by using dominance to
Keywords. – MATLAB, Simulink, Poles and
zeros dominance, Plant, Control, PID controllers, 1
prefilters, closed loop systems. 𝐺(𝑠) ≈
𝑠 +𝑠+1

Step 1. Define the number of integrators required


I. INTRODUCTION
from the specifications.

Some exercises will be solved in the next part of Since the reference is constant, we need one integrator
the document, they are about the coefficients a PID in 𝐶(𝑠)𝐺(𝑠). We can also note than 𝐺(𝑠) has no
system need to have in its controller. The purpose is to integrators so, the integrator will be in the control’s
find them mathematically and try to graph them with transfer function.
the help of MATLAB and compare both results, the
desired and the one that was given by the formulas Step 2. Define the desired closed loop from the
used. The specification of the plant G(s) is given, the specifications.
result we want to find is the part of the controller C(s)
in order to form a closed-loop control [1]. From the specifications we can obtain the damping
factor and the oscillation frequency as shown below.
II. METHODOLOGY
(ln 𝑀𝑝) (ln 0.125)
𝜉= = = 0.552
𝜋 + (ln 𝑀𝑝) 𝜋 + (ln 0.125)
A. Design PI/PID controllers and prefuilters for the
following systems with the specificatios indicated
in each case. 4 4
𝜔 = = = 3.6235
𝜉𝑇𝑠 (0.552)(2)
1. The plant and the specifications for the first
problem are. With these two values we can obtain the desired closed
loop system.

10𝑠 + 100 𝜔 13.13


𝐺(𝑠) = 𝐿𝐶 = =
𝑠 + 101𝑠 + 101𝑠 + 100 𝑠 + 2𝜉𝜔 𝑠 + 𝜔 𝑠 + 4𝑠 + 13.13

𝑀𝑝 = 12.5% 𝑇𝑠 = 2 𝑠𝑒𝑐 Step 3. Propose an initial controller.

lim 𝑒(𝑡) = 0 𝑟𝑒𝑓 = 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡 Since we are working with a second order system in
→ the plant’s transfer function, we can propose a PID as
initial controller, therefore the control’s transfer
function is
Step 0. Simplify 𝑮(𝒔) using dominance.
𝑘 𝑠 +𝑘 𝑠+𝑘
First, we can see that the plant’s transfer function can 𝐶(𝑠) =
be simplified into the following. 𝑠
131.3
𝐿𝐶 =
Therefore, our closed loop system will be designed 𝑠 + 14𝑠 + 53.13𝑠 + 131.3
with this control and the plant given as
𝑘 𝑠 +𝑘 𝑠+𝑘
𝑘 𝑠 +𝑘 𝑠+𝑘 1 𝐿𝐶 =
𝑠 + (𝑘 + 1)𝑠 + (𝑘 + 1)𝑠 + 𝑘
𝐶(𝑠) = 𝐺(𝑠) ≈
𝑠 𝑠 +𝑠+1
Therefore, the values of the proportional, integral, and
From this, it is determined the numerator and derivative gains can be obtained as.
denominator of 𝐶(𝑠)𝐺(𝑠).
𝑁(𝑠) 𝑘 + 1 = 14 → 𝒌𝒅 = 𝟏𝟑
𝐶(𝑠)𝐺(𝑠) =
𝐷(𝑠)
𝑘 + 1 = 53.13 → 𝒌𝒑 = 𝟓𝟐. 𝟏𝟑
𝑁(𝑠) = 𝑘 𝑠 + 𝑘 𝑠 + 𝑘
𝒌𝒊 = 𝟏𝟑𝟏. 𝟑
𝐷(𝑠) = 𝑠 + 𝑠 + 𝑠
Finally, we can substitute these values in the designed
With this, it is possible to form the designed closed closed loop, and we will get
loop.
𝑁(𝑠) 13𝑠 + 52.13𝑠 + 131.3
𝐿𝐶 = 𝐿𝐶 =
𝑁(𝑠) + 𝐷(𝑠) 𝑠 + 14𝑠 + 53.13𝑠 + 131.3

𝑘 𝑠 +𝑘 𝑠+𝑘 Step 4. Design a prefilter if it is possible.


𝐿𝐶 =
𝑠 + (𝑘 + 1)𝑠 + (𝑘 + 1)𝑠 + 𝑘
The formula to design the prefilter is the following.
If we try to compare the desired closed loop with the
𝑁 (0) 131.3
closed loop we designed (the real one) we can see that 𝑃 (𝑠) = =
it is not possible to obtain the desired denominator 𝑁 (𝑠) 13𝑠 + 52.13𝑠 + 131.3
because the real 𝐿𝐶 has three poles. What we can do is
add a non-dominant pole to the 𝐿𝐶 desired by using This is the prefilter designed but, we must verify if it
dominance. is valid or not. A prefilter is valid only if it has stable
poles and if the poles are sufficiently damped, this is
13.13𝑎 that 𝜉 > 1/2.
𝐿𝐶 =
(𝑠 + 4𝑠 + 13.13)(𝑠 + 𝑏)
First, we will check if the prefilter has stable poles, we
If we will use dominance to add a non-dominant pole will do this by obtaining the poles of the prefilter and,
to the desired closed loop, we need that 𝑏 > 5𝜉𝜔 . if they are negative means that they are stable. We will
obtain the poles by using MATLAB as shown in
4 Figure 2.1.
𝑏>5 𝑏 > 10
2

So, if 𝑏 is higher than 10 we can add a pole by using


dominance, for this problem we will say that 𝑏 = 10.
So, the new desired closed loop will be.

13.13(10)
𝐿𝐶 =
(𝑠 + 4𝑠 + 13.13)(𝑠 + 10)

131.3
𝐿𝐶 =
𝑠 + 14𝑠 + 53.13𝑠 + 131.3 Figure 2.1. MATLAB commands used to obtain the
poles of the prefilter.
Now, we can equate the desired closed loop
denominator with the closed loop denominator we Since the poles are negative, the prefilter has stable
designed before. poles which means the first condition is valid. Now,
we must verify if the damping factor is higher than 0.5.
The damping factor can be obtained from the prefilter
(ln 𝑀𝑝) (ln 0.05)
denominator as. 𝜉= = = 0.69
𝜋 + (ln 𝑀𝑝) 𝜋 + (ln 0.05)
13𝑠 52.13𝑠 131.3
𝑠 + 2𝜉𝜔 𝑠 + 𝜔 = + + We cannot obtain the oscillation frequency because we
13 13 13
do not have a settling time, so the desired closed loop
will be
131.3
𝜔 = = 3.178
13 𝜔
𝐿𝐶 =
𝑠 + 2𝜉𝜔 𝑠 + 𝜔
With the oscillation frequency we can obtain the
damping factor as. 𝜔
𝐿𝐶 =
𝑠 + 1.38𝜔 𝑠 + 𝜔
52.13
4.01
𝜉 = 13 = = 0.631 > 0.5 Step 3. Propose an initial controller.
2𝜔 2(3.178)

This means the second condition is valid as well as the Since we are working with a first order system, we will
first one, which means the prefilter is valid. propose an initial PI controller, this is

131.3 𝑘 𝑘 𝑠+𝑘
𝑃 (𝑠) = 𝐶(𝑠) = 𝑘 + =
13𝑠 + 52.13𝑠 + 131.3 𝑠 𝑠

Therefore, our closed loop will be designed from this


2. The plant and the specifications for the second PI controller and the plant as
problem are.
𝑘 𝑠+𝑘 2 2𝑘 𝑠 + 2𝑘
𝐶(𝑠)𝐺(𝑠) = =
2 𝑠 𝑠+5 𝑠(𝑠 + 5)
𝐺(𝑠) =
𝑠+5
𝑁(𝑠) = 2𝑘 𝑠 + 2𝑘 𝐷(𝑠) = 𝑠(𝑠 + 5)
𝑀𝑝 = 5% lim 𝑒(𝑡) = 1 𝑟𝑒𝑓 = 𝑟𝑎𝑚𝑝

𝑁(𝑠) 2𝑘 𝑠 + 2𝑘
𝐿𝐶 = =
Step 0. Simplify 𝑮(𝒔) using dominance. 𝑁(𝑠) + 𝐷(𝑠) 2𝑘 𝑠 + 2𝑘 + 𝑠 + 5𝑠

Since there is just one pole, there is no need to simplify 2𝑘 𝑠 + 2𝑘


𝐿𝐶 =
the plant’s transfer function by using dominance. 𝑠 + 2𝑘 + 5 𝑠 + 2𝑘

Step 1. Define the number of integrators required As the denominators of both closed loops, the desired
from the specifications. and the designed one, are of the same order, we can
equate them. This is for obtain an equation for 𝑘 and
There is a ramp as a reference so, we would need to for 𝑘 in function of the oscillation frequency (𝜔 ).
have at least two integrators to have a zero steady state
error. But it is required a constant steady state error 𝜔
equals to 1 we just need one integrator and since the 𝐿𝐶 =
plant 𝐺(𝑠) has no integrators, we will need to add it in 𝑠 + 1.38𝜔 𝑠 + 𝜔
the controller 𝐶(𝑠).
2𝑘 𝑠 + 2𝑘
𝐿𝐶 =
Step 2. Define the desired closed loop from the 𝑠 + 2𝑘 + 5 𝑠 + 2𝑘
specifications.
2𝑘 + 5 = 1.38𝜔 2𝑘 = 𝜔
From the specifications we can obtain the damping
factor as. From the steady state error given, we can obtain this
oscillation frequency. From the definition of the
steady state error and the value of this parameter given,
we have.
We can see at first sight that the prefilter has unstable
𝐷(𝑠) poles because.
lim 𝑒(𝑡) = 𝑒(∞) = 𝑟𝑒𝑓(𝑠)𝑠 =1
→ 𝑁(𝑠) + 𝐷(𝑠)
−1.9142𝑠 + 5 = 0 → 𝑠 = 2.61
Since the reference given in the problem is a ramp
The pole is positive, so unstable, which means the
which means 𝑟𝑒𝑓(𝑡) = 𝑡, the Laplace’s transform of
prefilter is no valid because it does not meet one of the
it is 𝑟𝑒𝑓(𝑠) = 1/𝑠 . Substituting this reference, 𝑁(𝑠)
required conditions, so there cannot be a prefilter in
and 𝐷(𝑠) we will get to
the designed closed loop.
𝑠(𝑠 + 5) 1
𝑒(∞) = 𝑠 =1 B. Using MATLAB Simulink simulate the exercises
𝑠 + 2𝑘 + 5 𝑠 + 2𝑘 𝑠
of part A and verify that the requirements are
(𝑠 + 5)
𝑒(∞) = =1 achieved. For this purpose plot in the same
𝑠 + 2𝑘 + 5 𝑠 + 2𝑘 window the ideal response vs the closed loop
response. Write appropriate comments and
Substituting the equations of the proportional and conclusions for each case.
integrative gains in function of the oscillation
frequency we have that. 1. Simulation for the first exercise.

𝑠+5 The Simulink program for the first exercise is shown


𝑒(∞) = =1
𝑠 + (1.38𝜔 )𝑠 + (𝜔 ) in Figure 2.2 where the proposed closed loop was
made from the prefilter, the plant and the designed PID
0+5 controller as shown in Figure 2.3.
𝑒(∞) = =1
(0) + (1.38𝜔 )(0) + (𝜔 )

Solving this expression, we can obtain the oscillation


frequency.

5
𝑒(∞) = =1 𝜔 = √5
𝜔

Once we know the oscillation frequency, we can


obtain the proportional and integrative gains, and with
these gains, the closed loop designed by us.
Figure 2.2. Simulink program for the first exercise.
2𝑘 + 5 = 1.38𝜔 𝒌𝒑 = −𝟎. 𝟗𝟓𝟕𝟏

2𝑘 = 𝜔 𝒌𝒊 = 𝟐. 𝟓

Therefore, the real closed loop is.

2𝑘 𝑠 + 2𝑘
𝐿𝐶 =
𝑠 + 2𝑘 + 5 𝑠 + 2𝑘
Figure 2.3. Designed closed loop of the first exercise.
−1.9142𝑠 + 5
𝐿𝐶 = Note that both closed loops have a step as the input
𝑠 + 3.086𝑠 + 5
because one of the specifications was a constant
Step 4. Design a prefilter if it is possible. reference, also, in the designed closed loop the plant
and the PID controller are together in one transfer
From the prefilter formula we have. function because of simplicity.

𝑁 (0) 5 Once, we have the Simulink program we can simulate


𝑃 (𝑠) = = both systems to make an analysis of both results, the
𝑁 (𝑠) −1.9142𝑠 + 5
graphs resulted from this simulation are shown in
Figure 2.5. The graph was obtained from the scopes in
the Simulink program by exporting the data to the
space work in MATLAB and then, plotting these data
with the command that are shown in Figure 2.4.

Figure 2.6. Simulink program for the second exercise.


Figure 2.4. MATLAB commands used to obtain the
graphs of the results of both closed loops.
Amplitude

Figure 2.7. Designed closed loop for the second


exercise.

Once we have the Simulink program, we can simulate


both closed loops and then, see the results graphs in
Figure 2.5. Graph of both responses, the ideal one and each scope or we can export the results from each
the real one obtained from the closed loops. scope to the MATLAB workspace where we will plot
in one graph both results as shown in Figure 2.9 by
The results obtained means we designed a closed loop using the command shown in Figure 2.8.
with a PID controller and a prefilter that approximates
a lot to the desired response we wanted, the overshoots
in the desired and real systems are almost the same as
well as the settling time and, the most important, the
steady state error, which is zero in both cases, in both
closed loops because of the number of integrators we
used in the PID controller.

The difference between both responses is because we


used dominance twice while designing the real closed Figure 2.8. MATLAB commands used to obtain the
loop, we used in the original plant and then in the graphs of the results of both closed loops.
desired closed loop but, these differences are very
small and give us a good approximation of the system
we wanted.

2. Simulation for the second exercise.


Amplitude

The Simulink program for this second exercise is


shown in Figure 2.6 where the designed closed loop
was made from the PI controller and the plant as
shown in Figure 2.7 without a prefilter because, as we
verified earlier, it is not possible to have a prefilter in
this system.
Figure 2.9. Graph of both responses, the ideal one and
the real one obtained from the closed loops.
As we can see in Figure 2.9, the results are something
we could have hoped to get because it is the common
response for a ramp reference, also we can see that the
responses are almost equal and, if the reference were
plotted we would see that there are an error in the
steady state with respect to the desired closed loop
because it is what we wanted at the beginning, an
steady state error equals to 1 which is almost the same
steady state error for the designed closed loop but not
the same due to the small difference between both, this
difference is due to the numerators in both closed
loops are not the same but the difference, as we said,
is very small, something acceptable for the controller
we would like to get.

III. CONCLUSION
The dominance helped us to solve these kinds of
problems, because it reduced the development of
these. In the case A, we could “eliminate” one zero and
one pole without making an influence in the gain.
Other key point to remark on is the importance of
understanding the types of reference and seeing the
requirements because it will say to you how many
integrators you need. We learned in the class that for
plants of first order we needed a PI controller and for
second order plants we needed a PID controller, so this
“rule” simplified the problem. To finish, we could see
in case B 2 things: The first one is that steady state
error analysis can be used to obtain necessary data and
that is important to always verify if the prefilter is valid
or invalid, in this case it was non-valid.

REFERENCES

[1] Ogata, Katsuhiko. Ingeniería de Control Moderna. 5º ed. Madrid.


Pearson Educación. 2010.

You might also like