Public charging pile group metering error prediction method and system, medium and program product
By improving the Kalman filtering model, the gradual elimination factor is introduced to balance history and new information in the measurement error prediction of public charging pile group, which solves the problem of inaccurate prediction results in the existing technology, improves prediction accuracy and adaptability, and achieves more Accurate measurement error prediction.
Patent Information
- Application Number
- CN202411236008.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2024-12-27
AI Technical Summary
In the prior art, the prediction results of the metering error of the public charging pile group are inaccurate, and are affected by fixed model parameters and noise, resulting in insufficient prediction accuracy.
Improve the Kalman filtering model, by introducing a gradual cancellation factor to balance historical information and new information in the predicted covariance matrix, dynamically adjust the gradual cancellation factor to improve the model's adaptability and response speed. The specific formula is Pk|k-1=λFPk|k -1FT+(1-λ)Pk-1|k-1+Q, the gradual cancellation factor λ is dynamically adjusted according to the operating status of the charging pile and the measurement error.
It improves prediction accuracy and model adaptability, enhances the response speed to new information, significantly improves the accuracy of prediction, and solves the problem of inaccurate prediction results in the prior art.
Smart Images

Figure CN119204304A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of electric vehicle charging facility monitoring, and in particular relates to a method, system, medium and program product for predicting metering errors of a public charging pile group. Background Art
[0002] The difference between the actual charging power value and the displayed charging power value of the public charging pile for electric vehicles is taken as the charging pile measurement error. The accuracy of charging pile measurement is generally evaluated through the charging pile measurement error.
[0003] When the evaluation object is a public charging pile group, due to the large number of charging piles in the charging pile group, the metering error calculation for each charging pile requires a large amount of data to be collected and calculated, resulting in a long working time. Therefore, the commonly used method is to use the accuracy of the sampled charging pile metering to characterize the accuracy of the overall charging pile group metering. In order to judge the accuracy of the sampled charging pile metering, the traditional Kalman filter algorithm is usually used to predict the metering error of the sampled charging pile. However, when predicting the metering error of the charging pile, the traditional Kalman filter algorithm is limited by fixed model parameters, and the prediction results are often affected by noise and uncertainty, resulting in insufficient prediction accuracy. Summary of the invention
[0004] The purpose of the present invention is to provide a method, system, medium and program product for predicting metering errors of a public charging pile group, so as to solve the problem of inaccurate prediction results in the prior art.
[0005] In order to solve the above technical problems, the present invention provides a method for predicting the metering error of a public charging pile group, the method comprising:
[0006] The metering error data of the charging piles sampled from the charging pile group are obtained and used as the state quantity of the improved Kalman filter model, and then the metering error data of the charging piles are processed using the improved Kalman filter model, and the processed result is used as the metering error of the charging pile group; the improved Kalman filter model is improved based on the traditional Kalman filter algorithm model, and the specific improvement includes improving the prediction covariance matrix, and the improved prediction covariance matrix is:
[0007] P k|k-1 =λFP k|k-1 F T +(1-λ)P k-1|k-1 +Q
[0008] Where: F is the system transfer matrix, λ is the fading factor, P k|k-1 is the prediction covariance matrix at time k obtained based on the prediction at time k-1, P k-1|k-1 is the prediction covariance matrix at time k-1, and Q is the process noise covariance matrix.
[0009] Furthermore, the fading factor changes with the number of iterations, and the calculation formula of the fading factor that changes with the number of iterations is:
[0010] λ(k)=λ0×F(1-αk) β
[0011] Where λ0 is the initial fading factor, λ(k) is the fading factor, k is the current iteration number, α and β are parameters for adjusting the attenuation speed of the fading factor, and F is the system transfer matrix.
[0012] Furthermore, the initial fading factor is determined based on the sampled operating status of the charging pile and the metering error data of the charging pile. The fading factor when the charging pile is operating abnormally is greater than the fading factor when the charging pile is operating normally and the metering error data of the charging pile is greater than the metering error threshold. The fading factor when the charging pile is operating normally and the metering error data of the charging pile is greater than the metering error threshold is greater than the fading factor when the charging pile is operating normally and the metering error data of the charging pile is less than or equal to the metering error threshold.
[0013] Furthermore, when the charging pile operates abnormally, the gradual disappearance factor is the setting value of the abnormal gradual disappearance factor of the charging pile; when the charging pile operates normally and the metering error data is greater than the metering error threshold, the gradual disappearance factor is γK|P|, and when the charging pile operates normally and the metering error data of the charging pile is less than or equal to the metering error threshold, the gradual disappearance factor is K|P|, wherein γ is a multiple setting value and its value is greater than 1, K is a setting coefficient, and P is the metering error data of the charging pile.
[0014] Furthermore, if the sampled charging pile operates abnormally or the charging pile operates normally and the metering error data of the charging pile is greater than the metering error threshold, the charging pile will be repaired and the charging pile will be selected for inspection next time. If the charging pile is still operating abnormally or the charging pile is still operating normally and the metering error data of the charging pile is greater than the metering error threshold, the charging pile will be returned to the factory for repair.
[0015] Furthermore, the metering error data of the charging piles sampled from the charging pile group is an average value of the metering error data of at least two sampled charging piles.
[0016] In order to solve the above technical problems, the present invention also provides a computer system, including a processor, and the processor is used to execute a computer program to implement the steps of a method for predicting metering errors of a public charging pile group.
[0017] In order to solve the above technical problems, the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method for predicting the metering error of a public charging pile group are implemented.
[0018] In order to solve the above technical problem, the present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of a method for predicting metering errors of a public charging pile group.
[0019] The beneficial effects of the above technical solution are as follows: the present invention is an improved invention, which improves the charging prediction covariance matrix of the traditional Kalman filter algorithm model and adds historical information P to the prediction covariance matrix. k-1|k-1 In order to balance historical information and new prediction information, a fading factor is introduced to weigh the new and old information by changing the size of the fading factor. A larger fading factor means more reliance on new prediction information, and a smaller fading factor means more reliance on historical information. This effectively improves the prediction accuracy and model adaptability, enables the prediction model to increase the response speed of the model to new information as needed, improves the accuracy of the prediction, and solves the problem of inaccurate prediction results in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 It is a flow chart of a method for predicting metering errors of a public charging pile group according to an embodiment of the present invention. DETAILED DESCRIPTION
[0021] The present invention focuses on providing a method for predicting metering errors of a public charging pile group, the method comprising:
[0022] The metering error data of the charging piles sampled from the charging pile group are obtained and used as the state quantity of the improved Kalman filter model, and then the metering error data of the charging piles are processed using the improved Kalman filter model, and the processed result is used as the metering error of the charging pile group; the improved Kalman filter model is improved based on the traditional Kalman filter algorithm model, and the specific improvement includes improving the prediction covariance matrix, and the improved prediction covariance matrix is:
[0023] P k|k-1 =λFP k|k-1 F T +(1-λ)P k-1|k-1 +Q
[0024] Where: F is the system transfer matrix, λ is the fading factor, P k|k-1 is the prediction covariance matrix at time k obtained based on the prediction at time k-1, P k-1|k-1 is the prediction covariance matrix at time k-1, and Q is the process noise covariance matrix.
[0025] The present invention introduces historical information into the prediction covariance matrix and introduces a fading factor into the prediction covariance matrix. The new and old information are weighed by changing the size of the fading factor, thereby effectively improving the prediction accuracy and model adaptability, so that the prediction model can increase the response speed of the model to new information as needed, improve the accuracy of the prediction, and solve the problem of inaccurate prediction results in the prior art.
[0026] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is further described in detail below with reference to the accompanying drawings and embodiments.
[0027] Example of a method for predicting measurement errors of a public charging pile group:
[0028] A method for predicting metering errors of a public charging pile group in this embodiment specifically includes the following steps:
[0029] Step 1: Improve the traditional Kalman filter model to establish a charging pile metering error prediction model (that is, the improved Kalman filter model).
[0030] The improved Kalman filter model and the traditional Kalman filter model also include a state transfer equation and an observation equation, and the improved Kalman filter model needs to be set with corresponding initial values.
[0031] The specific improvement to the traditional Kalman filter model is to improve the prediction covariance matrix in the traditional Kalman filter matrix and add historical information to the prediction covariance matrix. The traditional prediction covariance matrix is as follows:
[0032] P k|k-1 =FP k-1|k-1 +F T +Q
[0033] Where F is the system transfer matrix, Q is the process noise covariance matrix, and P k|k-1 is the prediction covariance matrix at time k obtained based on the prediction at time k-1, P k-1|k-1 is the prediction covariance matrix at time k-1.
[0034] The improved prediction covariance matrix is as follows:
[0035] P k|k-1 =λFP k-1|k-1 F T +(1-λ)P k-1|k-1 +Q
[0036] Where F is the system transfer matrix, λ is the fading factor (0<λ≤1), P k|k-1 is the prediction covariance matrix at time k obtained based on the prediction at time k-1, P k-1|k-1is the prediction covariance matrix at time k-1, and Q is the process noise covariance matrix.
[0037] Historical information is added to the prediction covariance matrix. In order to balance the historical information and the new prediction information, a fading factor is introduced. The new and old information are weighed by changing the size of the fading factor. The fading factor is dynamically adjusted according to the on-site operating status of the charging pile and the sampling verification results, and is used to update the covariance matrix and gain matrix of the virtual measurement verification standard in real time.
[0038] When the prediction covariance matrix is improved, the gain matrix will automatically change accordingly. The formula of the gain matrix K is:
[0039] K k =P k|k-1 H T (HP k|k-1 H T +R) -1
[0040] In the formula, K K is the gain matrix, H is the observation matrix, and R is the observation covariance matrix.
[0041] When P k|k-1 After adjustment due to the introduction of the fading factor, the gain matrix will reflect this adjustment accordingly, so that the filter composed of the virtual metering verification standard of the charging pile group can better adapt to environmental changes and improve the tracking accuracy or stability of the virtual metering verification standard of the charging pile group.
[0042] Among them, the fading factor can be iteratively updated over time, and the specific formula is as follows:
[0043] λ(k)=λ0×F(1-αk) β
[0044] Where λ0 is the initial fading factor, λ(k) is the fading factor, k is the current iteration number, α and β are parameters for adjusting the attenuation speed of the fading factor, and F is the system transfer matrix.
[0045] In the prediction model, a higher weight is given to the on-site sampling verification results of public charging piles for electric vehicles, so that they play a greater role in the error prediction calculation process. The initial fading factor is determined according to the latest on-site sampling verification results. After the initial fading factor is determined, the fading factor in the prediction model is updated. After the initial fading factor is determined according to the latest on-site sampling verification results, the influence of the fading factor on the prediction results will become smaller in the subsequent iteration process, which is a normal phenomenon that conforms to the actual operating status and the purpose of the algorithm.
[0046] The on-site sampling verification results include the operating status of the sampled charging piles and the metering error data of the charging piles. If the metering error data and the status of the charging piles are normal, the fading factor is smaller and the prediction model relies more on the historical error information for prediction. If the metering error data and the status of the charging piles are abnormal, the fading factor is larger and the prediction model relies more on the latest error information for prediction. The fading factor when the charging pile is operating abnormally is greater than the fading factor when the charging pile is operating normally and the metering error data is greater than the verification error threshold. The fading factor when the charging pile is operating normally and the metering error data is greater than the verification error threshold is greater than the fading factor when the charging pile is operating normally and the metering error data is less than or equal to the verification error threshold. When the sampled charging pile is operating abnormally or the charging pile is operating normally and the metering error data is greater than the verification error threshold, the charging pile shall be repaired. If the charging pile is still operating abnormally or the charging pile is operating normally and the metering error data is greater than the verification error threshold when the charging pile is sampled next time, the charging pile shall be returned to the factory for repair.
[0047] When the charging pile is operating abnormally, the fading factor is 0.8; when the charging pile is operating normally and the metering error data is greater than the verification error threshold, the calculation formula of the fading factor is: λ=γK|P|, when the charging pile is operating normally and the metering error data is less than or equal to the verification error threshold, the calculation formula of the fading factor λ is: λ=K|P|, where K is the setting coefficient with a value of 1-5, and P is the metering error data of the charging pile. In this embodiment, γ is 4. Specifically, Figure 1 shown.
[0048] The prediction results are compared with the actual metering data, and the setting of the gradual elimination factor is further optimized through the positive feedback mechanism to adapt to the changes in the on-site operating conditions of the charging piles and continuously improve the performance of the prediction model.
[0049] Step 2: Obtain the metering error data of the charging piles sampled from the charging pile group and use it as the state quantity of the charging pile metering error prediction model. Use the charging pile metering error prediction model to process the metering error data of the charging piles to obtain the charging pile metering error prediction result. Use the charging pile metering error prediction as the metering error of the charging pile group to evaluate the accuracy of the charging pile group metering. When the charging pile sampling inspection object is multiple charging piles, the sampled metering error data of the multiple charging piles are averaged, and the average value is used as the sampled charging pile metering error data. Specifically, Figure 1 shown.
[0050] The present invention introduces historical information into the prediction covariance matrix and weighs the new and old information by changing the size of the gradual elimination factor, thereby effectively improving the prediction accuracy and model adaptability, so that the prediction model can increase the response speed of the model to new information as needed, improve the accuracy of the prediction, and solve the problem that the prior art cannot quickly respond to changes in actual conditions, resulting in inaccurate prediction results.
[0051] Computer System Embodiment:
[0052] The present invention also provides a computer system, including a processor, the processor is used to execute a computer program to implement the steps of the public charging pile metering error prediction method. The specific process, principle and effect have been described in detail in the embodiment of the public charging pile group metering error prediction method, and will not be repeated here.
[0053] Computer readable storage medium embodiment:
[0054] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for predicting the metering error of a public charging pile group. The specific process, principle and effect have been described in detail in the embodiment of the method for predicting the metering error of a public charging pile group, and will not be repeated here.
[0055] Computer program product embodiment:
[0056] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the method for predicting the metering error of a public charging pile group. The specific process, principle and effect have been described in detail in the embodiment of the method for predicting the metering error of a public charging pile group, and will not be repeated here.
[0057] Specific implementation methods are given above, but the present invention is not limited to the described implementation methods. The basic idea of the present invention lies in the above basic scheme. For ordinary technicians in this field, it does not take creative work to design various deformed models, formulas, and parameters according to the teachings of the present invention. Changes, modifications, substitutions, and variations of the implementation methods without departing from the principles and spirit of the present invention still fall within the scope of protection of the present invention.
Claims
1. A method for predicting metering errors of a public charging pile group, characterized in that: The method includes: The metering error data of the charging piles sampled from the charging pile group are obtained and used as the state quantity of the improved Kalman filter model, and then the metering error data of the charging piles are processed using the improved Kalman filter model, and the processed result is used as the metering error of the charging pile group; the improved Kalman filter model is improved based on the traditional Kalman filter algorithm model, and the specific improvement includes improving the prediction covariance matrix, and the improved prediction covariance matrix is: P k|k-1 =λFP k|k-1 F T +(1-λ)P k-1|k-1 +Q Where: F is the system transfer matrix, λ is the fading factor, P k|k-1 is the prediction covariance matrix at time k obtained based on the prediction at time k-1, P k-1|k-1 is the prediction covariance matrix at time k-1, and Q is the process noise covariance matrix.
2. The method for predicting the measurement error of a public charging pile group according to claim 1, characterized in that: The fading factor changes with the number of iterations, and the calculation formula of the fading factor that changes with the number of iterations is: λ(k)=λ0×F(1-αk) β Where λ0 is the initial fading factor, λ(k) is the fading factor, k is the current iteration number, α and β are parameters for adjusting the attenuation speed of the fading factor, and F is the system transfer matrix.
3. The method for predicting the measurement error of a public charging pile group according to claim 2, characterized in that: The initial fading factor is determined based on the sampled operating status of the charging pile and the metering error data of the charging pile. The fading factor when the charging pile is operating abnormally is greater than the fading factor when the charging pile is operating normally and the metering error data of the charging pile is greater than the metering error threshold. The fading factor when the charging pile is operating normally and the metering error data of the charging pile is greater than the metering error threshold is greater than the fading factor when the charging pile is operating normally and the metering error data of the charging pile is less than or equal to the metering error threshold.
4. The method for predicting the measurement error of a public charging pile group according to claim 3 is characterized in that: When the charging pile operates abnormally, the gradual disappearance factor is the setting value of the abnormal gradual disappearance factor of the charging pile; when the charging pile operates normally and the metering error data of the charging pile is greater than the metering error threshold, the gradual disappearance factor is γK|P|; when the charging pile operates normally and the metering error data is less than or equal to the metering error threshold, the gradual disappearance factor is K|P|, where γ is the multiple setting value and its value is greater than 1, K is the setting coefficient, and P is the metering error data of the charging pile.
5. The method for predicting the measurement error of a public charging pile group according to claim 3 or 4, characterized in that: If the sampled charging pile operates abnormally or the charging pile operates normally and the metering error data of the charging pile is greater than the metering error threshold, the charging pile will be repaired and the charging pile will be selected for inspection next time. If the charging pile still operates abnormally or the charging pile still operates normally and the metering error data of the charging pile is greater than the metering error threshold, the charging pile will be returned to the factory for repair.
6. The method for predicting the measurement error of a public charging pile group according to claim 1, characterized in that: The metering error data of the charging piles sampled from the charging pile group is an average value of the metering error data of at least two sampled charging piles.
7. A computer system comprising a processor, characterized in that: The processor is used to execute a computer program to implement the steps of the public charging pile group metering error prediction method according to any one of claims 1 to 6.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for predicting the metering error of a public charging pile group as described in any one of claims 1 to 6 are implemented.
9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method for predicting the metering error of a public charging pile group as described in any one of claims 1 to 6 are implemented.
