Dynamic sampling data synchronization method and system

Through the dynamic sampling data synchronization method, the P0 code and P1 code signals are used to dynamically adjust the sampling rate, which solves the problems of inconsistent data synchronization and spectrum leakage between multi-machine systems, improves the accuracy and calculation efficiency of high-order harmonic analysis, and ensures that the Synchronization of slave and master under dynamic changes of measured quantities.

CN118377748BActive Publication Date: 2024-09-17CEIEC ELECTRIC TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410827669.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2024-09-17
Estimated Expiration
2044-06-25

AI Technical Summary

Technical Problem

In the existing technology, there are inconsistencies in dynamic sampling data synchronization between multiple devices, which makes it impossible to perform multi-machine systematic multi-dimensional data analysis. Moreover, the second pulse synchronization method with a fixed sampling rate has spectrum leakage and measurement accuracy during spectrum analysis. The problem of decline.

Method used

Using the dynamic sampling data synchronization method, the sampling rate is adjusted through real-time frequency measurement of the host, and the P0 code and P1 code signals are used for dynamic sampling synchronization of the slave, ensuring that the sampling rate is an integer multiple of the measurement frequency, and achieving synchronization of the sampling signal and data window. .

Benefits of technology

It achieves high-precision data synchronization between multi-machine systems, avoids spectrum leakage, improves the accuracy of high-order harmonic analysis, reduces the amount of calculation, and ensures complete synchronization between the slave machine and the host machine when the measured quantity changes dynamically.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118377748B
    Figure CN118377748B
Patent Text Reader

Abstract

The present invention provides a method and system for dynamically sampling data synchronization. The dynamic sampling data synchronization system is a multi-machine synchronization system, which is composed of one host and multiple slaves. The host is used as a dynamic sampling data synchronization reference to provide a sampling synchronization signal and a data window synchronization signal to the slave, wherein the sampling rate is dynamically adjusted according to the current measured frequency to ensure that the sampling rate is an integer multiple of the measurement frequency. The beneficial effects of the present invention are: the present invention does not have the problem of spectrum leakage, and at the same sampling rate, the analysis of high-order harmonics is accurate and the amount of calculation is small, ensuring that the sampling and calculation of the data window of the slave is completely synchronized with the host during the dynamic change of the measured quantity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electric power technology, and in particular to a dynamic sampling data synchronization method and system. Background Art

[0002] In existing technologies, the synchronization problem between multiple devices has always been an important research topic. Common synchronization is a time synchronization method based on second pulses. When converting analog measurements into digital sampling values, a fixed sampling rate and equal interval sampling are used, such as PMU devices (synchronous phasor measurement devices). When sampling needs to change dynamically according to the measured value, the sampling time of different devices will be different, and the calculation and analysis data will also change accordingly. This leads to inconsistent data, and only single-machine data analysis can be performed, and multi-machine systematic multi-dimensional data analysis cannot be performed. Therefore, how to achieve accurate synchronization of dynamic sampling data between devices is a problem that needs to be solved urgently. Summary of the invention

[0003] The present invention provides a dynamic sampling data synchronization method, wherein the host executes the following steps:

[0004] Step 1: Real-time frequency measurement, calculation of sampling rate, the host starts AD sampling according to the sampling rate, AD is the analog-to-digital converter;

[0005] Step 2: Generate a sampling signal, determine whether the sampling signal is a trigger signal for the first sampling point of the calculation data window, if so, generate a P0 code, otherwise generate a P1 code; send the P0 code or P1 code to the slave;

[0006] Step 3: Store the P0 code at the first point of the calculation data window, and store the P1 code in the calculation data window in sequence;

[0007] Step 4: Determine whether the calculation data window is full. If so, execute step 5. Otherwise, return to step 2.

[0008] Step 5: Data analysis, generating analytical data;

[0009] The slave performs the following steps:

[0010] Step 1: The slave receives the P0 code or P1 code sent by the host;

[0011] Step 2: Determine whether the slave receives the P0 code or the P1 code. If so, execute step 3, otherwise return to execute step 1;

[0012] Step 3: Start AD sampling;

[0013] Step 4: If the received code is P0, the corresponding sampled data is stored in the first point of the calculation data window; if the received code is P1, the corresponding sampled data is stored in the calculation data window in sequence;

[0014] Step 5: Determine whether the calculation data window is full. If so, execute step 6. Otherwise, return to execute step 1.

[0015] Step 6: Data analysis, generate analysis data.

[0016] As a further improvement of the present invention, in step 1, the host measures the system frequency to obtain the system operating frequency f, and adjusts the sampling interval so that the sampling rate is 1024*fHz.

[0017] As a further improvement of the present invention, the data analysis in step 5 and step 6 includes harmonic analysis, transient location analysis, and fault analysis.

[0018] As a further improvement of the present invention, in step 2, the P0 code consists of a low level with a width of 10us, and the rising edge triggers sampling.

[0019] As a further improvement of the present invention, in step 2, the P1 code is composed of a low level with a width of 5us, and the rising edge triggers sampling.

[0020] As a further improvement of the present invention, the length of the calculation data window is 1024*10 points.

[0021] The present invention also provides a dynamic sampling data synchronization system, comprising a host and a slave, wherein the host and the slave comprise a processor and a computer program stored in the memory, wherein the computer program is configured to implement the steps of the dynamic sampling data synchronization method of the present invention when called by the processor.

[0022] As a further improvement of the present invention, there is one host and multiple slaves, and the host and the slaves are connected by optical fiber lines.

[0023] As a further improvement of the present invention, the signal sending module of the host is connected to a signal receiving module of a slave, and a plurality of the slaves are connected in sequence through the signal sending module and the signal receiving module;

[0024] Alternatively, the signal sending module of the host is connected to the signal receiving modules of the plurality of slaves respectively.

[0025] As a further improvement of the present invention, the dynamic sampling data synchronization system also includes a host computer, which reads the analysis data of the host and the slave, generates an analysis report, and outputs the analysis report.

[0026] The beneficial effects of the present invention are as follows: the present invention does not have the problem of spectrum leakage, and under the same sampling rate, the analysis of high-order harmonics is accurate and the amount of calculation is small, ensuring that the sampling and calculation data windows of the slave and the host are completely synchronized during the dynamic changes of the measured quantity. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 is a host flow chart of the present invention;

[0028] Figure 2 is a slave flow chart of the present invention;

[0029] Figure 3 It is a schematic diagram of computing data window storage. DETAILED DESCRIPTION

[0030] Importance of data synchronization: In the same system, a single-point measurement of a device can only independently feedback the operation status of the current measurement point. If you want to analyze the operation status of the system, you need to measure multiple points of multiple devices. If you want to analyze the dynamic changes of the system, you need to synchronize the collected data of multiple devices. The current data synchronization method for multiple devices uses a high-precision time synchronization method, such as GPS second pulse signals. The typical application of this method is the sampling and data window synchronization of PMU devices. This second pulse-based synchronization method uses sampling at a fixed sampling rate and uses full seconds as the time basis for calculating the data window. This method can ensure the synchronization of sampling and calculation of data windows between devices. This method has the following disadvantages: the sampling time and the calculation data window are independent of the measured quantity. Conventional data analysis uses FFT (fast Fourier transform) analysis. When the sampling data window is not a complete cycle, it will cause spectrum leakage and a significant decrease in measurement accuracy. To solve this problem, PMU uses a sampling frequency much higher than the measured quantity and uses a complex vector modulation algorithm to calculate the fundamental amplitude and phase of the current measurement point. When the measurement requirements are further improved, such as measuring high-order harmonics of power quality, due to the limitation of hardware resources such as CPU and AD, it is impossible to achieve a sampling rate far exceeding the high-order harmonic frequency and the complex vector modulation computing power of each harmonic, and it is impossible to achieve high-precision data synchronization function between devices. In order to solve this problem, the present invention proposes a dynamic sampling data synchronization method and system. Embodiment 1:

[0031] The dynamic sampling data synchronization system is a multi-machine synchronization system, consisting of one host and multiple slaves. The host serves as the dynamic sampling data synchronization benchmark and provides sampling synchronization signals and data window synchronization signals to the slaves. The sampling rate is dynamically adjusted according to the current measurement frequency to ensure that the sampling rate is an integer multiple of the measurement frequency.

[0032] Design of data synchronization signal between the master and slave: The design uses a single signal line as the data synchronization signal between the master and slave.

[0033] The signal is encoded using a method having the following characteristics:

[0034] 1. The signal defaults to high level;

[0035] 2. The normal sampling signal consists of a low level with a width of 5us, and the rising edge triggers sampling, which is recorded as P1 code;

[0036] 3. The trigger signal of the first sampling point in the calculation data window is composed of a low level with a width of 10us, and the rising edge triggers the sampling. It is recorded as P0 code. After the slave receives the synchronization signal, the rising edge is used as the AD sampling trigger signal. The sampling point triggered by the rising edge with a width of 10us low level is used as the starting point of the calculation data window.

[0037] For example: Power quality harmonic analysis and tracing of a domestic substation, the rated frequency of the power supply system is 50Hz. Power quality harmonic analysis, 10 cycles as a calculation data window. According to the national standard requirements, the measurement reaches 50 harmonics. Harmonic tracing analysis requires multiple devices to analyze each harmonic vector under the same benchmark. The power supply line is a one-input and two-output structure with five monitoring points.

[0038] The monitoring point at the incoming line is set as the master A, and the monitoring points at the two outgoing lines are set as slaves B and C.

[0039] The device platform uses an FPGA + CPU structure. The FPGA is used to receive signals, send synchronization signals and perform AD sampling; the CPU is used for frequency measurement and harmonic analysis.

[0040] The host and the slave are connected by an optical fiber line. The signal sending module of the host is connected to the signal receiving module of a slave. Multiple slaves are connected in sequence through the signal sending module and the signal receiving module. For example, the signal sending module of host A is connected to the signal receiving module of slave B, and the signal sending module of slave B is connected to the signal receiving module of slave C.

[0041] like Figure 1 As shown, the host performs the following steps:

[0042] Step 1: Real-time frequency measurement, calculate the sampling rate, the host starts AD sampling according to the sampling rate, the sampling rate is 1024 * 50Hz, AD is the analog-to-digital converter;

[0043] Step 2: Generate a sampling signal, determine whether the sampling signal is a trigger signal for the first sampling point of the calculation data window, if so, generate a P0 code, otherwise generate a P1 code; send the P0 code or P1 code to the slave;

[0044] Step 3: Store the P0 code at the first point of the calculation data window, and store the P1 code in the calculation data window in sequence;

[0045] Step 4: Determine whether the calculation data window is full. If so, execute step 5. Otherwise, return to step 2.

[0046] Step 5: Data analysis, generate analysis data.

[0047] In step 1, the host measures the system frequency to obtain the system operating frequency f, and adjusts the sampling interval so that the sampling rate is 1024*fHz.

[0048] After slave B receives the synchronization signal from master A, it forwards it to slave C.

[0049] like Figure 2 As shown, the slave performs the following steps:

[0050] Step 1: The slave receives the P0 code or P1 code sent by the host;

[0051] Step 2: Determine whether the slave receives the P0 code or the P1 code. If so, execute step 3, otherwise return to execute step 1;

[0052] Step 3: Start AD sampling;

[0053] Step 4: If the received code is P0, the corresponding sampled data is stored in the first point of the calculation data window; if the received code is P1, the corresponding sampled data is stored in the calculation data window in sequence;

[0054] Step 5: Determine whether the calculation data window is full. If so, execute step 6. Otherwise, return to execute step 1.

[0055] Step 6: Data analysis, generate analysis data.

[0056] The data analysis in step 5 and step 6 is harmonic analysis. At this time, the time of each sampling point of the harmonic analysis data and the location of the calculated data are synchronized. Its synchronization accuracy is mainly generated by the optical fiber communication signal conversion line, the theoretical value is about 50ns, and the transmission time of the optical signal in the optical fiber. In the same station, the synchronization accuracy is less than 1us.

[0057] The dynamic sampling data synchronization system also includes a host computer, which reads the analysis data of the host and the slave, generates an analysis report, and outputs the analysis report; for example, the host computer reads the synchronized harmonic analysis data of the host A, slave B, and slave C, inputs the harmonic source tracing function module, and outputs the harmonic source analysis report.

[0058] Embodiment 2: Based on the one host and two slaves in Embodiment 1, additional measuring points are added, such as one host and three slaves, or one host and multiple slaves. The connection mode is changed from the signal sending module of host A connected to the signal receiving module of slave B, and the signal sending module of slave B connected to the signal receiving module of slave C, to the signal sending module of host A connected to the signal receiving module of slave B, and the signal sending module of host A connected to the signal receiving module of slave C.

[0059] Embodiment 3: Not limited to harmonic source tracing analysis, but also analysis functions based on high-precision dynamic sampling data synchronization, transient location, fault analysis, etc.

[0060] Embodiment 4: The synchronization signal is changed to the default low level, the P0 code and the P1 code are changed to the high level valid, and the falling edge triggers the sampling. Or the level width of the P0 code and the P1 code is changed.

[0061] Beneficial effects of the present invention:

[0062] 1. The synchronization signal reference of the present invention uses the host as the synchronization reference. The sampling trigger time and the calculation data window are dynamically adjusted according to the frequency of the measured quantity. Compared with the method of using second pulse as the synchronization signal and fixing the sampling rate. When using FFT analysis, the calculation data window is an integer multiple of the measured quantity, and there is no problem of spectrum leakage. Therefore, there is no need to perform vector modulation compensation. Under the same sampling rate, the analysis of high-order harmonics has high accuracy and small calculation amount.

[0063] 2. Select one host among multiple machines as the benchmark, reducing the dependence on high-precision timing equipment such as GPS and Beidou.

[0064] 3. The designed synchronization signal has both sampling signal and data window start position signal, which ensures that the sampling and calculation data window of the slave is completely synchronized with the host when the measured quantity changes dynamically.

[0065] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.

Claims

1. A dynamic sampling data synchronization method, It is characterized in that The host performs the following steps: Step 1: Real-time frequency measurement and calculation of sampling rate, where the sampling rate is dynamically adjusted according to the current measured frequency to ensure that the sampling rate is an integer multiple of the measured frequency. The host starts AD sampling according to the sampling rate, where AD is an analog-to-digital converter; Step 2: Generate a sampling signal, determine whether the sampling signal is a trigger signal for the first sampling point of the calculation data window, if so, generate a P0 code, otherwise generate a P1 code; send the P0 code or P1 code to the slave; Step 3: Store the P0 code at the first point of the calculation data window, and store the P1 code in the calculation data window in sequence; Step 4: Determine whether the calculation data window is full. If so, execute step 5. Otherwise, return to step 2. Step 5: Data analysis, generating analytical data; The slave performs the following steps: Step 1: The slave receives the P0 code or P1 code sent by the host; Step 2: Determine whether the slave receives the P0 code or the P1 code. If so, execute step 3, otherwise return to execute step 1; Step 3: Start AD sampling; Step 4: If the received code is P0, the corresponding sampled data is stored in the first point of the calculation data window; if the received code is P1, the corresponding sampled data is stored in the calculation data window in sequence; Step 5: Determine whether the calculation data window is full. If so, execute step 6. Otherwise, return to execute step 1. Step 6: Data analysis, generating analytical data; Wherein, in step 1, the host measures the system frequency to obtain the system operating frequency f, and adjusts the sampling interval so that the sampling rate is 1024 * fHz; The data analysis in step 5 and step 6 includes harmonic analysis, transient location analysis, and fault analysis; In step 2, the P0 code consists of a low level with a width of 10us, and the rising edge triggers sampling; In step 2, the P1 code consists of a low level with a width of 5us, and the rising edge triggers sampling; The length of the calculation data window is 1024 * 10 points; There is one host and two slaves, the two slaves are slave B and slave C, and the host and the slaves are connected by optical fiber lines; The signal sending module of the host is connected to the signal receiving module of slave B, and the signal sending module of slave B is connected to the signal receiving module of slave C; or, the signal sending module of the host is connected to the signal receiving modules of slave B and slave C respectively; The dynamic sampling data synchronization method also includes a host computer, which reads the analysis data of the host and the slave, generates an analysis report, and outputs the analysis report.

2. A dynamic sampling data synchronization system, It is characterized in that The invention comprises a host and a slave, wherein the host and the slave comprise a processor and a computer program stored in a memory, wherein the computer program is configured to implement the steps of the dynamic sampling data synchronization method according to claim 1 when called by the processor.