Improved ATSE power supply frequency calculation method

By using Gozel algorithm in ATSE power supply frequency calculation, the problems of low frequency calculation accuracy and large calculation delay in the existing technology are solved, and power supply frequency monitoring with higher accuracy and lower complexity are achieved, which is suitable for real-time monitoring needs.

CN119829993APending Publication Date: 2025-04-15SCHNEIDER WINGOAL TIANJIN ELECTRIC EQUIP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411720152.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-04-15

Smart Images

  • Figure CN119829993A_ABST
    Figure CN119829993A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of three-phase power supply frequency calculation methods, and discloses an improved ATSE power supply frequency calculation method, which comprises the following steps: S1, acquiring voltage AD data of a three-phase power supply through a controller; s2, setting an initial frequency, a period number and a sampling point number of each period; s3, calculating twiddle factors in the Goertzel algorithm; s4, performing convolution operation on the AD data of each period in sequence; s5, calculating the frequency domain information of two periods, and obtaining the frequency information of the current power supply based on the phase deviation; s6, dynamically adjusting the AD data sampling rate of the next period; and S7, the frequency information assists the automatic change-over switch to judge and control the state of the power supply. By adopting the power supply frequency calculation method based on the Goertzel algorithm, the actual frequency of the power supply can be accurately captured by abandoning interference of higher harmonics and only keeping fundamental wave information for calculation, and the method has better anti-interference capability in a complex power environment with higher harmonic content.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of three-phase power supply frequency calculation methods, and in particular to an improved ATSE power supply frequency calculation method. Background Art

[0002] In the power system, the dual power automatic transfer switch is a key power control device, which is widely used in the switching of the main and backup power supplies of the power supply system. The core function of ATSE is to detect the status of the main and backup power supplies, and automatically switch to the backup power supply when the main power supply fails or deviates from the normal range to ensure continuous power supply to the load. The power supply frequency is an important parameter that affects the judgment of the power supply status. Accurate and fast calculation of the power supply frequency is crucial for the stable operation of the dual power automatic transfer switch.

[0003] The zero-crossing detection method calculates the frequency of the power supply by detecting the zero-crossing time of the voltage waveform. Although this method is simple to implement and has a small amount of calculation, its frequency calculation accuracy is poor in application scenarios with high harmonic content and is easily affected by waveform distortion, resulting in inaccurate frequency calculation results, which in turn affects the reliability of power switching; Another commonly used frequency calculation method is the FFT algorithm, which obtains frequency information by performing a frequency domain transformation on the power supply signal. The advantage of the FFT algorithm is that it has strong spectrum analysis capabilities and can obtain signal characteristics within the entire frequency range. However, since the FFT algorithm requires a large amount of computing resources and must collect enough data to ensure the calculation accuracy, it has great limitations in real-time performance and large calculation delays. It is not suitable for scenarios that require real-time monitoring of frequency, especially for ATSE, which requires fast response. The high computational burden of the FFT algorithm becomes a significant disadvantage. Summary of the invention

[0004] In view of the shortcomings of the prior art, the present invention provides an improved ATSE power supply frequency calculation method to solve the problems that the traditional method has poor frequency calculation accuracy in application scenarios with high harmonic content, and the FFT algorithm requires a large amount of computing resources and must collect enough data to ensure the calculation accuracy.

[0005] To achieve the above objectives, the present invention is implemented by the following technical solutions: an improved ATSE power supply frequency calculation method, comprising the following steps:

[0006] S1, collect voltage AD data of three-phase power supply as sampling point through controller;

[0007] S2, set the initial frequency, number of cycles and number of sampling points in each cycle;

[0008] S3, calculate the rotation factor in Goertzel algorithm;

[0009] S4, performing convolution operation on the AD data of each cycle in turn to obtain frequency domain information at the target frequency point;

[0010] S5. Determine a phase deviation by calculating frequency domain information of two cycles, and obtain frequency information of the current power supply based on the phase deviation;

[0011] S6. Dynamically adjust the AD data sampling rate of the next cycle according to the current frequency information;

[0012] S7. The above frequency information assists the automatic transfer switch in judging and controlling the power supply status.

[0013] Preferably, in the step S1, a fixed sampling rate is used for sampling when the voltage AD data of the three-phase power supply is collected by the controller.

[0014] Preferably, in the step S2, the initial frequency of the frequency detection is set, and the frequency range to be monitored is determined according to the type of the power supply signal; the number of samples per cycle is defined, and the number of cycles is set for further calculating the change of the signal.

[0015] Preferably, in the step S3, the rotation factor in the Goertzel algorithm is calculated for filtering in subsequent convolution operations.

[0016] Preferably, after the step S3, the sampled AD data are sorted to ensure that the sampling points within a cycle remain consistent; the collected AD data are preprocessed and the data are arranged in chronological order.

[0017] Preferably, in step S4, the Goertzel algorithm is used to perform point-by-point convolution operation on the sampled AD data, and the amplitude information of the signal in the frequency domain is obtained by convolving the input signal with the impulse response of the filter; after the convolution operation, the frequency domain information of the power supply signal at the target frequency point is obtained, and the high-order harmonics are effectively filtered out, and only the fundamental wave information is retained.

[0018] Preferably, in step S5, the same processing is performed on the data after completing a convolution operation of one cycle to obtain frequency domain information of two periodic signals; the phase deviation of the two periodic signals is calculated, and the change of the power supply frequency is derived by comparing the phase difference.

[0019] Preferably, in step S6, the latest frequency information of the current cycle is calculated based on the phase deviation; and the sampling rate of the AD sampling circuit is adjusted using the calculated frequency information.

[0020] Preferably, in the step S7, the power frequency information and fundamental wave information collected in each cycle are sorted out, and the frequency data of the current cycle is output; the frequency data is provided as input to the control logic module of the dual power automatic transfer switch to assist in determining the current power status.

[0021] The present invention provides an improved ATSE power frequency calculation method, which has the following beneficial effects:

[0022] 1. The present invention adopts a power frequency calculation method based on the Goertzel algorithm, discards the interference of higher harmonics, and only retains the fundamental information for calculation, thereby improving the accuracy of frequency calculation. Compared with the traditional zero-crossing method and FFT method, it can more accurately capture the actual frequency of the power supply, especially in a complex power environment with high harmonic content, and has better anti-interference ability.

[0023] 2. The Goertzel algorithm of the present invention is a simplified discrete Fourier transform method for calculating a specific frequency point. This algorithm can directly obtain the information of the target frequency point without analyzing the entire spectrum. This not only reduces the computational complexity, but also reduces the requirements for the controller's storage space and processing power, and improves the real-time performance of the system.

[0024] 3. The present invention obtains the frequency information of the current power supply by calculating the phase deviation between two cycles, and dynamically adjusts the sampling rate of the AD sampling circuit based on this information. This can better adapt to the dynamic changes of the power supply frequency, so that the sampling process always meets the requirements of the Nyquist sampling theorem, thereby avoiding aliasing and improving the quality of the sampled data. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 A circuit connection diagram of an improved ATSE power supply frequency calculation method of the present invention;

[0026] Figure 2 A method flow chart of applying the Goertzel algorithm to an improved ATSE power supply frequency calculation method of the present invention;

[0027] Figure 3 The present invention is a flowchart of an improved ATSE power supply frequency calculation method. DETAILED DESCRIPTION

[0028] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0029] Please see attached Figure 1 and Figure 3 , an embodiment of the present invention provides an improved ATSE power supply frequency calculation method, comprising the following steps:

[0030] S1, collect voltage AD data of three-phase power supply as sampling point through controller;

[0031] S2, set the initial frequency, number of cycles and number of sampling points in each cycle;

[0032] S3, calculate the rotation factor in Goertzel algorithm;

[0033] S4, performing convolution operation on the AD data of each cycle in turn to obtain frequency domain information at the target frequency point;

[0034] S5. Determine a phase deviation by calculating frequency domain information of two cycles, and obtain frequency information of the current power supply based on the phase deviation;

[0035] S6. Dynamically adjust the AD data sampling rate of the next cycle according to the current frequency information;

[0036] S7. The above frequency information assists the automatic transfer switch in judging and controlling the power supply status.

[0037] Specifically, a power frequency calculation method based on the Goertzel algorithm is adopted, which discards the interference of higher harmonics and only retains the fundamental information for calculation, thereby improving the accuracy of frequency calculation. Compared with the traditional zero-crossing method and FFT method, the present invention can more accurately capture the actual frequency of the power supply, especially in a complex power environment with high harmonic content, and has better anti-interference ability.

[0038] In step S1, a fixed sampling rate is used to sample the voltage AD data of the three-phase power supply through the controller.

[0039] Specifically, this step mainly collects the voltage AD data of the three-phase power supply through the controller as the input of the frequency calculation. The controller converts the analog voltage signal into a digital signal through the ADC (analog-to-digital converter), and uses the data as a sampling point for subsequent processing. In actual implementation, the controller should ensure that the collected data is accurate and reliable, and the sampling rate setting should meet the requirements of subsequent frequency calculations, usually a fixed sampling rate. For example, the sampling rate is set to 10kHz to ensure that there are enough data points for frequency calculation. During the sampling process, in order to cope with possible electromagnetic interference, a signal conditioning circuit, such as an anti-aliasing filter, can be added to ensure that the collected signal is a valid three-phase power supply signal.

[0040] In step S2, the initial frequency of the frequency detection is set, and the frequency range to be monitored is determined according to the type of the power supply signal; the number of samples per cycle is defined, and the number of cycles is set for further calculating the change of the signal.

[0041] Specifically, when setting the initial frequency, it is usually done according to the standard frequency of the power system, such as 50 Hz or 60 Hz. The initial frequency is set to determine a reference value, thereby improving the accuracy of frequency monitoring.

[0042] The number of sampling points per cycle is determined by the sampling rate and the power supply frequency. For example, if the power supply frequency is 50 Hz, 160 sampling points are required per cycle to meet the frequency analysis requirements.

[0043] The setting of the number of cycles is used to improve the stability of the signal frequency measurement. In order to fully monitor the fluctuation of the power supply frequency, multiple cycles (such as 2 to 4 cycles) are usually set to ensure the reliability of the frequency calculation.

[0044] In step S3, the rotation factors in the Goertzel algorithm are calculated for filtering in subsequent convolution operations.

[0045] Specifically, the Goertzel algorithm is a simplified algorithm based on discrete Fourier transform. Its core is to use the periodicity of the rotation factor to filter the input signal at a specific frequency. The calculation of the rotation factor is crucial for subsequent convolution operations. It defines the characteristics of the filter and ensures that only frequency information at specific frequencies is analyzed.

[0046] After step S3, the sampled AD data are sorted to ensure that the sampling points in one cycle remain consistent; the collected AD data are preprocessed and the data are arranged in chronological order.

[0047] Specifically, the arrangement of sampling data:

[0048] In step S3, we have completed the calculation of the rotation factors in the Goertzel algorithm to ensure the validity of the convolution operation. On this basis, the AD data collected from the controller needs to be sorted to ensure that the number of sampling points remains consistent within a cycle. This step is very critical because the calculation of the power frequency depends on the accuracy and consistency of the sampling points.

[0049] In each cycle, ensuring the consistency of sampling points can avoid calculation errors caused by uneven sampling numbers. For example, if 160 sampling points are required per cycle, the number of AD data in each sampling cycle should be strictly equal to 160. Any missing or redundant sampling points will affect the result of frequency calculation.

[0050] Purpose of the preprocessing step:

[0051] After sampling is completed, the collected AD data needs to be preprocessed. The main purpose is to remove noise, correct the data, and arrange them in chronological order to prepare for subsequent frequency calculations.

[0052] Preprocessing involves filtering the sampled data to remove high frequency noise and electromagnetic interference from the signal. This can be achieved using a simple digital low pass filter to ensure that the signal used for calculation is relatively smooth and clean.

[0053] The data is arranged in chronological order:

[0054] The collected AD data needs to be arranged in chronological order to ensure that the input signal in the convolution operation is continuous and meets the timing requirements. Each sampling point represents the power supply voltage value at a specific time point, so arranging the data in chronological order is a prerequisite for ensuring the accuracy of frequency calculation.

[0055] This time-sequential arrangement operation is similar to the sampling cache process of the signal. The controller stores the data sampled in each cycle in the memory and sorts the data according to the time label to ensure that the convolution operation can correctly reflect the time characteristics of the signal.

[0056] Dealing with incomplete cycles:

[0057] If some special circumstances (such as sampling loss or anomalies caused by interference) cause the sampling period to be incomplete, the data needs to be compensated or corrected during the preprocessing process. Interpolation can be used to supplement the missing data points to minimize the impact on the calculation accuracy.

[0058] For example, linear interpolation or spline interpolation can be used to estimate the data value of the missing point based on the values ​​of the previous and next sampling points, thereby ensuring that the data in each cycle is complete and the sampling points are consistent.

[0059] Final data preparation:

[0060] After finishing and preprocessing, the AD data will be stored in a standardized format and arranged in chronological order. These data will be passed as input to the Goertzel algorithm for convolution operation. The sorted sampling data not only meets the requirements within one cycle in terms of quantity, but also eliminates noise and unnecessary interference in terms of quality, making the subsequent frequency calculation more accurate and efficient.

[0061] Preprocessing can also include normalizing the data to reduce the numerical range and make the calculation process more stable. In particular, for floating-point operations, normalization can reduce errors caused by loss of precision.

[0062] In step S4, the Goertzel algorithm is used to perform point-by-point convolution operation on the sampled AD data. The amplitude information of the signal in the frequency domain is obtained by convolving the input signal with the impulse response of the filter. After the convolution operation, the frequency domain information of the power supply signal at the target frequency point is obtained, and the high-order harmonics are effectively filtered out, retaining only the fundamental information.

[0063] Specifically, the sampled AD data is subjected to point-by-point convolution operation using the Goertzel algorithm, and the amplitude information of the signal in the frequency domain is obtained by convolving the input signal with the impulse response of the filter.

[0064] The core of the convolution operation is to obtain the amplitude at a specific frequency by filtering, thereby identifying the fundamental information of the signal and effectively filtering out high-order harmonics. The advantage of this step is that it can significantly reduce the complexity of the calculation while improving the accuracy and real-time performance of frequency measurement.

[0065] In step S5, the same processing is performed on the data after completing the convolution operation of one cycle to obtain the frequency domain information of two periodic signals; the phase deviation of the two periodic signals is calculated, and the change of the power supply frequency is deduced by comparing the phase difference.

[0066] Specifically, after completing the convolution operation of one cycle, the system will continue to perform the same convolution operation on the data of the next cycle to obtain the frequency domain information of two consecutive cycles.

[0067] Based on the frequency domain information of these two cycles, their phase deviations are compared. By calculating the phase difference, the changing trend of the power supply frequency can be deduced, and the actual frequency of the current power supply can be further determined. This calculation method based on phase difference can reflect subtle changes in frequency in real time.

[0068] In step S6, the latest frequency information of the current cycle is calculated based on the phase deviation; and the sampling rate of the AD sampling circuit is adjusted using the calculated frequency information.

[0069] Specifically, the latest frequency information of the current cycle can be obtained through the calculated phase deviation. In order to improve the accuracy of frequency measurement, the system will dynamically adjust the sampling rate of the AD sampling circuit to match the new frequency.

[0070] This dynamic adjustment enables the system to adapt to fluctuations in power supply frequency, ensuring that when the frequency changes, the sampling can still meet the requirements of the Nyquist sampling theorem, preventing the occurrence of aliasing and ensuring the accuracy of signal acquisition.

[0071] In step S7, the power frequency information and fundamental wave information collected in each cycle are sorted out, and the frequency data of the current cycle is output; the frequency data is provided as input to the control logic module of the dual power automatic transfer switch to assist in determining the current power status.

[0072] Specifically, after obtaining the frequency information of each cycle, the system sorts and outputs the frequency data, and transmits it together with the fundamental frequency information of the power supply to the control logic module of the dual power supply automatic transfer switch.

[0073] The control logic module determines the power supply status by analyzing the frequency information, and thus decides whether to perform automatic power conversion operation. For example, when the frequency of a power supply seriously deviates from the preset value, the system can automatically switch to the backup power supply to ensure the stable operation of the load.

[0074] By providing frequency information to the control logic in real time, the system can quickly respond to power anomalies, improving the response speed and reliability of the automatic transfer switch.

[0075] The Goertzel algorithm is an algorithm for calculating the discrete Fourier transform (DFT). The algorithm regards the discrete Fourier transform as a set of filters, performs convolution operations on the input signal and the impulse response in the filter, obtains the output of the filter, and obtains the frequency of a certain point in the frequency domain. The algorithm uses the periodicity of the rotation factor to convert the discrete Fourier transform into a linear filtering operation. The Goertzel algorithm only calculates the amplitude of individual known frequency points. The concept of "frequency point" is essentially the same as the frequency point in the Fourier transform, and the resolution and corresponding relationship of frequency recognition are also the same.

[0076] The detailed calculation process of the algorithm is as follows:

[0077] 1. Define Q kn is the value at time n, but Q is needed k(n-1) and Q k(n-2) It can be seen that this algorithm is continuously iteratively calculated.

[0078] 2. At n = 0, Q k(n-1) Q k(-1) and Q k(-2) The initial value of both is 0.

[0079] 3. Then use the second formula to calculate the value range of n, which is 0 to N.

[0080] 4. Get Q kn After that, add a step of sequence position exchange. Specifically: Q k(n-2) =Q k(n-1) , Q k(n-1) =Q kn , then we can proceed to the next step of calculation, which is the calculation at time n+1.

[0081] After the Goertzel algorithm, the three-phase power supply can be obtained at the target frequency F lastThe frequency domain information of the two cycles is then used to calculate the phase deviation. Based on phase deviation ΔF can be further obtained, from which the latest frequency information F=F can be calculated. last +ΔF.

[0082] The method flow chart is as follows Figure 2 The detailed description is as follows:

[0083] a) First, the AD data of the three-phase voltage of the power supply is collected through the sampling circuit of the controller, and the sampling rate is set according to the default sampling rate (for example, f sample =8KHz) for collection;

[0084] b) Next, set the initial frequency of the frequency detection (e.g., 50 Hz), the number of cycles k=1, and the number of samples per cycle N (e.g., 160, );

[0085] c) Calculate the common variables of Goertzel's algorithm, such as Twiddle Factor

[0086] d) Sample the 160 sampling points one by one and sort the AD data with a fixed sampling rate to ensure that the number of sampling points remains unchanged within one cycle;

[0087] e) Perform convolution operations on the sampled AD data in sequence

[0088] f) After calculating one cycle of data, i.e. N sampling points, the second step is performed At this time Y n Contains amplitude-frequency information of the power signal at the target frequency;

[0089] g) Based on Y n and Y (n-1) The phase difference between two periodic signals can be calculated Based on phase deviation ΔF can be further obtained, from which the latest frequency information F=F can be calculated. last +ΔF.

[0090] h) Adjust the sampling rate f of the AD data based on the calculated frequency information sample =F*160.

[0091] Finally, the data is sorted to obtain the power sampling frequency of the next cycle and the power fundamental frequency information of the current cycle to assist in control logic analysis.

[0092] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. An improved ATSE power frequency calculation method, characterized in that: The following steps are involved: S1, collect voltage AD data of three-phase power supply as sampling point through controller; S2, set the initial frequency, number of cycles and number of sampling points in each cycle; S3, calculate the rotation factor in Goertzel algorithm; S4, performing convolution operation on the AD data of each cycle in turn to obtain frequency domain information at the target frequency point; S5. Determine a phase deviation by calculating frequency domain information of two cycles, and obtain frequency information of the current power supply based on the phase deviation; S6. Dynamically adjust the AD data sampling rate of the next cycle according to the current frequency information; S7. The above frequency information assists the automatic transfer switch in judging and controlling the power supply status.

2. The improved ATSE power frequency calculation method according to claim 1, characterized in that: In the step S1, a fixed sampling rate is used to sample the voltage AD data of the three-phase power supply through the controller.

3. The improved ATSE power supply frequency calculation method according to claim 1, characterized in that: In the step S2, the initial frequency of the frequency detection is set, and the frequency range to be monitored is determined according to the type of the power supply signal; the number of samples per cycle is defined, and the number of cycles is set for further calculating the change of the signal.

4. The improved ATSE power frequency calculation method according to claim 1, characterized in that: In the step S3, the rotation factors in the Goertzel algorithm are calculated for filtering in subsequent convolution operations.

5. The improved ATSE power frequency calculation method according to claim 1, characterized in that: After the step S3, the sampled AD data is sorted to ensure that the sampling points in one cycle remain consistent; the collected AD data is preprocessed and the data is arranged in chronological order.

6. The improved ATSE power frequency calculation method according to claim 1, characterized in that: In the step S4, the Goertzel algorithm is used to perform point-by-point convolution operation on the sampled AD data, and the amplitude information of the signal in the frequency domain is obtained by convolving the input signal with the impulse response of the filter; after the convolution operation, the frequency domain information of the power supply signal at the target frequency point is obtained, and the high-order harmonics are effectively filtered out, and only the fundamental wave information is retained.

7. The improved ATSE power frequency calculation method according to claim 1, characterized in that: In step S5, the same processing is performed on the data after completing the convolution operation of one cycle to obtain the frequency domain information of two periodic signals; the phase deviation of the two periodic signals is calculated, and the change of the power supply frequency is deduced by comparing the phase difference.

8. The improved ATSE power frequency calculation method according to claim 1, characterized in that: In the step S6, the latest frequency information of the current cycle is calculated based on the phase deviation; and the sampling rate of the AD sampling circuit is adjusted using the calculated frequency information.

9. The improved ATSE power frequency calculation method according to claim 1, characterized in that: In the step S7, the power frequency information and fundamental wave information collected in each cycle are sorted out, and the frequency data of the current cycle is output; the frequency data is provided as input to the control logic module of the dual power automatic transfer switch to assist in determining the current power status.