2.1. Preliminary
In the electrical microenvironment, the topologically logic relationship among the electrical appliances is shown in
Figure 1. It is assumed that the power consumption is mathematically positive, and the power production is mathematically negative. The mathematically positive load includes the TV set, washing machine, microwave oven, refrigerator, and the energy storage battery in charging time slot, etc., while the negative load refers to the energy storage battery in the discharge that provides the power consumption time slot. In the case of the whole time slot, the energy storage battery shows partially positive and negative power consumption curve with alternating operation mode. The other commonly used electrical appliances continue to maintain the original operation mode of power consumption. For the convenience of reading, most of the important mathematical symbols are adopted in this paper, and the corresponding description is listed in
Table 1.
In this way, we can define the aggregate power consumption on the meter or the plug board as
, where
T is the length of the entire time slot. Suppose that there are
N electrical appliances, the
th electrical equipment in power consumption expression of time slot
t is
; therefore,
where
represents the energy storage battery with the mathematically positive or negative power consumption,
represents other kinds of commonly used electrical appliances, and
represents the random noise of system operation and measurement.
Due to practical constraints, we cannot provide all electrical appliances, charging and discharging appliances with some safe, expensive and large power sensors, or configure the corresponding signal processing and data transmission module. Generally speaking, only a single power sensor device is deployed at the entrance of the electrical microenvironment, such as a building, a room, or a station. In the case of a few power sensor points’ deployment, we can only measure and record the aggregate power data expressed as
, but we often hope to get the power consumption of these electrical appliances, which is inferred and computed by signal processing and data mining methods. Inspired by the theory of pattern recognition and numerical estimation, it is assumed that the electrical appliances estimated value
. In addition, then add the estimated individual electrical appliance power consumption values to get a new aggregate estimated value
, which is compared with the original aggregate power consumption data
. The goal of estimation is to make the error between the estimated aggregate value and the actual aggregate value as small as possible, which can be formally expressed as:
There are many specific modeling and solving methods for general expression (
2). Inspired by the expression of Fourier series, any waveform theory can be expressed as the combination of fundamental waves. For load disaggregation modeling methods about the safety hazard factors detection, in order to obtain explicable results, we use the following form to express:
where
is the signal to be decomposed,
B is the Fourier basis functions, and
A is the coefficients of the basis functions. However, on the whole, the actual deployment of the electrical IOT safety monitoring systems is affected by some factors, such as a lower hardware budget of the sensor, higher computation cost of signal processing and data analysis, more storage and communication consumption of the back end system, and a bigger amount of connected internet data. Because such systems generally do not acquire high-frequency load data information in real time, it is unrealistic to directly use the Fourier transform method to implement high-frequency signal processing. In this case, the selection of similar and alternative solutions has become one of the basic modelings and solutions.
In this paper, the dictionary learning method is adopted to learn the basis matrix of each electrical appliance from the time-series data sampled at low frequency, and the activation matrix corresponding to the basis matrix is similar to the basis function and coefficient in the Fourier transform method. In Equation (
4),
D represents the basis matrix, and
C represents the sparse coefficient matrix. The error between the expression of the estimated aggregate obtained by the combination of
D and
C can be measured by the Euclidean distance. Dictionary learning and sparse coding theory show that
C should be as sparse as possible. While keeping the error small, sparse means to make as many zero items in the sparse coefficient matrix as possible,
where
is Euclidean distance expression, and
is the penalty term.
norm or
norm regularization helps reduce overfitting and implements sparse solution problems.
norm regularization uses proximal gradient descent. Tibshirani et al. [
24] described the reason why the
norm is chosen for the penalty item. The
norm represents a rectangle in the coordinate system of the solution, intersecting a circle constructed by the quadratic function of the objective function, usually on the coordinate axis. In the coordinate system of the solution,
norm presents a circle with the origin of coordinates as the center of the circle, and intersects the circle constructed by the quadratic function of the objective function. Generally, it will not intersect on the coordinate axis. It can be seen from the properties of the solution of activation matrix or sparse representation that the sparsity of the solution of
norm type is better than that of
norm. In this way, we can construct the objective function of sparse coding for dictionary learning of
norm type, and finally solve the safety hazard factors detection problem to satisfy the requirements of the system.
2.2. Determination of Objective Function
In this section, Equation (
4) is further transformed into an objective function with coefficients. According to the derivation process of Taylor’s Equation, the transformation and derivation of L-Lipschitz condition realization problem are figured out in [
25].
Assuming that ∇ represents a differential operator and the objective function is
, the problem is constructed as the following objective function:
where
z is the independent variable. In addition, find the smallest
z value by minimizing the objective function
. If the objective function
is differentiable, and
meets the L-Lipschitz condition, where
is constant, the gradient inequality is formed as follows:
The second-order Taylor expansion of the objective function
is carried out near
, and its expression is approximately as follows:
where
is the estimated value of the object function,
is the specific value of
z,
L is constant coefficient value, and
is constant. The minimum value will be obtained at
:
Through the gradient descent method,
can be minimized by iterative computations. With each step of gradient descent iteration, the quadratic function
is minimized to get
where
L can be simplified as constant value 1.