This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.
The security and resiliency of electric power supply to serve critical facilities are of high importance in todays world. Instead of building large electric power grids and high capacity transmission lines, an intelligent microgrid (or smart grid) can be considered as a promising power supply alternative. In recent years, multi-agent systems have been proposed to provide intelligent energy control and management systems in microgrids. Multi-agent systems offer their inherent benefits of flexibility, extensibility, autonomy, reduced maintenance and more.
The implementation of a control network based on multi-agent systems that is capable of making intelligent decisions on behalf of the user has become an area of intense research. The objective of this research is to design, develop and implement a multi-agent system that enables real-time management of a microgrid. These include securing critical loads and supporting non-critical loads belonging to various owners with the distributed energy resource that has limited capacity during outages.
In summary, the multi-agent system is designed, developed and implemented in several simulation test cases. It is expected that this work will provide an insight into the design and development of a multi-agent system, as well as serving as a basis for practical implementation of an agent-based technology in a microgrid environment. Furthermore, the work also contributes to new design schemes to increase multi-agent system's intelligence. In particular, these include control algorithms for intelligently managing the limited supply from a DER during emergencies to secure critical loads, and at the same time supporting non-critical loads when the users need the most.
Table of contents
Developing Algorithm for Micro-Grid Control and Management Using Multi-agent Technique (MAS) i
Table of contents v
Table of Figures vi
Appendix A: HDL or C Source Code 27
Appendix B: Hardware Schematics 29
Appendix C: List of Components 30
Appendix D: Project Timeline 31
Table of Figures
Chapter 1 Introduction
A multi-agent system is collection of a number software programs (agents) working together in pursuit of different tasks. It can be defined as: a combination of several agents working in collaboration in pursuit of achieving their assigned tasks resulting in the achievement of overall goal of the system. Today's world, inundated with technological advancements, incorporates virtually limitless applications of multi-agent systems. In this chapter, the area of research is introduced i.e. multi-agent systems' application in microgrids. Importance of this research is briefly discussed, followed by the thesis statement.
1.1 Smart Grid
A smart grid is the electricity network using digital technology. Smart grid includes two way digital communications to supply energy to consumers. This system was using analog technology before but with the advancement in digital technology it is shifted on digital network. Smart grid increases the automation, coordination and connectivity between end user and the distribution system. The increased data rates in digital communication make it possible to do sensing and measurements to control devices according to the electricity production, transmission and distribution. The devices in smart grid system can communicate the information about the grid condition or the consumer's electricity situations. Smart grid includes the intelligent monitoring system that keeps in detail the record of the electricity production and consumption in more detail as compared to the old grids. It modernizes both transmission and distribution systems. It delivers electricity from generation point to the consumers. The electricity delivery network functions via two primary systems:
The transmission system.
The distribution system.
The transmission system delivers electricity from power plants to distribution substations, while the distribution system delivers electricity from distribution substations to consumers. The grid uses distributed energy resources to serve local loads. A modern smart grid must have the following abilities:
Automatic heal itself
It should resist attacks
Able to support power generation sources i.e. generators
Supply high quality power
Work with greater efficiency
Optimize assets by minimizing operations and maintenance.
To achieve these abilities, smart grid system include Smart meters, Smart thermostats, regulators and appliances, Automated controlled equipment, Real time and after time energy feedback, Scheduling and control of loads and many more.
Why smart grid?
Smart grid is necessary due to the increasing demand of the smart energy. Smart energy describes the user component which includes more reliability, less energy consumption, shift usage to off-peak hours etc.
Our project discusses the design and development of multi-agent system in the context of smart grid located at distribution level
1.2 Multi-Agent System in Microgrid
The increase in demand for electricity put many challenges of securing critical equipment. To deal with such situations more power plants and transmission lines are built to overcome the electrical shortages. This approach has limitations such as fuel availability, land use, health effects due to electromagnetic waves etc.
Electricity needs for critical equipment could be met by the concept of microgrid instead of building bigger power plants and high capacity transmission lines. A microgrid is on-site Distributed Energy Resource (DER) that can serve a section of distributed network and group of loads. Loads may consist of homes, offices and buildings. A microgid improves the reliability of the system by allowing the local network more resilient which results in failures and outages.
1.3 Need of Multi-agent system
For any power system it is very to have control and communication architecture. To serve this purpose, power systems used supervisory control and data acquisition. SCADA uses different signaling protocols that make it able to control and maintain power systems. These products however are installed with different protocol software's which has limitations in communicating with Distributed Energy Resources. This results in increased deployment costs.
To overcome this drawback deployment of multi-agents system for the control of micro grids is introduced. To control and operate the microgrid multi-agent system theory seems to be very useful. The main element of the MAS is an agent which has properties of sociality, autonomy and reactivity. MAS has following advantages
Multi-agent systems provide benefits of flexibility.
Multi-agent systems have certain level of autonomy that makes them able to take decisions on their own such as transition from grid-connected to island mode, load shedding etc.
In Multi-agents systems huge and complex tasks are divided into smaller tasks which reduce the need for maintenance and processing of large data.
1.4 Thesis Statement
The objective of this research is to design, develop and implement a multi-agent system that enables real-time energy management of a microgrid. These include the management and control algorithms during the transition from grid-connected to islanding mode; the algorithms to secure critical loads and share limited capacity from DER to support non critical loads belonging to various owners with the available distributed energy resource during outages. This work also studies the execution delay for the multi-agent system's commands.
In summary, the multi-agent system is developed, designed and implemented in several simulations. This work will provide a guide to the design and development of a multi-agent system, as well as serving as a basis for practical implementation of an agent-based technology in a microgrid system. Furthermore, the work also includes the new design schemes to increase multi-agent system's intelligence in the context of micro grids. In particular, these include control algorithms for managing limited supply from DER to secure critical loads during emergencies while at the same time supporting prioritized non-critical loads that belong to various users.
Chapter 2 Literature Review
2.1 History of Smart grid
The concept of smart grid is not new. Years back there were ideas of how to efficiently and actively monitor and control the electric grid. A good definition of smart grid is provide by the EU technology platform: A smart grid is an electricity network that can efficiently integrate the actions of all users connected to it, generators, consumers and those that do both in order to efficiently deliver sustainable, economic and secure electricity supplies. The smart grid introduces the way how the future electrical grids need to be planned, build, operated and maintained.
Over the past 45 years the electricity system was not able to face the modern challenges like security threats, conservation of power, high uninterrupted demand. The smart grid introduced the way how the future electrical grids need to be planned, build, operated and maintained. The term smart grid is having many definitions with respect to function, technology and benefits. Digital processing and communication of the power grid was the most common element in all the definitions. The idea was followed and various digital integrations were made to the power grids. Electric grid modernization has attained high focus now a days, especially the substation and distribution automation. All these ideas fall into the general concept of smart grid.
The idea of smart grid was emerged when the technologies like metering, monitoring and electric control were introduced. Automatic meter reading was introduced in the earlier 1990 whose meters were able to store that how much electricity was used. Later, real time communication was also added to smart meters. Monitoring and synchronization capabilities were revolutionized in 1990's.
A smart grid is a grid that delivers electricity from generation point to the consumers, and the electricity delivery network functions via two primary systems: the transmission system and the distribution system. The transmission system delivers electricity from power plants to distribution substations, while the distribution system delivers electricity from distribution substations to consumers. The grid uses distributed energy resources to serve local loads. Microgrid has following key characteristics
Self-Healing from power disturbances
Resilient against attack
Our project discusses the design and development of multi-agent system in the context of smart grid located at distribution level.
Smart grids with renewable resources will provide a range of new features including smart metering, demand side management. Its large-scaled distributed structure with bi-directional energy and information flow creates new challenges concerning control aspects. Stability and also optimization of operation performance have to be guaranteed. The control system must be implemented with smart metering devices to provide reliable and accurate measurement and detailed energy consumption data, down to the individual domestic appliance. Based on current and historic values of these data the control system can make decisions for controlling the energy flows through power electronic devices. In this way, the so-called demand side management such as peak power shaping or shifting can be realized to optimize the network operation. To complete the challenges and exploit the opportunities, distributed control combined with multi-agent system (MAS) has been proposed as an approach to solve the control problems of smart grids. Currently, algorithms based on distributed optimization and multi-agent systems are widely investigated in computer science for distributed computing or for networked control and for consensus control problems. However, its applications in power engineering which concerns different scenarios and components have not been investigated thoroughly. Thus, review and analysis of the state of the art in this area needs to be performed and the potential migration of existing MAS techniques to the Smart Grid domain evaluated. From this effort a new control algorithm based on distributed optimization and MAS is to be derived.
The deployment of smart grid will give the following benefits
2.1.1 Improved energy efficiency
A smart grid can provide benefits through improving the grid's reliability by reducing the power outages and the number of power quality disturbances. It facilitates the connection and operation of generation of all sizes and technologies.
2.1.2 Better Efficiency and enhanced service in electricity supply and grid operation
A smart grid can make electrical supply more efficient through active control, automation and management in distribution grid
2.1.3 More secure and quality of supply
A smart grid offers well coordination of transmission and distribution. It maintains or even improves the existing high levels of system reliability, quality and security of supply.
2.1.4 Consumer Friendly
Smart grid provides consumer friendly environment in which consumers can get more detailed energy data. It provides consumers with greater information and options for choice of supply, and makes them able to play a role in optimizing the operation of the system;
2.1.5 Load adjustment
At the critical situations when the load increases in the very short notice of time, a smart grid have the ability to notify all the individual end devices to reduce the load temporarily to the time; a large generator starts. These generators are the stand-by generators at the grid to help in adjusting the load automatically.
2.1.6 Support to demand response
In real time this functionality will allow to communicate the end devices with smart grid in an automated way.
2.1.7 Resilience to loading
The feature of multiple routing was also included in the old power grid systems. This feature was having a disadvantage that is if the current is produced that's exceeding the limit of the network will move to the other network which may cause a domino effect. A smart grid has the ability to deal with this situation in a smart manner.
2.2 Multi-agent system and Application
A multi-agent system is a powerful tool in developing a complex system. A multi-agent system is a collection of different agents working together in pursuit of accomplishing their assigned tasks resulting in the achievement of overall goal of the system. A software program is declared as agent if it contains following characteristics.
Communicating with its environment (which may include other agents) (Sociality)
Learning from its environment (Autonomy)
Responding to its environment in a timely manner (Reactivity and Pro-activity)
Making decisions to achieve its goals, and (Autonomy and Pro-activity)
Achieving tasks on behalf of its user (Sociality and Reactivity)
These properties show the importance multi-agent systems in developing complex systems. Applications of agent based systems are divided into two categories
2.2.1 Single-agent system
In these applications human may require assistance when using these applications e.g. search engine, mail management engine, news filtering engine etc.
2.2.2 Multi-agent system
Multiple agents work together to accomplish a specific goal. These can either be physical systems or simulation of physical systems. Examples may include traffic monitoring, decision support system, telecommunication and network management etc.
2.3 Multi-agent systems implementation in Microgrids
In the context of power systems, multi-agent systems can be applied in a variety of applications, such as to perform power system disturbance diagnosis, power system restoration, power system secondary voltage control and power system visualization. Two strategies have been considered for the control and communication within microgrids, Centralized control and decentralized or distributed control.
Centralized control requires a central controller that manages the entire system. This concept is based on the same approach used for SCADA systems in the past. Decentralized or distributed control approach is implemented using the multi-agent systems technology. The idea behind any multi-agent is to breakdown a complex problem handled by a single entity. The IDAPS (Intelligent Distributed Autonomous Power Systems) multi-agent system comprises four types of agents
When working in collaboration, four agents will work toward achieving the overall goal of an IDAPS microgrid, which is to secure critical loads within the microgrid during outages.
Fig.3. The Multi Agent Architecture Diagram .
Specifications of Agents are defined below:
2.3.1 Control agent
Control agent have responsibilities that include monitoring system voltage and frequency to detect contingency situations or grid failures, and sending signals to the main circuit breaker to isolate the IDAPS microgrid from the utility when an upstream outage is detected.
2.3.2 DER agent
DER agent is responsible for storing information related DER, as well as monitoring and controlling DER power levels and it's connect/disconnect status. DER information to be stored may include DER identification number, type (solar cells, micro turbines, fuel cells, etc.), power rating (kW), local fuel availability, cost function or price at which users agree to sell, as well as DER availability, i.e. planned maintenance schedule.
2.3.3 User Agent
User agent acts as a customer gateway that makes features of an IDAPS microgrid reachable to users. It has responsibility of providing users with real-time information of entities residing in the IDAPS system. A user agent also monitors electricity consumption by each critical and non-critical load. A user agent also allows users to control the status of loads based on priority predefined by a user.
2.3.4 Database Agent
Database agent is responsible for storing system information, as well as recording the messages and data shared among agents. Database agent also serves as a data access point for other agents, as well as users.
Chapter 3 Project Design
3.1 Identification of Suitable Agents
We have many commercial and multi agent systems building toolkits that help the developers to build a multi agent system in much simplified manner. The agents build by toolkits are compared for analysis and design, code generation, integration with external code, response time etc
3.2 Architecture for micro grid control design of the multi agent system
The multi agent system is build by dividing the goal of the system into many smaller tasks and they are assigning to each agent. For instance, the detection of upstream outage is monitored by an agent but, controlling status load to other.
3.3 Developed multi agent system
An agent building toolkit is used for development of multi agent system with the following steps. In a system a process starts by specification of abilities of agents with their roles (Role modelling) and responsibilities (Social and Domain Responsibilities) the last step is creating the agents and code generation
3.4 Description of Simulink Model
Fig 3.1 Inverter Section Diagram for Microgrid.
The components used in Fig 3.1 are discussed as follows
Single Phase Inverter
3.4.1 Wind Energy
Now, the usage of wind for power generation is not a new one. In the past centuries wind was used to pump water, turn mills and generation of electricity by turning a turbine. Recently developed traits in both the turbines and the blades have increased the reliability and generation power of wind-mills. And as a consequence windmills are having increased and large-scale popularity and fame as a viable energy source.
3.4.2 Solar Energy
Solar energy is the most famous and commonly used form of alternative energy for the homeowner. It is easier to install and integrate into your current home or building with little change and will not offend your neighbor in an urban community like addition of a windmill might.
Installation of solar energy systems is becoming increasingly famous with many governments that offer grants and tax rebates for assistance to defray the cost of installation of photovoltaic solar energy panels.
It is a metal-oxide-semiconductor field-effect transistor (MOSFET) that is used to amplify and switch electronic signals.
MOSFET analog switch
MOSFET analog switches use the MOSFET channel as a low-on-resistance switch to pass analog signals when on, and as a high impedance when off. In this application, the drain and source of a MOSFET exchange places depending on the relative voltages of the source/drain electrodes. Signals flow in both directions across a MOSFET switch .The source is the more negative side for an N-MOS or the more positive side for a P-MOS. All of these switches are limited on what signals they can pass or stop by their gate-source, gate-drain and source-drain voltages.
Single-type MOSFET switch
This analog switch uses a four-terminal simple MOSFET of either P or N type. In the case of an N-type switch, the body is connected to the most negative supply (usually GND) and the gate is used as the switch control. Whenever the gate voltage exceeds the source voltage by at least a threshold voltage, the MOSFET conducts. The higher the voltage, the more the MOSFET can conduct.
In P-MOS, the body is connected to the most positive voltage, and the gate is brought to a lower potential to turn the switch on. The P-MOS switch passes all voltages higher than (threshold voltage Vtp is negative in the case of enhance-mode P-MOS).
3.4.4 Single Phase Inverter
It is an electrical device which is used to convert direct current (DC) into alternating current (AC). The converted AC may be at any required voltage and frequency with the usage of appropriate transformers, switching and control circuits.
Solid-state inverter has no moving parts and it is used in a wide-range of applications and operation, from small power supplies in computers to large electric high voltage DC applications that are used to transport bulky power. These inverters are mostly used to supply AC power from DC sources such as batteries or solar panels.
3.5 Modules Used In Project
3.5.1 Photovoltaic (PV)
It functions to convert sunlight directly to electricity. It enables a homeowner to generate some or all quantity of electrical energy on their own roof that is required for daily usage. It also works to exchange daytime excess power for the energy needs of future (usage at night time). The house remains in touch with the electric utility at all times, so any required power that can be produced by the solar system is simply drawn from this utility. It also includes battery backup or uninterruptible power supply (UPS) capability to make active the selected circuits in the house for hours or days during the outage of the utility.
3.5.2 Wind Turbine
It is a machine that transforms kinetic energy in the wind to mechanical energy in shaft and at last transforms into electrical energy in a generator is called Wind Turbine.
There are two types of wind turbine: -
Vertical Axis wind turbine
Horizontal Axis wind turbine.
22.214.171.124 Vertical Axis wind turbine
There is a vertically aligned shaft in this type of wind turbine. The most advantageous characteristic of this type of turbine is that the turbine doesn't need to be pointed into the wind for effectiveness. It is used on such site that exhibits variable and direction. By this device, wind force can be used from any direction.
126.96.36.199 Horizontal Axis wind turbine
This type of machine has an electric generator and a main rotor at the top of the tower. Both devices need to be pointed in the wind to produce electricity. A wind vane for small motors and a servo motor for large turbine is also used. Rotation of blades is controlled by the gear box that aid to increase the rotational speed of wind blades.
3.5.3 Charge Controller
It is similar to the voltage regulator in a car. It helps to regulate the voltage and current from the solar panels which are going to the battery.
3.5.4 Battery Backup
It gives power to a system when the main source of power is not giving any power. It ranges from small single cells to retain date and time in computers, up to large battery room facilities that power Uninterruptable Power System (UPS) for large data centers. Small battery cells can be used as primary cells. Rechargeable batteries are kept charged by the main power supply.
188.8.131.52 Critical load
A quantitative estimation of an exposure to one or more pollutants below which significant harmful effects on specified sensitive elements of the environment do not occur according to present knowledge.
184.108.40.206 Non-critical load
All non-critical based on the available historical data. The user agent sets this data as the required capacity.
220.127.116.11 Operate non-critical loads
When the user agent receives the acceptance signal from the DER agent, then the user agent compares the accepted capacity with the required capacity.
If the accepted capacity is equal to the required capacity: User agent turn on the non-critical loads for the coming hour.
If the accepted capacity is not equal or lower than the required capacity: Then the user agent will turn on the most important non-critical loads that can be served by the accepted capacity.
The awareness the amount of money spent during the day.
The time for which the non-critical loads would be served for a given amount of money.
Better capacity utilization of DER unit.
Fig. 3.2.Micro grid simulation in Matlab consists of grid interface, loads, load circuit breakers and a main circuit breaker.
In Fig. 3.2 the function of each module shown is as follows. A DC voltage source, a wind turbine, battery backup, the inverter to achieve conversion from DC to 220 AC, LC filter network, used to reduce harmonic interface, pulse width modulator used to control the gate g of inverter to output stable AC, the load circuit breaker, the critical loads with 50 kW, and the load breakers are connected, the non critical loads with 12.5 kW, connected with load breakers, outage simulator of LV grid, LV grid loads, 10 kV LV grid.
3.6 History of wind Turbine
The first wind turbine is used in Persia for gain grinding or water pumping. About 2000years ago grain grinding is the application of wind mill in china there vertical axis wind turbine is used.
In Europe horizontal axis wind turbine is installed because vertical axis design is not familiar. In 1390, the Dutch are trying to refine the tower mill design. There are affixed wind mill design separate floors of different applications at the top of multi story tower such as grain grinding, removing chaff and storing grains.
Wind speed is very important the speed of wind at the ground level is no so high but as height increases the speed of wind also increases the reason is that obstacles such as building vanished as move upward.
V = Vrd(H/H rd) 0.142
IT is very important relationship of wind speed and height. The standard height is 10m for meteorological observations. It is difficult to rotate a turbine at a very low speed and at high speed there may be faced damages.
Density VS Attitude
3.6.2 Wind speed output
Power generted by the wind is determined bt following equation
P = 1/2pAV3
Density of Air=p=1.23kg/m3
Wind velocity= V
Chapter 4 Implementation
This chapter explains the methods and process involved in developing, designing and implementing a multi-agent system using Matlab simulation. The chapter explains that how this model was developed, about the availability of different components in simulink and implementing Microgrid control and management using multi-agent technique.
4.2 Multi-agent systems
A multi-agent system consists of several coordinating and computing entities called "agents". There are many definitions for an agent. The agents may be software agents, such as computer programs or they may be people like us. An agent might be working alone in an environment or it may coordinate, communicate and share with other agents to achieve its desired goals.
4.2.1 Single-Agent Systems
In a single-agent system, an agent works alone by responding to and interacting with its environment in pursuit of its goals. In such systems, agents are explicitly modeled as having their own goals, actions and domain knowledge. Thus, even if there are other agents working in the same platform they do not impact the functionality of an agent.
4.2.2 Multi-Agent Systems Architecture
Multi-agent system architectures are classified as either a facilitator-based architecture or a layered architecture. Explanation of these architecture is beyond the scope of this work .we will mention here that various agent building toolkits are based on these architectures.
4.2.3 Multi-Agent Systems Applications
Multi-agent systems applications range from academia, companies, labs to computer systems and homes. Multi-agent systems are ideally suited for applications that have multi problem solving methods. Some of the major applications of multi-agent systems include network management, information management, air-control management, e-commerce, e-mail, command and control, micro-grids, video games, scheduling management etc.
There are two energy resources parallel to each other, one is solar cell module and the other is wind mill with dc generator. Both energy resources are producing power, voltages and currents on their specified timings. There are two 12 volts battery backups which are placed in parallel with energy resources and being charged by both energy resources. All voltage and current values are measured at battery backup end.
There is an integrator in which all current and voltage values of sources and battery backups are added and manipulated. It calculates all values by taking loads into account. It adds the voltages of loads and calculates the remaining power after consumption by the loads. The inverter is converting 12v DC to 220v AC. There are two loads, DC load and AC load. Loads are consuming voltages. At inverter end the voltage and current values are measured.
4.3 Matlab Simulation
Simulation is an extension of Matlab that works with Matlab to offer simulation, modelling and analysis of systems under a graphical user interface environment. It provides a customizable set of block libraries that let you design, implement, simulate and test a variety of time varying systems including controls, communications and signal processing.
We implemented the microgrid schematic in Matlab simulink (Simulation and Link).
Fig 4.2 Matlab Simulation Diagram for Integrator Circuit of Microgrid Control System.
In Fig 4.2 the Microgrid management and control portion is implemented. An integrator is smart enough to calculate the source voltage and current values and the voltages consumed by loads. It is adding both sources production values and calculating power consumed by loads. It shows final values of voltage and current.
The production of sources can be varied by changing the input parameters. As a wind mill can be operated with different speeds in different timings. The RPM values of wind mill are varied and different values of RPM are given to it. It produced specific values of voltages and currents at specified speed values. The integrator calculates those values with solar energy source and manipulates total consumption by loads.
4.4 Components Used for the Microgrid Control and Management System Design and Implementation
Major components used for microgrid system design are given below:
Table 4.1 Experiment values taken on different timings on 13 May, 2011.
Fig 4.3 The Inverter Simulation Portion of Microgrid [Discussed in detail in Chapter 3].
The output results for simulations are shown in following figures.
Fig 4.3.1 The Output AC values Diagram for Wind Energy Source [scope 2].
Fig 4.3.2 The Output DC value Diagram for Solar Panel [scope].
Chapter 5 Conclusions and Future Work
5.1 Conclusions and contribution
In this project we studied and developed a multi-agent system for an intelligent micro grid system following standard development techniques. The system's functionalities are applied to each part of the system individually including all agents and loads. The system implements an algorithm for controlling and managing load. The system is simulated using micro-grid power simulation in Matlab simulation.
Including the implementation of external programming the details of designing and developing a micro-grid system using MATLAB simulation were described. The matlab simulation included many simulink power components, contributing agents. The agents including, a user agent, a control agent, a data base agent and a DER agent were used to achieve the specified tasks in the microgrid system. These agents were connected to the microgrid simulation in the matlab simulink environment through external programming. Through this external programming all specified tasks are performed by the microgrid system. Finally the system was tested and results showed all proposed values and outcomes to illustrate the ability of the micro-grid system.
It is expected that this proposed multi-agent system will be very useful for industry and for many researchers in academia to understand the development, design and practical implementation of this multiagent based technology in Microgrid system environment. Furthermore, the work also contributes a lot for the development of new desiggn schemes to increase the intelligence of multiagent system in context of Microgrid. In particular, the control algorithm is responsible for controlling the loads, and demand of energy for various users, and manipulating power changes at each part of the Microgrid system.
5.2 Future Work
In the future work we can implement our MATLAB code which is totally based on the smart grid station technology with our Simulink Block diagram of smart grid in which we can control the Simulink Block that means we can control power generation, switching on off the loads at various times and we can store the battery power with the MATLAB code which can be integrated in the whole Block diagram of Simulink to have a smart control via coding and lesser controlling via hardcode methods like to switch on off the device manually the code can done the procedure. On the other hand if looking at our code we assume two back end loads AC and Washing Machine in future we can increase the number of loads and the number of houses that we assumed to be two in our code so it became a profession type smart grid method.
Further we can implement our MATLAB code and Block diagram on a real time smart grid system which can perform the same tasks as mentioned in the code or which are required by a smart grid station to do for an area that's may be on the project basis and not the professional one so that depends in more future we can implement it on a larger scale. We can implement this kind of scenario on university basis to control the different equipments efficiently.