A harmonic modeling method and system based on rotation coordinate transformation and vector fitting
The harmonic modeling method using rotating coordinate transformation and vector fitting solves the problems of difficult parameter acquisition and insufficient description of harmonic coupling characteristics in traditional harmonic modeling. It realizes accurate modeling and dynamic adaptation of the harmonic coupling characteristics of distribution networks, improving the modeling accuracy and applicability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANDONG UNIV
- Filing Date
- 2026-03-31
- Publication Date
- 2026-07-31
AI Technical Summary
Traditional harmonic modeling methods in modern power distribution networks suffer from problems such as difficulty in obtaining parameters, limited harmonic analysis frequency, and inability to update parameters in real time, making it difficult to meet the analysis needs of dynamic power grid operation.
By employing a method based on rotating coordinate transformation and vector fitting, time-domain data is mapped to multiple synchronous rotating coordinate systems through signal processing, transforming it into an identification problem of multiple baseband systems. A harmonic coupling admittance model is constructed to achieve accurate modeling of the wideband and cross-frequency harmonic coupling characteristics of the equipment.
It effectively solves the problems of difficult parameter acquisition and insufficient description of harmonic coupling characteristics, improves the accuracy and applicability of modeling, adapts to the dynamic operation characteristics of the power grid, and provides support for online harmonic assessment and real-time active filter design.
Smart Images

Figure CN121939371B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of power system analysis and modeling technology, and in particular relates to a harmonic modeling method and system based on rotating coordinate transformation and vector fitting. Background Technology
[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.
[0003] With the large-scale integration of power electronic devices such as distributed photovoltaic systems, electric vehicle charging stations, and frequency converters, the power electronic characteristics of distribution networks are becoming increasingly prominent, and harmonic pollution within the grid is becoming more and more serious. The coupling characteristics between multiple harmonics have become the core factor inducing harmonic resonance and reducing the stability of grid operation and the security of power supply. Establishing accurate harmonic models is a key foundation for carrying out harmonic assessment, resonance suppression, and protection control design in power systems, and is of great significance for ensuring the safe and efficient operation of distribution networks.
[0004] Traditional harmonic modeling methods are based on physical mechanisms, requiring a clear understanding of the power grid and equipment circuit topology before deriving the relationship between harmonic voltage and current using fundamental circuit principles such as Kirchhoff's laws, and then constructing a harmonic characteristic model. However, this method has many limitations in practical applications of modern distribution networks:
[0005] First, the integration of a massive number of heterogeneous power electronic devices complicates the power grid structure, making it difficult to fully obtain the internal control parameters of the devices and the key parameters of the power grid, which significantly increases the difficulty of constructing harmonic models. Second, most mechanistic models ignore the interaction between harmonics of different frequencies, assuming that harmonic currents are only related to the fundamental wave or specific harmonic voltages, which fails to reflect the actual harmonic coupling characteristics and results in insufficient model accuracy. Finally, the output of new energy sources and the electricity consumption of flexible loads are random and uncertain, and the power grid operation status exhibits dynamic changes. However, the parameter updates of mechanistic modeling methods are lagging behind, making it difficult to achieve real-time model adjustments and adapt to dynamic power grid operating conditions.
[0006] Therefore, traditional harmonic modeling methods suffer from problems such as difficulty in obtaining parameters, limited harmonic analysis frequency, and inability to update parameters in real time, making it difficult to meet the analysis needs of actual power distribution networks. Summary of the Invention
[0007] To overcome the shortcomings of the prior art, this invention provides a harmonic modeling method and system based on rotating coordinate transformation and vector fitting. By using signal processing techniques, the voltage and current data in the time domain are mapped to multiple synchronous rotating coordinate systems, thereby transforming the coupling problem in the frequency domain into the identification problem of multiple baseband systems. This enables accurate modeling of the wideband and cross-frequency harmonic coupling characteristics of the equipment, effectively solving the problems of unclear specific structures and difficulty in obtaining specific parameters in mechanism modeling methods.
[0008] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions:
[0009] The first aspect of this invention provides a harmonic modeling method based on rotating coordinate transformation and vector fitting;
[0010] A harmonic modeling method based on rotating coordinate transformation and vector fitting includes:
[0011] Collect raw three-phase voltage and three-phase current data of target nodes in the distribution network, and preprocess them to obtain standardized voltage and current data;
[0012] Based on each rotation frequency in the preset set of rotation frequencies, perform a rotation coordinate transformation on the standardized voltage data to obtain the transformed voltage data;
[0013] Fast Fourier transform is performed on the transformed voltage data and the standardized current data respectively to obtain voltage frequency domain data and current frequency domain data;
[0014] Calculate the frequency domain admittance matrix based on voltage and current frequency domain data, extract the main diagonal elements of the admittance matrix, and obtain the frequency domain admittance data at the current rotation frequency.
[0015] The frequency domain admittance data is fitted using a vector fitting method to obtain the transfer function corresponding to the current target rotation frequency; the transfer functions corresponding to all target rotation frequencies in the set of rotation frequencies are integrated to construct a complete harmonic coupling admittance model.
[0016] As a further technical solution, the raw three-phase voltage data and raw three-phase current data are preprocessed, including data alignment and outlier removal.
[0017] The data alignment includes: performing zero-crossing detection on voltage time-series data, taking the zero-crossing point where the voltage changes from negative to positive as the starting reference, and extracting data segments that are integer multiples of the fundamental period to achieve time-series alignment between voltage time-series data and current time-series data;
[0018] The outlier removal includes: using a sliding window-based local median absolute deviation algorithm to calculate the median and absolute median difference of the data within the sliding window; when the magnitude of the sampled point within the window deviates from the median by more than the threshold determined by the absolute median difference, it is determined to be an outlier and replaced with the median.
[0019] As a further technical solution, the set of rotation frequencies is:
[0020]
[0021] in, It is a set of rotation frequencies; , Indicates the fundamental frequency. , It is the maximum multiple of the fundamental frequency.
[0022] As a further technical solution, based on each rotation frequency in a preset set of rotation frequencies, a rotational coordinate transformation is performed on the standardized voltage data to obtain the transformed voltage data, including:
[0023] Construct an analytical voltage signal in a coordinate system, and perform a dq transform on the analytical signal to obtain the transformed voltage data. Specifically:
[0024] structure The voltage analytical signal in a two-phase rotating coordinate system will The axial component, as the original voltage signal, undergoes a Hilbert transform to obtain the orthogonal component, as shown in the following formula:
[0025]
[0026] in, for Axial components; A standardized voltage signal; These are orthogonal components; This is the Hilbert transform; For integration variables;
[0027] Calculate the target rotation angular velocity and perform a dq transform on the analytical signal to obtain:
[0028]
[0029]
[0030] In the formula, The target rotational angular velocity; For the q-axis component; This represents the d-axis component, i.e., the required transformed voltage data.
[0031] As a further technical solution, the transformed voltage data and standardized current data are subjected to Fast Fourier Transform (FFT) respectively to obtain voltage frequency domain data and current frequency domain data, including:
[0032] The transformed voltage data and standardized current data in continuous form are discretized to obtain discrete voltage sequences and discrete current sequences, respectively.
[0033] Perform Fast Fourier Transform on the discrete voltage sequence and discrete current sequence respectively to obtain the two-sided voltage spectrum and the two-sided current spectrum;
[0034] Extract the single-sided spectral components of the bilateral voltage spectrum and bilateral current spectrum, and discard the negative frequency components;
[0035] The single-sided spectral component is truncated at the frequency, and only the frequency domain data within the preset effective frequency range is retained to obtain the voltage frequency domain data and the current frequency domain data.
[0036] As a further technical solution, the frequency domain admittance matrix is calculated based on voltage and current frequency domain data, and the main diagonal elements of the admittance matrix are extracted to obtain the frequency domain admittance data at the current rotation frequency, including:
[0037] Build Admittance matrix, matrix elements Defined as , , specifically:
[0038]
[0039] in, The constructed admittance matrix;
[0040] Extracting the main diagonal elements from the admittance matrix yields the rotation frequency. Frequency domain admittance vector:
[0041]
[0042] in, Rotation frequency Frequency domain admittance vector; The diagonalization operator indicates the acquisition of the admittance matrix. main diagonal element T stands for transpose.
[0043] As a further technical solution, a vector fitting method is used to fit the frequency domain admittance data to obtain the transfer function corresponding to the current target rotation frequency; the transfer functions corresponding to all target rotation frequencies in the set of rotation frequencies are integrated to construct a complete harmonic coupling admittance model, including:
[0044] For the admittance vector at each rotation frequency, it is fitted into a rational function form using vector fitting.
[0045] For admittance data with amplitudes less than a set threshold, a weighted fitting strategy is adopted, and weight coefficients are defined and an objective function is constructed.
[0046] For the zero-rotation frequency, a nonlinear least squares fitting algorithm is used to optimize the fitting accuracy of the fundamental frequency and its odd harmonic frequencies.
[0047] Define a set of pole counts and a set of iteration counts. For the admittance vector data at each rotation frequency, iterate through all combinations of pole counts and iteration counts, calculate the goodness of fit for each combination, and output the transfer function at the current rotation frequency when the goodness of fit is optimal.
[0048] By integrating the transfer functions obtained at all rotation frequencies, a complete harmonic coupling model is formed.
[0049] A second aspect of the present invention provides a harmonic modeling system based on rotational coordinate transformation and vector fitting.
[0050] A harmonic modeling system based on rotating coordinate transformation and vector fitting includes:
[0051] The data acquisition module is configured to: acquire raw three-phase voltage data and raw three-phase current data of the target nodes of the distribution network, and preprocess them to obtain standardized voltage and current data;
[0052] The rotation coordinate transformation module is configured to perform rotation coordinate transformation on the standardized voltage data according to each rotation frequency in the preset set of rotation frequencies, so as to obtain the transformed voltage data.
[0053] The frequency domain transformation module is configured to perform fast Fourier transform on the transformed voltage data and standardized current data respectively to obtain voltage frequency domain data and current frequency domain data.
[0054] The admittance calculation module is configured to: calculate the frequency domain admittance matrix based on voltage frequency domain data and current frequency domain data, extract the main diagonal elements of the admittance matrix, and obtain the frequency domain admittance data at the current rotation frequency;
[0055] The harmonic coupling admittance model construction module is configured to: use a vector fitting method to fit the frequency domain admittance data to obtain the transfer function corresponding to the current target rotation frequency; integrate the transfer functions corresponding to all target rotation frequencies in the set of rotation frequencies to construct a complete harmonic coupling admittance model.
[0056] A third aspect of the present invention provides a computer-readable storage medium having a program stored thereon that, when executed by a processor, implements the steps of a harmonic modeling method based on rotating coordinate transformation and vector fitting as described in the first aspect of the present invention.
[0057] A fourth aspect of the present invention provides an electronic device, including a memory, a processor, and a program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps in a harmonic modeling method based on rotational coordinate transformation and vector fitting as described in the first aspect of the present invention.
[0058] The above one or more technical solutions have the following beneficial effects:
[0059] (1) The modeling process of this invention relies solely on the measured three-phase voltage and current data of the target nodes in the distribution network. It does not require explicit knowledge of the internal circuit topology and control parameters of the equipment, effectively solving the problems of difficult parameter acquisition and complex topology analysis caused by the massive heterogeneous equipment access in modern distribution networks. It can be widely applied to various harmonic modeling scenarios of distribution networks containing power electronic equipment. By setting a set of rotating frequencies covering the main harmonic frequencies of the distribution network, and combining Hilbert transform and dq transform to achieve effective separation of multiple frequency components, the admittance characteristics at different rotating frequencies can be accurately extracted. The constructed harmonic coupling model can completely describe the interaction and nonlinear coupling relationship between different harmonic frequencies in a wide frequency range, making up for the shortcomings of traditional model harmonic analysis with single frequency and neglect of coupling effect, and greatly improving the modeling accuracy.
[0060] (2) The modeling process of this invention is based on methods such as fast Fourier transform, rotating coordinate transformation and matrix operation. It can adjust the model parameters according to the real-time update of measured data, adapt to the dynamic operation characteristics of the power grid brought about by the access of new energy and flexible loads, and provide efficient and practical model support for scenarios such as online harmonic assessment and real-time active filter design of distribution networks. In the vector fitting process, a weighted strategy is used to reduce the relative error of admittance data with small amplitude. The optimal fitting parameters are selected by combining the number of poles and the number of iterations. At the same time, nonlinear least squares fitting is used separately for zero rotation frequency to optimize the fitting accuracy of fundamental and odd harmonics. Conjugate pairing of fitting parameters is used to ensure the rationality of physical meaning. It has a high degree of consistency with measured data and significant operational reliability and robustness.
[0061] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0062] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0063] Figure 1 This is a flowchart of the method in the first embodiment.
[0064] Figure 2 This is a schematic diagram of frequency domain admittance matrix extraction in the first embodiment.
[0065] Figure 3 This is a flowchart illustrating the construction of a harmonic coupling model through vector fitting in the first embodiment.
[0066] Figure 4This is a comparison chart of frequency domain admittance data and fitting curves at different rotation frequencies in the first embodiment.
[0067] Figure 5 This is a system structure diagram of the second embodiment. Detailed Implementation
[0068] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0069] It should be noted that the terminology used herein is for the purpose of describing particular implementations only and is not intended to limit the exemplary implementations of the present invention.
[0070] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.
[0071] Example 1
[0072] This embodiment discloses a harmonic modeling method based on rotating coordinate transformation and vector fitting. Based on the measured voltage and current data of the distribution network, it combines rotating coordinate transformation and weighted vector fitting algorithm to construct a harmonic model that can accurately capture the coupling characteristics of cross-frequency harmonics. It solves the problems of unclear circuit topology, difficulty in obtaining parameters, and inability to reflect harmonic coupling relationship in mechanism modeling. It also has high computational efficiency and is suitable for online real-time analysis.
[0073] like Figure 1 As shown, a harmonic modeling method based on rotating coordinate transformation and vector fitting includes:
[0074] Step S1: Collect raw three-phase voltage and three-phase current data of the target node of the distribution network, and preprocess them to obtain standardized voltage and current data.
[0075] A high-precision data acquisition device with a sampling frequency of no less than 12800Hz and a sampling bit depth of no less than 16 bits is used to simultaneously acquire the raw time-series data of three-phase voltage and three-phase current of the target nodes in the distribution network. The acquisition process covers various operating conditions of the power grid to ensure the comprehensiveness of the data.
[0076] Zero-crossing detection is performed on the raw single-phase voltage data. The first zero-crossing point where the voltage changes from negative to positive is identified as the starting reference point. The number of sampling points per cycle is calculated based on the fundamental frequency. ,in, Sampling frequency, Using the fundamental frequency, k complete cycles of data are extracted to align voltage and current data.
[0077] A local median absolute deviation algorithm based on a sliding window is used to correct outliers in the aligned voltage and current data. The local sliding window size is set to n data points, and the median of the data within each window is calculated. and absolute median difference When the logarithmic magnitude of the data points satisfy If the value is not found in the specified range, it is considered an outlier and replaced with the median value within the window to obtain a standardized voltage. and current Data. Through standardized preprocessing procedures, the synchronization, validity, and accuracy of the data are effectively guaranteed, eliminating the interference of data anomalies and temporal misalignments on subsequent modeling.
[0078] Step S2: Perform a rotational coordinate transformation on the standardized voltage data according to each rotational frequency in the preset set of rotational frequencies to obtain the transformed voltage data.
[0079] For a selected set of target rotation frequencies ,in , Indicates the fundamental frequency. , For the maximum harmonic order, for each rotational frequency Perform the following operations:
[0080] structure Voltage analytical signal in a two-phase rotating coordinate system Axial components That is, the original voltage ,right Perform Hilbert transform to obtain orthogonal components. The formula is as follows:
[0081]
[0082] in, It is the integral variable.
[0083] Calculate the target's rotational angular velocity and perform a dq transform to obtain:
[0084]
[0085]
[0086] In the formula, The target rotational angular velocity; For the q-axis component; This represents the d-axis component, i.e., the required transformed voltage data.
[0087] Step S3: Perform Fast Fourier Transform on the transformed voltage data and standardized current data respectively to obtain voltage frequency domain data and current frequency domain data.
[0088] The transformed voltage data and standardized current data in continuous form are discretized separately, resulting in a discrete voltage sequence. Discrete current sequence , , The number of sampling points. The sampling time interval;
[0089] right and Perform separately Point Fast Fourier Transform:
[0090]
[0091]
[0092] in, , These are the voltage and current data after Fourier transform, respectively.
[0093] Since the two-sided spectrum obtained by Fourier transform has conjugate symmetry and contains positive and negative frequency components, and the negative frequency components have no independent physical meaning, in order to facilitate physical interpretation and reduce the amount of data, the one-sided spectrum is extracted for calculation.
[0094] when When the number is even, the extracted frequency points are:
[0095]
[0096] when When the number is odd, the extracted frequency points are:
[0097]
[0098] The corresponding voltage and current one-sided spectra are:
[0099]
[0100]
[0101] in, The voltage spectrum is a single-sided spectrum. This represents the single-sided spectrum of the current.
[0102] Construct frequency set , For the number of frequency points, only retain The voltage spectrum is obtained from the frequency domain data within the range. and current spectrum .
[0103] Step S4: Calculate the frequency domain admittance matrix based on the voltage frequency domain data and the current frequency domain data, extract the main diagonal elements of the admittance matrix, and obtain the frequency domain admittance data at the current rotation frequency.
[0104] Build Admittance matrix, matrix elements Defined as , , specifically:
[0105]
[0106] Extracting the main diagonal elements from the admittance matrix yields the rotation frequency. Frequency domain admittance vector:
[0107]
[0108] in, Rotation frequency Frequency domain admittance vector; The diagonalization operator indicates the acquisition of the admittance matrix. The main diagonal element; T is the transpose.
[0109] like Figure 2 The figure shows the cases where the extracted frequencies of Fourier decomposition are all integer multiples of the fundamental frequency, and the rotation frequencies are 0Hz, ±50Hz, ±100Hz, ±150Hz, and ±200Hz, respectively. For each rotation frequency... By sequentially executing steps S3 and S4, a complete admittance matrix containing both co-frequency and coupled admittances can be constructed in a physical sense.
[0110] Step S5: The frequency domain admittance data is fitted using a vector fitting method to obtain the transfer function corresponding to the current target rotation frequency; the transfer functions corresponding to all target rotation frequencies in the set of rotation frequencies are integrated to construct a complete harmonic coupling admittance model.
[0111] like Figure 3 The diagram illustrates the flowchart for constructing a harmonic coupling model through vector fitting. To uncover the patterns and characteristics of admittance data as a function of frequency, a frequency domain fitting algorithm is used to approximate multiple sets of discrete admittance data points as multiple continuous curves. Specifically, for each non-zero rotational frequency... Admittance vector under It can be fitted into a rational function form using vector fitting:
[0112]
[0113] in, , , , Separate the residues and poles of the real part. For constant terms, This is a linear term. The parameter set is solved using the least squares method. This minimizes the fitting error.
[0114] For the zero-rotation frequency, a nonlinear least squares fitting algorithm is employed to optimize the fitting accuracy of the fundamental frequency and its odd harmonic frequencies. When the rotation frequency is 0Hz, it is equivalent to no coordinate transformation, and the model represents the admittance characteristics of the distribution network under steady-state power frequency. Among these, the fundamental frequency is the carrier of power grid energy transmission, and the odd harmonics are the most abundant and harmful harmonic components in power grid operation. Conventional vector fitting algorithms use the global least squares criterion, which tends to minimize the overall error across the entire frequency band, making it difficult to improve the data fitting accuracy at the fundamental and odd harmonic frequencies. Therefore, a nonlinear least squares algorithm is used, and weights are applied to the key frequency data to ensure that the model has high reliability at the frequencies where accurate analysis is most needed.
[0115] Since some admittance data have small amplitudes, direct fitting can easily produce large relative errors. Therefore, for admittance data with amplitudes less than a set threshold, a weighted fitting strategy is adopted to reduce relative errors, and weight coefficients are defined as follows:
[0116]
[0117] In the formula, These are the weighting coefficients; is the complex value of the admittance in the admittance vector.
[0118] In the process of solving for the transfer function parameters, in order to set clear optimization criteria and error measurement standards, the objective function is constructed using the original frequency domain admittance data and the complex numerical error of the frequency domain response of the transfer function as the standard:
[0119]
[0120] In the formula, For transfer function At frequency The frequency response.
[0121] Given a set of pole counts and a set of iteration counts, for the admittance vector data at each rotation frequency, iterate through all combinations of pole counts and iteration counts, calculate the goodness of fit for each combination, and define the goodness of fit as:
[0122]
[0123] in, For goodness of fit; A vector representing the original frequency domain admittance data. This represents the vector corresponding to the frequency domain response obtained by vector fitting. Indicates by A vector of the same dimension formed by the mean of all elements in the vector.
[0124] Further determine whether the goodness of fit is optimal. If it is, output the transfer function under the current combination of the number of poles and the number of iterations. If not, select other combinations and recalculate until the goodness of fit reaches the optimal value.
[0125] By integrating the parameter sets obtained at all rotation frequencies, a complete harmonic coupling model is constructed. :
[0126]
[0127] The fitting effect of each transfer function is verified, with goodness of fit used as the evaluation criterion; the closer the goodness of fit is to 100%, the better the fitting effect. For example... Figure 4 As shown in Figures (a)-(e), Figure (a) shows the transfer function fitting curve at a rotating frequency of -250Hz, with a goodness of fit of 99.90%; Figure (b) shows the transfer function fitting curve at a rotating frequency of -100Hz, with a goodness of fit of 99.82%; Figure (c) shows the transfer function fitting curve at a rotating frequency of -200Hz, with a goodness of fit of 98.51%; Figure (d) shows the transfer function fitting curve at a rotating frequency of -350Hz, with a goodness of fit of 97.91%; and Figure (e) shows the transfer function fitting curve at a rotating frequency of -450Hz, with a goodness of fit of 97.25%. By selecting the above five rotating frequencies and comparing the fitted transfer function curves with the original frequency admittance data, the goodness of fit is not less than 95% in all cases. As can be seen from the figures, the proposed model has a high degree of agreement with the measured data, verifying the accuracy of the proposed model and its applicability in actual distribution network analysis.
[0128] Example 2
[0129] This embodiment discloses a harmonic modeling system based on rotating coordinate transformation and vector fitting;
[0130] like Figure 5 As shown, a harmonic modeling system based on rotational coordinate transformation and vector fitting includes:
[0131] The data acquisition module is configured to: acquire raw three-phase voltage data and raw three-phase current data of the target nodes of the distribution network, and preprocess them to obtain standardized voltage and current data;
[0132] The rotation coordinate transformation module is configured to perform rotation coordinate transformation on the standardized voltage data according to each rotation frequency in the preset set of rotation frequencies, so as to obtain the transformed voltage data.
[0133] The frequency domain transformation module is configured to perform fast Fourier transform on the transformed voltage data and standardized current data respectively to obtain voltage frequency domain data and current frequency domain data.
[0134] The admittance calculation module is configured to: calculate the frequency domain admittance matrix based on voltage frequency domain data and current frequency domain data, extract the main diagonal elements of the admittance matrix, and obtain the frequency domain admittance data at the current rotation frequency;
[0135] The harmonic coupling admittance model construction module is configured to: use a vector fitting method to fit the frequency domain admittance data to obtain the transfer function corresponding to the current target rotation frequency; integrate the transfer functions corresponding to all target rotation frequencies in the set of rotation frequencies to construct a complete harmonic coupling admittance model.
[0136] Example 3
[0137] The purpose of this embodiment is to provide a computer-readable storage medium.
[0138] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in a harmonic modeling method based on rotating coordinate transformation and vector fitting as described in Embodiment 1.
[0139] Example 4
[0140] The purpose of this embodiment is to provide an electronic device.
[0141] An electronic device includes a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in a harmonic modeling method based on rotating coordinate transformation and vector fitting as described in Embodiment 1.
[0142] The steps and methods involved in the apparatuses of Embodiments 2, 3, and 4 above correspond to those in Embodiment 1. For specific implementation details, please refer to the relevant description section of Embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood as including any medium capable of storing, encoding, or carrying an instruction set for execution by a processor and enabling the processor to perform any of the methods in this invention.
[0143] Those skilled in the art will understand that the modules or steps of the present invention described above can be implemented using general-purpose computer devices. Optionally, they can be implemented using computer-executable program code, thereby allowing them to be stored in a storage device for execution by a computer device, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. The present invention is not limited to any particular combination of hardware and software.
[0144] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.
Claims
1. A method of harmonic modeling based on rotation coordinate transformation and vector fitting, characterized in that, include: Collect raw three-phase voltage and three-phase current data of target nodes in the distribution network, and preprocess them to obtain standardized voltage and current data; Based on each rotation frequency in the preset set of rotation frequencies, a rotational coordinate transformation is performed on the standardized voltage data to obtain the transformed voltage data. The specific method is as follows: Construct an analytical voltage signal in a coordinate system, and perform a dq transform on the analytical signal to obtain the transformed voltage data. Specifically: structure The voltage analytical signal in a two-phase rotating coordinate system will The axial component, as the original voltage signal, undergoes a Hilbert transform to obtain the orthogonal component, as shown in the following formula: in, for Axial components; A standardized voltage signal; These are orthogonal components; This is the Hilbert transform; For integration variables; Calculate the target rotation angular velocity and perform a dq transform on the analytical signal to obtain: In the formula, The target rotational angular velocity; For the q-axis component; This refers to the d-axis component, which is the required transformed voltage data; , Indicates the fundamental frequency. , It is the maximum multiple of the fundamental frequency; Fast Fourier transform is performed on the transformed voltage data and the standardized current data respectively to obtain voltage frequency domain data and current frequency domain data; Calculate the frequency domain admittance matrix based on voltage and current frequency domain data, extract the main diagonal elements of the admittance matrix, and obtain the frequency domain admittance data at the current rotation frequency. The frequency domain admittance data is fitted using a vector fitting method to obtain the transfer function corresponding to the current target rotation frequency; the transfer functions corresponding to all target rotation frequencies in the set of rotation frequencies are integrated to construct a complete harmonic coupling admittance model, including: For the admittance vector at each rotation frequency, it is fitted into a rational function form using vector fitting. For admittance data with amplitudes less than a set threshold, a weighted fitting strategy is adopted, and weight coefficients are defined and an objective function is constructed. For the zero-rotation frequency, a nonlinear least squares fitting algorithm is used to optimize the fitting accuracy of the fundamental frequency and its odd harmonic frequencies. Define a set of pole counts and a set of iteration counts. For the admittance vector data at each rotation frequency, iterate through all combinations of pole counts and iteration counts, calculate the goodness of fit for each combination, and output the transfer function at the current rotation frequency when the goodness of fit is optimal. By integrating the transfer functions obtained at all rotation frequencies, a complete harmonic coupling model is formed.
2. The harmonic modeling method based on rotating coordinate transformation and vector fitting as described in claim 1, characterized in that, Preprocessing is performed on the raw three-phase voltage and three-phase current data, including data alignment and outlier removal; The data alignment includes: performing zero-crossing detection on voltage time-series data, taking the zero-crossing point where the voltage changes from negative to positive as the starting reference, and extracting data segments that are integer multiples of the fundamental period to achieve time-series alignment between voltage time-series data and current time-series data; The outlier removal includes: using a sliding window-based local median absolute deviation algorithm to calculate the median and absolute median difference of the data within the sliding window; when the magnitude of the sampled point within the window deviates from the median by more than the threshold determined by the absolute median difference, it is determined to be an outlier and replaced with the median.
3. The harmonic modeling method based on rotating coordinate transformation and vector fitting as described in claim 1, characterized in that, The set of rotation frequencies is: in, It is a set of rotation frequencies.
4. The harmonic modeling method based on rotating coordinate transformation and vector fitting as described in claim 1, characterized in that, Perform Fast Fourier Transform on the transformed voltage data and standardized current data respectively to obtain voltage frequency domain data and current frequency domain data, including: The transformed voltage data and standardized current data in continuous form are discretized to obtain discrete voltage sequences and discrete current sequences, respectively. Perform Fast Fourier Transform on the discrete voltage sequence and discrete current sequence respectively to obtain the two-sided voltage spectrum and the two-sided current spectrum; Extract the single-sided spectral components of the bilateral voltage spectrum and bilateral current spectrum, and discard the negative frequency components; The single-sided spectral component is truncated at the frequency, and only the frequency domain data within the preset effective frequency range is retained to obtain the voltage frequency domain data and the current frequency domain data.
5. The harmonic modeling method based on rotating coordinate transformation and vector fitting as described in claim 1, characterized in that, Calculate the frequency domain admittance matrix based on voltage and current frequency domain data, extract the main diagonal elements of the admittance matrix to obtain the frequency domain admittance data at the current rotation frequency, including: Build Admittance matrix, matrix elements Defined as , , specifically: in, The constructed admittance matrix; Extracting the main diagonal elements from the admittance matrix yields the rotation frequency. Frequency domain admittance vector: in, Rotation frequency Frequency domain admittance vector; The diagonalization operator indicates the acquisition of the admittance matrix. main diagonal element T stands for transpose.
6. A harmonic modeling system based on rotating coordinate transformation and vector fitting, characterized in that, include: The data acquisition module is configured to: acquire raw three-phase voltage data and raw three-phase current data of the target nodes of the distribution network, and preprocess them to obtain standardized voltage and current data; The rotation coordinate transformation module is configured to perform rotation coordinate transformation on the standardized voltage data according to each rotation frequency in a preset set of rotation frequencies, to obtain the transformed voltage data. The specific method is as follows: Construct an analytical voltage signal in a coordinate system, and perform a dq transform on the analytical signal to obtain the transformed voltage data. Specifically: structure The voltage analytical signal in a two-phase rotating coordinate system will The axial component, as the original voltage signal, undergoes a Hilbert transform to obtain the orthogonal component, as shown in the following formula: in, for Axial components; A standardized voltage signal; These are orthogonal components; This is the Hilbert transform; For integration variables; Calculate the target rotation angular velocity and perform a dq transform on the analytical signal to obtain: In the formula, The target rotational angular velocity; For the q-axis component; This refers to the d-axis component, which is the required transformed voltage data; , Indicates the fundamental frequency. , It is the maximum multiple of the fundamental frequency; The frequency domain transformation module is configured to perform fast Fourier transform on the transformed voltage data and standardized current data respectively to obtain voltage frequency domain data and current frequency domain data. The admittance calculation module is configured to: calculate the frequency domain admittance matrix based on voltage frequency domain data and current frequency domain data, extract the main diagonal elements of the admittance matrix, and obtain the frequency domain admittance data at the current rotation frequency; The harmonic coupling admittance model construction module is configured to: fit the frequency domain admittance data using a vector fitting method to obtain the transfer function corresponding to the current target rotation frequency; integrate the transfer functions corresponding to all target rotation frequencies in the set of rotation frequencies to construct a complete harmonic coupling admittance model, including: For the admittance vector at each rotation frequency, it is fitted into a rational function form using vector fitting. For admittance data with amplitudes less than a set threshold, a weighted fitting strategy is adopted, and weight coefficients are defined and an objective function is constructed. For the zero-rotation frequency, a nonlinear least squares fitting algorithm is used to optimize the fitting accuracy of the fundamental frequency and its odd harmonic frequencies. Define a set of pole counts and a set of iteration counts. For the admittance vector data at each rotation frequency, iterate through all combinations of pole counts and iteration counts, calculate the goodness of fit for each combination, and output the transfer function at the current rotation frequency when the goodness of fit is optimal. By integrating the transfer functions obtained at all rotation frequencies, a complete harmonic coupling model is formed.
7. A computer-readable storage medium having a program stored thereon, characterized in that, When executed by the processor, the program implements the steps in the harmonic modeling method based on rotating coordinate transformation and vector fitting as described in any one of claims 1-5.
8. An electronic device comprising a memory, a processor, and a program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the harmonic modeling method based on rotating coordinate transformation and vector fitting as described in any one of claims 1-5.