Вы находитесь на странице: 1из 9

Process Automation - Homework 4

Kjartan Halvorsen

April 9, 2018

HOMEWORK DUE 2017-04-04 at midnight


Israel Ledesma Luis Fernando Tafoya Aguirre

Tuning PID controllers for level control of the nonlinear tank


model
The system
Consider the linearized model of the tank that we looked at in class

z(t) = z0 + w(t)

h(t) = h0 + y(t)
Cross-sectional area A
p
a 2gh

with dynamics given by the nonlinear differential equation


dh(t) p
A = x(t) − a 2gh(t), (1)
dt
where A is the cross-sectional area of the tank, a is the cross-sectional area of the hole,
z(t) is the flow into the tank.
We will use the the parameter values

A = 1, a = 0.1, g = 9.8,

and the operating point given by


p
h0 = 1, z0 = a 2gh0 ≈ 0.44,

1
A valve is used to control the flow z(t) = z0 + w(t). The valve is a so-called control
valve, which means it includes an inner controller that works as a position servo. That
is, it will make sure the opening of the valve follows the input signal to the valve. This
signal is named u(t). The response of the opening of the valve θ(t) to the input signal
u(t) is well-described by a second-order, critically damped system
1 4
Gv (s) = = .
(0.5s + 1)(0.5s + 1) (s + 2)(s + 2)

The flow through the valve depends also on the square root of the pressure difference
across the valve. In a linearized model, a change in pressure enters as an additive distur-
bance to the system. The complete model of the process is given in the block-diagram
below.

v(t)
valve
u(t) w(t) y(t)
Gv (s) Tank
P

The level h(t) of the tank is measured, and is available for feedback control.

v(t)
controller valve
yref (t) = 0 e(t) u(t) w(t) y(t)
F (s) Gv (s) Tank
P P

A simulink simulation model (tank_valve_system_open_loop.slx) of the system is


available on Blackboard under Course Documents/Matlab and Simulink/HW4

Problem 1 - Root locus for proportional controller


Consider the linearized model of the tank
1
G(s) =
s + 0.44
and a proportional controller F (s) = K. The loop gain becomes
Q(s)
z}|{
4
Go (s) = KGv (s)G(s) = K .
(s + 0.44)(s + 2)2
| {z }
P (s)

Use matlab to generate a root locus showing the location of the closed-loop poles as K
varies from 0 to ∞:

2
s = tf(’s’);
G = 1/(s+0.44);
Gv = 4/(s+2)^2;
rlocus(G*Gv);

1. Determine the point s = iωu on the imaginary axis at which the branches enters
into the right half plane.

From this image we can see that matlab gives us all the data at the designated
position regarding the behavior of our system. Among this data, we find the poles,
the gain and the damping of the system which happened to be: Gain = 5.99 Pole
= .00263 + 2.4i Damping = -.00109
And something important to notice is that our overshoot is equal to hundred per-
cent, this is because we’re about to pass to the right side of the plane where our
system becomes totally unstable and along the gain, we will be increasing this
overshoot.

2. If the closed-loop system has poles on the imaginary axis it will exhibit undamped
oscillations. What will be the period of these oscillations?

3
Using gain values superior than 5, we will notice that the system will become un-
stable and therefore an undamped behavior will be noticed. The rules of SimuLink
were used to measure the time from the first peak to the next one, getting the
following: dT = T = 2.69 s

3. Include the root locus in your report, with the point iωu clearly marked and the
value given.
*On the first point of this question*

Problem 2 - Tuning a PID controller using the Ziegler-Nichols ultimate


gain method (continuous cycling method)
With this tuning method you connect a proportional feedback controller to the system.
It should look like the figure below

4
1. Adjust the gain until you observe undamped oscillations. This value of the gain
K = Ku is called the ultimate gain.
As it is shown in the previous problem, the value from which an undamped behavior
will be observed, is 5.

2. Determine the period Tu of the undamped oscillations. This is called the ultimate
period. Was it close to the period of the oscillations you calculated in Problem 1
above?
If we add a gain of 6 instead of 5.99, which was the one indicated in the position
in which the graph will cross to the right side of the plane, we will notice that the
beginning of the graph will be the same as the one with 5.99 and the period from
a peak to another will be exactly the same.

3. Determine the parameters of a PID controller using the table below.

Since we need the parameters for a PID controller so we would need the following
parameter: K = 3.594 Ti = 1.345 Td = .33625

5
4. Include the simulated response with undamped oscillations in your report.

Problem 3 - Tuning a PID with Ziegler-Nichols step-response method


(first method)
Perform a bumptest on the plant (valve+tank). This means to connect a step block
(see Sources in the Simulink Library Browser) to the input of the valve. There is no
feedback.
1. Determine the slope R, the apparent deadtime L, and the parameter a = RL from
the step response. See the figure below.

Note that the slope R is the steepest slope of the response, i.e. the slope at the
inflection point. The tangent of the response at the inflection point will intersect
the time axis at the apparent deadtime L.

6
2. Calculate a = RL and determine a PID controller using the table below.

3. Include your simulated step-response in your report with R and L clearly marked.

Problem 4 - Simulate your PID controller


The controller is written
 
1  sTd
U (s) = K Yref (s) − Y (s) + Yref (s) − Y (s) − Y (s) .
sTi 1 + sTd /N

7
Let N = 10. Note that the integral and proportional parts act on the error signal
e(t) = yref (t) − y(t), but the derivative part acts on the negative feedback signal −y(t).
Implement the controller in simulink. It should look like the diagram below.

where the derivative and integral parts are Transfer Fcn blocks.

1. Simulate the system with the two different PID controllers you have tuned. Include
responses in your report.
PID Tuned 1

8
PID Tuned 2

2. Discuss the responses. Which PID controller gives the best performance? How
would you describe the behaviour of the closed-loop system?
We can see that the best performance is given by the first PID. The behaviour
of the system is almost the same in both, we thing this is because we have an
integrator and derived, that are acting in different ways inducing that what really
modify or control the system, is the gain.

Вам также может понравиться