Vous êtes sur la page 1sur 5

Department of Engineering Technology

GET 431/EET 441 Controls Lab


Spring, 2018

Lab #3: Control of a 1st Order Thermal System

Laboratory #3 investigates the closed-loop behavior of a thermal system to two different


control actions and the effect of different sample intervals on stability. The plant consists of a
tube with a constant power heating element, a fan to force air circulation, and a sensor to
measure the exit air temperature. A LabJack digital I/O device provides analog power to run
the fan and an analog-to-digital (ADC) port to read the temperature measurements from the
sensor. A Python program contains instructions to generate the error signal and control logic to
form the closed loop feedback system.

Theory
The plant, as represented in figure 1, can be approximated as a
first order system. Heat (𝑄̇ ) is provided at a constant rate from
a resistive heating element. This energy is transferred to the air
stream, the heating element, supporting structure, and the
temperature sensor (identified collectively as Mass in figure 1).

The governing differential equation representing the


temperature at the outlet is:

𝑑𝑇𝑜 (𝑡) 1 1
+ 𝜏 𝑇𝑜 (𝑡) = 𝜏 𝑇∞ + 𝐴 ∙ 𝑄̇ (1)
𝑑𝑡

Where, To(t) is the outlet air temperature,


T is the inlet air temperature (room air temperature),
𝑄̇ is the heat added to the air stream,
 is the system time constant, and
A is a constant

Since all the terms on the right hand side of equation (1) are constant, they will be combined
into new parameters (𝒯𝑖 /𝜏) where 𝒯𝑖 carries units of temperature. Equation (1) can then be
rewritten as,

𝑑𝑇𝑜 (𝑡) 1 𝒯𝑖
+ 𝜏 𝑇𝑜 (𝑡) = (2)
𝑑𝑡 𝜏

PART 1: CONTINUOUS SYSTEM ANALYSIS.


If the system is considered to be continuous, control analysis can be performed in the
s-domain. The plant transfer function of the differential equation (2) is,

𝑇𝑜 (𝑠) 1 1
𝐺𝑝 = = 𝜏 ∙ (𝑠+1⁄𝜏) (3)
𝒯𝑖 (𝑠)

and the closed-loop control system is presented in figure 2 where the controller (Gc) can be of
any type. The control action to be
examined in today’s laboratory is
proportional control.

Case 1: Proportional Control (P)


For proportional control, the controller
transfer function is simply a gain
constant.

𝐺𝑐 = 𝐾𝑝 (4)

With this controller, the closed loop transfer function becomes:

𝑇𝑜 𝑝/𝜏 𝐾
= 𝑠+(1+𝐾 (5)
𝒯𝑖 )/𝜏 𝑝

Response. There is one root of the characteristic equation and it is,

1+𝐾𝑝
𝑟=− (6)
𝜏

This root increases in magnitude as the gain increases; it moves further and further to the left
on the real axis of the complex plane as Kp increases. Real valued roots appear as coefficients
of time in the exponential function. This means the response speed increases as the gain
increases.

Steady State Error. Since the open loop transfer function is type 0, we know there will a steady
state error due to a unit step input. This error will be,

1
𝐸𝑠𝑠 = 1+𝐾 (7)
𝑝
Equation (7) shows that the steady state error decreases as the gain increases and approaches
zero as Kp approaches infinity.

Part 2: Discrete System Analysis.


If the system is considered to be discrete, control analysis can be performed in the time
domain. The recursion equation follows from the differential equation (2) where the derivative
is approximated as,
𝑑𝑇𝑜 (𝑡) 𝑇𝑜 |𝑛+1 −𝑇𝑜 |𝑛
≈ (26)
𝑑𝑡 ∆𝑡

The differential equation (2) is approximated as,

𝑇𝑜 |𝑛+1 −𝑇𝑜 |𝑛 1 𝒯𝑖
+ 𝜏 𝑇𝑜 |𝑛 = (27)
∆𝑡 𝜏

Case 1: Proportional Control (P)


For proportional control, where the controller is a simple gain, the closed loop transfer function
can be approximated as,

𝑇𝑜 |𝑛+1 −𝑇𝑜 |𝑛 𝐾𝑝 𝐾𝑝
+ (𝑇𝑜 |𝑛 + 1) ( ) = ( ) 𝒯𝑖 (28)
∆𝑡 𝜏 𝜏

Response. Solving equation (28) for 𝑇𝑜 |𝑛+1 yields,

∆𝑡 ∆𝑡
𝑇𝑜 |𝑛+1 = 𝑇𝑜 |𝑛 ∙ (1 − (1 + 𝐾𝑝 )) + 𝐾𝑝 ∙ 𝒯𝑖 ∙ ( 𝜏 ) (29)
𝜏

Equation (29) shows that progressive values of To are affected by the gain (Kp) as well as the
time increment (Δt). For instance, if Δt is very small, then the effect of Kp is diminished and
successive changes in To are very small. This approximates the continuous function case.

Stability. Increasing the time increment (Δt) has an effect similar to that of increasing
Kp. When the time increment (Δt) and proportional gain (Kp) take on values such that,

∆𝑡
(1 − (1 + 𝐾𝑝 )) < −1 (30)
𝜏
Or,
∆𝑡
(1 + 𝐾𝑝 ) > 2 (31)
𝜏
Or,
2𝜏
𝐾𝑝 > ∆𝑡 − 1 (32)

then, oscillations between successive points will occur, the values will increase in magnitude,
and the recursive series will never stabilize. At this point, the system is declared unstable.

Steady State Error. If this system is stable, the steady state value can be determined by
setting 𝑇𝑜 |𝑛+1 = 𝑇𝑜 |𝑛 . That is, if a steady state response is reached, then successive values
from equation (29) are repetitive. We obtain the steady state value by setting 𝑇𝑜 |𝑛+1 = 𝑇𝑜 |𝑛 =
𝑇𝑜−𝑠𝑠 in equation (29),

∆𝑡 ∆𝑡
𝑇𝑜 |𝑛 = 𝑇𝑜 |𝑛 ∙ (1 − (1 + 𝐾𝑝 )) + 𝐾𝑝 ∙ 𝒯𝑖 ∙ ( 𝜏 ) (33)
𝜏
Solve for 𝑇𝑜 |𝑛 ,
𝐾𝑝
𝑇𝑜−𝑠𝑠 = 𝒯𝑖 ∙ 1+𝐾 (34)
𝑝

Since the input is 𝒯𝑖 , the steady state error can be determined,

𝐾𝑝 1
𝐸𝑠𝑠 = 𝑇𝑜−𝑠𝑠 − 𝒯𝑖 = 𝒯𝑖 (1 − 1+𝐾 ) = 𝒯𝑖 (1+𝐾 ) (35)
𝑝 𝑝

Equation (35) is directly comparable to equation (7) for the steady state error of a unit step
input.

Case 2: Proportional + Integral Control (PI)


For proportional plus integral control, the controller is given by equation (8) and the closed loop
transfer function is given by equation (9) which is reproduced here.

𝑇𝑜 𝐾𝑝 (𝑠+𝐾𝑖 )/𝜏
= 𝑠2 +(1+𝐾 (9)
𝒯𝑖 𝑝 )𝑠⁄𝜏 +𝐾𝑝 𝐾𝑖 /𝜏

To convert this transfer function to a difference equation, we will use equation (26) to
approximate the first derivative and equation (36) to approximate the second derivative.

𝑑2 𝑇𝑜 (𝑡) 𝑇𝑜 |𝑛+1 −2𝑇𝑜 |𝑛 +𝑇𝑜 |𝑛−1


≈ (36)
𝑑𝑡 2 ∆𝑡 2

The difference equation of the s-domain closed loop transfer function, equation (9), is,

𝑇𝑜 (𝜏𝑠 2 + 𝑠 + 𝐾𝑝 𝑠 + 𝐾𝑝 𝐾𝑖 ) = 𝒯𝑖 (𝐾𝑝 𝑠 + 𝐾𝑝 𝐾𝑖 ) (37)

𝜏𝑇𝑜 𝑠 2 + 𝑇𝑜 (1 + 𝐾𝑝 )𝑠 + 𝑇𝑜 𝐾𝑝 𝐾𝑖 = 𝒯𝑖 (𝐾𝑝 𝑠 + 𝐾𝑝 𝐾𝑖 ) (38)

𝑇𝑜 |𝑛+1 −2𝑇𝑜 |𝑛 +𝑇𝑜 |𝑛−1 (𝑇𝑜 |𝑛+1 −𝑇𝑜 |𝑛 )


𝜏 ∆𝑡 2
+ ∆𝑡
(1 + 𝐾𝑝 ) + 𝑇𝑜 |𝑛 𝐾𝑝 𝐾𝑖 = 𝒯𝑖 𝐾𝑝 𝐾𝑖 (39)

Response. Solving equation (39) for 𝑇𝑜 |𝑛+1 yields,

1 𝜏 𝜏
𝑇𝑜 |𝑛+1 = 𝜏 ∙ [(2 ∆𝑡 + 1 + 𝐾𝑝 − 𝐾𝑝 𝐾𝑖 ∆𝑡) 𝑇𝑜 |𝑛 − ∆𝑡 𝑇𝑜 |𝑛−1 + 𝒯𝑖 𝐾𝑝 𝐾𝑖 ∆𝑡] (40)
+1+𝐾𝑝
∆𝑡

Stability. Equation (40) is complex but examination of the coefficients suggests


instability will occur if Ki or t is increased excessively.

Steady State Error. If this system is stable, the steady state value can be determined by
setting 𝑇𝑜 |𝑛+1 = 𝑇𝑜 |𝑛−1 = 𝑇𝑜 |𝑛 . That is, if a steady state value is reached, then successive
values from equation (40) are repetitive. We obtain the steady state value by setting 𝑇𝑜 |𝑛+1 =
𝑇𝑜 |𝑛−1 = 𝑇𝑜 |𝑛 = 𝑇𝑜−𝑠𝑠 and in equation (40). After some manipulation we find,
𝑇𝑜−𝑠𝑠 = 𝒯𝑖 (41)

Since the input is 𝒯𝑖 , the steady state error is zero,

𝐸𝑠𝑠 = 𝑇𝑜−𝑠𝑠 − 𝒯𝑖 = 0 (42)

Equation (42) is consistent with our understanding of a type 1 system subjected to a step input.

Case 3: Proportional + Integral + Derivative Control (PID)


The discrete analysis of a 1st order system with PID control is left as an exercise for the student.

Part 3: Procedure - Tuning


1. Unplug the heating element and run the Python program with Kp = -1. The program
knows that this will run the fan at 8 volts in an open loop manner.

2. When the output has stabilized at room temperature, plug in the heating element. You
should observe the “S” shaped response similar to the Ziegler-Nichols first method
figure 10-3 in the tuning handout.

3. When the output temperature has stabilized, terminate the program and open the
“fanout.csv” file in Excel. Use the first method of Ziegler-Nichols to estimate the gain
for 1) proportional only control and 2) proportional + integral control. Save the
response for each of these control actions.

Part 4: Procedure – Sample Time Stability


1. Use the proportional gain setting from part 3: step #3 above and run the program with
proportional only control with a time increment of 0.25 seconds. Save the response file.

2. Repeat step #1 above with a time increment of 1 second. Save the response file. Repeat
this process, increasing the sample time increment by 0.5 second each time until
instability occurs.

3. Use the proportional and integral gains determined in part 3: step #3 and run the
program with PI control and a sample time increment of 0.25 seconds. Save the
response file.

4. Repeat step #3 above with a time increment of 1 second. Save the response file. Repeat
this process, increasing the sample time increment by 0.5 second each time until
instability occurs.

Part 4: For your report.


Include all the figures you have saved. Discuss each figure and the trends indicated by
each. Comment on the success of the Ziegler-Nichols tuning parameters. Describe the
stability of the system as the sample time interval is increased.

Vous aimerez peut-être aussi