Haoqiang Ji MEng 2017-1-19 Compressed
Haoqiang Ji MEng 2017-1-19 Compressed
Haoqiang Ji MEng 2017-1-19 Compressed
Implementation
by
Haoqiang Ji
B.Sc., Beijing University of Civil Engineering and Architecture, 2013
MASTER OF ENGINEERING
All rights reserved. This dissertation may not be reproduced in whole or in part, by
photocopying or other means, without the permission of the author.
ii
PLC Programming For A Water Level Control System: Design and System
Implementation
by
Haoqiang Ji
B.Sc., Beijing University of Civil Engineering and Architecture, 2013
Supervisory Committee
Supervisory Committee
ABSTRACT
In industry, the water level control problem is a typical process control problem,
and has been extensively studied in the literature. This report focuses on the design
and implementation of a PLC-based water level control system. In this project, we
have two primary objectives: the overall mechanical design of the system, and the
PLC system design and implementation. In the mechanical design part, the finite
element analysis is performed for the water tank to check the area that has high
leaking risk. Additionally, a flow simulation in the water tank is conducted to analyze
the effect of the transient pressure on the sensors. On the other hand, the water tank
is modeled in Simulink, and simulation results have shown that the PID controller
can regulate the water level to the desired position. Finally, the PLC ladder diagram
is programmed, and the experimental results have verified the effectiveness of the
design.
iv
Contents
Supervisory Committee ii
Abstract iii
Table of Contents iv
List of Tables vi
Acknowledgements ix
1 Introduction 1
1.1 Overview of Industrial Control System . . . . . . . . . . . . . . . . . 1
1.1.1 Overview of PLCs . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1.2 PLC Program Devices . . . . . . . . . . . . . . . . . . . . . . 5
1.1.3 PLC Programming Language . . . . . . . . . . . . . . . . . . 6
1.1.4 Communication Protocols . . . . . . . . . . . . . . . . . . . . 8
1.2 Literature Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.2.1 PLC Applications . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.3 Motivation and Outline of the Project . . . . . . . . . . . . . . . . . 10
2 Experimental Setup 12
2.1 System Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.2 Mechanical Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.2.1 Finite Element Analysis of the Water Tank . . . . . . . . . . . 14
2.2.2 Flow Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.3 PLC and Sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.3.1 SCADAPack 350 . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.3.2 Pressure Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . 24
v
Bibliography 47
vi
List of Tables
List of Figures
ACKNOWLEDGEMENTS
Firstly, I would like to express my sincerest thanks to my supervisor, Dr. Yang Shi,
a decent and professional scholar, for accepting me into his research group. During
my MEng study, he offered me several outstanding suggestions. Also, he gave me
many tips laid the foundation of this thesis. To provide the best support, he asked
the MPC Consulting Ltd. for all the experimental devices. In the period of doing my
project, he always encouraged me with great patience when I suffered from difficulties.
Again, let me thank my supervisor, Dr. Yang Shi, for his encouragement, patience
and mentorship.
Also, I would like to thank the committee member, Dr. Ben Nadler , for his
great suggestions.
Furthermore, I would like to acknowledge all group members in ACIPL. I enjoyed
the time we were together. Thank Jicheng Chen for revising my thesis, suggestions
on my project, and many help in my life. Thank Bingxian Mu for his suggestions
on improving writing and presentation skill. I appreciate suggestions from all group
members.
Finally, I would like to thank my parents and girlfriend for their love and support.
Also, thank MPC Consulting Ltd. for supporting all the experimental devices.
Chapter 1
Introduction
widely used in many different areas, such as waste water treatment, oil and gas
purification, chemical, pulp and paper production, and food production. The block
diagram of a typical industrial control system is shown in Fig 1.1. In a process
control system, the controller always plays a significant role to transact the operating
conditions of the system. In most industry implementation, the Programmable Logic
Controller (PLC) is used due to its advantages, such as fast response, quick and
simple trouble-shoot, low cost and high reliability. As a result, a PLC based process
control system is widely used in industry.
• Rack Assembly, which is used for mounting inputs and outputs terminals, power
supply, and processor unit.
• Power Supply, which can provides direct current (DC) or alternating current
(AC).
• Input/Output Section, which are used for connecting external terminals for
devices to the PLC.
• Central Processing Unit (CPU), which controls all operations of the system.
Another feature which is crucial for a PLC is that the PLC can deal with analog
signal directly. In this way, the design of a process control system can be simplified.
At the end of the seventies, analog inputs and outputs were expanded on a PLC
together with the original digital inputs and outputs [1]. The representative product
of the second generation of PLC is shown in Fig 1.3.
The real-time data can be monitored and managed efficiently by using the analog
inputs and outputs in PLCs. Therefore, a PLC based control system can increase
the system response speed, and readily detect faults. Furthermore, the cost of imple-
menting a PLC is low, and the designed system is realiable. In general, the physical
components, such as switches, lambs, pumps, valves, and so on, can be connected
4
to the external terminal of the PLC. Then, all connected physical components can
be controlled via PLC programming. In other words, the program components are
the representations of mechanical components in PLC programming so that one me-
chanical component can be used for two or more control purposes. In industry, a
system can consist of thousands switches or lamps, so reducing the number of phys-
ical components can decrease the total cost of the system. Also, every component
has its service life. However, the components can be represented by the program
components, so a PLC based control system has a high reliability. Finally, because
the PLC matches most requirements of an industrial process control system, it has
become commonly used in industry.
Figure 1.2: The first programmable logic controller of Allen Bradley, the Bulletin
1774 PLC. It was invented by Ernst Dummermuth in 1974 [1].
Figure 1.3: The Modicon 184, second generation of PLC designed by Modicon [1]
Currently, there are many PLC manufacturers in the market. Table 1.1 shows a
list of PLC manufacturers in the global market. They produce many types of PLCs
5
No Manufactourer No Manufactourer
1 Siemens 9 Panasonic
2 ABB 10 Idec
3 Schneider 11 Keyence
4 Rockwell 12 Toshiba
5 Mitsubishi 13 Fuji
6 GE-Fanuc 14 Beckhoff
7 Omron 15 Bosch Reroth
8 Koyo
The ladder diagram resembles a ladder with two vertical rails and many rungs to
program. In a ladder diagram, all the components must be connected to both ladder
rails, since the two vertical rails represent the power supply. The current flows from
the left of the ladder diagram to the right. An example of a ladder diagram is shown
in Fig 1.7. From the Fig 1.7, it can be seen that the ladder diagram is similar to the
traditional electrical circuit diagram. The symbols used in a ladder digram have their
real physical functions.
(a) AND Function in Ladder Diagram (b) AND Function in Function Block Diagram
controlled according to the real time data of the process. To be more specific, water
level control problem is a typical process control problem. Therefore, in this section,
some related literature is reviewed and discussed.
Yuriy et al. (2015) [10] designed a PLC based system to control liquid level by
using Radar sensor remotely. This system measures the liquid level, volume, temper-
ature, and pressure and control these measurements remotely. The system consists
of the Radar sensor, temperature sensors, discrete level sensors and a programmable
logic controller. The PLC is programmed by the FBD programming language. To
transfer datas between all the components, the communication method that the au-
thors choose is RS 485 bus with an ASCII based protocol. The authors state that
communication protocol actually reduces or eliminates interference during the pro-
cess of data transmission. In order to monitor the system, the authors also design
a human machine interface (HMI). Finally, the experimental result corroborates the
exactitude and reliability of their system.
Pooja et al. (2015) [11] carried a test on a PLC based single water tank control
system using PID controller. In their system, an HMI which is programmed on
NI-LabVIEW is connected to an Allen Bradley Micro830 PLC through the Modbus
RTU communication protocol. According to Pooja et al., this system is designed for
training purpose in order to have a complete understanding of PLC based process
control system design. In their literature, some necessary modelings are introduced,
such as the water tank modeling, transducer modeling, and the control valve modeling.
Some parameters, such as the resistance of the control valve, and current to pressure
(I/P) converter, are estimated depending on the experimental data by using the
method of least squares. Furthermore, Pooja et al. applied PID algorithm into the
PLC to achieve a better result. The PID parameters are calculated by using Ziegler
Nicholas (Z-N) method. Finally, the authors conclude that the experimental result is
matched with their prediction.
Mini and Shilpa (2016) [12] did a preliminary test on a liquid mixing and bottle
filling system. This system is controlled by a PLC. In their literature, the system
simulation based on Matlab/Simulink and PLC ladder diagram programming are
included. There are three subsystems in the ladder diagram for mixing, filling, and
level monitoring respectively. Mini and Shilpa described that three water tanks,
several level sensors and a DC motor consist of the system. They explain that two
different kinds of liquid are stored in two tanks separately. Two pumps controlled by
the PLC pump preset amount of the two types of liquid into an overhead tank for
10
mixing. Then, the DC motor drives a conveyor belt carrying bottles for filling. To
control the amount of filling, a control valve controlled by the same PLC is applied
to the overhead tank. In order to avoid overflow of the mixed liquid stored in the
overhead tank, three level sensors are used to monitor the liquid level. The sensors
are used for tracking low, high and emergency level respectively. Furthermore, Mini
and Shilpa used a PID controller as the algorithm of the system to achieve a better
controlled result. As a result of using PLC combining with PID controller to control
the system, Mini and Shilpa summarized that PLC based control system could reduce
human intervention and operating cost. At the same time, it can increase producing
efficiency and driving safety.
Da’na et al. (2008) [13] developed a networked platform which can be used for
remote monitoring and controlling PLCs. The reason of that, Da’na et al. mentioned,
is that the computing ability of PCs is increasing and the available options of network
protocols and standards are various. In their system, a Simatic S7 200/300 PLC is
applied. The available communication methods of the PLC are LAN, WAN, or GSM.
To achieve the final experimental goal, the key parts of their system are the Trans-
mission Control Protocol / Internet Protocol (TCP/IP) setup and Global System for
Mobile Communications (GSM).
In order to train engineering students on PID control processes, Dilsad and Mus-
trafa (2013) [14] designed a level control system using PID control algorithm on a
programmable logic controller. In their literature, a description of PID parameters
tuning is introduced. Also, based on the PID parameters, a ladder diagram design of
level control system is explained. The feedback sensor used in this system is a level
transmitter. Finally, as the experimental result shown in their paper, the PLC based
PID level control system is stable.
Furthermore, Raza et al. (2011) [15] developed a PLC based PID control system
for a heating tank control system. In their paper, Reza et al. applied an HMI into
the system for advanced monitor and control purpose. Finally, the result shows that
the PLC based PID control system works correctly in their design.