You are on page 1of 46

Lab Experiment # 01

Introduction to MATLAB Simulink


Name: Roll No:

Score: Signature of the Lab Tutor: Date:

Operate and practice different models in MATLAB Simulink and sketch various graphs
for system response.

PERFORMANCE OBJECTIVE
Upon successful completion of this experiment, the student will be able to:
(i) Understand the working of MATLAB Simulink.
(ii) Convert Mathematical equations in SIMULINK.
(iii) Sketch various graphs for system response.

EQUIPMENTS
 Matlab 2007 or onward version.

NOTE
 Make sure that the MATLAB you have installed is registered and working.
 Counter check the SIMULINK tool bar has been installed.

DISCUSSION
In Simulink, it is very straightforward to represent and then simulate a mathematical model
representing a physical system. Models are represented graphically in Simulink as block
diagrams. One of the primary advantages of employing Simulink (and simulation in general) for
the analysis of dynamic systems is that it allows us to quickly analyze the response of complicated
systems that may be prohibitively difficult to analyze analytically. Simulink is able to numerically
approximate the solutions to mathematical models that we are unable to, or don't wish to, solve
"by hand."
In general, the mathematical equations representing a given system that serve as the basis for a
Simulink model can be derived from physical laws.

SIMULATION PROCEDURE
(i) Open MATLAB and try to simulate an algebraic equation for temperature conversion.
o o
(ii) Algebraic equation for temperature conversion is T( F)= 1.8* T( C)+32
(iii) From Simulink library following blocks are required.
o
Constant Block for values of Temperature in C and constant value of 32.
o
Gain for multiplying 1.8 with the values of T( C).
o
Adder for adding a constant value of 32 and 1.8* T( C)
o
Display for showing the converted value in T( F)

Fig 1.1 Simulation from MATLAB Simulink.

1
OBSERVATIONS / GRAPH PLOTTING
(i) Measure following values.

o o o o
T ( F) = .....................................................................for T ( C)= 0 C and -273 C
o o
(ii) For what value of T ( C) becomes equal to T ( F), find out from simulation.
T =…………………………………………….

REVIEW QUESTIONS
1. Paste the simulation model for equation of line i.e. y = 2x + 1.
[HINT: For varying input take Ramp input signal, rather than constant.]

2. Paste the output graph taken from above equation.


[HINT: Take scope for output rather than display block.]

FINAL CHECK LIST


1. Make sure to save your simulated model.
2. Save the output graph for the simulation.
3. Submit your answers to questions, together with your data, calculations and results
before the next laboratory.

2
Lab Experiment # 02
st
Mathematical Modelling of 1 order system using Simulink
Name: Roll No:

Score: Signature of the Lab Tutor: Date:

st
Construct Mathematical Models of 1 order system using MATLAB Simulink and
practice their responses at various inputs.

PERFORMANCE OBJECTIVE
Upon successful completion of this experiment, the student will be able to:
(i) Distinguish between first and second order systems.
(ii) Extract and solve their respective equations.
(iii) Easily model them in MATLAB Simulink and analyze their responses for various
inputs.

EQUIPMENTS
 Matlab 2007 or onward version.

NOTE
 Make sure that the MATLAB you have installed is registered and working.
 Counter check the SIMULINK tool bar has been installed.

DISCUSSION

Order of the system is the order of the differential equation (Highest derivative) that is generated
through its fundamental equations that define the system.
First and second order differential equations are commonly studied in Dynamic Systems courses,
as they occur frequently in practice.
The first example is a low-pass RC Circuit that is often used as a filter. This is modeled using a
first-order differential equation. The second example is a mass-spring-dashpot system. This
system is modeled with a second-order differential equation (equation of motion). To better
understand the dynamics of both of these systems we are going to build models using Simulink as
discussed below. You should build both models first, then run them so you can compare how each
system responds to the same input.

FIRST ORDER RC CIRCUIT

Fig 2.1 Series RC circuit

Given circuit is having only single energy storing element (Capacitor) and has first order
differential equation. Vc is the output that is to be analyzed for any input.
The circuit equations are given as:

3
Vs = iR + Vc..................................................(2.1)

Where i=C dvc/dt

Substituting values of ‘i’ in eq: 2.1

Vs= RC dvc/dt + Vc.......................................(2.2)

Or dvc/dt = (Vs-Vc)/ RC......................................(2.3)

SIMULATION PROCEDURE
i. Open MATLAB and try to simulate first order differential equation.
ii. (Vs-Vc) will utilize subtract box and the signal will have gain of 1/RC.
iii. To see the graph of Vc the coming signal must be integrated, thus integrator will be used.
iv. Now final signal will be given to scope to see the result.
v. From Simulink library following blocks are required.
Step input for Vs (input) is taken as step of any magnitude.
Gain for the resultant signal Vs-Vc will be m ult iplied with gain

1/RC.
Subtractor for getting the difference of two signals (Vs-Vc)
Scope for displaying the resultant output waveform.
Integrator for getting Vc out of its derivative.

Fig 2.2 Simulation from MATLAB Simulink.


RESULT:

Fig 2.3 Simulation results (R=1Ω, C=1F and step is taken at t =1sec with initially Vc=0)

4
REVIEW QUESTION

Try to simulate RL circuit as example of first order system and paste simulations result.

FINAL CHECK LIST


1. Make sure to save your simulated model.
2. Save the output graph for the simulation.
3. Submit your answers to questions, together with your data, calculations and results
before the next laboratory.

5
Lab Experiment # 03
nd
Mathematical Modelling of 2 order system using Simulink
Name: Roll No:

Score: Signature of the Lab Tutor: Date:

Construct Mathematical Models of 2nd order system using MATLAB Simulink and
practice their responses at various inputs.

PERFORMANCE OBJECTIVE
Upon successful completion of this experiment, the student will be able to:
(iv) Distinguish between first and second order systems.
(v) Extract and solve their respective equations.
(vi) Easily model them in MATLAB Simulink and analyze their responses for various
inputs.

EQUIPMENTS
 Matlab 2007 or onward version.

NOTE
 Make sure that the MATLAB you have installed is registered and working.
 Counter check the SIMULINK tool bar has been installed.

DISCUSSION

Order of the system is the order of the differential equation (Highest derivative) that is generated
through its fundamental equations that define the system.
First and second order differential equations are commonly studied in Dynamic Systems courses,
as they occur frequently in practice.
The first example is a low-pass RC Circuit that is often used as a filter. This is modeled using a
first-order differential equation. The second example is a mass-spring-dashpot system. This
system is modeled with a second-order differential equation (equation of motion). To be
understand the dynamics of both of these systems were are going to build models using Simulink
as discussed below. You should build both models first, then run them so you can compare how
each system responds to the same input.

SECOND ORDER MECHANICAL SYSTEM


The mass-spring-dashpot is a basic model used widely in mechanical engineering design to model
real-time mechanical systems. It is represented schematically as shown in Fig. 2.4 below

Fig 2.4 Second order Mechanical system


6
The response of this system is governed by the equation of motion which is a second order
differential equation.
2 2
F(t) = m d x(t)/dt + b dx(t)/dt + k x(t)..............................(2.4)
where m is the mass, b is the dashpot constant and k is spring

2 2
constant. d x(t)/dt = [ F(t)/m – b/m dx(t)/dt – k/m x(t) ]. .(2.5)

SIMULATION PROCEDURE
Open MATLAB and try to simulate second order differential equation.
I. ( 1/mF(t) – b/m dx(t)/dt – k/m x(t) ) will utilize subtract box.
II. To see the graph of X(t), the coming signal must be integrated twice, thus integrator will
be used.
III. X’ signal that is given to Subtractor must be taken after first integrator box.
IV. X signal that is given to Subtractor must be taken after second integrator box
V. Respective gains must be given to the signals at required points.
VI. From Simulink library following blocks are required.
Step input for F(t) (input) is taken as step of any
magnitude. Gain for the B/M, K/M and 1/M.
Subtractor for generating the signal ( 1/m F(t) – b/m dx(t)/dt – k/m x(t))
Integrator for integrating signal twice to get x(t)
Scope for displaying the resultant output waveform.

Fig 2.5 Simulation of second order system with Matlab Simulink

7
RESULT:

Fig 2.6 Simulation results (Mass= 2kg, B= 2N-s/m and K= 4N/m)

OBSERVATION
(i) Increase the value of Mass then Friction constant then spring constant separately in above
simulation and paste their respective graphs here.

REVIEW QUESTION
Try to simulate RLC circuit as example of 2nd order system and paste simulations result.

FINAL CHECK LIST


4. Make sure to save your simulated model.
5. Save the output graph for the simulation.
6. Submit your answers to questions, together with your data, calculations and results
before the next laboratory.

8
Lab Experiment # 04
Transfer Function with MATLAB
Name: Roll No:

Score: Signature of the Lab Tutor: Date:

Display the coding to get the transfer function and organize blocks either in series or parallel to get
different responses.

PERFORMANCE OBJECTIVE
Upon successful completion of this experiment, the student will be able to:
(i) Understand the coding in MATLAB.
(ii) Know how to enter the T.F of any block in Matlab.
(iii) Solve various blocks in series and parallel.

EQUIPMENTS
 Matlab 2007 or onward version.

NOTE
 Make sure that the MATLAB you have installed is registered and working.
 Counter check the SIMULINK tool bar has been installed.

DISCUSSION
A transfer function of a linear time-invariant (LTI) system can be entered into MATLAB using
the command tf(num,den) where num and den are row vectors containing, respectively, the
coefficients of the numerator and denominator polynomials of the transfer function. For example,
the transfer function:

can be entered into MATLAB by typing the following on the command line:

num = [3 1]; num stands for numerator.


den = [1 3 2]; den stands for denominator.
G tf stands for transfer function.
= tf(num,den)

The output on the MATLAB command window would be:

Once the various transfer functions have been entered, you can combine them together using
arithmetic operations such as addition and multiplication to evaluate the transfer function of a
cascaded system. The following table lists the most common systems connections and the
corresponding MATLAB commands to implement them. In the following, SYS refers to the
transfer function of a system, i.e. SYS = Y(s)/R(s).

9
Fig 3.1 Most common systems connections and the corresponding MATLAB commands

EXAMPLE

Evaluate the transfer function of the feedback system shown in the figure below using MATLAB
where G1(s) = 4, G2(s) = 1/(s+2) and H(s) = 5s.

Fig 3.2 Closed loop system forward blocks and a feedback block.

SOLUTION PROCEDURE
(i) Open MATLAB and write the command for various blocks shown in fig above in
command window.
(ii) Write down following code in command window

G1 = tf([0 4],[0 1]);


G2 = tf([0 1],[1 2]);
H = tf([5 0],[0 1]);
SYS = feedback(G1*G2,H) or SYS = G1/1+G1*G2*H

(iii) Following will be total transfer function written in command window as a result.

10
OBSERVATIONS
(i) Place G1 and G2 blocks of above example in parallel and the find the total transfer
function.

Transfer Function = …………………………………………………………….

(ii) Re-write the code for positive feedback and negative feedback for above example and
write the resulting transfer functions.

T.f (with negative feedback) = …………………………….

T.f (with positive feedback) = ……………………………..

REVIEW QUESTION
1. Compute the closed-loop transfer function of the following system using MATLAB.

FINAL CHECK LIST


1. Make sure to save your simulated model.
2. Save the output graph for the simulation.
3. Submit your answers to questions, together with your data, calculations and results before
the next laboratory.
Lab Experiment # 05
Poles-Zero Map (PZmap) with MATLAB
Name: Roll No:

Score: Signature of the Lab Tutor: Date:


Measure poles and zeros of TF and construct PZmap in command window of MATLAB

PERFORMANCE OBJECTIVE
Upon successful completion of this experiment, the student will be able to:
i. Find out Poles and Zeros for any transfer function using Matlab.
ii. Create poles-zeros (PZ) map.
iii. Find out whether system will be stable unstable or marginally stable.

EQUIPMENTS
 Matlab 2007 or onward version.

NOTE
 Make sure that the MATLAB you have installed is registered and working.
 Counter check the SIMULINK tool bar has been installed.

DISCUSSION
Transfer function indicates that what kind of output system will give for any input given whereas
zeros of the transfer function means the point where system will give ZERO output for any given
input consecutively pole of the transfer function means the point where the system will show
infinite output for any given input.
Suppose TF is the impedance of any filter designed, then zero of that TF is the point where
impedance becomes zero (means short circuit) and pole will be the point where impedance
becomes infinite (means open circuit).
The values of s where transfer function becomes zero or the numerator of the
transfer function is zero is called the zeroes of transfer function and at that point of s the system’s
output is zero.
The value of the s where transfer function becomes infinity or the denominator
of the transfer function is zero is called the pole of the transfer function and at that point of s
system’s output is infinity (practically maximum).

EXAMPLE
Find out no. of poles and zeroes for a series LC circuit having C=1F and L=1H.

SOLUTION PROCEDURE
1

Transfer function for the given circuit will be 1  s 2.

12
(i) Open MATLAB and write the command for transfer function of above circuit in command
window.
(ii) Write down following code in command window

num = [1];
den = [1 0 1];
G = tf(den, numerator)

(iii) Following will be total transfer function written in command window as a result.

(iv) To get zeroes of the above mentioned transfer function, write in command window

Zero (G) where G is TF of above example.

(v) Result will be

That means above system has got no zero and system will give output whenever
any input is given.

(vi) To get poles of the above mentioned transfer function, write in command window

Pole (G) where G is TF of above example.

(vii) Result will be

That means when s=0+j1 or s=0-j1 system will give maximum output (theoretically
infinite)

PZ MAP

To get PZ-map in Matlab following command shall be written in command

window pzmap (G) where G is the TF of the above example

13
Following will be the output plot where cross shows pole and a small circle will show zero.
As there is no zero in the TF so the plot has also shown no zero.
Pol e-Zer o M ap 1

0.8 0.6 0.4 0.2 0 -0.2 -0.4 -0.6 -0.8 -1


Imaginary Axis (seconds -1)

-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1


-1
Real Axis (seconds )

Fig 4.1 Pole-Zero plot of series LC circuit.

OBSERVATIONS

1. Paste PZ-map plot of parallel LC circuit, taking L=1H and C=1F.

REVIEW QUESTIONS
1. Paste PZ-map of at least three TF discussed in class.

14
Lab Experiment # 06
Time Response Analysis with MATLAB
Name: Roll No:

Score: Signature of the Lab Tutor: Date:


Display the time response of various electrical systems at various inputs

PERFORMANCE OBJECTIVE
Upon successful completion of this experiment, the student will be able to:
(i) Understand the time response.
(ii) Analyze the output for various standard inputs.

EQUIPMENTS
 Matlab 2007 or onward version.

NOTE
 Make sure that the MATLAB you have installed is registered and working.
 Counter check the SIMULINK tool bar has been installed.

DISCUSSION

The response given by the system which is function of the time, to applied excitation is called
time response. In practical system, output of the system takes some finite time to reach to its final
value. This time varies from system to system and is dependent on different factors. Similarly
final value achieved by the output also depends on the different factors like friction, mass or
inertia of moving elements, some non-linearities present etc.

The output response of the system is based on two components


i.e. Where to reach means steady state response.
How to reach means the transient response.

Transient response of the system decays as time lapses by, theoretically may be
infinity but practical it takes some finite time whereas the steady state response remains there as
transient response completes.
Hence total tome response c(t) can be written
as c(t) = Css + ct(t)
where Css is the steady state response and ct(t) is transient response.

EXAMPLE
Analyze the response for step, ramp and impulse test inputs of the following circuit take R=2Ω,
C=1F and L=1H.

15
SOLUTION PROCEDURE

The transfer function for the above given circuit is


s 2 2s .
 2s 1
(i) Open MATLAB and write the command for transfer function of above circuit in command
window.
(ii) Write down following code in command window

num = [2 0];
den = [1 2 1];
G = tf(den, numerator)

(iii) Following will be total transfer function written in command window as a result.

STEP RESPONSE

To plot the unit-step response of the system following command is used in Matlab command
window.
step (G).............................where G is the T.F of the respective system
Step Response
0.8

0.7

0.6

0.5
Amplitude

0.4

0.3

0.2

0.1

0
0 1 2 3 4 5 6 7 8 9 10
Time (seconds)
2s
Fig 5.2 Unit-Step response of s 2  2s 1
For a step input of magnitude other than unity, for example K, simply multiply the transfer
function G by the constant K by typing step(K*G). For example, to plot the response due to a step
input of magnitude 5, we type step(5*G).

16
IMPULSE RESPONSE

The unit-impulse response of a control system G=tf(num,den) may be plotted in MATLAB using
the function impulse(G), where G is the transfer function of above given example.
To plot the unit-impulse response of the system following command is used in Matlab command
window.
Impulse(G)............................where G is the T.F of the respective system
Impulse
Response 2

1.5

1
Amplitude

0.5

-0.5
0 1 2 3 4 5 6 7 8
Time (seconds)

Fig 5 3 Unit-Impulse response of 2s


s  2s 1
2

RAMP RESPONS E
There is functionno ramp c mmand in MATLAB. T obtain the unit ramp response of the transfer
G(s):

 multiply G(s) by 1/s, and


 use the resulting function in the step command.

2s Y (s) 2s
E.g. Given example has T.F of s 2  2s 1or R(s)  s 2  2s 1 where R(s) is input and Y(s) is
1
output. Unit-Ramp input has laplace of , thus 1/s must be multiplied by transfer function and
s 2
2s 1
remaining 1/s will be the unit step response i.e. Y (s)  * .
(s 2  2s 1)s s
To plot the unit-Ramp response of the system following command is used in Matlab command
window.
Step(SYS)….......where system is the T.F of G multiplied by 1/s.

17
Step Response
2

1.8

1.6

1.4

1.2
Amplitude

0.8

0.6

0.4

0.2

0
0 1 2 3 4 5 6 7 8
Time (seconds)
2s
Fig 5.4 Unit-Ramp response of
s 2  2s 1

OBSERVATIONS
(i) Use step of 2, 5 and 10 for ramp and impulse input for above example and paste the
resulting graphs here.

REVIEW QUESTIONS
1. Analyze the impulse, step and ramp input for the T.F of any suitable problem discussed in
class and paste the results here.

FINAL CHECK LIST


1. Make sure to save your simulated model.
2. Save the output graph for the simulation.
3. Submit your answers to questions, together with your data, calculations and results
before the next laboratory.

18
Lab Experiment # 07
Introduction to Process Control Unit (UCP)
Name: Roll No:

Score: Signature of the Lab Tutor: Date:

Display the basics of computer controlled process control system.

PERFORMANCE OBJECTIVE
Upon successful completion of this experiment, the student will be able to:
i. Understand the computer controlled processes.
ii. Understand the interface of process variables and computer through Data acquisition
board.

EQUIPMENTS
 Process Control Unit (UCP).

NOTE
 Make sure that the UCP is not energized.
 Counter check the breakers at the back of control interface box are down.

DISCUSSION
The Process Control Unit is used to measure and control water level in tanks,
flow through the pumps and temperature of fluid placed in two upper tanks through various
controls such as on-off control and proportional control.

Fig 6.1: Main Diagram of the Equipment

19
UCP elements indicated in the diagram are:

1. A main tank and collector with an orifice in the central dividing wall, and drainage in
both compartments.
2. A dual process tank, interconnected through an orifice and a ball valve and an
overflow in the dividing wall; a graduated scale.
3. Two centrifugal pumps.
4. Two variable area flowmeters and with a manual valve.
5. Line of on/off regulation valves (solenoid). Usually one is opened (AVS-1), and the
other two are normally closed (AVS-2 and AVS-3); and a manual drainage valves of
the superior tank.
6. A motorized control valve (AVP-1).
8. A flow sensor, fixed, turbine type.
9. A temperature sensor.
10. A helix agitator.
11. An electric heater (0.5kW fixed).
12. Level sensor 0-300 mm, can be dismantled.
14. Level Switch

Fig 6.2: Base unit of UCP

20
Following are the sensors and actuators in Base unit, elements that start with ‘S’ are sensors and
elements that start with ‘A’ are actuators written on the interface control box.

Sensors Actuators
Level Sensor (SN-1) Solenoid Valve N.O. (AVS-1)
Flow Sensor (SC-1) Solenoid Valve N.C. (AVS-2)
Temperature Sensor (ST-1) Solenoid Valve N.C. (AVS-3)
Pressure Sensor (SP-1) Heater (AR-1)
PH Sensor (SpH-1) Agitator (AA-1)
Proportional Valve (AVP-1)
Motor Pumps (AB-1 and AB-2)
Level Switch (AN-1)
Table 6.1: List of sensors and actuators.

Fig 6.3: Sketch of UCP’s base unit showing position of various sensors and actuators

21
Process Control Unit (UCP) interface with computer:
Base unit is connected with control interface box that actually gets signals from
sensors and also gives signal to actuators. Control interface box is connected with Data
Acquisition board (DAQ) manufactured by National Instruments and that DAQ is connected with
CPU through PCI slot.

Fig 6.4: UCP physical connection and data processing sketch.

OBSERVATIONS
(i) Which part of the UCP converts analogue signals to digital signals?

(ii) What is the function of level switch in UCP?

(iii) What is work of agitator in UCP?

REVIEW QUESTIONS
1. See the base unit of UCP and mention the use of manual drainage valves (ball valve).

2. Is there any protection given for over flow of upper tank?

22
Lab Experiment # 08
Temperature Control Loops (Manual)
Name: Roll No:

Score: Signature of the Lab Tutor: Date:


Calibrate the temperature of water in Process Control Unit manually

PERFORMANCE OBJECTIVE
Upon successful completion of this experiment, the student will be able to:
(i) Understand basics of control loop.
(ii) Analyze the process variables in control loops.

EQUIPMENTS
 UCP-F.
 Water.
 Control and Acquisition software.

NOTE

 Make sure that the manual valve is half opened at the time of operation.
 Before turning motor pump on, AVP-1 actuator must be fully opened via control and
acquisition software.

DISCUSSION

Manual control is type of open loop control system in which operator senses himself the process
variable (temperature in this case) and then regulates the output manually himself.
This control is very simple but involves the operator’s action while in closed loop control system
controller eliminates the need of operator and operator’s action is performed through controller
itself.
Process variables’ (temperature in this case) real time value can be seen from software that is also
showing the value of other process variable like flow, level etc

23
Procedure:
 Connect the interface of the equipment and execute the program SACED UCP-T.
 Inside the program, select the option Configuration and connect pump 1
 The temperature regulation of a tank of water can be carried out by two different
procedures that we will identify as:
a. Static it consists on filling the left superior tank above the level alarm.
b. Continuous or Dynamic it consists on fixing a water level in the left superior tank but
with an inlet and outlet of constant water. In this second procedure, it is required that
the incoming and outcoming water flows are small, in order to establish a thermal
balance in the tank. Under these conditions, it is also necessary to maintain the water
level above the level alarm.
 In the manual regulation (no controller) the temperature can be regulated by the on and off
immersion resistor placed in the tank
 Select the option ''Manual Control'' of the software supplied with the equipment.
 Connect pump 1
a. Fill the tank above the level alarm. Disconnect pump 1 and close the valve AVP-1
manually.
b. Connect pump 1 and fill the tank until getting the level alarm. Once surpassed this,
AVS-1 opens, and using AVP-1 fix a constant inlet and outlet water flow in the
tank.
 By the connection and disconnection of the resistor, fix a temperature for the water. In the
case b, if it is necessary, fix the temperature varying the inlet and outlet of flow. So, open
or close valve AVP-1 or the AVS-1.

In manual control the changing the temperature will always be regulated by operator and thus it’s
the worst disadvantage of manual control.

24
OBSERVATIONS
(i) What type of sensor actuator is used to control temperature in UCP?

(ii) How signal of temperature is taken to control interface box?

REVIEW QUESTIONS
1. Enlist some applications of manual control loops.

FINAL CHECK LIST


1. Make sure to quit the software.
2. Turn-off the circuit breakers given at the back of the control interface box.
3. Submit your answers to questions, together with your data, calculations and results
before the next laboratory.

25
Lab Experiment # 09
Level and flow Control Loops (Manual)
Name: Roll No:

Score: Signature of the Lab Tutor: Date:


Fix the level and flow of water in Process Control Unit manually (open loop control system)

PERFORMANCE OBJECTIVE
Upon successful completion of this experiment, the student will be able to:
(iii) Understand basics of control loop.
(iv) Analyze the process variables in control loops.

EQUIPMENTS
 UCP-F.
 Water.
 Control and Acquisition software.

NOTE

 Make sure that the manual valve is half opened at the time of operation.
 Before turning motor pump on, AVP-1 actuator must be fully opened via control and
acquisition software.

DISCUSSION

Manual control is type of open loop control system in which operator senses himself the process
variable (temperature in this case) and then regulates the output manually himself.
This control is very simple but involves the operator’s action while in closed loop control system
controller eliminates the need of operator and operator’s action is performed through controller
itself.
Process variables’ (level in this case) real time value can be seen from software that is also
showing the value of other process variable like flow, level etc

23
Procedure for level control :

 Connect the interface of the equipment and execute the program SACED UCP-L.
 Inside the program, select the option Manual.
 In the manual regulation (no controller) the flow can be regulated by the manual adjustable valve VR1,
placed in the inferior part of the flowmeter. This regulation, together with the opening of the tank
manual valves, to notice a level of water. Change its position and observe the adjustment of the level in
function of their position.
 Select the option “Manual Control” of the software supplied with the equipment.
 Connect pump 1 and vary the position of the motorized valve in the slip bar or the command associated
to this action. Open AVS-1 or AVS-2 and check how, for a given position, the level of water in the tank
fixes.
 Change the position of the valve and repeat the values to observe the reproducibility of the level
control.
 Use the controls prepared in the software for the control of the solenoid valves AVS-1, AVS-2 and
AVS-3 and the switch on/off button of the pump. Observe how an on/off of it also produces a level
control of the liquid.

Students are required to note down the procedure of flow control in UCP and write down the
steps here.













24
REVIEW QUESTIONS

1. How flow of water level can be regulated in manual regulation ?

2. How signal of level of water is taken to control interface box?

3. Which program is executed for level regulation in control interface box?.

FINAL CHECK LIST


4. Make sure to quit the software.
5. Turn-off the circuit breakers given at the back of the control interface box.
6. Submit your answers to questions, together with your data, calculations and results
before the next laboratory.

25
Lab Experiment #10
Temperature Control Loops (ON/OFF)
Name: Roll No:

Score: Signature of the Lab Tutor: Date:

Display the basics on/off control and calibrate the particular temperature of any liquid in
UCP

PERFORMANCE OBJECTIVE
Upon successful completion of this experiment, the student will be able to:
(i) Understand the ON/OFF control.
(ii) Analyze control action of solenoid valve actuator.
(iii) Set the required temperature of water

EQUIPMENTS
 UCP-F.
 Water.
 Control and Acquisition software.

NOTE

 Make sure that the manual valve is fully opened at the time of operation.
 Before turning motor pump on, AVP-1 actuator must be fully opened via control and
acquisition software.

DISCUSSION

Sometimes, the control element has only two position either it is fully closed or fully open. This
control element does not operate at any intermediate position, i.e. partly open or partly closed
position. The control system made for controlling such elements, is known as on off control. In
this control system, when process variable changes and crosses certain preset level, the output
valve of the system is suddenly fully opened and gives 100% output or fully closes and give 0%
output.
This is the most common and less costly feedback control systems as it utilizes less material to
maintain any limits for the output/ process variable.
The on/off control can be employed over flow, temperature or level control in Process Control
Unit (UCP).
On/off control to maintain flow through the pipe is controlled by sequentially turning AVS-1 on
and off which is normally open solenoid valve.
On/off control for maintaining the temperature utilizes on off action of the
heater. Note: Heater will turn of only if water is filled till the limit switch.
On/off control for maintaining the level of water in upper tank is controlled by turning AVS-2 and
AVS-3 on and off which are normally closed solenoid valves.
To control any of the process variable the controlling element i.e. solenoid
valves or heater must be checked in the control section given in the software display.

Experimental Procedure:

1. Connect the interface of the equipment and the control software.


2. Select the control option on/off from the given software.
26
3. By a double click on the on/off control, select the temperature wanted. By default, there is
a set point, a tolerance and performance time. It can be varied by the operators wish or as
per requirement.
4. Must check the respective controlling equipment for the controlling action (AR-1 in case
of temperature control)
5. After defining the tolerance and the band/limits for the process variable turn on AB-1 or
any other equipment as per requirement. (Heater in case of temperature control).

Fig 8.1: Control and Acquisition display showing encircling tolerance band

The graph for the any process variable can be seen through software by checking respective
sensor down where graph screen is shown. (ST-1 in case of temperature control).

Fig 8.2: Software display showing graph area encircling different sensors

27
OBSERVATIONS
(i) What are the disadvantages of On/Off control?

(ii) What will happen if the controlled band for the process variable is too narrow?

REVIEW QUESTIONS
1. Can On/Off control be used in open loop control system? Justify your answer

FINAL CHECK LIST


1. Make sure to quit the software.
2. Turn-off the circuit breakers given at the back of the control interface box.
3. Submit your answers to questions, together with your data, calculations and results
before the next laboratory.

28
Lab Experiment # 11
Level Control Loops (Proportional)
Name: Roll No:

Score: Signature of the Lab Tutor: Date:

Fix the level of water in UCP automatically in closed loop system using proportional
controller only and display the operation of proportional controller .

PERFORMANCE OBJECTIVE
Upon successful completion of this experiment, the student will be able to:
(i) Understand the system dynamics and the response to the control actions in closed loop.
(ii) Analyze regulating the set point (flow) by the employment of proportional controller.

EQUIPMENTS
 UCP-F
 Water.
 Control and acquisition software.

NOTE
 Make sure that the manual valve is fully opened at the time of operation.
 Before turning motor pump on, AVP-1 actuator must be fully opened via control and
acquisition software.

DISCUSSION

Modulating/Proportional represents the higher end of control positioning. In


modulating/proportional control the output varies continuously and is not limited to being fully
open or fully closed. Proportional means that the size of the output is related to the size of the
error detected by the controller. The key phrase for modulating/proportional control is
“Continuous Control Action.” The sensor, controller, and final control device act as one unit to
maintain constant precise control over the controlled medium.
You can control the level in the tank by a sensor and a controller configured for
the proportional outputs to the actuator without the typical oscillations of the on/off control. The
response of the control loop can be studied compared to the disturbances, load changes in the
variables of the process (level) or variations in the set point (the level is changed fixing different
set points).
Modifying the set point in a remote way, the level changes can be observed,
oscillating around the new value. We can have the case that the set point is not reached if the
range of the actuator (manipulated variable) is not enough as to control the interfaces or changes
in the set point, so it will be stabilized only until the maximum that the available water allows. In
our case, the manipulated variable is the water flow to maintain the level, that circulates through a
motorized valve, managed automatically from the controller (0-10V signal), by means of
superimposed actions of proportional, integral and derivative type.
In proportional control, only single value of the proportional gain out of PID is
given through control and acquisition software that acts till the system shows any error.

29
Experimental Procedure:

1. Connect the interface of the equipment and the control software.


2. Select the option “Control PID” on the capture screen.

Fig 9.1: PID control in Control and Acquisition software

3. Select a set point, PID controller and a proportional constant.


4. Indicate a value of 0 for the integral and derivative performance. In this experiment, we
want to observe the effects of a proportional action.

Fig 9.2: PID control block in control and acquisition software and equivalent control
block diagram

30
5. Activate the PID controller and start and go out and save the values. Motorized valves
action can be seen now.
6. Connect pump 1 (AB-1).
7. Activate solenoid valve AVS-2
8. The controller will modify the position of the AVP (Proportional Valve) to adjust
the flow that controls the level from the water tank to the s e t v a l u e
OBSERVATIONS
(i) Why proportional control is not capable of eliminating error?

(ii) Draw the circuit diagram of proportional controller employing Op-amp?

REVIEW QUESTIONS
1. What are the disadvantages of using proportional controller alone?

2. Define the gain of proportional controller.

FINAL CHECK LIST


1. Make sure to quit the software.
2. Turn-off the circuit breakers given at the back of the control interface box.
3. Submit your answers to questions, together with your data, calculations and results
before the next laboratory.

31
Lab Experiment # 12
Level Control Loops (Proportional+Integral)
Name: Roll No:

Score: Signature of the Lab Tutor: Date:

Measure and fix the level of water in UCP automatically in closed loop system using proportional
+ integral controller and display the operation Proportional + Integral controller .

PERFORMANCE OBJECTIVE
Upon successful completion of this experiment, the student will be able to:
(i) Understand the error elimination action of integral controller.
(ii) Analyze the effect of proportional controller with integral action.

EQUIPMENTS
 UCP-F
 Water.
 Control and acquisition software.

NOTE
 Make sure that the manual valve is fully opened at the time of operation.
 Before turning motor pump on, AVP-1 actuator must be fully opened via control and acquisition
software.

DISCUSSION

The combination of proportional and integral terms is important to increase the speed of the
response and also to eliminate the steady state error. The PID controller block is reduced to P and
I blocks only as shown in figure.

Fig 10.1: Proportional Integral (PI) block diagram

The proportional and integral terms is given by:

32
Function of the Proportional Term:
As with the P-Only controller, the proportional term of the PI controller, Kp·e(t), is given to plant
based on the size of controller error e(t) at each time t.
As e(t) grows or shrinks, the magnitude of Kp· e(t) grows or shrinks immediately and
proportionately. The past history and current trajectory of the controller error have no influence
on the proportional term computation.

Error e(t) P-controller output

Fig 10.2: System output having Proportional controller only and P-controller response.

Function of integral term:


While the proportional term considers the current size of e(t) only at the time of the controller
calculation, the integral term considers the history of the error, or how long and how far the
measured process variable has been from the set point over time.
Integration is a continual summing. Integration of error over time means that we sum up the
complete controller error history up to the present time, starting from when the controller was first
switched to automatic.

Error e(t) and area under the curve of error Response of P-I controller to the

error Fig 10.2: System output having P-I controller and P-I controller response.

33
Note that the integral of each shaded portion has the same sign as the error. Since the integral sum
starts accumulating when the controller is first put in automatic, the total integral sum grows as
long as e(t) is positive and shrinks when it is negative.
At time t = 60 min on the plots, the integral sum is 135 – 34 = 101. The response is largely settled
out at t = 90 min, and the integral sum is then 135 – 34 + 7 = 108.
The previous sentence makes a subtle yet very important observation. The response is largely
complete at time t = 90 min, yet the integral sum of all error is not zero. The integral sum has a
final or residual value of 108. It is this residual value that enables integral action of the PI
controller to eliminate offset.
As soon as error is totally eliminated integral control maintain its output at that point (108 as
discussed above).

Experimental Procedure:
1. Connect the interface of the equipment and the control software.
2. Select the option “Control PID” on the capture screen.

Fig 10.3: PID control in Control and Acquisition Box

3. Select a set point, PID controller and a proportional constant and an integral value.
The value for the integral constant should be big so that error accumulation is
carried out smoothly and it doesn’t generate an on/off performance in the actuator.
4. Indicate a value of 0 for the derivative performance. In this experiment, we want to
observe the effects of a proportional action plus an integral action.
5. Activate the PID controller and start and go out and save the values.
6. Connect pump 1 (AB-1).
7. Open the solenoid valve AVS-2
8. The controller will modify the position of the AVP (Proportional Valve) to adjust
the flow that controls the level from the water tank to the set value.

34
Fig 10.4: PID control block showing graph in control and acquisition software.

OBSERVATIONS
(i) What would be the effect if the integral term’s value is increased too high?

(ii) Draw the circuit diagram of proportional-integral controller employing Op-amp?

REVIEW QUESTIONS
1. What are the limitations in using P-I controller?

FINAL CHECK LIST


1. Make sure to quit the software.
2. Turn-off the circuit breakers given at the back of the control interface box.
3. Submit your answers to questions, together with your data, calculations and results
before the next laboratory.

35
Lab Experiment# 13
Level Control Loops (Proportional+Derivative)
Name: Roll No:

Score: Signature of the Lab Tutor: Date:

Manipulate and fix the level of water in UCP automatically in closed loop system using
proportional + integral controller & display the operation Proportional + derivative controller.

PERFORMANCE OBJECTIVE
Upon successful completion of this experiment, the student will be able to:
(i) Understand the error’s rate of rise limiting action of derivative controller.
(ii) Analyze the effect of proportional controller with derivative action.

EQUIPMENTS
 UCP-F
 Water.
 Control and acquisition software.

NOTE
 Make sure that the manual valve is fully opened at the time of operation.
 Before turning motor pump on, AVP-1 actuator must be fully opened via control and
acquisition software.

DISCUSSION

A PD controller provides an actuating signal to the process/plant with two terms-one proportional
to the error signal and other proportional to its derivative.
The magnitude of the contribution of the derivative term to the overall control action is termed the
derivative gain.

Fig 11.1: Proportional Derivative (PD) block diagram

The proportional and derivative terms is given by:


36
Function of Derivative term:
A derivative describes how steep a curve is. More properly, a derivative describes the slope or the
rate of change of a signal trace at a particular point in time. Accordingly, the derivative term in
the PD equation above considers how fast, or the rate at which, error (or PV) is changing at the
current moment.
The derivative of e(t) is mathematically identical to the negative of the derivative of PV
everywhere except when set point changes. And when set point changes, derivative on error
results in an undesirable control action called derivative kick.

Math Note: the mathematical defense that “derivative of e(t) equals the negative derivative of PV
when SP is constant" considers that, since e(t) = SP – PV, the equation below follows. That is,
derivative of error equals derivative of set point minus process variable.
The derivative of a constant is zero, so when SP is constant, mathematically, the derivative (or
slope or rate of change) of the controller error equals the derivative (or slope or rate of change) of
the measured process variable, PV, except the sign is opposite.

de(t) d (SP  PV )
   dP
V
dt dt dt

Error e(t) Response of D controller to the error

Fig 11.2: System output having error and Derivative-controller response.

While the shape of e(t) and PV are opposite but equal everywhere after the set point step, there is
an important difference at the moment the SP changes. The lower plot shows a vertical spike in
e(t) at this moment. There is no corresponding spike in the PV plot.
The derivative (or slope) of a vertical spike in the theoretical world approaches infinity. In the real
world it is at least a very big number.
As long as loop sample time, T, is properly specified, the PV trace will follow a gradual and
continuous response, avoiding the dramatic vertical spike evident in the e(t) trace.

Experimental Procedure:

1. Connect the interface of the equipment and the control software.


2. Select the option “Control PID” on the capture screen.

37
Fig 11.3: PID control in Control and Acquisition Box

3. Select a set point, PID controller and a proportional constant and a derivative constant.
The value for the derivative constant should be small so that the performance is small and
it doesn’t generate an on/off performance in the actuator.
4. Indicate a value of 0 for the integral performance. In this experiment, we want to observe
the effects of a proportional action plus a derivative action.
5. Activate the PID controller and start and go out and save the values. The student will
observe that the motorized valve begins to act.
6. Connect pump 1 (AB-1)
7. Open valve AVS-2
8. The controller will modify the position of the AVP (Proportional Valve) to adjust the
flow that controls the level from the water tank to the s e t v a l u e

Fig 11.4: PID control block showing graph in control and acquisition software.

38
OBSERVATIONS
(i) Why derivative controller’s response becomes infinite theoretically when set point (SP)
changes?

(ii) Draw the circuit diagram of proportional-derivative controller employing Op-amp?

REVIEW QUESTIONS
1. Why derivative controller alone cannot be used?

2. Enlist some applications of PD-controller.

FINAL CHECK LIST


1. Make sure to quit the software.
2. Turn-off the circuit breakers given at the back of the control interface box.
3. Submit your answers to questions, together with your data, calculations and results
before the next laboratory.

39
Lab Experiment# 14
Level Control Loops (Proportional+Integral+Derivative)
Name: Roll No:

Score: Signature of the Lab Tutor: Date:

Manipulate and fix the level of water in UCP automatically in closed loop system using
proportional + integral + derivative controller and display the effect of PID controller

PERFORMANCE OBJECTIVE
Upon successful completion of this experiment, the student will be able to:
(i) Understand the error’s rate of rise limiting action of derivative controller and error
elimination action of integral controller simultaneously.
(ii) Analyze the effect of PID controller for decreasing settling time and oscillations.

EQUIPMENTS
 UCP-F
 Water.
 Control and acquisition software.

NOTE
 Make sure that the manual valve is fully opened at the time of operation.
 Before turning motor pump on, AVP-1 actuator must be fully opened via control and
acquisition software.

DISCUSSION
PI Controller improves the steady state error but it increases the order of the system making it
more unstable. To improve the damping factor of the dominant poles of a PI controlled system, a
derivative error scheme is combined to it which increases ζ (zeta).
PI controllers are particularly common, since derivative action is very sensitive to measurement
noise, and in absence of an integral value it prevents the system from reaching its target value due
to the control action.
Thus a fine tuned PID controller is capable of regulating the output in all means i.e. decreasing
settling time, eliminating the unstable condition introduced by addition of integral action etc.

Fig 12.1: Block diagram of PID controller and process/plant.

The output of PID controller is given by


de(t)
m(t)  K p e(t)  
e(t)dt  K d dt
Ki
The order of the system becomes three with PID controller. Addition of two zeroes in the

40
numerator due to ( K d s 2  K p s  Ki ) helps in obtaining the desireable dynamic response.

41
The third order characteristic equation causes the system to become unstable for certain
combinations of gain Kp,Kd and Ki.

.
Table 11.1: effects of each of controller parameters, , , and on a closed-loop system

Experimental Procedure:

1. Connect the interface of the equipment and the control software.


2. Select the option “Control PID” on the capture screen.

Fig 12.2: PID control in Control and Acquisition Box

3. Select a set point, PID controller and a proportional constant, derivative and integral. The
value for the derivative constant should be small and the integral constant should be big so
that performance is small and it doesn’t generate an on/off performance in the actuator.
4. Activate the PID controller and start and go out and save the values. The student will
observe that the motorized valve begins to work.
5. Connect pump 1 (AB-1)
6. Open valve AVS-2
7. The controller will modify the position of the AVP (Proportional Valve) to adjust the
flow that controls the level from the water tank to the set value

41
Fig 12.3: PID control block showing graph in control and acquisition software.

OBSERVATIONS
(i) Write some methods of PID tuning.

(ii) Draw the circuit diagram of PID controller employing Op-amp?

REVIEW QUESTIONS
1. Write some industrial applications of PID controller?

FINAL CHECK LIST


1. Make sure to quit the software.
2. Turn-off the circuit breakers given at the back of the control interface box.
3. Submit your answers to questions, together with your data, calculations and results
before the next laboratory.

42

You might also like