• Ei tuloksia

3.3 D ECISION MAKING IN SMART GRID

3.3.1 Decision making theory

How to make decision between the possible outcomes? How to take the uncertainty of the life into consideration and still find the best alternative from the given choices?

Kozine [14] gives us a simple overview of the non-conventional approaches to decision

17

making under uncertainty, so when all the facts are not know in the time of decision.

From there it can be continued to more sophisticated methods of the multi-attribute decision making, where are more than 1 attribute or variable to consider when making the decision, using the fuzzy or the grey theories. [15, 19] It is also interesting to give a look to the fuzzy fault diagnosis of Fan and Huang [16] as also the energy grids and their control systems are prone to have faults.

In the simplest form the decision making is selecting the best fitting outcome for the given variables. In this form the decisions do not prove to be very useful, because the method treats every possible outcome as equal, which is a rare situation in the real life.

To get more difference between the choices it is possible to turn to Bayesianism, which allows us to handle each outcome with some amount of probability. Though it gives to the decision making a bit of flexibility the rules of Bayesianism are still rigid and do not provide the elasticity required for the real life decision making. This problem can be solved using theories like Gårdenfors-Sahlin or Levi or by basing the decision making on the imprecise coherent previsions. Levis’s theory provides a kind of fuzziness as it makes possible to define the probabilities of the outcomes as a range instead of a specific value. So the possibility of the outcome might be between 0.4 and 0.6 instead of 0.5. This way also the selection might divide to more than one outcome as the probabilities overlap each other. With Gårdenfors-Sahlin’s theory the difference to the Bayesianisms comes from the way of using more than one probability to describe a situation and for adding a value of an epistemic certainty for each of the probabilities, basing the decision to prevision means using maximum and minimum values of the sum of multiplications between the probabilities and the utilities. This method gives an interval for each outcome, though the intervals may overlap, and makes possible to decide the proper outcome. [14]

As an improvement for the theories presented in the previous paragraph a look to a multi-attribute decision making theory (MADM) should be taken [15]. The idea of the theory is to provide methods for the decision making even when there are multiple criteria to taken into account. Inside this theory an interest is focused on two approaches: fuzzy and grey. [15, 19] The fuzzy and the grey theories of MADM are not

18

identical, but they do have some similarities when it comes to the meaning of the theories. The both theories bring the human kind approach to making decisions on their own way. The fuzzy theory [15] provides the human kind thinking, where the values are not precise, but more something fuzzy and easily describable by a linguistic variable. In the grey theory [19] the data might be unstructured, vague and deficient. So there are no ways to know for certainty if the provided data is even valid in the time of decision making. In a real life system the possibility to use these kinds of approaches to deal with an insufficient data is critical. In some cases part of the data is missing, out dated or corrupted, not usable, but the system has to do the decision even when the data is not complete.

The fault diagnosis by Fan and Huang [16] does not provide any new theoretical information of fuzzy in the decision making theories, but as a working and functional system it is an interesting sample of a fuzzy based diagnosis and decision making, which are included to the areas of interest in this thesis. The system includes a fuzzy hyper sphere set neural network working as a fuzzy rule set and a number of set of sensors providing data. The system works with live data and is capable of detecting faults in 0.02s. [16] This gives to understand that the fuzzy rule sets are capable of online situations requiring fast responses. From the point of the thesis this gives something to think about when considering the methods of the decision making. The frame of the system can be seen in Figure 6.

Figure 6. Frame of a fuzzy fault diagnosis [16].

19 3.3.2 Rule engines

The rule engines use their rule base to determine what they should do. So they try to find the rule that is a best match for the current situation. For matching the most used algorithm is still the Rete algorithm, although it was presented first time in 1970’s. [17, 18] When it comes to categorizing of the rule engines they can be divided into two main categories: forward and backward chaining. This division is done by comparison of the order they process their information. [17] More illustrating view of the difference of these categories can be done by observing the differences in Figures 7 and 8. The main difference is that in the forward chaining a decision is found according to the given variables so, attributes -> rules -> decision, when with the backward chaining it is the opposite decision -> rules -> attributes

Why to go through these methods and ignore the others? Mainly because of the Rete, as it is the foundation for many other methods, which still cannot outperform it, and because the Constraint Handling Rules (CHR) [18] provides improved performance compared to the Rete, although there are few differences between these two.

Figure 7. Forward chaining [17].

20

Figure 8. Backward chaining [17].

As it was observed the most used matching algorithm for the rule engines, the Rete, is already quite old, and therefore, Weert [18] provides us an overview of an another

21

approach called CHR. The language of the CHR is rich enough to create and describe the real-life type rules. This is of course understandable, because the used language defines the rules that can be obtained. So if the language does not provide the methods to describe the rules precise enough, it is difficult to create a rule set that would satisfy the needs of the real-life situations. The very basics of the language, the main core, include only the rules and the facts. When taken a closer look to the facts it can be found out that also the patterns can be found under the rules, which make the structure of the language very similar to the Rete. [18, 20] Only minor differences exist. The CHR also provides the priorities for rules, so for the rules a sequence can specified so that the rule never fires if its priority is too low. [18] As the Rete method is a base for several experts systems [17] it should not be surprising that more modern rule-based languages have very similar structure of the used language.

The rule base is an important part of the rule engine as it needs some place for the rules.

If the rule engine has no rule base to store the rules, it cannot find the correct decision to make and therefore its functionality is crippled to none. The importance of the facts and the methods to control them should also not be underestimated. Weert [18] defines that the CHR uses a fact base to administrate the facts of the system and that the basic functions of the fact base are: create, store, kill, alive and lookup. The Rete method handles facts in the working memory. The functionality is quite similar to the CHR as the Rete is capable of adding and removing the facts. With the Rete updating the fact includes removing the old fact and adding new one to replace it. [20] In this comparison the main advance that the CHR provides is the alive-command that makes possible to check if certain rule still exists or has already been removed by kill-command. Whether the alive-command gives any remarkable advances or not is questionable, but in some cases it probably proves to be useful.

As already mentioned the Rete is a de facto matching algorithm in for the rule engines in spite of its age [17, 18], so why even consider the CHR even though many other solutions have not been able to improve the performance of the Rete? [18] Weert [18]

claims that the CHR includes improvements and optimization methods, which would also improve the effectives of the Rete. So what has been improved in the CHR to

22

satisfy these claims? Weert [18] presents methods to optimize the join computations, to minimize the overhead in the fact base caused by indexing, to speed up activations of the facts and to optimize the use of the history in the CHR. First two methods presented by Weert are closely related because without proper indexing it is difficult to make the join questions from the database. The basic functionality of the rule engine is to find suitable matches to create form rules, so the join computations play a huge role in the rule engines, and therefore, a suitable target for optimization. Optimizing the fact activations includes removing an unnecessary rule from activations and altering the way a proper rule is found by facts. With history modification it is meant to improve the way activation history of the rules is held and to remove unneeded history information to minimize the size of the history. [18]

23

4 SYSTEM STRUCTURE

This chapter presents the structure of the planned system. In Chapter 2 the basic idea of the system structure was introduced and in this chapter a more specific presentation is given. This is done because the planned system differs from a usual energy grid in one important way. Usually the energy grids are centrally managed or the management is distributed to few places, but in this chapter a multi-agent approach is presented. The main difference between the multi-agent and the centrally managed systems is that in the multi-agent system every device could be its own master and do the local decisions on its own instead of using the main control system for decision making. The structure is quite similar than the one presented in Figure 1. The final structure can be seen in Figure 9.

Figure 9. Structure of a multi-agent control system.

24 4.1 Multi-agent system

In the multi-agent approach the control system is divided to smaller systems, agents, which can work autonomously without human interaction [21]. For each individual agent can be pointed a very specific set of actions it can take to solve the problems or tasks it might counter. When comparing this approach to a more common supervisory control and data acquisition (SCADA) system it is quite easy to see the benefits the multi-agent approach brings.

The SCADA is often a centralized [21] system or only partly distributed so the complexity of the system increases as more and more functionality is added to the system. This makes the system difficult to program to adjust for changing environment.

The centralized approach also puts the whole system in a risk in a case of malfunction.

If the SCADA does not work the whole system is down, because there is no other node that is capable of making the decisions or controlling the grid.

When using the multi-agent system (MAS) this kind of problems disappear at least partly. In the MAS there will not be a full system failure if single, or even several agents have a malfunction. As the agents are capable of communicating between each other it is even possible to route the necessary information trough different agent, so losing a agent would have no effect to the efficiency of the system. Of course the seriousness of the problem depend on the type of the malfunctioning agent, but still when looking the whole system only some part of the functionality is lost in this kind of case.

Ueda and Nagata [22] proposed in their work 5 different kinds on agents which could be used as parts of the smart grid: Smart Grid controller agent (SGC), Load agent (LAG), green power generation agent (GPAG), gas-turbine agent (GTAG) and battery agent (BAG) [22]. The SGC and the LAGs can be found even from small MASs as they provide the basic functionality of the control system. The GPAGs are an important part of the smart grid concept as they bring the possibility to use the renewable energy source, like the sun or the wind, as a part of the energy production. Of course, instead of

25

having only a GPAG for every green power source the concept could be divided to smaller parts, so every different energy source would have a specific type of an agent, like it is with the GTAG.

The concept of the smart grid is relatively new and there is not any established structure of the system. Siemens had a competition about the structure of the future smart grid.

There were two propositions for the structure using the MAS [21, 24]. Although both solutions concentrated on a microgrid [23] the results can be used when thinking about the whole smart grid. The architecture of an agent can be seen in Figure 10.

Figure 10. The architecture of an agent [21].

The microgrids can be seen as a construction blocks of the smart grid. They are small independent parts of the grid that can get the full benefit of the renewable energy sources and work as a producing units of the grid or outside it as separated islands. [22]

26

In the both works [21, 24] it is interesting that they take into consideration the possibility of the two-way power movement, so the consumers can buy the electricity as usual, but if they have own power production they can sell the extra power to the global grid. Logenthiran, Srinivasan and Khambadkone [21] also created a bidding system seen in Figure 11 which finds out the price to pay for the output that system can provide to the global grid.

Figure 11. A bidding system [21].

In their work Logenthiran and Srinivasan [24] provided a layout seen in Figure 12 of a multi-agent system that is capable of controlling a local microgrid and its several power production sources and communication with the global grid so the extra power can be sold there or saved into a battery for later use. When thinking about the agent roles that Ueda and Nagata [22] presented it is possible to see that almost all of the agent types are presented in the work of Logenthiran and Srinivasan [24].

27

Figure 12. Interaction of the grid [24].

28

5 COMMUNICATION

In an electric grid, smart or not, the flow of the information is extremely important because all that is know from the state of the grid or the amount of the consumed energy for example is data gathered from the devices from the network. When the communication fails even between few devices the whole system might come into problems depending on the system structure as was presented in Chapter 4. In this chapter a small peak into the communications in the system is taken, how the devices communicate and what might be done to ensure a secured and a constant dataflow without problems.

5.1 Communication between devices

The communication between devices mainly concentrates on the first level, when thinking about the structure shown in Figure 1. At the first level most of the data transfer is from households, measuring equipments, to the control equipments, Siemens Simatec. Because this is the main information source of the system it is important to make sure that none of the data is lost because of small errors. This is why the communication medium between devices has to be reliable and secure enough and there has to be a way to overcome the problems in single measuring equipment. Therefore there has to be a failsafe to make sure that the data coming from the measuring devices is always routed to a working measuring equipment if the closest/main one is not working for some reason. In the upper levels most of the communication is done only between the layers, although there, like at the first level, has to be some communication between the devices to make sure that every device is working and to distribute the data for remaining equipments in a case of malfunction in some of the measuring devices.

When considering the communication medium, there are few obvious choices: firstly using a cat 5, cable for transforming data, or higher in the first level and secondly using an optical fiber in the higher levels. The cat 5 provides enough bandwidth for the data

29

transitions and with limited distances, like at the first level, it is fast enough for the needs of the system. When the distances get longer the medium has to be changed, because the cat 5 is not meant for extreme distances. Thus the optical fiber can be used as a medium at the levels from two to five, as it is already used in the main networks, internet, it can handle the needed data amounts easily with low latency. The wired systems also provide us a higher level of security and reliability compared to the wireless systems. Still the communication can be arranged using wireless communication. Instead of the cat 5 a wireless local area network (wlan) could be used and the optical fiber could be replaced by a worldwide interoperability for microwave access (WiMAX) solution or, when the distances grow even longer, with a satellite communication. With the wireless solution there is always the problem of security so methods like the WPA2 should be used. Also with the long distances the latency might cause problems, because the satellite communication is not as fast as the communication over optical fiber.

There is not any direct way to get the data from the Simatic controller and to set the data there from the SCADA, but this can be done using the Siemens multi-point interface (MPI) that is the proprietary interface of Siemens logics. There are some libraries that provide programmers the methods to create programs to communicate with Siemens logics using the MPI. One of these is Prodave that is created by Siemens and therefore not free. It is only meant for a Windows environment, which might be a problem in some cases. A free library called Libnodave is also available. The library is not only for the Windows environment which makes it a considerable choice when thinking about

30

how to create the communication between the SCADA and the logic and it provides enough functionality to get and set the data to the logic using the MPI. At the highest level the communication is only between the SCADAs, so the method used to transfer

how to create the communication between the SCADA and the logic and it provides enough functionality to get and set the data to the logic using the MPI. At the highest level the communication is only between the SCADAs, so the method used to transfer