A method and device for optical fiber differential protection synchronization and data alignment of a ring main unit

CN122553052APending Publication Date: 2026-08-11ZHUHAI OLE DISTRIBUTION AUTOMATION SYST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-08
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

1、同步依赖外部时钟:GPS/北斗在复杂环境下可靠性不足,且增加硬件成本

Benefits of technology

1、需外部时钟,不依赖GPS/北斗,仅利用光纤通道自身完成同步,抗干扰能力强,适用性广。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122553052A_ABST
    Figure CN122553052A_ABST
Patent Text Reader

Abstract

This invention discloses a method and apparatus for synchronization and data alignment of fiber optic differential protection in ring main units, belonging to the field of distribution network relay protection technology. The invention proposes a lightweight synchronization and sampling point sequence number alignment method: sampling data is obtained from the real-time core via shared memory, and the sampling point sequence number is encapsulated in an optical fiber frame for transmission; the receiving side calculates the channel transmission delay and sampling deviation using the frame timestamp, and the slave end fine-tunes the local sampling period based on the sampling deviation; simultaneously, the received sampling point array is cyclically shifted based on the difference between the current sampling sequence number on this side and the first point sequence number of the frame on the other side, achieving physical time alignment of the sampling points on both sides. This invention requires no external clock, the alignment error is less than one sampling interval, and the computational load is small, making it suitable for distributed DTUs or microprocessor-based protection devices in ring main units.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of relay protection for distribution networks, and particularly to a method and device for fiber optic differential protection synchronization and data alignment for ring main units. Background Art

[0002] Ring main units are key switching devices in distribution networks, and rapid fault isolation between their outgoing lines is crucial for power supply reliability. Fiber optic differential protection is gradually applied to the line protection of ring main units due to its good selectivity, fast action speed, and insensitivity to the system operation mode. Currently, the following synchronization and data alignment methods are generally adopted for fiber optic differential protection: 1. Synchronization method based on GPS / Beidou: The two-side devices respectively receive GPS / Beidou signals to achieve sampling synchronization. In outdoor switchyards or underground distribution rooms, signal occlusion often occurs in this scheme, resulting in synchronization failure, and additional hardware is required, with a relatively high cost.

[0003] 2. Interpolation synchronization method based on channel delay measurement: A mechanism similar to IEEE 1588 is used to measure the transmission delay of the fiber optic channel, and then the sampling points on both sides are aligned to the same time axis through linear interpolation or Lagrange interpolation. This scheme relies on floating-point operations, imposing a heavy burden on embedded processors (such as ARM Cortex-M4), and the interpolation error varies with the sampling frequency, with a decline in accuracy in the case of high-order harmonics.

[0004] 3. Hard synchronization method of sampling pulses: Sampling pulses are transmitted through a dedicated synchronization cable. This method requires additional physical wiring and is not suitable for the distributed installation scenario of ring main units.

[0005] Existing public literature (such as a certain issue of Automation of Electric Power Systems in 2018) has reported a differential protection synchronization scheme based on the ping-pong method for measuring delay, but it only compensates for the channel delay, does not solve the inherent deviation of the sampling moments on both sides, and interpolation is still required for alignment; moreover, it is not optimized for dual-core heterogeneous embedded platforms and cannot fully utilize the zero-copy feature of shared memory.

[0006] The distributed DTU or microcomputer protection devices supporting ring main units use ARM Cortex-A7 or Cortex-M4 processors, with limited computing power. Therefore, a lightweight synchronization and alignment method that does not require GPS, does not require floating-point interpolation, and is suitable for embedded terminals is needed.

[0007] The following problems exist in the existing fiber optic differential protection technology: 1. Synchronization depends on external clocks: GPS / Beidou has insufficient reliability in complex environments and increases the hardware cost.

[0008] 2. The interpolation algorithm has a large amount of calculation: Traditional interpolation synchronization methods require floating-point multiplication, division, and trigonometric function operations, and it is difficult to guarantee real-time performance on embedded processors.

[0009] 3. Insufficient sampling alignment accuracy: Simple timestamp alignment cannot eliminate the fixed deviation of sampling time, resulting in differential current calculation error.

[0010] 4. Low resource utilization: Functional modules such as startup components, differential calculation, and TA disconnection detection run independently, resulting in low efficiency of shared memory access and redundant data copying. Summary of the Invention

[0011] Based on the technical problems existing in the background technology, the present invention proposes a method and device for optical fiber differential protection synchronization and data alignment for ring network cabinets. It is applied to the distributed DTU or microcomputer protection device of the ring network cabinet. The device includes a real-time processor core (R core) and an application processor core (A core), which exchange data through shared memory.

[0012] This invention proposes a method for optical fiber differential protection synchronization and data alignment for ring main units, comprising the following steps: S1. The real-time core collects current and voltage waveforms at a fixed sampling period and stores the sampling points and sampling point numbers into a shared memory ring buffer. S2. The application core reads the sampling points, encapsulates them into an optical fiber frame containing the transmission time and the first sampling point sequence number, and sends it to the other side. S3. After receiving the optical fiber frame from the other side, calculate the channel transmission delay and sampling deviation based on the timestamp within the frame, and fine-tune the local sampling period from the slave end based on the sampling deviation. S4. Based on the difference between the current sampling point number on this side and the first point number in the frame on the other side, the received sampling point array is cyclically shifted to achieve physical time alignment of the sampling points on both sides. S5. Calculate the differential current and braking current based on the aligned sampling points, and determine whether to trip.

[0013] Preferably, in step S1, the shared memory is the on-chip shared RAM in a dual-core heterogeneous processor, and the real-time core and the application core can directly access each other through memory mapping without the need for data copying.

[0014] Preferably, in step S1, the sampling point number is a monotonically increasing integer, which is used cyclically in the shared memory circular buffer, and each frame carries the first point number for alignment calculation.

[0015] Preferably, in step S3, the normalization formula for the sampling bias is: If Ts > Ts_max / 2, then Ts -= Ts_max; if Ts < -Ts_max / 2, then Ts += Ts_max, where Ts_max is the sampling period.

[0016] Preferably, in step S3, the step size of the slave end for fine-tuning the sampling deviation is 2 microseconds, and the adjustment direction is opposite to the sign of the sampling deviation, until the absolute value of the deviation is less than 10 microseconds.

[0017] Preferably, in step S4, the cyclic shift alignment specifically involves: Offset = (Current sampling point number on this side - First frame point number on the opposite side) % * Number of sampling points per frame; After cyclically shifting the sampling point array on the opposite side by the offset, they are sequentially matched with the subsequent sampling points on this side.

[0018] Preferably, it also includes S6, TA disconnection detection lockout. When the differential current is greater than 0.8 times the low set value and the current on one side is less than the no-current threshold (0.06 times the rated current) while the current on the other side is greater than the current-current threshold, the TA disconnection flag is set after a 10-second delay confirmation, and the differential output is locked.

[0019] This invention also proposes a fiber optic differential protection device for ring main units, comprising: The real-time sampling module, executed by the real-time processor core, is used to control the ADC to acquire current and voltage, and write the sampling points and sequence numbers into shared memory. The communication module, executed by the application processor core, is used to encapsulate / decapsulate fiber frames, calculate channel delay and sampling deviation, and perform slave-end sampling period adjustment. The alignment module is used to perform cyclic shift alignment on the received data based on the difference in the sampling point sequence numbers; The differential calculation module is used to perform Fourier transform, differential current and braking current calculations based on the aligned data; The output module is used to drive the relay when the tripping conditions are met.

[0020] Compared with existing technologies, the beneficial effects of this invention are: 1. Requires an external clock, does not rely on GPS / BeiDou, and only uses the fiber optic channel itself to complete synchronization. It has strong anti-interference ability and wide applicability.

[0021] 2. Minimal computational load: synchronization and data alignment involve only integer addition and subtraction, modular arithmetic, and circular shifts, requiring no floating-point interpolation, and can run easily on ARM Cortex-M4 (200MHz).

[0022] 3. High alignment accuracy: Through fine-tuning of the sampling period, the long-term steady-state deviation is less than 10µs; through cyclic shifting of the serial number, the alignment error of the sampling point is less than one sampling interval (78µs), which meets the accuracy requirements of differential protection.

[0023] 4. Good real-time performance: zero-copy shared memory ensures that the delay from data sampling to transmission is less than 1ms; protection calculation is performed once per cycle (20ms), and the action time is less than 40ms.

[0024] 5. High integration: It integrates functions such as synchronization, alignment, startup, and TA disconnection detection into the same device, eliminating the need for additional hardware and reducing the cost of secondary equipment in ring main units.

[0025] 6. Highly adaptable, supports automatic configuration of master and slave roles, and can be flexibly applied to different ring network cabinet lines (such as two-terminal or three-terminal differential). Attached Figure Description

[0026] Figure 1 : Flowchart of the overall method of this invention.

[0027] Figure 2 : Schematic diagram of fiber optic frame structure.

[0028] Figure 3 Timing diagram for calculating channel transmission delay and sampling deviation.

[0029] Figure 4 : Schematic diagram of cyclic shifting and alignment of sampling point numbers.

[0030] Figure 5 Shared memory dual-core data interaction architecture diagram.

[0031] Figure 6 Differential protection action logic block diagram.

[0032] Figure 7 : TA disconnection detection and interlocking flowchart. Detailed Implementation

[0033] Reference Figure 1-7 This embodiment proposes a method for optical fiber differential protection synchronization and data alignment for ring main units, including the following steps; Step S1: Real-time sampling and shared memory storage The real-time core (R core) controls the analog-to-digital converter (ADC) to synchronously sample the three-phase current (IA, IB, IC) and three-phase voltage (UA, UB, UC) of the ring main unit outgoing lines at a fixed sampling frequency (preferably 12800Hz, 256 points per cycle).

[0034] Each sampling point is assigned a monotonically increasing sampling point number (us_sample_idx, ranging from 0 to TC_ADC_DOTS_PER_CHANNEL-1), and is stored together with the original sampled value in a circular buffer (struct t_sampledata_mc) in shared memory.

[0035] The application core (A core) directly reads the sampling points through shared memory, achieving zero-copy data acquisition.

[0036] Step S2: Fiber Frame Encapsulation and Transmission The application core reads 64 newly acquired sampling points from shared memory at fixed intervals (every 5ms) and encapsulates them into custom fiber frames.

[0037] The fiber optic frame structure includes: Frame header: version number, frame length, frame sequence number; Synchronization information: local transmission time t1_send (microsecond-level timestamp), local sampling point first point number local_sample_no; Sampling data: 64 sampling points, each sampling point contains ADC code values ​​for 6 channels (IA, IB, IC, UA, UB, UC); Verification field: 32-bit CRC (IEEE 802.3).

[0038] The frame is sent to the protection device on the other side through the device's Ethernet port or dedicated fiber optic interface.

[0039] Step S3: Fiber optic frame reception and preliminary analysis After the receiving device receives the fiber frame, it records the receiving time t4_recv_local.

[0040] Perform CRC check on the frame. After the check passes, parse out the three timestamps provided by the other side: t1_send (time when the other side sends the frame), t2_recv_opp (time when the other side receives the frame from this side), and t3_send_opp (time when the other side sends the frame).

[0041] At the same time, the first sampling point number opp_sample_no of the opposite side is obtained. Step S4: Calculation of channel transmission delay and sampling deviation Calculate the round-trip time of the received frame on this side: round_trip = t4_recv_local - t1_send.

[0042] Calculate the processing delay on the other side: peer_delay = t3_send_opp - t2_recv_opp.

[0043] Calculate the one-way transmission delay: Td = (round_trip - peer_delay) / 2 (microseconds).

[0044] Apply sliding window filtering (window length 16) to Td to obtain the smoothed Td_avg.

[0045] Calculate the sampling bias: Ts = (t4_recv_local - t3_send_opp) - Td_avg.

[0046] Ts is normalized to within ±1 / 2 of the sampling period (the sampling period is 78.125µs, i.e., Ts = Ts mod 78.125; if it is greater than half a period, subtract one period).

[0047] The normalized Ts represents the lead / lag time of the sampling point on the opposite side relative to the sampling point on this side.

[0048] Step S5: Adaptive sampling period fine-tuning from the slave end If the device is configured as a slave (e.g., the master / slave role is determined by comparing device addresses), and |Ts| is greater than the target deviation threshold (preferably 10µs), then the adjustment step size ΔT is calculated (step size 2µs, direction opposite to Ts).

[0049] The real-time core sends adjustment commands to the shared memory, and then fine-tunes the period value of the ADC sampling timer (e.g., adjusting 78.125µs to 78.125±0.002µs).

[0050] After multiple adjustments, Ts converged to within 10µs, achieving long-term synchronization of sampling times on both sides. Step S6: Cyclic shift and alignment of sampling point numbers Get the latest sampling point number cur_local_idx on this side (read from shared memory).

[0051] Calculate the offset: shift = (cur_local_idx - opp_sample_no) % SAMPLES_PER_FRAME (SAMPLES_PER_FRAME is the number of sampling points per frame, which is 64 in this example).

[0052] The sampling point array in the received frame on the other side is cyclically shifted by the offset shift: the i-th point of the new array is equal to the (i+shift) % 64-th point of the original array.

[0053] The shifted sampling point array on the opposite side is physically time aligned with the subsequent SAMPLES_PER_FRAME sampling points on this side (error less than 1 sampling interval). Step S7: Differential Protection Calculation and Output The 256 consecutive aligned sampling points on the local and opposite sides (i.e., one power frequency cycle) are sent to the Fourier transform module to calculate the fundamental amplitude of the three-phase current.

[0054] Calculate the differential current Id = |I_local + K·I_remote| and the braking current Ir = |I_local -K·I_remote|, where K is the balance coefficient (to compensate for the difference in the transformer ratios on both sides).

[0055] Determine the start-up condition: the sudden change in phase current (second-order differential) or the differential current is greater than 0.8 times the low set value.

[0056] If the starting element operates and the synchronization state is valid, and the differential current satisfies the ratio braking characteristic (Id > I_set_low and Id > k·Ir), then a trip signal is output to drive the ring main unit circuit breaker to trip.

[0057] If a current transformer (CT) disconnection is detected (large differential current but no current on one side) and the interlocking function is engaged, the differential protection will be temporarily blocked.

[0058] Step S8: Redundancy and Anomaly Handling When the main communication channel (fiber optic cable) fails, it can automatically switch to the backup communication channel (such as a serial port or another fiber optic core) to ensure data continuity.

[0059] If the channel interruption exceeds the set time (e.g., 100ms), the synchronization status is set to invalid, and the differential protection is deactivated to prevent malfunction.

[0060] Application Example 1: Two-End Fiber Differential Protection Based on Distributed DTU This embodiment uses a distributed protection and control unit as the hardware platform, which is installed in the outgoing line bay of the ring main unit. Another identical device is installed in the ring main unit on the opposite side of the line. The two devices are directly connected via single-mode optical fiber.

[0061] I. Hardware Configuration Ring main unit: OLK-12 / T630-25, outgoing line configuration includes current transformer (600A / 5A ratio) and voltage transformer (10kV / 100V).

[0062] DTU: The main control chip is a dual-core heterogeneous processor: one ARM Cortex-A7 (1GHz) running Linux, responsible for communication, protection computing and human-computer interaction; one Cortex-M4 (200MHz) running RT-Thread, responsible for ADC sampling, shared memory maintenance and sampling period fine-tuning.

[0063] ADC: 16-bit synchronous sampling chip, sampling rate 12800Hz (78.125µs interval), 256 points per cycle.

[0064] Fiber optic interface: 100Mbps Ethernet optical port, custom EtherType 0x88CD.

[0065] Software implementation Real-time core (M4) tasks: The ADC sampling is triggered by a hardware timer, and after each sampling is completed, the DMA is triggered to move the data to a shared memory circular buffer.

[0066] Maintain the sampling point number us_sample_idx, increment it by 1 for each sampling, and cycle from 0 to 95 (because TC_ADC_DOTS_PER_CHANNEL=96).

[0067] Listen for adjustment commands at address SHM_PERIOD_ADJ_ADDR in shared memory. Upon receiving the command, modify the timer comparison value and adjust the sampling period (step ±2µs).

[0068] Application Core (A7) Task The sending thread (priority 85) reads the latest 64 sample points from shared memory every 5ms, encapsulates and sends the fiber frame using fiber_send_frame. The t1_send in the frame obtains a microsecond-level timestamp via clock_gettime(CLOCK_MONOTONIC), and local_sample_no is taken from us_sample_idx in shared memory.

[0069] Receive thread (priority 88): Blocks receiving fiber optic frames. Upon receipt, it records t4_recv_local, checks the CRC, and parses out fields such as t1_send, t2_recv_opp, t3_send_opp, and opp_sample_no. It calls sync_update to calculate Td and Ts. If this device is a slave and |Ts|>10µs, it calls rcore_adjust_sample_period to send an adjustment command.

[0070] Protection thread (priority 90): Executes in 5ms cycles, acquiring 64 new sampling points each time, and maintaining a 256-point circular window. When both the local and opposite windows are filled with 256 points, the following sub-steps are executed: a. Align the sampling points of the opposite window by cyclically shifting them according to the previously calculated offset.

[0071] b. Perform a Fourier transform on the 256-point array on both sides to obtain the fundamental amplitude.

[0072] c. Calculate the differential current and braking current.

[0073] d. Invoke the startup element (based on amplitude mutation and differential flow) and TA disconnection detection.

[0074] e. If the tripping conditions are met, drive the output relay via GPIO.

[0075]

[0076] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A method for optical fiber differential protection synchronization and data alignment of a ring main unit, characterized in that, Includes the following steps: S1. The real-time core collects current and voltage waveforms at a fixed sampling period and stores the sampling points and sampling point numbers in a shared memory ring buffer. The shared memory is the on-chip shared RAM in the dual-core heterogeneous processor. The real-time core and the application core can directly access each other through memory mapping without data copying. S2. The application core reads the sampling points, encapsulates them into an optical fiber frame containing the transmission time and the first sampling point sequence number, and sends it to the other side. S3. After receiving the optical fiber frame from the other side, calculate the channel transmission delay and sampling deviation based on the timestamp within the frame, and fine-tune the local sampling period from the slave end based on the sampling deviation. S4. Based on the difference between the current sampling point number on this side and the first point number in the frame on the other side, perform a cyclic shift on the received sampling point array to achieve physical time alignment of the sampling points on both sides. The cyclic shift specifically involves: Offset = (Current sampling point number on this side - First frame point number on the opposite side) % * Number of sampling points per frame; After cyclically shifting the sampling point array on the opposite side by the offset, they are sequentially matched with the subsequent sampling points on this side. S5. Calculate the differential current and braking current based on the aligned sampling points, and determine whether to trip.

2. The method for optical fiber differential protection synchronization and data alignment of a ring main unit according to claim 1, characterized in that, In step S1, the sampling point number is a monotonically increasing integer, which is used cyclically in the shared memory circular buffer, and each frame carries the first point number for alignment calculation.

3. The method for optical fiber differential protection synchronization and data alignment of a ring main unit according to claim 1, characterized in that, In S3, the normalization formula for the sampling deviation is: If Ts > Ts_max / 2, then Ts -= Ts_max; if Ts < -Ts_max / 2, then Ts += Ts_max, where Ts_max is the sampling period.

4. The method for optical fiber differential protection synchronization and data alignment of a ring main unit according to claim 1, characterized in that, In step S3, the slave end makes a fine adjustment step of 2 microseconds based on the sampling deviation, and the adjustment direction is opposite to the sign of the sampling deviation, until the absolute value of the deviation is less than 10 microseconds.

5. The method for fiber optic differential protection synchronization and data alignment for ring main units according to claim 1, characterized in that, It also includes S6 and TA disconnection detection interlock. When the differential current is greater than 0.8 times the low setting value and the current on one side is less than the no-current threshold (0.06 times the rated current) while the current on the other side is greater than the current threshold, the TA disconnection flag is set after a 10-second delay confirmation, and the differential output is interlocked.

6. An optical fiber differential protection device for a ring main unit, for implementing the method of any one of claims 1-5, characterized in that, include: The real-time sampling module, executed by the real-time processor core, is used to control the ADC to acquire current and voltage, and write the sampling points and sequence numbers into shared memory. The communication module, executed by the application processor core, is used to encapsulate / decapsulate fiber frames, calculate channel delay and sampling deviation, and perform slave-end sampling period adjustment. The alignment module is used to perform cyclic shift alignment on the received data based on the difference in the sampling point sequence numbers; The differential calculation module is used to perform Fourier transform, differential current and braking current calculations based on the aligned data; The output module is used to drive the relay when the tripping conditions are met.