A three-phase programmable current time sequence switching control method

By using a three-phase programmable current timing switching control method, the problems of slow switching speed and low accuracy of mechanical relays are solved, achieving microsecond-level switching speed and high-precision current direction control, which is suitable for a variety of application scenarios.

CN121541735BActive Publication Date: 2026-05-15ZHEJIANG REALLIN ELECTRON CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG REALLIN ELECTRON CO LTD
Filing Date
2026-01-16
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing mechanical relays or contactors are slow to switch current, prone to arcing and voltage/current spikes, and have limited lifespan, making it difficult to achieve high-precision and programmable complex switching logic.

Method used

A three-phase programmable current timing switching control method is adopted. By generating forward and reverse waveforms and triggering DMA chain transmission at the zero crossing point, the switching speed at the microsecond or even nanosecond level is achieved. Electronic control is used to avoid mechanical wear, and high-precision and complex logic switching is realized.

Benefits of technology

It significantly improves switching speed and system stability, extends service life, achieves high precision and unlimited switching times, and is suitable for a variety of application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121541735B_ABST
    Figure CN121541735B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of electric variable measurement, in particular to a three-phase programmable current time sequence switching control method, which comprises the following steps: generating and outputting a forward initial waveform, the initial waveform comprising a forward direct current waveform and a forward alternating current waveform; collecting voltage and current signals of the output initial waveform, and adjusting the initial waveform according to errors; calculating and generating a reverse alternating current waveform with a phase shift of 180 degrees according to the adjusted initial waveform, and storing; configuring the reverse alternating current waveform as descriptor 1 and the forward alternating current waveform as descriptor 2; calculating the output times of the initial waveform and the reverse alternating current waveform according to the pre-set three-phase current forward and reverse holding time; and triggering DMA chain transmission at a zero-crossing point. The present application controls the current direction switching time at the microsecond level by directly outputting the reverse waveform, greatly improves the switching rate, and more truly simulates the power flow change of the power grid.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electrical variable measurement technology, and in particular to a three-phase programmable current timing switching control method. Background Technology

[0002] When simulating power flow changes in the power grid, it is often necessary to quickly switch the output current direction of the controllable power supply to meet advanced testing requirements such as bidirectional power flow, harmonic testing, and dynamic load simulation.

[0003] Current commonly used switching schemes rely on mechanical relays or contactors. These mechanical switches are limited by physical action time, with switching speeds typically exceeding tens of milliseconds, making it difficult to meet the demands of microsecond-level rapid testing. During switching, the closing and opening of contacts can easily generate arcs and instantaneous voltage / current spikes, which not only interfere with test waveforms and introduce measurement errors but may also damage precision equipment under test. Furthermore, mechanical structures inherently suffer from wear and tear, resulting in a limited lifespan and decreased reliability under frequent switching. Moreover, their control accuracy is constrained by mechanical tolerances, making it difficult to achieve high-precision, programmable, and complex switching logic. Summary of the Invention

[0004] To improve switching speed and reduce impact during switching, thereby enhancing the stability of the three-phase current control system, this invention provides a three-phase programmable current timing switching control method.

[0005] This invention provides a three-phase programmable current timing switching control method, which adopts the following technical solution:

[0006] A three-phase programmable current timing switching control method includes the following steps:

[0007] Generate and output a positive initial waveform, which includes a positive DC waveform and a positive AC waveform;

[0008] Acquire the voltage and current signals of the initial waveform of the output, and adjust the initial waveform according to the error;

[0009] Based on the adjusted initial waveform, calculate and generate a reverse AC waveform with a phase shift of 180°, and store it;

[0010] Configure the reverse AC waveform as descriptor 1 and the forward AC waveform as descriptor 2;

[0011] Based on the preset three-phase current forward and reverse holding times, calculate the number of outputs of the initial waveform and the reverse AC waveform;

[0012] Zero-crossing triggers DMA chain transfer.

[0013] In a specific feasible implementation, zero-crossing triggered DMA chain transfer is specifically as follows:

[0014] Each time the AC current waveform is detected to first cross zero from the negative half-cycle into the positive half-cycle, a waveform switch is performed.

[0015] In a specific feasible implementation, the process of detecting the AC current waveform first crossing zero from the negative half-cycle into the positive half-cycle is as follows:

[0016] After switching descriptor 1, output the inverted AC waveform of the set number of outputs, then switch descriptor 2; or

[0017] After switching descriptor 2, output a positive AC waveform of the set number of outputs, then switch descriptor 1.

[0018] In a specific feasible implementation, the positive AC waveform is either a periodic waveform that changes with time or an AC waveform of three-phase voltage and current, with a phase difference of 120° between the three-phase voltage sine waves and the three-phase current sine waves being in phase with the corresponding voltage sine waves.

[0019] In a specific feasible implementation, a positive initial waveform is generated and output, and the initial waveform is adjusted according to the error as follows:

[0020] The microcontroller generates an initial waveform based on a preset output target;

[0021] The microcontroller outputs the three-phase voltage and current AC and DC signals to the power amplifier via DMA, and the power amplifier outputs the initial waveform;

[0022] The metering module acquires voltage and current signals, calculates the error between the voltage and current signals and the output target, and adjusts the initial waveform to reduce the error between the initial waveform and the output target to within the allowable range.

[0023] In one specific implementation, the reverse AC waveform is stored in DMA.

[0024] In one specific feasible implementation, the positive waveform is generated by a microcontroller.

[0025] In one specific implementation, when adjusting the initial waveform according to the error, the voltage amplitude of the analog control signal representing the initial waveform is limited to ±15V in both positive and negative directions by a switching diode.

[0026] In summary, the present invention has the following beneficial effects:

[0027] 1. By using waveform reconstruction and zero-crossing control methods, microsecond-level or even nanosecond-level switching speeds can be achieved, which is significantly better than mechanical switching. Furthermore, switching can be performed at the zero-crossing point of the current waveform, significantly reducing the impact during the switching process and improving the stability of the system.

[0028] 2. Electronic control methods eliminate mechanical wear, theoretically allowing for an unlimited number of switches and a much longer service life than mechanical switches. Furthermore, complex switching can be achieved through software logic, adapting to various application scenarios. The switching accuracy of mechanical switches is limited by their mechanical structure, making high-precision control difficult. This invention, through electronic control methods, achieves higher precision in waveform generation and switching control. Attached Figure Description

[0029] Figure 1 This is a flowchart of a three-phase programmable current timing switching control method.

[0030] Figure 2 This is the connection block diagram of the overall circuit.

[0031] Figure 3 This is the logic block diagram of DMA.

[0032] Figure 4 It shows the waveforms of current and voltage.

[0033] Figure 5 This is a partial circuit diagram of the A-phase current output circuit.

[0034] Figure 6 It is a continuation Figure 5 The circuit diagram of the A-phase current output circuit. Detailed Implementation

[0035] The following combination Figures 1-6 The present invention will be described in further detail below.

[0036] The three-phase programmable current timing switching control method includes the following steps:

[0037] S1 generates a positive waveform.

[0038] The microcontroller generates an initial waveform based on a preset output target. This initial waveform is a positive waveform, which includes both a positive DC waveform and a positive AC waveform. The positive DC waveform is a constant value. The positive AC waveform is a periodic waveform that varies over time, typically represented as a sine wave. The positive AC waveform is also a three-phase voltage and current AC waveform. The phase difference between the three-phase voltage sine waves is 120°, and the three-phase current sine waves are in phase with their corresponding voltage sine waves.

[0039] After the microcontroller generates the initial waveform, it outputs the three-phase voltage and current AC and DC signals (initial waveform) to the power amplifier via DMA (Direct Memory Access). The power amplifier outputs the initial waveform, and the microcontroller collects the voltage and current signals output by the power amplifier through the metering module built into the three-phase source. By calculating the error between the collected signal and the output target, the microcontroller dynamically adjusts the initial waveform output until the error between the output initial waveform and the output target is reduced to within the allowable range, so as to ensure the stability and accuracy of the voltage and current values ​​and phase.

[0040] S2 generates an inverted AC waveform.

[0041] After the initial waveform completes the current and voltage adjustment, the voltage waveform remains unchanged. Based on the AC current waveform, a reverse AC current waveform with a 180° phase shift is generated through mathematical calculation. The generated reverse AC waveform is stored in DMA.

[0042] Based on the pre-input three-phase current holding times in both directions, the number of output cycles of the forward and reverse current AC waveforms is calculated. Taking a typical grid frequency of 50Hz and one waveform representing 20ms as an example, the number of cycles of the forward and reverse current AC waveforms is calculated. DMA chain-style transfer descriptors 1 and 2 are configured, with three sets of descriptors each, for a total of six descriptors, representing the three phases A, B, and C of the three-phase current. Descriptor 1 represents the reverse AC waveform, and descriptor 2 represents the forward AC waveform. This forms a cyclical transfer chain: forward output → reverse output → forward output → ...

[0043] S3, zero-crossing triggers DMA chain transfer.

[0044] The microcontroller controls the DMA to detect the moment when the current AC waveform first crosses zero from the negative half-cycle into the positive half-cycle, and starts chain transmission to perform the first waveform switching, and performs waveform switching at each zero-crossing point.

[0045] Once the first waveform switch is performed, the DMA operates autonomously. That is, after the DMA switches descriptor 1 and the waveform is switched to a reverse AC waveform, it outputs a reverse AC waveform for a set number of outputs. Then it automatically switches descriptor 2 to output a forward waveform, and the current direction is automatically and periodically changed in a loop.

[0046] To facilitate understanding, we will take the HC32F4A0 microcontroller, the HCT6678 metering chip, and the A-phase current output circuit of the three-phase current (the three-phase voltage and current output principle is the same) as an example for further explanation.

[0047] S1 generates a positive waveform.

[0048] The HC32F4A0 microcontroller, in conjunction with a DMA controller and SPI, transmits the AC and DC waveforms of the A-phase current to a digital-to-analog converter (DAC). The DAC outputs analog AC and DC signals, which are then amplified and inverted by an operational amplifier LM358 to generate the amplified signal required by the downstream power amplifier. The power amplifier connects to a metering chip HCT6678 and a high-end smart meter. The metering chip collects the voltage and current generated by the power amplifier and feeds them back to the microcontroller. The microcontroller dynamically adjusts the output AC and DC signals based on the error between the actual and set values ​​of the generated voltage and current, ensuring that the power amplifier output reaches the set value. Two switching diodes are used to limit the voltage amplitude of the analog control signal representing the initial waveform to ±15V in both directions, ultimately outputting it to the power amplifier to generate the A-phase current.

[0049] S2 generates an inverted AC waveform.

[0050] The incoming DC signal controls the amplitude of the current, and the AC signal controls the waveform of the current. If the phase of the AC signal is changed, the final generated current waveform will also produce a corresponding phase shift. After the dynamic adjustment is completed, the microcontroller calculates the reverse waveform with a 180° phase shift of the current based on the positive waveform, and configures it as descriptor 1 and descriptor 2 in DMA.

[0051] S3, zero-crossing triggers DMA chain transfer.

[0052] When the output waveform crosses zero, DMA chain transmission is initiated to output an inverted waveform, completing the forward and reverse switching of the current. By shifting the AC signal of the current by 180°, the current reversal is ultimately achieved.

[0053] The above are all preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Therefore, all equivalent changes made in accordance with the structure, shape and principle of the present invention should be covered within the scope of protection of the present invention.

Claims

1. A three-phase programmable current timing switching control method, characterized in that: Includes the following steps: Generate and output a positive initial waveform, which includes a positive DC waveform and a positive AC waveform; Acquire the voltage and current signals of the initial waveform of the output, and adjust the initial waveform according to the error; Based on the adjusted initial waveform, calculate and generate a reverse AC waveform with a phase shift of 180°, and store it; Configure the reverse AC waveform as descriptor 1 and the forward AC waveform as descriptor 2; Based on the preset three-phase current forward and reverse holding times, calculate the number of outputs of the initial waveform and the reverse AC waveform; Zero crossing triggers DMA chain transfer; Zero-crossing triggered DMA chain transfer specifically refers to: Each time the AC current waveform is detected to first cross zero from the negative half-cycle into the positive half-cycle, a waveform switch is performed; The specific steps for each detected AC current waveform to first cross zero from the negative half-cycle into the positive half-cycle are as follows: After switching descriptor 1, output the inverted AC waveform of the set number of outputs, then switch descriptor 2; or After switching descriptor 2, output a positive AC waveform of the set number of outputs, then switch descriptor 1.

2. The three-phase programmable current timing switching control method according to claim 1, characterized in that: Is the positive AC waveform a periodic waveform that changes with time, or is it an AC waveform of three-phase voltage and current? The phase difference of the three-phase voltage sine wave is 120°, and the three-phase current sine wave is in phase with the corresponding voltage sine wave.

3. The three-phase programmable current timing switching control method according to claim 1, characterized in that: Generate and output a positive initial waveform, and adjust the initial waveform according to the error as follows: The microcontroller generates an initial waveform based on a preset output target; The microcontroller outputs the three-phase voltage and current AC and DC signals to the power amplifier via DMA, and the power amplifier outputs the initial waveform; The metering module acquires voltage and current signals, calculates the error between the voltage and current signals and the output target, and adjusts the initial waveform to reduce the error between the initial waveform and the output target to within the allowable range.

4. The three-phase programmable current timing switching control method according to claim 1, characterized in that: The reverse AC waveform is stored in DMA.

5. The three-phase programmable current timing switching control method according to claim 1, characterized in that: The positive waveform is generated by the microcontroller.

6. The three-phase programmable current timing switching control method according to claim 1, characterized in that: When adjusting the initial waveform based on the error, the voltage amplitude of the analog control signal representing the initial waveform is limited to ±15V in both forward and reverse directions by switching diodes.