Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

Farhat Abbas University

Tecnológico de Monterrey Control Systems Design

Design of Control Systems


-Simulation activity-
" Identification of a 2nd order system” and
Automatic Control Loop with a PID controller

Collaborative Online International Learning between Farhat Abbas University, Setif 1, and
Tecnológico de Monterrey, campus Sonora Norte
Participant :
- Adimi Mortadja dhia eddine and Benstiti mohaned tahar from Farhat Abbas University,setif1
- Alejandra Corral Sánchez from Tecnológico de Monterrey, campus Sonora Norte

OBJECTIVE
Identify and validate an electronic plant/process for further control design.

INTRODUCTION
The practical activities help to reinforce the theoretical and simulation topics reviewed in the courses. In this sense, operational amplifiers (Op-
Amps) are electronic elements that allow the construction of plants that can be applied in automatic control. These devices are used intensively
in electronic systems, and more specifically in blocks/materials where their characteristics and a series of applications around them are
analyzed. Moreover, Op-Amps are studied because they can be used in the construction of first and second order plants, systems widely
applied in the control of industrial processes.

SECOND ORDER SYSTEMS WITH OPERATIONAL AMPLIFIERS

Second order plant with an overdamped response. The electronic circuit is a second order active low-pass filter.

Proposed relative damping constant = 1.2 (verify this condition)

Proposed values:
R1(MΩ) R2(MΩ) C1(µF) C2(µF)
1.601 1.601 0.82 0.18

NOTE: The capacitors in both circuits are ceramic.


TO DELIVER
1- Plant/process simulation. Use Op-Amps with the settings explained by the instructors. FALSTAD circuit
simulator https://falstad.com/circuit/circuitjs.html

2- the equations of the process dynamics (equations in the time domain).

First we apply Kirchhoff's laws to write the node current equations.

For 𝑉𝑖 :

𝑉𝑖 − 𝑉𝑜 𝑑𝑉𝑜 𝑑(𝑉𝑜 − 𝑉𝑐 )
+ 𝐶1 + 𝐶2 =0
𝑅1 𝑑𝑡 𝑑𝑡

For 𝑉𝑜 :

𝑑(𝑉𝑜 −𝑉𝑐 ) 𝑉𝑜
-𝐶2 − =0
𝑑𝑡 𝑅2

For 𝑉𝑐 :

𝑑(𝑉𝑜 − 𝑉𝑐 ) 𝑉𝑜
𝐶2 − =0
𝑑𝑡 𝑅2

The following procedure was to model the dynamic equations of the plant.

𝑑2 𝑉𝑂 𝑑𝑉𝑂
𝑉𝑂 = 𝑉𝑖 − 2
(𝐶1 𝐶2 𝑅1 𝑅2 ) − (𝐶1 𝑅1 + 𝐶1 𝑅2 + 𝐶2 𝑅2 )
𝑑𝑡 𝑑𝑡
2
𝑑 𝑉𝑂 𝑑𝑉𝑂
(𝐶1 𝐶2 𝑅1 𝑅2 ) + (𝐶1 𝑅1 + 𝐶1 𝑅2 ) + 𝑉𝑂 = 𝑉𝑖
𝑑𝑡 2 𝑑𝑡

We substitute circuit values into the equation.


𝑑2 𝑉𝑂 𝑑𝑉𝑂
2
(820𝑛𝐹 ∗ 480𝑛𝐹 ∗ 1.6𝑀 ∗ 1.6𝑀) + (820𝑛𝐹 ∗ 1.6𝑀 + 820𝑛𝐹 ∗ 1.6𝑀) + 𝑉𝑂 = 𝑉𝑖
𝑑𝑡 𝑑𝑡

𝑑2 𝑉𝑂 𝑑𝑉𝑂
2
(820𝑛𝐹 ∗ 480𝑛𝐹 ∗ 1.6𝑀 ∗ 1.6𝑀) + (820𝑛𝐹 ∗ 1.6𝑀 + 820𝑛𝐹 ∗ 1.6𝑀) + 𝑉𝑂 = 𝑉𝑖
𝑑𝑡 𝑑𝑡

𝑑2 𝑉𝑂 𝑑𝑉𝑂
2
(1007616 )𝑡 2 + (2624)𝑡 + 𝑉𝑂 = 𝑉𝑖
𝑑𝑡 𝑑𝑡

3- the equations in the domain of the complex variable 's', and calculate [Vo(s) / Vi(s)].

The terms of the differential equation are related to the transfer function.

𝑉𝑂
𝐻(𝑠) =
𝑉𝑖

The Laplace transform is applied.

𝑉𝑂 (𝑠) (𝑠 2 (𝐶1 𝐶2 𝑅1 𝑅2 ) + 𝑠(𝐶1 𝑅1 + 𝐶1 𝑅2 ) + 1) = 𝑉𝑖 (𝑠)

It is developed to accommodate terms.

𝐶1 𝑅1 + 𝐶1 𝑅2 1 𝑉𝑖 (𝑠)
𝑉𝑂 (𝑠) ( 𝑠 2 + 𝑠 ( )+ )=
𝐶1 𝐶2 𝑅1 𝑅2 𝐶1 𝐶2 𝑅1 𝑅2 𝐶1 𝐶2 𝑅1 𝑅2

1 1 1 𝑉𝑖 (𝑠)
𝑉𝑂 (𝑠) ( 𝑠 2 + 𝑠 ( + )+ )=
𝐶1 𝑅2 𝐶1 𝑅1 𝐶1 𝐶2 𝑅1 𝑅2 𝐶1 𝐶2 𝑅1 𝑅2

Finally you get transfer function.


1
𝑉𝑂 (𝑠) 𝐶1 𝐶2 𝑅1 𝑅2
=
𝑉𝑖 (𝑠) 1 1 1
𝑠 2 + 𝑠 (𝐶 𝑅 + 𝐶 𝑅 ) + 𝐶 𝐶 𝑅 𝑅
1 2 1 1 1 2 1 2

We substitute circuit values into the equation.

1
𝑉𝑂 (𝑠) 1007616
=
𝑉𝑖 (𝑠) 1 1 1
𝑠 2 + 𝑠 (1312 + 1312) + 1007616

𝑉𝑂 (𝑠) 9.9244 ∗ 10−7


= 2
𝑉𝑖 (𝑠) 𝑠 + 𝑠(1.524 ∗ 10−3 ) + 9.9244 ∗ 10−7
4- Calculate the plant´s model in state space.

The state space is a representation in time, so we start from the differential equation.

𝑑2 𝑉𝑂 𝑑𝑉𝑂
2
(𝐶1 𝐶2 𝑅1 𝑅2 ) + (𝐶1 𝑅1 + 𝐶1 𝑅2 ) + 𝑉𝑂 = 𝑉𝑖
𝑑𝑡 𝑑𝑡

𝑑2 𝑉𝑂 𝑑𝑉𝑂
2
(𝐶1 𝐶2 𝑅1 𝑅2 ) = 𝑉𝑖 − (𝐶1 𝑅1 + 𝐶1 𝑅2 ) − 𝑉𝑂
𝑑𝑡 𝑑𝑡

𝑑2 𝑉𝑂 1 𝑑𝑉𝑂 (𝐶1 𝑅1 + 𝐶1 𝑅2 ) 1
= 𝑉𝑖 − − 𝑉
𝑑𝑡 2 𝐶1 𝐶2 𝑅1 𝑅2 𝑑𝑡 𝐶1 𝐶2 𝑅1 𝑅2 𝐶1 𝐶2 𝑅1 𝑅2 𝑂

We define our states and their derivatives.

𝑥1 = 𝑉𝑂
𝑥1̇ = 𝑥2
(𝐶1 𝑅1 + 𝐶1 𝑅2 ) 1 1
𝑥2̇ = −𝑥2 − 𝑥1 + 𝑉
𝐶1 𝐶2 𝑅1 𝑅2 𝐶1 𝐶2 𝑅1 𝑅2 𝐶1 𝐶2 𝑅1 𝑅2 𝑖

0 1 0
𝑥̇
[ 1] = [ 1 (𝐶1 𝑅1 + 𝐶1 𝑅2 )] [𝑥1 ] + [ 1 ] 𝑉𝑖
𝑥2̇ − − 𝑥2
𝐶1 𝐶2 𝑅1 𝑅2 𝐶1 𝐶2 𝑅1 𝑅2 𝐶1 𝐶2 𝑅1 𝑅2

We substitute circuit values into the equation.


𝑥̇ 0 1 𝑥1 0
[ 1] = [ ] [𝑥 ] + [ ]𝑉
𝑥2̇ −9.9244 ∗ 10 −7
−2.3041 ∗ 10 −3
2 9.9244 ∗ 10−7 𝑖

5- Define the operating range of the plant (positive voltage), and apply the response approach to a step input
and use a graphical method to calculate Gp(s). FALSTAD circuit simulator

Calculation of Gp(s) with broida’s method:


𝐺𝑠𝑒 −𝜏𝑝
𝐺𝑝(𝑠) =
𝜃𝑝 + 1
With: 𝜃 = 5.5(𝑡2 − 𝑡1)

𝜏 = (2.8 × 𝑡1) − (1.8 × 𝑡2)

When we project on the graph we found that ∆𝑋 = 5 𝑎𝑛𝑑 ∆𝑌 = 5 :


∆𝑋 5
𝐺𝑠 = = =1
∆𝑌 5

We have 40%∆𝑋 = 0.4 × 5 = 2 𝑎𝑓𝑡𝑒𝑟 𝑤𝑒 𝑝𝑟𝑜𝑗𝑒𝑐𝑡 𝑤𝑒 𝑓𝑜𝑢𝑛𝑑 𝑡2 = 1.245(𝑠)

And 28%∆𝑌 = 0.28 × 5 = 1.4 𝑎𝑛𝑑 𝑎𝑓𝑡𝑒𝑟 𝑤𝑒 𝑝𝑟𝑜𝑗𝑒𝑐𝑡 𝑤𝑒 𝑓𝑜𝑢𝑛𝑑 𝑡1 = 0.9638(𝑠)


So:

𝜃 = 5.5(𝑡2 − 𝑡1) ↔ 𝜃 = 5.5(1.245 − 0.9638) ↔ 𝜃 = 1.54627


𝜏 = (2.8 × 𝑡1) − (1.8 × 𝑡2) ↔ 𝜏 = (2.8 × 0.9638) − (1.8 × 1.245) ↔ 𝜏 = 0.4758
𝐺𝑠𝑒 −𝜏𝑝
𝐺𝑝(𝑠) =
𝜃𝑝 + 1
So :

1 × 𝑒 −0.4578𝑝
𝐺𝑝(𝑠) =
1.5462𝑝 + 1
6- Validate the obtained model. Given the same input signal, compare the “experimental data” from FALSTAD
with the theoretical model (simulation in MATLAB-Simulink). Comment on the results. How close is the model
to the experimental data?

Using matlab we start by import the entry and exit data from falstad to matlab workspace:
after that we open ident toolbox and Choosing time domain data the import data:

When we estimate we found this transfer fun

After that we put this transfer function in Simulink and simulate it we got this graph:

So: the responses are nearly the same.


Part 02:
1. Design different controllers (P, P+I, PID) and tune them as indicated by the professors. Include
mathematical work and simulations in MATLAB:

This is how we calculate Gt and Ti and Td:


0.83 𝜃 0.83 1.54627
𝐺𝑡 = ( + 0.4) = ( + 0.4) = 2.830
𝐺𝑠 𝜏 1 0.4758
𝜏𝐺𝑠 0.494 × 1
𝑇𝑖 = = = 0.610
0.75 0.75
0.35𝜃 0.35 × 1.54627
𝑇𝑑 = = = 0.494
𝐺𝑠 1
2. Use FALSTAD to simulate a closed loop simulation test:
3- For each of the asked controllers and the tuning approaches, and under the same testing conditions,
measure the performance criteria:

a) %OV (max overshoot).

For this part we need the controller response graph.

P:
0.90−1
𝑀𝑝 = = −0.1
1

The Mp was negative, that means there is no overshoot, it didn't even reach the reference.

(−0.1) ∗ 100
%0𝑉 = = 0%
1

PI:
1.043−1
𝑀𝑝 = 1
= 0.043

(0.043) ∗ 100
%0𝑉 = = 4.3%
1

PID:
1−1
𝑀𝑝 = 1 = 0

It reached the reference and had no overshoot.

(0) ∗ 100
%0𝑉 = = 0%
1
b) ts (settling time)
According to the curve, the ts parameter for the PID and PI controller was 9.3 s, while for P it was 4 s.

c) Sum of square errors. Consider it since the setpoint was modified and up to the
settling time ts

The sum of the squared errors was identified with the help of simulink
since the errors of each controller were integrated using blocks and we
graphed them.
PID= 0.615
PI=0.654
P=0.755

d) Ess (steady state error, absolute amount)

With the help of the graph and the lines are identified.

There is only steady state error in the P controller of 0.277.


e) %deviation due to the disturbance of 2V

P=
1.27 − 1
%𝐷 = ∗ 100 = 27%
1

PI=
1−1
%𝐷 = ∗ 100 = 0
1

PID=
1−1
%𝐷 = ∗ 100 = 0
1

f) time to recover the setpoint after a disturbance of 2V

P= 9 segundos
PI=14 segundos
PID= 14 segundos

Generate a comparative table.


8- The disturbance must be applied after the plant and emulates interference that intermittently impacts
the sensor reading causing the reading to rise by 2V. The tests must be carried out, always within the
operating range defined for the plant (Asynchronous work)
Conclusion
Given the shape of the plant and the response of the controller P, a controller that at least includes the
integral action is recommended, due to the presence of the error in its stable state.

Furthermore, it is known in the literature that integral actions are useful in rejecting matched disturbances.

This activity was challenging because of the schedule and a little because of the language. I enjoyed learning
about different cultures and meeting my classmates.

You might also like