Power cable temperature data forwarding decision method based on seasonal decomposition
Technical Field
The invention belongs to the technical field of power cable data processing, and particularly relates to a power cable temperature data forwarding decision method based on seasonal decomposition.
Background
The cable, an important component of power transmission, is the "artery" of the electrical network. The reliability and safety of the cable determines the stability of the overall power system. The temperature of the cable is increased to accelerate the aging of the insulating layer, and the aged insulating layer wraps the heating copper core to easily cause electric fire, so that large-scale electric paralysis is caused, and the danger is brought to production and life. And overcurrent and residual current are a great cause of the temperature rise of the cable. Therefore, an important approach to prevent power failure and cable fire during surface temperature detection and overcurrent detection of an insulated cable layer. In the current power system, a temperature acquisition node deployed on a power cable reports data to a power gateway at regular time, and the gateway forwards all received data to a cloud server. However, as the number of temperature acquisition nodes is continuously increased, a large amount of invalid data is completely forwarded to the cloud server through the gateway, so that the pressure of the cloud server for processing the data is increased, and the bandwidth load of the gateway equipment is also increased.
Therefore, in order to solve the technical defects in the prior art, a solution is needed to solve the technical problems in the prior art.
Disclosure of Invention
In view of the above, the invention provides a power cable temperature data forwarding decision method based on seasonal decomposition, which adopts an independent prediction model for each node, thereby effectively improving the accuracy of data forwarding.
In order to solve the technical problems in the prior art, the technical scheme of the invention is as follows:
a power cable temperature data forwarding decision method based on seasonal decomposition is applied to a power cable temperature gateway, and comprises the following steps:
step S1: collecting historical actual measurement cable temperature data of a plurality of nodes in the power cable operation process, and constructing historical actual measurement data;
step S2: carrying out STL decomposition on the historical dataset of the node i by using an STL decomposition method, and carrying out seasonal trend decomposition on the dataset to obtain a seasonal item S in the dataset it Trend term T it And random item I it ;
Step S3: inputting the season term into a SARIMA model to obtain the season term of the node temperature data of the prediction periodInputting the trend item into an ARIMA model to obtain a trend item +.>Inputting the random term into an ARIMA model to obtain a random term +.>
Step S4: multiplying and combining seasonal items, trend items and random items of the node temperature data of the prediction periodObtaining the predicted value of the node temperature data
Step S5: the gateway receives the real-time temperature data x uploaded by the node i it Will measure x it And predicted valueComparing, namely calculating a residual error of the predicted value and the measured value, comparing the difference value of the residual error of the node i at the time t and the standard error of the predicted sequence with a given threshold value, and adjusting the data forwarding frequency of the node i according to a comparison result;
wherein, step S1 further comprises:
step S11: the power cable temperature gateway collects the cable temperature data on the j th day of the previous node i, and the sampling frequency of the node data is 5 minutes/time. Constructing a cable temperature measurement node i and historical measured temperature data of the jth dayWherein->The historical actual measurement data of the node i at the moment t on the j th day before is represented, i is more than or equal to 0 and less than or equal to 128, j is more than or equal to 1 and less than or equal to 30, and t is more than or equal to 0 and less than or equal to 288;
step S12: preprocessing the history data collected on the j th day of the node i, removing abnormal values, performing adjacent linear interpolation on the vacant values, and constructing a history data set X of 30 days before the node i it ={x i1t ,x i2t ,x i3t ,…,x i30t };
Further, step S2 includes:
step S21: a multiplication model of the historical dataset is constructed, and the formula is as follows:
X it =S it ×T it ×I it wherein S is it As season term, T it As trend term, I it Is a random term.
And converting the multiplication model into an addition model, wherein the formula is as follows:
log X it =log S it +log T it +log I it
step S22: removing a trend term in the logarithmic history data set of the node i, wherein the formula is as follows
Wherein->Represents the trend term at the end of the (k-1) th cycle, when k is 0,
step S23: performing periodic subsequence smoothing on the data set with the trend term removed to obtain a sequenceSubjecting the data set with trend term removed to 3 times of length moving average treatment to obtain sequence +.>And get the season item data set
Step S24: removing seasonal items in the log history data set of the node i, and processing the sequence through local weighted regression to obtain a trend item log data set
Step S25: respectively carrying out convergence judgment on the trend item and the logarithmic data set and the seasonal item, and if the data do not converge, returning to the step S22, and carrying out k+1st iteration on the data; otherwise, the data decomposition is finished, the logarithmic data set is converted into the original data set, and the node i historical data set X is obtained it Season term S in it Trend term T it And random item I it ;
Further, step S3 includes:
step S31: respectively for the season item data S it Trend item data T it Random item data I it Performing differential processing;
step S32: and (3) performing ADF (automatic frequency correction) inspection on the season term data, the trend term and the random term data after the difference processing, if the ADF statistic is smaller than a critical value of 0.01, considering the data to be stable, otherwise, returning to the step S31, and performing the difference processing again.
Step S33: predicting seasonal item data by using SARIMA model, using the seasonal item data stabilized by node i as input value of the model, and predicting seasonal item data of node iAs an output value of the model;
step S34: predicting trend item data and random item data by using two independent ARIMA models, wherein the random item data and the trend item data stabilized by the node i are respectively used as input values of the corresponding ARIMA models, and the random item prediction data of the node iTrend item prediction data->As an output value for the corresponding ARIMA model;
step S35: the seasonal item prediction model SARIMA, the trend item prediction model ARIMA and the random item prediction model ARIMA are trained in a circulating and iterating mode through a grid search method, optimal model parameters of the corresponding models are determined according to a minimum AIC principle, and the trained seasonal item prediction model SARIMA, trend item prediction model ARIMA and random item prediction model ARIMA are obtained;
step S36: season item data S of the node i it Trend item data T it And random item data I it Respectively inputting the season item prediction data sets into corresponding prediction models to obtain season item prediction data sets of the node iTrend item prediction dataset ++>And random term predictive dataset +.>
Further, step S5 includes:
in step S51, the standard error of the future day temperature predicted value of the node i is calculated according to the following formula:
wherein->Represents the mean value of the predicted sequence of node i, and n represents the number of samples.
Step S52, calculating the residual error between the current measured value and the estimated value of the node i, wherein the formula is as follows:
wherein delta it The residual value of node i at time t is indicated.
Step S53: if the absolute value of the residual fluctuates within the range of one standard deviation, the absolute value of the residual is satisfied with the absolute value of delta it |≤σ in If the fluctuation is considered to be normal, the process proceeds to step S55; otherwise, step S54;
step S54: if the absolute value of the residual error is outside one standard deviation and fluctuates within the range of two standard deviations, i.e. sigma is satisfied in ≤|δ it |≤2σ in Then the normal abnormal fluctuation data is regarded as, and the step S56 is carried out; otherwise, the data is regarded as serious abnormal fluctuation data, and the process goes to step S511;
step S55: the gateway records the number of the normal data through a normal data counter count 0;
step S56: the gateway records the number of the common abnormal data through a common abnormal data counter count 1;
step S57: if the normal data counter value is greater than or equal to 8, the step S59 is shifted to, otherwise, the step S510 is shifted to;
step S58: if the value of the ordinary abnormal data counter is greater than or equal to 4, the step S512 is carried out, otherwise, the step S510 is carried out;
step S59: calculating the average value of the count0 time of measurement data, and emptying a normal data counter count0 for recording the next time of data;
step S510: after the current data is processed, the step S51 is carried out, and the cable temperature data uploaded by the next node i is waited;
step S511: forwarding the processed data to a cloud server;
step S512: and calculating the average value of the count1 time of measurement data, and emptying a common abnormal data counter count1 for recording the next time of data.
The beneficial effects of the invention are as follows: a power cable temperature data forwarding decision method based on seasonal decomposition,
compared with the prior art, the seasonal decomposition-based power cable temperature data forwarding decision method disclosed by the invention aims at the problems that the real-time performance of processing data by a cloud server is reduced, the bandwidth load pressure of the gateway is increased and the like when a large amount of invalid cable temperature data with periodic characteristics is forwarded to the cloud server through the gateway in the current power system, and establishes a set of power cable temperature data forwarding decision method which at least comprises the following beneficial effects:
1. compressing the data volume forwarded to the cloud server by the gateway to improve the real-time performance of the cloud server in processing the data and reduce the network load pressure;
2. independent data analysis and prediction are carried out for each node, and the data forwarding decision method of different nodes is realized according to the load conditions of different cables, so that the accuracy of data forwarding is improved.
Drawings
In order to make the objects, technical solutions and advantageous effects of the present invention more clear, the present invention provides the following drawings for description:
fig. 1 is a flowchart illustrating steps of a power cable temperature data forwarding decision method based on seasonal decomposition according to an embodiment of the present invention;
fig. 2 is a flowchart showing steps S1, S2, S3, S4 in the seasonal decomposition-based power cable temperature data forwarding decision method according to an embodiment of the present invention;
fig. 3 is a flowchart of step S5 in the power cable temperature data forwarding decision method based on seasonal decomposition according to the embodiment of the invention.
Detailed Description
Preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
In order to solve the problem that a large amount of invalid cable temperature data with periodic characteristics in the current power system is forwarded to a cloud server, the invention provides a power cable temperature data forwarding decision method based on seasonal decomposition, and an independent prediction model is adopted for each node, so that the accuracy of data forwarding is improved.
Referring to fig. 1, a flow chart of a power cable temperature data forwarding decision method based on seasonal decomposition according to the present invention is shown, comprising the following steps:
step S1: collecting historical actual measurement cable temperature data of a plurality of nodes in the power cable operation process, and constructing historical actual measurement data;
step S2: carrying out STL decomposition on the historical dataset of the node i by using an STL decomposition method, and carrying out seasonal trend decomposition on the dataset to obtain a seasonal item S in the dataset it Trend term T it And random item I it ;
Step S3: inputting the season term into a SARIMA model to obtain the season term of the node temperature data of the prediction periodInputting the trend item into an ARIMA model to obtain a trend item +.>Inputting the random term into an ARIMA model to obtain a random term +.>
Step S4: predicting the predictionMultiplying and combining seasonal items, trend items and random items of the time period node temperature data to obtain a predicted value of the node temperature data
Step S5: the gateway receives the real-time temperature data x uploaded by the node i it Will measure x it And predicted valueComparing, namely calculating a residual error of the predicted value and the measured value, comparing the difference value of the residual error of the node i at the time t and the standard error of the predicted sequence with a given threshold value, and adjusting the data forwarding frequency of the node i according to a comparison result;
referring to fig. 2, step S1 further includes:
step S11: the power cable temperature gateway collects the cable temperature data on the j th day of the previous node i, and the sampling frequency of the node data is 5 minutes/time. Constructing a cable temperature measurement node i and historical measured temperature data of the jth dayWherein->The historical actual measurement data of the node i at the moment t on the j th day before is represented, i is more than or equal to 0 and less than or equal to 128, j is more than or equal to 1 and less than or equal to 30, and t is more than or equal to 0 and less than or equal to 288;
step S12: preprocessing the history data collected on the j th day of the node i, removing abnormal values, performing adjacent linear interpolation on the vacant values, and constructing a history data set X of 30 days before the node i it ={x i1t ,x i2t ,x i3t ,…,x i30t };
Further, step S2 includes:
step S21: a multiplication model of the historical dataset is constructed, and the formula is as follows:
X it =S it ×T it ×I it wherein S is it As season term, T it As trend term, I it Is a random term.
And converting the multiplication model into an addition model, wherein the formula is as follows:
log X it =log S it +log T it +log I it
step S22: removing a trend term in the logarithmic history data set of the node i, wherein the formula is as follows
Wherein->Represents the trend term at the end of the (k-1) th cycle, when k is 0,
step S23: performing periodic subsequence smoothing on the data set with the trend term removed to obtain a sequenceSubjecting the data set with trend term removed to 3 times of length moving average treatment to obtain sequence +.>And get the season item data set
Step S24: removing seasonal items in the log history data set of the node i, and processing the sequence through local weighted regression to obtain a trend item log data set
Step S25: respectively carrying out convergence judgment on the trend item and the logarithmic data set and the seasonal item, and if the data do not converge, returning to the step S22, and carrying out k+1st iteration on the data; otherwise, the data decomposition is finished, the logarithmic data set is converted into the original data set, and the node i historical data set X is obtained it Season term S in it Trend term T it And random item I it ;
Further, step S3 includes:
step S31: respectively for the season item data S it Trend item data T it Random item data I it Performing differential processing;
step S32: and (3) performing ADF (automatic frequency correction) inspection on the season term data, the trend term and the random term data after the difference processing, if the ADF statistic is smaller than a critical value of 0.01, considering the data to be stable, otherwise, returning to the step S31, and performing the difference processing again.
Step S33: predicting seasonal item data by using SARIMA model, using the seasonal item data stabilized by node i as input value of the model, and predicting seasonal item data of node iAs an output value of the model;
step S34: predicting trend item data and random item data by using two independent ARIMA models, wherein the random item data and the trend item data stabilized by the node i are respectively used as input values of the corresponding ARIMA models, and the random item prediction data of the node iTrend item prediction data->As an output value for the corresponding ARIMA model;
step S35: the seasonal item prediction model SARIMA, the trend item prediction model ARIMA and the random item prediction model ARIMA are trained in a circulating and iterating mode through a grid search method, optimal model parameters of the corresponding models are determined according to a minimum AIC principle, and the trained seasonal item prediction model SARIMA, trend item prediction model ARIMA and random item prediction model ARIMA are obtained;
step S36: season item data S of the node i it Trend item data T it And random item data I it Respectively inputting the season item prediction data sets into corresponding prediction models to obtain season item prediction data sets of the node iTrend item prediction dataset ++>And random term predictive dataset +.>
Referring to fig. 3, a specific flowchart of step S5 in the present invention is shown, where step S5 includes:
in step S51, the standard error of the future day temperature predicted value of the node i is calculated according to the following formula:
wherein->Represents the mean value of the predicted sequence of node i, and n represents the number of samples.
Step S52, calculating the residual error between the current measured value and the estimated value of the node i, wherein the formula is as follows:
wherein delta it The residual value of node i at time t is indicated.
Step S53: if the absolute value of the residual fluctuates within the range of one standard deviation, the absolute value of the residual is satisfied with the absolute value of delta it |≤σ in If the fluctuation is considered to be normal, the process proceeds to step S55; otherwise, step S54;
step S54: if the absolute value of the residual error is outside one standard deviation and fluctuates within the range of two standard deviations, i.e. sigma is satisfied in ≤|δ it |≤2σ in Then the normal abnormal fluctuation data is regarded as, and the step S56 is carried out; otherwise, the data is regarded as serious abnormal fluctuation data, and the process goes to step S511;
step S55: the gateway records the number of the normal data through a normal data counter count 0;
step S56: the gateway records the number of the common abnormal data through a common abnormal data counter count 1;
step S57: if the normal data counter value is greater than or equal to 8, the step S59 is shifted to, otherwise, the step S510 is shifted to;
step S58: if the value of the ordinary abnormal data counter is greater than or equal to 4, the step S512 is carried out, otherwise, the step S510 is carried out;
step S59: calculating the average value of the count0 time of measurement data, and emptying a normal data counter count0 for recording the next time of data;
step S510: after the current data is processed, the step S51 is carried out, and the cable temperature data uploaded by the next node i is waited;
step S511: forwarding the processed data to a cloud server;
step S512: and calculating the average value of the count1 time of measurement data, and emptying a common abnormal data counter count1 for recording the next time of data.
In addition to the embodiments described above, other embodiments of the invention are possible. All technical schemes formed by equivalent substitution or equivalent transformation are within the protection scope of the invention.
The present invention has been described in detail above, but the specific implementation form of the present invention is not limited thereto. Various modifications or adaptations may occur to one skilled in the art without departing from the spirit and scope of the claims herein.