2017 2nd International Conference on Software, Multimedia and Communication Engineering (SMCE 2017) ISBN: 978-1-60595-458-5
Research on Smart Home Energy Management Algorithm
Based on Cloud Environment
Ke-peng SUN
1, Mei-ling REN
1, Ye-TAO
2and Rui-chun TANG
1,*
1College of Information Science and Engineering, Ocean University of China
2School of Information Science & Technology, Qingdao University of Science and Technology
Laoshan District, Qingdao, Shandong, China *Corresponding author
Keywords: Smart home, SVM, PSO, Gradient descent, Energy management.
Abstract. Energy saving algorithm for smart home energy consumption budget optimization under the SVM model using a simple particle swarm optimization algorithm to find the optimal value caused by the slow speed gradient value based on PSO algorithm is proposed to optimize the use of machine learning algorithm GDPSO algorithm (Gradient Descent based on down Particle Swarm Optimization Algorithm). First of all, the establishment of energy structure and energy consumption model of optimal hyperplane selection of penalty factor and Gauss the appropriate parameters; secondly, parameter selection and optimization of energy consumption model for smart home energy-saving emission reduction requirements using GDPSO algorithm, and improves the efficiency of the optimal SVM parameters to improve the accuracy of solution. A simulation example shows the effectiveness of the algorithm.
Introduction
With the rapid development of smart home networking and smart home appliances in the rapid spread of the technology, electrical energy consumption in the use of different smart appliances energy-saving emission reduction and the user experience is an important problem facing. The national energy board released the national energy science and technology planning documents clearly should invest more efforts in the research and development of key technology with intelligent electrical energy saving and emission reduction, the state has made instructions on energy use and optimization of energy saving and emission reduction. How to realize intelligent electrical appliances intelligent control and energy saving and emission reduction has become a key issue in the development of smart home.
Literature[1], in view of the existing support vector machine model, the accuracy of the parameter selection problem, proposed a parameter optimization method based on particle swarm optimization, for solving super parameter search issues beyond the scope, and the logarithmic scale parameters to further improve the search efficiency of particle swarm optimization method; Literature[2], this paper presents a particle swarm algorithm and gradient descent method algorithm combining the local minima in the research of energy value problems by using gradient descent method instead of the original algorithm, improving the convergence speed, improved accuracy and efficiency; Literature[3], based on the gradient descent of improved wavelet neural network parameter optimization in local minima and oscillation effect shortcomings of the algorithm, that solve the general mathematical model is hard to describe the energy consumption in the process of multi-factor quantitative analysis is feasible for gradient descent method.
method, combined with the energy model of optimal hyperplane selection optimization model of energy consumption parameters, build better classifier, the prediction results to obtain the optimal energy consumption. The simulation results show that the prediction accuracy of the algorithm is better than the existing algorithms for the energy consumption prediction.
Smart Home Energy Management Model
Energy consumption in smart home electrical equipment is a reliable basis for the formulation of energy saving and emission reduction plan, but the power is instability and unpredictability of consumption, if the relative quasi energy consumption prediction degree and develop energy-saving scheme, can effectively adjust the intelligent appliances work and energy consumption, so as to achieve the purpose of energy saving. Now there is a common energy consumption prediction method of time series, artificial neural network, and support vector machine because of its nonlinear fitting ability and good generalization ability, in other areas such as energy consumption prediction is also outstanding contribution. In this paper, based on the support vector machine, particle swarm optimization algorithm is used to optimize the gradient descent method.
Establishment of Energy Consumption Model of Support Vector Machine
For the smart home energy saving system of a support vector machine[4], which contains the N dimension in different time optimal energy consumption, can be divided into data to establish the nonlinear hyperplane, which (xP,yP) with electrical energy saving control of intelligent user state. Assuming that there is a given training sample {(x y1, 1)... (xp,yp)
...(xP,yP)
} we construct the optimal classification hyperplane:
1
1 , 1, 2
1
Φ ,
2
i i i
l T
i i
d wx b i l
W W W C
(1) In formula 1, loose variable 0, b as bias, W XT P as the inner product, C in the form of a positive factor for the selected penalty factor, we can get a certain time energy classifier by classifying hyperplane. The saddle point W and b in the classification can be obtained by Lagrange function:
1 1
1
, , 1
2
l l
T
i i i i i
i i
L W b a WW C a d wx b
(2) In formula, ap 0 as Lagrange coefficient, most of the problems in practical application are nonlinear problems. We will enter the energy consumption training samples {( x y1, 1 )...
(xp,yp)...(xP,yP)} mapping to higher dimensions, constructing the optimal classification hyperplane in high dimensional space. By introducing the Gauss kernel function instead of inner product W XT P to optimize the Lagrange function:
1 1
1
, , 1
2
0
l l
T
i i i i
i i
p
L W b a W W C a K wx b
*
0
*
0 1
, l
i j i j
i
f x sgn w X b
sgn a d K x x b
[image:3.595.136.474.186.307.2]
(4) So we can get the energy consumption in the model structure and mapping relationship, as shown in figure 1:Figure 1. Simple structure and mapping relation of SVM.
In formula (7), aos, W and b0, the solution is usually used for two times the optimal planning method of solution, by incorporating our training setx y1, 1xp,yp)xP,yP)according to the mapping relation of Figure 1, we reduce the dimension from high dimension by classification function
0 1
( ) sgn Ns s ( s, )
os s
f x a d K X X b
to get the results of energy consumption prediction. Parameter Selection of SVM Energy Consumption ModelThrough the upper part of the algorithm, we found that the use of SVM energy consumption model has two parameters need to be selected, the penalty factor C and Gauss kernel function parameters of the energy consumption classification plane. In this paper, a new algorithm is proposed--Particle swarm optimization[5] (PSO) algorithm and gradient descent method[6] applied in the prediction of real-time energy consumption of intelligent appliances, the relative accuracy of the algorithm is relatively high efficiency of the algorithm.
Each individual is abstracted as a particle with no mass or volume in the search space of the N dimension, and at a certain speed in the search space. We put the energy consumption classification of plane penalty factor C and Gauss kernel function parameters were abstracted into particle swarm M. In this algorithm, a set of particles are randomly initialized in the solution space. Each particle is tracked Xipa and Xga determine their own moving rules.
Penalty factor and Gauss kernel function parameter optimization are described as follows:
1
1 1
p t pa t pa t
n n n n n n
V V c r and X X c r and X X
(5)
1 1
t t t
n n n
X X V
(6) In formula: n=1,2…N; t=1,2…iteration times, V is particle velocity,
inertia weight, c1 and c2 is acceleration coefficient, rand is [0,1] random number,
1, 2, . . . ,
i i i i N
X X X X ,Yi
Y Yi1, i2, . . . ,Yi N
, theGradient Descent Method for Particle Swarm Optimization Model Selection
The gradient descent method is used to reduce the maximum value of the function gradient in the direction of the negative gradient, the n-dimensional unconstrained minimization problem is transformed into a series of objective function along the negative gradient direction of one-dimensional search. We will have the formula in iterative constrained optimization
1
i i i i
X X a s the search direction is negative gradient vector or unit negative gradient vector, the iterative formulas of two kinds of expressions are obtained:
1
i i i i
X X a f X (7)
1
i
i i i
i
f X X X a
f X
(8)
In formula, f
Xi is function f(x) gradient at iteration point, f X
i is function f(x) the modulus of the gradient at the iteration point; In type two ai optimal step factor, through theone-dimensional minimization min f X
i ai f X
i
and
min
i
i i
i
f X
f X a
f X
.
According to the gradient iteration formula (7) or (8) a number of one-dimensional search, the initial point of each iteration takes the end of the last iteration, the iteration point can be approximated to the minimum point of the objective function.
Further optimization of energy consumption model parameters by gradient descent method: (1) Data preprocessing, energy consumption of raw data analysis, data grouping, feature extraction and normalization operation, finally obtained the experimental data, and then grouped experimental data, divided into training samples and testing samples according to a certain proportion. (2) Initialize the energy sample particle swarm, including random position and velocity, calculate the fitness of each
sample, The upper and lower limits of penalty parameter C and factor. (3) make Xnk as Xnpa, by
comparing the index number set. (4) One step search Xnpa for the gradient descent operation of is
obtained for a new Xnpa. (5) Iterative generation of next generation sample particle swarm. (6)
Calculate the fitness of each sample, and compare the update Xnpa and Xnga. (7) On the Xnga
implementation algorithm to search for 1 new Xnga. (8) If the termination condition is not reached, the return (5) if the termination condition is reached, the output result is judged according to the termination condition, If the cycle to find a suitable model of energy consumption penalty factor C and kernel function variables
will be the two SVM model parameters for energy consumption prediction, if not in conformity with the termination condition to step (3), until the termination condition is satisfied.Energy Consumption Data Processing and Normalization
Energy Consumption Data Normalization Research on Energy Saving Algorithm Based on SVM
In the analysis of energy consumption data in order to avoid the different characteristics of the data due to the difference in the size, the number of different levels of the prediction error is large, the characteristics are not obvious, the common method is to normalize the data processing[8].
The formula is as follows:
min max min
t t
x x X
x x
(9) In formula, Xt as time t raw data value, Xt represents the normalized value of t moment data, distributed in the range[0,1]. xmin min( ),x xmax max( )x . This method can be used in the MATLAB environment mapminmax () function to achieve. Although there are many factors affecting the short-term real time energy consumption, it has a strong volatility M PT
, but through the further analysis of the data, we can see that the short-term energy consumption has a certain regularity.Energy Consumption Data Dimensionality Reduction
Because of the strong correlation between the above features, this paper uses the Elastic Net[9] algorithm which can effectively deal with the strong correlation variables to reduce the dimension of the feature.
Linear regression model:
T
M P
(10)In type: M
m m1, 2,...,mn
T is n response variables; P
p p1, 2,...,pn
T is predictive variable:
1, 2, . . . ,
T n
is corresponding coefficient;
1, 2, . . . ,
n
T is normal distribution random error
N
0,
2I
. For observed data
y xi, ij
,i1, 2,...,p , central processing:2
1 1 1
0, 0, 1, 1, 2,...,
i ij ij
iy ix ix j p
n
n
n
(11) Can be constructed Elastic Net algorithm model:
2 21, 2, 2 1 2
L Y X (12)
Include 2
pj1 2j, 1
pj1j 1and2 nonnegative fixed parameter. The coefficients of theElastic Net algorithm can be estimated by means of the above formula:
1 2
=argmin L , ,
(13) According to the above principle, we need to reduce the dimension of the feature variable, greatly reduce the operation and reduce the simulation time.
Simulation Experiment
The original data is normalized, and then according to the characteristics of variable regression algorithm, set the PSO parameters, the population size of 20, the number of iterations is 200, the number of C and in the range of [-5,5], parameter selection and optimal parameters for C=0.34966,
Figure 2. SVM parameter optimization fitness diagram.
In order to test the validity of our model, we use the fuzzy neural network[10] and wavelet neural network[11] to compare the two neural network methods.
[image:6.595.140.455.319.479.2]PSO gradient descent algorithm based on SVM energy consumption model, as shown in figure 3:
Figure 3. Energy consumption prediction chart based on improved SVM.
Energy consumption model based on fuzzy neural network, as shown in figure 4:
Figure 4. Energy consumption prediction based on Fuzzy Neural Network.
[image:6.595.135.461.522.684.2]Figure 5. Energy consumption prediction based on Wavelet Neural Network.
Fuzzy prediction results shown in Figure 4, Figure 5 shows the neural network and wavelet neural network, the prediction accuracy is compared with the SVM model and PSO based on the gradient descent algorithm, the variance of M were 0.2243, 0.3135 higher than the mean variance model algorithm, thus effectively prove the accuracy and feasibility of the proposed regression model.
Acknowledgment
In this paper, a short-term energy consumption forecasting problem based on SVM energy consumption model is studied, and a new algorithm called GDPSO based on PSO and gradient descent algorithm is proposed. In this paper, the penalty factor and the parameter optimization of the kernel function are studied. The experimental results show that the proposed algorithm compared with other algorithms of neural networks, can be more accurate and real-time prediction of future energy consumption, and meet the demand of smart home energy saving and emission reduction, how to further improve the effectiveness of the algorithm is the focus of the next step of the research work. This research was financially supported by National Key Technology R&D Programs of China (No.2015BAF28B01), Shandong Province Key Technology R&D Programs (No.2016GGX103006) and Saier Network-Next Generation Internet Technology Innovation Project (No.NGII20160116).
References
[1] Huang C L, Dun J F. A distributed PSO–SVM hybrid system with feature selection and parameter optimization[J]. Applied Soft Computing, 2008, 8(4):1381-1391.
[2] Zhao Y Q, Liu B X, Li G Y. Multimodal image registration based on PSO and gradient descent method[J]. Guangdianzi Jiguang/journal of Optoelectronics Laser, 2011, 22(6):940-944.
[3] Zhao H, Liu R, Zhao Z, et al. Analysis of Energy Consumption Prediction Model Based on Genetic Algorithm and Wavelet Neural Network[C]// International Workshop on Intelligent Systems and Applications. IEEE, 2011:1-4.
[4] Marron B S. An overview of support vector machines and kernel methods[J]. Ai Magazine, 2010, 23(3):31-41.
[5] Kennedy J, Eberhart R. Particle swarm optimization[C]// IEEE International Conference on Neural Networks, 1995. Proceedings. IEEE Xplore, 1995:1942-1948 vol.4.
[7] http://www.ucei.berkeley.edu/datamine/datamine.htm.
[8] Urbanek J, Barszcz T, Strączkiewicz M, et al. Normalization of vibration signals generated under highly varying speed and load with application to signal separation[J]. Mechanical Systems & Signal Processing, 2017, 82:13-31.
[9] Hui Z, Trevor H. Regularization and variable selection via the elastic net[J]. Journal of the Royal Statistical Society, 2005, 67(2):301-320.
[10] Iatan I F. A Fuzzy Gaussian Clifford Neural Network[M]// Issues in the Use of Neural Networks in Informula Retrieval. Springer International Publishing, 2017.