Cascade Control Trainer using PID in Programmable …...... the central processing unit ... the...

10
61 Rathy G. A , Sivasankar P International Journal of Electronics, Electrical and Computational System IJEECS ISSN 2348-117X Volume 6, Issue 1 January 2017 Cascade Control Trainer using PID in Programmable Logic Controllers Rathy G. A 1 Associate Professor, Electrical Department, NITTTR, Chennai, India. Sivasankar P 2 Assistant Professor, Electronics Department, NITTTR, Chennai, India. ABSTRACT A Programmable Logic controller (PLC) is widely used in Industrial control and automation. It has evolved as an impor- tant controller in industries these days because of its simplicity and robustness. The various applications in which PLCs are used are Material Handling, Packaging Applications, General Industrial Machinery, Printing, Food and Beverage, Pharmaceutical, Water Wastewater / SCADA, Clutch/Bra ke control, Position ControlPick-and-place / Conveyor. Every PLC has got its own Instruction set. PID is an important instruction in PLC.This PID instruction in the controller attempts to correct the error between a measured process variable and a desired set-point by calculating and then out- putting a corrective action that can adjust the process accordingly. This PID controller is used to control the flow and level of a tank. It takes the process variable (PV) as the input to the PLC, executes the program and depending on the value of PV, it allows the opening and closing of the control valve so that the level is maintained at set point. This paper discusses the PLC programming using ladder diagram for PID, assigning the parameters to the PID block, the control elements in the cascade control trainer and the tuning the PID to control cascade control trainer. Keywords: PLC, Ladder diagram, PID, set point, Flow and level control, PID tuning 1.0 INTRODUCTION PLC is widely used in Industry for automation and control. PLC is also referred as Industrial Computer. It takes an Input, works upon the logic and sends an output to control various industrial applications. Ladder diagram is normally used to program the PLC. The instructions set of Allen Bradley PLC has Bit, Timer &Counter, File handling and PID instruction. The PID Programmable instruction uses closed loop control to control the physical properties such as temperature, pressure, level, flow rate of process loops. The single point control uses a single PID controller to regulate tank level using a single measurement for feedback being tank level itself. The PID controller output determines the state of the feed valve. The system has limitations in reacting to variations in output flow, which is to be regarded as a system disturbance. The cascade control uses two PID controllers for a better performance of the level and flow control. The master controller is the level controller using the level setpoint and measurement to determine the set point for the slave controller driving the input flow valve. Measurements of input and output flow are taken into account, enabling the system to faster respond to output flow disturbances. This paper discusses how PID control is achieved in a cascade control trainer using PLC 2.0 LITERATURE SURVEY A Programmable Logic Controller (PLC) is solid-state equipment, designed to perform the function of logical decision making for Industrial control applications. The PLC has two basic components (i) the input/output (I/O) system (ii) the central processing unit (CPU) The input/output system is the part of the PLC that physically connects to devices in the outside world. The central processing unit, on the other hand, is where the PLC stores all of its data and does all of its computer

Transcript of Cascade Control Trainer using PID in Programmable …...... the central processing unit ... the...

Page 1: Cascade Control Trainer using PID in Programmable …...... the central processing unit ... the implementation of PID controller using Programmable Logic Control- ... experimentally

61 Rathy G. A , Sivasankar P

International Journal of Electronics, Electrical and Computational System

IJEECS

ISSN 2348-117X

Volume 6, Issue 1

January 2017

Cascade Control Trainer using PID in Programmable Logic

Controllers

Rathy G. A 1

Associate Professor, Electrical Department,

NITTTR, Chennai, India.

Sivasankar P 2

Assistant Professor, Electronics Department,

NITTTR, Chennai, India.

ABSTRACT

A Programmable Logic controller (PLC) is widely used in Industrial control and automation. It has evolved as an impor-

tant controller in industries these days because of its simplicity and robustness. The various applications in which PLCs

are used are Material Handling, Packaging Applications, General Industrial Machinery, Printing, Food and Beverage,

Pharmaceutical, Water Wastewater / SCADA, Clutch/Bra

ke control, Position Control—Pick-and-place / Conveyor.

Every PLC has got its own Instruction set. PID is an important instruction in PLC.This PID instruction in the controller

attempts to correct the error between a measured process variable and a desired set-point by calculating and then out-

putting a corrective action that can adjust the process accordingly. This PID controller is used to control the flow and

level of a tank. It takes the process variable (PV) as the input to the PLC, executes the program and depending on the

value of PV, it allows the opening and closing of the control valve so that the level is maintained at set point. This paper

discusses the PLC programming using ladder diagram for PID, assigning the parameters to the PID block, the control

elements in the cascade control trainer and the tuning the PID to control cascade control trainer.

Keywords: PLC, Ladder diagram, PID, set point, Flow and level control, PID tuning

1.0 INTRODUCTION

PLC is widely used in Industry for automation and control. PLC is also referred as Industrial Computer. It

takes an Input, works upon the logic and sends an output to control various industrial applications. Ladder

diagram is normally used to program the PLC. The instructions set of Allen Bradley PLC has Bit, Timer

&Counter, File handling and PID instruction. The PID Programmable instruction uses closed loop control to

control the physical properties such as temperature, pressure, level, flow rate of process loops.

The single point control uses a single PID controller to regulate tank level using a single measurement for

feedback being tank level itself. The PID controller output determines the state of the feed valve. The system

has limitations in reacting to variations in output flow, which is to be regarded as a system disturbance. The

cascade control uses two PID controllers for a better performance of the level and flow control. The master

controller is the level controller using the level setpoint and measurement to determine the set point for the

slave controller driving the input flow valve. Measurements of input and output flow are taken into account,

enabling the system to faster respond to output flow disturbances. This paper discusses how PID control is

achieved in a cascade control trainer using PLC

2.0 LITERATURE SURVEY

A Programmable Logic Controller (PLC) is solid-state equipment, designed to perform the function of logical

decision making for Industrial control applications. The PLC has two basic components

(i) the input/output (I/O) system (ii) the central processing unit (CPU)

The input/output system is the part of the PLC that physically connects to devices in the outside world. The

central processing unit, on the other hand, is where the PLC stores all of its data and does all of its computer

Page 2: Cascade Control Trainer using PID in Programmable …...... the central processing unit ... the implementation of PID controller using Programmable Logic Control- ... experimentally

62 Rathy G. A , Sivasankar P

International Journal of Electronics, Electrical and Computational System

IJEECS

ISSN 2348-117X

Volume 6, Issue 1

January 2017

processing. The CPU encloses the processor which is the heart of the PLC system. The Processor accepts

(reads) input data from various sensing devices, executes the stored user program from memory, and sends

appropriate output commands to control devices[4]. Ladder logic is widely used to program PLCs, where se-

quential control of a process or manufacturing operation is required. Ladder logic has contacts that make or

break circuits to control coils. Each coil or contact corresponds to the status of a single bit in the programma-

ble controller's memory. The instruction of PLC has the PID instruction. This PID instruction is used in im-

plementing various Industrial control applications .

PID controllers A proportional–integral–derivative controller (PID controller) is a control loop feedback me-

chanism commonly used in industrial control systems. A PID controller continuously calculates an error val-

ue as the difference between a desired setpoint and a measured process variable and applies a correction based

on proportional, integral, and derivative terms, (sometimes denoted P, I, and D respectively) which give their

name to the controller type[2].

Reza ezwan samin (2011) has done the implementation of PID controller using Programmable Logic Control-

ler (PLC) in heating tank of mini automation plant. PID controller is implemented by using ladder diagram in

PLC OMRON. A temperature control unit is also used where the temperature control unit is a special I/O unit

that receives inputs directly from thermocouple, to perform PID control[3].

Avinash P. Kaldate and Sachin A. Kulkarni (2014) have conducted a study on “ PLC Based PID Speed Con-

trol Systems” The motor speed control system was designed as an frequency controller, operated by a stored

program in the PLC. Data Transmission to control the motor was provided by the PLC and the Distributed I/O

via Ethernet cable modules[6].

Chen Wei et.al (2012) has developed and designed a fuzzy PID controller using PLC for a setpoint pressure

control problem in the collecting main pressure system. The controller objective is to make the collecting

pressure attain to the desired techniques range. The collecting main pressure control system uses programma-

ble logic controllers (PLCs) to implement the pressure control action[7].

In this study, the cascade control of water level controller is controlled by using the PID block that is present

in the Allen Bradley PLC Micro logix 1200.

This is very simple compared to discrete PID controllers. Also writing ladder programs to measure the process

variable and compare it with the set point and accordingly adjust the control valve to open and close so that

the level of the tank is maintained at the set point with minimum disturbances. Also in our proposed model we

have experimentally set up the cascade control trainer.

3.0 PLC SYSTEM

Figure 1. PLC system

Page 3: Cascade Control Trainer using PID in Programmable …...... the central processing unit ... the implementation of PID controller using Programmable Logic Control- ... experimentally

63 Rathy G. A , Sivasankar P

International Journal of Electronics, Electrical and Computational System

IJEECS

ISSN 2348-117X

Volume 6, Issue 1

January 2017

Figure 1 shows the basic parts of a PLC. Micro logix 1200 is a 24 I/O PLC with 14 Digital Inputs and 10

outputs.The software used for programming is RS Logix 500.Communication is established by means of RS

232 serial communication. Micrologix 1200 is a PLC that has got the Function file in which the functions like

High speed counter, Pulse Train output,Pulse width modulation and PID functions are available. .The analog

input can be read by using analog module IF2OF2 which is attached to th base module. Using the PID control

block the level control is achieved in this experiment[9].

Figure 2 Allenbradley PLC Micrologix 1200

Fig 3: PID block

The PID instruction is shown in the Figure 1.The PID instruction normally controls a closed loop using inputs

from an analog input module and providing an output to an analog output module as a response to effectively

hold a process variable at a desired set point.

The PID equation controls the process by sending an output signal to the actuator. The greater the error be-

tween the set point and the process variable input, the greater the output signal, and vice versa. An additional

value (feed forward or bias) can be added to the control output as an offset. The result of the PID calculation

(control variable) will drive the process variable you are controlling toward the set point. This output instruc-

tion is used to control physical properties such as temperature, pressure, liquid level, or flow rate of process

loops[9].

Page 4: Cascade Control Trainer using PID in Programmable …...... the central processing unit ... the implementation of PID controller using Programmable Logic Control- ... experimentally

64 Rathy G. A , Sivasankar P

International Journal of Electronics, Electrical and Computational System

IJEECS

ISSN 2348-117X

Volume 6, Issue 1

January 2017

The PID instruction can be operated in the timed mode or the Selectable Timed Interrupt(STI) mode. In the

timed mode, the instruction updates its output periodically at a user-selectable rate. In the STI mode, the in-

struction should be placed in an STI interrupt subroutine. It then updates its output every time the STI subrou-

tine is scanned. The STI time interval and the PID loop update rate must be the same in order for the equation

to execute properly

4.0 ENTERING PARAMETERS IN PID BLOCK

PID File – A Specify ladder file by name PID has to be created file. A file of type PD will be created among

the data files. The file length is fixed at 23 words. The PD file replaces the old integer file control block.

Control Block Length – If required Specify an integer file, for example N7:0. The file length is fixed at

23 words.

Process Variable PV - The element address that stores the process input value. This address can be the loca-

tion of the analog input word where the value of the input A/D is stored. The integer address choosen to pre-

scale the input value is in the range 0-16383.

Control Variable CV - The element address that stores the PID output. The output value ranges from 0-

16383, with 16383 being the 100% "ON" value. This is normally an integer address, so that it is possible to

scale the PID output range to the particular analog range .

Table – 1: Parameters for tuning the PID instruction in PLC Controller

Gain Kc

With 5/02 controllers the valid range is 0.1

to 25.5. With the 5/03, 5/04, and 5/05 con-

trollers the valid range = 0 to 3276.7

This is the proportional gain. Generally set this gain to

one half the value needed to cause the output to oscillate

when the reset and rate terms are set to zero.

Reset Ti With 5/02 controllers the valid range is 0.1

to 25.5. With the 5/03, 5/04, and 5/05 con-

trollers the valid range = 0 to 3276.7

This is the integral gain. Generally set the reset time equal

to the natural period measured in the Gain calibration

above.

Rate Td With 5/02 controllers the valid range is 0.1

to 25.5. With the 5/03, 5/04, and 5/05 con-

trollers the valid range = 0 to 3276.7

This is the derivative term. Generally set this value to 1/8

of the integral time above.

Loop Up-

date

Type in a value representing

seconds, (With 5/02 controllers

the range is from 0,1 to 25.5. With the

5/03, 5/04, and 5/05 controllers the valid

range is 0.01 to 10.23 seconds.)

This is the time interval between PID calculations. The

entry is in 0.01 second intervals. Generally enter a loop

update time five to ten times faster than the natural period

of the load (determined by setting the reset and rate para-

meters to zero and then increasing the gain until the out-

put begins to oscillate). When in the STI mode, this value

must equal the STI time interval value S:30.

Control

Mode

Select either E = SP - PV

(Reverse Acting) or E = PV -

SP (Direct Acting).

Reverse acting causes the output CV to increase when the

input PV is smaller than the set point SP (for example, a

heating application). Direct acting causes the output CV

to increase when the input PV is larger than the setpoint

SP (for example, a cooling application).

PID Control

Select either Auto or Manual Auto indicates that the PID is controlling the output.

(Word 0, bit 1 is clear.) Manual indicates that the user is

setting the output. (Word 0, bit 1 is set.)

Page 5: Cascade Control Trainer using PID in Programmable …...... the central processing unit ... the implementation of PID controller using Programmable Logic Control- ... experimentally

65 Rathy G. A , Sivasankar P

International Journal of Electronics, Electrical and Computational System

IJEECS

ISSN 2348-117X

Volume 6, Issue 1

January 2017

5.0 LADDER DIAGRAM FOR PID CONTROL

The instruction that is used to read analog I/O is the Scale with Parametrs (SCP) Instruction.The process vari-

able is given as the input the analog module pin 1:1.0. This value is then scaled in the SCP instruction. The

output of the SCP instruction is loaded as the process variable in the PID Block . The PID parameters are ad-

justed and the control variable is the output of the PID block. This is again scaled with SCP instruction and the

output is given output pin of the analog module (IF2OF2). This value is used to open and close the control

valve accordingly.

Fig 4: Ladder Diagram in Micro Logix 1200 for PID Control

6.0 SETUP SCREEN

By clicking on the setup screen, the PID setup screen opens . This is the screen where the PID parameters Kp,

Ki .Kd are entered. The value of Kp is entered. This reduces the settling time but still error exists.Doubling

the proportional gain Kp seemed to help the response time and the offset of the system, a large increase in the

proportional gain is given. This value of Kp can be varied from 1.0 to 200.0.If the value increases beyond lim-

it the system goes into oscillation. The value of Kd is now added. Since the derivative function tends to dam-

pen peak overshoot rates, the amount error to its final operating speed is reduced, and the system settles more

quickly. For this reason, the derivative function is sometimes called rate damping. This still reduces the set-

Page 6: Cascade Control Trainer using PID in Programmable …...... the central processing unit ... the implementation of PID controller using Programmable Logic Control- ... experimentally

66 Rathy G. A , Sivasankar P

International Journal of Electronics, Electrical and Computational System

IJEECS

ISSN 2348-117X

Volume 6, Issue 1

January 2017

tling time, but the error exists.If a small value of Ki is added the system reaches a steady state and it coincides

with the reference signal. Therefore, in a closed-loop pid control system we can reduce the offset to near zero

by increasing the integral gain constant Ki, to some positive value.

Fig 5 setup screen with parameters

Fig 6 Set up Screen of PID Block during the tuning process

Fig 6 shows the setup screen with parameters for Proportional, Derivative and Integral control.

Page 7: Cascade Control Trainer using PID in Programmable …...... the central processing unit ... the implementation of PID controller using Programmable Logic Control- ... experimentally

67 Rathy G. A , Sivasankar P

International Journal of Electronics, Electrical and Computational System

IJEECS

ISSN 2348-117X

Volume 6, Issue 1

January 2017

7.0 CASCADE CONTROL TRAINER

The setup is designed to understand the advanced control methods used for complex processes in the indus-

tries. Different experiments like Flow, level and cascade control can be configured and studied with the setup.

It consists of water supply tank, pump, level transmitter, transparent level tank, orifice meters with differential

pressure transmitters, rotameters, pneumatic control valve, I/P converter and serial based dual loop controller.

These units along with necessary piping are mounted on support housing designed for tabletop mounting. The

set up is connected to PLC through communication cable for monitoring and control by using PID instruction

Fig 4: Block Diagram of PID Cascade Control Trainer

The various components used in the cascade control trainer are

i) Level Sensors

The measurement of liquid level can be done using level transmitters. The level measured is most commonly

associated with material in a tank. In this case, two concentric cylinders are contained in a liquid tank. The

level of the liquid partially occupies the space between the cylinders, with air in the remaining part. This de-

vice acts like two capacitors in parallel, one with the dielectric constant of air (approx.1) and other with that of

the liquid. Thus, variation of liquid level causes variation of the electrical capacity measured between the cy-

linders. The length of the level transmitter is 0 – 25 cm , the liquid level zero corresponds to 4 mA and 25 cm

corresponds to 20 mA.

ii) Differential Pressure Transmitter

Pressure measurement is accomplished using a diaphragm in a special feedback configuration, shown in Fig-

ure. The feedback system keeps the diaphragm from moving. The error signal in the feedback system pro-

Page 8: Cascade Control Trainer using PID in Programmable …...... the central processing unit ... the implementation of PID controller using Programmable Logic Control- ... experimentally

68 Rathy G. A , Sivasankar P

International Journal of Electronics, Electrical and Computational System

IJEECS

ISSN 2348-117X

Volume 6, Issue 1

January 2017

vides an electrical measurement of the pressure. A differential pressure cell measures pressure difference with

a diaphragm. A feedback system minimizes actual diaphragm deflection.

iii) Control Valve

The control valve characteristic is assigned with the assumptions that the stem position indicates the extent of

the valve opening and that the pressure difference is determined by the valve alone. A pneumatic actuator

connected to a control valve. The actuator is driven by a current through an I/P converter. The different types

of control valves are classified by a relationship between the valve stem position and the flow rate through the

valve. There are three basic types of control valves. a)Quick opening b) Linear and c) Equal percentage.

iv)Orifice Plate

One of the easiest ways to determine the amount of flow is to place an obstruction in the flow, such as an ori-

fice plate to create a pressure drop. These types of sensors are categorized as obtrusive flow sensors. Since

they are mounted directly in the fluid flow, they tend to cause small amounts of disturbance to the flow.

v) Current-to-Pressure (I/P) Converters

The proportional electrical signal is generally a 4-20 mA current signal, and the air pressure signal is generally

set for 3-15 psi. This type of signal converter is called an I/P converter because it changes a current signal (I)

to a pressure signal (P). It uses a magnetic coil to change the position of a balance beam that controls a small

amount of pilot air pressure. The pilot air pressure controls the main air pressure that is regulated at 3-15 psi.

The air supply for the I/P converter must be approximately 20 psi so that the converter can control the

pressure between 3 and 15 psi.

vi) Rotameter

In a rotameter, the obstruction is a float that rises in a vertical tapered column. The lifting force, and thus the

distance to which the float rises in the column, is proportional to the flow rate. The lifting force is produced

by the differential pressure that exists across the float, because it is a restriction in the flow. This type of sen-

sor is used for both liquids and gases.

vii) Pressure Regulator

Controls air pressure quickly, precisely ensure pure dust free air at the exact pressure required by you. Air

pressure regulators control pressure in air lines (usually adjustable) to remove fluctuations and maintain

consistent pressure for pneumatic devices.

Fig 5: Experimental Set up of Cascade Control Trainer

Page 9: Cascade Control Trainer using PID in Programmable …...... the central processing unit ... the implementation of PID controller using Programmable Logic Control- ... experimentally

69 Rathy G. A , Sivasankar P

International Journal of Electronics, Electrical and Computational System

IJEECS

ISSN 2348-117X

Volume 6, Issue 1

January 2017

The set point is fixed at 12.5 cm.When the power is turned on water flows in to the tank. The level of water

increases. This increases the output of the level transmitter . This varies from 4 ma to 20 ma. This is taken as

process variable 1. The DPT and the orifice plate gives the flow rate and this is taken process variable 2.This

is fed to the the PLC analog module. This input is taken as the input as is scale with parameters and given to

the PID block. The tuning of PID is done by giving values of Kp,Kd and Ki.The output of the analog block is

given as input to the I/P converter which converts the 4-20 ma as 3-15 psi. The control valve opens and closes

accordingly allowing water to flow in the tank. Even any disturbance is created the control valve adjusts its

opening and closing and there by maintains the level in the tankat the set point.

7.1 THE "ADJUST AND OBSERVE" TUNING METHOD

As the name implies, the "adjust and observe" tuning method involves the making of initial adjustments to the

PID constants, observing the response of the machine, and then, knowing how each of the functions of the

PID performs, making additional adjustments to correct for and desirable properties of the machines re-

sponse[1]. From our previous discussion of PID performance, we know the following characteristics of PID

adjustments:

1. Increasing the proportional gain Kp will result in a faster response and will reduce (but not eliminate) off-

set. However, at the same time, increasing proportional gain will also cause overshoot, hunting, and poss-

ible oscillation.

2. Increasing the derivative time constant Td will reduce the hunting and overshoot caused by increasing the

proportional gain. However, it will not correct for offset.

3. Decreasing the integral time constant it (also called the reset rate or reset time constant) will cause the

PID to reduce the offset to near zero. Smaller valued of it will cause the PIO to eliminate the offset at a

faster rate. Excessively small (non-zero) values of it will cause integral Oscillation.

8.0 EXPERIMENTAL GRAPH

Page 10: Cascade Control Trainer using PID in Programmable …...... the central processing unit ... the implementation of PID controller using Programmable Logic Control- ... experimentally

70 Rathy G. A , Sivasankar P

International Journal of Electronics, Electrical and Computational System

IJEECS

ISSN 2348-117X

Volume 6, Issue 1

January 2017

Fig 6: Graph of PID Control

The experimental graph is drawn for various values of Kp, Kd and Ki

9.0 CONCLUSION

The feature of PID present in the PLC is used to control the flow and the level in a tank. The PID

tuning is achieved by adjusting the values of Kp, Ki and kd. By feeding these values in the PLC the PID

control is achieved

REFERENCES

[1] K.J. Astrom T. Hagglund. "Revisiting the Ziegler-Nichols step response method for PID control "Journal of Process

Control vol. 14 pp. 634-650 2004.

[2] G. Chen "Conventional and fuzzy PID controllers: an overview" Intelligent Control & Systems pp. 235-246 1996.

[3] Reza ezwan samin et.al “PID implementation of heating tank in mini automation plant using Programmable Logic

Controller (PLC)” Published In the International Conference on Electrical, Control and Computer Engineering (IN-

ECCE), 2011

[4] L. A. Bryan and E. A. Bryan, Programmable Controller Theory and Implementation second edition 1997.

[5] Frank D petruzella “Programmable Logic Controllers”Mc Graw Hill Educat ion (India) Private Limited New Delhi

2010

[6] Avinash P. Kaldate and Sachin A. Kulkarni “PLC Based PID Speed Control System” IOSR Journal of Engineering

(IOSRJEN) Vol. 04, Issue 03 (March. 2014), PP 55-60 (2014)

[7] Chen, W., Xing, M. and Fang, K. “A PLC-based fuzzy PID controller for pressure control in Cokeoven. City, 2012.

[8] Liu, H., Li, S. and Chai, T. Intelligent coordinated control of power-plant main steam pressure and power output.

Journal of Systems Engineering and Electronics, 15, 3 (// 2004), 350-358.

[9] http://literature.rockwellautomation.com/idc/groups/literature/documents/um/1762-um001_-en-p.pdf visited on

10.12.2016