Electrical Power and Energy Systems 46 (2013) 400–404
Contents lists available at SciVerse ScienceDirect
Electrical Power and Energy Systems journal homepage: www.elsevier.com/locate/ijepes
Intelligent domestic electricity management system based on analog-distributed hierarchy Peng Ren ⇑, Zheng Xiang, Zhiliang Qiu School of Telecommunication Engineering, Xidian University, Xi’an 710071, China
a r t i c l e
i n f o
Article history: Received 20 July 2012 Received in revised form 15 October 2012 Accepted 20 October 2012 Available online 30 November 2012 Keywords: Electricity management Analog-distributed Embedded system Scheduling algorithm Real-time analysis Simulation
a b s t r a c t Electricity management system has been extensively investigated for efficiently monitoring and controlling domestic power. Nevertheless, the existing designs are generally rough, inflexible and complex, which leads to poor convenience in practice use and performance evaluation. In this paper, a systematic structure of intelligent electricity management system is firstly constructed and then corresponding multi-task scheduling algorithm based on embedded system is proposed for facilitating domestic power management. The proposed architecture accomplishes the system functions on two interactive modules. And this architecture is very beneficial to effective operation and intelligent management. Furthermore, real-time performance of the presented scheduling scheme is researched by a constraints model and the corresponding simulation result shows a good performance, where the overtime ratio is 10.3% under an extremely bad condition. Besides, the relationship between overtime ratio and sporadic tasks is derived in a general way and also verified by simulation. Ó 2012 Elsevier Ltd. All rights reserved.
1. Introduction The double pressure from energy crisis and combustion emissions drives human being to pay more attention to domestic electricity management which is one of the most significant parts of smart grid [1,2] and smart home [3–5]. With the aid of the integration of advanced technologies [6–9], there is no doubt that the intelligent domestic electricity management system contributes to the environmentally sustainable residential system. Several efforts have been focused on research of the framework for domestic electrical system. In [10], a power management system for home network devices is presented, where power control clients are embedded in each networked device for reducing the electricity consumption. The decentralized layout results in the difficulty of fixing and evaluating the whole system. Zigbee is used in the achievement of [11], where the wireless power outlet is just a switch controlled remotely without other functions. Choi et al. [12,13] design an intelligent energy management apparatus based on MCU (Micro Control Unit). The equipment can control power simply by switching on/off and record the data of electricity. However, it is difficult to enhance the controlling capacity and add more functions, since the structure of the apparatus can hardly be extensible. In [14], the concept of cyber-physical is fused in home device power management. Utilizers manage electricity loads by means of a multi-agent system involving evaluation, mon⇑ Corresponding author. Tel./fax: +86 29 88204225. E-mail address:
[email protected] (P. Ren). 0142-0615/$ - see front matter Ó 2012 Elsevier Ltd. All rights reserved. http://dx.doi.org/10.1016/j.ijepes.2012.10.045
itoring, controlling and energy resource agents. This design may be considerably effective, yet it is just a general basic prototype. Moreover, a theoretic study is illustrated in [15], where a smart home energy system is composed of many dispersive parts including smart meter, smart socket/switch, grid friendly appliance controller, smart interactive terminal, and other smart devices. To keep the balance between centralization and decentralization, in this paper, an intelligent electricity manage system based on analog-distributing hierarchy is developed, which is able to accomplish the functions of electricity access, distribution, monitoring, controlling, and overload protection. The implement architecture of the system is shown in Fig. 1. Moreover, the scheduling scheme of operating functions is presented, of which the real-time performance is researched and evaluated by a built constraint model. The remainder of this paper is organized as follows. A detailed design of the proposed smart electricity management system (SEMS) is presented in Section 2. Correspondingly, the multi-task scheduling scheme and the real-time evaluation model are developed in Section 3. In Section 4, a real-time simulation is done and the real-time index formulas are derived. 2. Structural design of SEMS The structure of SEMS, which is shown in Fig. 2, is composed of main control (MC) module and solid-state power controller (SSPC) module. It is a kind of analog-distributed construction, i.e., the functions of SEMS are separately arranged on the two modules
P. Ren et al. / Electrical Power and Energy Systems 46 (2013) 400–404
401
Fig. 1. Smart domestic electricity management system.
Fig. 2. Structure of SEMS.
with data processing capacity, which are connected by the inside com line. The separated design could permit the controlling capacity to be enhanced by increasing the number of SSPC. Through the outside com line, users could control the SEMS remotely by an external control unit (ECU). The commands transmitted on the outside com line are related to three categories: turn on, turn off and uploading. According to the different command from ECU, MC will take a distinct action: if the received command is turn on or turn off, MC will send the corresponding command to SSPC; if it is the command of uploading, MC will send the information saved in data storage to ECU. The details of MC will be presented in Section 3 of this paper. SSPC [16] controls the switch depending on the commands from MC and the state of electricity, and the corresponding illustration of SSPC working status is depicted in Table 1. The parts of data collection make SSPC obtain the data of each power line including the
value of electricity and the state of turn on/off at any time. The collected data will be uploaded to MC through inside com line, if the command of uploading is received from MC. The work flow diagram of SSPC is given in Fig. 3. In SSPC, the semiconductor devices, e.g., MOSFET or IGBT, can be used as power switches. The approach of data collection can choose RMS converter, Hall sensors, or the combination of sample resistances and AD, which could facilitate the way of data acquisition [17,18]. The inside communication can be achieved by RS-422, RS-485, or CAN, which are all serial bus technologies. The outside communication can be reached by Ethernet, power line communication [19], or even wireless communication. 3. The multi-task scheduling algorithm of MC and the constraint model for real-time evaluation The MC module is designed based on embedded operation system. Its related function tasks are involved as follows:
Table 1 The working status of SSPC. Command
Electricity status
Switch status
Turn off Turn on Turn on
– Overloaded Non-overloaded
Power off Power off Power on
Task1 (BIT): Built-In Test; Task2 (ReadFor_Command): receiving the command from the external control unit through the outside communication line; Task3 (AskFor_Value): transmitting data-uploading command to SSPC and receiving data from SSPC for storage;
402
P. Ren et al. / Electrical Power and Energy Systems 46 (2013) 400–404
Fig. 3. Work flow diagram of SSPC.
Table 2 The priorities of tasks. Task ID
Priority
BIT, ReadFor_Command, AskFor_Value Deal_Command
250 200
Task4 (Deal_Command): analyzing the command received by Task2, and then executing the corresponding operations. The operations contain: uploading the data to ECU through the outside com line; transmitting the command of turn-on or turn-off to SSPC through the inside com line. The priorities of the four tasks are described in Table 2. The lower number is denoted as the higher priority. Task1, Task2, and Task3 are periodic tasks with the same priority and scheduled by the time slice round-robin (TSRR) algorithm as illustrated in Fig. 4. Task4 with the highest priority is operated at any time when it is needed. The situation of the scheduling is shown in Fig. 5. The simulation of the designed algorithm above is based on the real-time operation system of Vxworks, and the results of simula-
tion are acquired by the tool of WindView integrated in Tornado 2.0. Obviously, the smart home electricity management system is a real-time system, and therefore the operations of some significant steps must be finished before a deadline time. The electricity management system is integrated in SEMS and the function is accomplished by the scheduling and executing the tasks based on embedded system. Here the real-time performance of the smart home electricity management system is equivalent to that of the scheduling and executing the tasks in SEMS based on embedded system. In the field of embedded system, real-time performance is also called schedulability, which is an important index and widely studied [20–22]. Regarding the proposed scheduling algorithm, the Task4 with the highest priority is a sporadic task. Task4 could be executed, only when ECU transmits commands. The transmission process is unpredictable and follows the Poissonian distribution. In a real-time system, the sporadic task has a negative impact on the real-time performance of the whole system. Table 3 gives the execution time, deadline, and type of each task. In order to ensure the schedulability, the total cost of execution and interrupt time should be limited under a deadline.
Fig. 4. Simulation of time slice round-robin scheduling of Task1, Task2, and Task3.
Fig. 5. Simulation of scheduling of Task1, Task2, Task3, and Task4.
403
P. Ren et al. / Electrical Power and Energy Systems 46 (2013) 400–404
Now the assuming simulation condition is the worst situation happened in the scheduling process: the operator is quickly requiring SEMS to upload the saved data in 1 min, and the interval time t between two requests is 300 ms. At the moment, the execution time t0 of Task4 is 28 ms, and the total execution time n is 1 min, identical to 60,000 ms. The execution time of sporadic Task4 can be calculated by:
Table 3 The deadline of each task. Task ID
Execution time (ms)
Deadline (ms)
Task type
BIT
1.3
1.5
ReadFor_Command
1.2
1.5
AskFor_Value
1.5
2
Periodic task Periodic task Periodic task Sporadic task
Deal_Command
2 (turn on/off) or 28 (uploading)
30
X k¼1;l¼1
Observed the task scheduling process in Fig. 5, it can be obtained that the Task2 (ReadFor_Command) is just interrupted by the sporadic Task4 (Deal_Command) with the higher priority, when ECU transmits commands. Here the interrupt time is identical to the execution time of Task4 (Deal_Command), and its value is 2 ms or 28 ms, which depends on the command from ECU. Furthermore, the overtime ratio (OR), namely the ratio of the execution time of the sporadic tasks and that of the periodic tasks, is defined to measure the scheduling algorithm schedulability. The lower the OR is, the better the schedulability is. It should be noticed that the OR must be within a related threshold. The high OR signifies that the sporadic task consumes a large portion of execution time and correspondingly the periodic task is hardly to be executed. For this case, SSPC will be difficult to capture the state of electricity and the commands from MC, which may lead to danger once the electricity is overloaded. The schedulability analysis model is designed as following: The objective is to schedule a real-time system, which can be expressed by:
n¼
mi;j þ
i¼1;j¼1
X
t k;l < T ¼
k¼1;l¼1
X
m0i;j ;
ð1Þ
i¼1;j¼1
Pfx ¼ ug ¼
ku k e ; u!
0;
t 6 mi;j
1; t > mi;j
;
u ¼ 0; 1; 2; . . . ;
mi;j ¼ n
i¼1;j¼1
X
tk;l ¼ 60; 000 ms 5600 ms ¼ 54; 400 ms: ð6Þ
The deadline of periodic tasks can be obtained from:
P
i¼1;j¼1 mi;j ð1:5 ms þ 1:5 ms þ 2 msÞ 1:3 ms þ 1:2 ms þ 1:5 ms ¼ 13600 5 ms ¼ 68000 ms:
T¼
ð2Þ
k¼1;l¼1 t k;l
i¼1;j¼1 mi;j
6 s;
n ¼ 60; 000 ms < 68; 000 ms ¼ T;
ð8Þ
P 5600 ms k¼1;l¼1 t k;l 10:3% 6 35% ¼ s: ¼ d¼P 54; 400 ms m i;j i¼1;j¼1
ð9Þ
Just for the designed scheduling algorithm above, under the condition that the execution time of sporadic Task4: t0 = 28 ms, Eq. (4) can be rewritten as:
P d¼P
k¼1;l¼1 t k;l
i¼1;j¼1 mi;j
¼
P n 28 28 k¼1;l¼1 t k;l P ; ¼ t n ¼ n k¼1;l¼1 tk;l n t 28 t 28
t ð10Þ
In addition, the relationship between d and t is simulated and shown in Fig. 6. More generally, Eq. (10) can be derived as:
d¼
t0 ; t t0
t > t0 :
ð11Þ
The relationship among t, t0 and d is given in Fig. 7. It can be observed that if shorter execution time of the sporadic task and longer the interval time between two sporadic tasks, the
ð3Þ
ð4Þ
where, x is the execution times of sporadic tasks; d is the overtime ratio; s is the related threshold which is set to 35% in this model. The Eq. (2) means that the interval time between two request commands from the operator is longer than the execution time of any single periodic task. The Eq. (3) indicates that the occurrence probability of sporadic tasks follows Poisson distribution. The Eq. (4) signifies that the overtime ratio must be no more than the specified threshold. 4. The real-time performance simulation and analysis The sporadic Task4 (Deal_Command) is executed according to the commands from ECU which are transmitted by operators.
ð7Þ
Then, based on the calculation results, Eqs. (1) and (4) can be derived as:
P d¼P
ð5Þ
k¼1;l¼1
> 28:
where, n is the total execution time of all tasks; mi,j is the execution time of single periodic task; i is the number of periodic tasks; j is the execution times of the ith periodic task; tk,l is the interrupt time, which is also the execution time of sporadic tasks; k is the number of sporadic tasks; l is the execution times of the kth sporadic task; T is the total deadline of periodic tasks; m0i;j is the corresponding deadline of the parameter mi,j. Constraint conditions are developed as follows:
FðtÞ ¼ PfT 6 tg ¼
n t0 ¼ 200 28 ms ¼ 5600 ms: t
The execution time of periodic tasks will be achieved from:
X
X
t k;l ¼
Fig. 6. The relationship between d and t.
404
P. Ren et al. / Electrical Power and Energy Systems 46 (2013) 400–404
Fig. 7. The relationship among t, t0 , and d.
less the value of d is. Correspondingly the real-time performance of scheduling algorithm is better.
5. Conclusion The analog-distributed construction of SEMS is designed for smart home. Based on embedded system, a multi-task scheduling algorithm is researched for power controlling. The real-time performance of the scheduling algorithm is analyzed by a constraint model. The general calculation formula of overtime ratio is given. The result of simulation shows that the scheduling algorithm has good real-time performance and the overtime ratio is 10.3%.
References [1] Yu XH, Cecati C, Dillon T, Godoy Simoes M. The new frontier of smart grids. IEEE Ind Electr Mag 2011;5:49–63. [2] Lasseter RH. MicroGrids. In: IEEE Power Eng Soc Winter Meeting; 2002. p. 305– 8. [3] Jiang L, Liu DY, Yang B. Smart home research. In: Proc 2004 Int Conf Mach Learn Cybern; 2004. p. 659–63. [4] Ricquebourg V, Menga D, Durand D, Marhic B, Delahoche L, Loge C. The smart home concept: our immediate future. In: Proc 1st IEEE Int Conf on E-Learn Ind Electron; 2006. p. 23–8. [5] Cook DJ. How smart is your home? Science 2012;335:1579–81. [6] Pradeep Y, Seshuraju P, Khaparde SA, Joshi Rushikesh K. Flexible open architecture design for power system control centers. Int J Electr Power Energy Syst 2011;33:976–82. [7] Kabalci E, Kabalci Y, Develi I. Modelling and analysis of a power line communication system with QPSK modem for renewable smart grids. Int J Electr Power Energy Syst 2012;34:19–28.
[8] Goya T, Senjyu T, Yona A, Urasaki N, Funabashi T. Optimal operation of thermal unit in smart grid considering transmission constraint. Int J Electr Power Energy Syst 2012;40:21–8. [9] Tan XG, Li QM, Wang H. Advances and trends of energy storage technology in Microgrid. Int J Electr Power Energy Syst 2013;44:179–91. [10] Jeong YK, Han I, Park KR. A network level power management for home network devices. IEEE Trans Consumer Electron 2008;54:487–93. [11] Song GM, Ding F, Zhang W, Song A. A wireless power outlet system for smart homes. IEEE Trans Consumer Electron 2008;54:1688–91. [12] Choi IH, Lee JH. Development of smart controller with demand response for AMI connection. In: Int Conf on Control Autom Syst; 2010. p. 752–5. [13] Choi IH, Lee JH, Hong SH. Implementation and evaluation of the apparatus for intelligent energy management to apply to the smart grid at home. In: IEEE Conf on Instrum and Meas Technol; 2011. p. 1–5. [14] Ko H, Marreiros G, Morais H, Vale Z, Ramos C. Intelligent supervisory control system for home devices using a cyber physical approach. Integr Comput Aided Eng 2012;19:67–79. [15] Zhao Y, Sheng W, Sun J, Shi W. Research and thinking of friendly smart home energy system based on smart power. In: Int Conf on Electrical and Control Eng; 2011. p. 4649–54. [16] Friedman SN. Solid-state power controller for the next generation. IEEE AES Syst Mag 1992;7:24–9. [17] Iwafune Y, Yagita Y, Ogimoto K. Estimation of appliance electricity consumption by monitoring currents on residential distribution boards. In: Int Conf on Power Syst Technol; 2010. p. 1–6. [18] Rahimi S, Chan ADC, Goubran RA. Usage monitoring of electrical devices in a smart home. In: 33rd Annu Int Conf of IEEE EMBS; 2011. p. 5307–10. [19] Lin YJ, Latchman H, Lee A. A power line communication network infrastructure for the smart home. IEEE Wireless Commun 2002;9:104–11. [20] Liu CL, Layland JW. Scheduling algorithms for multiprogramming in a hardreal-time environment. J Assoc Comput Mach 1973;20:46–61. [21] Engblom J, Ermedahl A, Sjodin M, et al. Worst-case execution time analysis for embedded real-time systems. J Software Tool Transfer Technol 2003;4:437–55. [22] Harmon T, Schoeberl M, Kirner R, Klefstad R, Kim KHK, Lowry MR. Fast, interactive worst-case execution time analysis with back-annotation. IEEE Trans Ind Inform 2012;8:366–77.