Self-adaptive Kalman filtering photovoltaic power generation electric energy efficiency monitoring method
Optimizing the hyperparameters of the Kalman filtering algorithm through data preprocessing and single-sized quantum genetic algorithms solves the problem of improper setting of outliers and hyperparameters in sensor data, achieving higher data accuracy and stability of the detection system.
Patent Information
- Application Number
- CN202311270498.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-28
- Publication Date
- 2025-03-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
There are outliers in the data collected by the sensor, and the Kalman filtering system is improperly set, which is not conducive to the stability and accuracy of the power efficiency detection system.
Through data preprocessing, outliers are identified and eliminated, and a single-sized quantum genetic algorithm is introduced to optimize the hyperparameters Q and R of Kalman filtering, and then the optimized Kalman filtering algorithm is used to filter the data and state update.
Effectively filter wrong data, maximize the authenticity of retained data samples, improve data processing speed and data accuracy, and improve the stability and accuracy of the power efficiency detection system.
Smart Images

Figure CN119727599A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data filtering and data fusion, and in particular to an adaptive Kalman filter photovoltaic power generation electric energy efficiency monitoring method. Background Art
[0002] With the development of science and technology, the methods of current measurement are also gradually improving. At present, there have been a series of studies on current measurement methods. Among them, Wang Jing et al. proposed a signal processing algorithm for a multi-sensor DC current measurement system based on Kalman filtering in the article "Research on Signal Processing Algorithm of Multi-Sensor Current Measurement System", which greatly reduced the influence of interference current on measurement, and can also maintain high measurement accuracy under different interference conditions by adjusting the filter parameters. However, the error of this algorithm depends on the selection of filter parameters. Improper parameter selection will cause large detection errors, and the stability and accuracy of the system will be greatly affected. In the article "Repair Method of Photovoltaic Power Station Monitoring Data Based on Sigma Kalman Filter", Yu Nayan et al. considered the problem of abnormal data items caused by uncertainty noise and communication packet loss in the monitoring data of the actual power grid, considered the various influencing factors of the output power of the photovoltaic power station, and trained the RBF artificial neural network as the state transition equation; then, based on the Sigma point Kalman filter theory, the output power information of the photovoltaic power station was filtered, which can effectively repair the monitoring data of the photovoltaic power station, but the model proposed in the article is mainly optimized for specific sensors, which has certain limitations. The above algorithms are all traditional filtering methods. According to the actual working environment, most sensors are operated outdoors, with many measurement points and are greatly affected by the environment. The existing filtering algorithms are difficult to meet the needs of actual projects. At the same time, the initial data collected by the sensor at different times are prone to abnormal value data. Error factors such as ambient temperature and humidity have a certain impact on the measurement accuracy of the probe, resulting in difficulty in collecting data and often unreasonable values. Therefore, it is necessary to improve and optimize the existing filtering algorithms in order to obtain a more accurate current measurement method. Summary of the invention
[0003] 1. Technical issues to be resolved
[0004] The present invention provides an adaptive Kalman filter photovoltaic power generation electric energy efficiency monitoring method to solve the problem that abnormal values exist in sensor collected data and Kalman filter system hyperparameters are improperly set, which is not conducive to the stability and accuracy of the electric energy efficiency detection system.
[0005] (II) Technical solution
[0006] In order to solve the above problems, the present invention provides an adaptive Kalman filter photovoltaic power generation energy efficiency monitoring method comprising:
[0007] Step S1: preprocessing the measurement data, identifying abnormal values, and removing the abnormal values;
[0008] Step S2: repairing outliers on the removed measurement data;
[0009] Step S3: introducing single body quantum genetic algorithm QEAS processing;
[0010] Step S4: Optimizing Kalman filter hyperparameters;
[0011] Step S5: Use the Kalman filter algorithm with optimized parameters to filter the data and update the state, specifically including: using the optimized Kalman filter algorithm, combining the observed value at the current moment and the estimated value at the previous moment, to solve the state estimate at the current moment; in the iterative process, according to the Kalman filter formula, continuously updating the state variable, error covariance, and Kalman gain variable; implementing the data filtering operation to obtain more accurate photovoltaic power generation data.
[0012] Preferably, in step S2, the average value of the measured values of other sensors is used to repair and replace the removed abnormal value.
[0013] Preferably, the processing steps of the single quantum genetic algorithm QEAS in step 3 include:
[0014] (1) Initialization: Initialize a quantum chromosome, which represents the combination of parameters Q and R; set the fitness function to evaluate the effect of each quantum chromosome;
[0015] (2) Quantum operations: quantum operations on a single quantum chromosome, including transformation and rotation;
[0016] (3) Measurement: measuring the quantum chromosome to obtain a new quantum chromosome; the new quantum chromosome represents the parameter combination after the quantum operation;
[0017] (4) Fitness evaluation: According to the set fitness function, the new quantum chromosome is evaluated to obtain a fitness value;
[0018] (5) Iteration: According to the iterative principle of quantum computing, the process of quantum operation, measurement and fitness evaluation is continuously carried out to gradually optimize the parameter combination of quantum chromosomes;
[0019] (6) Convergence judgment: When the fitness value reaches a certain threshold or the number of iterations reaches a predetermined number, the iteration process is stopped.
[0020] Preferably, the specific steps of optimizing the Kalman filter hyperparameters in step S4 include: initializing a quantum chromosome including initial values of Q and R;
[0021] According to the operation rules of quantum computing, the quantum chromosomes are transformed and rotated to generate new quantum chromosomes;
[0022] Map the new quantum chromosome back to the actual values of Q and R, and evaluate the effect of the new combination of Q and R according to the fitness function;
[0023] If the fitness value is better than the previous value, keep the new Q and R values; repeat the steps until the convergence condition is reached; output the best Q and R values after Kalman optimization for hyperparameter optimization of the Kalman filter algorithm.
[0024] Preferably, the Kalman filter operation includes:
[0025] The value of the next moment is predicted based on the estimation result of the previous moment, which becomes the prior. The Kalman filter algorithm time update prediction calculation formula is:
[0026]
[0027]
[0028] In the formula, is the prior estimate corresponding to the state at time k; x k -1 is the posterior estimate corresponding to the k-1 moment; u k-1 is the system input value corresponding to time k-1; is the prior estimation error covariance matrix corresponding to time k; P k-1 is the a posteriori estimation error covariance matrix corresponding to time k-1, Q is the covariance matrix of system noise; A and B are the corresponding state transfer matrices. Preferably, the calculation formula for the Kalman filter algorithm measurement update correction is:
[0029]
[0030]
[0031] In the formula, K k is the Kalman gain matrix at time k; C is the corresponding state transfer matrix; R is the covariance matrix of the measurement noise; Z k is the observed sample value corresponding to time k; I is the unit matrix.
[0032] (III) Beneficial effects
[0033] The adaptive Kalman filter photovoltaic power generation energy efficiency monitoring method provided by the present invention uses the Romanovsky criterion to eliminate the gross errors of the original collected data through data preprocessing, effectively filters the erroneous data, maximizes the authenticity of the data samples, and effectively improves the data processing speed; combined with the single body quantum genetic algorithm, the search rate is fast, there is no continuity limit on the objective function, it can optimize multiple hyperparameters, has high precision, and has strong applicability in discrete or continuous optimization operations or problems of optimizing hyperparameters. The single body quantum genetic algorithm is introduced to improve the Kalman filter algorithm to obtain the optimal Q and R values of the Kalman filter to improve the data precision and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 This is an overall schematic diagram of an adaptive Kalman filter photovoltaic power generation energy efficiency monitoring system according to an embodiment of the present invention;
[0035] Figure 2 A schematic diagram of the filtering process of the adaptive Kalman filter photovoltaic power generation energy efficiency monitoring system according to an embodiment of the present invention;
[0036] Figure 3 This is a flow chart of solving the QEAS algorithm of the adaptive Kalman filter photovoltaic power generation energy efficiency monitoring system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0037] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0038] like Figure 1-3 As shown, the present invention provides an adaptive Kalman filter photovoltaic power generation energy efficiency monitoring method, which specifically includes the following steps:
[0039] Step S1: preprocessing the measurement data, identifying abnormal values, and removing the abnormal values;
[0040] This step specifically includes:
[0041] a. For the measurement errors that may occur in the photovoltaic power generation process, data preprocessing is first performed.
[0042] b. Use the Romanovsky criterion to analyze the measurement data and identify sensor measurements with gross errors.
[0043] c. Eliminate these outliers to ensure that the data processed subsequently is accurate and reliable.
[0044] Step S2: repairing outliers on the removed measurement data;
[0045] This step specifically includes:
[0046] a. The sensor measurements that are removed need to be repaired for outliers.
[0047] b. Use the average of other sensor measurements to repair these missing values to ensure data integrity and consistency.
[0048] Step S3: introducing single body quantum genetic algorithm QEAS processing;
[0049] a. A single quantum genetic algorithm (QEAS) is introduced to optimize the hyperparameters of the Kalman filter.
[0050] b. Perform initialization operations to create an initial quantum chromosome population.
[0051] c. Define a fitness function to evaluate the effects of different parameter combinations.
[0052] The processing steps of QEAS specifically include:
[0053] 1) Initialization: Initialize a quantum chromosome, which represents the combination of parameters Q and R. At the same time, set the fitness function to evaluate the effect of each quantum chromosome.
[0054] 2) Quantum operations: Perform quantum operations on individual quantum chromosomes, including transformation and rotation. These operations are performed based on the principles of quantum computing and aim to find a better combination of parameters.
[0055] 3) Measurement: Measure the quantum chromosome to obtain a new quantum chromosome. This new quantum chromosome represents the parameter combination after quantum operation.
[0056] 4) Fitness evaluation: According to the set fitness function, the new quantum chromosome is evaluated to obtain a fitness value.
[0057] 5) Iteration: According to the iterative principle of quantum computing, the process of quantum operation, measurement and fitness evaluation is continuously carried out to gradually optimize the parameter combination of quantum chromosomes.
[0058] 6) Convergence judgment: When the fitness value reaches a certain threshold or the number of iterations reaches a predetermined number, the iteration process is stopped.
[0059] This step has strong global search capability: QEAS combines the ideas of classical genetic algorithms and quantum computing, has strong global search capabilities, and can find better parameter combinations in a larger search space. Flexible fitness function: The fitness function can be customized according to the characteristics of the problem, so as to better adapt to the parameter optimization task of Kalman filtering. Avoid falling into local optimality: The introduction of quantum operations enables QEAS to jump out of the local optimal solution, thereby improving the optimization effect.
[0060] Step S4: Optimizing Kalman filter hyperparameters;
[0061] a. Using a single quantum genetic algorithm (QEAS), the hyperparameters Q and R of the Kalman filter are optimized.
[0062] b. Initialize the quantum chromosome population and observe the state of each quantum chromosome.
[0063] c. Perform fitness evaluation to select the best Q and R values.
[0064] The specific optimization steps include: Initialize a quantum chromosome, which contains the initial values of Q and R. According to the operation rules of quantum computing, transform and rotate the quantum chromosome to generate a new quantum chromosome. Map the new quantum chromosome back to the actual values of Q and R. According to the fitness function, evaluate the effect of the new combination of Q and R. If the fitness value is better than the previous value, keep the new Q and R values. Repeat the steps until the convergence condition is reached. Finally, the optimized values of Q and R are obtained for the hyperparameter optimization of the Kalman filter algorithm.
[0065] In practical applications, this step specifically includes: a) Initialize the quantum chromosome population Q(t), set t=0, and set set B to be an empty set. The total length of the quantum chromosome is determined by the selection interval and segmentation accuracy of the hyperparameters to be optimized; b) Observe each quantum chromosome in Q(t) so that it collapses into a specific state. Thus, a binary string population P(t) is formed; c) Evaluate each individual of P(t). For each binary string in P(t), decode it to obtain a set of specific hyperparameters; d) Use this set of hyperparameters to configure the machine learning algorithm A, then train it on the training set, and test it on the test set to obtain a generalization error, which is the fitness value of the individual; 4. Store the best individual in the population in B; e) Iteration condition judgment: Determine whether to output the final result according to the loop condition. If the condition is met, stop the iteration and output the optimal solution. Otherwise, continue the iteration operation until the iteration end condition is met, output the optimal Q and R values of the Kalman filter, and then use the improved Kalman filter algorithm for subsequent operations.
[0066] Through the above steps, a single quantum genetic algorithm can search in the parameter space and find a better combination of Q and R, thereby optimizing the Kalman filter algorithm and improving the accuracy of data processing and state estimation.
[0067] Step S5: Use the Kalman filter algorithm with optimized parameters to filter the data and update the state, specifically including: using the optimized Kalman filter algorithm, combining the observed value at the current moment and the estimated value at the previous moment, to solve the state estimate at the current moment; in the iterative process, according to the Kalman filter formula, continuously updating the state variable, error covariance, and Kalman gain variable; implementing the data filtering operation to obtain more accurate photovoltaic power generation data.
[0068] Among them, the Kalman filter operation includes:
[0069] The value of the next moment is predicted based on the estimation result of the previous moment, which becomes a priori. The calculation formula of the Kalman filter algorithm time update (prediction) is: In the formula, is the prior estimate corresponding to the state at time k; x k-1 is the posterior estimate corresponding to the k-1 moment; u k-1 is the system input value corresponding to time k-1; is the prior estimation error covariance matrix corresponding to time k; P k-1 is the a posteriori estimation error covariance matrix corresponding to time k-1, Q is the covariance matrix of system noise; A and B are the corresponding state transfer matrices. The calculation formula for the Kalman filter algorithm measurement update (correction) is In the formula, K k is the Kalman gain matrix at time k; C is the corresponding state transfer matrix; R is the covariance matrix of the measurement noise; Z k is the observed sample value corresponding to time k; I is the unit matrix. The hyperparameters Q and R values optimized by the quantum genetic algorithm of a single individual are taken to define the hyperparameter values of the Kalman filter. On this basis, the preprocessed data is filtered to obtain the filtered current data to improve the data precision and accuracy.
[0070] The above implementation modes are only used to illustrate the present invention, but not to limit the present invention. Ordinary technicians in the relevant technical field can make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, all equivalent technical solutions also belong to the scope of the present invention. The patent protection scope of the present invention should be defined by the claims.
Claims
1. An adaptive Kalman filter photovoltaic power generation energy efficiency monitoring method, characterized in that: include: Step S1: preprocessing the measurement data, identifying abnormal values, and removing the abnormal values; Step S2: repairing outliers on the removed measurement data; Step S3: introducing single body quantum genetic algorithm QEAS processing; Step S4: Optimizing Kalman filter hyperparameters; Step S5: using the Kalman filter algorithm after parameter optimization to perform filtering operation and state update on the data, specifically including: using the optimized Kalman filter algorithm, combining the observed value at the current moment and the estimated value at the previous moment, to solve the state estimation value at the current moment; During the iteration process, the state variables, error covariance, and Kalman gain variables are continuously updated according to the Kalman filter formula; data filtering operations are implemented to obtain more accurate photovoltaic power generation data.
2. The method for monitoring photovoltaic power generation energy efficiency using an adaptive Kalman filter as claimed in claim 1, characterized in that: In step S2, the average value of the measured values of other sensors is used to repair and replace the removed abnormal value.
3. The method for monitoring photovoltaic power generation energy efficiency using an adaptive Kalman filter as claimed in claim 1, characterized in that: The processing steps of the single body quantum genetic algorithm QEAS in step 3 include: (1) Initialization: Initialize a quantum chromosome, which represents the combination of parameters Q and R; set the fitness function to evaluate the effect of each quantum chromosome; (2) Quantum operations: quantum operations on a single quantum chromosome, including transformation and rotation; (3) Measurement: measuring the quantum chromosome to obtain a new quantum chromosome; the new quantum chromosome represents the parameter combination after the quantum operation; (4) Fitness evaluation: According to the set fitness function, the new quantum chromosome is evaluated to obtain a fitness value; (5) Iteration: According to the iterative principle of quantum computing, the process of quantum operation, measurement and fitness evaluation is continuously carried out to gradually optimize the parameter combination of quantum chromosomes; (6) Convergence judgment: When the fitness value reaches a certain threshold or the number of iterations reaches a predetermined number, the iteration process is stopped.
4. The method for monitoring the power efficiency of photovoltaic power generation using an adaptive Kalman filter as claimed in claim 1, characterized in that: The specific steps of optimizing the Kalman filter hyperparameters in step S4 include: initializing a quantum chromosome, which includes initial values of Q and R; According to the operation rules of quantum computing, the quantum chromosomes are transformed and rotated to generate new quantum chromosomes; Map the new quantum chromosome back to the actual values of Q and R, and evaluate the effect of the new combination of Q and R according to the fitness function; If the fitness value is better than the previous value, keep the new Q and R values; repeat the steps until the convergence condition is reached; output the best Q and R values after Kalman optimization for hyperparameter optimization of the Kalman filter algorithm.
5. The method for monitoring photovoltaic power generation energy efficiency using an adaptive Kalman filter as claimed in claim 1, characterized in that: The Kalman filter operation includes: The value of the next moment is predicted based on the estimation result of the previous moment, which becomes the prior. The Kalman filter algorithm time update prediction calculation formula is: In the formula, is the prior estimate corresponding to the state at time k; x k -1 is the posterior estimate corresponding to the k-1 moment; u k-1 is the system input value corresponding to time k-1; is the prior estimation error covariance matrix corresponding to time k; P k-1 is the posterior estimation error covariance matrix corresponding to the k-1 moment, Q is the covariance matrix of the system noise; A and B are the corresponding state transfer matrices.
6. The method for monitoring photovoltaic power generation energy efficiency using an adaptive Kalman filter as claimed in claim 1, characterized in that: The calculation formula for the Kalman filter algorithm measurement update correction is: In the formula, K k is the Kalman gain matrix at time k; C is the corresponding state transfer matrix; R is the covariance matrix of the measurement noise; Z k is the observed sample value corresponding to time k; I is the identity matrix.
Citation Information
Patent Citations
High-voltage switch cabinet insulator electric field optimization method based on quantum genetic algorithm
CN102768701A
Sea clutter weak signal detection method based on two-dimension Duffing oscillator
CN105487062A
Load identification method and system based on quantum genetic algorithm and SVM model
CN110414839A
Adaptive optimization method for estimating SOC of battery based on Kalman filtering framework
CN110502778A
Kalman filtering current detection fusion algorithm
CN116257736A