Sampling method, system and device
By converting active distribution network signals into square wave signals of the same frequency and generating sampling pulses with equal phase intervals, and combining this with a phase angle correction method, the computational complexity and error problems of existing sampling methods are solved, achieving high-precision synchronous sampling and improving the monitoring and control performance of active distribution networks.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHANGJIAKOU POWER SUPPLY COMPANY OF STATE GRID JINBEI ELECTRIC POWER COMPANY
- Filing Date
- 2025-11-27
- Publication Date
- 2026-05-05
AI Technical Summary
In active power distribution networks, existing technologies employ complex calculation methods for equal-time interval sampling, which are not suitable for dynamic signals. Equal-phase interval sampling also suffers from phasor calculation errors, failing to meet the requirements for synchronous phasor measurement.
The AC voltage/current signal of the active distribution network is converted into a square wave signal of the same frequency, generating sampling pulses with equal phase intervals. The error is eliminated by the phase angle correction method. Bandpass filtering and zero-crossing triggering technology are used, combined with high-frequency stable pulses and local clock to generate sampling pulses, so as to realize equal phase interval sampling and phase angle correction.
It improves the monitoring and control performance of active distribution network feeder terminals without increasing computational load, meets the requirements of high-precision synchronous sampling, and is suitable for dynamic signal and strong electromagnetic interference environments.
Smart Images

Figure CN121978389A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a sampling method, system, and apparatus, belonging to the field of power system automation technology. Background Technology
[0002] In the operation of active distribution networks, new feeder terminals require synchronous phasor measurements. The Discrete Fourier Transform (DFT) method is widely used in phasor calculations for synchronous phasor measurements, with corresponding sampling methods including equal-time interval sampling and equal-phase interval sampling. However, the former requires extending the sampling time, increasing the number of sampling points, and iterative calculations to correct errors, making it computationally complex and unsuitable for dynamic signals and microcontrollers / digital signal processors. The latter, while capable of tracking the frequency of the measured signal, suffers from a mismatch between the network-wide unified timescale and the phasor calculation sampling time, leading to phasor calculation errors. Therefore, a new sampling method suitable for new feeder terminals in active distribution networks is urgently needed. Summary of the Invention
[0003] This invention provides a sampling method, system, and apparatus that solves the problems disclosed in the background art.
[0004] According to one aspect of this application, a sampling method is provided, comprising: Convert the active distribution network AC voltage / current signal of this cycle into a square wave signal of the same frequency for this cycle; Based on the square wave signal of the current cycle, the high-frequency stable pulse of the local clock, and the frequency of the square wave signal of the previous cycle, a sampling pulse with the same phase interval and the same frequency as the square wave signal of the current cycle is generated. Based on the sampling pulse, the square wave signal of this period is sampled at equal phase intervals to obtain the sampled signal; The phase angle of the sampled signal is corrected based on the time information of the time stamp pulses at equal intervals of the local clock and the sampling pulses.
[0005] Furthermore, the active distribution network AC voltage / current signal of this cycle is converted into a square wave signal of the same frequency for this cycle, including: Bandpass filtering is performed on the AC voltage / current signal of the active distribution network in this cycle to obtain the fundamental signal; The fundamental wave signal is converted into a square wave signal of the same frequency in the current period by using a zero-crossing triggering method.
[0006] Furthermore, based on the square wave signal of the current cycle, the high-frequency stable pulse of the local clock, and the frequency of the square wave signal of the previous cycle, sampling pulses with equal phase intervals and the same frequency as the square wave signal of the current cycle are generated, including: Using the high-frequency stable pulse as a reference, the number of pulses between adjacent rising edges of the square wave signal in this period is counted, and the period of the square wave signal in this period is calculated based on the number of pulses and the period of the high-frequency stable pulse. Based on the frequency of the square wave signal in the previous cycle, determine the total number of high-frequency stable pulses in the square wave signal in the previous cycle. Based on the total number of high-frequency stable pulses in the square wave signal in the previous cycle and the preset number of sampling points per cycle, calculate the sampling pulse generation count value for the current cycle. The sampling pulse generation count value for the current cycle is the count value of the high-frequency stable pulses corresponding to each equal interval after dividing the adjacent rising edges of the square wave signal in the current cycle into the preset number of sampling points per cycle. Based on the sampling pulse count value and high-frequency stable pulse of this period, a sampling pulse with the same frequency and equal phase interval as the square wave signal of this period is generated; wherein, in the process of generating sampling pulse, the count is accumulated based on the high-frequency stable pulse, and a sampling pulse is generated every time the count value of the sampling pulse generation is full.
[0007] Furthermore, based on the time information of the time-interval time stamp pulses of the local clock and the sampling pulses, phase correction is performed on the sampled signal, including: Calculate the time difference between the sampling time in the sampling pulse and the nearest time marker in the time-stamped pulse; where the nearest time marker is the time marker closest to the sampling time. Based on the time difference, the sampled signal is linearly interpolated to obtain a new sampled signal; in the new sampled signal, the sampled value is aligned with the time of the corresponding time stamp pulse. Based on the time difference, a Taylor series expansion method is used to correct the phase angle of the new sampled signal.
[0008] Furthermore, the phase angle correction formula is as follows: ; In the formula, The corrected phase angle. The phase angle before correction is given, j is the imaginary unit, f is the rated frequency, Δt is the time difference, N is the data window length, and T_s is the sampling period. Let the phase angle be the k-th sampling point. Let be the phase angle of the kNth sampling point.
[0009] According to another aspect of this application, a sampling system is provided, comprising: The conditioning module converts the active distribution network AC voltage / current signal of the current cycle into a square wave signal of the same frequency for the current cycle. The sampling pulse generation module generates sampling pulses with equal phase intervals and the same frequency as the square wave signal of the current cycle, based on the square wave signal of the current cycle, the high-frequency stable pulse of the local clock, and the frequency of the square wave signal of the previous cycle. The sampling module performs equal-phase-interval sampling on the square wave signal of the current period according to the sampling pulse to obtain the sampled signal; The correction module corrects the phase angle of the sampled signal based on the time information of the time stamp pulses at equal time intervals of the local clock and the sampling pulses.
[0010] According to another aspect of this application, a sampling device is provided, including a conditioning circuit, a first processor, a second processor, and a sampling circuit; The conditioning circuit converts the active distribution network AC voltage / current signal of the current cycle into a square wave signal of the same frequency for the current cycle, and transmits the square wave signal to the first processor and the sampling circuit. The first processor implements a local clock based on the clock source time information; it generates sampling pulses with equal phase intervals and the same frequency as the square wave signal of the current cycle based on the square wave signal of the current cycle, the high-frequency stable pulse of the local clock, and the frequency of the square wave signal of the previous cycle; the local clock obtains the time information of the sampling pulses based on the sampling pulses; it sends the sampling pulses to the sampling circuit, and sends the time information of the equal time interval time stamp pulse of the local clock and the sampling pulses to the second processor. The sampling circuit samples the square wave signal of the current period at equal phase intervals according to the sampling pulse, and sends the obtained sampled signal to the second processor; The second processor performs phase angle correction on the sampled signal based on the time information of the time stamp pulses at equal time intervals of the local clock and the sampling pulses.
[0011] Furthermore, the conditioning circuit includes a bandpass filter and a shaping circuit connected in series; the bandpass filter performs bandpass filtering on the active distribution network AC voltage / current signal of the current cycle to obtain the fundamental signal; the shaping circuit adopts a zero-crossing triggering method to convert the fundamental signal into a square wave signal of the same frequency for the current cycle.
[0012] The beneficial effects achieved by this invention are as follows: This invention converts the AC voltage / current signal (i.e., the sampled signal) of the active distribution network in the current cycle into a square wave signal of the same frequency in the current cycle. Based on the frequencies of the square wave signal in the current cycle and the square wave signal in the previous cycle, a sampling pulse is generated to achieve frequency tracking of the sampled signal. Based on the time information of the time-interval time stamp pulse and the sampling pulse, the phase angle of the sampled signal is corrected to achieve phase angle correction of the sampled signal. Furthermore, this invention abandons the time-interval sampling, eliminating the need to extend the sampling time, increase the number of sampling points, and perform iterative calculations to correct errors. Without increasing a large amount of additional computation, it achieves high-precision synchronous sampling, which can improve the monitoring and control performance of the active distribution network feeder terminal. Attached Figure Description
[0013] Figure 1 Here is a flowchart of the sampling method; Figure 2 Schematic diagram for generating sampling pulses; Figure 3 Error analysis diagram for asynchronous phase angle calculation; Figure 4 This is a virtual module block diagram of the sampling system; Figure 5 This is a block diagram of the sampling device. Detailed Implementation
[0014] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit this application or its application or use. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0015] Unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps described in these embodiments do not limit the scope of this application.
[0016] At the same time, it should be understood that, for ease of description, the dimensions of the various parts shown in the accompanying drawings are not drawn according to actual scale.
[0017] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.
[0018] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values.
[0019] It should be noted that similar symbols and letters in the following figures represent similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.
[0020] Furthermore, in the description of the embodiments of this application, the terms "first," "second," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance. Therefore, features defined with "first" or "second" may explicitly or implicitly include one or more features.
[0021] See Figure 1 , Figure 1 This is a flowchart of a sampling method provided in an embodiment of this application. The sampling method can be implemented by a virtual system (i.e., a program) or by a combination of a virtual system and a hardware device. The sampling method may include at least the following steps: Step 1: Convert the AC voltage / current signal of the active distribution network in this cycle into a square wave signal of the same frequency in this cycle.
[0022] It should be noted that the AC voltage / current signal can be obtained from the active power distribution network through a sensor; this is the signal being collected. To facilitate subsequent sampling and tracking of the sampling pulse frequency, the AC voltage / current signal needs to be processed, i.e., converted into a square wave signal of the same frequency.
[0023] In some embodiments, the conversion process may involve bandpass filtering the active distribution network AC voltage / current signal of the current cycle to obtain the fundamental signal; and using a zero-crossing triggering method to convert the fundamental signal into a square wave signal of the same frequency for the current cycle.
[0024] It should be noted that bandpass filtering is used to filter out high-frequency noise and harmonic aliasing interference, while retaining the fundamental frequency and characteristic harmonic components. In signal conversion, the signal can be amplified first, and then level conversion can be performed; amplification can adapt to weak signal gain and match the sampling range; level conversion adjusts the signal to a sampling-recognizable level, that is, outputs a square wave signal of the same frequency.
[0025] Step 2: Based on the square wave signal of the current cycle, the high-frequency stable pulse of the local clock, and the frequency of the square wave signal of the previous cycle, generate sampling pulses with equal phase intervals that are at the same frequency as the square wave signal of the current cycle.
[0026] To achieve synchronous sampling, the frequency of the sampled signal needs to be tracked. Therefore, an adaptive frequency tracking method is required to generate sampling pulses with the same frequency and phase interval as the square wave signal.
[0027] In some embodiments, see Figure 2 The process of generating a sampling pulse can be at least as follows: 21) Using the high-frequency stable pulse as a reference, count the number of pulses between adjacent rising edges of the square wave signal in this period, and calculate the period of the square wave signal in this period based on the number of pulses and the period of the high-frequency stable pulse.
[0028] Using the high-frequency stable pulse as a time reference, the period of the high-frequency stable pulse is defined as f. Hf The count value between adjacent rising edges of a square wave is M. According to the principle of period measurement, the period of a square wave signal can be expressed as: f Base = f Hf / M In the formula, f Base The period of the square wave signal.
[0029] 22) Based on the frequency of the square wave signal in the previous cycle, determine the total number of high-frequency stable pulses in the square wave signal in the previous cycle. Based on the total number of high-frequency stable pulses in the square wave signal in the previous cycle and the preset number of sampling points per cycle, calculate the sampling pulse generation count value for this cycle. Among them, the sampling pulse generation count value for this cycle is the count value of the high-frequency stable pulses corresponding to each equal interval after dividing the adjacent rising edges of the square wave signal in this cycle into the preset number of sampling points per cycle.
[0030] It should be noted that the number of sampling points per wave can be manually set according to sampling requirements. Assuming the number of sampling points per wave is N (which is also the length of the subsequent data window), the sampling pulse generation count value can be expressed as: Cout= N_h / N = f_h / (f×N); In the formula, Cout is the sampling pulse generation count value, N_h is the total number of high-frequency stable pulses in the square wave signal of the previous cycle, f is the frequency of the square wave signal of the previous cycle, and f_h is the frequency of the high-frequency stable pulse.
[0031] 23) Generate a count value and a high-frequency stable pulse based on the sampling pulse of this period, and generate sampling pulses with the same frequency and equal phase interval as the square wave signal of this period.
[0032] During the generation of sampling pulses, a count is accumulated based on a high-frequency stable pulse. Each time a full count of sampling pulses is generated, a sampling pulse is generated to achieve equal-phase sampling in the current cycle. At the same time, the parameters of the current cycle are measured for dynamic updates in the next cycle.
[0033] The frequency of the generated sampling pulse can be expressed as: f trig =f Base ×N; In the formula, f trig The sampling pulse frequency.
[0034] The above method utilizes the frequency of the square wave signal from the previous cycle (i.e., the measured frequency) instead of a fixed frequency, ensuring that the sampling pulse actively tracks real-time changes in the signal frequency (such as fluctuations in grid load or changes in generator speed). This guarantees a strict equal phase interval within each cycle, avoiding phase accumulation errors caused by fixed sampling. When the signal frequency changes abruptly, the sampling strategy can be adjusted according to the frequency of the previous cycle, with a response delay of only one signal cycle. Compared to the asymptotic convergence of traditional phase-locked loops (PLLs), this method can quickly correct the sampling point position and significantly suppress phase angle measurement errors during frequency jumps. Equal phase interval sampling ensures a constant number of sampling points per cycle, a fixed Discrete Fourier Transform (DFT) calculation factor, and eliminates the need for frequency deviation compensation. Even with frequency fluctuations, it naturally suppresses spectral leakage, improving the accuracy of phasor amplitude and phase angle calculations, and meeting the accuracy requirements of synchronous phasor measurement devices (PMUs). The count value is updated once per cycle, and errors do not propagate across cycles. For square wave signals, edge detection has strong anti-interference capabilities, and frequency measurement is stable and reliable, making it particularly suitable for power signal acquisition in environments with strong electromagnetic interference.
[0035] Step 3: Based on the sampling pulse, sample the square wave signal of the current period at equal phase intervals to obtain the sampled signal.
[0036] Step 4: Correct the phase angle of the sampled signal based on the time information of the time stamp pulses at equal time intervals of the local clock and the sampling pulses.
[0037] Existing phase angle correction methods have the following problems: First, they cannot adapt to rapid frequency changes. When the grid frequency fluctuates, fixed compensation will introduce accumulated errors, while the PLL's dynamic response is slow and it is difficult to complete tracking within one cycle. Second, they do not achieve equal-phase sampling, which leads to asynchronous calculation factors for the Discrete Fourier Transform (DFT), serious spectral leakage, and the phase angle accuracy cannot meet the 0.01 level requirement of the PMU device. Third, they lack cycle-by-cycle closed-loop feedback, which causes errors to propagate across cycles, resulting in poor robustness and making them particularly unsuitable for high-precision, high-real-time scenarios such as dynamic monitoring of power systems.
[0038] It should be noted that the time-stamped pulse is an absolute time reference, generated by a high-resolution, high-precision local clock, providing an ideal time scale for the signal analysis process, such as... Figure 3 A "time anchor point" is set every 20ms, marked as kT. The DF data window and sampling time are required to be aligned with this anchor point as much as possible to ensure the time consistency of phasor calculation. The time interval is equal (20ms) as the ideal sampling period and is the benchmark for judging whether the sampling is synchronized.
[0039] See also Figure 3The timing information of the sampling pulse includes the actual sampling time, such as t1 and t2. The sampling pulse attempts to synchronize with the frequency of the signal under test (equal phase interval), but due to hardware delays, frequency tracking errors, etc., the actual sampling time may not be synchronized with kT. If the frequency of the signal under test fluctuates, the sampling pulse interval will change with the period of the signal under test to maintain synchronization between the sampling and the period of the signal under test.
[0040] The time difference between kT and the actual sampling time can be defined as t, i.e., t = kT - t1 or t2 - kT. When calculating the phase angle using DFT (Discrete Fourier Transform), the sampling time is aligned with the starting point kT of the data window by default. However, the actual sampling times are t1 and t2, which will cause the selected signal waveform segments to be misaligned. Therefore, it is necessary to correct and compensate the calculated phase angle using the time difference t.
[0041] Therefore, in some embodiments, the process of phase angle correction of the sampled signal may include: 41) Calculate the time difference between the sampling time in the sampling pulse and the nearest time mark in the time mark pulse, i.e., t=kT-t1 or t2-kT; where the nearest time mark is the time mark closest to the sampling time.
[0042] 42) Based on the time difference, perform linear interpolation on the sampled signal to obtain a new sampled signal; wherein, in the new sampled signal, the sampled value is aligned with the time of the corresponding time stamp pulse.
[0043] The formula for linear interpolation can be as follows: Linear interpolation is performed on the instantaneous voltage / current values between the kth and k+1th adjacent actual sampling points: X(t_ref) = X (t_k) + [X (t_{k+1}) - X (t_k)] · (Δt / T_s); In the formula, T_s is the sampling period, X(t_k) and X(t_{k+1}) are the instantaneous voltage / current values of the kth and k+1th sampling points, respectively, t_k represents the sampling time corresponding to the kth sampling point, t_{k+1} represents the sampling time corresponding to the k+1th sampling point, t_ref is the target reference time, Δt = t_ref - t_k is the time difference, and X(t_ref) is the instantaneous reference time value obtained by interpolation.
[0044] Linear interpolation is used to obtain the instantaneous sampled value at the standard time-aligned moment (i.e., the whole hour), thus eliminating the amplitude error caused by the sampling time deviation.
[0045] 43) Based on the time difference, the phase angle of the new sampled signal is corrected using the Taylor series expansion method.
[0046] It is a time-varying complex number, which can be expanded to first order Taylor in the vicinity of t_k: ; In the formula, For a continuous-time dynamic phasor, These are the measured phasor values at sampling time t_k. O(Δt²) represents the instantaneous rate of change of the phasor at time t_k, and O(Δt²) is the Taylor expansion truncation error, which is negligible when Δt is extremely small. This is the reference time phasor estimate obtained by linear extrapolation, used to compensate for synchronization errors caused by dynamic changes in phasors; Calculation of phasor differential terms (using phasor difference approximation): ; Final revised formula: ; In the formula, The corrected phase angle. The phase angle before correction is given, j is the imaginary unit, f is the rated frequency, Δt is the time difference, N is the data window length (also the number of sampling points per cycle), and T_s is the sampling period. Let the phase angle be the k-th sampling point. Let be the phase angle of the kNth sampling point.
[0047] By utilizing time difference and instantaneous sampled values, the phasor values are further corrected through Taylor series expansion to compensate for phase angle and amplitude errors caused by sampling time deviation, ultimately obtaining high-precision time-scale aligned phasor values. Among them, linear interpolation mainly solves the time-domain alignment problem of instantaneous values, while Taylor series specifically corrects the phase angle accuracy of phasor values. Together, they constitute a complete phase angle correction system. By using time difference-driven interpolation and Taylor series to perform coordinated correction, the problems existing in current correction methods are fundamentally solved.
[0048] The above method converts the AC voltage / current signal of the active distribution network in the current cycle (i.e., the sampled signal) into a square wave signal of the same frequency in the current cycle. Based on the frequency of the square wave signal in the current cycle and the square wave signal in the previous cycle, a sampling pulse is generated to achieve frequency tracking of the sampled signal. Based on the time information of the time stamp pulse and the sampling pulse at equal time intervals, the phase angle of the sampled signal is corrected to achieve phase angle correction of the sampled signal. Furthermore, this invention abandons the sampling at equal time intervals, eliminating the need to extend the sampling time, increase the number of sampling points, and perform iterative calculations to correct errors. It achieves high-precision synchronous sampling without increasing a large amount of additional computation, which can improve the monitoring and control performance of the feeder terminal of the active distribution network.
[0049] It should be noted that the above method can be implemented by a virtual system (i.e., a program), meaning that the above method can be executed by the processor of the novel feeder terminal. Based on this, this application also discloses a sampling system, which is a virtual device, as shown in [reference]. Figure 4 The system may include at least a conditioning module, a sampling pulse generation module, a sampling module, and a correction module. When used to execute the above sampling method, it can: The conditioning module converts the active distribution network AC voltage / current signal of the current cycle into a square wave signal of the same frequency for the current cycle.
[0050] The sampling pulse generation module generates sampling pulses with equal phase intervals and the same frequency as the square wave signal of the current cycle, based on the square wave signal of the current cycle, the high-frequency stable pulse of the local clock, and the frequency of the square wave signal of the previous cycle.
[0051] The sampling module performs equal-phase-interval sampling on the square wave signal of the current period according to the sampling pulse to obtain the sampled signal.
[0052] The correction module corrects the phase angle of the sampled signal based on the time information of the time stamp pulses at equal time intervals of the local clock and the sampling pulses.
[0053] The specific functionalities of each module are explained in the relevant sections of the above methods, and will not be repeated here.
[0054] The aforementioned device converts the AC voltage / current signal of the active distribution network in the current cycle (i.e., the sampled signal) into a square wave signal of the same frequency in the current cycle. Based on the frequencies of the square wave signal in the current cycle and the square wave signal in the previous cycle, it generates sampling pulses to achieve frequency tracking of the sampled signal. Based on the time information of the time-interval time stamp pulses and the sampling pulses, it performs phase angle correction on the sampled signal to achieve phase angle correction of the sampled signal. Furthermore, this invention abandons the time-interval sampling, eliminating the need to extend the sampling time, increase the number of sampling points, and perform iterative calculations to correct errors. Without increasing a large amount of additional computation, it achieves high-precision synchronous sampling, which can improve the monitoring and control performance of the active distribution network feeder terminal.
[0055] It should be noted that the above method can be implemented by combining a virtual system and a hardware device. Based on this, this application also discloses a sampling device, which can be found in [reference needed]. Figure 4 The device may include at least a conditioning circuit, a first processor, a second processor, and a sampling circuit.
[0056] The conditioning circuit converts the AC voltage / current signal of the active power distribution network in the current cycle into a square wave signal of the same frequency in the current cycle, and transmits the square wave signal to the first processor and the sampling circuit; that is, the AC voltage / current signal is input to the input terminal of the conditioning circuit, and the square wave signal of the same frequency is output to the output terminal.
[0057] It should be noted, more specifically, that the conditioning circuit may include a bandpass filter and a shaping circuit connected in series; the bandpass filter performs bandpass filtering on the active distribution network AC voltage / current signal of the current cycle to obtain the fundamental signal; the shaping circuit adopts a zero-crossing triggering method to convert the fundamental signal into a square wave signal of the same frequency for the current cycle.
[0058] The first processor implements a local clock based on the clock source time information; it generates sampling pulses with equal phase intervals and the same frequency as the square wave signal of the current cycle based on the square wave signal of the current cycle, the high-frequency stable pulse of the local clock, and the frequency of the square wave signal of the previous cycle; the local clock obtains the time information of the sampling pulses based on the sampling pulses; it sends the sampling pulses to the sampling circuit, and sends the time information of the equal time interval time stamp pulse of the local clock and the sampling pulses to the second processor.
[0059] It should be noted that the first processor can be an FPGA. Besides inputting square wave signals and clock source time information, and outputting sampling pulses, sampling pulse time information, and time-interval time-stamped pulses, the FPGA also inputs a 1PPS second pulse and outputs local time information and a 1PPS second pulse to the second processor. The 1PPS second pulse serves the following purposes: 1. Calibrates local clock drift by dynamically correcting the accumulated error of the time-interval time-stamped pulses through timestamp comparison once per second, ensuring long-term timekeeping accuracy; 2. Assigns an absolute time stamp to the sampling point, mapping the sampling pulse time information onto the UTC time axis, enabling measurement devices in different geographical locations to calculate phase angles under the same time reference system, meeting the wide-area synchronization requirements of synchronous phasor measurement (PMU); 3. Defines the phase angle measurement reference, typically with a 1PPS rising edge corresponding to a 0° phase, and all phase angle correction values are referenced to this, achieving standardization and comparability of phase angle measurements. Outputting local time information and a 1PPS second pulse to the second processor aims to construct a high-precision time-frequency collaborative processing architecture, achieving decoupling between real-time hardware and complex calculations.
[0060] The sampling circuit samples the square wave signal of the current period at equal phase intervals according to the sampling pulse, and sends the obtained sampled signal to the second processor.
[0061] It should be noted that the sampling circuit can use an A / D converter, which is controlled by the sampling pulse output by the FPGA to perform equal-phase interval sampling on the square wave signal output by the conditioning circuit to generate a discrete electrical signal sequence.
[0062] The second processor performs phase angle correction on the sampled signal based on the time information of the time stamp pulses at equal time intervals of the local clock and the sampling pulses.
[0063] It should be noted that the second processor can be a DSP. The DSP receives the time information output by the FPGA and the discrete electrical signal after A / D conversion, timestamps the sampled data, performs phase angle correction, and supports synchronous phasor measurement.
[0064] The functions of the first and second processors mentioned above are all implemented based on the software system. The implementation of each function is described in the relevant content of the above method and will not be repeated here.
[0065] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of this invention, and these improvements and modifications should also be considered within the scope of protection of this invention.
Claims
1. A sampling method, characterized in that, include: Convert the active distribution network AC voltage / current signal of this cycle into a square wave signal of the same frequency for this cycle; Based on the square wave signal of the current cycle, the high-frequency stable pulse of the local clock, and the frequency of the square wave signal of the previous cycle, a sampling pulse with the same phase interval and the same frequency as the square wave signal of the current cycle is generated. Based on the sampling pulse, the square wave signal of this period is sampled at equal phase intervals to obtain the AC voltage / current sampling signal; The phase angle of the sampled signal is corrected based on the time information of the time stamp pulses at equal intervals of the local clock and the sampling pulses.
2. The method according to claim 1, characterized in that, Converting the active distribution network AC voltage / current signal of the current cycle into a square wave signal of the same frequency for the current cycle includes: Bandpass filtering is performed on the AC voltage / current signal of the active distribution network in this cycle to obtain the fundamental signal; The fundamental wave signal is converted into a square wave signal of the same frequency in the current period by using a zero-crossing triggering method.
3. The method according to claim 1, characterized in that, Based on the square wave signal of the current cycle, the high-frequency stable pulse of the local clock, and the frequency of the square wave signal of the previous cycle, sample pulses with equal phase intervals and the same frequency as the square wave signal of the current cycle are generated, including: Using the high-frequency stable pulse as a reference, the number of pulses between adjacent rising edges of the square wave signal in this period is counted, and the period of the square wave signal in this period is calculated based on the number of pulses and the period of the high-frequency stable pulse. Based on the frequency of the square wave signal in the previous cycle, determine the total number of high-frequency stable pulses in the square wave signal in the previous cycle. Based on the total number of high-frequency stable pulses in the square wave signal in the previous cycle and the preset number of sampling points per cycle, calculate the sampling pulse generation count value for the current cycle. The sampling pulse generation count value for the current cycle is the count value of the high-frequency stable pulses corresponding to each equal interval after dividing the adjacent rising edges of the square wave signal in the current cycle into the preset number of sampling points per cycle. Based on the sampling pulse count value and high-frequency stable pulse of this period, a sampling pulse with the same frequency and equal phase interval as the square wave signal of this period is generated; wherein, in the process of generating sampling pulse, the count is accumulated based on the high-frequency stable pulse, and a sampling pulse is generated every time the count value of the sampling pulse generation is full.
4. The method according to claim 1, characterized in that, Based on the time information of the time-interval time stamp pulses of the local clock and the sampling pulses, the phase angle of the sampled signal is corrected, including: Calculate the time difference between the sampling time in the sampling pulse and the nearest time marker in the time-stamped pulse; where the nearest time marker is the time marker closest to the sampling time. Based on the time difference, the sampled signal is linearly interpolated to obtain a new sampled signal; in the new sampled signal, the sampled value is aligned with the time of the corresponding time stamp pulse. Based on the time difference, a Taylor series expansion method is used to correct the phase angle of the new sampled signal.
5. The method according to claim 4, characterized in that, The phase angle correction formula is: ; In the formula, The corrected phase angle. The phase angle before correction is given, j is the imaginary unit, f is the rated frequency, Δt is the time difference, N is the data window length, and T_s is the sampling period. Let the phase angle be the k-th sampling point. Let be the phase angle of the kNth sampling point.
6. A sampling system, characterized in that, include: The conditioning module converts the active distribution network AC voltage / current signal of the current cycle into a square wave signal of the same frequency for the current cycle. The sampling pulse generation module generates sampling pulses with equal phase intervals and the same frequency as the square wave signal of the current cycle, based on the square wave signal of the current cycle, the high-frequency stable pulse of the local clock, and the frequency of the square wave signal of the previous cycle. The sampling module performs equal-phase-interval sampling on the square wave signal of the current period according to the sampling pulse to obtain the sampled signal; The correction module corrects the phase angle of the sampled signal based on the time information of the time stamp pulses at equal time intervals of the local clock and the sampling pulses.
7. A sampling device, characterized in that, It includes a conditioning circuit, a first processor, a second processor, and a sampling circuit; The conditioning circuit converts the active distribution network AC voltage / current signal of the current cycle into a square wave signal of the same frequency for the current cycle, and transmits the square wave signal to the first processor and the sampling circuit. The first processor implements a local clock based on the clock source time information; based on the square wave signal of the current cycle, the high-frequency stable pulse of the local clock, and the frequency of the square wave signal of the previous cycle, it generates sampling pulses with equal phase intervals that are in the same frequency as the square wave signal of the current cycle. The local clock obtains the time information of the sampling pulse based on the sampling pulse; The sampling pulse is sent to the sampling circuit, and the time information of the local clock's time interval stamp pulse and the sampling pulse is sent to the second processor. The sampling circuit samples the square wave signal of the current period at equal phase intervals according to the sampling pulse, and sends the obtained sampled signal to the second processor; The second processor performs phase angle correction on the sampled signal based on the time information of the time stamp pulses at equal time intervals of the local clock and the sampling pulses.
8. The apparatus according to claim 7, characterized in that, The conditioning circuit includes a bandpass filter and a shaping circuit connected in series. The bandpass filter performs bandpass filtering on the active distribution network AC voltage / current signal of the current cycle to obtain the fundamental signal. The shaping circuit adopts a zero-crossing triggering method to convert the fundamental signal into a square wave signal of the same frequency for the current cycle.