Documente Academic
Documente Profesional
Documente Cultură
5.1 Introduction
The industrial application of flow rate measurement and control is very important
and essential especially in petroleum refineries, pharmaceutical and chemical
process industries. Flow control is very important in medical appliances also. For
maintaining the saline and blood flow rate is play a very crucial role in hospitals. In
pharmaceutical and chemical process industries also the flow rate maintenance is
essential for perfectness of medicine composition [1]. The flow rate is measured and
control is developed by implementing software programming FPID.
The performance of flow meters is also influenced by a dimensionless unit called the
Reynolds Number. It is defined as the ratio of the liquid's inertial forces to its drag
forces. The Reynolds number is used for determined whether a flow is laminar or
turbulent. Laminar flow within pipes will occur when the Reynolds number is below
the critical Reynolds number of 2300 and turbulent flow when it is above 2300[2][3].
The value of 2300 has been determined experimentally and a certain range around
this value is considered the transition region between laminar and turbulent flow.
Where
ѵs = Mean Fluid Velocity,
η - (Absolute) Dynamic fluid Viscosity
v = Kinematics Fluid Viscosity (ν = η/ρ)
ρ = Fluid Density
L = Characteristic Length (Equal to diameter, 2r if a Cross Section is Circular)
1
Basic Requirements for Flow Measurement
Ability to Calibrate
Ability to Integrate Flow Fluctuation
Easy Integration with Piping System
High Accuracy
High Turn-Down Ratio
Low Cost
Low Sensitivity to Dirt Particles
Low Pressure Loss
No Moving Parts
Resistant to Corrosion and Erosion
2
The definition of mass flow rate is the number of kilograms of mass flow that flows
past a given cross sectional area per second. Therefore,
3
• Magneto-Inductive
• Frequency of Vortices
• Ultrasonic
4
Figure 5.1(e): Differential Pressure
5.2.2 Thermal Dispersion
Thermal Dispersion flow meters generally use combinations of heated elements and
temperature sensors to measure the difference between static and flowing heat
transfer to a fluid and infer its flow with knowledge of the fluid's specific heat and
density. The fluid temperature is also measured and compensated for. If the density
and specific heat characteristics of the fluid are constant, the meter can provide a
direct mass flow readout, and does not need any additional pressure temperature
compensation over their specified range.
5
magnetic flow meter’s coil can be powered by either alternating or direct current. In
AC excitation, line voltage is applied to the magnetic coils and as a result, the flow
signal (at constant flow) will also look like a sine wave[6]. The amplitude of the wave
is proportional to velocity. In addition to the flow signal, noise voltages can be
induced in the electrode loop. Out-of-phase noise is easily filtered, but in-phase
noise requires that the flow be stopped (with the pipe full) and the transmitter
output set to zero. The main problem with ac magflow meter designs is that noise
can vary with process conditions and frequent re-zeroing is required to maintain
accuracy. And as for DC excitation designs, a low frequency (7-30 Hz) dc pulse is used
to excite the magnetic coils. When the coils are pulsed on the transmitter reads both
the flow and noise signals. In between pulses, the transmitter sees only the noise
signal. Therefore, the noise can be continuously eliminated after each cycle.
6
Figure 5.1(i): Corriolis type
Positive displacement meters provide high accuracy, ±0.1% of actual flow rate in
some cases and good repeatability as high as 0.05% of reading. Accuracy is not
affected by pulsating flow unless it entrains air or gas in the fluid. PD meters do not
require a power supply for their operation and do not require straight upstream and
downstream pipe runs for their installation [7]. Typically, PD meters are available 1”
up to 12” in size and can operate with turndowns as high as 100:1, although ranges
of 15:1 or lower are much more common. Slippage in the flow meter is reduced and
metering accuracy is therefore increased as the viscosity of the process fluid
increases. The process fluid must be clean. Particles greater than 100 microns in size
must be removed by filtering. PD meters operate with small clearances between
their precision-machined parts; wear rapidly destroys their accuracy. For this
reason, PD meters are generally not recommended for measuring slurries or abrasive
fluids. In clean fluid services, however, their precision and wide range ability make
them ideal for custody transfer and batch charging. They are most widely used as
household water meters. In industrial and petrochemical applications, PD meters are
commonly used for batch charging of both liquids and gases.
Vortex shedding frequency is directly proportional to the velocity of the fluid in the
pipe and therefore to volumetric flow rate[]8[9]. The shedding frequency is
independent of fluid properties such as density, viscosity, conductivity, etc., except
that the flow must be turbulent for vortex shedding to occur.
8
Figure 5.1(n): Fluidic Oscillation (Coanda Effect) type
9
5.2.8 Turbine type
Reluctance
The coil is a permanent magnet and the turbine blades are made of a material
attracted to magnets[11]. As each blade passes the coil, a voltage is generated in the
coil. Each pulse represents a discrete volume of liquid. The number of pulses per
unit volume is called the meter's K-factor.
Inductance
A permanent magnet is embedded in the rotor, or the blades of the rotor are made
of permanently magnetized material. As each blade passes the coil, it generates a
voltage pulse. In some designs, only one blade is magnetic and the pulse represents
a complete revolution of the rotor.
Capacitive
Capacitive sensors produce a sine wave by generating an RF signal that is amplitude-
modulated by the movement of the rotor blades.
Hall-Effect
Hall-effect transistors also can be used. These transistors change their state when
they are in the presence of a very low strength (on the order of 25 gauss) magnetic
field.
10
5.3 Hardware Development
The total system can be developed by implementing software FPID; mainly it reduces
the hardware complexity. In this system, set point of the flow is given by the
programmer using GUI. YF-S201 flow sensor sense the liquid flow rate of pipe which
controls the total system using Arduino mega2560 microcontroller.
The flow measurement and control system is developed by using flow sensor,the
output of sensor which is in the form of pulses is given to the Arduino Mega2560
microcontroller implementing FPID logic the PWM of the controller is given the
signal to DC water pumping motor through ULN2003 current driver. The hardware
system consists of different units and explanation for each unit is given in detail.
They are
Figure 5.2: Block diagram of embedded based flow measurement and control
11
12
Figure 5.3: Schematic diagrams of Flow rate measurement and control
13
5.3.1 YF-S201 Hall Effect Water Flow Meter / Sensor
This YF-S201 Hall Effect Water Flow sensor placed in line with the water line and
contains any simple level sensor to measure how much liquid has pumped through
it. There is an integrated magnetic Hall Effect sensor that outputs an electrical pulse
with every revolution. The Hall Effect sensor is sealed from the water pipe and allows
the sensor to stay safe and dry. The sensor comes with three wires: red (5-24VDC
power), black (ground) and yellow (Hall Effect pulse output). By counting the pulses
from the output of the sensor can easily calculate water flow[12].
YF-S201 Water Flow Sensor can be used to measure the flow of liquids in both
industrial and domestic applications. This sensor basically consists of a plastic valve
body, a rotor and a Hall Effect sensor. The pinwheel rotor rotates when liquid flows
through the valve and its speed will be directly proportional to the flow rate.
Specifications
14
Hall-effect transistors change their state when they are in the presence of a very low
strength (on the order of 25 gauss) magnetic field. By counting the pulses from the
output of the sensor can be easily calculate water flow. Each pulse gives
approximately in milliliters and the pulse rate does vary a bit depending on the flow
rate, fluid pressure and sensor orientation. It will need careful calibration if better
than 10% precision is required.YF-S201 Water Flow Sensor can be used to measure
the liquid flow in both industrial and domestic applications. This sensor basically
consists of a plastic valve body, a rotor, a Hall Effect sensor, inlet and outlet. The
pinwheel rotor rotates when water or liquid flows through the valve and the speed
of sensor will be directly proportional to the flow rate. The Hall Effect sensor will
provide an electrical pulse with every revolution of the pinwheel rotor. The rate of
water flow will be directly proportional to the number of pulses counted [15]. The
pulse signal is a simple square wave so it’s quite easy to log and convert into liters
per minute using the following formula.
It is the heart of the module of the entire system. It is controlled total parameter
value and provides a communication between client and server by interfacing this to
the PC. The YF-S201 water flow sensor module can be easily interfaced with Arduino
Mega2560 microcontroller Connect the PWM output of this module to interrupt pin
of microcontroller unit and count the number of pulses or interrupt per unit time.
The rate of water flow will be directly proportional to the number of pulses counted.
Based on the pulses, derive an expression for flow rate in milliliter (ml). The signal
which is connected to the PWM as an output signal which fed to DC pumping motor
which is attached to the flow sensor through the ULN 2003 driver.
5.3.3 DC MOTOR
A water pumping DC Motor which operates with +12V / 1Amp power supply for
pumping the liquid. It consists of one inlet and one outlet for maintaining the Flow
15
rate in a tank by pumping water. In this work the motor controlled by a controller line
of PWM which operates with +5V/+12V by using Fuzzy with PID software. The
application software for the present work developed through communication
interfacing with PC and USB .One advantage of it is, its operating voltage is +5V
same as controller.
The computer is the most important and integral part of the entire control system as
it plays a vital role in data acquisition, display, record, and generate graphs. The
predominant interfaces between personal computer and microcontroller are USB
and Ethernet. In this contest USB communication is implemented to transfer data to
and from controller to PC to display and store in database. Computer is loaded with
windows 2008 operating system, Arduino and Processing software.
For providing flexibility and storability GUI software has been developed in
Processing using java programming language, which will provide a graphical
visualization for the user to monitor the status of the signal and stores the data for
future study. In the present study industrial process parameters are measured,
controlled and displayed on GUI window. Select the Flow parameter from first GUI
window and then control the parameter through the set points using either
increment or decrement buttons.
16
5.4 software development
In the present research work, the software development of Fuzzy with PID control
logic can be developed and implemented by program using the embedded ‘C’ in
Arduino and the communication for controlling the process parameter Flow rate
through Internet of Things (IoT) using Java programming language for Processing
and analysis. The program developed in such a way that the GUI window includes
with set value, measured value, graph of time versus selected parameter value,
buttons which are used for setting the set value of the flow rate, slides, present time
and the photograph for total setup for selected Flow parameter.The first GUI
window by selecting the Flow parameter which to be control and then control the
parameter through IoT which includes two individual programs of server and client.
Depending on requirement of system the number of clients can be given
authenticate through ID for safety and security purpose. The clients control the
selected Flow parameter which sends the signal to server and then the data
transferred to microcontroller i.e., develop the communication between Arduino
and Processing through the port to control the set value of parameter.
The Constrained Application Protocol (CoAP) is used which employs based on the
User Datagram Protocol (UDP). The protocol CoAP was specifically developed to
allow resource-constrained devices to communicate over the Internet using UDP
instead of TCP. CoAP is particularly useful for communicating with low-power
sensors and devices that need to be controlled via the Internet. It uses the data in
binary form. CoAP packets use bit fields to maximize memory efficiency and makes
use of Datagram Transport Layer Security (DTLS) which is analogous to the TCP
version of TLS. The default level of encryption is equivalent to a 3072-bit RSA key.
The communication that develop transport the data with security by entering the IP
address of the server in the first GUI window which is displayed when the client is
executed and also the IP addresses of all the clients are stored and saved in server.
Client controlled the selected set value of the Flow rate with security implementing
software programming of FPID with Arduino and control the parameter value from
the client through IoT .The algorithm and flowchart is shown in figure 5.6.
17
Algorithm
Figure 5.6 Flowchart for Flow rate measurement and control using Hall Effect sensor
implemented with FPID control logic
18
Table 5.1 Matrix arrangement of flow
milliliter/sec
Figure 5.7: Membership Functions for F (flow) = {Low, Medium, High, Very high}
1 40 to 60 Low (L)
3 10 to 20 Veryhigh (VH)
4 0 to 10 High (H)
19
Table 5.3 Output linguistic Variables
Defuzzification
The procedure of producing a output variable in fuzzy logic given rule set of fuzzy
and respective membership values can be described as term “Defuzzification”. It
requires basically fuzzy control matrix arrangement. It contains large number of
conditions which will convert the linguistic variables of a final result taken from the
fuzzy logic. To understand this, rule set of the fuzzy logic is to be determining how
much PWM drive can be applied to the motor.
Depending on the size of pumping pipe line which is placed in line with the flow
sensor, the number of electric pulses given by the sensor is varied. In this work, we
use the pipe line pumps the water or liquid 500ml of unit second. It means
approximately 10ml of liquid which moved through the sensor gives a single pulse as
20
output. By using software [4] Fuzzy with PID controller (FPID) the flow and level can
be controlled at a time. Fuzzification process, rule set of the variables and
defuzzification [5],[6] of flow control is same as which is applied to the level control
but the different units are used for individual specification. The PWM of controller
can be drive the pumping motor through ULN2003 driver.
The total measurement and control system can be developed using Arduino and
processing software and the automation can be develop communication through
internet of things (IoT) by writing a program in processing software using java
programming language for server and client programs. The details of software are
presented in chapter 7.
21
Figure 5.8 Block diagram and circuit diagram of Flow measurement and control
through IoT
The results can be represented in the GUI window application using processing
software. GUI (a) shows the continuous maintenance of the fixed flow rate up to set
value of level is reached. GUI (b) shows the time response of flow rate implementing
FPID from 60ml to 5ml of flow rate successfully tested and controlled with an steady
state error of ± 1ml and the results includes with the different characteristics of Rise
time (RT), Settling time (ST), Controlled value (CV) by the system and Steady state
error (SSE) are presented in Table 5.5. Based on these characteristics is observed
that the performance of FPID control algorithm is the best from remaining
algorithms. The accuracy of the system is given by calculating average of the steady
state error.
22
GUI 5.1(a): Real time versus level at fixed flow rate 10ml/sec
rate (sec) (sec) (ml) (ml) (sec) (sec) (ml) (ml) (sec) (sec) (ml) (ml)
(ml)
23
60 10 13 64 4 12 15 64 4 8 10 60 0
50 18 21 53 3 19 24 54 4 14 16 51 1
40 24 28 43 8 29 33 42 2 20 23 40 0
30 33 37 34 4 38 41 34 4 28 31 30 0
20 38 42 24 4 47 49 24 4 34 37 20 0
10 47 54 14 4 58 63 15 5 38 42 10 0
5 51 60 8 3 64 68 9 4 43 45 6 1
The present work is compared with the work of “Fuzzy Adaptive PID for Flow
Control System based on OPC” of R.Manjunathan and S.Janakiraman has published
in “IJCA Special Computational Issue Science on-New Dimensions & Perspectives” in
Chennai in India the flow controlled with overshoot using MATLAB.
5.6 Conclusion
The design of Fuzzy with PID flow controller with active rule selection mechanism.
The proposed system is tested in real time environment and the output
performances are evaluated. In this system which is key point to reduce the cost by
implementing software algorithm. We have successfully experiment this system in
lab and therefore proposed a web based flow monitoring and controlling network
with flexibility, further extension of this system is to control from any place via
internet even with different type of devices. This could have a substantial benefit
from this research work for efficient management of liquid flow.
24
Advantages
Applications
Process industries
House hold appliances
Air conditioning
Petrochemical processing
Medical appliances
25
REFERENCES
[1] “Level Measurements Systems”. Omega Complete Flow and Level Measurement
Handbook and Encyclopedia Vo.29, Stanford, CT, Omega Engineering Inc, 1995.
[4] Holman, J. Alan (2001). Experimental methods for engineers. Boston: McGraw-
Hill. ISBN 978-0-07-366055-4.
[7] Miller, Richard W. (1996). Flow Measurement Engineering Handbook (3rd ed.).
Mcgraw Hill. p. 6.16-6.18. ISBN 0070423660.
[8] Bean, Howard S., ed. (1971). Fluid Meters, Their Theory and Application (6th
ed.). New York: The American Society of Mechanical Engineers. pp. 77–78.
[9] Severn, Richard. "Environment Agency Field Test Report – TIENet 360
LaserFlow" (PDF). RS Hydro. RS Hydro-Environment Agency. Retrieved 3
August 2015.
26
[12] Adrian, R. J., editor (1993); Selected on Laser Doppler Velocimetry, S.P.I.E.
Milestone Series, ISBN 978-0-8194-1297-3.
[19] N.R Kolhare, P.R Thorat,(2013) “An Approach of Flow Measurement In Solar
Water Heater Using Turbine Flow Meter,” International Journal of Engineering
Research & Technology (IJERT), Vol. 2, pp. 1-4.
[20] Rodriguez,(1997) “Design and fabrication of a low cost water flow meter”, IEEE
International Conference on Solid-State Sensors and Actuators, Vol. 5, pp. 159-
162. Digital Object Identifier: 10.1109/SENSOR.1997.613607
27
/************************************/
//Develop the program for Flow control in Arduino software
//Using Embedded C
/******** declare the Constants***********/
/************************************/
/*****************************************/
/**************Declaration of PID constants**********/
/*************Initialize the Values to PID constants***********/
float Errorf[4] = {0, 0, 0, 0,};
//*************************************************************
/*************Initialize the Values to Propotionality constants***********/
28
//******************************
// the setup routine runs once when you press reset
void setup(){
Setf = 5;
//******************************
// initialize serial communication at 9600 bits per second:
Serial.begin (9600);
pinMode(8, OUTPUT);}
//******************************
// If Serial port data is availiable
if (Serial.available()) {
//******************************
//Serial port data assigned to the variable data
data = Serial.read();
info = data; }
if(info == '+') {
setl++;
info=' '; }
if(info == '-') {
setl--;
info=' '; }
SensorValuef = FlowSensor();
Watter_Flow_in_ml = SensorValuef*FlowConstant;
Serial.print(Watter_Flow_in_ml);
29
timef = millis()/1000;
Dtimef = 0;
Ltimef = timef;
flowf = Watter_Flow_in_ml;
Dflowf = abs(flowf-Lflowf);
Lflowf = flowf;
Dflowf = 0;}
else{
Serial.print(" ");}
30
{
//******************************
//PWM output is set based on PID constants of array[3]
fuzzy = 3;
}
//************************************************
//code for Fuzzy with PID control
//***********************************************
//Calculate Protionality of error
P = Error[Current] * Kp[fuzzy];
Error[Sum] = Error[Current] + Error[Last] + Error[SecondToLast];
//***********************************************
//Calculate Integrity of error
I = Error[Sum] * Ki[fuzzy];
Error[Delta] = Error[Current] - Error[Last];
//***********************************************
//Calculate Derivative of error
D = Error[Delta] * Kd[fuzzy];
//***********************************************
//Calculate the final output based on error
Drive = P + I + D;
Error[SecondToLast] = Error[Last];
Error[Last] = Error[Current];
}
//***********************************************
//If error is less than zero, the PWM output is zero
if (Error[Current] < 0) {
Drive = 0; }
//******************************
Drive = map(Drive,0,1000,0,255); }
long FlowSensor()
31
{
State = digitalRead(SensorPinNo);
if (Statef != lastStatef) {
if (State == LOW) {
Counter++;
// Serial.println(Counter);
else {
lastState = State;
return Counter;
32