UML based Formal Model of Smart Transformer Power System

Recently many significant improvements have been done in traditionally power system. But still a lot of work is needed in traditional power system to mend many challenges. We propose formal method based on subnet model for smart power system. Formal method is mathematics based technique that is used to develop, specify and verify model in a systematic manner. It involve components i.e., power plant, smart grid, transformer and smart meters. Power plant produces electricity and then distributes it to the smart grid. Smart grid generates electricity to transformers and then transformers transfer electricity to smart meters. Smart transformers and smart meters are deployed inform of subnets that increase the energy efficiency of smart power system. In this paper our main focus is on two components of smart power system that is transformers and smart meters. Graph theory is used for the semi-formal representation of model. In this paper we present system requirements through UML use case diagrams that are used to describe actions of system and then real topology is transferred into model topology in graph theory that is used to represent the structure of system. Mathematical technique and notation based formal method approaches are used for describing and analyzing the system. VDM-SL formal method language is used for formal specification and VDM toolbox is used for the verification and


I. INTRODUCTION
Smart Environment changes the life style of people and improves their behavior.It also changes mental and physical challenges of people in a physical environment.In smart environment everyone has an adequate amount of awareness and information about their different resources like smart system, smart devices, and cloud networks and so on.Today everyplace is going to be smart like smart building, smart House [1], smart city, smart hospital, and smart university as well.For this resolution smart power system is the only basic requirement.Smart city involves infrastructure smart transport, smart hospital, smart market and smart power system [2].These all components of a smart city are becoming smart that in result making a city smart.The smart building provides better air quality and security, connected to other buildings, provide connection to latest technology, smart grid and global environment [3].Respectively in smart hospital smart power system plays an essential role in providing electricity to the hospital requirement.Smart power system or smart energy is the basic need in all smart places.Smart power system is a significant component / infrastructure for the development and establishment of smart city, smart building and any smart place.To address this issue we have focused to design a model on the components of smart power system.Currently energy consumption is a growing problem all over the world.Everyone recognizes that energy is a scarce resource.It is a basic human need.It is noticed that electricity usage has been increased 50% over last 30 years [4].Therefore, there is need to preserve valuable resources and transfer them to consumer in a better way.The smart power system changes the traditionally power system and it makes the power grid more resourceful, consistent, integrate and secure resilient and sustainable system [5].Electricity is basic requirement all over the world.The increasing interest on this topic stimulates us to develop a formal method based on subnet model for the components of power system.In this paper our main focus is on two components; smart meter and transformer.Smart grid generates power to transformers and then transformers transmit power to smart meters.In Smart grid microcontroller is attached which monitor all connected transformers and meters.Smart meters can communicate through microcontroller to smart grid and transformers.Transformers transmit power to smart meters through electrical pole.Transformer microcontroller controls and manages transformer capacity and loads limit.It generates notification or alarm when load is exceeding maximum capacity of transformer and send warning message to grid to overcome the load otherwise it will be tripped or burned.Smart meters involve the features like smart payment, automatically and periodically meter reading, microcontroller, automated theft detection and user communication.Monitoring and continuous reading of smart meter automatically leaves no chance behind of stealing because meter reading is record on two locations.It will forecast and determine the demand when demand will increase or decrease.Through microcontroller it communicates with users and provides up-to-date information to users about their electricity on their mobiles through message and call.Smart meter provides the facility of smart payment which mean user can use prepaid units and it automatically send message to customer when less units are left and also notify to recharge their units.Smart meter also control the power of consumer through controlling their units limit.If the consumer cross the www.ijacsa.thesai.orglimit it send warning message to consumer that your current load exceeded the limit please check your attached devices.It also determine the peak load time.Through notification it alerts the consumer that at the moment their current unit charges are casting double.In this paper we present our model requirements in UML use case, integration of graph theory to represent model topology and formal method are used as well for the specification of system.In graph theory we represent the model topology and it includes edges, subnets and junctions.To prove the correctness of our model we implement this model in formal way using VDM-SL language.We have analyzed, verified and validate system through VDM-SL tool box.The formal method technique is used to represent system possessions in mathematics.They provide a structure in which developers in methodical manners can specify and develop their system.This paper consists of following sections: Section 2 represents related work, in Section 3 model of system are explained, model is transferred in graph model in Section 4, UML use cases are presented in Section 5, formal specification is given in Section 6 and in Section 7 formal analysis with results and in the last conclusion.

II. RELATED WORK
Papers based on smart meter discuss their issues and challenges.Most of them discuss their issues, consumer and supplier problems, security [6] and privacy issues [7].We along with these issues and better ways of their solutions addressing and solving the issue of smart payment that is not discussed before in all these papers.Some papers describe smart meter communication technologies to communicate the meter to grid and other smart devices [8] in different papers of smart metering involves smart meter infrastructure ,their privacy and security issues, demand and response and their assessments, monitor and control methods and design smart meters [9], [10].To address all these issues we attached microcontroller in smart meters that provide feedback to consumer, communication to user, send messages and notification to user which help to control power consumption.Through feedback we can change the long term behaviors of users regarding power consumption [11].Smart meters are reading monitor continuously and automatically in two locations in smart meters and also in smart grid.Through meter reading it checks continuously meter units when units cross the limits it send warning message to consumer to control power consumption.We also control the load capacity of transformer to control the burning or tripping of transformer.Some of the research papers are using different formal methods like Ada, Z notations and VDM [12,13] to specify their system.In different papers formal method has been used for different system like traffic management system [14] and hospital management system.In this paper UML (unified modeling language) diagram is used to gather system requirements and to show the user and system interaction [15], [16].We used graph theory to represent model topology and in addition we used formal specification of system in VDM-SL to prove the correctness of system.In this paper critical component of railway are formalized.For critical component of moving block interconnecting Z notation is used and model topology is represented in graph theory [17].Railway tracking is distributed critical system and it risks so high because its failure may cause server injuries, loses of money and loss of human life.For this complex system VDM,Z notation is used by author for this complex system [18].In this paper railway crossing is analysed which is component of moving block interlocking system.For the safety requirements of train petri net formalism is used for modeling and to verify the correspondence between crossing an (PN)representation reachability graph is used [19].For the static component of model using graph theory and are then integrated with VDM-SL for the specification to prove the correctness of system it is analyzed by using VDM tool box.Some of other related works based on VDM formal method bring into being in these papers [20]- [22].

III. MODEL FOR SMART TRANSFORMER POWER SYSTEM
Today the life style of people has been changed and everyone wants to live in smart environment or smart places.Everything is going to be smart therefore to develop a smart environment or smart place demand of electricity is also increased.People are using more devices and appliances in their homes and they don't have any information about electricity they are consuming.Electricity is a scarce resource all over the world and it is basic necessity of human life.Therefore it is responsibility of every human to save electricity as much as possible.To address this issue we purposed a model for smart power system in which our main focus is on smart meters and transformers.
Smart meter is an endless user communication module towards too smart grid.It is an important component of our model.Smart meter accurately capture the power consumption of houses and sending meter readings to the smart grid.microcontroller is attached which monitor all operations of smart meter like it monitors the meter reading continuously, check balance, control limit and so on.It provides the communication to consumers in a sense it send messages to consumer about alerts and notification of their electricity consumption.Through microcontroller users alert message when their power consumption of devices is increased on daily routine and it also specify that which devices are ON at this time.It also send message to consumer that unit rate of power will be charged double when peak load is high.This info will help the users to reduce their load and as a result less power will be consumed and in result consumer will pay low billing rate.In smart meters payment will be smart means consumer can use prepaid cards for the payment of power units .It will generate message that few power units are left please recharge.Your smart card meter will be monitored at two locations one is smart meter microcontroller and other location is smart grid microcontroller so no chance of theft remains behind.Smart meter provides two way of communication.It receives the demand of consumer and send it to the supplier and consumption of power is also send to supplier.It receives info from supplier/smart grid and then send it to consumer.Through smart meter consumer will collect all knowledge and information about their appliances and power consumption.Through this they can manage and control their power and save their electricity.Smart meters are attached to transformers and they transmit power through electrical wires to smart meters.Transformers transmitt power www.ijacsa.thesai.org at the define limit which they receive from grid.We control the capacity of transformer by defining their limit.When the power exceed the limit, a notification generate by transformer microcontroller exceed the power of transformer and control the load or shutdown the transformer, otherwise it will be tripped or burned.Electricity will be provided in every area by adding more transformers which are then connected to smart grid.

IV. SUBNET BASED GRAPH MODEL FOR SMART TRANSFORMER POWER SYSTEM
Graphical representation is moreover there via graph theory [23].In graph model showing system nodes, edges, subnets and junctions.In our system we focus on two main module smart meters and transformers.Smart meters are attached to transformers.One smart meter is attached at only one house.That smart meter will keep all information of power consumption of that house.One transformer will supply power to many smart meters through power lanes so in graph model we represent it in subnets.A subnet consists of transformer and smeter nodes.Smeter nodes through junctions connected to transforners nodes.Transformer supply power to smart meter through lans.One transformer connect to many lans and on lans we define junctions through meters are connect.Through one junction we can acess all meters of lan.All subnets connected to smart grid.In transformer module junctions are connected to transformer and all smart meters are not directly connected to edges transformers.Any smmeter can acess easily and can get all their information.Smart meters are connected to junctions and junctions are connected to nodes of transformers.Similarly transformers subnets are connected to smart grid.In Fig. 1 M in pink circle are meter nodes which are connected through yellow circle which are junctions attached to T transformer nodes.Many meters are attached to one transformer through many lanes.Similarly one main lan to derive multiple lanes.Through one lane many smart meters are attached.For multiple lanes we develop it in graph subnets.Through junctions smart meter is attached to transformer after graphical model system is formalized in formal method language VDM-SL to specify the system.Formal methods are the techniques based on basically mathematics.These are used to represent the system properties in a systematic way to prove the system correctly through this we can identify system problems, errors and after that we can develop better system.

V. UML USE CASE MODEL FOR SMART POWER PLANT
Unified Modeling Language is a broadly useful indicative language which is used as a standard approach to visualize a system.A UML consists of sequence of steps and activities to achieve a specific target of system [24].UML uses case diagram actor and use case are also used.Actor is any system or person and use case is functionality perform by actor.In our system we focused on smart meter and transformer that's why we represent the use case of smart meter and transformer.Smart meter and transformer actor performing the following activities or functions as well.Fig. 2 is a usecase in which smart meter is an actor and performing following actions.Smart meters used smart payment system.It controls the load limit and microcontroller is attached in it that is used for user communication.It records the automatic and continuous smart meter reading.
In Fig. 3, smart transformer is an actor and performing the following actions.It received power from smart grid and transmit it to smart meters In smart transformer microcontroller is attached that is used to control the transformer capicity.

VI. FORMAL SPECIFICATION OF SYSTEM
For the implementation of system we describe our system in formal specification using VDM-SL language.The functionality of our system is formally modeled by using VDM-SL language.For the verification and validation of our system we use VDM-SL toolbox.Topology of model is demonstrating in the form of graph.Firstly we describe the specification of smart meter.To implement the system we will take different variables and also define its type.ID of every meter is token.MR is denoted as composite object which is meter reading in which three fields are defined as meter reading, message and meter ID.Message type defines as sent or received.Means message can be sent or received.Mobile is denoted as a composite object and it consists of three fields mobile id, message and call.Meter is described as composite object which consists of nine objects.First field meter id and every meter has unique id.Second field is meter units that determine consumed units of consumer.Third field id units rate through which we can calculate the bill, fourth field is defined as a limit, by determining limit value.We can control power of users by sending them notification or alert message that limit is over.Fifth field is payment and in our system smart meter will used smart payment through smart card.In next step of specification we have described the state of the system.State of system stores the data and invariants that are used further in operations processing.
Invariants: First invariant is that we define the limits of units that consumer can use 1) if meter units is less than limit then meter units will multiply by unit rate and value assign to payment; 2) if meter units are greater than limit then increment will be added in unit rate that will be multiplied to meter units.We specified in our system that we have used smart payment that's why we check the balance.If balance remains less than microcontroller will send the message to users that your balance is not as much of, please recharge your balance.
3) It check balance if it remaining fourth part of balance than it sends the remainder message send to user that please recharge your balance .The main function of system is described in operations.Therefore, we describe some operations of smart meter as following: operations first operation of smart meter is simply add a new meter in smart meter set.In pre-condition we check that meter is not already part of meters set and in post condition it will become the part of smart meter set.add_sgrid(g:ID,t: set of Transformer, sm : set of SMeter,mic : Microcontroller,d : set of nat, gsub : set of GSubnet, ged : Edges) ext wr grid:set of SGrid pre mk_SGrid(g,t,sm,mic,d,gsub,ged)not in set grid post grid = grid union {mk_SGrid(g,t,sm,mic,d,gsub,ged)};

Operation: Check Balance
The next operation is to check the balance of Smarter because after checking balance we can decide message is send to user or not.In pre-condition, we check meter is a part of smart meter and in post condition it gives the balance of specific meter.www.ijacsa.thesai.orgCheck_balance(m:SMeter)p:int ext rd meter:set of SMeter pre m in set meter post p = m.balance; In this operation we check the meter units.Meter units check continuously because we have to control power consumption, Through this we get meter units.Check_units(m:SMeter)u:int ext rd meter:set of SMeter pre m in set meter post u = m.munits;Operation: Check Meter Reading In meter reading operation we check meter reading.Meter reading checking is also important to detect the theft.In precondition we check the meter is a part of meter reading meters.In post condition we get reading of a specific meter that we want.check_meterreading(m: MReading)r:int ext rd mread: set of MReading pre m in set mread post r = m.mr; Operation: Control limit To control the power consumption of user we have to define the limit of units that can they use after crossing their limit microcontroller generate the message to consumer to control their power consumption.In of smart limit operation we check the limit of smart meter.Check_limit(m:SMeter)l:int ext rd meter:set of SMeter pre m in set meter post l = m.limit;Smart Transformer Module Transformer is another module of our system.Transformer get power from smart grid at a specific capacity and then transmit power to smart meters.So there are many LANs that are attached to transformer and in many LANs there are many smart meters that are attached.Transformer is a composite object with different fields.First field is transformer ID and every transformer has a unique ID.Second field is micro that is attached to every transformer.Third field is transformer edges and subnets are connected to edges.Fourth field is transformer capacity that is used to control the load of transformer.Subnet is a composite object type which has three fields.First is a smart meter which is to transform through junctions.Second field is junctions and third is edges.
Invariants: (1) For all junctions exist in edges; (2) all smart meters not exist in edges; and (3) all smart meters exist in junctions.
Values: Values are initialized.Unit limit range define 300 it means if unit increase from 300 then alert message will be sent to consumer.It will help to control power consumption.Similarly transformer capacity load initialize 500.If load is increased to 500 then try to control the load and alert message is send to the user.This operation is used to control the limit of units.When unit consumed by consumer exceed the limit which we initialized 300 notifications is on and send to customer.control_limit(notification:Notification) pre true post if(Unitslimit>300) then notification=<on> else notification=<off>; To control the capacity of transformer we set the maximum capacity of transformer is 500.When any transformer cross the limit then notification is ON.In this operation pre-condition is true and in post condition notification will on if capacity greater than 500 and off if it is less then 500.control_transcapicity(notification:Notification) pre true post if(Capicty >500) then notification=<on> else notification=<off>; This operation is used for theft detection .We take any meter in smart meter and a transformer from where units are supplied.We compare transformer and meter units if both are equal it means not theft and notification is on not detect otherwise notification is on detected.We formally verified two smart power system components.
Smart transformer and smart meter.Formal analyze of our system module by using Vienna Development Method-Specification language (VDM-SL) tool box.To make sure our system integrity we have put different invariants on objects and pre and post conditions on operations.Formally analyze the specification of our module by checking type free and syntax free errors.Sayntax of specification according to VDM-SL language is analyze by syntax checker.Missused values and operators checks typechecker which shows run time errors.Pretty printers evaluated the consistency of specification.To Proof the correctness of our specification of system we put the snapshot of specification in Fig. 4, 5 and 6.Animation, testing and validation is done through interpreter and debugeer which increase the correctness of specification.In this paper we present formal method based subnet model for smart power system.We focus on two main components of our system; smart meter and transformer.In smart meter we attached microcontroller that monitors the meter and communicate to users.The smart meter will help to solve the problems of consumer related to control power consumption.Consumers will have to provide all type of information about their power consumption.In another site supplier of electricity continuously measure, control and monitor the electricity.It also provide the communication to supplier.It also solve the issue related to payment to the consumer and also supplier.Because it provide the facility of smart payment.In smart meter microcontroller is also attached which continuously monitor the meter units, meter reading, meter units limit, meter payment and also theft detection.In the occurrence of any issue any problem, it try to solve itself and also send notification/message to supplier and consumer according to situation.Smart meters are attached to transformer through many LANs.Through one LAN many smart meters are attached so therefore we define subnets and junctions at transformers.In transformer subnets we define transformer edges, junctions and smeters.In transformer subnet every junction is belong to transformer edges not every smart meter.Smart meter are connect to transformer junctions .Through this we can easily access to any smart meter that is attached to transformer.We also control the capacity of transformer by defining the capacity of transformer .When load increases the capacity of transformer, the microcontroller attached on transformer will generate the message transformer load is over loaded and control it otherwise it will be triped.So through this we control the burning of transformers.In future, smart power system is required at any smart place like, smart house, smart city, smart hospital, and smart university so it will help to provide on all that places smart power system.Hope in this paper will help to solve many issues of consumer related to control power consumption and suppliers related to monitoring and control.In future this work will help to model the other components of smart power system.This work will contribute to develop other components of smart power system.It is stated that ,in our knowledge their does not exists any real work on modelling of smart transformer power system using formal methods which shows contribution in this area.
values Unitslimit:int =300; Capicty:int = 500 state smart_grid of trans:set of Transformer meter:set of SMeter miccon:set of Microcontroller mread: set of MReading dmeter:set of DMeter init mk_smart_grid(t,m,mc,mrd,d)== t={}and m = {} and mc= {} and mrd = {} and d = {} end Operations This is simple operation that is used to get transformer capacity.It is any transformer in set of transformer and we take a variable c in which we get the capacity of transformer t. capicity(t:Transformer)c:int ext rd trans:set of Transformer pre t in set trans post c = t.capicty;www.ijacsa.thesai.org dtectTheft(m:SMeter,t: Transformer)notif:Notification ext rd meter:set of SMeter rd trans:set of Transformer pre m in set meter and t in set trans post if (m.munits)=(t.tunits)then notif=<not_detect> else notif=<detect>; VII.FORMAL MODEL ANALYSIS WITH RESULTS
Next field is microcontroller that is attached in smart meter.
(1)ariants:(1)Every subnet which belongs to subnets exists in junctions.(2) Edges belong to transformer.T-junction is composite object which has three fields first is transformer ID and second is transformers and last one is smart meters.Any smart meters are attached to transformer through many Lanes so in graph topology smatter connected to junctions.