wireless communication system for supervisory pressure control
TRANSCRIPT
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 1/51
PROJECT REPORT
WIRELESS COMMUNICATION SYSTEM
for
Supervisory pressure control
By
Ashfaque AlamDMU Std ID: p10369638
____________________________________________________________Submitted in fulfillment of the
FINAL YEAR INDIVIDUAL PROJECT (ENGD3000)
to be awarded BEng (Hons) in Electronics Engineering;
Under the supervision of
Dr. Piotr Skworcow
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 2/51
Ashfaque Alam|p10369638
Page 2 of 51
ACKNOWLEDGEMENT
I have been immensely motivated, inspired, helped and supported by my nearest and
dearest friends, families and folks. It is simply not possible to thank them enough andin trying to mention all their names and their contribution would mean composing
another dissertation.
Dr. Scarecrow, with his continuing and consistent guidance and support, has always
been by my side through times of hardship and success, showing me the right path and
always offering me his priceless advices. Without his all-out support, this research
work would not have been possible.
De Montfort University, being the heart of Leicester, had its own charm. Starting from
Queens building, where hours and hours of work has been done, to the printing and
binding shop, each step was made simpler due to easy access of equipment and
information available at all times. The staffs, even during their worst days of the year,
were always friendly and offered to lend a helping hand.
Special recognition should go to my Father, Mother and Brother also my friends-
Shakhi, Shishir, Kalpesh, Riyaz, Sadiyah, Areez, and Trigwell. Without their consistent
encouragement, inspiration, drive and support through rain and storm, this research
would have never been as fruitful. To them I extend my most cordial gratitude.
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 3/51
Ashfaque Alam|p10369638
Page 3 of 51
ABSTRACT
Temperature, pressure, flow, level etc are the common process variables for any real
system. Similar to the others, pressure is another key process variable for providingcritical condition of boiling, mining, chemical reaction, distillation, extrusion,
vacuuming, air conditioning etc. As a result the concept of pressure control system has
turned into a widely used industrial application where a pre-sated outlet pressure is
meant to be maintained throughout an implemented arrangement. The fundamental
theory is kept as it is to the general feedback control system, that focuses on
the modelling of a diverse range of dynamic system (e.g. mechanical systems) and the
design of controller that will cause the system to behave in the desired manner.
Supervision, by definition acquires slightly different methodology than that of
controlling. Supervisory control refers to the arrangement of not only controlling any
system but also coordinating all the subsystems in real time.
The paper investigates the plan to wirelessly supervise the pressure control system using
necessary equipments, controllers and set of instructions. As for any supervisory control
system there is the necessity of maintaining a continuous Human-to-Machine Interface
(HMI), a Remote Terminal Unit (RTU) or Programmable Logic Circuit (PLC) or any other
integrated device connected to the sensor that converts the sensed signal into desired
one and passes the data to the media that carries it to supervisory system and
necessary communication infrastructure; the report has focused on all the necessary
terms and parameters to be described.
Because of being a very early attention-grabbing technique there have been a several
previous works of remote supervisory control taken. The paper also draws comparison
with prior and continuing works done on Wireless supervisory control system. Most
importantly, the fundamentals of the techniques taken here have been figuratively
illustrated along with exemplary practices in order to prove the taken technique fruitful
and to give the future researchers a complete guideline of taking this project further to
the optimal level. Wireless supervisory pressure control system has also been shown to
play a role in attaining better performance in practical appliance.
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 4/51
Ashfaque Alam|p10369638
Page 4 of 51
GLOSSARY
A/D (ADC) Analogue to Digital Conversion
ANSI American National Standards Institute
AT Attention Terminal
Bit Binary Digit
D/A Digital to Analogue Conversion
ESD Emergency Shut Down
GPRS General Packet Radio System
GUI Graphical User Interface
HIPPS High Integrity Pressure Protection System
HMI Human-to-Machine Interface
IDE Integrated Development Environment
IED Intelligent Electronic Device
Kbps Kilo Bit per Second
LED Light Emitting Diode
MTU Master Terminal Unit
OS Operating System
PAC Process Automation Controller
PC Personal Controller
PCI Peripheral Component Interconnect
PDA Personal Digital Assistant
PIC Peripheral Interface Controller
PLC Programmable Logic Circuit/Controller
POT Potentiometer
PRV Pressure Reducing Valve
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 5/51
Ashfaque Alam|p10369638
Page 5 of 51
PSD Production Shut Down
RF Radio Frequency
RS-232 Recommended Standard-232
RTU Remote Terminal Unit
SCADA Supervisory Control and Data Acquisition
SIM Subscriber’s Identity Module
SMS Short Message Service
UART Universal Asynchronous Receiver/Transmitter
USB Universal Serial Bus
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 6/51
Ashfaque Alam|p10369638
Page 6 of 51
____________________LIST OF CONTENTS
CHAPTER PAGE
NO.
1 INTRODUCTION 09
1.1 PRESSURE CONTROL SYSTEM 09
1.2 SUPERVISORY CONTROL 10
1.2.1 Autonomous supervisory system 10
1.2.2 Human supervisory system 10
1.3 WIRELESS COMMUNICATION FOR SUPERVISIORY SYSTEM 11
2 BACKGROUND 122.1 HISTORY & EVOLUTION OF SUPERVISORY CONTROL 12
2.2 RELATED WORKS 14
2.2.1 Emergency shutdown (ESD) system 14
2.2.2 High integrity pressure protection system 14
2.2.3 Supervisory control and data acquisition (SCADA) system 14
2.3 PRACTICAL ASPECT 15
3 PROJECT ARCHITECTURE 16
3.1 CONVENTIONAL ARCHITECTURE 16
3.2 ELECTRONIC FRAGMENTS TO WORK ON 17
3.3 SPECIFIC ARCHITECTURE OF THE PROJECT 18
4 PROJECT COMPONENTS 22
4.1 HARDWARE USED FOR THE PROJECT 22
4.1.1 Pressure Reducing Valve (PRV) 22
4.1.2 Modulo Controller 23
4.1.3 Explorer 16 Development Board (PIC24 Micro-Controller) 23
4.1.4 Wavecom M1306b (GPRS Module) 24
4.1.5 Connection Leads (RS232 & Converters) 25
4.1.6 PCI Cards (With RF Connectors) 25
4.2 SOFTWARE USED FOR THE PROJECT 26
4.2.1 MPLAB Integrated Development Environment (IDE) 26
4.2.2 MPLAB C30 (C Compiler) 26
4.3 HUMAN MACHINE INTERFACE 27
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 7/51
Ashfaque Alam|p10369638
Page 7 of 51
5 IMPLEMENTATION 28
5.1 PROGRAMMING MICROCONTROLLER 28
5.1.1 Receiving Analogue Signals 28
5.1.2 Communicating With GPRS Module 34
5.2 ENABLING HMI 38
5.2.1 Terminal Set-Up 38
5.2.2 Wireless Communication 38
5.3 DIFFICULTIES FACED & CAUTIONS REQUIRED 40
6 ANALYSIS AND DISCUSSION 42
7 SCOPE FOR FUTURE RESEARCH 43
8 CONCLUSION 44
REFERENCE 45
BIBLIOGRAPHY 49
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 8/51
Ashfaque Alam|p10369638
Page 8 of 51
_______________________LIST OF FIGURES
SERIAL FIGURE TITLE PAGE
2-1 Evolution of Supervisory System
3-1 Complete Project Overview 3-2 Specified Project Overview
3-3 Specifically Detailed Architecture
4-1 PRV Cross-Section
4-2 Explorer 16 PIC24 100 Pin Development Board
4-3 GPRS Module
4-4 RS232 Cable
4-5 RS232-USB Converter
4-6 PCI Card with RF Connector
5-1 Programmer Setting
5-2 Programming A/D Conversion Code
5-3 LED Position Changing with Potentiometer Variation5-4 Selecting the COM Port
5-5 Configuring Teraterm
5-6 Transmitting Character through RS-232
5-7 Sending Text to mobile using AT command
5-8 Sent Text using GPRS Modem
5-9 Receiving Text from mobile using AT command
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 9/51
Ashfaque Alam|p10369638
Page 9 of 51
CHAPTER 1
INTRODUCTION
As per definition, the major aim of any control system is to design systems withpredictable behavior thus the aim of control engineering
1. In this fast growing age of
industrial complexities, verity of controlled criterions are mounting as the time is
passing. These decisive factors of any under-designing process those often known as
process variables are mainly natural signals or Analogue indications, as for any real-life
control system requires some pre-specified natural/Analogue outcomes at the end2.
This thesis aims to play with one of the process variables- pressure. In this paper, the
titled phrase “Wireless Communication for Supervisory Pressure Control 3” comes with a
requirement of some terms to be described. With the aid of necessary verbal and
figurative descriptions those terms have been discussed in relation with the action
plan.
1.1 PRESSURE CONTROL SYSTEM
The pressure control system normally comprises the pressure regulating system and
the pressure safety system as well as notification systems and instrumentations to
monitor the operation. The pressure regulating system ensures that the pressure in
the pipeline is kept at a certain level. The pressure safety system denotes the
equipments that ensures the accidental pressure to be kept bellow set value.4, 2
In this Chapter
Pressure Control System.
Supervisory Control and its classifications.
Wireless Communication for supervisory system.
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 10/51
Ashfaque Alam|p10369638
Page 10 of 51
Poor pressure control can cause major safety, quality, and productivity problems.
Overly high pressure inside a sealed vessel can cause an explosion. Therefore, it is
highly desirable to keep pressure in good control and maintained within its safety
limits.
2
1.2 SUPERVISORY CONTROL
Supervisory control is the general term for coordinated control of many
individual controllers or control loops, whether by a human or an automatic control
system, although almost every real system is a combination of both. Supervisory
control often acquires two forms taking the acting process into account.5
They can be
defined as Autonomous/Strictest system and Human Supervisory control system/less
strict system.5, 6
1.2.1 Autonomous Supervisory System
The controlled machine or process continues autonomously. It is observed from time
to time by a human who, when deeming it necessary, intervenes to modify the control
algorithm in some way.5
As per Sheridan6
defines, “In the strictest sense, supervisory
control means that one or more human operators are intermittently programming and
continually receiving information from a computer that itself closes an autonomous
cont rol loop through artificial effectors to the controlled process or task environment.”
1.2.2 Human Supervisory System
The process accepts an instruction, carries it out autonomously, reports the results and
awaits further commands.5
As per Sheridan6
defined, “In a less strict sense, supervisory
control means that one or more human operators are continually programming and
continually receiving information from a computer that interconnects through artificial
effectors and sensors to the controlled process or task environment.”
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 11/51
Ashfaque Alam|p10369638
Page 11 of 51
1.3 WIRELESS COMMUNICATION FOR SUPERVISORY SYSTEM
As Per the project requires, this report has been prepared investigating the wireless
communication between supervisory system and control system. By definition,
wireless communication is the transfer of information without the use of wires.7, 8
The
distances involved may be short (a few meters as in television remote control) or long
(thousands or millions of kilometers for radio communications). The term is often
shortened to "wireless". It encompasses various types of fixed, mobile, and portable
two-way radios, cellular telephones, Personal Digital Assistants (PDAs), and wireless
networking. Other examples of wireless technology include GPRS modules, garage
door openers and/or garage doors, wireless computer mice, keyboards and headsets,
satellite television and cordless telephones.7, 9
__________________________________1Control engineering, Available at: http://en.wikipedia.org/wiki/Control_engineering [Accessed on:
05.23 am 13 May 2011]2Pressure control , (2011), CyberSoft, General Cybernation groups inc. Available at:
http://www.cybosoft.com/solutions/pressurecontrol.html [Accessed on: 05.30 am 13 May 2011]3Project Instruction provided the supervisor.
4Bræstrup. M. W, Andersen J. B, (2005), Pressure control systems, Design and installation of marine
pipelines, Blackwell Science Ltd, Blackwell Publishing Company, OXFORD, UK, pp- 415Supervisory Control , Available at: http://en.wikipedia.org/wiki/Supervisory_control, [Accessed on:
02.45 am 13 May 2011]6Sheridan, T. B, (1992), Human supervisory control, supervisory control, Tele-robotics, automation, and
human supervisory control, Massachusetts Institute of Technology Press, USA, pp-017Robels, R. J, Kim, T. H, Advances in Computational Intelligence, Man-Machine Systems and Cybernetics,
Architecture of Wireless Supervisory Control and Data Acquisition System, Multimedia EngineeringDepartment, Hannam University, Korea, pp- 2438"Wireless Communication" . Available at: http://www.sintef.no/content/page1____11881.aspx.
[Accessed on: March 2011]9Wikipedia "Wireless" , Available at: http://en.wikipedia.org/wiki/Wireless [Accessed on: 01.09 pm 10
May 2011]
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 12/51
Ashfaque Alam|p10369638
Page 12 of 51
CHAPTER 2
BACKGROUND
For any new technique to be evolved it requires some practical influences and any
technical evolution occurs due to some situational changes. From the very beginning of
the control engineering, this branch of knowledge has been evolved from mainly
mechanical to electrical system10
; and because of discovering the necessity of process
variation, the age old system did not remain constrain to only velocity control10
, rather
than being spread out to be applied for position, temperature, flow or pressure etc.
Thus for the supervisory communication bit the technology got transformed from
wired to wireless system. So, this section is going to focus on the brief history of
pressure control system to be evolved into wirelessly connected supervisory control
system and on the reality reasoning of this evolution, as a result the real life necessity
of this investigative paper be more clearly exposed.
2.1 HISTORY & EVOLUTION OF SUPERVISORY CONTROL
After being invented as the first ever reality feedback control mechanism in 1788 by
James Watt the Watt’s Governor11
took quite a long time to let the control system
develop further, till in 1868 Maxwell’s Famous paper “On Governor” comes out along
with the Feedback control theory11, 12
. Even well after Maxwell’s effort the same
mechanism with its erroneous behavior grabbed attention of the scientists. Mainly the
then emerging and risky mining environments pioneered the necessity of a new
concept of pressure control, when the uncontrolled release of oil/gas from a well while
drilling started becoming common, known as oil gusher, gusher or wild well during the
late 19th and early 20th centuries13
. This gushers later on got investigated and named
In this Chapter
Evolution & History of Supervisory Control.
Related Works.
Practical Aspects
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 13/51
Ashfaque Alam|p10369638
Page 13 of 51
as Blowout and define- the uncontrolled release of crude oil and/or natural gas from
an oil well or gas well after pressure control systems have failed13, 14,
.
So, the idea of pressure control system started to come into scene and gradually been
spread out into other sectors like water control, aircraft modeling and even in
aerospace engineering etc. This booming industrial utility then came up with the
requirement of directly supervising larger area system, thus started feeling the
necessity of automatically synthesizing supervisors that restrict the behaviour of a
plant such that as much as possible of the given specifications are fulfilled15
. The first
Supervisory Control Theory then was introduced in the name of Amadge-Wonham
framework15, 16
.
Now chapter 1.2 of the report elaborates both the successively invented supervisory
systems those finally been evolved in accordance of inter-system communicational
network type. During late 60s and mid 80s scientist like Thomas Sheridan, WR Ferrell,
Hennessy put a significant effort on merging the radio communication technology with
supervisory control system in order to outline an intelligent supervisory system17
.
Figure 2-1 bellow illustrates the brief evolution of supervisory system as Thomas
Sheridan observed:
Figure 2-1. Evolution of supervisory system17
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 14/51
Ashfaque Alam|p10369638
Page 14 of 51
2.2 RELATED WORKS
There has been systematic research over the past few decades on intelligent
Supervisory techniques for pressure control over wireless and wired networks. Some
of the relevant works, as required for this report, have been outlined in the following
sections.
2.2.1 Emergency Shut Down (ESD) system
For longer, large diameter gas or petroleum pipeline systems intended to be used for
overpressure protection is a must to be designed. The level of protection required and
the associated requirements to the protection system should also be evaluated.
Installation of safety pressure relief devices (pressure safety relief valves) along withinstallation of a remotely or directly operating pressure limiting system which shuts off
the gas supply to the pipeline is used and well known as Emergency Shut Down (ESD)
system. For gas pipelines ESD, or PSD for production flow-lines, is now a days almost
mandatory as the supervisory pressure control system18
.
2.2.2 High Integrity Pressure Protection System (HIPPS)
Pipelines where the well fluid pressure drives the flow and pipelines intended for liquid
service may also be designed with a High Integrity Pressure Protection System (HIPPS),
as a part of the overall field pressure control philosophy. Pipelines for liquids where
rupture has a limited and not potentially fatal effect, for example, water injection lines
and chemical/service lines, will naturally have less need for a pipeline safety system.
This system mainly can be portrayed as cost effective version of ESD18
.
2.2.3 Supervisory Control And Data Acquisition (SCADA) system
The term SCADA usually refers to centralized systems which monitor and control entire
sites, or complexes of systems spread out over large areas (anything from an industrial
plant to a nation). Most control actions are performed automatically by programmable
devices. SCADA system monitors the overall performance of the loop using supervisory
mediums like Wired connection, radio connection, wireless connection etc. This is the
technology which can be pretty similar to the desired one here in this report18, 19
.
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 15/51
Ashfaque Alam|p10369638
Page 15 of 51
2.3 PRACTICAL ASPECT
According to the so far discussion the practical necessity of a pressure control system
which is wirelessly supervised should quite easily be predicted- safety. Moreover, a
wirelessly communicated supervision may also refer to a cost effective technique in the
physical end, a time saving and effortless technique in terms of not having physical labour
on the field and a more comfortable, intelligent & accurate (thus effective in a word)
supervision technique. Moreover, in case of reducing background leakage and incident of
pipe bursts in water utility system20
, which often known as wastewater21
management and
in the petroleum mining environment as been said before the need of a more accurate,
intelligent and safe pressure control system is very important. As in very brief this will-
Remotely maintain the pressure control system. Reduce cost & risk of direct labor involvement and construstion.
Conserves time of the wired labor involvement that is needed for normal control
system because of not being able to follow remote instructions.
_________________________________
10 Maxwell, James Clerk, (1868). On Governors, Proceedings of the Royal Society of London. pp. 270 –
283.
11Hills, (1996), Power From the Wind , Cambridge University Press
12Watt’s Governor, Available in: http://en.wikipedia.org/wiki/Centrifugal_governor#cite_note-0
[Accessed at: 13.53 in 16th
May, 2011]
13R. Westergaard, (1987), All About Blowout , Norwegian Oil Review, pp- 13-17
14R. Westergaard, (1987), All About Blowout , Norwegian Oil Review, pp- 81-82
15Ramadge R. J, Wonham W. M, (1987), Supervisory control of a class of discrete event processes , SIAM
J. Control and Optimization, 25(1), pp. 206-230
16Supervisory Pressure Control, Available in:
http://en.wikipedia.org/wiki/Supervisory_control_theory
[Accessed at: 15.46 in 16th
May, 2011]
17Sheridan, T. B, (1992), Human supervisory control, supervisory control, Tele-robotics, automation, and
human supervisory control, Massachusetts Institute of Technology Press, USA, pp-02-03
18Mikael W. Bræstrup, Jan Bohl Andersen, (2005), Design and installation of marine pipelines, Blackwall
science limited, Oxford, UK, pp- 41-44
19Common system components, SCADA, Available in: http://en.wikipedia.org/wiki/SCADA [Accessed at:
18.00 in 17th
May, 2011]
20AbdelMeguid H., Skworcow P. and Ulanicki B., "Mathematical modelling of a hydraulic controller for
PRV flow modulation", Journal of Hydroinformatics, January 2011 (in press), pp- 05
21Wastewater system, Available in: http://en.wikipedia.org/wiki/Wastewater
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 16/51
Ashfaque Alam|p10369638
Page 16 of 51
CHAPTER 3
PROJECT ARCHITECTURE
Wireless Supervisory Control systems are composed of computers, controllers,
instruments, actuators, networks, and interfaces that manage the control of
automated industrial processes and allow analysis of those systems through data
collection. In the following section, the conventional installation of the system and the
architecture for wireless communication is discussed.
3.1 CONVENTIONAL ARCHITECTURE
For the control of inlet air/fluid pressure a pressure reducing valve (PRV) is often usedto reduce the amount of pressure in a system of pipelines or in a tank. The valve has an
opening through which pressure can be released. Since the amount of pressure inside
a tank or pipe system can change, the valves can often be adjusted to release more or
less pressure22, 23
. The pressure control valve should work using the pressure in a tank
or be opened manually using direct reference setting or by setting required reference
point through flow modulated Modulo Controller using wireless medium. But for a
wireless supervisory control environment the reference control point or control signal
is designed to be generated by the human supervisor by assessing the provided
external signals- Inlet pressure, Outlet pressure, Flow measurement derived from the
three sensors installed to the system pipeline22, 24
. The mechanism so far described
indicates this project to be more a supervisory control than a fully automatic control as
introduced by Sheridan and described in the chapter 2.117
. But more likely the whole
system seems to be more mechanical than electronic.
In this Chapter
Conventional architecture of the project.
Electronic scopes to be implemented.
Specific structure of the project.
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 17/51
Ashfaque Alam|p10369638
Page 17 of 51
3.2 ELECTRONIC FRAGMENTS TO WORK ON
Here comes the method of receiving Analogue data from the installed sensors and
digitally transmitting them to the Remote Terminal Unit (RTU), the device which is
responsible for processing the data and making them suitable to wirelessly transmit.
This local processor communicates with the site’s instruments and operating
equipments. Conventionally, this includes the Programmable Logic Controller (PLC),
Intelligent Electronic Device (IED) and Process Automation Controller (PAC) etc. A
single local processor may be responsible for dozens of inputs from instruments and
outputs to operating equipments25
. Here a point to be noted is a PLC may not be
always the best solution to use in particular cases, because of being constrain to one
specific environment and readily made for that environment with a non-versatile,
expensive and large sized characteristic. On the other hand a Peripheral Interface
Controller (PIC) is a device that can be effortlessly programmed and reprogrammed as
required in a low cost and small size. In a word a PIC micro-controller which is very
small, very cheap and very versatile, can be often a better choice to control the RTU
than that of PLCs26
. Here a PIC24FJ128GA010 micro-controller has been used
throughout the implementation portion.
Short range communications are needed between the local processors and the
instruments and operating equipment. These relatively short cables or in this case PCI
card27
carry Analogue and discrete signals using electrical characteristics such as
voltage and current, or using other established industrial communications protocols
say for the one suitable in this case- an RF connector25, 27
.
For wireless supervision the Master terminal unit (MTU) which could be called the
brain of the system that act as the central point of monitoring and control where ahuman operator can supervise the process; receive alarms, review data and exercise
control can be connected with the RTU via satellite, microwave, frame relay or cellular
packet data. . Moreover one or more remote terminal units (RTU). The RTUs gather the
data locally and send them to the MTU which then issues suitable commands to be
executed on site25
. A system of either standard or customized software is used to
collate, interpret and manage the data which is used as the Human Machine Interface
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 18/51
Ashfaque Alam|p10369638
Page 18 of 51
(HMI) that can be even designed simply using the OS (Operating System) integrated
terminal emulators25, 28
.
So, according to the overall project requirements along with the electronic scopes to
be fulfilled by the project, the near-conventional structure can be illustrated as follows
in figure 3-122,29
.
Figure 3-1. Complete project overview 29
3.3 SPECIFIC ARCHITECTURE OF THE PROJECT
The to the point aim of this project is to programmeme and implement a custom
developed board that imitates the flow measurement signal to change the set-point of
Pressure Reducing Valve (PRV) according to the set-point (reference voltage derived
from required pressure) received from control room PC. To receive instruction and
control the mechanical part of the system according to that Modulo controller’s flow -
modulation mode is used.
As per the project background describes above, the part that actually has to be
focused on in order to get this project done is mostly in touch of the microchip board
only. The next block diagram in figure 3-2 shown below is more specific towards the
project, which shows those parts to be designed during the project that emphasize on
programming a micro-controller board in order to read, transmit and receive necessary
Analogue-digital signals resulting from a remotely situated PC.
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 19/51
Ashfaque Alam|p10369638
Page 19 of 51
Figure 3-2. Specified Project Overview 22
The above figure 3-2 sets functionality for both of the Microchip part as well as for the
control room pc. They can be printed as follows:
Functionalities of the communication device (electronic board):
Communicating with GPRS module.
Reading the Analogue signals (inlet pressure, outlet pressure, flow) in a regular
time interval and transmit them via GPRS to the ‘control room’ PC.
Receiving set-point via GPRS from the ‘control room’ PC and generate pulse-
frequency-modulated signal according to the set-point.
Functionalities of a ‘control room’ PC:
Communicating with GPRS (General Packet Radio System) module
Receiving values of 3 signals (inlet pressure, outlet pressure, flow) via GPRS,
display them on the screen and save to file.
Transmitting set-point defined by operator via GPRS to the communication
device.
Bellow, a very elaborated and specific diagram has been presented to illustrate the
overall project architecture along with the workable bits and pieces indicated in figure
3-3 :
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 20/51
Ashfaque Alam|p10369638
Page 20 of 51
Figure 3-3. Specifically Detailed Architecture
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 21/51
Ashfaque Alam|p10369638
Page 21 of 51
Here the GPRS module is used as the ready solution for remote wireless applications,
connection between electronic board and control room PC and remote data
communications in the project environment30
.
---------------------------------------------------------22
Alam A, (2010), Project Background and Literature Review, Interim report for Wireless Communication
system for supervisory pressure control , pp – 04
23How a Pressure Control Valve Works, eHow.com, Available at: http://www.ehow.com/how-
does_4898894_how-pressure-control-valve-works.html#ixzz18LUcUsCF [Accessed at 05.53, on 17
December 2010 ]24
Bailey D. and E. Wright, (2003), Practical SCADA for Industry.25
Robels, R. J, Kim, T. H, Advances in Computational Intelligence, Man-Machine Systems and Cybernetics,
Architecture of Wireless Supervisory Control and Data Acquisition System, Multimedia Engineering
Department, Hannam University, Korea, pp- 242-24326
Robles R. J et al, International Journal of Future Generation Communication and Networking ,
Vulnerabilities in SCADA and Critical Infrastructure Systems, Multimedia Engineering Department, Hannam
University, pp- 99-10427
Difference between PLC and PIC, Available at: http://www.electro-tech-online.com/microcontrollers/10969-difference-between-plc-pic.html [Accessed at 05.53, on 17 May 2011
]28
Operating instruction, Human Machine interface, Intelligent Motion Systems, Inc, pp- 18-20, Available at:
http://www.faberinc.com/ReferenceMaterials/IMS/IMS_HMI_Manual.pdf 29
Taken from the Project instruction provided by the supervisor.30
Communication module with GSM or Analogue modem, STS, available at:
http://www.stssensors.com/contento/LinkClick.aspx?link=media%2FEnglisch%2FPDF%2FGSM_120_DED0
44A.pdf&tabid=74&mid=792&language=de-CH [Accessed at 08.10, on 17 May 2011 ]
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 22/51
Ashfaque Alam|p10369638
Page 22 of 51
CHAPTER 4
PROJECT COMPONENTS
Supervisory control systems typically have 3 major components- The Hardware
Components, Software Components, and the Human Machine Interface25, 31. All the
components are being briefly described in this chapter with necessary specifications and
figurative representations:
4.1 HARDWARE USED FOR THE PROJECT
The externally used hardware for the project are mainly the Pressure Reducing Valve
(PRV) and the flow modulated modulo controller. And the internally used hardware
those have been directly used in preparing the project are mainly the micro-chip board,
the GPRS module and the control room pc itself. All the hardware components are
illustrated in this chapter.
4.1.1 Pressure Reducing Valve (PRV)
A Pressure Reducing Valve or pressure regulator is a valve that automatically reduces the
flow of liquid/gas at a certain pressure following a set of instruction given into it. In this
project PRV is used to allow high-pressure fluid
supply lines or tanks to be reduced to safe and/or
usable pressures for the application of water
utilities which is ran by the instructions coming
through a modulo controller32
. Figure 4-1
illustrates a conventional PRV with its general
mechanisms indicated.
Figure 4-1. PRV Cross-section
33
In this Chapter
Hardware used for the project.
Software used.
Human Machine Interface used.
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 23/51
Ashfaque Alam|p10369638
Page 23 of 51
4.1.2 Modulo Controller
Modulo is a Flow Modulated PRV Controller that can be used to provide either Flow
Modulated or Time based pressure control in water networks or at major sites. The flow
modulated PRV controller is ran by the signals provided through the RTU programmedwith the flow profiles and pressure relationship between the valve and the "critical
point"34
. The pressure is increased or decreased depending on the flow data from
the the flow meter and the pressure data from the internal pressure sensor (Figure 3-3).
4.1.3 Explorer 16 development board (PIC24 Micro-controller)
The Explorer 16 is a low cost, efficient development board to evaluate the features and
performance of Microchip's PIC24 100 pin Micro-controller. The micro chip board
(PIC24) will be used to communicate with the GPRS module connected to the remotely
situated control room PC and then read three Analogue signals (inlet pressure, outlet
pressure, and flow) in a specific time interval and transmit them via built in GPRS to the
‘control room’ PC. Then Receive set point via GPRS from the ‘control room’ PC and
generate pulse-frequency-modulated signal according to the set point to the modulo22
.
As shown in figure 4-2 The board has an rs232 port and has two PCI slots where theadditional ports can be attached in order to receive three Analogue signals
35.
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 24/51
Ashfaque Alam|p10369638
Page 24 of 51
Figure 4-2. Explorer 16 PIC24 100 pin development board 35
The micro-controller used in the electronic board is a PIC24FJ128GA010 micro-controller
that involves Analogue specifications of 36
:
10-bit, up to 16-channel Analogue-to-Digital Converter (A/D):
- 500 ksps conversion rate
- Conversion available during Sleep and Idle
Dual Analogue Comparators with Programmable Input/Output Configuration
4.1.4 Wavecom M1306B (GPRS Module)
The GPRS module will be used to transmit signals
from the PC to the microchip board in both the
ways22
. In order to transmit the pressure signals
received from the PRV to the control room PC and to
receive the calculated Control signal from the control
room to the flow modulated Modulo controller is to
be used ( figure 3-3). Here used- Wavecom M1306B
has a rs232 port to be connected with the control
room PC or with the Microchip board22
. Figure 4-3. GPRS module37
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 25/51
Ashfaque Alam|p10369638
Page 25 of 51
4.1.5 Connection Leads (RS232 & Converters)
The rs232 cable will be used when connecting GPRS module to the “control room” PC.
When loading the programme to the microchip board, rs232 will also be used. The
converter is to be used when using the equipment outside laboratory and connecting itto non rs232 port computers
22.
Figure 4-4. RS232 cable38
Figure 4-5. RS232-USB converter 38
4.1.6 PCI cards (with RF connectors)
Use of The PCI cards is to be attached to the
microchip board when reading the signals
from the external signal generators those are
supposed sense the Inlet, Outlet pressure
and flow in the real system. These cards will
have RF port so that signals from the signal
generators can be sent to the microchip
board22
. Figure 4-6. PCI Card with RF connector 38
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 26/51
Ashfaque Alam|p10369638
Page 26 of 51
4.2 SOFTWARE USED FOR THE PROJECT
Supervisory Control requires a software to operate that can be divided into proprietary
type or open type. Proprietary software are developed and designed for the specific
hardware and are usually sold together. The main problem with these systems is the
overwhelming reliance on the supplier of the system. Open software systems are
designed to communicate and control different types of hardware25
. Here in this project
a proprietary software has to be developed for the hardware being used. In order to do
so, the C programming language can be used and for the compilation and generation of
the developed software the applications required are described briefly bellow:
4.2.1 MPLAB Integrated Development Environment (IDE)
MPLAB Integrated Development Environment (IDE) is a free, integrated gcc-based
toolset for the development of embedded applications employing Microchip's PIC and
dsPIC micro-controllers. The MPLAB IDE runs as a 32-bit application on Microsoft
Windows and includes several free software components for application development,
hardware emulation and debugging. MPLAB IDE also serves as a single, unified graphical
user interface for additional Microchip and third-party software and hardware
development tools22, 39
.
4.2.2 MPLAB C30 (C compiler)
As, Both Assembly and C programming languages can be used with MPLAB IDE, this must
include a compiler that compiles written codes of C/C++. This C compiler is named
MPLAB C30 will be used to write the C programme for PIC24 micro-controller, compile it
and then upload it from computer to the microchip board. This will be available to
download from www.microchip.com for free22, 39
.
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 27/51
Ashfaque Alam|p10369638
Page 27 of 51
4.3 HUMAN MACHINE INTERFACE
The goal of human-machine interaction engineering is to produce a user interface which
makes it easy, efficient, and enjoyable to operate a machine in the way which produces
the desired result. This generally means that the operator needs to provide minimal
input to achieve the desired output, and also that the machine minimizes undesired
outputs to the human. In a word HMI is the window to observe RTU from MTU25
.
Letting alone the Graphical HMIs those require high budget and design, simple HMI
system can be setup and programmed via a standard ANSI Terminal or terminal
emulator i.e. HyperTerminal that was previously included in various Microsoft Windows
operating systems (OS packages before Vista) or freely distributed terminal emulator
Teraterm25
.
In the project For the transmission of the set-point from the control room PC and for the
GUI supportive representation of the generated signal from microchip board to the PC it is
important to use some software to be working as the HMI for the emulation of these data.
And Tera-Term has been used for the purpose which is an open-source, free, software
implemented, terminal emulator (equalising interface of different systems) programme that
emulates different types of terminals, supports telnet, SSH 1 & 2 and serial port(RS232)
connections40
.
_______________________________
31Dennison R., SCADA System Assessment , Available at: http://www.epgco.com/scada-system-
assessment.html, Accessed: October 201032
Pressure Regulator, Available at: http://en.wikipedia.org/wiki/Pressure_reducing_valve 33
Figure taken from: http://webwormcpt.blogspot.com/2008/03/several-impact-of-backpressure-on.html 34
Modulo Flow Modulated PRV Controller, Available at:
http://www.industrysearch.com.au/Products/Modulo-Flow-Modulated-PRV-Controller-71462 35
Microchip Explorer 16 development kit, MachinGrid : robots at Work, Available at:http://www.machinegrid.com/2010/06/microchip-explorer-16-development-kit-hacks/ [Accessed at
11.41, on 17 December 2010]36
PIC24FJ128GA family datasheet, Microchip, pp- 0337
GSM modern Wavecom, Available at:
http://www.tradevv.com/chinasuppliers/gprsmodem_p_afc86/china-Gsm-modem-wavecom-Q2303A-
from-quot-HuTong-quot-products.html [Accessed at 12.30, on 17 Dec 2010]38
Ashok Karavadra, (2008-2009), Interim report for Final year project, Wireless Communication for
supervisory pressure control, pp- 0239
What is MPLAB IDE? , MPLAB Integrated Development Environment, Available at:
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en0194
69&part=SW007002 [Accessed at 13.16, on 17 Dec 2010]40
Tera-Term home page, Available at: http://hp.vector.co.jp/authors/VA002416/teraterm.html [Accessed
at 13.19, on 17 Dec 2010]
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 28/51
Ashfaque Alam|p10369638
Page 28 of 51
CHAPTER 5
IMPLEMENTATION
5.1 PROGRAMMING MICROCONTROLLER
The software that has to be developed for the hardware being used as mentioned in
chapter 4.2 using the C programming language along with the compilation and
generation technique of the developed software, the necessary steps are described
briefly with samples and figures in this section:
5.1.1 Receiving Analogue Signals
As per the specifically detailed architecture illustrated in figure 3-3 the workable
electronic fragment initialises its process with receiving three analogue signals from the
sensors to the PIC24 micro-controller working as the RTU. In embedded control, the
information from the analog world must first be converted to digital. The analog-to-
digital converter module is one of the key interfaces to the “real” world41
. In the case of
this particular project- an exemplary ADC is been presented to verify the conventional
programming principle of this conversion, so that it can be the way for the future
researchers to follow for obtaining the optimal technique needed for this project. A
voltage input has been read from the Explorer 16 Development board integrated
potentiometer in this section. The ADC module block diagram of PIC24 can be found in
APPENDIX A.
At first a new project has to be opened in MPLAB IDE with all the necessary pieces of
instruments installed from the attached CD-ROM or from the Microchip’s official web-
site. To create the new project for A/D conversion a source file named “pot.c” is been
created following the steps bellow:
In this Chapter
Programming Steps of Microcontroller.
Configuring HMI.
Additional Actions.
Difficulties Faced.
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 29/51
Ashfaque Alam|p10369638
Page 29 of 51
1. Select “Project→Project Wizard” to activate the new project wizard
2. Select the PIC24FJ128GA010 device, and click Next.
3. Select the MPLAB C30 Compiler Suite and click Next.
4. Create a new folder and name it “ADC_sample”; name the project “ReceivingAnalogue Signal” and click Next.
5. Click Next to the following dialog box.
6. Click on Finish to complete the Wizard set-up.
7. Open a new editor window.
8. Type the following four comment lines:
/*** It’s an analogue world
** Converting the analogue signal from a potentiometer*/
9. Select “File→Save As”, to save the file as: “Pot.c”.
10. Select “Project→Save” to save the project.
Now the usual header file (p24fj128ga010.h) and the definition of a couple of useful
constants has to be defined. The first one ‘POT’ defines the input channel assigned to
the potentiometer and the second one ‘AINPUTS’ is a mask that will help to define which
inputs should be treated as analog and which ones as digital. The complete code
following the instructions of Lucio Di Jasio42
, appears bellow:
/*** It’s an analogue world** Converting the analogue signal from a potentiometer*/
#include <p24fj128ga010.h>#define POT 5 // 10k potentiometer connected to AN5 input
#define AINPUTS 0xffef // Analog inputs for Explorer16 POT and TSENS
void initADC( int amask){AD1PCFG = amask; // select analog input pinsAD1CON1 = 0; // manual conversion sequence controlAD1CSSL = 0; // no scanning requiredAD1CON2 = 0; // use MUXA, AVss and AVdd are used as Vref+/-
AD1CON3 = 0x1F02; // Tad = 2 x Tcy = 125ns >75nsAD1CON1bits.ADON = 1; // turn on the ADC} //initADC
int readADC( int ch){AD1CHS = ch; // 1. select analog input channel
AD1CON1bits.SAMP = 1; // 2. start samplingTMR1 = 0; // 3. wait for sampling time
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 30/51
Ashfaque Alam|p10369638
Page 30 of 51
while (TMR1< 100); // 6.25 usAD1CON1bits.DONE = 1; // 4. start the conversionwhile (!AD1CON1bits.DONE); // 5. wait for the conversion to completereturn ADC1BUF0; // 6. read the cownversion result
} // readADC
void initADC( int amask){AD1PCFG = amask; // select analog input pinsAD1CON1 = 0x00E0; // automatic conversion start after samplingAD1CSSL = 0; // no scanning requiredAD1CON2 = 0; // use MUXA, AVss and AVdd are used as Vref+/- AD1CON3 = 0x1F02; // Tsamp = 32 x Tad; Tad=125nsAD1CON1bits.ADON = 1; // turn on the ADC} // initADC
int readADC( int ch){AD1CHS = ch; // 1. select analog input channelAD1CON1bits.SAMP = 1; // 2. start samplingwhile (!AD1CON1bits.DONE); // 3. wait for the conversion to completereturn ADC1BUF0; // 4. read the conversion result} // readADC
main (){int a; // initialisationsinitADC( AINPUTS); // initialise the ADC for the Explorer16 analog
inputs TRISA = 0xff00; // select the PORTA pins as outputs to drive the
LEDs
// main loopwhile( 1)
{
a = readADC( POT); // select the POT input and convert// reduce the 10-bit result to a 3 bit value
(0..7)
// (divide by 128 or shift right 7 timesa >>= 7;
// turn on only the corresponding LED// 0 -> leftmost LED.... 7-> rightmost LED
PORTA = (0x80 >> a);} // main loop} // main
Then, after adding the pot.c file to the ‘Source File’ and following programmer > select
programmer > 2. MPLAB ICD 2 steps- the programmer has been configured up ( figure 5-1).
Other than integrated MPLAB ICD2 there are external programmers i.e icd2 or PickiT 3 as
well, but MAPLAB ICD 2 has been used because it already is integrated in the Explorer 16
board. Later on the programe is to be programmed to the PIC following programmer >
programme and appear as in figure 5-2
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 31/51
Ashfaque Alam|p10369638
Page 31 of 51
Figure 5-1. Programmer Setting
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 32/51
Ashfaque Alam|p10369638
Page 32 of 51
Figure 5-2. Programming A/D Conversion Code
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 33/51
Ashfaque Alam|p10369638
Page 33 of 51
Afterward, when Built the project following Project > Build All and, with successful
debugging via ICD2 debugging checklist, it is been programmed and been able to show
responses when playing with the on-board potentiometer (red marked in figure 5-3),
moving it from side to side while observing the LED index moving left and rightcorrespondingly. The results are illustrated bellow in figure 5-3.
Figure 5-3. LED position changing with potentiometer variation
As above, the very basic action taken in case of the PIC24 programming has illustrated its
workability on the principle of receiving analog signal from external stimulation and
processing the signal converting into digital and coming out with desired output. Since
the Supervisory pressure control project requires to receive and process a set of analog
data at its very first phase (Chapter 3.2), the principle of A/D conversion to be successful
acquires a very significant advancement on the way of fulfilling the project.
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 34/51
Ashfaque Alam|p10369638
Page 34 of 51
5.1.2 Communicating with GPRS module
Once the PIC managed to receive analog signals from the pressure and flow sensors of
PRV section via the PCI card using RF connector and convert them into digital signal that
is transmittable through physical line, the necessity of transmitting that digital signalthrough RS232 came up, as in the project architecture it requires to be connected to a
GPRS module which is capable of transmitting signals wirelessly to the MTU- using RS232
serial connection ( figure 3-3).
Here the basic principle of transmitting on-board signal through the RS232 has been
demonstrated with example so that another one of the project fragments be trialed. In
embedded control, communication is equally a matter of understanding the protocols as
well as the characteristics of the physical media available. In embedded-control
programming, learning to choose the right communication interface can be as important
as knowing how to use it43
.
According to the PIC24 family datasheet there are two types of communication
peripherals available- synchronous and asynchronous35
. Here in this project the
asynchronous peripheral has been used as because Synchronous communication
peripherals need a physical line (a wire) to be dedicated to the clock signal, providing
synchronization between the two devices whereas in asynchronous communication
interfaces, there is no clock line needed, neither any physical connection; that is why
suitable for wireless communication43
.
PIC24 asynchronous serial communication interface modules are mainly UART1 and
UART2. To demonstrate the basic functionality of a UART (Universal Asynchronous
Receiver/Transmitter) peripheral the Explorer16 demo board has been used here where
the UART2 module is connected to an RS232 transceiver device and to a standard 9
poles D female connector35, 44
. This can be connected to any PC serial port or, in absence
of the “legacy interface” as mentioned above, to an RS232-to-USB converter device. In
both cases, the terminal emulation program Teraterm working as the HMI will be able to
exchange data with the Explorer16 board with a basic configuration setting. These are
known as the communication parameters. As a result of using the fast and convenient
configuration Wavecome M1306B, the GPRS module used here, the communication
parameters are:
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 35/51
Ashfaque Alam|p10369638
Page 35 of 51
Baud rate : 115200 baud
Number of data bits : 8 data bits
Parity bit : No parity
Number of stop bits : 1 stop bit
Handshake protocol : Hardware handshake method using CTS/RTS
Now Using the “New Project Set-up” checklist to create a new project called “Serial” and
a new source file similarly called “serial.c” (process decribed at chapter 5.1.1) by adding
the useful I/O definitions needed to control the hardware handshake lines, the overall
code comes up as follows:
/*** Asynchronous Serial Communication** UART2 RS232 asynchronous communication demonstration code*/
#include <p24fj128ga010.h>// I/O definitions for the Explorer16
#define CTS _RF12 // Clear To Send, input, HW handshake#define RTS _RF13 // Request To Send, output, HW handshake#define TRTS TRISFbits.TRISF13 // Tris control for RTS pin
#define BRATE 34 // 115200 Bd (BREGH=1)#define U_ENABLE 0x8008 // enable UART, BREGH=1, 1 stop, no parity#define U_TX 0x0400 // enable transmission, clear all flags
void initU2( void){U2BRG = BRATE; // initialise the baud rate generatorU2MODE = U_ENABLE; // initialise the UART moduleU2STA = U_TX; // enable the TransmitterTRTS = 0; // make RTS an output pinRTS = 1; // set RTS default status (not ready)} // initU2
int putU2( int c){while ( CTS); // wait for !CTS, clear to sendwhile ( U2STAbits.UTXBF); // wait while Tx buffer fullU2TXREG = c;return c;} // putU2
char getU2( void){RTS = 0; // assert Request To Send !RTSwhile ( !U2STAbits.URXDA); // wait for a new character to arrivereturn U2RXREG; // read the character from the receive bufferRTS = 1;} // getU2
main(){char c; // 1. init the UART2 serial portinitU2(); // 2. promptputU2( ‘>’); // 3. main loopwhile ( 1)
{ // 3.1 wait for a characterc = getU2(); // 3.2 echo the characterputU2( c);
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 36/51
Ashfaque Alam|p10369638
Page 36 of 51
} // main loop} // main
Now, after the normal process of building the project, activating the debugger and
programmer consecutively, generating the programme into the explorer 16 board and
connecting the serial cable to the PC with the teraterm terminal emulator configured
according to the requirements as shown in figure 5-4 & 5-5. In order to configure
teraterm the com port with which the RS-232 cable is been connected has to be
identified by checking “Device Settings” menu from control panel.
Figure 5-4. Selecting the COM port
Figure 5-5. Configuring Teraterm
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 37/51
Ashfaque Alam|p10369638
Page 37 of 51
Once the terminal emulator is properly configured with the written programme
generated into the PIC the teraterm allows to type on the terminal keyboard while
echoing each character back to the terminal screen as illustrated in figure 5-6 bellow:
Figure 5-6. Transmitting character through RS-232
As it has been shown that the programme written enabled the PIC24 to echo the
entered character back to the terminal through RS-232 which also is the medium for this
project to connect the GPRS module to the RTU, thus the principle of communicating
with the GPRS module also been proven workable. Taking the approach as an example
furthure researchers may programme the best possible software that will work exactly
according to the requirement.
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 38/51
Ashfaque Alam|p10369638
Page 38 of 51
5.2 ENABLING HMI
5.2.1 Terminal Set-up
Since the previous section (5.1.2) describes pretty elaborately the configuration of
Teraterm emulator software that is the assigned HMI for this project. For receiving the
transmitted data wirelessly at the control room PC working as the MTU and for
transmitting the data wirelessly from the PIC micro-controller working as the RTU to the
MTU the 2 way wireless medium requires 2 GPRS modules in both ends. Both the GPRS
modules acquire the same communication parameters thus the configuration for both
the devices are to be same.
5.2.2 Wireless communication
The supervisory control system requires receiving and transmitting set points and
instructions. So, the main principle of this transmission and receiving capabilities of the
GPRS module used as the wireless communicator can be shown by sending and receiving
data i.e. text massages using necessary appliances.
After connecting a GSM/GPRS modem to a computer, modem can be controlled by
sending instructions to it. The instructions used for controlling the mobile phone or
GSM/GPRS modem are called AT (Attention Terminal) commands45 which are also used
to control dial-up modems for wired telephone system. Dial-up modems, mobile phones
and GSM/GPRS modems support a common set of standard AT commands. In addition
to this common set of standard AT commands, GPRS modems support an extended set
of AT commands those can be used to control the sending and receiving of SMS
messages.
The very common AT commands those are often used for sending, receiving or saving
the text massage can be found in the Data sheet came along with the Wavecome
M1306B GPRS module that has been used throughout the project46
. Now, inserting a
properly networked SIM (Subscribers’ Identity Module) card into the GPRS modem and
connecting the modem physically to the computer that has a configured terminal
emulator using a specific COM port- the AT command for sending a text to a mobile is
illustrated in figure 5-7 bellow:
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 39/51
Ashfaque Alam|p10369638
Page 39 of 51
Figure 5-7 Sending Text to mobile using AT command
In the Code - by typing AT command and getting “NO CARRIER” back at the beginning,
indicates the interruption in continuous wireless network and again in reply of the AT
command the reply “OK” means the network has been found at last and working
properly. Next, AT+CGMS=”+447876777440” indicates the
AT command assigned for initialising connection to send a
text to a specific number. Later on after a further delay
the “>” indicates the communication to be established
and been waiting for the massage to be typed. After
typing the massage and waiting for a moment came up
with the confirmation indication- “+CGMS: 56” that says
the text has been delivered in the 56th
memory position of
the cell phone46
. Thus the text been received as follows in
figure 5-8 .
Figure 5-8. Sent Text
using GPRS Modem
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 40/51
Ashfaque Alam|p10369638
Page 40 of 51
Again, to demonstrate a two way communication wirelessly the system should be
capable of receiving data or text sent from another mobile. In order to do so, the AT
command set is been illustrated bellow in figure 5-9
Figure 5-9 Receiving Text from mobile using AT command
Here the computer has read a text message from the message storage area and with the
known index at which the SMS text message is located. In this case, +CMGR AT
command has been used. Here the typed command line indicates the unread SMS text
message is stored at index 1 and read it46
.
5.3 DIFFICULTIES FACED & CAUTIONS REQUIRED
A number of problems those have been encountered when programming the PIC micro-
controller, dealing with the GPRS module or configuring Teraterm.
Because of being in need of selecting the right device at first from the list of a
several nearly similar devices the PIC programming process may introduce some
hurdles.
The on-board switch that selects the activity of the board between PIC & PIM
requires always to be in the side of PIC when programming.
The compiler software that has been used to deal with this project is a Student
Version of MPLAB C30 compiler with a limited license permission which should
always bear in mind and should be working in the lab if compiler expires.
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 41/51
Ashfaque Alam|p10369638
Page 41 of 51
The right COM port must be identified when configuring the terminal emulator.
The existing connection is always supposed to be disconnected when dealing
with a new set of instructions in terminal emulator. The interruption may cause
unwanted and strange outcomes which can be confusing in practice. When playing with the GPRS module one thing has been observed that the GPRS
module does not support all the kinds of networks, so that if any one SIM card
turns out to be no working then its better not to be constrain with only one,
rather than trying another sim card from another network provider.
_____________________________
41Jacio, L. D,(2007), Chapter 10: It’s an analog world, Programming 16-bit Micro-controllers in C: Learning
to fly the PIC24, Newnes Publication, Oxford, UK, pp- 141
42Jacio, L. D,(2007), Chapter 10: It’s an analog world, Programming 16-bit Micro-controllers in C: Learning
to fly the PIC24, Newnes Publication, Oxford, UK, pp- 143
43Jacio, L. D,(2007), Chapter 07: Communication, Programming 16-bit Micro-controllers in C: Learning to
fly the PIC24, Newnes Publication, Oxford, UK, pp- 89-91
44Jacio, L. D,(2007), Chapter 08: Asynchronous Communication, Programming 16-bit Micro-controllers in C:
Learning to fly the PIC24, Newnes Publication, Oxford, UK, pp- 109-115
45How to Send SMS Messages from a Computer / PC?, Available at:
http://www.developershome.com/sms/howToSendSMSFromPC.asp [Accessed at 17.03, on 19 May 2011]
46AT Commands Interface: version 8.1, Chapter 9: Short Massage Command, Wavecom Ltd. Pp- 48-65
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 42/51
Ashfaque Alam|p10369638
Page 42 of 51
CHAPTER 6
ANALYSIS AND DISCUSSION
Connecting Supervisory Control System wirelessly may carry on the vulnerability of a
wireless network. Communication between devices can be easily intercepted and
altered especially if it is not encrypted. Outsiders may gain control of the wireless
network and control the devices. Also wireless network are less stable compared to
wired network. One may ask why it is needed to connect on wirelessly even though
there are a lot of issues surrounding it. The answer is, as per the applicative
understanding25
it is because of many advantages it presents.
Wide area connectivity and pervasiveness
Routable Connectivity
Easy to expand
Redundancy and Hot Standby
Large addressing range
Integration of IT to Automation and Monitoring Networks
Additionally, in case of implementation of the model programme important points to be
emphasised on are:
Using Unified baud-rate in all phases.
Being instrumental and keep practicing on various coding techniques.
Staying precise regarding the time management.
Not being constrained only on the given documentations.
In this Chapter
Discussion on security issue.
Analysing limitations and advantages in brief.
Prominent bits of implementation.
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 43/51
Ashfaque Alam|p10369638
Page 43 of 51
CHAPTER 7
SCOPE FOR FUTURE RESEARCH
As per it has been said in the very beginning of this project that, to give the future
researchers a complete guideline of taking this project further to the optimal level is the
most important motto determined, there is no need to say that this particuler project
involves a huge possibility of furthur advencement.
The variables received from the sensors can not only be converted and
trnsmitted but also the signals may be received in a specific strigned order.
The serial communication may be taken advanced to transmit multiple data
strings and conveying them consequently.
The GPRS communication may not only be communicating in duplex but also
being able to connect to the internet for more flexible connectivity and at the
same time the System network can be pin protected for better safety reason.
The technique of data acquisition can be developed further and can turn into a
more accurate method of calculating set-point in the Master Terminal Unit to be
transmitted to the RTU which will provide the Modulo a set point to control the
PRV.
In this Chapter
Lacks of the present design.
Chances of improvement.
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 44/51
Ashfaque Alam|p10369638
Page 44 of 51
CHAPTER 8
CONCLUSION
Wireless Supervisory control system is required in those applications when wireline
communications to the remote site is prohibitively expensive or it is too time consuming to
construct wireline communications. In particular types of industry like Oil & Gas or Water &
Wastewater, wireless supervisory control system is often the only solution due to the
remoteness of the sites. Wireless supervisory control system replaces or extends the fieldbus to
the internet. It can reduce the cost of installing the system. It is also easy to expand. In this paper
an architecture of whole system in wireless mode has been described. The transmission of
communication through the internet, its advantages and disadvantages are also discussed.
So to conclude, it can be said that, the project for designing and implementing a
wirelessly connected supervisory pressure control system has been so far completed
with an excellently clear conventional architecture been demonstrated and with a very
basic overview of being practically developed. In the first phase of describing the ideal
architecture of a wirelessly communicated supervisory pressure control system all the
components along with their on-field applications have been described. Later on in the
development phase the basic principles of all the bits and pieces of wireless supervisory
control system has been described and demonstrated figuratively that, turn this report
into a valuable guideline for the further students or researchers.
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 45/51
Ashfaque Alam|p10369638
Page 45 of 51
REFERENCE
1. Control engineering, Available at: http://en.wikipedia.org/wiki/Control_engineering
[Accessed on: 05.23 am 13 May 2011]
2. Pressure control , (2011), CyberSoft, General Cybernation groups inc. Available at:
http://www.cybosoft.com/solutions/pressurecontrol.html [Accessed on: 05.30 am 13
May 2011]
3. Project Instruction provided the supervisor.
4. Bræstrup. M. W, Andersen J. B, (2005), Pressure control systems, Design and
installation of marine pipelines, Blackwell Science Ltd, Blackwell Publishing Company,
OXFORD, UK, pp- 41
5. Supervisory Control , Available at: http://en.wikipedia.org/wiki/Supervisory_control,
[Accessed on: 02.45 am 13 May 2011]
6. Sheridan, T. B, (1992), Human supervisory control, supervisory control, Tele-robotics,
automation, and human supervisory control, Massachusetts Institute of Technology
Press, USA, pp-01
7. Robels, R. J, Kim, T. H, Advances in Computational Intelligence, Man-Machine Systems
and Cybernetics, Architecture of Wireless Supervisory Control and Data AcquisitionSystem, Multimedia Engineering Department, Hannam University, Korea, pp- 243
8. "Wireless Communication" . Available at:
http://www.sintef.no/content/page1____11881.aspx. [Accessed on: March 2011]
9. Wikipedia "Wireless" , Available at: http://en.wikipedia.org/wiki/Wireless [Accessed on:
01.09 pm 10 May 2011]
10. Maxwell, James Clerk, (1868). On Governors, Proceedings of the Royal Society of
London. pp. 270 –283.
11. Hills, (1996), Power From the Wind , Cambridge University Press
12. Watt’s Governor, Available in:
http://en.wikipedia.org/wiki/Centrifugal_governor#cite_note-0 [Accessed at: 13.53 in
16th
May, 2011]
13. R. Westergaard, (1987), All About Blowout , Norwegian Oil Review, pp- 13-17
14. --- (1987), All About Blowout , Norwegian Oil Review, pp- 81-82
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 46/51
Ashfaque Alam|p10369638
Page 46 of 51
15. Ramadge R. J, Wonham W. M, (1987), Supervisory control of a class of discrete event
processes, SIAM J. Control and Optimization, 25(1), pp. 206-230
16. Supervisory Pressure Control, Available in:
http://en.wikipedia.org/wiki/Supervisory_control_theory [Accessed at: 15.46 in 16th
May, 2011]
17. Sheridan, T. B, (1992), Human supervisory control, supervisory control, Tele-robotics,
automation, and human supervisory control, Massachusetts Institute of Technology
Press, USA, pp-02-03
18. Mikael W. Bræstrup, Jan Bohl Andersen, (2005), Design and installation of marine
pipelines, Blackwall science limited, Oxford, UK, pp- 41-44
19. Common system components, SCADA, Available in: http://en.wikipedia.org/wiki/SCADA [Accessed at: 18.00 in 17
thMay, 2011]
20. AbdelMeguid H., Skworcow P. and Ulanicki B., "Mathematical modelling of a hydraulic
controller for PRV flow modulation", Journal of Hydroinformatics, January 2011 (in
press), pp- 05
21. Wastewater system, Available in: http://en.wikipedia.org/wiki/Wastewater
22. Alam A, (2010), Project Background and Literature Review, Interim report for Wireless
Communication system for supervisory pressure control , pp – 04
23. How a Pressure Control Valve Works, eHow.com, Available at:
http://www.ehow.com/how-does_4898894_how-pressure-control-valve-
works.html#ixzz18LUcUsCF [Accessed at 05.53, on 17 December 2010 ]
24. Bailey D. and E. Wright, (2003), Practical SCADA for Industry.
25. Robels, R. J, Kim, T. H, Advances in Computational Intelligence, Man-Machine Systems
and Cybernetics, Architecture of Wireless Supervisory Control and Data Acquisition
System, Multimedia Engineering Department, Hannam University, Korea, pp- 242-243
26. Robles R. J et al, International Journal of Future Generation Communication and
Networking , Vulnerabilities in SCADA and Critical Infrastructure Systems, Multimedia
Engineering Department, Hannam University, pp- 99-104
27. Difference between PLC and PIC, Available at: http://www.electro-tech-
online.com/microcontrollers/10969-difference-between-plc-pic.html [Accessed at 05.53,
on 17 May 2011 ]
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 47/51
Ashfaque Alam|p10369638
Page 47 of 51
28. Operating instruction, Human Machine interface, Intelligent Motion Systems, Inc, pp-
18-20, Available at:
http://www.faberinc.com/ReferenceMaterials/IMS/IMS_HMI_Manual.pdf
29. Taken from the Project instruction provided by the supervisor.
30. Communication module with GSM or analogue modem, STS, available at:
http://www.stssensors.com/contento/LinkClick.aspx?link=media%2FEnglisch%2FPDF%2
FGSM_120_DED044A.pdf&tabid=74&mid=792&language=de-CH [Accessed at 08.10, on
17 May 2011 ]
31. Dennison R., SCADA System Assessment , Available at: http://www.epgco.com/scada-
system-assessment.html, Accessed: October 2010
32. Pressure Regulator, Available at: http://en.wikipedia.org/wiki/Pressure_reducing_valve
33. Figure taken from: http://webwormcpt.blogspot.com/2008/03/several-impact-of-
backpressure-on.html
34. Modulo Flow Modulated PRV Controller, Available at:
http://www.industrysearch.com.au/Products/Modulo-Flow-Modulated-PRV-Controller-
71462
35. Microchip Explorer 16 development kit, MachinGrid : robots at Work, Available at:
http://www.machinegrid.com/2010/06/microchip-explorer-16-development-kit-hacks/
[Accessed at 11.41, on 17 December 2010]
36. PIC24FJ128GA family datasheet, Microchip, pp- 03
37. GSM modern Wavecom, Available at:
http://www.tradevv.com/chinasuppliers/gprsmodem_p_afc86/china-Gsm-modem-
wavecom-Q2303A-from-quot-HuTong-quot-products.html [Accessed at 12.30, on 17 Dec
2010]
38. Ashok Karavadra, (2008-2009), Interim report for Final year project, Wireless
Communication for supervisory pressure control, pp- 02
39. What is MPLAB IDE? , MPLAB Integrated Development Environment, Available at:
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dD
ocName=en019469&part=SW007002 [Accessed at 13.16, on 17 Dec 2010]
40. Tera-Term home page, Available at:
http://hp.vector.co.jp/authors/VA002416/teraterm.html [Accessed at 13.19, on 17 Dec
2010]
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 48/51
Ashfaque Alam|p10369638
Page 48 of 51
41. Jacio, L. D,(2007), Chapter 10: It’s an analog world, Programming 16-bit Micro-
controllers in C: Learning to fly the PIC24, Newnes Publication, Oxford, UK, pp- 141
42. ---- (2007), Chapter 10: It’s an analog world, Programming 16-bit Micro-controllers in C:
Learning to fly the PIC24, Newnes Publication, Oxford, UK, pp- 143
43. ---- (2007), Chapter 07: Communication, Programming 16-bit Micro-controllers in C:
Learning to fly the PIC24, Newnes Publication, Oxford, UK, pp- 89-91
44. ---- (2007), Chapter 08: Asynchronous Communication, Programming 16-bit Micro-
controllers in C: Learning to fly the PIC24, Newnes Publication, Oxford, UK, pp- 109-115
45. How to Send SMS Messages from a Computer / PC?, Available at:
http://www.developershome.com/sms/howToSendSMSFromPC.asp [Accessed at 17.03,
on 19 May 2011]
46. AT Commands Interface: version 8.1, Chapter 9: Short Massage Command, Wavecom
Ltd. Pp- 48-65
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 49/51
Ashfaque Alam|p10369638
Page 49 of 51
BIBLIOGRAPHY
Alam A, (2010), Project Background and Literature Review, Interim report for Wireless
Communication system for supervisory pressure control.
Jacio, L. D,(2007), Programming 16-bit Micro-controllers in C: Learning to fly the PIC24 , Newnes
Publication, Oxford, UK,
Robels, R. J, Kim, T. H, Advances in Computational Intelligence, Man-Machine Systems and
Cybernetics, Architecture of Wireless Supervisory Control and Data Acquisition System,
Multimedia Engineering Department, Hannam University, Korea
Sheridan, T. B, (1992), Human supervisory control, supervisory control, Tele-robotics,
automation, and human supervisory control, Massachusetts Institute of Technology Press, USA
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 50/51
Ashfaque Alam|p10369638
Page 50 of 51
APPENDIX A
Figure A-1. ADC Module block diagram
Figure A-2. Asynchronous Serial interface block diagram
8/3/2019 Wireless communication system for supervisory pressure control
http://slidepdf.com/reader/full/wireless-communication-system-for-supervisory-pressure-control 51/51
Ashfaque Alam|p10369638
Figure A-3. Simplified UART modules block diagram
Figure A-3. The UxMODE control registers.
Fi A 3 Th U STA t l i t