Self-adaptive high-speed pulse isolation driving method and system for multiple power supplies and medium

Through adaptive high-speed pulse isolation drive method, dynamic identification of voltage and frequency, combined with PID control, the current fluctuation and signal attenuation problems of traditional optocoupler isolation solutions under multiple power supply voltages and high-frequency signals are solved, and stable transmission of high-speed signals and high-precision isolation are achieved.

CN120729283AActive Publication Date: 2025-09-30SHENZHEN JUST MOTION CONTROL ELECTROMECHANICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511204751.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-27
Publication Date
2025-09-30
Estimated Expiration
2045-08-27

AI Technical Summary

Technical Problem

Traditional optocoupler isolation solutions face problems such as optocoupler current fluctuations, unstable signal transmission, high complexity, and high cost when faced with multiple power supply voltages or high-frequency pulse signals, making it difficult to meet the needs of high-speed data transmission.

Method used

Adopting adaptive high-speed pulse isolation drive method, it dynamically identifies the input voltage, combines closed-loop PID control constant current drive, intelligently switches gain mode, compensates for high-frequency attenuation, and ensures that the optocoupler current is stable within the full voltage range.

Benefits of technology

It achieves distortion-free transmission of high-speed pulse signals under a wide voltage input, improves the accuracy and reliability of signal isolation, and reduces circuit complexity and cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120729283A_ABST
    Figure CN120729283A_ABST
Patent Text Reader

Abstract

The invention provides a self-adaptive high-speed pulse isolation driving method and system for multiple power supplies and a medium, and the method comprises the steps: firstly, carrying out the sampling according to periodic voltage, automatically recognizing a power supply mode, and carrying out the matching of corresponding target current and basic gain; secondly, closed-loop PID control is adopted to adjust a constant-current diode driving signal in real time, and the stability of the optocoupler current in a wide voltage range is ensured; finally, working modes are intelligently switched based on the pulse frequency, the working modes comprise a common mode, a fast mode and an oversampling mode, and the gain coefficient is dynamically adjusted to compensate for high-frequency attenuation; through a dynamic adjustment algorithm, the problems of large current fluctuation and poor high-frequency response are solved, wide voltage input is compatible, meanwhile, distortion-free transmission of high-speed pulse signals is met, the signal isolation circuit has the advantage of being high in anti-interference capacity, and the precision and reliability of signal isolation are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of isolated optical couplers, and more particularly to an adaptive high-speed pulse isolation driving method, system and medium for multiple power supplies. Background Art

[0002] In the fields of industrial automation, power electronics, and medical equipment, the electrical isolation transmission of high-speed digital signals is a key technology to ensure the safe and reliable operation of the system. Traditional optocoupler isolation solutions usually use current-limiting resistors or transistors to control the optocoupler drive current, but they have obvious defects when facing multiple power supply voltages or high-frequency pulse signals. The high-power current-limiting resistor solution cannot be compatible with input power supplies of multiple voltage amplitudes at the same time. Under different input voltages, the optocoupler current will fluctuate, affecting the stability of signal transmission, and is only suitable for low-speed optocouplers. Although the transistor control solution can stabilize the current, the circuit is complex, the volume is large, and the cost is high, making it difficult to meet the needs of compact drivers. In addition, the existing technology lacks effective compensation for the attenuation of high-frequency signals, resulting in pulse waveform distortion, which seriously restricts the reliability of high-speed data transmission. Therefore, there is an urgent need for an adaptive isolation drive technology that is compatible with high-speed pulses from multiple power supplies. Summary of the Invention

[0003] In view of the above problems, the purpose of the present invention is to provide an adaptive high-speed pulse isolation driving method, system and medium for multiple power supplies, which ensures the stability of the optocoupler current within the full voltage range by dynamically identifying the input voltage and combining closed-loop PID control constant current drive; intelligently switches the gain mode according to the signal frequency to effectively compensate for high-frequency attenuation; the present invention is compatible with wide voltage input and meets the distortion-free transmission of high-speed pulse signals, has strong anti-interference ability, and significantly improves the accuracy and reliability of signal isolation.

[0004] A first aspect of the present invention provides an adaptive high-speed pulse isolation driving method for multiple power supplies, the method comprising: Based on the first sampling period, measuring and obtaining first voltage information; Determine a power supply mode according to the first voltage information, and obtain target current information and first gain information; acquiring first current information; Obtaining a first offset adjustment amount according to a deviation between the first current information and the target current information; adjusting the constant current drive control signal according to the first bias adjustment amount; obtaining first frequency information; Determining whether the first frequency information is greater than a preset first frequency threshold; If not, enter normal mode; If so, determining whether the first frequency information is greater than a preset second frequency threshold; If not, enter the fast mode; If so, enter oversampling mode; The first gain information is adjusted according to the frequency mode.

[0005] In this solution, the measurement to obtain the first voltage information is specifically as follows: The differential sampling circuit is used to collect voltages of the first input pin and the second input pin of the high-speed optocoupler to obtain second voltage information and third voltage information; Based on a preset smoothing window, performing sliding average processing on the second voltage information and the third voltage information to calculate a mean value and a stability coefficient; If the stability coefficient is greater than a preset stability threshold, the first voltage information is obtained according to the difference between the second voltage information mean and the third voltage information mean.

[0006] In this solution, the first offset adjustment amount is obtained according to the deviation between the first current information and the target current information, specifically: Calculating a deviation between the first current information and the target current information to obtain a first current deviation; Based on a preset adjustment period, obtaining a current deviation integral value and a current deviation differential value according to the first current deviation; Based on a preset PID control algorithm, a first offset adjustment amount is obtained according to the first current deviation, the current deviation integral value, and the current deviation differential value.

[0007] In this solution, after obtaining the first offset adjustment value, the method further includes: obtaining first temperature information; Determining whether the first temperature information exceeds a preset first temperature threshold; If yes, obtaining a first temperature compensation coefficient based on a preset temperature compensation mapping curve and according to the first temperature information; The first offset adjustment amount is adjusted according to the first temperature compensation coefficient.

[0008] In this solution, entering the fast mode specifically includes: Adjusting the first gain information to a preset first reference gain; Lowering the hysteresis voltage of the high-speed optocoupler to a preset first reference voltage; increasing the comparator bias current of the high-speed optocoupler to a preset first reference current; Disconnect the filter capacitor network from the input pin of the high-speed optocoupler.

[0009] In this solution, entering the oversampling mode specifically includes: Adjusting the first gain information to a preset second reference gain; Adjusting the first sampling period according to the first frequency information and a preset sampling multiple; Reconstruct the sampled waveform based on the preset FIR filter and mean extraction algorithm; According to the reconstructed sampling waveform, the signal-to-noise ratio information is obtained; According to the signal-to-noise ratio information, a decimation coefficient of the mean decimation algorithm is adjusted.

[0010] A second aspect of the present invention provides an adaptive high-speed pulse isolation drive system for multiple power supplies, including an adaptive high-speed pulse isolation drive method program for multiple power supplies. When the adaptive high-speed pulse isolation drive method program for multiple power supplies is executed by the processor, the following steps are implemented: Based on the first sampling period, measuring and obtaining first voltage information; Determine a power supply mode according to the first voltage information, and obtain target current information and first gain information; acquiring first current information; Obtaining a first offset adjustment amount according to a deviation between the first current information and the target current information; adjusting the constant current drive control signal according to the first bias adjustment amount; obtaining first frequency information; Determining whether the first frequency information is greater than a preset first frequency threshold; If not, enter normal mode; If so, determining whether the first frequency information is greater than a preset second frequency threshold; If not, enter the fast mode; If so, enter oversampling mode; The first gain information is adjusted according to the frequency mode.

[0011] In this solution, the measurement to obtain the first voltage information is specifically as follows: The differential sampling circuit is used to collect voltages of the first input pin and the second input pin of the high-speed optocoupler to obtain second voltage information and third voltage information; Based on a preset smoothing window, performing sliding average processing on the second voltage information and the third voltage information to calculate a mean value and a stability coefficient; If the stability coefficient is greater than a preset stability threshold, the first voltage information is obtained according to the difference between the second voltage information mean and the third voltage information mean.

[0012] In this solution, the first offset adjustment amount is obtained according to the deviation between the first current information and the target current information, specifically: Calculating a deviation between the first current information and the target current information to obtain a first current deviation; Based on a preset adjustment period, obtaining a current deviation integral value and a current deviation differential value according to the first current deviation; Based on a preset PID control algorithm, a first offset adjustment amount is obtained according to the first current deviation, the current deviation integral value, and the current deviation differential value.

[0013] The third aspect of the present invention provides a computer-readable storage medium, which includes an adaptive high-speed pulse isolation driving method program for multiple power supplies. When the adaptive high-speed pulse isolation driving method program for multiple power supplies is executed by a processor, the steps of the adaptive high-speed pulse isolation driving method for multiple power supplies as described in any one of the above items are implemented.

[0014] The present invention provides an adaptive high-speed pulse isolation driving method, system and medium for multiple power supplies. First, based on periodic voltage sampling, the power supply mode is automatically identified and the corresponding target current and basic gain are matched. Second, closed-loop PID control is used to adjust the constant current diode drive signal in real time to ensure the stability of the optocoupler current within a wide voltage range. Finally, based on the pulse frequency, the operating mode is intelligently switched, including normal mode, fast mode and oversampling mode, and the gain coefficient is dynamically adjusted to compensate for high-frequency attenuation. The present invention solves the problems of large current fluctuation and poor high-frequency response through a dynamic adjustment algorithm, is compatible with wide voltage input, and satisfies the distortion-free transmission of high-speed pulse signals. It has strong anti-interference ability and significantly improves the accuracy and reliability of signal isolation. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope.

[0016] Figure 1 A flow chart of an adaptive high-speed pulse isolation driving method for multiple power supplies according to the present invention is shown; Figure 2 A flowchart of obtaining first voltage information provided by an embodiment of the present invention is shown; Figure 3 A flow chart of obtaining a first offset adjustment value provided by an embodiment of the present invention is shown; Figure 4 A block diagram of an adaptive high-speed pulse isolation drive system for multiple power supplies according to the present invention is shown. DETAILED DESCRIPTION

[0017] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0018] Unless otherwise defined, all terms (including technical and scientific terms) used in the embodiments of the present invention have the same meaning as commonly understood by those skilled in the art to which the present invention belongs. It should also be understood that terms such as those defined in common dictionaries should be interpreted as having meanings consistent with their meanings in the context of the relevant technology, and should not be interpreted in an idealized or extremely formal sense, unless explicitly defined in this manner in the embodiments of the present invention.

[0019] The words "first", "second" and similar terms used in the embodiments of the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. Words such as "one", "an" or "the" do not indicate a quantity limitation, but rather indicate the existence of at least one. Similarly, words such as "include" or "comprise" mean that the elements or objects preceding the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Words such as "connect" or "connected" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The steps before or after the method of the embodiment of the present invention do not necessarily have to be performed in exact order. On the contrary, the various steps may be processed in reverse order or simultaneously. At the same time, other operations may be added to these processes, or one or more steps may be removed from these processes.

[0020] In addition, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.

[0021] Figure 1 The flowchart of the adaptive high-speed pulse isolation driving method for multiple power supplies of the present invention is shown.

[0022] like Figure 1 As shown, the first aspect of the present invention discloses an adaptive high-speed pulse isolation driving method for multiple power supplies, the method comprising: S102, measuring and acquiring first voltage information based on a first sampling period; S104, determining a power supply mode according to the first voltage information, and obtaining target current information and first gain information; S106, obtaining first current information; S108, obtaining a first offset adjustment amount according to a deviation between the first current information and the target current information; S110, adjusting a constant current drive control signal according to the first bias adjustment amount; S112, obtaining first frequency information; S114, determining whether the first frequency information is greater than a preset first frequency threshold; S116, if not, enter normal mode; S118, if yes, determining whether the first frequency information is greater than a preset second frequency threshold; S120, if not, enter the fast mode; S122, if yes, enter oversampling mode; S124: Adjust the first gain information according to the frequency mode.

[0023] It should be noted that the first voltage information is the voltage value of the input power supply; the first frequency information is the frequency of the input power supply; the first current information is the driving current of the high-speed optocoupler; the first gain information is the comparator gain of the high-speed optocoupler; and the constant current drive control signal is the PWM signal duty cycle that controls the constant current output.

[0024] In this embodiment, the voltage acquisition module is activated at a preset rated sampling period. A high-precision ADC circuit acquires the differential voltage between the first input pin (PUL+) and the second input pin (PUL-) of the high-speed optocoupler as the first voltage information. The power supply operating state is automatically selected based on a preset threshold, and the corresponding target current value and a basic gain factor of 1.0 are output. In one embodiment, if the first voltage information is within the range of 4.5V-6V, the system is determined to be in 5V mode, with a target current value set to 10mA; if the first voltage information is within the range of 10V-14V, the system is determined to be in 12V mode, with a target current value set to 12mA; and if the first voltage information is within the range of 20V-28V, the system is determined to be in 24V mode, with a target current value set to 15mA. A monitoring circuit then continuously captures the actual current on the primary side of the optocoupler using a series current-sense resistor and an instrumentation amplifier, calculating its deviation from the target current. This current deviation is input into a digital PID controller to generate a pulse-width modulation signal, which dynamically adjusts the conduction angle of the constant-current diode to maintain a constant optocoupler drive current. The synchronously started edge detection module captures the pulse rising edge interval through a timer. As an implementation method, when the frequency is less than 100kHz, the normal mode basic gain is maintained; when the frequency is in the range of 100kHz-500kHz, it switches to the fast mode, increases the first gain information to 1.5 times and activates the high-speed response circuit; when the frequency is greater than 500kHz, the oversampling mode is enabled, the first gain information is increased to 2.0 times and the anti-aliasing filter is enabled. Finally, the programmable gain amplifier adjusts the output signal amplitude according to the mode instruction to complete the closed-loop control of the entire process. This embodiment automatically identifies the voltage amplitude and matches the optimal operating parameters to ensure that the optocoupler current is constant within the entire voltage range, eliminating the optocoupler drive current fluctuation of the traditional resistor solution; in addition, the signal gain is optimized for different frequency bands to solve the problem of high-speed pulse attenuation.

[0025] Figure 2 A flowchart of obtaining first voltage information provided by an embodiment of the present invention is shown.

[0026] According to an embodiment of the present invention, Figure 2 As shown, the measurement to obtain the first voltage information is specifically as follows: S202, using a differential sampling circuit, respectively collecting voltages from a first input pin and a second input pin of a high-speed optocoupler to obtain second voltage information and third voltage information; S204: performing sliding average processing on the second voltage information and the third voltage information based on a preset smoothing window to calculate a mean value and a stability coefficient; S206 : If the stability coefficient is greater than a preset stability threshold, obtaining the first voltage information according to the difference between the second voltage information mean and the third voltage information mean.

[0027] It should be noted that the second voltage information is the voltage of the PUL+ pin of the high-speed optocoupler; the third voltage information is the voltage of the PUL- pin of the high-speed optocoupler. This embodiment provides a process for differentially measuring the input power supply voltage value. In this embodiment, a dual-channel synchronous ADC is used to alternately sample the ground voltage of the high-speed optocoupler input pins PUL+ and PUL-. As an implementation method, after acquiring 10 sets of sample values ​​continuously, a sliding window averaging algorithm is executed to sort the data within the window in time series, remove at least one maximum value and at least one minimum value, and then take the arithmetic average. Simultaneously, the coefficient of fluctuation is calculated, that is, the ratio of the range to the mean within the window. When the coefficient of fluctuation is <5%, the voltage is determined to be stable, and the effective differential voltage is calculated by subtracting the mean of Channel A from the mean of Channel B to obtain the first voltage information. If the voltage is determined to be unstable, the voltage fluctuation anomaly is recorded. If the coefficient of fluctuation exceeds the standard for three consecutive times, the mode switching is suspended and the calibration procedure is triggered. This embodiment uses a sliding average to suppress transient noise interference; the coefficient of fluctuation verification avoids mode misjudgment caused by voltage jitter.

[0028] Figure 3 A flow chart of obtaining a first offset adjustment value provided by an embodiment of the present invention is shown.

[0029] According to an embodiment of the present invention, Figure 3 As shown, the first bias adjustment amount is obtained according to the deviation between the first current information and the target current information, specifically: S302, calculating a deviation between the first current information and the target current information to obtain a first current deviation; S304, obtaining a current deviation integral value and a current deviation differential value according to the first current deviation based on a preset adjustment period; S306 , obtaining a first offset adjustment value based on a preset PID control algorithm and according to the first current deviation, the current deviation integral value, and the current deviation differential value.

[0030] It should be noted that this embodiment provides a process for dynamically calculating the first bias adjustment amount. As an implementation method, based on the adjustment cycle of the high-speed optocoupler drive current, the voltage drop of the high-precision current-sensing resistor in the primary circuit of the optocoupler is first read, and converted into the actual current value after zero-drift calibration, which is recorded as the first current information. Secondly, the instantaneous deviation between this value and the target current is calculated and stored in the FIFO queue; the integrator accumulates the latest 20 deviation values ​​in the queue, and the differentiator calculates the rate of change of the current deviation and the previous deviation. Then, the PID synthesizer calculates the adjustment amount according to the preset weight coefficient, which is recorded as the first bias adjustment amount. Finally, the value is converted into a PWM signal after limiting processing to drive the MOSFET gate at the control end of the constant current diode. This embodiment uses a PID control algorithm to dynamically calculate the bias adjustment amount to eliminate the optocoupler drive current fluctuations of the traditional resistor scheme, wherein the proportional term achieves millisecond-level current stability, the integral term compensates for long-term offsets, and the differential term smoothes sudden load changes.

[0031] According to an embodiment of the present invention, after obtaining the first offset adjustment value, the method further includes: obtaining first temperature information; Determining whether the first temperature information exceeds a preset first temperature threshold; If yes, obtaining a first temperature compensation coefficient based on a preset temperature compensation mapping curve and according to the first temperature information; The first offset adjustment amount is adjusted according to the first temperature compensation coefficient.

[0032] It should be noted that the first temperature information is the temperature value of the high-speed optocoupler circuit. This embodiment provides a high-temperature compensation mechanism. Among them, the first temperature information integrates at least three monitoring points. As an implementation method, a thermistor is mounted on the constant current diode heat dissipation substrate, a digital temperature sensor is deployed on the optocoupler package surface, and an infrared monitoring unit is set at the key nodes of the PCB routing. Based on the preset temperature compensation cycle, the temperature data is polled, and the compensation process is triggered when any monitoring point exceeds 70°C. By querying the pre-stored temperature-current attenuation curve, the current drop caused by the temperature is compensated by lowering the first bias adjustment amount. In addition, a gradual recovery mechanism is adopted when the temperature drops, and the current compensation amount is restored by 0.5% for every 2°C drop to avoid parameter mutations; all temperature compensation operations record event logs for analysis. This embodiment uses multiple temperature monitoring points to protect key components and to ensure the stability of the optocoupler drive current.

[0033] According to an embodiment of the present invention, entering the fast mode specifically includes: Adjusting the first gain information to a preset first reference gain; Lowering the hysteresis voltage of the high-speed optocoupler to a preset first reference voltage; increasing the comparator bias current of the high-speed optocoupler to a preset first reference current; Disconnect the filter capacitor network from the input pin of the high-speed optocoupler.

[0034] It should be noted that this embodiment provides a fast mode driving logic. As an implementation method, after entering the fast mode, the system performs a four-step hardware reconfiguration. First, the signal path gain is increased to 1.5 times by rewriting the programmable amplifier register. Secondly, an instruction is written to the optocoupler control register to reduce the internal comparator hysteresis voltage from 50mV to 10mV to reduce the flip delay. Then, the comparator bias current in the high-speed optocoupler is increased to 5mA to accelerate the transistor switching process. Finally, the filter capacitor in parallel with the input is disconnected by the MOSFET switch to eliminate the influence of the capacitive load on the edge. This embodiment reduces the impact of the circuit on the mid-frequency band signal through quadruple hardware configuration.

[0035] According to an embodiment of the present invention, entering the oversampling mode specifically includes: Adjusting the first gain information to a preset second reference gain; Adjusting the first sampling period according to the first frequency information and a preset sampling multiple; Reconstruct the sampled waveform based on the preset FIR filter and mean extraction algorithm; According to the reconstructed sampling waveform, the signal-to-noise ratio information is obtained; According to the signal-to-noise ratio information, a decimation coefficient of the mean decimation algorithm is adjusted.

[0036] It should be noted that this embodiment provides driving logic for oversampling mode. As an implementation method, in oversampling mode, the system first increases the basic gain to 2.0 times. Secondly, the sampling period is dynamically adjusted, and the sampling period is calculated in real time according to the detection frequency. For example, for a 500kHz signal, the ADC captures data at a 4-fold oversampling rate, that is, it samples at 2MHz. The raw data output by the ADC is input into a 31-order Hanning window FIR filter to suppress out-of-band noise; the filtered data performs 3:1 mean extraction, that is, the arithmetic average of each two adjacent points is taken to generate a new sequence. The output signal signal-to-noise ratio is calculated in real time. If the signal-to-noise ratio is lower than 40dB, the extraction ratio is dynamically increased to 2:1. If the signal-to-noise ratio is higher than 60dB, the 3:1 extraction is restored or reduced to 4:1 extraction. This embodiment uses oversampling and FIR filtering to suppress high-frequency noise, and optimizes the signal reconstruction quality based on signal-to-noise ratio feedback to improve the reliability of high-frequency signals.

[0037] It is worth mentioning that it also includes: determining whether the second voltage information is lower than the third voltage information; If so, the reverse voltage protection is triggered and the recovery diode is turned on; Calculating a voltage change rate according to the second voltage information or the third voltage information; If the voltage change rate exceeds a preset change rate threshold; The surge protection is triggered, activating the TVS tube and constant current diode to form a voltage clamping combination.

[0038] It should be noted that this embodiment provides a protection mechanism for the input power supply. In this embodiment, the protection mechanism performs dual-channel monitoring in parallel. By continuously comparing the PUL+ and PUL- voltages, when PUL- is higher than PUL+ for 100μs, the hardware reverse protection circuit is triggered, and a low-impedance bypass channel is formed by instantaneously turning on the parallel fast recovery diode. By continuously calculating the voltage change rate, when a sudden change that exceeds the safety threshold is detected, the TVS tube clamp circuit is activated to absorb the surge energy, and an interrupt signal is sent to the background at the same time. The background records the event type and timestamp, and generates a structured fault log, including but not limited to voltage extremes, duration, and number of protection actions. This embodiment adopts differentiated processing strategies for reverse connection and surge, respectively, to improve the stability of the high-speed optocoupler isolation drive circuit during operation.

[0039] It is worth mentioning that it also includes: When power mode switching is detected, adjusting the target current information based on a preset current ramp transition algorithm; When the first frequency information step exceeds a preset third frequency threshold, adjusting the first gain information based on a preset third reference gain; When the first temperature information exceeds a preset second temperature threshold, the differential coefficient of the PID algorithm is increased based on a preset temperature coefficient mapping table.

[0040] It should be noted that this embodiment provides an adaptive optimization mechanism. As an implementation method, the adaptive optimization mechanism quality assurance includes triple dynamic optimization. When the power mode is switched, for example, from 24V mode to 5V mode, the current ramp transition is started, and the target current is linearly reduced from 15mA to 10mA in steps of 1mA / 0.1ms within 0.5ms to avoid sudden changes in the optocoupler current. Changes in adjacent pulse cycles are detected through real-time monitoring. If a sudden change is identified, for example, the frequency change value exceeds 30%, a 1.2x transition gain is temporarily enabled, and after maintaining for several cycles, it is switched to the target mode gain. When the temperature is monitored to exceed 80°C, the temperature coefficient mapping table is called to increase the PID differential coefficient to enhance system damping. All adjustment parameters are monitored by a watchdog mechanism. If the system is not stable within 10ms under the new parameters, it rolls back to the safe configuration and triggers an optimization failure alarm. The current ramp dynamic optimization mechanism provided in this embodiment eliminates the risk of current sudden change when the optocoupler is turned on; the transition gain optimization mechanism prevents signal overshoot during frequency jumps; and the temperature dynamic adjustment PID parameter mechanism maintains control stability.

[0041] Figure 4A block diagram of an adaptive high-speed pulse isolation drive system for multiple power supplies according to the present invention is shown.

[0042] like Figure 4 As shown, the second aspect of the present invention discloses an adaptive high-speed pulse isolation driving system 4 for multiple power supplies, including a memory 41 and a processor 42. The memory includes an adaptive high-speed pulse isolation driving method program for multiple power supplies. When the adaptive high-speed pulse isolation driving method program for multiple power supplies is executed by the processor, the following steps are implemented: Based on the first sampling period, measuring and obtaining first voltage information; Determine a power supply mode according to the first voltage information, and obtain target current information and first gain information; acquiring first current information; Obtaining a first offset adjustment amount according to a deviation between the first current information and the target current information; adjusting the constant current drive control signal according to the first bias adjustment amount; obtaining first frequency information; Determining whether the first frequency information is greater than a preset first frequency threshold; If not, enter normal mode; If so, determining whether the first frequency information is greater than a preset second frequency threshold; If not, enter the fast mode; If so, enter oversampling mode; The first gain information is adjusted according to the frequency mode.

[0043] It should be noted that the first voltage information is the voltage value of the input power supply; the first frequency information is the frequency of the input power supply; the first current information is the driving current of the high-speed optocoupler; the first gain information is the comparator gain of the high-speed optocoupler; and the constant current drive control signal is the PWM signal duty cycle that controls the constant current output.

[0044] In this embodiment, the voltage acquisition module is activated at a preset rated sampling period. A high-precision ADC circuit acquires the differential voltage between the first input pin (PUL+) and the second input pin (PUL-) of the high-speed optocoupler as the first voltage information. The power supply operating state is automatically selected based on a preset threshold, and the corresponding target current value and a basic gain factor of 1.0 are output. In one embodiment, if the first voltage information is within the range of 4.5V-6V, the system is determined to be in 5V mode, with a target current value set to 10mA; if the first voltage information is within the range of 10V-14V, the system is determined to be in 12V mode, with a target current value set to 12mA; and if the first voltage information is within the range of 20V-28V, the system is determined to be in 24V mode, with a target current value set to 15mA. A monitoring circuit then continuously captures the actual current on the primary side of the optocoupler using a series current-sense resistor and an instrumentation amplifier, calculating its deviation from the target current. This current deviation is input into a digital PID controller to generate a pulse-width modulation signal, which dynamically adjusts the conduction angle of the constant-current diode to maintain a constant optocoupler drive current. The synchronously started edge detection module captures the pulse rising edge interval through a timer. As an implementation method, when the frequency is less than 100kHz, the normal mode basic gain is maintained; when the frequency is in the range of 100kHz-500kHz, it switches to the fast mode, increases the first gain information to 1.5 times and activates the high-speed response circuit; when the frequency is greater than 500kHz, the oversampling mode is enabled, the first gain information is increased to 2.0 times and the anti-aliasing filter is enabled. Finally, the programmable gain amplifier adjusts the output signal amplitude according to the mode instruction to complete the closed-loop control of the entire process. This embodiment automatically identifies the voltage amplitude and matches the optimal operating parameters to ensure that the optocoupler current is constant within the entire voltage range, eliminating the optocoupler drive current fluctuation of the traditional resistor solution; in addition, the signal gain is optimized for different frequency bands to solve the problem of high-speed pulse attenuation.

[0045] According to an embodiment of the present invention, the measuring and obtaining of the first voltage information is specifically as follows: The differential sampling circuit is used to collect voltages of the first input pin and the second input pin of the high-speed optocoupler to obtain second voltage information and third voltage information; Based on a preset smoothing window, performing sliding average processing on the second voltage information and the third voltage information to calculate a mean value and a stability coefficient; If the stability coefficient is greater than a preset stability threshold, the first voltage information is obtained according to the difference between the second voltage information mean and the third voltage information mean.

[0046] It should be noted that the second voltage information is the voltage of the PUL+ pin of the high-speed optocoupler; the third voltage information is the voltage of the PUL- pin of the high-speed optocoupler. This embodiment provides a process for differentially measuring the input power supply voltage value. In this embodiment, a dual-channel synchronous ADC is used to alternately sample the ground voltage of the high-speed optocoupler input pins PUL+ and PUL-. As an implementation method, after acquiring 10 sets of sample values ​​continuously, a sliding window averaging algorithm is executed to sort the data within the window in time series, remove at least one maximum value and at least one minimum value, and then take the arithmetic average. Simultaneously, the coefficient of fluctuation is calculated, that is, the ratio of the range to the mean within the window. When the coefficient of fluctuation is <5%, the voltage is determined to be stable, and the effective differential voltage is calculated by subtracting the mean of Channel A from the mean of Channel B to obtain the first voltage information. If the voltage is determined to be unstable, the voltage fluctuation anomaly is recorded. If the coefficient of fluctuation exceeds the standard for three consecutive times, the mode switching is suspended and the calibration procedure is triggered. This embodiment uses a sliding average to suppress transient noise interference; the coefficient of fluctuation verification avoids mode misjudgment caused by voltage jitter.

[0047] According to an embodiment of the present invention, obtaining the first offset adjustment amount according to the deviation between the first current information and the target current information is specifically: Calculating a deviation between the first current information and the target current information to obtain a first current deviation; Based on a preset adjustment period, obtaining a current deviation integral value and a current deviation differential value according to the first current deviation; Based on a preset PID control algorithm, a first offset adjustment amount is obtained according to the first current deviation, the current deviation integral value, and the current deviation differential value.

[0048] It should be noted that this embodiment provides a process for dynamically calculating the first bias adjustment amount. As an implementation method, based on the adjustment cycle of the high-speed optocoupler drive current, the voltage drop of the high-precision current-sensing resistor in the primary circuit of the optocoupler is first read, and converted into the actual current value after zero-drift calibration, which is recorded as the first current information. Secondly, the instantaneous deviation between this value and the target current is calculated and stored in the FIFO queue; the integrator accumulates the latest 20 deviation values ​​in the queue, and the differentiator calculates the rate of change of the current deviation and the previous deviation. Then, the PID synthesizer calculates the adjustment amount according to the preset weight coefficient, which is recorded as the first bias adjustment amount. Finally, the value is converted into a PWM signal after limiting processing to drive the MOSFET gate at the control end of the constant current diode. This embodiment uses a PID control algorithm to dynamically calculate the bias adjustment amount to eliminate the optocoupler drive current fluctuations of the traditional resistor scheme, wherein the proportional term achieves millisecond-level current stability, the integral term compensates for long-term offsets, and the differential term smoothes sudden load changes.

[0049] According to an embodiment of the present invention, after obtaining the first offset adjustment value, the method further includes: obtaining first temperature information; Determining whether the first temperature information exceeds a preset first temperature threshold; If yes, obtaining a first temperature compensation coefficient based on a preset temperature compensation mapping curve and according to the first temperature information; The first offset adjustment amount is adjusted according to the first temperature compensation coefficient.

[0050] It should be noted that the first temperature information is the temperature value of the high-speed optocoupler circuit. This embodiment provides a high-temperature compensation mechanism. Among them, the first temperature information integrates at least three monitoring points. As an implementation method, a thermistor is mounted on the constant current diode heat dissipation substrate, a digital temperature sensor is deployed on the optocoupler package surface, and an infrared monitoring unit is set at the key nodes of the PCB routing. Based on the preset temperature compensation cycle, the temperature data is polled, and the compensation process is triggered when any monitoring point exceeds 70°C. By querying the pre-stored temperature-current attenuation curve, the current drop caused by the temperature is compensated by lowering the first bias adjustment amount. In addition, a gradual recovery mechanism is adopted when the temperature drops, and the current compensation amount is restored by 0.5% for every 2°C drop to avoid parameter mutations; all temperature compensation operations record event logs for analysis. This embodiment uses multiple temperature monitoring points to protect key components and to ensure the stability of the optocoupler drive current.

[0051] According to an embodiment of the present invention, entering the fast mode specifically includes: Adjusting the first gain information to a preset first reference gain; Lowering the hysteresis voltage of the high-speed optocoupler to a preset first reference voltage; increasing the comparator bias current of the high-speed optocoupler to a preset first reference current; Disconnect the filter capacitor network from the input pin of the high-speed optocoupler.

[0052] It should be noted that this embodiment provides a fast mode driving logic. As an implementation method, after entering the fast mode, the system performs a four-step hardware reconfiguration. First, the signal path gain is increased to 1.5 times by rewriting the programmable amplifier register. Secondly, an instruction is written to the optocoupler control register to reduce the internal comparator hysteresis voltage from 50mV to 10mV to reduce the flip delay. Then, the comparator bias current in the high-speed optocoupler is increased to 5mA to accelerate the transistor switching process. Finally, the filter capacitor in parallel with the input is disconnected by the MOSFET switch to eliminate the influence of the capacitive load on the edge. This embodiment reduces the impact of the circuit on the mid-frequency band signal through quadruple hardware configuration.

[0053] According to an embodiment of the present invention, entering the oversampling mode specifically includes: Adjusting the first gain information to a preset second reference gain; Adjusting the first sampling period according to the first frequency information and a preset sampling multiple; Reconstruct the sampled waveform based on the preset FIR filter and mean extraction algorithm; According to the reconstructed sampling waveform, the signal-to-noise ratio information is obtained; According to the signal-to-noise ratio information, a decimation coefficient of the mean decimation algorithm is adjusted.

[0054] It should be noted that this embodiment provides driving logic for oversampling mode. As an implementation method, in oversampling mode, the system first increases the basic gain to 2.0 times. Secondly, the sampling period is dynamically adjusted, and the sampling period is calculated in real time according to the detection frequency. For example, for a 500kHz signal, the ADC captures data at a 4-fold oversampling rate, that is, it samples at 2MHz. The raw data output by the ADC is input into a 31-order Hanning window FIR filter to suppress out-of-band noise; the filtered data performs 3:1 mean extraction, that is, the arithmetic average of each two adjacent points is taken to generate a new sequence. The output signal signal-to-noise ratio is calculated in real time. If the signal-to-noise ratio is lower than 40dB, the extraction ratio is dynamically increased to 2:1. If the signal-to-noise ratio is higher than 60dB, the 3:1 extraction is restored or reduced to 4:1 extraction. This embodiment uses oversampling and FIR filtering to suppress high-frequency noise, and optimizes the signal reconstruction quality based on signal-to-noise ratio feedback to improve the reliability of high-frequency signals.

[0055] It is worth mentioning that it also includes: determining whether the second voltage information is lower than the third voltage information; If so, the reverse voltage protection is triggered and the recovery diode is turned on; Calculating a voltage change rate according to the second voltage information or the third voltage information; If the voltage change rate exceeds a preset change rate threshold; The surge protection is triggered, activating the TVS tube and constant current diode to form a voltage clamping combination.

[0056] It should be noted that this embodiment provides a protection mechanism for the input power supply. In this embodiment, the protection mechanism performs dual-channel monitoring in parallel. By continuously comparing the PUL+ and PUL- voltages, when PUL- is higher than PUL+ for 100μs, the hardware reverse protection circuit is triggered, and a low-impedance bypass channel is formed by instantaneously turning on the parallel fast recovery diode. By continuously calculating the voltage change rate, when a sudden change that exceeds the safety threshold is detected, the TVS tube clamp circuit is activated to absorb the surge energy, and an interrupt signal is sent to the background at the same time. The background records the event type and timestamp, and generates a structured fault log, including but not limited to voltage extremes, duration, and number of protection actions. This embodiment adopts differentiated processing strategies for reverse connection and surge, respectively, to improve the stability of the high-speed optocoupler isolation drive circuit during operation.

[0057] It is worth mentioning that it also includes: When power mode switching is detected, adjusting the target current information based on a preset current ramp transition algorithm; When the first frequency information step exceeds a preset third frequency threshold, adjusting the first gain information based on a preset third reference gain; When the first temperature information exceeds a preset second temperature threshold, the differential coefficient of the PID algorithm is increased based on a preset temperature coefficient mapping table.

[0058] It should be noted that this embodiment provides an adaptive optimization mechanism. As an implementation method, the adaptive optimization mechanism quality assurance includes triple dynamic optimization. When the power mode is switched, for example, from 24V mode to 5V mode, the current ramp transition is started, and the target current is linearly reduced from 15mA to 10mA in steps of 1mA / 0.1ms within 0.5ms to avoid sudden changes in the optocoupler current. Changes in adjacent pulse cycles are detected through real-time monitoring. If a sudden change is identified, for example, the frequency change value exceeds 30%, a 1.2x transition gain is temporarily enabled, and after maintaining for several cycles, it is switched to the target mode gain. When the temperature is monitored to exceed 80°C, the temperature coefficient mapping table is called to increase the PID differential coefficient to enhance system damping. All adjustment parameters are monitored by a watchdog mechanism. If the system is not stable within 10ms under the new parameters, it rolls back to the safe configuration and triggers an optimization failure alarm. The current ramp dynamic optimization mechanism provided in this embodiment eliminates the risk of current sudden change when the optocoupler is turned on; the transition gain optimization mechanism prevents signal overshoot during frequency jumps; and the temperature dynamic adjustment PID parameter mechanism maintains control stability.

[0059] The third aspect of the present invention provides a computer-readable storage medium, which includes an adaptive high-speed pulse isolation driving method program for multiple power supplies. When the adaptive high-speed pulse isolation driving method program for multiple power supplies is executed by a processor, the steps of the adaptive high-speed pulse isolation driving method for multiple power supplies as described in any one of the above items are implemented.

[0060] In summary, the present invention provides an adaptive high-speed pulse isolation driving method, system and medium for multiple power supplies. First, based on periodic voltage sampling, the power supply mode is automatically identified and the corresponding target current and basic gain are matched; secondly, closed-loop PID control is used to adjust the constant current diode drive signal in real time to ensure the stability of the optocoupler current within a wide voltage range; finally, based on the pulse frequency, the working mode is intelligently switched, including normal mode, fast mode and oversampling mode, and the gain coefficient is dynamically adjusted to compensate for high-frequency attenuation; the present invention solves the problems of large current fluctuation and poor high-frequency response through a dynamic adjustment algorithm, is compatible with wide voltage input, and at the same time meets the distortion-free transmission of high-speed pulse signals, has strong anti-interference ability, and significantly improves the accuracy and reliability of signal isolation.

[0061] If the functions are implemented as software modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or the portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage media include various media capable of storing program code, such as USB flash drives, mobile hard drives, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical disks.

[0062] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.

Claims

1. An adaptive high-speed pulse isolation driving method for multiple power supplies, characterized in that: The method comprises: Based on the first sampling period, measuring and obtaining first voltage information; Determine a power supply mode according to the first voltage information, and obtain target current information and first gain information; acquiring first current information; Obtaining a first offset adjustment amount according to a deviation between the first current information and the target current information; adjusting the constant current drive control signal according to the first bias adjustment amount; obtaining first frequency information; Determining whether the first frequency information is greater than a preset first frequency threshold; If not, enter normal mode; If so, determining whether the first frequency information is greater than a preset second frequency threshold; If not, enter the fast mode; If so, enter oversampling mode; The first gain information is adjusted according to the frequency mode.

2. The adaptive high-speed pulse isolation driving method for multiple power supplies according to claim 1, characterized in that: The measuring and obtaining of the first voltage information is specifically as follows: The differential sampling circuit is used to collect voltages of the first input pin and the second input pin of the high-speed optocoupler to obtain second voltage information and third voltage information; Based on a preset smoothing window, performing sliding average processing on the second voltage information and the third voltage information to calculate a mean value and a stability coefficient; If the stability coefficient is greater than a preset stability threshold, the first voltage information is obtained according to the difference between the second voltage information mean and the third voltage information mean.

3. The adaptive high-speed pulse isolation driving method for multiple power supplies according to claim 1, characterized in that: The first offset adjustment amount is obtained according to the deviation between the first current information and the target current information, specifically: Calculating a deviation between the first current information and the target current information to obtain a first current deviation; Based on a preset adjustment period, obtaining a current deviation integral value and a current deviation differential value according to the first current deviation; Based on a preset PID control algorithm, a first offset adjustment amount is obtained according to the first current deviation, the current deviation integral value, and the current deviation differential value.

4. The adaptive high-speed pulse isolation driving method for multiple power supplies according to claim 1, characterized in that: After obtaining the first offset adjustment value, the method further includes: obtaining first temperature information; Determining whether the first temperature information exceeds a preset first temperature threshold; If yes, obtaining a first temperature compensation coefficient based on a preset temperature compensation mapping curve and according to the first temperature information; The first offset adjustment amount is adjusted according to the first temperature compensation coefficient.

5. The adaptive high-speed pulse isolation driving method for multiple power supplies according to claim 1, characterized in that: Entering the fast mode specifically includes: Adjusting the first gain information to a preset first reference gain; Lowering the hysteresis voltage of the high-speed optocoupler to a preset first reference voltage; increasing the comparator bias current of the high-speed optocoupler to a preset first reference current; Disconnect the filter capacitor network from the input pin of the high-speed optocoupler.

6. The adaptive high-speed pulse isolation driving method for multiple power supplies according to claim 1, characterized in that: Entering the oversampling mode specifically includes: Adjusting the first gain information to a preset second reference gain; Adjusting the first sampling period according to the first frequency information and a preset sampling multiple; Reconstruct the sampled waveform based on the preset FIR filter and mean extraction algorithm; According to the reconstructed sampling waveform, the signal-to-noise ratio information is obtained; According to the signal-to-noise ratio information, a decimation coefficient of the mean decimation algorithm is adjusted.

7. An adaptive high-speed pulse isolation drive system for multiple power supplies, characterized in that: The system includes a memory and a processor. The memory includes a program for an adaptive high-speed pulse isolation driving method for multiple power supplies. When the program is executed by the processor, the following steps are implemented: Based on the first sampling period, measuring and obtaining first voltage information; Determine a power supply mode according to the first voltage information, and obtain target current information and first gain information; acquiring first current information; Obtaining a first offset adjustment amount according to a deviation between the first current information and the target current information; adjusting the constant current drive control signal according to the first bias adjustment amount; obtaining first frequency information; Determining whether the first frequency information is greater than a preset first frequency threshold; If not, enter normal mode; If so, determining whether the first frequency information is greater than a preset second frequency threshold; If not, enter the fast mode; If so, enter oversampling mode; The first gain information is adjusted according to the frequency mode.

8. The adaptive high-speed pulse isolation drive system for multiple power supplies according to claim 7, characterized in that: The measuring and obtaining of the first voltage information is specifically as follows: The differential sampling circuit is used to collect voltages of the first input pin and the second input pin of the high-speed optocoupler to obtain second voltage information and third voltage information; Based on a preset smoothing window, performing sliding average processing on the second voltage information and the third voltage information to calculate a mean value and a stability coefficient; If the stability coefficient is greater than a preset stability threshold, the first voltage information is obtained according to the difference between the second voltage information mean and the third voltage information mean.

9. The adaptive high-speed pulse isolation drive system for multiple power supplies according to claim 7, characterized in that: The first offset adjustment amount is obtained according to the deviation between the first current information and the target current information, specifically: Calculating a deviation between the first current information and the target current information to obtain a first current deviation; Based on a preset adjustment period, obtaining a current deviation integral value and a current deviation differential value according to the first current deviation; Based on a preset PID control algorithm, a first offset adjustment amount is obtained according to the first current deviation, the current deviation integral value, and the current deviation differential value.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: The computer-readable storage medium includes an adaptive high-speed pulse isolation driving method program for multiple power supplies. When the adaptive high-speed pulse isolation driving method program for multiple power supplies is executed by a processor, the steps of the adaptive high-speed pulse isolation driving method for multiple power supplies as described in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Permanent magnet synchronous motor current high-precision sampling prediction method based on current oversampling

    CN116418265A

  • Pulse transformer circuit for isolating electrical signals

    US5499176A