Power quality waveform data analysis method, device, equipment and program product
By performing segmented processing and interpolation processing on the power quality waveform data, the target power quality waveform data is generated and spectrum analysis is carried out, and the problem of poor convenience of the power quality waveform data analysis method in the prior art is solved, and efficient analysis on devices with limited memory resources is achieved.
Patent Information
- Application Number
- CN202411623118.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-04-01
AI Technical Summary
The existing power quality waveform data analysis method is difficult to implement on devices with limited memory resources due to the high memory requirement for data interpolation processing, resulting in poor convenience.
By segmenting the initial power mass waveform data, multiple initial sub-waveform data are obtained, and interpolated for each sub-waveform data to obtain the target sub-waveform data, and then the target sub-waveform data are combined to process the target sub-waveform data to generate the target power mass waveform data, and finally spectrum analysis is performed.
The memory resources required for interpolation processing are reduced, so that the power quality waveform data analysis can be implemented on devices with limited memory resources, improving the convenience of the analysis method.
Smart Images

Figure CN119739978A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data processing technology, and in particular relates to a method, device, electronic equipment and program product for analyzing power quality waveform data. Background Art
[0002] When analyzing power quality waveform data, it is usually necessary to first perform data interpolation processing on the power quality waveform data, and then analyze the power quality waveform data after the interpolation processing.
[0003] However, data interpolation processing of power quality waveform data has high memory requirements, so it can only be implemented by devices with rich memory resources, but not by devices with limited memory resources. Therefore, the convenience of existing power quality waveform data analysis methods is poor. Summary of the invention
[0004] In view of this, the embodiments of the present application provide a method, device, equipment and program product for analyzing power quality waveform data to solve the technical problem that the existing methods for analyzing power quality waveform data are less convenient.
[0005] In a first aspect, an embodiment of the present application provides a method for analyzing power quality waveform data, comprising:
[0006] Obtaining initial power quality waveform data;
[0007] The initial power quality waveform data is processed in sections to obtain multiple sections of initial sub-waveform data;
[0008] For each section of the initial sub-waveform data, interpolation processing is performed on the initial sub-waveform data to obtain target sub-waveform data corresponding to the initial sub-waveform data;
[0009] Merging the target sub-waveform data to obtain target power quality waveform data;
[0010] Performing spectrum analysis on the target power quality waveform data.
[0011] Optionally, the multiple segments of initial sub-waveform data include the first segment of initial sub-waveform data to the Sth segment of initial sub-waveform data, the number of data points of the first segment of initial sub-waveform data is the same as the number of data points of the Sth segment of initial sub-waveform data, the number of data points of the second segment of initial sub-waveform data to the S-1th segment of initial sub-waveform data is the same, there is an overlapping data segment between any segment of initial sub-waveform data and the adjacent initial sub-waveform data, and S is an integer not less than 2.
[0012] Optionally, the initial sub-waveform data includes a plurality of data points, and an initial interpolation interval is included between any two adjacent data points; the interpolation processing of the initial sub-waveform data includes:
[0013] Determining a plurality of target interpolation intervals according to a preset interpolation step size and each of the initial interpolation intervals;
[0014] According to each of the target interpolation intervals, the initial sub-waveform data is interpolated.
[0015] Optionally, performing interpolation processing on the initial sub-waveform data according to each of the target interpolation intervals includes:
[0016] For each target interpolation interval of the initial sub-waveform data, determining a cubic spline interpolation curve of the target interpolation interval;
[0017] The initial sub-waveform data is interpolated using the cubic spline interpolation curve of each target interpolation interval.
[0018] Optionally, determining the cubic spline interpolation curve of the target interpolation interval includes:
[0019] According to the number of data points of the initial power quality waveform data, a cubic spline interpolation polynomial of the target interpolation interval is established;
[0020] Determining each coefficient in the cubic spline interpolation polynomial according to a preset interpolation point condition, a preset continuity condition, and a preset boundary condition;
[0021] A cubic spline interpolation curve of the target interpolation interval is determined according to the cubic spline interpolation polynomial and the coefficients.
[0022] Optionally, after obtaining the target sub-waveform data corresponding to the initial sub-waveform data, the method further includes:
[0023] The coefficients corresponding to each target interpolation interval in the initial sub-waveform data are stored in sequence in a data memory of the single-chip computer.
[0024] Optionally, the merging of the target sub-waveform data to obtain the target power quality waveform data includes:
[0025] Each of the target sub-waveform data is merged to obtain the target power quality waveform data whose number of data points is 2 to the Mth power, where M is an integer not less than 1.
[0026] In a second aspect, an embodiment of the present application provides a device for analyzing power quality waveform data, comprising:
[0027] A waveform data acquisition unit, used for acquiring initial power quality waveform data;
[0028] A segmentation processing unit, used for performing segmentation processing on the initial power quality waveform data to obtain multiple segments of initial sub-waveform data;
[0029] An interpolation processing unit, used for performing interpolation processing on each section of the initial sub-waveform data to obtain target sub-waveform data corresponding to the initial sub-waveform data;
[0030] A merging processing unit, used for merging the target sub-waveform data to obtain target power quality waveform data;
[0031] An analysis unit is used to perform spectrum analysis on the target power quality waveform data.
[0032] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, each step of the method for analyzing power quality waveform data as described in the first aspect is implemented.
[0033] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method for analyzing power quality waveform data as described in the first aspect above.
[0034] In a fifth aspect, an embodiment of the present application provides a computer program, which, when executed on an electronic device, enables the electronic device to execute the steps of the method for analyzing power quality waveform data as described in the first aspect above.
[0035] The power quality waveform data analysis method, device, equipment and program product provided in the embodiments of the present application have the following beneficial effects:
[0036] In the power quality waveform data analysis method provided in the embodiment of the present application, the initial power quality waveform data is first obtained, and then the initial power quality waveform data is segmented to obtain multiple segments of initial sub-waveform data, and then for each segment of the initial sub-waveform data, the initial sub-waveform data is interpolated to obtain the target sub-waveform data corresponding to the initial sub-waveform data, and then each target sub-waveform data is merged to obtain the target power quality waveform data, and finally the target power quality waveform data is subjected to spectrum analysis. Through the power quality waveform data analysis method of the present application, the initial power quality waveform data can be segmented to obtain multiple segments of initial sub-waveform data, and then each segment of the initial sub-waveform data is interpolated respectively. Since the number of interpolation intervals of each segment of the initial sub-waveform data is less than the number of interpolation intervals of the initial power quality waveform data, the memory resources required when each segment of the initial sub-waveform data is interpolated are relatively small, so that the power quality waveform data analysis method of the present application can be executed by a device with limited memory resources, thereby improving the convenience of the power quality waveform data analysis method. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0038] Figure 1 A flowchart of an implementation method of an analysis method of power quality waveform data provided in an embodiment of the present application;
[0039] Figure 2 A comparison diagram of the interpolation result obtained by the power quality waveform data analysis method provided in the embodiment of the present application and the interpolation result obtained by the prior art method;
[0040] Figure 3 A schematic diagram of the structure of a device for analyzing power quality waveform data provided in an embodiment of the present application;
[0041] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0042] It should be noted that the terms used in the embodiments of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application. In the description of the embodiments of the present application, unless otherwise specified, "multiple" refers to two or more than two, and "at least one", "one or more" refers to one, two or more. The terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, it is defined that the "first" and "second" features can explicitly or implicitly include one or more of the features.
[0043] References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear at different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0044] The execution subject of the analysis method for power quality waveform data provided in the embodiment of the present application may be an electronic device. Specifically, the execution subject of the analysis method for power quality waveform data provided in the embodiment of the present application may be an electronic device with limited memory resources (such as a single-chip microcomputer). Of course, the execution subject of the analysis method for power quality waveform data provided in the embodiment of the present application may also be an electronic device with abundant memory resources (such as laptop computers, desktop computers, and tablet computers, etc.).
[0045] The power quality waveform data analysis method provided in the embodiment of the present application can be applied to application scenarios where the power quality waveform data needs to be analyzed using an electronic device with limited memory resources. For example, when the power quality waveform data needs to be analyzed by a single-chip microcomputer, the user can use the single-chip microcomputer to execute the various steps of the power quality waveform data analysis method provided in the embodiment of the present application, so that the single-chip microcomputer can analyze the power quality waveform data, thereby improving the convenience of the power quality waveform data analysis method.
[0046] See also Figure 1 , Figure 1 The present invention provides a flowchart of a method for analyzing power quality waveform data in an embodiment of the present invention. The method for analyzing power quality waveform data in an embodiment of the present invention may include steps S101 to S105, which are described in detail as follows:
[0047] In S101, initial power quality waveform data is acquired.
[0048] In an embodiment of the present application, the electronic device may first obtain initial power quality waveform data that needs to be analyzed.
[0049] Exemplarily, the electronic device may acquire the initial power quality waveform data through an analog to digital converter (ADC).
[0050] The initial power quality waveform data may include N data points. These data points may be represented as (t0, y0), (t1, y1), …, (t N ,y N ).
[0051] In S102, the initial power quality waveform data is segmented to obtain multiple segments of initial sub-waveform data.
[0052] In an embodiment of the present application, after acquiring the initial power quality waveform data, the electronic device may perform segmented processing on the acquired initial power quality waveform data to obtain multiple segments of initial sub-waveform data, wherein the multiple segments of initial sub-waveform data may include the first segment of initial sub-waveform data to the Sth segment of initial sub-waveform data.
[0053] In a possible implementation, in order to ensure the data continuity of each segment of the initial sub-waveform data and the phase continuity after interpolation when interpolating each segment of the initial sub-waveform data, and to meet the interpolation boundary conditions, when the initial power quality waveform data is segmented, the first segment of the initial sub-waveform data can be made to take a preset number of data backwards, and each segment of the initial sub-waveform data from the second segment of the initial sub-waveform data to the S-1 segment of the initial sub-waveform data can be made to take a preset number of data forwards and backwards respectively, and the S segment of the initial sub-waveform data can be made to take a preset number of data forwards.
[0054] In each segment of initial sub-waveform data obtained in the above manner, the number of data points in the first segment of initial sub-waveform data is the same as the number of data points in the Sth segment of initial sub-waveform data, the number of data points in the second segment of initial sub-waveform data to the S-1th segment of initial sub-waveform data is the same, and there is an overlapping data segment between any segment of initial sub-waveform data and the adjacent initial sub-waveform data.
[0055] Exemplarily, the preset number may be 2, based on which, each segment of initial sub-waveform data may be expressed as:
[0056] Seg1=(t0,y0),(t1,y1),…,(t n ,y n ),(tn+1 ,y n+1 ),(t n+2 ,y n+2 )
[0057] Seg2=(t n-2 ,y n-2 ),(t n-1 ,y n-1 ),(t n ,y n ),…,(t 2n ,y 2n ),(t 2n+1 ,y 2n+1 ),(t 2n+2 ,y 2n+2 )
[0058]
[0059] Seg S =(t (S-1)n-2 ,y (S-1)n-2 ),(t (S-1)n-1 ,y (S-1)n-1 ),(t (S-1)n ,y (S-1)n )…,(t N ,y N )
[0060] Among them, Seg1 represents the first segment of initial sub-waveform data, Seg2 represents the second segment of initial sub-waveform data, and Seg s Represented as the Sth segment of initial sub-waveform data.
[0061] In S103, for each segment of initial sub-waveform data, interpolation processing is performed on the initial sub-waveform data to obtain target sub-waveform data corresponding to the initial sub-waveform data.
[0062] In an embodiment of the present application, after obtaining multiple segments of initial sub-waveform data, the electronic device can perform interpolation processing on the initial sub-waveform data for each segment of initial sub-waveform data to obtain target sub-waveform data corresponding to the initial sub-waveform data, thereby obtaining target sub-waveform data corresponding to each segment of initial sub-waveform data.
[0063] When performing interpolation processing on any initial sub-waveform data, each initial interpolation interval included in the initial sub-waveform data may be determined first, wherein an initial interpolation interval is included between any two adjacent data points in the initial sub-waveform data.
[0064] After determining each initial interpolation interval of the initial sub-waveform data, the electronic device may determine a plurality of target interpolation intervals according to a preset interpolation step size and each initial interpolation interval.
[0065] In practical applications, the interpolation step size can be set according to actual needs and is not limited here. For example, the specific value of the interpolation step size can be set to be greater than 1.
[0066] After determining each target interpolation interval of the initial sub-waveform data, the electronic device can perform interpolation processing on the initial sub-waveform data according to each target interpolation interval. Specifically, the electronic device can determine the cubic spline interpolation curve of each target interpolation interval of the initial sub-waveform data, and then perform interpolation processing on the initial sub-waveform data through the cubic spline interpolation curve of each target interpolation interval.
[0067] In a possible implementation, the electronic device may determine the cubic spline interpolation curve of the target interpolation interval through steps a to c, as described in detail as follows:
[0068] In step a, a cubic spline interpolation polynomial of the target interpolation interval is established according to the number of data points of the initial power quality waveform data.
[0069] In this implementation, the electronic device can predetermine the number of data points of the initial power quality waveform data. When it is necessary to determine the cubic spline interpolation curve of the target interpolation interval, the electronic device can establish the cubic spline interpolation polynomial of the target interpolation interval based on the number of data points of the initial power quality waveform data.
[0070] Exemplarily, the cubic spline interpolation curve of each target interpolation interval can be expressed as:
[0071] Y i (t) = a i +b i (tt i )+c i (tt i ) 2 +d i (tt i ) 3
[0072] Among them, Y i (t) represents the interpolation polynomial on the target interpolation interval of the i-th segment, a i ,b i ,c i ,d i is the polynomial coefficient on the i-th target interpolation interval.
[0073] In step b, each coefficient in the cubic spline interpolation polynomial is determined according to a preset interpolation point condition, a preset continuity condition and a preset boundary condition.
[0074] In this implementation, the electronic device can pre-acquire preset interpolation point conditions, preset continuity conditions, and preset boundary conditions. When it is necessary to determine the coefficients in the cubic spline interpolation polynomial, the electronic device can determine the polynomial coefficients in the cubic spline interpolation polynomial based on the preset interpolation point conditions, preset continuity conditions, and preset boundary conditions.
[0075] Specifically, the electronic device may first construct a set of equations including various polynomial coefficients according to preset interpolation point conditions, preset continuity conditions, and preset boundary conditions, and then solve the various polynomial coefficients in the set of equations by Gaussian elimination method.
[0076] It should be noted that the polynomial coefficients corresponding to each different target interpolation interval are not completely the same.
[0077] In step c, a cubic spline interpolation curve of the target interpolation interval is determined according to the cubic spline interpolation polynomial and each coefficient.
[0078] In this implementation, after the cubic spline interpolation polynomial and each coefficient are determined, the electronic device can determine the cubic spline interpolation curve of the target interpolation interval according to the cubic spline interpolation polynomial and each coefficient.
[0079] In addition, the electronic device can also store the polynomial coefficients corresponding to the target interpolation intervals. Specifically, the electronic device can store the coefficients corresponding to the target interpolation intervals in the initial sub-waveform data in the data memory of the single chip in order.
[0080] In S104, each target sub-waveform data is merged to obtain target power quality waveform data.
[0081] In the embodiment of the present application, after obtaining the target sub-waveform data corresponding to each segment of the initial sub-waveform data, the electronic device may merge and process the target sub-waveform data to obtain the target power quality waveform data.
[0082] In addition, since it is necessary to perform spectral analysis on the target power quality waveform data, the electronic device also needs to merge the various target sub-waveform data to obtain target power quality waveform data with a number of data points being 2 to the power of M, where M is an integer not less than 1.
[0083] In S105 , spectrum analysis is performed on the target power quality waveform data.
[0084] In the embodiment of the present application, after obtaining the target power quality waveform data, the electronic device may perform spectrum analysis on the target power quality waveform data.
[0085] As can be seen from the above, in the power quality waveform data analysis method provided in the embodiment of the present application, the initial power quality waveform data is first obtained, and then the initial power quality waveform data is segmented to obtain multiple segments of initial sub-waveform data, and then for each segment of initial sub-waveform data, the initial sub-waveform data is interpolated to obtain the target sub-waveform data corresponding to the initial sub-waveform data, and then each target sub-waveform data is merged to obtain the target power quality waveform data, and finally the target power quality waveform data is subjected to spectrum analysis. Through the power quality waveform data analysis method of the present application, the initial power quality waveform data can be segmented to obtain multiple segments of initial sub-waveform data, and then each segment of initial sub-waveform data is interpolated respectively. Since the number of interpolation intervals of each segment of initial sub-waveform data is less than the number of interpolation intervals of the initial power quality waveform data, the memory resources required when each segment of initial sub-waveform data is interpolated are relatively small, so that the power quality waveform data analysis method of the present application can be executed by a device with limited memory resources, thereby improving the convenience of the power quality waveform data analysis method.
[0086] The following is an example for illustrating the principle of executing the power quality waveform data analysis method of the present application through a device with limited memory resources:
[0087] Exemplarily, the number of data points of the initial power quality waveform data acquired by the electronic device may be 6144, and in order to perform spectral analysis on the target power quality waveform data, the number of data points of the target power quality waveform data may be 2048, that is, the interpolation step size in this example is 6144 / 2048=3.
[0088] In the prior art, the initial power quality waveform data with 6144 data points contains 6143 interpolation intervals and a total of 6143 cubic spline polynomials. Therefore, the number of cubic spline interpolation polynomial coefficients that need to be solved simultaneously is 6143×4=24572. Therefore, the memory required to store these cubic spline interpolation polynomial coefficients is close to 96KB.
[0089] According to the power quality waveform data analysis method provided in the embodiment of the present application, it is assumed that the initial power quality waveform data is segmented to obtain 16 segments of initial sub-waveform data, and when the initial power quality waveform data is segmented, the first segment of the initial sub-waveform data can be made to take 2 more data backward, and each segment of the initial sub-waveform data from the second segment of the initial sub-waveform data to the S-1 segment of the initial sub-waveform data can be made to take 2 more data forward and backward respectively, and the S segment of the initial sub-waveform data can be made to take 2 more data forward. Based on this, the number of data points of each segment of the initial sub-waveform data can be 384+2, 384+4,…, 384+2, so the maximum value of the interpolation interval of each segment of the initial sub-waveform data is 387, so the number of cubic spline interpolation polynomial coefficients that need to be solved simultaneously is 387×4=1548, and the memory required to store these cubic spline interpolation polynomial coefficients is approximately 6KB.
[0090] It can be seen that when processing the same initial power quality waveform data, the power quality waveform data analysis method provided by the embodiment of the present application can greatly reduce the required memory resources. Therefore, the power quality waveform data can be analyzed using a device with limited memory resources, thereby improving the convenience of the power quality waveform data analysis method.
[0091] Also, see Figure 2 , Figure 2 A comparison chart of the interpolation results obtained by the power quality waveform data analysis method provided in the embodiment of the present application and the interpolation results obtained by the prior art method. Figure 2 It can be seen that the interpolation result obtained by the power quality waveform data analysis method provided in the embodiment of the present application can also obtain an interpolation result with high interpolation accuracy and data continuity.
[0092] Based on the power quality waveform data analysis method provided in the above embodiment, the present application further provides a power quality waveform data analysis device that implements the above method embodiment. Figure 3 , Figure 3 A schematic diagram of the structure of a device for analyzing power quality waveform data provided in an embodiment of the present application. Figure 3 As shown, the power quality waveform data analysis device 30 may include: a waveform data acquisition unit 31, a segmentation processing unit 32, an interpolation processing unit 33, a merging processing unit 34 and an analysis unit 35. Among them:
[0093] The waveform data acquisition unit 31 is used to acquire initial power quality waveform data.
[0094] The segment processing unit 32 is used to perform segment processing on the initial power quality waveform data to obtain multiple segments of initial sub-waveform data.
[0095] The interpolation processing unit 33 is used to perform interpolation processing on each segment of initial sub-waveform data to obtain target sub-waveform data corresponding to the initial sub-waveform data.
[0096] The merging processing unit 34 is used to merge the target sub-waveform data to obtain the target power quality waveform data.
[0097] The analysis unit 35 is used to perform spectrum analysis on the target power quality waveform data.
[0098] Optionally, the multiple segments of initial sub-waveform data include the first segment of initial sub-waveform data to the Sth segment of initial sub-waveform data, the number of data points of the first segment of initial sub-waveform data is the same as the number of data points of the Sth segment of initial sub-waveform data, the number of data points of the second segment of initial sub-waveform data to the S-1th segment of initial sub-waveform data is the same, there is an overlapping data segment between any segment of initial sub-waveform data and the adjacent initial sub-waveform data, and S is an integer not less than 2.
[0099] Optionally, the interpolation processing unit 33 is specifically used for:
[0100] Determine a number of target interpolation intervals according to a preset interpolation step size and each initial interpolation interval;
[0101] According to each target interpolation interval, the initial sub-waveform data is interpolated.
[0102] Optionally, the interpolation processing unit 33 is specifically used for:
[0103] For each target interpolation interval of the initial sub-waveform data, determining a cubic spline interpolation curve of the target interpolation interval;
[0104] The initial sub-waveform data is interpolated through the cubic spline interpolation curve of each target interpolation interval.
[0105] Optionally, the interpolation processing unit 33 is specifically used for:
[0106] According to the number of data points of the initial power quality waveform data, a cubic spline interpolation polynomial of the target interpolation interval is established;
[0107] Determining each coefficient in the cubic spline interpolation polynomial according to a preset interpolation point condition, a preset continuity condition, and a preset boundary condition;
[0108] According to the cubic spline interpolation polynomial and each coefficient, a cubic spline interpolation curve of the target interpolation interval is determined.
[0109] Optionally, the power quality waveform data analysis device 30 may further include a storage unit.
[0110] The storage unit is used to store the coefficients corresponding to each target interpolation interval in the initial sub-waveform data in sequence in the data storage of the single-chip computer.
[0111] Optionally, the merging processing unit 34 is specifically configured to:
[0112] Each target sub-waveform data is merged to obtain target power quality waveform data whose number of data points is 2 to the Mth power, where M is an integer not less than 1.
[0113] See also Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 4 As shown, the electronic device 4 provided in this embodiment may include: a processor 40, a memory 41, and a computer program 42 stored in the memory 41 and executable on the processor 40, such as a program corresponding to the method for analyzing power quality waveform data. When the processor 40 executes the computer program 42, the steps in the embodiment of the method for analyzing power quality waveform data are implemented, such as Figure 1 Alternatively, when the processor 40 executes the computer program 42, the functions of each module / unit in the above-mentioned power quality waveform data analysis device embodiment are realized, for example Figure 3 The functions of the units 31 to 34 are shown.
[0114] Exemplarily, the computer program 42 may be divided into one or more modules / units, one or more modules / units are stored in the memory 41 and executed by the processor 40 to complete the present application. The one or more modules / units may be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program 42 in the electronic device 4. For example, the computer program 42 may be divided into a waveform data acquisition unit 31, a segmentation processing unit 32, an interpolation processing unit 33, a merging processing unit 34, and an analysis unit 35. For the specific functions of each unit, please refer to Figure 3 The relevant descriptions in the corresponding embodiments are not repeated here.
[0115] Those skilled in the art will understand that Figure 4 The electronic device 4 is merely an example and does not limit the electronic device 4 . The electronic device 4 may include more or fewer components than shown in the figure, or may combine certain components, or may include different components.
[0116] The processor 40 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0117] The memory 41 may be an internal storage unit of the electronic device 4, such as a hard disk or memory of the electronic device 4. The memory 41 may also be an external storage device of the electronic device 4, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, or a flash card, etc., equipped on the electronic device 4. Further, the memory 41 may also include both an internal storage unit and an external storage device of the electronic device 4. The memory 41 is used to store computer programs and other programs and data required by the electronic device. The memory 41 may also be used to temporarily store data that has been output or is to be output.
[0118] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the division of the above-mentioned functional units is used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different functional units as needed, that is, the internal structure of the power quality waveform data analysis device can be divided into different functional units to complete all or part of the functions described above. The functional units in the embodiment can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0119] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0120] An embodiment of the present application provides a computer program product. When the computer program product is executed on a terminal device, the terminal device implements the steps in the above-mentioned various method embodiments.
[0121] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0122] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0123] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for analyzing power quality waveform data, characterized in that: include: Obtaining initial power quality waveform data; The initial power quality waveform data is processed in sections to obtain multiple sections of initial sub-waveform data; For each section of the initial sub-waveform data, interpolation processing is performed on the initial sub-waveform data to obtain target sub-waveform data corresponding to the initial sub-waveform data; Merging the target sub-waveform data to obtain target power quality waveform data; Performing spectrum analysis on the target power quality waveform data.
2. The method according to claim 1, characterized in that The multiple segments of initial sub-waveform data include the first segment of initial sub-waveform data to the Sth segment of initial sub-waveform data, the number of data points of the first segment of initial sub-waveform data is the same as the number of data points of the Sth segment of initial sub-waveform data, the number of data points of the second segment of initial sub-waveform data to the S-1th segment of initial sub-waveform data is the same, there is an overlapping data segment between any segment of initial sub-waveform data and the adjacent initial sub-waveform data, and S is an integer not less than 2.
3. The method according to claim 1, characterized in that The initial sub-waveform data includes a plurality of data points, and an initial interpolation interval is included between any two adjacent data points; the interpolation processing of the initial sub-waveform data includes: Determining a plurality of target interpolation intervals according to a preset interpolation step size and each of the initial interpolation intervals; According to each of the target interpolation intervals, the initial sub-waveform data is interpolated.
4. The method according to claim 3, characterized in that The interpolation process is performed on the initial sub-waveform data according to each target interpolation interval, including: For each target interpolation interval of the initial sub-waveform data, determining a cubic spline interpolation curve of the target interpolation interval; The initial sub-waveform data is interpolated using the cubic spline interpolation curve of each target interpolation interval.
5. The method according to claim 4, characterized in that The step of determining the cubic spline interpolation curve of the target interpolation interval comprises: According to the number of data points of the initial power quality waveform data, a cubic spline interpolation polynomial of the target interpolation interval is established; Determining each coefficient in the cubic spline interpolation polynomial according to a preset interpolation point condition, a preset continuity condition, and a preset boundary condition; A cubic spline interpolation curve of the target interpolation interval is determined according to the cubic spline interpolation polynomial and the coefficients.
6. The method according to claim 5, characterized in that After obtaining the target sub-waveform data corresponding to the initial sub-waveform data, the method further includes: The coefficients corresponding to each target interpolation interval in the initial sub-waveform data are stored in sequence in a data memory of the single-chip computer.
7. The method according to any one of claims 1 to 6, characterized in that: The step of merging the target sub-waveform data to obtain the target power quality waveform data includes: Each of the target sub-waveform data is merged to obtain the target power quality waveform data whose number of data points is 2 to the Mth power, where M is an integer not less than 1.
8. A device for analyzing power quality waveform data, characterized in that: include: A waveform data acquisition unit, used for acquiring initial power quality waveform data; A segmentation processing unit, used for performing segmentation processing on the initial power quality waveform data to obtain multiple segments of initial sub-waveform data; An interpolation processing unit, used for performing interpolation processing on each section of the initial sub-waveform data to obtain target sub-waveform data corresponding to the initial sub-waveform data; A merging processing unit, used for merging the target sub-waveform data to obtain target power quality waveform data; An analysis unit is used to perform spectrum analysis on the target power quality waveform data.
9. An electronic device 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, each step of the method for analyzing power quality waveform data according to any one of claims 1 to 7 is implemented.
10. A computer program product, characterized in that When the computer program product is executed by a processor, each step of the method for analyzing power quality waveform data according to any one of claims 1 to 7 is implemented.