High-precision dynamic measurement method and measurement system for power grid frequency
Through signal preprocessing, frequency calculation and update mechanisms, the noise interference and frequency dynamic changes in grid frequency measurement are solved, and high-precision and real-time grid frequency measurement are achieved.
Patent Information
- Application Number
- CN202510285943.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-12
- Publication Date
- 2025-07-04
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, the power grid frequency measurement accuracy is insufficient, the noise interference is severe, and it cannot adapt to the dynamic frequency changes and cannot meet the real-time requirements.
The signal preprocessing is performed using a finite element window filter, noise and interference are removed through point-by-point filtering, frequency values are calculated using zero crossing point detection and linear interpolation, and the sampling rate is dynamically adjusted through the frequency value validity judgment and update mechanism.
It realizes high-precision grid frequency measurement, can effectively suppress noise interference, adapt to dynamic frequency changes, meet real-time requirements, and improve the accuracy and reliability of measurement.
Smart Images

Figure CN120254384A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power grid frequency measurement, and particularly to a high-precision dynamic measurement method and measurement system for power grid frequency. Background Art
[0002] In many fields of current technological development, accurately measuring the signal frequency is a fundamental and crucial task. For example, in the power system, the accurate measurement of the power grid frequency is essential for ensuring the stability and reliability of power supply. A slight fluctuation in frequency may affect the normal operation of various electrical equipment and even cause safety accidents; in the communication field, the accurate measurement of the signal frequency is a prerequisite for achieving efficient and stable communication. For systems such as wireless communication and radar detection, the accuracy of frequency measurement directly affects the signal transmission quality and the accuracy of target detection.
[0003] However, in practical applications, the measured signal is often affected by various noises and interferences, which poses a great challenge to accurately measuring the frequency. Traditional frequency measurement algorithms have difficulty meeting the growing demands when dealing with signals in complex noise environments. For example, some simple zero-crossing detection algorithms are easily interfered by noise, resulting in misjudgment of zero-crossing points and thus large errors in frequency calculation; some algorithms have poor adaptability to frequency changes and cannot quickly and accurately update the measurement results when the signal frequency changes dynamically.
[0004] In addition, in order to further improve the measurement accuracy, existing algorithms may increase the computational complexity, resulting in a slower processing speed and unable to meet the real-time requirements. Therefore, there is an urgent need for a frequency measurement method that can effectively suppress noise interference, adapt to dynamic frequency changes, and have high precision and real-time performance. Summary of the Invention
[0005] The purpose of the present invention is to provide a high-precision dynamic measurement method and measurement system for power grid frequency to solve the problems of insufficient frequency measurement accuracy and poor adaptability to noise and dynamic frequency changes in the prior art.
[0006] To achieve the above-mentioned invention purpose, the technical solutions adopted by the present invention are as follows:
[0007] According to one aspect of the present invention, a high-precision dynamic measurement method for power grid frequency is provided, including the following steps:
[0008] S1. Signal preprocessing: Use a finite element window filter to filter the input signal point by point to remove the noise and interference in the signal;
[0009] S2. Frequency calculation: Analyze the filtered signal point by point. Calculate the zero-crossing time by comparing the moments and amplitudes of adjacent sample points. Calculate the time interval between two adjacent zero-crossing times based on the two adjacent zero-crossing times, and then calculate the frequency value of the signal according to the time interval and the sampling rate;
[0010] S3. Validity judgment of frequency value: Compare the frequency value of the signal calculated in step S2 with the set dead zone threshold. If the frequency value is greater than the dead zone threshold, it is determined that the frequency value is valid and the frequency value is recorded; otherwise, it is determined that the frequency value is invalid;
[0011] S4. Update frequency: Repeat steps S1 to S3, compare the current frequency value with the previously recorded frequency value, calculate the frequency fluctuation difference, and determine whether the frequency fluctuation difference exceeds the set dead zone range. If the frequency fluctuation difference is within the dead zone range, it is determined that the current frequency is stable and the previously recorded frequency remains unchanged; if the frequency fluctuation difference exceeds the dead zone range, it is determined that the current frequency is unstable and the frequency is updated.
[0012] Preferably, in step S1, the method for filtering the input signal includes the following steps:
[0013] Receive the digital signal from the ADC acquisition system;
[0014] Use the FIR band-pass Hamming window to calculate each of the 256 points within two cycles of the digital signal to obtain the filtered output value.
[0015] Preferably, the point-by-point calculation of the signal is implemented by the following formula:
[0016]
[0017] where w(n) is the value of the Hamming window function, representing the weighting coefficient of the signal at position n; n is the discrete time index, with a value range of 0 ≤ n ≤ N - 1; N is the length of the window.
[0018] Preferably, the zero-crossing time is calculated by the linear interpolation formula, and the linear interpolation formula is:
[0019]
[0020] Preferably, if the frequency fluctuations detected continuously for multiple times exceed the dead zone range, the frequency fluctuations are valid frequency changes, and the frequency record of the system is updated.
[0021] Preferably, a high-precision dynamic measurement system for power grid frequency includes a filtering module, a calculation module, and a frequency update module. The filtering module is used to implement a band-pass filter to reduce the noise in the signal. The calculation module is used to calculate the frequency based on the filtered signal. The frequency update module is used to update the measured frequency value.
[0022] Preferably, it further includes a frequency sampling counter, which is used to record the continuity of frequency changes.
[0023] In summary, due to the adoption of the above technical solutions, the beneficial effects of the present invention are as follows:
[0024] Through the collaborative work of multiple steps such as signal preprocessing, frequency calculation, effective value judgment of frequency, and frequency update, the present invention effectively solves the problems of insufficient frequency measurement accuracy, poor adaptability to noise and frequency dynamic changes in the prior art, and has significant advantages in improving measurement accuracy, adapting to frequency dynamic changes, suppressing noise interference, and meeting real-time requirements, and has a wide application prospect in many devices such as power, distribution network, and protection. Description of the Drawings
[0025] Figure 1 is the flow schematic diagram of the present invention;
[0026] Figure 2 is the flow schematic diagram of frequency calculation of the present invention. Detailed Embodiments
[0027] To make the objectives, technical solutions, and advantages of the present invention clearer, the following preferred embodiments are given with reference to the accompanying drawings for further detailed description of the present invention. However, it should be noted that many details listed in the specification are only for the reader to have a thorough understanding of one or more aspects of the invention, and these aspects of the present invention can be realized even without these specific details.
[0028] Please refer to Figure 1-2 , the present invention provides a high-precision dynamic measurement method and measurement system for power grid frequency, and the technical solutions are as follows:
[0029] A high-precision dynamic measurement method for power grid frequency includes the following steps:
[0030] S1. Signal preprocessing: Use a finite element window filter to perform point-by-point filtering on the input signal to remove the noise and interference in the signal.
[0031] Specifically, the initialization operation: Before the filtering module starts working, it needs to be initialized. The initialization settings are as follows: First, initialize the input and output buffer pointers. Point the input buffer pointer to the storage location of the original signal of the ADC acquisition system, and point the output buffer pointer to the location for storing the filtered signal. Then, initialize the structure of the FIR filter. Configure the filter coefficients, status parameters, and the number of samples processed each time in the FIR filter structure. Among them, the filter coefficients are pre-calculated according to the characteristics of the FIR band-pass Hamming window. The filter coefficients determine the filtering effect of the filter on signals of different frequencies; the status parameters are used to record the operating status of the filter; the number of samples processed each time is set according to the hardware resources and signal processing requirements.
[0032] Point-by-point filtering process: After the initialization is completed, the filtering module starts to process the input signal point by point. Implement FIR filtering by calling. During the processing, for each sample point of the input signal, the FIR band-pass Hamming window calculates 256 points point by point within two consecutive cycles of the signal. The calculation method is implemented through the following formula:
[0033]
[0034] Among them, w(n) is the value of the Hamming window function, representing the weighting coefficient of the signal at position n; n is the discrete-time index, with a value range of 0 ≤ n ≤ N - 1; N is the length of the window (total number of sampling points).
[0035] Perform weighted summation on the current sample point and several previous sample points according to the filter coefficients to obtain the filtered output value. After point-by-point processing, the output signal is a pure signal that has removed noise and interference components and retains the target frequency range, providing high-quality data input for the subsequent calculation module. This module realizes the function of the band-pass filter by calling a specific function. It initializes the input and output buffer pointers and related structures, and then processes the data point by point to implement FIR filtering, thereby preprocessing the input signal and providing a good data basis for accurate frequency measurement in the future.
[0036] S2. Frequency calculation: Analyze the filtered signal point by point, calculate the zero-crossing time by comparing the moments and amplitudes of adjacent sample points, calculate the time interval between two adjacent zero-crossing times according to the two adjacent zero-crossing times, and then calculate the frequency value of the signal according to the time interval and the sampling rate.
[0037] Zero-crossing detection: Analyze the filtered signal point by point to detect the zero-crossing points of the signal. The zero-crossing point is the point where the signal changes from positive to negative or from negative to positive. During the detection process, determine whether a zero-crossing phenomenon occurs by comparing the amplitudes of adjacent sample points. To improve the measurement accuracy, record the positions of three consecutive zero-crossing points and the signal amplitudes at the corresponding moments.
[0038] Calculation of the exact zero-crossing moment: To obtain a more accurate frequency value, the linear interpolation method is used to calculate the exact zero-crossing moment. Assume two adjacent sample points x1 and x2, with corresponding amplitudes y1 and y2 respectively, and y1 and y2 have different signs, indicating that there is a zero-crossing between x1 and x2. Through the linear interpolation formula
[0039]
[0040] the exact position x of the zero-crossing is calculated.
[0041] The specific calculation method is as follows: As Figure 2 shown, first, it is judged whether to perform the filtering operation according to specific conditions. If the conditions are met, the filtering module is called. Then, the filtered data is analyzed point by point to detect the zero-crossing situation of the signal, that is, the point where the signal changes from positive to negative or from negative to positive. To improve the measurement accuracy, by recording the positions of three consecutive zero-crossings and the corresponding measured values, the linear interpolation method is used to calculate the exact zero-crossing moment. The linear interpolation formula is:
[0042]
[0043] the exact position x of the zero-crossing can be calculated. Then, according to the time interval between adjacent zero-crossings and the preset sampling rate, the specific frequency value is calculated by the following formula:
[0044] The time interval from sampling point y1 to sampling point y3 is calculated as: T2 = N2 - N1
[0045] The time from sampling point y1 to the zero-crossing is:
[0046] The time from sampling point y3 to the zero-crossing is:
[0047] The frequency based on the first two zero-crossings is calculated:
[0048] The time interval from sampling point y3 to sampling point y5 is calculated: T4 = N3 - N2
[0049] The time from sampling point y5 to the zero-crossing is:
[0050] The frequency based on the last two zero-crossings is calculated:
[0051] Finally, the average value of F1 and F2 is taken as the final frequency F:
[0052]
[0053] Among them, N1, N2, and N3 are the position indices of the sampling points; y1, y2, y3, and y4 are the measured values of the zero points; T1, T2, and T3 are the intermediate values calculated based on the above-mentioned measured values; cal_hz is the current frequency value.
[0054] According to the exact moments of the calculated zero-crossing points, calculate the time interval between two adjacent zero-crossing points. Since the sampling rate is known, the period of the signal can be calculated through the relationship between the time interval and the sampling rate, and then the frequency value of the signal can be obtained. For example, if the sampling rate is f s If the number of sampling points between two adjacent zero-crossing points is n, then the period The frequency is
[0055] S3. Judgment of the validity of the frequency value: Compare the frequency value of the signal calculated in step S2 with the set dead zone threshold. If the frequency value is greater than the dead zone threshold, it is determined that the frequency value is valid and record the frequency value; otherwise, it is determined that the frequency value is invalid.
[0056] After calculating the frequency value, to ensure the rationality of the frequency value, compare it with the preset reasonable range (such as 44 Hz to 56 Hz). If the frequency value is within the reasonable range, it is output as the effective frequency; if it exceeds this range, it is considered that the measurement is invalid and the frequency value is set to 0.
[0057] Specifically, receive the frequency value calculated in step S2, and judge whether the frequency value is greater than the set dead zone threshold (for example, the dead zone threshold can be set to 1 Hz in this embodiment). If the frequency value is greater than the dead zone threshold, it is considered that the frequency value is valid and temporarily store the frequency value.
[0058] S4. Update the frequency: Repeat steps S1 to S3, compare the current frequency value with the previously recorded frequency value, calculate the frequency fluctuation difference, and judge whether the frequency fluctuation difference exceeds the set dead zone range. If the frequency fluctuation difference is within the dead zone range, it is determined that the current frequency is stable and keep the previously recorded frequency unchanged; if the frequency fluctuation difference exceeds the dead zone range, it is determined that the current frequency is unstable and perform frequency update.
[0059] First, judge whether the calculated frequency value exceeds the reasonable range. If it is within the reasonable range, assign the frequency value to the corresponding variable, otherwise set it to the default value. In this embodiment, the default value is 50 Hz.
[0060] Next, according to the set frequency dead zone range, determine whether the current frequency is stable. Specifically, compare the current frequency value with the previously recorded frequency value, and calculate the frequency fluctuation difference. Determine whether the frequency fluctuation difference exceeds the set dead zone range. If the frequency fluctuation exceeds the dead zone range, it means that the frequency has changed, then a counting operation is performed. When the count reaches a certain number of times, the sampling frequency is changed, and the relevant parameters are adjusted accordingly. If it is determined that the frequency is unstable (i.e., the frequency fluctuation exceeds the dead zone range), then the frequency is updated. The update method is as follows: If the frequency fluctuations detected continuously for multiple times (such as twice) exceed the dead zone range, it is considered an effective frequency change. At this time, update the frequency record of the system and perform relevant operations, such as adjusting the sampling frequency. After updating the frequency, reset the sampling counter for the next frequency detection. For testing or recording purposes, the updated frequency value can be stored in the corresponding array or record. If the frequency fluctuation difference is within the dead zone range, it is considered that the current frequency is stable, the previous frequency record is kept unchanged, and the count is cleared to 0. Through the above method, the system can continuously and accurately obtain the signal frequency information, improve the reliability and real-time performance of frequency measurement. At the same time, the function of dynamically adjusting the sampling rate enables the system to adapt to the signal measurement requirements of different frequency ranges.
[0061] The present invention also discloses a high-precision dynamic measurement system for grid frequency, which includes a filtering module, a calculation module, and a frequency update module. The filtering module is used to implement a band-pass filter to reduce the noise in the signal. The calculation module is used to calculate the frequency according to the filtered signal. The frequency update module is used to update the measured frequency value.
[0062] The operation process of the present invention:
[0063] During the operation of the entire high-precision frequency measurement system, first, the analog signal collected by the hardware ADC acquisition system is converted into a digital signal. The filtering module filters the collected digital signal, removes the noise interference, and then outputs it to the calculation module. The calculation module performs zero-crossing detection and frequency calculation on the filtered signal, and judges the validity of the frequency. The frequency update module updates the frequency information according to the result of the calculation module, judges the frequency stability, and adjusts the sampling rate if necessary. Then, the system continuously repeats the above process, that is, continuously collects signals, filters, calculates frequencies, and updates frequency information until a stable frequency measurement result is obtained, so as to realize the high-precision real-time measurement of the signal frequency. Through the above method, the present invention can effectively realize the high-precision frequency measurement function and show good application effects in many fields such as electric power and communication.
[0064] The present invention initializes the filtering module, including setting the buffer pointer and FIR filter parameters. After initialization, the filtering module processes the input signal point by point, applies the FIR filtering algorithm to remove noise, and retains the signal in the required frequency range. The calculation module then detects the zero-crossing points of the signal, calculates the exact moments, and uses linear interpolation to determine the positions of the zero-crossing points. The calculated frequency values are compared with the preset range to judge their validity. The frequency update module makes judgments and updates according to the stability of the frequency values, and adjusts the sampling rate if necessary.
[0065] The working process of the entire system includes signal filtering, zero-crossing detection, frequency calculation, and frequency update. The system runs continuously until stable frequency measurement results are obtained, achieving high-precision real-time measurement of the signal frequency.
[0066] The present invention solves the problem of traditional frequency measurement accuracy and improves the reliability of frequency measurement.
[0067] The above are only the preferred embodiments of the present invention. It should be pointed out that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.
Claims
1. A high-precision dynamic measurement method for power grid frequency, characterized in that, It includes the following steps: S1. Signal preprocessing: Use a finite element window filter to filter the input signal point by point to remove noise and interference in the signal; S2. Frequency calculation: Analyze the filtered signal point by point, calculate the zero-crossing time by comparing the moments and amplitudes of adjacent sample points, calculate the time interval between two adjacent zero-crossing points according to the two adjacent zero-crossing times, and then calculate the frequency value of the signal according to the time interval and the sampling rate; S3. Validity judgment of frequency value: Compare the frequency value of the signal calculated in step S2 with the set dead zone threshold. If the frequency value is greater than the dead zone threshold, it is determined that the frequency value is valid and the frequency value is recorded; Otherwise, it is determined that the frequency value is invalid; S4. Update frequency: Repeat steps S1 to S3, compare the current frequency value with the previously recorded frequency value, calculate the frequency fluctuation difference, and judge whether the frequency fluctuation difference exceeds the set dead zone range. If the frequency fluctuation difference is within the dead zone range, it is determined that the current frequency is stable and the previously recorded frequency remains unchanged; If the frequency fluctuation difference exceeds the dead zone range, it is determined that the current frequency is unstable and the frequency is updated.
2. The high-precision dynamic measurement method for grid frequency according to claim 1, characterized in that: In step S1, the method for filtering the input signal includes the following steps: Receive the digital signal of the ADC acquisition system; Use a FIR band-pass Hamming window to calculate 256 points within two cycles of the digital signal point by point to obtain the filtered output value.
3. A high-precision dynamic measurement method for grid frequency according to claim 2, characterized in that: The point-by-point calculation of the signal is realized by the following formula: , Among them, is the value of the Hamming window function, representing the weighting coefficient of the signal at position n; n is the discrete-time index, and the value range is ; N is the length of the window.
4. A high-precision dynamic measurement method for power grid frequency according to claim 3, characterized in that: The zero-crossing time is calculated by the linear interpolation formula, and the linear interpolation formula is: 。 5. A high-precision dynamic measurement method for grid frequency according to claim 1, characterized in that: In step S4, the method for frequency update includes the following steps: If the frequency fluctuations detected continuously for multiple times exceed the dead zone range, the frequency fluctuations are valid frequency changes, and the frequency record of the system is updated.
6. A high-precision dynamic measurement system for power grid frequency, characterized in that: It includes a filtering module, a calculation module and a frequency update module. The filtering module is used to implement a band-pass filter to reduce the noise in the signal; the calculation module is used to calculate the frequency according to the filtered signal; the frequency update module is used to update the measured frequency value.
7. The high-precision dynamic measurement system for power grid frequency according to claim 6, wherein: It also includes a frequency sampling counter, and the frequency sampling counter is used to record the continuity of frequency changes.
Citation Information
Patent Citations
Power grid frequency measurement method and device
CN102116798A
Measuring method of alternating current voltage frequency
CN102495282A
Electrical signal frequency detection method and device, equipment protection device and protection equipment
CN105092966A
Equipment data transmission method and monitoring base station
CN118764890A
Battery state-of-charge adaptive estimation method and device, and vehicle
CN118818308A
Cited By
Power system frequency measurement method and system based on clamping theorem
CN121049577A