Temperature compensation method and system for carbon brush current of phase modifier based on extreme learning machine
Through the online extreme learning machine (OSELM) as the temperature compensation model, the problem of the Hall current sensor reducing measurement accuracy when temperature changes is solved, and high accuracy online measurement of carbon brush current is achieved.
Patent Information
- Application Number
- CN202311369422.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-20
- Publication Date
- 2025-03-14
AI Technical Summary
The performance of Hall current sensors is affected when temperature changes, resulting in a decrease in measurement accuracy. The existing BP neural network temperature compensation method is prone to falling into local extremely small points and cannot improve measurement accuracy.
The online extreme learning machine (OSELM) is used as the temperature compensation model, and the limit learning machine is trained by calibrating the temperature and current value range to calculate the measured current value after temperature compensation.
It improves the accuracy of online measurement of carbon brush current, reduces the impact of temperature on Hall current sensor, and solves the problem of reduced measurement accuracy caused by temperature drift.
Smart Images

Figure CN119622194A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power grids, and in particular to a temperature compensation method and system for phase-shifting carbon brush current based on an extreme learning machine. Background Art
[0002] Due to the particularity of carbon brushes, this part should have good anti-grounding measures. This requires that the introduced measuring equipment should use non-contact measuring equipment as much as possible, keep a safe distance from the live parts, and adopt reliable protective measures. The Hall current sensor is a current detection device made based on the Hall effect. It has the advantages of non-contact measurement, high accuracy, good dynamic performance, and strong overload capacity, which meets the actual needs of safe operation of carbon brushes in phase regulators.
[0003] However, the Hall element is made of semiconductor elements. The resistivity, mobility and carrier concentration of semiconductor materials will change with temperature, thus affecting the accuracy of current measurement. As a result, the performance of the Hall element is greatly affected by the external temperature. Therefore, the use of temperature compensation measures in the Hall current sensor is of great significance to the measurement accuracy.
[0004] The BP neural network commonly used in temperature compensation of Hall current sensors uses a random method for the weights between the input layer and the hidden layer and the threshold of the hidden layer neurons. At the same time, it uses a negative gradient descent algorithm. During the convergence process, it often falls into a local minimum point and cannot reach the global optimum, resulting in randomness in the training results. Even if it is solved by genetic algorithms and artificial immune algorithms, it is still impossible to fundamentally improve the accuracy of BP neural network data fusion applied to Hall current sensors. As a simple and effective single hidden layer feedforward neural network algorithm, the extreme learning machine ELM only needs to set the number of hidden layer neurons. The training process does not need to adjust the weights between the input layer and the hidden layer and the threshold of the hidden layer neurons, and it produces a unique global optimal solution, with a fast learning speed, 1 iteration number, and good generalization ability. Summary of the invention
[0005] The present invention aims to disclose a temperature compensation method and system for phase shifter carbon brush current based on extreme learning machine, so as to reduce the influence of temperature on Hall current sensor and improve the accuracy of online measurement of carbon brush current.
[0006] To achieve the above object, the method disclosed in the present invention comprises:
[0007] Step S1, obtaining the real-time carbon brush current value to be compensated and its corresponding ambient temperature value;
[0008] Step S2, judging whether the collected carbon brush current value and ambient temperature value are within the calibrated temperature value range and the calibrated current value range of the temperature compensation model; if not, retraining the carbon brush current temperature compensation model so that the currently collected carbon brush current value and ambient temperature value are within the calibrated current value range and the calibrated temperature value range of the carbon brush current temperature compensation model; if so, inputting the current value to be compensated and the ambient temperature value into the currently trained current temperature compensation model, and then calculating the measured current value after temperature compensation;
[0009] The carbon brush current temperature compensation model is an online extreme learning machine OSELM, and the training process of the current temperature compensation model includes:
[0010] Step 1.1, calibrate the temperature training range from A to B, and the step temperature value c, calibrate the current value training range from D to F, and the step current value e;
[0011] Step 1.2, connect a simple loop of a standard current source, place part of the wire in a temperature-controlled thermostat, place the Hall current sensor in the thermostat to measure the current flowing through the wire, set the temperature range of the thermostat to the calibration temperature value A, and wait for the temperature to stabilize;
[0012] Step 1.3, adjust the output current value of the standard current source from D to F according to the progressive current value e, input the calibration standard current value to the Hall current sensor from outside the constant temperature box, and record the output current to be compensated by the Hall current sensor;
[0013] Step 1.4, according to the step temperature value c, adjust the temperature of the constant temperature box to the next fixed value, repeat step 1.3 until the collection of the current to be compensated under the calibration temperature value B is completed, and the current values to be compensated of all the calibration current values under each calibration temperature are obtained;
[0014] Step 1.5, record the standard current output by the standard source as I0, record the output current of the Hall current sensor as I1, and record the temperature value measured by the infrared temperature sensor as T0;
[0015] The number of neurons in the input layer and the number of neurons in the hidden layer of the extreme learning machine OSELM are both set to 2, and the weights and thresholds are randomly generated. The standard current output by the standard source is I0, the output current of the Hall current sensor is I1, and the temperature value measured by the infrared temperature sensor is T0, which are input into the extreme learning machine OSELM; the current temperature compensation model is obtained after training and testing with samples.
[0016] Preferably, in the training process of the current temperature compensation model, the initial stage of the online extreme learning machine OSELM includes:
[0017] Step A1, assuming that the current to be compensated is X1 and the constant temperature box temperature is X2, that is, the number of neurons in the input layer is 2;
[0018] The input matrix X is:
[0019]
[0020] Wherein, the first digit 1 and 2 in the subscript X represent the current and temperature to be compensated respectively, the second digit represents the sample number, and the total number of samples is N;
[0021] The output matrix Y0 is:
[0022] Y0=[Y1…YN]T;
[0023] Wherein, YN represents the calibration current value corresponding to the Nth sample;
[0024] Set the number of neurons in the hidden layer to 2, randomly generate the weights and thresholds from the input layer to the hidden layer, and the connection weight matrix between the input layer and the hidden layer is w:
[0025]
[0026] In the above formula, w ij Represents the connection weight between the i-th neuron in the input layer and the j-th neuron in the hidden layer;
[0027] Hidden layer neuron threshold b:
[0028]
[0029] Among them, b1 is the threshold corresponding to the first neuron, and b2 is the threshold corresponding to the second neuron;
[0030] Step A2: Calculate the initial output matrix of the hidden layer. Assume that the activation function of the hidden layer neuron is G(w,x,b), then the hidden layer matrix is:
[0031]
[0032] Wherein, xN is the temperature and current data corresponding to the Nth sampling point;
[0033] The weight matrix connecting the hidden layer and the output layer is:
[0034]
[0035] Among them, β jk represents the connection weight between the jth (including 1 and 2) neuron in the hidden layer and the kth neuron in the output layer, k = 1, j includes 1 and 2;
[0036] Step A3, by ||Hβ-Y T ||=0, calculate the output weight matrix β=H -1 T.
[0037] Furthermore, in the training process of the current temperature compensation model, the online sequential learning stage of the online extreme learning machine OSELM includes:
[0038] Step B1: When a new sample is added, assume that N K+1 samples, in order to obtain β K+1 Make J get the minimum value:
[0039]
[0040] set up is the total number of samples that have been learned, then the new samples added are:
[0041]
[0042] Step B2: Solve the minimum value of the above formula to get the output weight β k+1 The recursive relationship includes:
[0043] Calculate the initial output matrix of the hidden layer:
[0044]
[0045] Update M using the recursive relation k+1 , find the output weight β k+1 ,in:
[0046]
[0047]
[0048] Step B3, let k=k+1, and go to step B1 of the online sequence learning phase, and so on, until the learning of all samples is completed.
[0049] To achieve the above objectives, the present invention also discloses a temperature compensation system for phase shifter carbon brush current based on an extreme learning machine, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the above methods when executing the computer program.
[0050] The present invention has the following beneficial effects:
[0051] The carbon brush current of the phase regulator is compensated based on the online extreme learning machine OSELM, which solves the problem of temperature drift caused by temperature fluctuations during online monitoring of the carbon brush current of the phase regulator, resulting in reduced measurement accuracy, and improves the accuracy of online measurement of the carbon brush current.
[0052] The present invention will be further described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] The drawings constituting a part of this application are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0054] Figure 1 It is a flow chart of a carbon brush current compensation method based on an online extreme learning machine OSELM disclosed in an embodiment of the present invention.
[0055] Figure 2 It is a flowchart of the training process of the carbon brush current temperature compensation model disclosed in the embodiment of the present invention.
[0056] Figure 3 It is the schematic diagram of the online extreme learning machine OSELM. DETAILED DESCRIPTION
[0057] The embodiments of the present invention are described in detail below with reference to the accompanying drawings, but the present invention can be implemented in many different ways as defined and covered by the claims.
[0058] Example 1
[0059] like Figure 1 As shown, this embodiment discloses a carbon brush current compensation method based on an online extreme learning machine OSELM, which specifically includes the following steps:
[0060] Step S1: A Hall current sensor collects the carbon brush current to be compensated.
[0061] Step S2: The infrared temperature sensor collects the ambient temperature.
[0062] Step S3, inputting the carbon brush current value to be compensated and its corresponding ambient temperature into the trained temperature compensation model;
[0063] Step S4, judging whether the collected carbon brush current value and ambient temperature value are within the calibrated temperature value range and calibrated current value range of the current temperature compensation model; if not, go to step S5; otherwise, go to step S6. The temperature compensation model is an online extreme learning machine OSELM.
[0064] Step S5, retraining the carbon brush current temperature compensation model so that the currently collected carbon brush current value and ambient temperature value are within the calibrated current value range and calibrated temperature value range of the carbon brush current temperature compensation model.
[0065] Step S6: input the current value to be compensated and the ambient temperature value into the currently trained current temperature compensation model, then calculate the measured current value after temperature compensation, and output the compensated carbon brush current value. This step is to expand the number of samples based on the test environment such as the constant temperature box described below to cover the value range of the current input parameters, and then recalculate the compensated current value based on the trained current temperature compensation model.
[0066] like Figure 2 As shown in the figure, the training process of the carbon brush current temperature compensation model includes:
[0067] Step 1: calibrate the temperature training range from A to B, and the step temperature value is c, calibrate the current value training range from D to F, and the step current value is e.
[0068] Step 2: Connect a simple loop of a standard current source, place part of the wire in a temperature-controlled thermostat, place the Hall current sensor in the thermostat to measure the current flowing through the wire, set the temperature range of the thermostat to the calibration temperature value A, and wait for the temperature to stabilize.
[0069] Step three, adjust the output current value of the standard current source from D to F according to the progressive current value e, input the calibrated standard current value to the Hall current sensor from outside the constant temperature box, and record the output current to be compensated of the Hall current sensor.
[0070] Step 4: adjust the temperature of the constant temperature box to the next fixed value according to the step temperature value c, and repeat step 3 until the collection of the current to be compensated under the calibration temperature value B is completed, and the current values to be compensated of all the calibration current values under each calibration temperature are obtained.
[0071] Step 5: record the standard current output by the standard source as I0, record the output current of the Hall current sensor as I1, and record the temperature value measured by the infrared temperature sensor as T0.
[0072] The parameter n of the number of hidden layer neurons of the extreme learning machine OSELM, that is, the number of sample data n, the randomly generated weights and thresholds are set, and the standard current I0 output by the standard source, the output current I1 of the Hall current sensor, and the temperature value T0 measured by the infrared temperature sensor are input into the extreme learning machine OSELM.
[0073] The trained temperature compensation model is tested using the test samples to obtain a final temperature compensation model.
[0074] Furthermore, the construction method of the online extreme learning machine OSELM in this embodiment includes: first completing a two-dimensional calibration test on the Hall current sensor and the infrared temperature sensor, using the test data as two input values of the online extreme learning machine OSELM, training the online extreme learning machine OSELM, and obtaining the online extreme learning machine OSELM.
[0075] The extreme learning machine randomly initializes the input weights and hidden layer thresholds, and then obtains the output weights by solving the Moore-Penrose generalized matrix of the hidden layer output matrix. General neural networks often use the gradient descent method to perform a large number of iterative operations. Therefore, the extreme learning machine learns much faster than general neural networks and can achieve the only optimal solution in the region.
[0076] Online Extreme Learning Machine OSELM initial stage:
[0077] Step A1, assume that the current to be compensated is X1 and the constant temperature box temperature is X2, that is, the number of neurons in the input layer is 2.
[0078] Input matrix:
[0079]
[0080] Wherein, N is the number of samples, and the first digits 1 and 2 in the subscript represent the current to be compensated and the temperature, respectively.
[0081] The output matrix is:
[0082] Y0=[Y1 … Y N ] T ;
[0083] Among them, Y N Represents the calibrated current value corresponding to the Nth sample.
[0084] According to the theorem given by Professor Huang, when the number of neurons in the hidden layer is the same as the number of neurons in the input layer, the output matrix H of the hidden layer is reversible and has ||Hβ-Y T ||=0, so we can find β=H -1 Y T ; Therefore, the number of neurons in the hidden layer is set to 2. The weights and thresholds from the input layer to the hidden layer are randomly generated, and the connection weight matrix between the input layer and the hidden layer is w:
[0085]
[0086] In the above formula, w ij Represents the connection weight between the i-th neuron in the input layer and the j-th neuron in the hidden layer.
[0087] Hidden layer neuron threshold b:
[0088]
[0089] Among them, b1 is the threshold corresponding to the first neuron, and b2 is the threshold corresponding to the second neuron.
[0090] Step A2: Calculate the initial output matrix of the hidden layer. Assume that the activation function of the hidden layer neuron is G(w,x,b), then the hidden layer matrix is:
[0091]
[0092] Among them, x N is the temperature and current data corresponding to the Nth sampling point.
[0093] The weight matrix β connecting the hidden layer and the output layer is:
[0094]
[0095] In the above formula, β jk Represents the connection weight between the jth (including 1 and 2) neuron in the hidden layer and the kth neuron in the output layer, where k=1.
[0096] Step A3, by ||Hβ-Y T ||=0, calculate the output weight matrix β=H -1 T.
[0097] Optionally, the online extreme learning machine OSELM online sequential learning phase specifically includes:
[0098] Step B1: When a new sample is added, assume that N K+1 samples, then we use the idea of the traditional ELM algorithm, that is, we hope to obtain β K+1 Make J obtain the minimum value; where:
[0099]
[0100] set up is the total number of samples that have been learned, then the new samples added are:
[0101]
[0102] Solving the minimum value of the above formula can get the output weight β k+1 The recursive relationship includes:
[0103] Calculate the initial output matrix of the hidden layer:
[0104]
[0105] Step B2: Update M using the recursive relationship k+1 , find the output weight β k+1 ,in
[0106]
[0107]
[0108] Step B3, let k=k+1, and go to step B1 of the online sequence learning phase, and so on, until the learning of all samples is completed.
[0109] In this embodiment, the online extreme learning machine OSELM is used as a simple and effective single hidden layer feedforward neural network algorithm. It only needs to set the number of hidden layer neurons. The training process does not need to adjust the weights between the input layer and the hidden layer and the threshold of the hidden layer neurons, and generates a unique global optimal solution with a fast learning speed and 1 iteration number. When the Hall current sensor collects the carbon brush current, the infrared temperature sensor is continuously used to monitor the carbon brush temperature, and then the current signal output by the Hall current sensor is temperature compensated according to the monitored temperature, thereby reducing the influence of temperature on the Hall current sensor and improving the accuracy of online monitoring of the current value.
[0110] Example 2
[0111] This embodiment discloses a temperature compensation system for a phase regulator carbon brush current based on an extreme learning machine, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements a series of steps of the method disclosed in Embodiment 1 when executing the computer program.
[0112] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A temperature compensation method for carbon brush current of a phase regulator based on an extreme learning machine, characterized in that: include: Step S1, obtaining the real-time carbon brush current value to be compensated and its corresponding ambient temperature value; Step S2, determining whether the collected carbon brush current value and ambient temperature value are within the calibrated temperature value range and the calibrated current value range of the temperature compensation model; if not, retraining the carbon brush current temperature compensation model so that the currently collected carbon brush current value and ambient temperature value are within the calibrated current value range and the calibrated temperature value range of the carbon brush current temperature compensation model; If yes, the current value to be compensated and the ambient temperature value are input into the currently trained current temperature compensation model, and then the measured current value after temperature compensation is calculated; The carbon brush current temperature compensation model is an online extreme learning machine OSELM, and the training process of the current temperature compensation model includes: Step 1.1, calibrate the temperature training range from A to B, and the step temperature value c, calibrate the current value training range from D to F, and the step current value e; Step 1.2, connect a simple loop of a standard current source, place part of the wire in a temperature-controlled thermostat, place the Hall current sensor in the thermostat to measure the current flowing through the wire, set the temperature range of the thermostat to the calibration temperature value A, and wait for the temperature to stabilize; Step 1.3, adjust the output current value of the standard current source from D to F according to the progressive current value e, input the calibration standard current value to the Hall current sensor from outside the constant temperature box, and record the output current to be compensated by the Hall current sensor; Step 1.4, according to the step temperature value c, adjust the temperature of the constant temperature box to the next fixed value, repeat step 1.3 until the collection of the current to be compensated under the calibration temperature value B is completed, and the current values to be compensated of all the calibration current values under each calibration temperature are obtained; Step 1.5, record the standard current output by the standard source as I0, record the output current of the Hall current sensor as I1, and record the temperature value measured by the infrared temperature sensor as T0; The number of neurons in the input layer and the number of neurons in the hidden layer of the extreme learning machine OSELM are both set to 2, and the weights and thresholds are randomly generated. The standard current output by the standard source is I0, the output current of the Hall current sensor is I1, and the temperature value measured by the infrared temperature sensor is T0, which are input into the extreme learning machine OSELM; the current temperature compensation model is obtained after training and testing with samples.
2. The method according to claim 1, characterized in that In the training process of the current temperature compensation model, the initial stage of the online extreme learning machine OSELM includes: Step A1, assuming that the current to be compensated is X1 and the constant temperature box temperature is X2, that is, the number of neurons in the input layer is 2; The input matrix X is: Wherein, the first digit 1 and 2 in the subscript X represent the current and temperature to be compensated respectively, the second digit represents the sample number, and the total number of samples is N; The output matrix Y0 is: Y0=[Y1…YN]T; Wherein, YN represents the calibration current value corresponding to the Nth sample; Set the number of neurons in the hidden layer to 2, randomly generate the weights and thresholds from the input layer to the hidden layer, and the connection weight matrix between the input layer and the hidden layer is w: In the above formula, w ij Represents the connection weight between the i-th neuron in the input layer and the j-th neuron in the hidden layer; Hidden layer neuron threshold b: Among them, b1 is the threshold corresponding to the first neuron, and b2 is the threshold corresponding to the second neuron; Step A2: Calculate the initial output matrix of the hidden layer. Assume that the activation function of the hidden layer neuron is G(w,x,b), then the hidden layer matrix is: Wherein, xN is the temperature and current data corresponding to the Nth sampling point; The connection weight matrix between the hidden layer and the output layer is: Among them, β jk represents the connection weight between the jth (including 1 and 2) neuron in the hidden layer and the kth neuron in the output layer, k = 1, j includes 1 and 2; Step A3, by ||Hβ-Y T ||=0, calculate the output weight matrix β=H -1 T.
3. The method according to claim 2, characterized in that In the training process of the current temperature compensation model, the online sequential learning phase of the online extreme learning machine OSELM includes: Step B1: When a new sample is added, assume that N K+1 samples, in order to obtain β K+1 Make J get the minimum value: set up is the total number of samples that have been learned, then the new samples added are: Solving the minimum value of the above formula can get the output weight β k+1 The recursive relationship includes: Calculate the initial output matrix of the hidden layer: Step B2: Update M using the recursive relationship k+1 , find the output weight β k+1 ,in: Step B3, let k=k+1, and go to step B1 of the online sequence learning phase, and so on, until the learning of all samples is completed.
4. A temperature compensation system for carbon brush current of a phase regulator based on an extreme learning machine, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 3 is implemented.