SBHS2: Feedback Control of Temperature using heater input- A Simulation Study

AIM:
To perform a simulation study on control of temperature using heater input with
P, PI and PID controller

Procedure

1. Compute controller parameters from Ziegler-Nichols Rule for P, PI, and PID
controllers
2. For a set point tracking for temperature using heater input, implement the P
controller in SCILAB
3. For a set point tracking for temperature using heater input, implement the PI
controller in SCILAB
4. For a set point tracking for temperature using heater input, implement the PID
controller in SCILAB
5. Make all the calculations in a file with the name: SBHS2,
6. When I run the file, it should be able to generate three plots
a. Plot1: Temperature Vs time and Heater input Vs. time for P-controller
b. Plot2: Temperature Vs time and Heater input Vs. time for PI-controller
c. Plot3: Temperature Vs time and Heater input Vs. time for PID-controller
d. It should print the % error for all the above three cases
7. Save the file SBHS2 and plot1, plot2, and plot3 in a folder name with your group
name. e.g. Group A will make a folder of name ‘A’
8. Save this folder on DesktopSBHSSBHS2

Figure 1: Single board heater system

Theory
A PID controller is one which tries to minimize the error between measured variable
and the set point by calculating the error and then putting a suitable corrective action. For
revision purpose, the output of interest of a process is called as the measured variable or process
variable, the difference between the set point and the measured variable is called the error and
the control action taken to adjust the process is called as manipulated variable. A PID controller
does not simply add or subtracts the control action but instead it manipulates using three distinct
control features, namely, Proportional, Integral and Derivative. Thus, a PID controller has three
separate parameters.

Proportional
This parameter generates a control action based on the current value of the error. In more
simplified sense, if the error is +2, the control action is -2. The proportion action can be
generated by multiplying the error with a Proportional constant Kp. Mathematical representation
of the same is given below,
P  K p e(t )

(1)

Where P is the proportional output Kp is the proportional gain e(t) is the error signal. The
value of Kp is very important. A large value of Kp may lead to instability of the system. In
contrast, a smaller value of Kp may decrease the controller’s sensitivity towards error. The
problem involved in using only proportion action is that, the control action will never settle down
to its target value but will always retain a steady-state error.

Integral
This parameter generates a control action depending on the history of errors. It means
that the action is based on the sum of the recent errors. It is proportional to both the magnitude as
well as duration of the error. The summation of the error over a period of time gives a value of
the offset that should have been corrected previously. The integral action can thus be generated
by multiplying this accumulated error with an integral gain Ki. Mathematical representation of
the same is given below,
t

I  K d  e(t )dt

(2)

0

Where, I is the integral output; Kiis the integral gain (
where,
is the
integral time). The integral action tends to accelerate the control action. However, since it looks
only at the past values of the error, there is always a possibility it causing the present values to
overshoot the set point values.

Derivative
As the name suggests, a derivative parameter generates a control action by calculating the
rate of change of error. A derivative action is thus generated by multiplying the value of rate of

change of error with a derivative gain Kd. Mathematical representation of the same is given
below,
d
(3)
D  K d e(t ) …
dt
Where D is the derivative output Kdis the derivative gain (
where,
is
the derivative time) The derivative action slows the rate of change of controllers output. A
derivative controller is quite useful when the error is continuously changing with time. One
should however avoid using it alone. This is because there is no output if error is zero and when
the rate of change of error is constant. When all the above control actions are summed up and
used together, the final equation becomes,
t
d
PID  Ke(t )  K i  e(t )dt  K d e(t ) …
(4)
dt
0
Alternatively,
t


1
d
PID  K e(t )   e(t )dt   d e(t )
i 0
dt

(5)

P Controller:
( )
( )…

(6)

PI Controller:
(

)

( )

{ (
{ ( )

)

()

()

} …

(7)

} …

(8)

Subtracting the above two equations,
(

)

( )

{ (

)

(

)

( )

(

) (

)

( )

(
)

)} …

(9)

( )…

(10)

PID Controller:
(

)

( )

{ (
{ ( )

( (

()
( ( )

()

(

)

( ))

}…

(11)

))

}…

(12)

Subtracting the above two equations,
(

)

( )

{ (

(

)

( )

(

)

( )
) (

(
)

)
(

( (

)

) ( )

( )

(

( ) (

))

}…(13)
) … (14)

(

)

( )

) (

(

)

) ( )

(

( ) (

Calculations:
Compute the controller tuning parameters by Cohen and Coon Rule as follows
Kc
(

P
PI
PID

)

(

NA

NA

)
(

NA

)

td

Figure 3: Reaction Curve
Controller Tuning Parameters:
Controller
P
PI
PID

K

i

d

)(15)

Conclusions: