A kind of rectifier on-line monitoring method based on machine learning
Technical field
The present invention relates to a kind of rectifier on-line monitoring method based on machine learning.
Background technique
Rectifier (Rectifier) is a fairing, can be converted exchange (AC) to direct current (DC), the equipment is main
There are two functions, first is that alternating current (AC) is become direct current (DC), load is supplied after filtering;Second is that being supplied to energy-storage system
Electricity.As a part of power supply system, the operating status of rectifier and the stability of power supply system are directly related, by rectification
The operating status of device equipment is monitored, judges and early warning, can further promote safety when power supply system operation.
It up to the present, is mainly both at home and abroad the electricity acquired when equipment is run to the monitoring mode of rectifier operating status
Stream, environment temperature, ambient humidity, device temperature data are simultaneously shown by numerical value.However, existing monitoring mode is on the one hand
The relationship that influences each other between variable can not be depicted, on the other hand have to artificial setting when carrying out rectifier state-evaluation
Metrics-thresholds (such as device temperature threshold value), and assessment rectifier that then can not be accurate and effective when index value is in threshold range
Integrality and its variation tendency.
Summary of the invention
The technical problems to be solved by the invention are just to provide a kind of rectifier on-line monitoring side based on machine learning
Method, this method using rectifier true temperature value as state-evaluation index, building rectifier current, power, ambient temperature and humidity with it is whole
Temperature model between stream device true temperature calculates rectification using temperature model when being monitored to rectifier state in real time
The predicted value of device temperature, and the comparison of device predicted temperature value Yu true temperature value is carried out, by differentiating to result, in real time
The improper operation trend of rectifier is screened out, the operating status of rectifier is monitored.
Above-mentioned technical problem is solved, the present invention adopts the following technical scheme:
A kind of rectifier on-line monitoring method based on machine learning, it is characterized in that the following steps are included:
S1, data acquisition:
Using current sensor, temperature sensor and humidity sensor acquisition rectifier run when electric current, device temperature,
The data of environment temperature and ambient humidity;
Data processing: S2 carries out dynamic smoothing processing to current data, method includes gliding smoothing method, asymmetric part
Weighted regression scatterplot exponential smoothing, moving window intends or moving-polynomial smoother method;
S2-1 carries out dynamic smoothing processing to current data using gliding smoothing method, that is, formula (1);Due to curent change wave
Move it is larger, directly using electric current carry out prediction will lead to result fluctuate it is larger;Therefore, it is needed before carrying out modeling and temperature prediction
Current data is smoothed, it is ensured that predicted temperature does not occur biggish fluctuation;
In the present invention, gliding smoothing processing is carried out to current data using gliding smoothing method:
Wherein,For current time smoothed out current value, ItFor the actual current value at current time, (1,2 ..., N) is
Smooth how many a time points backward at current time, such as It-1For the current value at t-1 moment, It-2For the current value at t-2 moment, It-N
For the current value at t-N moment;
S2-2 constructs new derivative variable using current data:
It is constructed for current data and derives variable, and derivative types of variables is worth comprising current squaring value, electric current cube, is smooth
Current squaring value, smooth electric current cube value, the current squaring aggregate-value (formula (2)) in a period of time, the electricity in a period of time
Flow cube aggregate-value (formula (3)), electric current maximum (formula (4)), minimum value (formula (5)) and standard deviation (formula (6));
It_max=max (It-1,It-2,…,It-N)………………………(4);
It_min=min (It-1,It-2,…,It-N)………………………(5);
It_std=std (It-1,It-2,…,It-N)………………………(6);
In formula,For the current squaring value of t moment,For the current squaring value at t-1 moment,For the t-2 moment
Current squaring value,For the current squaring value at t-N moment;It is worth for the electric current cube of t moment,It is vertical for the electric current at t-1 moment
Side's value,It is worth for the electric current cube at t-2 moment,It is worth for the electric current cube at t-N moment;For [t-N, the t-1] time
The aggregate-value of current squaring in section,For [t-N, t-1] in the period electric current cube aggregate-value, It_maxFor [t-N, t-
1] in the period electric current maximum value, It_minFor [t-N, t-1] in the period electric current minimum value, It_stdWhen for [t-N, t-1]
Between in section current value standard deviation;It-1For the current value of t moment, It-2For the current value at t-2 moment, It-NFor the electricity at t-N moment
Flow valuve;
S2-3, data normalization:
It by data bi-directional scaling, is allowed to fall into a minizone, the unit limitation of data is eliminated, convenient for not commensurate
Or the index of magnitude is able to carry out and compares and weight;
In the present invention, data normalization is carried out to each variable using z-score method (regular method) (formula 9):
σX=std (x1,x2,…,xN)………………………(8);
It may also is that min-max standardization, the conversion of log function and atan function conversion method other than z-score method;
Machine learning: S3 uses rectifier history data with Ridge Regression Method, Lasso regression, random gloomy
Woods, decision tree, gradient promote decision tree, neural network or RNN algorithm and are modeled;
The present invention is modeled using rectifier history data and Ridge Regression Method, electricity when building rectifier is run
Corresponding relationship between stream, environment temperature, ambient humidity and device temperature, i.e. commutator temperature model;
For linear regression problem, the objective function of least square method is (formula 10):
In formula:
xij——xi=(xi1,…,xip)TFor the argument value of i-th of observation sample, which shares p characteristic variable;
yi--- the dependent variable value (needing equipment actual temperature value) of i-th of sample;
α --- intercept item;
βj--- the coefficient of j-th of characteristic variable;
The vector that β --- characteristic variable coefficient is constituted;
θ=(α, β) is enabled, then objective function becomes minimizing | | X θ-y | |2;Derivation is carried out to the parameter of objective function, it can
Obtain the solution formula (formula 11) of the objective function:
θ=(XTX)-1XTy………………………(11);
In formula, θ is parameter vector to be asked, and X is sample characteristics matrix, and y is dependent variable value vector;When X is not that column are full
When order, or there are when multicollinearity between column, XTThe determinant of X is close to 0 (i.e. XTX is close to unusual), then calculate (XTX)-1
When error can be very big, lead to traditional least square method deficient in stability and reliability;
Therefore, it by abandoning the unbiasedness of least square method, is returned using losing partial information, reducing precision as cost
Coefficient more meets practical, more reliable homing method:
A regularization term is added in objective function, so that objective function becomes minimizing | | X θ-y | |2+||λI||2;
After carrying out derivation to the objective function after regularization, it can get objective function solution formula (formula 12), this method
Referred to as Ridge Regression Method;
θ=(XTX+λI)-1XTy………………………(12);
In formula, λ is ridge parameter, and I is unit matrix, and λ I is increased regular terms;
S4, model prediction:
For the new data that rectifier operation generates, data are passed into commutator temperature model after carrying out data processing,
Temperature of the rectifier under current flow, environment temperature and ambient humidity is predicted, by comparing the true temperature of rectifier and true
Real temperature, screens whether commutator temperature presses the variation of history normal rule in real time;
S5, rectifier state and warning grade calculate
Since current fluctuation is larger, model is poor in the prediction result of partial data point, to avoid program from reporting by mistake, in model
Differentiated on the basis of prediction using interval judgement and the mode of dynamic monitoring;
The step of interval judgement and dynamic monitoring process (being detailed in Fig. 3) specific as follows:
4) judge whether the residual absolute value of current device predicted temperature and true temperature is greater than given threshold, when residual error is exhausted
When being greater than threshold value to value, monitoring program starts automatically, is monitored to equipment state;
5) residual absolute value of subsequent N number of data point is counted, when the residual absolute value of wherein n data point is greater than
When threshold value, device status information Tp adds 1 automatically;
6) step (2) are repeated, the residual absolute value of n data point occurs more than or equal to threshold when there is continuous p section
It is worth (i.e. Tp=p), then adds 1 automatically for warning information Tw;If wherein residual absolute value is unsatisfactory for condition in a certain section, Tp
It is reset with Tw numerical value, return step (1) restarts monitoring model prediction result.
The utility model has the advantages that the technical program fundamentally solves is manually set alert status value, index value in threshold value at present
The simple monitoring mode of rectifier state can not be effectively assessed when in range.Rectifier is constructed by using history data
Electric current, ambient temperature and humidity when normal operation and the temperature model between commutator temperature can screen out equipment in follow-up operation mistake
Irregular change trend in journey.Meanwhile by using dynamic monitoring program and section diagnostic method, so that the technical solution has
Stronger anti-interference, avoids program from reporting by mistake.
Detailed description of the invention
Fig. 1 invention flow chart;
Fig. 2 commutator temperature real-time state monitoring and prognostic chart;
Fig. 3 rectifier state/warning grade calculation flow chart;
Fig. 4 rectifier state/warning grade display figure.
Specific embodiment
Technology contents, construction feature, the purpose and effect realized for detailed description technical solution, below in conjunction with specific
Example simultaneously cooperates attached drawing to be described in detail.
Rectifier on-line monitoring method embodiment based on machine learning of the invention, comprising the following steps:
S1, data acquisition:
Using current sensor, temperature sensor and humidity sensor acquisition rectifier run when electric current, device temperature,
The data of environment temperature and ambient humidity;
S2, data processing:
S2-1 carries out dynamic smoothing processing (formula 1) to electric current;Since curent change fluctuation is larger, electric current is directly used
Carry out prediction will lead to result fluctuation it is larger;Therefore, it needs to carry out current data before carrying out modeling and temperature prediction smooth
Processing, it is ensured that predicted temperature does not occur biggish fluctuation;
In the present invention, gliding smoothing processing is carried out to current data using gliding smoothing method:
Wherein,For current time smoothed out current value, ItFor the actual current value at current time, (1,2 ..., N) is
Smooth how many a time points backward at current time, such as It-1For the current value at t-1 moment, It-2For the current value at t-2 moment, It-N
For the current value at t-N moment;
Further, it is also possible to be fitted using asymmetric local weighted recurrence scatterplot exponential smoothing (LOWESS), moving window multinomial
Formula smoothing method;
S2-2 constructs new derivative variable using current data:
It is constructed for current data and derives variable, and derivative types of variables is worth comprising current squaring value, electric current cube, is smooth
Current squaring value, smooth electric current cube value, the current squaring (formula (2)) in a period of time, cube aggregate-value (formula (3)),
Current maxima (formula (4)), minimum value (formula (5)) and standard deviation (formula (6));
It_max=max (It-1,It-2,…,It-N)………………………(4);
It_min=min (It-1,It-2,…,It-N)………………………(5);
It_std=std (It-1,It-2,…,It-N)………………………(6);
In formula,For the current squaring value of t moment,For the current squaring value at t-1 moment,For the t-2 moment
Current squaring value,For the current squaring value at t-N moment;It is worth for the electric current cube of t moment,It is vertical for the electric current at t-1 moment
Side's value,It is worth for the electric current cube at t-2 moment,It is worth for the electric current cube at t-N moment;For [t-N, the t-1] time
The aggregate-value of current squaring in section,For [t-N, t-1] in the period electric current cube aggregate-value, It_maxFor [t-N, t-
1] in the period electric current maximum value, It_minFor [t-N, t-1] in the period electric current minimum value, It_stdWhen for [t-N, t-1]
Between in section current value standard deviation;It-1For the current value of t moment, It-2For the current value at t-2 moment, It-NFor the electricity at t-N moment
Flow valuve;
S2-3, data normalization:
It by data bi-directional scaling, is allowed to fall into a small specific sections, the unit limitation of data is eliminated, convenient for not
The index of commensurate or magnitude, which is able to carry out, to be compared and weights;
In the present invention, data normalization is carried out to each variable using z-score method (regular method) (formula 9):
σX=std (x1,x2,…,xN)………………………(8);
S3, machine learning:
It is modeled using rectifier history data and Ridge Regression Method, electric current, ring when building rectifier is run
Corresponding relationship between border temperature, ambient humidity and device temperature, i.e. commutator temperature model;
For linear regression problem, the objective function of least square method is (formula 10):
In formula:
xij——xi=(xi1,…,xip)TFor the argument value of i-th of observation sample, which shares p characteristic variable;
yi--- the dependent variable value (needing equipment actual temperature value) of i-th of sample;
α --- intercept item;
βj--- the coefficient of j-th of characteristic variable;
The vector that β --- characteristic variable coefficient is constituted;
θ=(α, β) is enabled, then objective function becomes minimizing | | X θ-y | |2;Derivation is carried out to the parameter of objective function, it can
Obtain the solution formula (formula 11) of the objective function:
θ=(XTX)-1XTy………………………(11);
In formula, θ is parameter vector to be asked, and X is sample characteristics matrix, and y is dependent variable value vector.When X is not that column are full
When order, or there are when multicollinearity between column, XTThe determinant of X is close to 0 (i.e. XTX is close to unusual), then it calculates
(XTX)-1When error can be very big, lead to traditional least square method deficient in stability and reliability;
Therefore, it by abandoning the unbiasedness of least square method, is returned using losing partial information, reducing precision as cost
Coefficient more meets practical, more reliable homing method:
A regularization term is added in objective function, so that objective function becomes minimizing | | X θ-y | |2+||λI||2;
After carrying out derivation to the objective function after regularization, it can get objective function solution formula (formula 12), this method
Referred to as Ridge Regression Method;
θ=(XTX+λI)-1XTy………………………(12);
In formula, λ is ridge parameter, and I is unit matrix, and λ I is increased regular terms.
S4, model prediction
For the new data that rectifier operation generates, data are passed into commutator temperature model after carrying out data processing,
Temperature of the rectifier under current flow, environment temperature and ambient humidity is predicted, by comparing the true temperature of rectifier and true
Real temperature, screens whether commutator temperature presses the variation of history normal rule in real time;
S5, rectifier state and warning grade calculate
Since current fluctuation is larger, model is poor in the prediction result of partial data point, to avoid program from reporting by mistake, in model
Differentiated on the basis of prediction using interval judgement and the mode of dynamic monitoring;
The step of interval judgement and dynamic monitoring process (being detailed in Fig. 3) specific as follows:
7) judge whether the residual absolute value of current device predicted temperature and true temperature is greater than given threshold, when residual error is exhausted
When being greater than threshold value to value, monitoring program starts automatically, is monitored to equipment state;
8) residual absolute value of subsequent N number of data point is counted, when the residual absolute value of wherein n data point is greater than
When threshold value, device status information Tp adds 1 automatically;
9) step (2) are repeated, the residual absolute value of n data point occurs more than or equal to threshold when there is continuous p section
It is worth (i.e. Tp=p), then adds 1 automatically for warning information Tw;If wherein residual absolute value is unsatisfactory for condition in a certain section, Tp
It is reset with Tw numerical value, return step (1) restarts monitoring model prediction result.
Specific process is as shown in Figure 1, be divided into three steps.
1) step 1 is the modeling of rectifier historical data.It is modeled using rectifier historical data, building rectifier is normal
Temperature model under operating status, the step are first used " at data using the sport technique segment of " data processing " and " machine learning "
Reason " technology carries out processing and construction feature engineering to the initial data of rectifier, reuses in " machine learning " sport technique segment
Ridge Regression Method constructs commutator temperature model.
2) step 2 is rectifier status monitoring and prediction (being detailed in Fig. 2).Rectifier status data is acquired, is on the one hand carried out
Status monitoring.On the other hand, the commutator temperature model that step 1 constructs is used in combination, using " data processing ", " model prediction "
Sport technique segment, prediction rectifier temperature value in normal state.First use " data processing " technology to new data at
Identical characteristic variable is managed and constructs, then data pass to commutator temperature model by treated, are calculated by temperature model
The predicted value of commutator temperature.
3) step 3 is that rectifier state/warning grade calculates (being detailed in Fig. 3).The step uses " rectifier state and early warning
The technology of rating calculation " link.Commutator temperature predicted value is compared with true value in real time, using interval judgement and is moved
State monitors the operating status for judging rectifier, provides the warning information and status information (being detailed in Fig. 4) of rectifier in real time.The early warning
Information is divided into three sections.First section warning level is 0 (green), indicates that equipment operates normally.Second section early warning
Rank is 1-11 (yellow), indicates that equipment state needs " attention ".Second section warning level is 12 (red), indicates equipment
State "abnormal".