report_modernization of gas metering station

22
UEC (Pvt) Limited 29-M Civic Centre, Model Town (Ext.) Lahore Web: www.ueccontrol.com Technical Project Report Abstract The purpose of the project is to design and develop smart communication with field instruments. The main objective is to establish a GSM protocol based communication with the instruments. A PLC is used to receive signal of the instruments. The PLC also offers the functionality of GSM communication. Mathematical calculations are performed in the PLC program and alarms are triggered at certain conditions. Two specific functions are introduced to communicate with the instruments. First, the calculated value of the instrument’s parameter value is sent via SMS periodically. Second, SMS on demand i.e. the parameter value is sent when the PLC is requested to respond to provide update about the parameter value via SMS. Additional function of trace functionality is introduced to keep the system protected from cyber and personal privacy. Prepared By: MUHAMMAD IRFAN ALI TARIQ JAMIL WASEEM AKHTER MODERNIZATION OF GAS METERING STATION

Upload: tariq-jamil

Post on 24-Jan-2017

129 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Report_Modernization of Gas Metering Station

UEC (Pvt) Limited 29-M Civic Centre, Model Town (Ext.) Lahore

Web: www.ueccontrol.com

Technical Project Report

Abstract The purpose of the project is to design and develop smart communication with field instruments. The main objective is to establish a GSM protocol based communication with the instruments. A PLC is used to receive signal of the instruments. The PLC also offers the functionality of GSM communication. Mathematical calculations are performed in the PLC program and alarms are triggered at certain conditions. Two specific functions are introduced to communicate with the instruments. First, the calculated value of the instrument’s parameter value is sent via SMS periodically. Second, SMS on demand i.e. the parameter value is sent when the PLC is requested to respond to provide update about the parameter value via SMS. Additional function of trace functionality is introduced to keep the system protected from cyber and personal privacy.

Prepared By: MUHAMMAD IRFAN ALI TARIQ JAMIL WASEEM AKHTER

MODERNIZATION OF GAS METERING STATION

Page 2: Report_Modernization of Gas Metering Station

I

Contents

PROJECT OVERVIEW .................................................................................................................................................. 1

PROJECT DESCRIPTION .............................................................................................................................................. 3

POWER SUPPLY ...................................................................................................................................................... 3

Solar Panel ......................................................................................................................................................... 4

Solar Charger ..................................................................................................................................................... 5

Batteries ............................................................................................................................................................. 5

MEASUREMENT OF PROCESS VARIABLE ............................................................................................................... 6

CALCULATION, CONTROL AND DATA COMMUNICATION .................................................................................... 7

Modular Controller - CMSTRSX ......................................................................................................................... 8

Analogue Input Module - CSINI800 ................................................................................................................... 8

GSM Module - XCGSM ....................................................................................................................................... 9

PLC Configuration Software – Crimson v3.0 ..................................................................................................... 9

Hardware Configuration .................................................................................................................................. 12

Data Tags and Alarms Management ............................................................................................................... 15

Program Code Development ........................................................................................................................... 16

SUGGESTIONS AND RECOMMENDATIONS ......................................................................................................... 19

FUTURE SCOPE ..................................................................................................................................................... 20

Page 3: Report_Modernization of Gas Metering Station

1

PROJECT OVERVIEW

The main objective is to measure the flow of natural gas and send the calculated value of totalized flow

through SMS via GSM protocol.

Summary:

A public sector Oil and Gas company wants to install Electronic Natural Gas Flow Totalizers at two Natural

Gas supply lines (16” and 14” in diameter), 50 km away from its plant site.

There will be one totalizer system for each Gas line and each system consists of the following items:

An electrical power source consisting of a complete solar panel system with two batteries.

A flow transmitter for measuring flow of the Gas.

A controller for calculation of totalized value, manipulation, sending SMS and many other functions.

An Analogue input module, interfaced with controller, for receiving 4-20 mA signal from the transmitter.

A GSM protocol convertor, interfaced with controller, to provide facility of sending/receiving SMS.

Power source is not available at site, therefore, solar panel system along with batteries is required. For each

system, the provided batteries have total rating of 150 Ah and they must provide an effective system backup for

at least 48 hours during unavailability of sunshine.

Flow equation is implemented in both electronic Gas flow totalizer systems to calculate the flow with

highest accuracy. The flow is measured in MMSCF (Millions Meter Standard Cubic Feet). For each system, the

totalized flow value is sent through SMS to the specified mobile phone numbers in the client’s custody. The SMS

is sent in two modes i.e. On Demand SMS and Hourly based periodic SMS. The system also has following SMS

features:

It notifies status of transmitter when the transmitter is OFF.

It notifies status of transmitter when the transmitter is under short circuit.

It notifies status of totalized value along with an alert when maximum of the totalized value is going to be

reached.

Liabilities of UEC

Project will be considered complete only after it is installed, tested and declared fully functional by the

client.

Any damage to equipment during commissioning will be liability of UEC.

One-year functional warranty of complete system will be provided by UEC.

UEC will replace any faulty component, transmitter, power circuit equipment free of cost during warranty

period.

Any other component required, at the time of commissioning, for complete functioning of the system will

be installed at the cost of UEC.

Page 4: Report_Modernization of Gas Metering Station

2

Following figure gives an overview of the project how components contribute to build a perfect system to

fulfill the requirements of the client.

Page 5: Report_Modernization of Gas Metering Station

3

PROJECT DESCRIPTION

Certain components of hardware and software are used for successful implementation. A few of them are

suggested by the client while rest of them is the choice of the service provider. All products being used have

proven quality of performance because main concern is performance of the system. Each component is described

under specific section of the project implementation. Following tabular form gives an overview of the project

components along with their features in scope of the project.

Application Area Hardware/Software Importance

Power Supply

Solar Panel Converts solar energy into electrical energy.

Solar Charger Controls the amount of energy converted for battery charging with better efficiency and extended life of battery.

Batteries Store electrical energy in form of electrical static charge.

Measurement

Flow Transmitter Measure flow of natural gas and generates output signals along with additional calculated data.

Engineering Assistant A software for configuring and monitoring parameters of transmitter.

Calculation, Control and

GSM Transmission

PLC Controller Performs functions and calculation based on received signal from transmitter.

Analogue Input Module

An ADC module to convert received analogue signal (4~20 mA from transmitter) into certain range of digits.

GSM Protocol Module Enables data transmission between controller and GSM protocol based SMS sending/receiving device.

Antenna Improves strength of GSM signals received by GSM module, hence, decreases chances of bad data transmission.

Crimson Software A software for programming and configuration of controller.

Assembling and

Fitting

Pole Provides platform for placement of solar panel system and controller at suitable height above the ground.

Junction Box An enclosure to protect controller from external hazards.

Misc. Hardware Nut, bolts, clamps, wires and terminals etc. used for final assembly to enable hardware operable.

POWER SUPPLY

Power supply is fundamental requirement of any control system because it is fuel to the electronic circuits.

The system requires an electrical power of (maximum 95 W) at rated voltage of 24 VDC. Except solar, no other

source of energy is available at site. Thus a complete solar system is required to fulfill the energy requirements by

the system. A complete solar system consists of solar panel, two batteries and solar charger along with assembling

hardware. The choice of manufacture of hardware may be optional for system installers but in this case, the client

has clearly mentioned the hardware to be used.

The transmitter, controller, analogue input module and GSM protocol module are electrical power

consuming components of the system. Each component has its own maximum power rating, whereas all

components are designed to operate at voltage of 24 VDC.

Page 6: Report_Modernization of Gas Metering Station

4

Following are power consumption ratings of electrical energy consuming components, and calculation of

maximum power consumption of the system. Calculation is based on data provided by respective manufacturer.

𝑆𝑦𝑠𝑡𝑒𝑚 𝑂𝑝𝑒𝑟𝑎𝑡𝑖𝑛𝑔 𝑉𝑜𝑙𝑡𝑎𝑔𝑒 = 24 𝑉𝐷𝐶

𝐹𝑙𝑜𝑤 𝑇𝑟𝑎𝑛𝑠𝑚𝑖𝑡𝑡𝑒𝑟 𝐼𝑚𝑎𝑥 = 48 𝑚𝐴 ; 𝐶𝑜𝑛𝑡𝑟𝑜𝑙𝑙𝑒𝑟 𝐼𝑚𝑎𝑥 = 3.5 𝐴 = 3500 𝑚𝐴

𝐺𝑆𝑀 𝑃𝑜𝑟𝑡𝑜𝑐𝑜𝑙 𝑀𝑜𝑑𝑢𝑙𝑒 𝐼𝑚𝑎𝑥 = 125 𝑚𝐴 ; 𝐴𝑛𝑎𝑙𝑜𝑔𝑢𝑒 𝐼𝑛𝑝𝑢𝑡 𝑀𝑜𝑑𝑢𝑙𝑒 𝐼𝑚𝑎𝑥 = 100 𝑚𝐴

𝑇𝑜𝑡𝑎𝑙 𝐶𝑢𝑟𝑟𝑒𝑛𝑡 𝑑𝑟𝑎𝑤𝑛 𝑏𝑦 𝑠𝑦𝑠𝑡𝑒𝑚 𝐼𝑚𝑎𝑥 = 3773 𝑚𝐴 = 3.773 𝐴

𝑅𝑎𝑡𝑒𝑑 𝑝𝑜𝑤𝑒𝑟 𝑜𝑓 𝑠𝑦𝑠𝑡𝑒𝑚 𝑃𝑚𝑎𝑥 = 3.773 × 24 = 90.552 ± 5% 𝑊

𝑀𝑎𝑥𝑖𝑚𝑢𝑚 𝑝𝑜𝑤𝑒𝑟 𝑐𝑜𝑛𝑠𝑢𝑚𝑒𝑑 𝑏𝑦 𝑡ℎ𝑒 𝑠𝑦𝑠𝑡𝑒𝑚 𝑃𝑚𝑎𝑥 = 95 𝑊

Total capacity of batteries (Suggested) = 300 Ah

Minimum backup Time of system supply (client’s demand) = 48 hrs

Thus, 𝑀𝑢𝑥𝑖𝑚𝑢𝑚 𝑐𝑢𝑟𝑟𝑒𝑛𝑡 𝑑𝑟𝑎𝑤𝑛 𝑏𝑦 𝑆𝑦𝑠𝑡𝑒𝑚 𝐼𝑚𝑎𝑥 = 95 𝑊

24 𝑉= 3.96 𝐴

If overall capacity (Discharge reserve capacity + Efficiency) of batteries is assumed to be 75% of the rated capacity,

then

𝑁𝑜 𝑜𝑓 𝑏𝑎𝑐𝑘𝑢𝑝 ℎ𝑜𝑢𝑟𝑠 𝑓𝑜𝑟 𝑎𝑣𝑎𝑖𝑙𝑎𝑏𝑖𝑙𝑖𝑡𝑦 𝑜𝑓 𝑠𝑦𝑠𝑡𝑒𝑚 𝑠𝑢𝑝𝑝𝑙𝑦 = 300 𝐴ℎ × 0.75

3.96 𝐴= 56.81 ℎ

𝑁𝑜 𝑜𝑓 𝑏𝑎𝑐𝑘𝑢𝑝 ℎ𝑜𝑢𝑟𝑠 𝑓𝑜𝑟 𝑎𝑣𝑎𝑖𝑙𝑎𝑏𝑖𝑙𝑖𝑡𝑦 𝑜𝑓 𝑠𝑦𝑠𝑡𝑒𝑚 𝑠𝑢𝑝𝑝𝑙𝑦 = 54 ℎ 48 𝑚𝑖𝑛

Solar Panel

One solar panel, for each site, with rated capacity of 255 W. The OEM reference product ID is AXITEC AC-

255P/156-60S. AXITEC has proven quality of solar panel with following key features:

Guaranteed positive power tolerance of 5 Wmax by individual measurement.

Maximum tolerance of snow load of 5400 Pa.

Guaranteed inspection of electroluminescence with 100% assurance.

AXITECT-Soft-Grip-Seam aluminum frame construction provides high stability.

High quality junction box and connector system.

Multiple panel sorting flexibility w.r.t. I(max)pp without affecting efficiency and

performance of individual panel.

12 Years warranty by OEM.

Page 7: Report_Modernization of Gas Metering Station

5

Solar Charger

PHOCOS MPPT 100/30 solar charger is a high qualified product with built in advance technological

functionalities to provide flexibility of intelligent charging mechanism with following additional key features:

Maximum-Power-Tracking technology “MPPT-Tracker” ensures maximum performance from solar array

at all times and under all weather conditions.

It is Capable of up to 30% energy gain from solar PV array.

It is highly adaptable for up-gradation of system capacity because maximum

of 8 MPPTs’ parallel operation provides flexibility of system up-gradation

without replacement of MPPTs.

For multiple MPPTs, the central unit provides intelligent charging regulation

through data bus.

It provides 3-stage charging algorithm with temperature compensated I-U

curve even under condition of multiple MPPTs, thus providing maximum life

span to the batteries.

Batteries

One pair of NPG150-12 dry batteries with overall capacity of 300 Ah at 24 VDC. Each battery is designed

to provide electrical power at rated voltage of 12VDC. Both batteries are connected in series to get overall voltage

of 24 VDC. Its negative plate is made of flat pasted grid; positive plated is made of Lead Calcium flat plate grid and

electrolyte is made of Sulphuric acid. Following are the characteristics of a NPG150-12:

Non-spill-able with assurance of spill-proof and leak proof.

Mani-folded gassing system with low gassing on float charge.

Operation at low internal pressure increases level of safety.

Fully tank formed plates with valve regulated catalyst.

Great for deep cycle applications.

Shock absorbent thick wall polypropylene case provides internal

protection against external forces.

Perfect sealing allows its operation in virtually any position (upside-

down is not recommended).

Recombination reaction prevents escape of hydrogen and oxygen

gases normally lost in flooded lead-acid batteries.

Hybrid Gel batteries are basically valve regulated lead acid (VRLA) batteries with a crossbreed of GEL and

AGM technologies blended together.

A slow self-discharge rate, plus its capability of recovery after deep discharge, makes it ideally suited for

seasonal or infrequent use.

Aimed directly at the marine, recreational vehicle and solar market, this technology provides better

service life, especially deep cycle life and high rates of discharge compared to standard batteries.

Page 8: Report_Modernization of Gas Metering Station

6

MEASUREMENT OF PROCESS VARIABLE

In order to measure the flow of gas, an instrument is required to do this job. Rosemount 3051S

Multivariable transmitter is an ideal instrument with best accuracy and efficiency under various environments. It

delivers unprecedented performance and capabilities by providing three separate measurements in one simple

easy-to-use solution with a significant reduction in installation cost.

The multivariable transmitter has built-in mechanism to

measure gas flow by creating differential pressure. It has additional

input of temperature sensor for temperature compensation to get

better accuracy in results. The transmitter provides the high DP flow

accuracy over the widest operating range by dynamically calculating

all flow equation coefficients in real time, including discharge

coefficients, velocity of approach factor, thermal expansion effects

and density.

The fully compensated flow equation reduces the sources of traditional DP flow uncertainty, thereby

providing a more accurate flow calculation. It uses a fully compensated equation from mass flow through any

differential producer.

The compensated mass flow equation used by 3051S transmitter is

𝑄𝑚𝑎𝑠𝑠 = 𝑁. 𝐶𝑑 . 𝐸. 𝑌1. 𝑑2. √𝐷𝑃(𝜌)

Where,

Qmass = Mass Flow Y1 = Gas Expansion Factor

N = Units Conversion Factor d2 = Bore of differential producer

Cd = Discharge Coefficient DP = Differential Pressure

E = Velocity of approach factor 𝜌 = Density

The transmitter produces electrical signal in correspondence to value of flow. Its electronic circuit

operates on 24 VDC loop powered mechanism and generates analog DC current output of 4~20 mA along with

capability of data transmission digitally through HART protocol.

In order to configure set-points and other parameters, troubleshooting and diagnostic purposes, a

configuration software is required. Engineering Assistant is a configuration software and it supports Rosemount

transmitters’ full functionalities.

The 3051SMV Engineering Assistant software is designed to configure a 3051S multivariable transmitter.

It provides user friendly interface and select and apply facility to resolve complexity in setting the parameters. Its

built-in functions for flow calculation reduces errors commonly made by engineers. This facility reduces

commissioning and troubleshooting time. The flow configuration screens allow the user to specify the fluid,

operating conditions and information about the primary elements including the inside pipe diameter.

Page 9: Report_Modernization of Gas Metering Station

7

The software saves all static parameters and send it to the transmitter to update parameters and settings

in the transmitter. Following flow chart illustrates the steps how Engineering Assistant provide facility to the user

to configure parameters of the transmitter. Additional screens and steps may be required depending upon the

selection of type of the process variable e.g. composition of gas and fluid properties.

CALCULATION, CONTROL AND DATA COMMUNICATION

The output of transmitter (4~20 mA signal) is associated with the instant flow of the gas instead

accumulated flow. Thus a manual calculation is required to get accumulated flow. The transmitter’s signal update

cycle time is very critical parameter because incorrect value of update cycle may lead to inappropriate results.

Rosemount 3051S is set to update its signal periodically at each second of time elapsed.

Red Lion’s controller CSMSTRSX is used to perform calculation and control tasks. Its analogue input

module CSINI800 is used to receive output signal of the transmitter. The analogue input module performs ADC

(Analogue to Digital Conversion) and its output values in digits are used for further calculations. The controller

calculates the value of accumulated flow of the gas and send it to the authorized person through SMS. GSM

protocol module XCGSM provides facility of communication between controller and GSM service provider. A SIM

(Subscriber Identity Module) is inserted in GSM module, provided by GSM service provider for unique identity to

get GSM services.

Page 10: Report_Modernization of Gas Metering Station

8

Modular Controller - CMSTRSX

The model CMSTR is a communication and control platform

designed for use with modular controller series slave modules. It

uses a proprietary high speed serial protocol to communicate, via

backplane connection, with up to 16 slave modules. Power is

supplied to modules through the backplane connection. An

extensive list of master and slave protocol drivers are available to

allow the CMSTR to share and exchange variable data with external

devices. It has the same standard functionalities like other

controllers, however, following are its main features:

Adaption to PLC, DCS and SCADA systems, through high-speed RS232/485/422 and Ethernet

communication port.

The 10 Base-T/100 Base-TX Ethernet port facilitates high speed connectivity for data sharing with large

SCADA systems.

Virtual HMI features allows creation and control of HMI from any networked PC.

Facilitates GSM and many other communications with additional installation of option cards.

An onboard Compact Flash slot provides option for storage of Master’s built-in data logger.

Analogue Input Module - CSINI800

The model CSINI800 is an analogue input card and performs functions

of ADC conversion. It is a 16-bit analogue input module i.e. it converts 4~20

mA analogue signal into equivalent decimal value of 0 ~ 65535. The module

provides high-density signal measurement for data-acquisition applications.

Internal power management of modular controllers allows the

modules to be replaced even when power is ON, thus reduces the downtime.

There is no need to configure module after replacement because all

configuration information is stored in both i.e. the module and the master

controller.

Its replacement and interfacing with master controller, is very flexible and it is like plug and play system.

Its high density packaging and DIN rail mounting capability saves time and panel space. The backplane connection

provides power and communication to the module and snaps easily onto standard top hat (T) profile DIN rail.

Page 11: Report_Modernization of Gas Metering Station

9

GSM Module - XCGSM

GSM (Global Service Mobile) / GPRS (General Packet Radio Service)

is the most dominant cellular technology in today’s market. GPRS can be used

for services such as WAP (Wireless Application Protocol) access, SMS (Short

Message Service) and for Internet communication services such as Email and

WWW (World Wide Web) access. GSM Service-Provider provides SIM

(Subscriber Identity Module) card which securely stores the service-

subscriber key – International Mobile Subscriber Identity (IMSI) - used to

identify a subscriber and allows connectivity with the network to obtain an

IP address from the service provider.

The XCGSM option card allows the user to add GSM/GPRS cellular

modem capability to their Data Station Plus or Modular Controller. It is a quad-band capable of working under

frequency 850/1900 and 900/1800 MHz bands. USA and Canada work in 850/19900 MHz whereas Europe, Middle

East, Africa and major of Asia work in 900/1800 MHz frequencies. A SIM card (provided by client) is inserted in the

holder prior to installation of XCGSM module. A blank cover on master controller is replaced with XCGSM with hot

swap and plug & play installation flexibility. Its configuration is easy using Red Lion’s configuration software

(Crimson v3.0).

PLC Configuration Software – Crimson v3.0

In order to perform certain described functions by the controller, it must be configured to provide such

service. A configuration software is required to set parameters and assign values to memory locations of the

controller while configuration is performed. Red Lion offers a freeware software “Crimson v3.0” to handle tasks

regarding controller configuration, diagnostics and troubleshooting.

Page 12: Report_Modernization of Gas Metering Station

10

Crimson is a programming software for CSMSTRSX, CSMSTRGT, CSMSTRV2 and Data Station Plus products of

Red Lion. It is also used for programming Graphite G3 and G3 Kadet series of the operator panels. Its features of

C-Programming language and code assignment to properties of parameters provides simple application to setup

configuration with very less time investment. It is a remarkable programming platform delivering a powerful set

of drag-and-drop configuration, display, control and data logging tools. It is designed specifically to take full

advantage of Red Lion’s product architecture.

An extensive menu of built-in, point-and-click serial and Ethernet drivers map controller data to PLC

registers in seconds. Communication drivers know how to talk to PLCs or SCADA systems, hence, no additional

code is required to setup communication. However, following are main features:

Built-in gateway and protocol convertor to communicate with any Ethernet protocol based device.

Multilingual support capability lets OEMs use a single database for global markets.

Provides direct access to many internal Red Lion product features such as Read/Write SD card,

management of serial ports and establishing TCP/IP connections to extract data from websites or create

custom interfaces to unique products.

Built-in complete library of over 5,000 industrial graphics reduces SCADA design time.

Built-in emulator for testing user interface, data logging and even the web server.

C-Program provides flexibility and ease for calculation of complex mathematics and many more features.

It scans continuously scan properties of data tags and executes the code, hence, data tags are not only

used for storing data values but they can also be used to execute functions only.

Page 13: Report_Modernization of Gas Metering Station

11

Following flow chart show steps to achieve final implementation of the project

Page 14: Report_Modernization of Gas Metering Station

12

Hardware Configuration

Connection setup of programming device with Red Lion controller is very easy and it can be implemented

using USB host. An improper selection of interface of programming device with the controller, may lead to failure

in communication of programming device with the controller. The programming device must have installed

Crimson software in it. In Crimson software, interface selection can be performed by selecting Option in Link

menu in the menu bar as shown below.

Red Lion XCGSM communicates with Red Lion modular controller via RS-232 internally configured in the

form of Option Card. XCGSM can be configured using following steps:

Select Communication tab in the left Navigation Pane.

Page 15: Report_Modernization of Gas Metering Station

13

Select Cellular modem drivers for SMS services. This enables communication between controller and

XCGSM module. After this, Asian frequency range 900/1800 MHz and standard baud rate of 9600 is

selected.

After GSM communication is enabled, the controller should be capable of sending/receiving SMS.

This functionality can be enabled by enabling SMS service. SMS service can be enabled by enabling Mail Manager

under sub-category Services in Communication section on the left navigation pane. In the address column,

authorized contact numbers (e.g. 92334XXXXXXX) without “+” sign, are added to which the controller

communicates through SMS. The authorized contact number must belong to the device with functionality to

process SMS services. The controller will be unable to send/receive SMS until the option “Transport Mode” and

“Message Relay” are enabled under SMS tab in Mail Manager.

Page 16: Report_Modernization of Gas Metering Station

14

Analogue input module is configured by adding module in the last tab of the left navigation pane. Select

CSINI8 module and select parameters as shown in figures below:

At each second, the AI module scans 4 ~ 20 mA signal on the selected channel and converts it into

equivalent numeric value. The output value is stored in a numeric data tag for further processing. The transmitter

loop circuit must be connected to the configured channel. The maximum flow of the Gas (flow value provided by

client (say 85 MMSCF) is set and the transmitter generates analogue output signal for this range. The process

value is set to maximum limit 85% which means full-scale range of the ADC output is scaled accordingly.

Page 17: Report_Modernization of Gas Metering Station

15

Data Tags and Alarms Management

Data tags can be accessed in Data Tags section on the left navigation pane. Data tags are internal memory

reservoirs to store data values permanently in the controller. These values can be modified, reset or erased. There

are different types of data tags each with its own functionality. These can be used to store content in different

data type format, trigger alarm and contents of received SMS. All data tags are secured with password to provide

protection against unauthorized access. There are six data tags out of which three are numeric type, fourth is Time

& Date data type, fifth is string data type and the last one is binary data type.

1. First numeric data tag “Totalizer_PV” is a non-retentive memory storage i.e. numeric value will be erased if

the controller is no more powered up. This tag is mapped with the analogue input module. Hence, after ADC

conversion by AI module, the numeric value is stored in this tag for further processing. The numeric value in

this tag is updated after each second.

2. Second numeric data tag “Accum_Flow” is a retentive data tag to store accumulated value of the flow. This

floating point tag is updated at each second. The value in this tag is sent in SMS, although there is no need to

append units of measurement (Millions Meter Standard Cubic Feet) in SMS because it is already understood

by the SMS reader. As soon as accumulated flow value at its maximum limit (999999.9999, it triggers an alarm

to set alarm flag. The SMS content is appended with the alert that totalized value has reached its maximum

limits and the accumulator is going to be reset.

3. The third numeric data tag “t_psec” is non-retentive integer type data tag to store time value in seconds. This

value is considered as the value of previous second. Every time the numeric tag “Totalizer_PV” is updated, it

checks whether a Second of time has been elapsed or not. This is done by comparing current time value - the

time value at which the AI module generates its ADC output- with the time value stored in data tag “t_psec”.

After each second of timer interval, the value of totalizer is added in the accumulated value.

4. The Time & Date type data tag “Interval_chk” is used as to execute function for periodic sending of SMS. The

SMS is sent to the client after each hour of standard clock time. The program code in this tag is used to check

Page 18: Report_Modernization of Gas Metering Station

16

whether an hour has been elapsed or not. After each hour, SMS contents are updated and an alarm is triggered

which requests GSM module to send SMS.

5. The string type tag “SMS_CONTENT” is used to store SMS contents in text format. This tag can be updated by

different functions i.e. for periodic SMS and On-demand SMS. All data types in SMS content are converted

into string data type before sending to this tag.

6. The flag tag “ALM_SND_MSG” is used to send SMS. Every time it is triggered ON, it sends the SMS to the

specified client in the “Mail To” property. The alarm is reset automatically after it has been activated. The SMS

in sending status is sent even after the alarm has been reset.

Program Code Development

Although programming code is in C-language, however, it is not lumped at single place. Furthermore, it is

distributed and location of code depends upon the function required and its triggering conditions. Overall, the

program is distributed and placed in different properties of tags. There are a lot of built-in functions to perform

calculation, conversion of data types and to get status of controller hardware parameters.

Calculation of accumulated value of totalized flow of gas is very simple. After each second of time interval,

the scanned value of flow is added in the accumulated value of totalized flow. The following equation is applied

for calculation purposes.

𝑇𝑛 = 𝑇𝑛−1 + ( 𝑡𝑐

𝑡𝑟 ) . 𝑋

Page 19: Report_Modernization of Gas Metering Station

17

Where,

Tn = Current value of Gas Totalized Flow (MMSCF)

Tn-1 = Previous value of Gas Totalized Flow (MMSCF)

X = Current value of Gas Flow (MMSCF/day)

tc = Cycle Time of AI module output (Seconds) = 1 s

tr = Reference Time (seconds) = 1 day = 86400 s

Following flow chart illustrates process for periodic update of accumulated flow value:

The equivalent C-program is added in the “On Write” property under “Data” tab of numeric data tag

“t_psec”. After each second, the new value of time is written in this tag and at the same time accumulated flow

value is updated.

Although there are two types of functions to send SMS i.e. SMS on demand and SMS after each hour clock

time. For an hourly base SMS, it is sent to the client after each hour of standard clock time. The controller scans

current time, at its processing speed and checks whether an hour has elapsed. If yes, the value of accumulated

flow along with time is updated in SMS content and the alarm flag is activated. This requests the GSM module to

send SMS content to the client.

Page 20: Report_Modernization of Gas Metering Station

18

A good signal strength of GSM is checked before sending SMS. This check ensures diagnostic capability by

provoking alert to the client. If the client doesn’t receive SMS after an hour, he must ensure healthy working of

the system at site. However, this is rare case with least probability of few occurrences per year.

For On Demand SMS services, the incoming SMS is stored in internal data tag in On Message property

under SMS tab in the Mail Manager. The message content is scanned and checked whether the client has sent

pre-defined key-code (STATUS). If yes, the controller updates SMS content containing accumulated flow value and

clock time. After that, alarm flag is triggered to reply the SMS. The incoming SMS contains contact number along

with predefined key-code separated by colon e.g. 923344######:STATUS.

Following flow chart represents processing of GSM services:

Page 21: Report_Modernization of Gas Metering Station

19

SUGGESTIONS AND RECOMMENDATIONS

Privacy protection becomes an important factor where communication is involved. Moreover,

communication without flexibility may lead to undesirable limitations. Although, the controller responds to the

key-code “STATUS” and it sends totalized flow value to the authorized contacts. Following are limitations with

supportive arguments.

1. Vulnerability to Universal Contacts: The controller replies to SMS, with content “STATUS”, from any

contact; it doesn’t matter whether the contact is authorized or unauthorized. However, it always sends

data, in reply to SMS, to the authorized contact.

2. No Flexibility to Modify Key-Code: Once key-code is no more private, the authorized contact will be

unable to change the code. Hence, reconfiguration of the controller is required to change the code.

This first limitation is cause whereas the second limitation is the effect. No doubt, the authorized contact has

authority to send SMS to the controller, as many times as it is required. Although, key-code is private to the

authorized contact but it may be no more private due to certain mistakes or ignorance. Once, the key-code is

leaked, the authorized contact will be vulnerable to receive undesirable repetitive responses from the controller.

Thus, the authorized contact must have authority to change key-code so that no re-engineering work is required

to reset the key-code. Additional feature of trace functionality can also be introduced so that the authorized

contact can trace the unauthorized contact. The following chart illustrates this strategy:

Page 22: Report_Modernization of Gas Metering Station

20

FUTURE SCOPE

Modernization of Gas Metering System is one of emerging technology in smart industrial system. Its smart

technology to communicate with field instruments makes it highly adaptable to smart industrial system. Although

it is costly for single instrument but for multiple instruments it provides high reliability to communicate with GSM

devices anywhere and at any time. Moreover, its features can be enhanced for multiple instruments, with a little

modification in the program. Oilfield, Gas Plants and many other industrial plants with instruments installed at

remote site are best to use this technology. This reduces cost of cabling, material, diagnostic and power

consumption. Monitoring and record keeping time is also saved by more than 70 percent.