Sie sind auf Seite 1von 17

Mechatroni

cs Lab.
Instituto Tecnolgico y de Estudios
Superiores de Monterrey
Campus Len

Water Level Controller


System using Siemens
PLC and LabView
Interface

Hector Miguel Bocanegra Gmez


Diego Quesada Pastor
Jorge Armando De Zamacona Montes de Oca

Material:

PLC Siemens S71200


Siemens 7 HMI KTP700
Siemens SIMATIC ET200S Profinet IO Module
Siemens TIA Portal V13 (STEP 7 Professional, WinCC Advanced)
Siemens SINAMICS G120C PN Transformer
Pedrollo PK60 1/2HP/40Lmin/.3kW/60Hz water pump
Parker KT09 9W/60Hz zero pressure solenoid valve
Siemens SITRANS 7MF1570 pressure sensor

Index
Material:.....................................................................................................................1
Introduction................................................................................................................3
Objectives..................................................................................................................3
Conceptual Framework.............................................Error! Marcador no definido.
Automation and Control Systems..........................Error! Marcador no definido.
Programmable Logic Controllers...........................Error! Marcador no definido.
PID..........................................................................................................................4
Project Realization.....................................................................................................5
Planning.................................................................................................................5
Design....................................................................................................................6
Construction...........................................................................................................8
Data Acquisition......................................................................................................9
Conclusions.............................................................................................................16

Introduccin
This project was designed to apply the knowledge acquired in class about PID
controllers. The system consists of a PLC which controls the water level of a tank
with relief valves. The water level must remain stable whenever the relief valves
open or close.
To successfully control the system, a controller must be designed with both a PID
and another type of controller. A hysteresis controller was selected as a second
option due to its simplicity and to contrast the efficiency of the PID controller. The
PID was designed completely throughout the course.

Objectives
-

Design the whole system considering a low budget.


Implement an efficient control system.
Apply mathematical knowledge to create the PID controller from scratch,
characterizing the system response and creating a mathematical model to
analyze the efficiency of the control system.
Get to know and design different types of controllers.
Establish communication between the PLC and a LabView interface using
the NI OPC Server toolkit.

Conceptual Framework
Automation and Control Systems

The development of different technologies throughout the first half of the XX


century resulted in an increment of control system complexity increasing physical
variables that should be observed and controlled. This controller cannot be made
directly by people due to the high reaction time of the human body.
For this, new systems were developed to process and analyze physical
variables and massive amounts of data. This was achieved by transforming all
these variables into electrical signals with low energy consumption, which caused
these new controllers to get smaller and more economical with time.
These electronic systems must therefore be able to receive information from
external systems which can be classified into two major classes.

Industrial products which are systems that carry out a specific function:
laundry systems, televisions, drills, etc.

Industrial processes that can be defined as a group of actions performed


by one or more coordinated machines resulting in the production of a
good.

However, most physical variables are not electrical. Some examples are
temperature, pressure, water level, force, luminosity, velocity, acceleration, etc.
Therefore they must be transformed to electrical signals through devices called
sensors. 1
This resulted in the creation of different elements and electronic controls, like
PLCs, PACs which work together with sensors to create a control system.

Programmable Logic Controllers


A Programmable Logic Controller is a device that a user can program to
perform a series or sequence of events. These events are triggered by stimuli
(called inputs) received at the programmable logic controller through delayed
actions such as time delays or counted occurrences.
Once an event triggers, it actuates in the outside world by switching on or off
electronic control gear or the physical actuation of devices. A Programmable Logic
Controllers will continually loop through its user defined program waiting for inputs
and giving outputs at the specific programmed times.
Programmable Logic Controllers first came about as a replacement for
automatic control systems that used tens and hundreds (maybe even thousands)
of hard wired relays, motor driven cam timers and rotary sequencers.
More often than not, a single PLC can be programmed to replace thousands of
relays and timers. These Programmable Logic Controllers were first befriended by
the automotive manufacturing industry, this enabled software revision to replace
the laborious re-wiring of control panels when a new production model was
introduced.
Many of the earliest Programmable Logic Controllers expressed all decision
making logic in a program format called Ladder Logic, which from its appearance
was very similar to electrical schematic diagrams. 2

1 Enrique Mandado Prez; Jorge Marcos Acevedo; Celso Fernndez Silva. (2009).
Autmatas programables y sistemas de automatizacin. Barcelona: Editorial
Marcombo.
2 (2007). What is a PLC? (4-Mayo-2016) de Machine Information Systems. Sitio
web: http://www.machine-information-systems.com/PLC.html

PID
A proportionalintegralderivative
controller (PID
controller)
is
a control
loop feedback mechanism (controller) commonly used in industrial control systems.
A PID controller continuously calculates an error value as the difference between a
desired setpoint and a measured process variable. The controller attempts to
minimize the error over time by adjustment of a control variable, such as the
position of a control valve, a damper, or the power supplied to a heating element,
to a new value determined by a weighted sum:

where
,
, and
, all non-negative, denote the coefficients for
the proportional, integral,
and derivative terms,
respectively
(sometimes
denoted P, I, and D). In this model,

P accounts for present values of the error. For example, if the error is large
and positive, the control output will also be large and positive.

I accounts for past values of the error. For example, if the current output is
not sufficiently strong, error will accumulate over time, and the controller will
respond by applying a stronger action.

D accounts for possible future values of the error, based on its current rate
of change.

As a PID controller relies only on the measured process variable, not on


knowledge of the underlying process, it is broadly applicable. By tuning the three
parameters of the model, a PID controller can deal with specific process
requirements. The response of the controller can be described in terms of its
responsiveness to an error, the degree to which the system overshoots a setpoint,
and the degree of any system oscillation. The use of the PID algorithm does not
guarantee optimal control of the system or even its stability.
Some applications may require using only one or two terms to provide the
appropriate system control. This is achieved by setting the other parameters to
zero. A PID controller will be called a PI, PD, P or I controller in the absence of the
respective control actions. PI controllers are fairly common, since derivative action
is sensitive to measurement noise, whereas the absence of an integral term may
prevent the system from reaching its target value. 3

3 Araki, M. Control Systems, Robotics, And Automation Vol. II PID Control. (11/05/2016).
Sitio web: http://www.eolss.net/ebooks/Sample%20Chapters/C18/E6-43-03-03.pdf

Development
Planning
The group was divided into three teams, and each presented a different design
proposal. The best designed was chosen based on functionality and cost efficiency.
The quotation was the following:

Costs
Prudct
PVC Ball valve
PVC Elbow 90 1/2
PVC pipe 6m 1/2
PVC Cement
Sandpaper 100
1kg welding 6013
Steel angle 1in 6m
Coupling
Pump blades
2 m. DIN Rail
Profibus cable
Cabinet AE
400mmx300mmx210
Rittal

Vendor
Quantity
Unitary Cost
HomeDepot
4 $
45.00
HomeDepot
6 $
3.00
HomeDepot
2 $
45.90
HomeDepot
1 $
63.00
HomeDepot
2 $
7.00
Aceros del Sol
1 $
60.00
Aceros del Sol
2 $
108.00
Rodamientos
del Bajo
1 $
200.00
Himelda
Rodriguez
1 $
300.00
Tecnocontrol
1 $
152.77
Tecnocontrol
2 $
43.85

Total Cost
$ 180.00
$
18.00
$
91.80
$
63.00
$
14.00
$
60.00
$ 216.00

Tecnocontrol

$ 843.29
$ 2,226.56
$ 445.31
$ 2,671.87

1 $
843.29
Subtotal
Extras
Total

200.00

$
$
$

300.00
152.77
87.70

When the final design was selected, the construction stage began. During this
stage, several changes and adaptations were made to assure its functionality. The
different components were selected and bought so that they could work together.
This adaptability was needed to change components and details if the system
presented some type of flaw.
While the prototype was being constructed, the mathematical model, PID, and TIA
Portal program were being developed to assemble all parts of the project when
they were finished.

Design
The design should include the following elements:
-

2 water tanks
3 manual relief valves
1 solenoid valve
1 Siemens water pressure sensor
1 three-phase water pump
1 electronic panel
1 Siemens PLC and HMI with built-in transformer

In this system, the water level in the tank must remain constant and stable at a
specified setpoint. The water level setpoint can be changed in the PLC and is
measured with the water pressure sensor and an indicator, built from a transparent
hose.
The pump extracts water from the tank to the upper deposit until the desired
level is reached. The pump is controlled with a PID controller loaded in the PLC.
The next image shows the final design:

Construction
The following materials were needed to build the prototype:
-

4 PVC tube
4 to 1 PVC couplings
1 PVC tube
1 PVC ball valves
90 PVC elbows
Recycled wood
1 steel PTR
Wheels
Transparent 1 hose
PVC cement

The deposit was built using a 4 PVC tube. It was adapted to the 1 tube with a
4 to 1 coupling. This 1 tube was connected to the relief and solenoid valves. The
indicator was also connected in parallel to check the water level in a more visible
way. All valves were connected in parallel.

All valves pour water to the deposit so it can be recycled and sent to the tank.

A wheeled platform was built to make the system


easier to move and transport. The picture below shows
this platform.

Next, the pvc pipes and the platform were put


together to start testing the system with the PID
controller.

Data Acquisition
To obtain the mathematical model of the system, 10 test runs were made. After
obtaining the response of this tests, they were averaged to work with clean and
more accurate data. These samples were made with 0 as the starting level with a
step function of 3450 rpms for 5 minutes, acquiring data each second.

AVERAGE
120
100
80
60
40
20
0

50

100

150

200

250

300

350

AVERAGE
30
25

f(x) = 3.33x - 41.06

20
15
10
5
0

20

40

Using the Ziegler Nichols method:

60

80

100

Change in output variable


Step function magnitude
Dead time
Intersection time
Time constant

c
m
K=c/m

tm1
= Tm1 - .

105 cm
3450 rpm
0.0304
12.3203 sec.
43.8263
31.5060

Adding the variables to the function:

G(S)=
12.3203 S

0.0304 e
31.5060 S+ 1

Transfer function in Z domain (sampling each second)

G(Z)

Y (Z ) Z

=
U (Z )

13

(0.0006488 Z+ 0.0003009)
Z0.9688

Matlab code used to transform transfer function from S domain to Z:

LabView Programming
The first thing that was done after getting the mathematical model, was validating it
against the tests with the physical system. After the validation, the PID controller
was tested several times to observe how the controller reacted to the system.
The program on LabView is showed next:

The LabView user interface is showed in the next image:

After testing the PID controller, the second type (hysteresis) was implemented in
the same VI. The results happened to be as expected, however it is not good
enough to work with the system due to its simplicity, low response, and instability.
Results and Data Analysis
To compare the behavior of the controller with the mathematical model and the
error with different Setpoints, a routine was determined:
Time (minutes)
1
5
5
5
1

Setpoint (cm)
0
70
105
35
0

The data acquisition and analysis were done in LabView with the following addition
to the previous VI:

This determined specific setpoints to each time lapse. After running this test, the
next results were obtained:

Eficiencia Nivel vs Setpoint


120
100
80
60
40
20
0

200

400
real

600
Setpoint

800

1000

1200

Eficiencia RPMs
4000
3500
3000
2500
2000
1500
1000
500
0

200

400
setpoint

600

800

1000

1200

Vel motor real

The first graph shows the error of the response of the system (blue) to the setpoint
routine. Data was read each second and then squared to obtain a number that was
compared to other projects in class. This number was 381,457.84.

The second graph shows the error between the rpms at which the system reaches
the level determined in the table mentioned before and the angular velocity of the
motor during the real time test. This error was also squared: 490,741,119.73.

Conclusions
With the results obtained from the tests, it can be said that the controller works with
the efficiency required by the system. Although it does not show true stability and a
quick response, this system does not require either of them, as the overall speed
and reaction times of the system are fairly high. The objectives of the course were
met because of the depth of the PID design. It was created from zero and tested
throughout the semester, leaving only the tuning and adaptation to this project.
This project shows the principles of automation on real industrial applications and
control systems. It helped us comprehend the different response of a PID controller
depending on how it is designed. It also showed a way to analyze the results after
implementing a controller to study its efficiency and behavior.

Das könnte Ihnen auch gefallen