Electric power data optimization storage method
By screening data based on the linear slope of power data in the power system and using the storage value judgment method, the problem of high data storage cost in the power system is solved, and efficient data storage and reduced CPU performance are achieved.
Patent Information
- Application Number
- CN202411265888.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2025-01-03
AI Technical Summary
In power systems, millisecond-level data acquisition and dynamic changes lead to a large number of data storage requirements, resulting in high storage costs and high CPU performance requirements.
By setting an initially empty data set V, setting the slope calculation flag and data acquisition interval time step, filtering the data based on the linear change slope of the collected data, only data with storage value is stored, and the storage value judgment is used to judge The value of the data and decide whether to store the data based on the results.
It realizes optimized storage of power data, shaving redundant data without storage value, saving storage costs, and reducing CPU performance requirements.
Abstract
Description
Technical Field
[0001] The present invention relates to the technology of power system, and in particular to the technology of a method for optimizing storage of power data. Background Art
[0002] In power protection equipment, it often only takes tens of milliseconds to several milliseconds for the protection to start and take action. This process will generate a large amount of millisecond-level data. At the same time, a large amount of dynamically changing data will also be generated during the power system power flow changes. Only by storing this data can the power equipment be controlled and analyzed.
[0003] With the development of power automation technology and the improvement of computer equipment performance, the need for digital modeling of twin substations has arisen, and the complete preservation of power system dynamic data is becoming the most important data source for data centers. Since there are tens of thousands of collection points in the power system, saving millisecond-level collection data in the power system requires a large amount of storage capacity and also has high requirements for CPU computing power. Summary of the invention
[0004] In view of the defects existing in the above-mentioned prior art, the technical problem to be solved by the present invention is to provide a power data optimization storage method that can reduce the data storage cost.
[0005] In order to solve the above technical problems, the present invention provides a method for optimizing and storing power data, which is characterized by the following specific steps:
[0006] 1) Set an initially empty data set V, set the slope calculation flag flag = 0, the calculation point flag Curdot = 1, and set the current time point to t, and the data collection interval time step to Tstep;
[0007] 2) The collected data of the power system in the period (t-Tstep, t] are put into the data set V in order from the earliest to the latest according to the collection time sequence. The period (t-Tstep, t] does not include the t-Tstep time point and includes the t time point;
[0008] 3) If the number of collected data in the period (t-Tstep, t] is 0, wait for Tstep time, then set t=t+Tstep and go to step 2);
[0009] If the collected data in the period (t-Tstep, t] is 1, then the collected data in the period (t-Tstep, t] is stored in the target device, and waits for Tstep time, then sets t=t+Tstep and clears the data set V and goes to step 2);
[0010] If the number of collected data in the period (t-Tstep, t] is greater than 1 and flag=0, go to step 4);
[0011] If the number of collected data in the period (t-Tstep, t] is greater than 1 and flag = 1, set Curdot = 2 and go to step 5);
[0012] 4) V curdot Store in the target device, set flag = 1, and calculate the slope k of the collected data, then wait for Tstep time, then set t = t + Tstep and clear the data set V and go to step 2);
[0013] The calculation formula for the slope k of the collected data is: k = (V n -V curdot ) / (t n -t curdot )
[0014] Where V n The last collected data in the dataset V, V curdot is the Curdot-th collected data in the dataset V, t n V n The collection time point, t curdot V curdot The collection time point;
[0015] 5) Determine the value of the collected data based on the storage value judgment formula. The specific storage value judgment formula is:
[0016] fabs(V1+k×(t Curdot -t1)-V Curdot )≤β×(V1+V Curdot ) / 2
[0017] Where fabs is the absolute value function, V1 is the first collected data in the data set V, and V Curdot is the Curdot-th collected data in the dataset V, t Curdot V Curdot t1 is the acquisition time point of V1, β is the preset data acquisition accuracy, and the typical value of β is 0.005~0.02;
[0018] If the result of the stored value judgment is true, set Curdot = Curdot + 1, and then go to step 6);
[0019] If the stored value judgment is false, V Curdot Save to the target device, then go to step 7);
[0020] 6) If Curdot=n, set Curdot=1, wait for Tstep time, set t=t+Tstep, clear the data set V and go to step 2); otherwise, go to step 5);
[0021] 7) If Curdot = n, set Curdot = 1, wait for Tstep time, set t = t + Tstep, clear the data set V and go to step 2);
[0022] Otherwise, the slope k of the collected data is recalculated according to the slope calculation formula in step 4), and Curdot=Curdot+1 is set, and then go to step 5).
[0023] The power data optimization storage method provided by the present invention screens data according to the linear change slope of the collected data, thereby eliminating redundant data with no storage value, saving storage costs and reducing the performance requirements for the CPU. DETAILED DESCRIPTION
[0024] The technical solution of the present invention is further described in detail below in conjunction with specific embodiments, but this embodiment is not intended to limit the present invention. All similar structures and similar variations of the present invention should be included in the protection scope of the present invention. The commas in the present invention represent the relationship of and, and the English letters in the present invention are case-sensitive.
[0025] An embodiment of the present invention provides a method for optimizing and storing power data, characterized in that the specific steps are as follows:
[0026] 1) Set an initially empty data set V, set the slope calculation flag flag = 0, the calculation point flag Curdot = 1, and set the current time point to t, the data collection interval time step to Tstep, and the typical value of Tstep is 10 seconds;
[0027] 2) The collected data of the power system in the period (t-Tstep, t] are put into the data set V in order from the earliest to the latest according to the collection time sequence. The period (t-Tstep, t] does not include the t-Tstep time point and includes the t time point;
[0028] 3) If the number of collected data in the period (t-Tstep, t] is 0, wait for Tstep time, then set t=t+Tstep and go to step 2);
[0029] If the collected data in the period (t-Tstep, t] is 1, then the collected data in the period (t-Tstep, t] is stored in the target device (the target device refers to the storage device used to store power data), and wait for Tstep time, then set t=t+Tstep and clear the data set V and go to step 2);
[0030] If the number of collected data in the period (t-Tstep, t] is greater than 1 and flag=0, go to step 4);
[0031] If the number of collected data in the period (t-Tstep, t] is greater than 1 and flag = 1, set Curdot = 2 and go to step 5);
[0032] 4) V curdot Store in the target device, set flag = 1, and calculate the slope k of the collected data, then wait for Tstep time, then set t = t + Tstep and clear the data set V and go to step 2);
[0033] The calculation formula for the slope k of the collected data is: k = (V n -V curdot ) / (t n -t curdot )
[0034] Where V n The last collected data in the dataset V, V curdot is the Curdot-th collected data in the dataset V, t n V n The collection time point, t curdot V curdot The collection time point;
[0035] 5) Determine the value of the collected data based on the storage value judgment formula. The specific storage value judgment formula is:
[0036] fabs(V1+k×(t Curdot -t1)-V Curdot )≤β×(V1+V Curdot ) / 2
[0037] Where fabs is the absolute value function, V1 is the first collected data in the data set V, and V Curdot is the Curdot-th collected data in the dataset V, t Curdot V Curdot t1 is the acquisition time point of V1, β is the preset data acquisition accuracy, and the typical value of β is 0.005~0.02;
[0038] If the result of the storage value judgment formula is true, it means that the value change of the collected data is small and has no storage value, so let Curdot=Curdot+1, and then go to step 6);
[0039] If the result of the storage value judgment formula is false, it means that the value of the collected data has a large change and has storage value, then V CurdotSave to the target device, then go to step 7);
[0040] 6) If Curdot=n, set Curdot=1, wait for Tstep time, set t=t+Tstep, clear the data set V and go to step 2); otherwise, go to step 5);
[0041] 7) If Curdot = n, set Curdot = 1, wait for Tstep time, set t = t + Tstep, clear the data set V and go to step 2);
[0042] Otherwise, the slope k of the collected data is recalculated according to the slope calculation formula in step 4), and Curdot=Curdot+1 is set, and then go to step 5).
[0043] The power data stored by the method of the embodiment of the present invention can be used to store data at a specified time point. When the stored data needs to be queried later, the data of the two adjacent collection points before and after the specified time point can be searched in the stored data, and then linear fitting can be performed based on the data of the two adjacent collection points to obtain the data at the specified time point.
Claims
1. A method for optimizing and storing power data, characterized in that: The specific steps are as follows: 1) Set an initially empty data set V, set the slope calculation flag flag = 0, the calculation point flag Curdot = 1, and set the current time point to t, and the data collection interval time step to Tstep; 2) The collected data of the power system in the period (t-Tstep, t] are put into the data set V in order from the earliest to the latest according to the collection time sequence. The period (t-Tstep, t] does not include the t-Tstep time point and includes the t time point; 3) If the number of collected data in the period (t-Tstep, t] is 0, wait for Tstep time, then set t=t+Tstep and go to step 2); If the collected data in the period (t-Tstep, t] is 1, then store the collected data in the period (t-Tstep, t] into the target device, wait for Tstep time, then set t=t+Tstep and clear the data set V and go to step 2); If the number of collected data in the period (t-Tstep, t] is greater than 1 and flag=0, go to step 4); If the number of collected data in the period (t-Tstep, t] is greater than 1 and flag = 1, set Curdot = 2 and go to step 5); 4) V curdot Store in the target device, set flag = 1, and calculate the slope k of the collected data, then wait for Tstep time, then set t = t + Tstep and clear the data set V and go to step 2); The calculation formula for the slope k of the collected data is: k = (V n -V curdot ) / (t n -t curdot ) Where V n The last collected data in the dataset V, V curdot is the Curdot-th collected data in the dataset V, t n V n The collection time point, t curdot V curdot The collection time point; 5) Determine the value of the collected data based on the storage value judgment formula. The specific storage value judgment formula is: fabs(V1+k×(t Curdot -t1)-V Curdot )≤β×(V1+V Curdot ) / 2 Where fabs is the absolute value function, V1 is the first collected data in the data set V, and V Curdot is the Curdot-th collected data in the dataset V, t Curdot V Curdot t1 is the acquisition time point of V1, β is the preset data acquisition accuracy, and the typical value of β is 0.005~0.02; If the result of the stored value judgment is true, set Curdot = Curdot + 1, and then go to step 6); If the stored value judgment is false, V Curdot Save to the target device, then go to step 7); 6) If Curdot=n, set Curdot=1, wait for Tstep time, set t=t+Tstep, clear the data set V and go to step 2); otherwise, go to step 5); 7) If Curdot = n, set Curdot = 1, wait for Tstep time, set t = t + Tstep, clear the data set V and go to step 2); Otherwise, the slope k of the collected data is recalculated according to the slope calculation formula in step 4), and Curdot=Curdot+1 is set, and then go to step 5).
