A method and circuit for generating high time resolution modulated pulses
By calculating the modulation pulse period and dead time, and combining the control module and delay module, the problem of precise control of high-frequency and high duty cycle resolution modulation pulses in the prior art was solved, and the generation of high time resolution modulation pulses was realized.
Patent Information
- Application Number
- CN202310153410.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-22
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2043-02-22
AI Technical Summary
Existing technologies cannot achieve precise control in the generation of modulation pulses with high frequency resolution and high duty cycle resolution, especially in applications such as radio frequency power supplies.
By calculating the modulation pulse period, the first dead time, and the last dead time, the counter value and the delay value are determined. The control module and the delay module are used to generate a high time resolution modulation pulse, which is then combined with the phase-locked loop module for precise control.
It achieves the minimum time resolution for simultaneously adjusting frequency and duty cycle, generating modulation pulses with high frequency and high duty cycle resolution. The structure is simple and stable, avoiding the complexity of wiring time compensation.
Smart Images

Figure CN116318067B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of modulation pulses, and more specifically to a method and circuit for generating high time resolution modulation pulses. Background Technology
[0002] With the development of semiconductor technology, the trend of power supply digitalization has accelerated significantly. Power supply control has evolved from analog control and mixed analog-digital control to a fully digital control stage. Digital control can flexibly adjust control strategies according to different application scenarios, offering strong scalability and widespread application in industry. The modulation methods of digital power supply control mainly include pulse width modulation (PWM), pulse frequency modulation (PFM), pulse density modulation (PDM), and hybrid modulation. Hybrid modulation is a combination of PWM and PFM, with its switching period and pulse width being variable and adjustable. However, the time resolution of pulses generated by digital control is limited by the system clock speed (generally below 400MHz), making it unsuitable for applications requiring high modulation pulse time resolution. To improve the time accuracy of modulation pulses, many new methods have emerged in recent years, primarily based on DSPs and FPGAs. Currently, high-precision modulation pulses are mainly used in DC / DC switching power supplies, focusing primarily on improving the duty cycle control accuracy of PWM, with fewer methods for improving its frequency control accuracy.
[0003] High-resolution PWM blocks (HRPWM) modules in DSPs can achieve PWM duty cycle control accuracy of 150ps when the output PWM frequency is greater than 250kHz using a 100MHz clock. However, they cannot achieve precise duty cycle control across the entire range, cannot precisely control the dead zone in complementary signals, and are slow to adjust, requiring several clock cycles to respond. Their frequency adjustment step size is also limited to one clock cycle (10ns at 100MHz). FPGAs generate modulation pulses with fast response times, flexible period and duty cycle adjustments, and consistent accuracy at lower frequencies, but they are more expensive than DSPs. Currently, based on published research, methods for generating high-precision modulation pulses using FPGAs mainly employ clock counting and delay chains, phase-locked loops, and DELAY modules, primarily for high-precision duty cycle control. For frequency control, the minimum adjustment unit is still one clock cycle. Therefore, current control methods cannot solve the problem for applications requiring high-frequency resolution modulation pulses, such as RF power supplies. Summary of the Invention
[0004] To address the aforementioned shortcomings in the prior art, this invention provides a high time resolution modulation pulse generation method that can simultaneously generate modulation pulses with high frequency resolution and high duty cycle resolution.
[0005] To achieve the above-mentioned objectives, the technical solution adopted by this invention is as follows:
[0006] On one hand, this invention proposes a method for generating high time resolution modulated pulses, comprising the following steps:
[0007] S1. Determine the modulation pulse period, the first dead time, and the last dead time;
[0008] S2. Calculate the corresponding counter value and delay value based on the modulation pulse period, the first dead time and the last dead time in step S1.
[0009] S3. Determine the output pulse signal based on the counter value in step S2;
[0010] S4. Based on the delay value in step S2 and the output pulse signal in step S3, generate a high time resolution modulation pulse.
[0011] Furthermore, step S2 includes the following sub-steps:
[0012] S21. Based on the modulation pulse period, the first dead time, and the last dead time in step S1, calculate the counter value and the delay value at the moment the upper bridge arm rises.
[0013] S22. Based on the delay value of the upper bridge arm rising at the time of step S21, calculate the counter value and delay value of the upper bridge arm falling at the time of step S21.
[0014] S23. Based on the counter value and delay value at the moment the upper arm descends in sub-step S22, calculate the counter value and delay value at the moment the lower arm rises.
[0015] S24. Based on the counter value and delay value at the moment the lower bridge arm rises in sub-step S23, calculate the counter value and delay value at the moment the lower bridge arm descends.
[0016] Further, step S21 includes the following sub-steps:
[0017] S211. Convert the modulation pulse period in step S1 into the corresponding counter value of the modulation pulse period, expressed as:
[0018] CNT_PERIOD = PERIOD / tclk
[0019] Where: CNT_PERIOD is the counter value corresponding to the modulation pulse period, PERIOD is the modulation pulse period, tclk is the system clock period, and the symbol " / " is the integer division operation;
[0020] S212. Convert the modulation pulse period in step S1 into a value modulo the system clock period, and save it as an intermediate register value, represented as:
[0021] temp_time = PERIOD%tclk
[0022] Where: temp_time is the value of the intermediate register, and the symbol "%" represents the modulo operation;
[0023] S213. Based on the before dead time and after dead time in step S1, calculate the high-level time value of the modulation pulse, expressed as:
[0024] dutycycle=(PERIOD-DEADTIME1-DEADTIME2) / 2
[0025] Where: dutycycle is the high-level time of the modulation pulse, DEADTIME1 is the first dead time, and DEADTIME2 is the last dead time;
[0026] S214. Assign the next delay time value calculated in the previous calculation cycle to the delay value at the moment the upper bridge arm rises.
[0027] S215. Summate the intermediate register value in sub-step S212 and the delay value in sub-step S214 to obtain the summation result;
[0028] S216. Determine whether the summation result in sub-step S215 is greater than or equal to one system clock cycle; if so, increment the counter value corresponding to the modulation pulse period in sub-step S211 and proceed to sub-step S217; otherwise, proceed to sub-step S218.
[0029] S217. Update the next delay time value according to the first calculation formula, expressed as:
[0030] t1_delay_next=temp_time+TAP_NUM1-tclk
[0031] Where: t1_delay_next is the next delay time value, and TAP_NUM1 is the delay value at the moment the upper bridge arm rises;
[0032] S218. Update the next delay time according to the second calculation formula, expressed as:
[0033] t1_delay_next=temp_time+TAP_NUM1;
[0034] S219. Set the counter value to 0 at the moment the upper bridge arm rises.
[0035] Furthermore, step S22 includes the following sub-steps:
[0036] S221. Based on the delay value of the upper arm's ascent time in sub-step S21, calculate the counter value of the upper arm's descent time, expressed as:
[0037] CNT_VALUE2=(TAP_NUM1+dutycycle) / tclk
[0038] Where: CNT_VALUE2 is the counter value at the moment the upper bridge arm descends;
[0039] S222. Based on the delay value of the upper arm's ascent time in sub-step S21, calculate the delay value of the upper arm's descent time, expressed as:
[0040] TAP_NUM2=(dutycycle+TAP_NUM1)%tclk
[0041] Where: TAP_NUM2 is the delay value at the moment of descent of the upper bridge arm.
[0042] Furthermore, step S23 includes the following sub-steps:
[0043] S231. Based on the counter value and delay value at the moment the upper arm descends in sub-step S22, calculate the counter value at the moment the lower arm rises, expressed as:
[0044] CNT_VALUE3=CNT_VALUE2+(DEADTIME1+TAP_NUM2) / tclk
[0045] Where: CNT_VALUE3 is the counter value at the moment the lower bridge arm rises;
[0046] S232. Based on the delay value of the upper arm descending, calculate the delay value of the lower arm rising, expressed as:
[0047] TAP_NUM3=(DEADTIME1+TAP_NUM2)%tclk
[0048] Where: TAP_NUM3 is the delay value at the moment the lower bridge arm rises.
[0049] Furthermore, step S24 includes the following sub-steps:
[0050] S241. Based on the counter value and delay value at the time of the lower bridge arm's ascent in sub-step S23, calculate the counter value at the time of the lower bridge arm's descent, expressed as:
[0051] CNT_VALUE4=CNT_VALUE3+(TAP_NUM3+dutycycle) / tclk
[0052] Where: CNT_VALUE4 is the counter value at the moment the lower bridge arm descends;
[0053] S242. Based on the delay value of the lower bridge arm's ascent time in sub-step S23, calculate the delay value of the lower bridge arm's descent time, expressed as:
[0054] TAP_NUM4=(TAP_NUM3+dutycycle)%tclk
[0055] Where: TAP_NUM4 is the delay value at the moment of the lower bridge arm descent.
[0056] On the other hand, the present invention proposes a high time resolution modulation pulse generation circuit applying the method described above, comprising:
[0057] The control module, which is connected to both the phase-locked loop module and the delay module, is used to calculate the counter value and the delay value based on the input modulation pulse period, the first dead time, and the last dead time. It generates an output pulse signal based on the counter value and outputs the output pulse signal and the delay value to the delay module.
[0058] The delay module, connected to the control module and the latch module, is used to receive the output pulse signal and delay value from the control module, and to control the latch module to be set to 1 or 0 through the output pulse signal and delay value.
[0059] The latch module, connected to the delay module, is used to output the modulation pulse signal and generate a high time resolution modulation pulse.
[0060] Furthermore, the control module is used to determine the input modulation pulse period, before dead time, and after dead time based on the input.
[0061] Calculate the counter value and delay value at the moment the upper bridge arm rises, generate the output pulse signal at the moment the upper bridge arm rises based on the counter value, and output the output pulse signal and delay value at the moment the upper bridge arm rises to the delay module.
[0062] Calculate the counter value and delay value at the moment of upper arm descent, generate the output pulse signal at the moment of upper arm descent based on the counter value, and output the output pulse signal and delay value at the moment of upper arm descent to the delay module.
[0063] Calculate the counter value and delay value at the moment the lower bridge arm rises, generate the output pulse signal at the moment the lower bridge arm rises based on the counter value, and output the output pulse signal and delay value at the moment the lower bridge arm rises to the delay module.
[0064] Calculate the counter value and delay value at the moment the lower bridge arm descends, generate the output pulse signal at the moment the lower bridge arm descends based on the counter value, and output the output pulse signal and delay value at the moment the lower bridge arm descends to the delay module.
[0065] Furthermore, the delay module includes:
[0066] The first delay module is used to receive the output pulse signal and delay value at the moment the upper bridge arm rises from the control module, and control the first latch module to be set to 1 by the output pulse signal and delay value at the moment the upper bridge arm rises.
[0067] The second delay module is used to receive the output pulse signal and delay value of the upper bridge arm descending moment from the control module, and control the first latch module to be set to 0 through the output pulse signal and delay value of the upper bridge arm descending moment.
[0068] The third delay module is used to receive the output pulse signal and delay value at the time of the lower bridge arm's ascent from the control module, and to control the second latch module to be set to 1 by the output pulse signal and delay value at the time of the lower bridge arm's ascent.
[0069] The fourth delay module is used to receive the output pulse signal and delay value of the lower bridge arm descending moment from the control module, and to control the second latch module to be set to 0 by the output pulse signal and delay value of the lower bridge arm descending moment.
[0070] Furthermore, the latch module includes:
[0071] The first latch module is connected to the pulse signal output interface of the first delay module and the second delay module, and is used to control the output of the upper bridge arm modulated pulse signal;
[0072] The second latch module is connected to the pulse signal output interface of the third and fourth delay modules and is used to control the output of the lower bridge arm modulation pulse signal.
[0073] The beneficial effects of this invention are as follows:
[0074] (1) The solution proposed in this invention can simultaneously adjust the frequency and duty cycle according to the minimum time resolution, and can simultaneously generate modulation pulses with high frequency resolution and high duty cycle resolution.
[0075] (2) The present invention has a simple and stable structure, and compared with the delay chain type, there is no need to consider the time compensation of wiring. Attached Figure Description
[0076] Figure 1 A flowchart of a high time-resolution modulation pulse generation method;
[0077] Figure 2 This is a circuit diagram of a high time resolution modulation pulse generation circuit applied to the above method;
[0078] Figure 3 This is a circuit diagram of a half-bridge switch.
[0079] Figure 4 This is the circuit diagram for the full-bridge switching transistors;
[0080] Figure 5 Generate modulation pulse timing diagrams using common methods;
[0081] Figure 6 The timing diagram for generating modulation pulses is provided for this invention. Detailed Implementation
[0082] The specific embodiments of the present invention are described below to enable those skilled in the art to understand the present invention. However, it should be understood that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the present invention as defined and determined by the appended claims. All inventions utilizing the concept of the present invention are protected.
[0083] like Figure 1 As shown, a method for generating high time resolution modulated pulses includes steps S1-S4:
[0084] S1. Determine the modulation pulse period, the first dead time, and the last dead time.
[0085] In an optional embodiment of the present invention, the input quantities mainly include the modulation pulse period to be generated, the first dead time, the last dead time, a clock signal, an enable signal, and a reset signal. The enable signal is used to control the start and stop of the modulation pulse. The reset signal is used for initial value setting and reset. The specific values of the input quantities can be set as needed. For example, if a 4MHz signal with a dead time of 50ns needs to be generated, the period can be set to 250,000ps, the first dead time to 50,000ps, the last dead time to 50,000ps, and the clock signal can be set to 200MHz.
[0086] S2. Calculate the counter value and delay value based on the modulation pulse period, the first dead time and the last dead time in step S1.
[0087] In an optional embodiment of the present invention, after the modulation pulse period, the first dead time and the last dead time are input to the control module, the counter value and delay value of the upper bridge arm rising, the counter value and delay value of the upper bridge arm falling, the counter value and delay value of the lower bridge arm rising, and the counter value and delay value of the lower bridge arm falling are calculated.
[0088] Step S2 includes the following sub-steps:
[0089] S21. Based on the modulation pulse period, the first dead time, and the last dead time in step S1, calculate the counter value and the delay value at the moment the upper bridge arm rises.
[0090] Step S21 includes the following sub-steps:
[0091] S211. Convert the modulation pulse period in step S1 into the corresponding counter value of the modulation pulse period, expressed as:
[0092] CNT_PERIOD = PERIOD / tclk
[0093] Where: CNT_PERIOD is the counter value corresponding to the modulation pulse period, PERIOD is the modulation pulse period, tclk is the system clock period, and the symbol " / " is an integer division operation, with the remainder being discarded.
[0094] Specifically, the present invention converts the input modulation pulse period into a modulation pulse period counter value, which is rounded down, and any time less than one counter value is discarded.
[0095] S212. Convert the modulation pulse period in step S1 into a value modulo the system clock period, and save it as an intermediate register value, represented as:
[0096] temp_time = PERIOD%tclk
[0097] Where temp_time is the value of the intermediate register, and the symbol "%" represents the modulo operation.
[0098] Specifically, the present invention takes the modulated pulse period time modulated by a counter period time and stores the result in a register to obtain an intermediate register value.
[0099] S213. Based on the before dead time and after dead time in step S1, calculate the high-level time value of the modulation pulse, expressed as:
[0100] dutycycle=(PERIOD-DEADTIME1-DEADTIME2) / 2
[0101] Where: dutycycle is the high-level time value of the modulation pulse, DEADTIME1 is the first dead time, and DEADTIME2 is the last dead time.
[0102] S214. Assign the next delay time value calculated in the previous calculation cycle to the delay value at the moment the upper bridge arm rises.
[0103] Specifically, the present invention assigns the next delay time value calculated in the previous calculation cycle to the delay value at the moment of the upper bridge arm rising. In the initial cycle, the delay value at the moment of the upper bridge arm rising is 0, and a reset operation is performed on it at the initial moment to set it to 0.
[0104] S215. Summing the intermediate register value in sub-step S212 and the delay value in sub-step S214 yields the summation result.
[0105] If the summation result in step S216 is greater than or equal to one system clock cycle, then increment the counter value corresponding to the modulation pulse period in step S211 and proceed to step S217; otherwise, proceed to step S218.
[0106] S217. Update the next delay time value according to the first calculation formula, expressed as:
[0107] t1_delay_next=temp_time+TAP_NUM1-tclk
[0108] Where: t1_delay_next is the next delay time value, and TAP_NUM1 is the delay value at the moment the upper bridge arm rises.
[0109] S218. Update the next delay time according to the second calculation formula, expressed as:
[0110] t1_delay_next=temp_time+TAP_NUM1.
[0111] S219. Set the counter value to 0 at the moment the upper bridge arm rises.
[0112] S22. Based on the delay value of the upper arm rising at the time of step S21, calculate the counter value and delay value of the upper arm falling at the time of step S21.
[0113] Step S22 includes the following sub-steps:
[0114] S221. Based on the delay value of the upper arm's ascent time in sub-step S21, calculate the counter value of the upper arm's descent time, expressed as:
[0115] CNT_VALUE2=(TAP_NUM1+dutycycle) / tclk
[0116] Where: CNT_VALUE2 is the counter value at the moment the upper arm descends.
[0117] S222. Based on the delay value of the upper arm's ascent time in sub-step S21, calculate the delay value of the upper arm's descent time, expressed as:
[0118] TAP_NUM2=(dutycycle+TAP_NUM1)%tclk
[0119] Where: TAP_NUM2 is the delay value at the moment of descent of the upper bridge arm.
[0120] S23. Based on the counter value and delay value at the moment the upper arm descends in sub-step S22, calculate the counter value and delay value at the moment the lower arm rises.
[0121] Step S23 includes the following sub-steps:
[0122] S231. Based on the counter value and delay value at the moment the upper arm descends in sub-step S22, calculate the counter value at the moment the lower arm rises, expressed as:
[0123] CNT_VALUE3=CNT_VALUE2+(DEADTIME1+TAP_NUM2) / tclk
[0124] Where: CNT_VALUE3 is the counter value at the moment the lower bridge arm rises.
[0125] S232. Based on the delay value of the upper arm descending, calculate the delay value of the lower arm rising, expressed as:
[0126] TAP_NUM3=(DEADTIME1+TAP_NUM2)%tclk
[0127] Where: TAP_NUM3 is the delay value at the moment the lower bridge arm rises.
[0128] S24. Based on the counter value and delay value at the moment the lower bridge arm rises in sub-step S23, calculate the counter value and delay value at the moment the lower bridge arm descends.
[0129] Step S24 includes the following sub-steps:
[0130] S241. Based on the counter value and delay value at the time of the lower bridge arm's ascent in sub-step S23, calculate the counter value at the time of the lower bridge arm's descent, expressed as:
[0131] CNT_VALUE4=CNT_VALUE3+(TAP_NUM3+dutycycle) / tclk
[0132] Where: CNT_VALUE4 is the counter value at the moment the lower bridge arm descends.
[0133] S242. Based on the delay value of the lower bridge arm's ascent time in sub-step S23, calculate the delay value of the lower bridge arm's descent time, expressed as:
[0134] TAP_NUM4=(TAP_NUM3+dutycycle)%tclk
[0135] Where: TAP_NUM4 is the delay value at the moment of the lower bridge arm descent.
[0136] S3. Determine the output pulse signal based on the counter value in step S2.
[0137] In an optional embodiment of the present invention, the control module generates output pulse signals for the time when the upper bridge arm rises, the time when the upper bridge arm falls, the time when the lower bridge arm rises, and the time when the lower bridge arm falls, based on the counter values for the calculated time when the upper bridge arm rises, the time when the upper bridge arm falls, the time when the lower bridge arm rises, and the time when the lower bridge arm falls.
[0138] S4. Based on the delay value in step S2 and the output pulse signal in step S3, generate a high time resolution modulation pulse.
[0139] In an optional embodiment of the present invention, the first delay module receives the output pulse signal and delay value of the upper bridge arm rising at the time of the control module, and controls the first latch module to be set to 1 based on the output pulse signal and delay value of the upper bridge arm rising at the time of the control module; the second delay module receives the output pulse signal and delay value of the upper bridge arm falling at the time of the control module, and controls the first latch module to be set to 0 based on the output pulse signal and delay value of the upper bridge arm falling at the time of the control module; the third delay module receives the output pulse signal and delay value of the lower bridge arm rising at the time of the control module, and controls the second latch module to be set to 1 based on the output pulse signal and delay value of the lower bridge arm rising at the time of the control module; the fourth delay module receives the output pulse signal and delay value of the lower bridge arm falling at the time of the control module, and controls the second latch module to be set to 0 based on the output pulse signal and delay value of the lower bridge arm falling at the time of the control module, thereby generating a high-precision modulation pulse.
[0140] like Figure 2As shown, a high time-resolution modulated pulse generation circuit applied to the above method includes a phase-locked loop module, a precise delay control module, a control module, a delay module, and a latch module, as detailed below:
[0141] The first interface of the phase-locked loop module is connected to the clock interface of the control module, and the second interface is connected to the reference clock interface of the precision delay control module. The phase-locked loop module is used to divide the system clock.
[0142] like Figure 2 As shown, the phase-locked loop (PLL) module is the PLL module in the figure. In this invention, the PLL module can be either a PLL module or an MMCM module. The first interface of the PLL module is CLK1, and the second interface is CLK2.
[0143] The reference clock interface of the precision delay control module is connected to the second interface of the phase-locked loop module for precision calibration of the delay module.
[0144] like Figure 2 As shown, the precise delay control module is the IDELAYCTRL module in the figure, and the reference clock interface is REF_CLK.
[0145] The control module, which is connected to both the phase-locked loop module and the delay module, is used to calculate the counter value and the delay value based on the input modulation pulse period, the first dead time, and the last dead time. It then generates an output pulse signal based on the counter value and outputs the output pulse signal and the delay value to the delay module.
[0146] In an optional embodiment of the present invention, the clock interface of the control module is connected to the first interface of the phase-locked loop module; the first pulse signal interface of the control module is connected to the pulse signal input interface of the first delay module; the first delay value interface of the control module is connected to the counting input interface of the first delay module; the second pulse signal interface of the control module is connected to the pulse signal input interface of the second delay module; the second delay value interface of the control module is connected to the counting input interface of the second delay module; the third pulse signal interface of the control module is connected to the pulse signal input interface of the third delay module; the third delay value interface of the control module is connected to the counting input interface of the third delay module; and the fourth pulse signal interface of the control module is connected to the pulse signal input interface of the fourth delay module; the fourth delay value interface of the control module is connected to the counting input interface of the fourth delay module.
[0147] Specifically, the control module is Figure 2The CONCTRL module in the control module has the following interface: clock interface CLK, first pulse signal interface DATA1, first delay value interface TAP1, second pulse signal interface DATA2, second delay value interface TAP2, third pulse signal interface DATA3, third delay value interface TAP3, fourth pulse signal interface DATA4, and fourth delay value interface TAP4.
[0148] The control module is used to calculate the counter value and the delay value based on the input modulation pulse period, the first dead time, and the last dead time.
[0149] This invention calculates the counter value and delay value at the moment the upper bridge arm rises, generates an output pulse signal at the moment the upper bridge arm rises based on the counter value, and outputs the output pulse signal and delay value at the moment the upper bridge arm rises to the delay module.
[0150] Specifically, the first pulse signal interface of the control module is connected to the pulse signal input interface of the first delay module, and outputs the output pulse signal at the moment the upper bridge arm rises to the first delay module; the first delay value interface of the control module is connected to the counting input interface of the first delay module, and outputs the delay value at the moment the upper bridge arm rises to the first delay module.
[0151] This invention calculates the counter value and delay value at the moment of descent of the upper bridge arm, generates an output pulse signal at the moment of descent of the upper bridge arm based on the counter value, and outputs the output pulse signal and delay value at the moment of descent of the upper bridge arm to the delay module.
[0152] Specifically, the second pulse signal interface of the control module is connected to the pulse signal input interface of the second delay module, and outputs the output pulse signal at the moment of the upper bridge arm's descent to the second delay module; the second delay value interface of the control module is connected to the counting input interface of the second delay module, and outputs the delay value at the moment of the upper bridge arm's descent to the second delay module.
[0153] This invention calculates the counter value and delay value at the moment the lower bridge arm rises, generates an output pulse signal at the moment the lower bridge arm rises based on the counter value, and outputs the output pulse signal and delay value at the moment the lower bridge arm rises to the delay module.
[0154] Specifically, the third pulse signal interface of the control module is connected to the pulse signal input interface of the third delay module, and outputs the output pulse signal at the moment the lower bridge arm rises to the third delay module; the third delay value interface of the control module is connected to the counting input interface of the third delay module, and outputs the delay value at the moment the lower bridge arm rises to the third delay module.
[0155] This invention calculates the counter value and delay value at the moment of lower bridge arm descent, generates an output pulse signal at the moment of lower bridge arm descent based on the counter value, and outputs the output pulse signal and delay value at the moment of lower bridge arm descent to the delay module.
[0156] Specifically, the fourth pulse signal interface of the control module is connected to the pulse signal input interface of the fourth delay module, and outputs the output pulse signal at the moment of the lower bridge arm descent to the fourth delay module; the fourth delay value interface of the control module is connected to the counting input interface of the fourth delay module, and outputs the delay value at the moment of the lower bridge arm descent to the fourth delay module.
[0157] The delay module, connected to the control module and the latch module, is used to receive the output pulse signal and delay value from the control module, and to control the latch module to be set to 1 or 0 through the output pulse signal and delay value.
[0158] The delay module includes:
[0159] The first delay module is used to receive the output pulse signal and delay value of the upper bridge arm rising at the time of the control module, and to control the first latch module to be set to 1 by the output pulse signal and delay value of the upper bridge arm rising at the time of the control module.
[0160] In an optional embodiment of the present invention, the counting input interface of the first delay module is connected to the first delay value interface of the control module, the pulse signal input interface of the first delay module is connected to the first pulse signal interface of the control module, and the pulse signal output interface of the first delay module is connected to the first latch module.
[0161] Specifically, the first delay module is selected. Figure 2 The IDELAY_1 module has a counting input interface of CNTVALUENIN, a pulse signal input interface of DATAIN, and a pulse signal output interface of DATAOUT.
[0162] The second delay module is used to receive the output pulse signal and delay value of the upper bridge arm descending at the time of the control module, and to control the first latch module to be set to 0 by the output pulse signal and delay value of the upper bridge arm descending at the time of the control module.
[0163] In an optional embodiment of the present invention, the counting input interface of the second delay module is connected to the second delay value interface of the control module, the pulse signal input interface of the second delay module is connected to the second pulse signal interface of the control module, and the pulse signal output interface of the second delay module is connected to the first latch module.
[0164] Specifically, the counting input interface is CNTVALUENIN, the pulse signal input interface is DATAIN, the pulse signal output interface is DATAOUT, and the second delay module is selected. Figure 2 The IDELAY_2 module in [the context of the project].
[0165] The third delay module is used to receive the output pulse signal and delay value at the moment the lower bridge arm rises from the control module, and to control the second latch module to be set to 1 by the output pulse signal and delay value at the moment the lower bridge arm rises.
[0166] In an optional embodiment of the present invention, the counting input interface of the third delay module is connected to the third delay value interface of the control module, the pulse signal input interface of the third delay module is connected to the third pulse signal interface of the control module, and the pulse signal output interface of the third delay module is connected to the second latch module.
[0167] Specifically, the counting input interface is CNTVALUENIN, the pulse signal input interface is DATAIN, the pulse signal output interface is DATAOUT, and the third delay module is selected. Figure 2 The IDELAY_3 module in [the context of the project].
[0168] The fourth delay module is used to receive the output pulse signal and delay value of the lower bridge arm descending moment from the control module, and to control the second latch module to be set to 0 by the output pulse signal and delay value of the lower bridge arm descending moment.
[0169] In an optional embodiment of the present invention, the counting input interface of the fourth delay module is connected to the fourth delay value interface of the control module, the pulse signal input interface of the fourth delay module is connected to the fourth pulse signal interface of the control module, and the pulse signal output interface of the fourth delay module is connected to the second latch module.
[0170] Specifically, the counting input interface is CNTVALUENIN, the pulse signal input interface is DATAIN, the pulse signal output interface is DATAOUT, and the fourth delay module is selected. Figure 2 The IDELAY_4 module in [the context of the project].
[0171] The latch module, connected to the delay module, is used to output the modulation pulse signal and generate a high time resolution modulation pulse.
[0172] In an optional embodiment of the present invention, the high time resolution modulation pulse output by the latch module can drive a half-bridge switch or a full-bridge switch after passing through the driving circuit. The switch can be an IGBT, a MOSFET, or other switch that can be driven by PWM.
[0173] like Figure 3As shown, for the half-bridge structure, the high time-resolution modulation pulse output by the latch module can control the half-bridge switching transistors after passing through the driver circuit. Figure 2 In this configuration, the upper bridge arm PWM can control switch S1, and the lower bridge arm PWM can control switch S2. Similarly, by changing the connection method, the upper bridge arm PWM can control switch S2, and the lower bridge arm PWM can control switch S1.
[0174] like Figure 4 As shown, for the full-bridge structure, the high time-resolution modulation pulse output by the latch module can control the full-bridge switching transistors after passing through the driver circuit. Figure 2 The upper bridge arm PWM can control switches S1 and S4, while the lower bridge arm PWM can control switches S2 and S3. Similarly, with a different connection method, the lower bridge arm PWM can control switches S1 and S4, and the upper bridge arm PWM can control switches S2 and S3.
[0175] The latch module includes:
[0176] The first latch module is connected to the pulse signal output interface of the first delay module and the second delay module, and is used to control the output of the upper bridge arm modulated pulse signal.
[0177] In an optional embodiment of the present invention, the S interface of the first latch module is connected to the first delay module, and the R interface of the first latch module is connected to the pulse signal output interface of the second delay module. The first latch module is the LATCH1 module in the figure.
[0178] The second latch module is connected to the pulse signal output interface of the third and fourth delay modules and is used to control the output of the lower bridge arm modulation pulse signal.
[0179] In an optional embodiment of the present invention, the S interface of the second latch module is connected to the third delay module, and the R interface of the second latch module is connected to the pulse signal output interface of the fourth delay module. The second latch module is the LATCH2 module in the figure.
[0180] like Figure 5 As shown, the conventional method uses the system clock and a counter for timing. The polarity of the output pulse can only be changed at the rising or falling edge of the clock. Therefore, it is limited by the clock frequency and the accuracy cannot be very high.
[0181] like Figure 6As shown, this invention, by using a delay unit, can divide a clock cycle into up to 512 equal parts, thereby increasing the resolution by up to 512 times. Existing methods for improving modulation pulse accuracy generally use the rising edge of a PWM (aligned with the clock cycle) as a reference to delay other pulse edges, thus improving the duty cycle accuracy of the modulation pulse. Therefore, the frequency accuracy of the output modulation pulse in this way depends on the clock frequency. The period of the modulation pulse is defined as the time difference between the rising edge of the current pulse and the next rising edge, and the frequency is the reciprocal of the period; the smaller the period, the higher the frequency. The idea of this invention is to calculate the delay of the rising edge of the modulation pulse in the next cycle based on a set frequency, no longer aligning the rising edge of the reference modulation pulse with the clock, thereby increasing the modulation pulse frequency. This method requires real-time calculation of the counter time and delay time of each modulation pulse edge in the next cycle, and the sum of all calculation times cannot exceed the period of the output modulation pulse. Using an FPGA, real-time and fast calculation can be achieved.
[0182] Those skilled in the art will recognize that the embodiments described herein are intended to help the reader understand the principles of the invention, and should be understood that the scope of protection of the invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific modifications and combinations based on the technical teachings disclosed in this invention without departing from the spirit of the invention, and these modifications and combinations are still within the scope of protection of this invention.
Claims
1. A method of generating high temporal resolution modulation pulses, characterized by, Includes the following steps: S1. Determine the modulation pulse period, the first dead time, and the last dead time; S2. Calculate the corresponding counter value and delay value based on the modulation pulse period, the first dead time and the last dead time in step S1. S3. Determine the output pulse signal based on the counter value in step S2; S4. Based on the delay value in step S2 and the output pulse signal in step S3, generate a high time resolution modulation pulse; Step S2 includes the following sub-steps: S21. Based on the modulation pulse period, the first dead time, and the last dead time in step S1, calculate the counter value and the delay value at the moment the upper bridge arm rises. S22. Based on the delay value of the upper bridge arm rising at the time of step S21, calculate the counter value and delay value of the upper bridge arm falling at the time of step S21. S23. Based on the counter value and delay value at the moment the upper arm descends in sub-step S22, calculate the counter value and delay value at the moment the lower arm rises. S24. Based on the counter value and delay value at the moment the lower bridge arm rises in sub-step S23, calculate the counter value and delay value at the moment the lower bridge arm falls. Step S21 includes the following sub-steps: S211. Convert the modulation pulse period in step S1 into the corresponding counter value of the modulation pulse period, expressed as: CNT_PERIOD=PERIOD / tclk Where: CNT_PERIOD is the counter value corresponding to the modulation pulse period, PERIOD is the modulation pulse period, tclk is the system clock period, and the symbol " / " is an integer division operation; S212. Convert the modulation pulse period in step S1 into a value modulo the system clock period, and save it as an intermediate register value, represented as: temp_time=PERIOD%tclk Where: temp_time is the value of the intermediate register, and the symbol "%" represents the modulo operation; S213. Based on the before dead time and after dead time in step S1, calculate the high-level time value of the modulation pulse, expressed as: dutycycle=(PERIOD-DEADTIME1-DEADTIME2) / 2 Where: dutycycle is the high-level time of the modulation pulse, DEADTIME1 is the first dead time, and DEADTIME2 is the last dead time; S214. Assign the next delay time value calculated in the previous calculation cycle to the delay value at the moment the upper bridge arm rises. S215. Summate the intermediate register value in sub-step S212 and the delay value in sub-step S214 to obtain the summation result; S216. Determine whether the summation result in sub-step S215 is greater than or equal to one system clock cycle; if so, increment the counter value corresponding to the modulation pulse period in sub-step S211 and proceed to sub-step S217; otherwise, proceed to sub-step S218. S217. Update the next delay time value according to the first calculation formula, expressed as: t1_delay_next=temp_time+TAP_NUM1-tclk Where: t1_delay_next is the next delay time value, and TAP_NUM1 is the delay value at the moment the upper bridge arm rises; S218. Update the next delay time according to the second calculation formula, expressed as: t1_delay_next=temp_time+TAP_NUM1; S219. Set the counter value to 0 at the moment the upper bridge arm rises.
2. The method of claim 1, wherein the high time resolution modulation pulse is generated by, Step S22 includes the following sub-steps: S221. Based on the delay value of the upper arm's ascent time in sub-step S21, calculate the counter value of the upper arm's descent time, expressed as: CNT_VALUE2=(TAP_NUM1+dutycycle) / tclk Where: CNT_VALUE2 is the counter value at the moment the upper bridge arm descends; S222. Based on the delay value of the upper arm's ascent time in sub-step S21, calculate the delay value of the upper arm's descent time, expressed as: TAP_NUM2=(dutycycle+TAP_NUM1)%tclk Where: TAP_NUM2 is the delay value at the moment of descent of the upper bridge arm.
3. A method of generating high time resolution modulation pulses according to claim 2, characterized in that, Step S23 includes the following sub-steps: S231. Based on the counter value and delay value at the moment the upper arm descends in sub-step S22, calculate the counter value at the moment the lower arm rises, expressed as: CNT_VALUE3=CNT_VALUE2+(DEADTIME1+TAP_NUM2) / tclk Where: CNT_VALUE3 is the counter value at the moment the lower bridge arm rises; S232. Based on the delay value of the upper arm descending, calculate the delay value of the lower arm rising, expressed as: TAP_NUM3=(DEADTIME1+TAP_NUM2)%tclk Where: TAP_NUM3 is the delay value at the moment the lower bridge arm rises.
4. The method of claim 3, wherein the high time resolution modulation pulse is generated by, Step S24 includes the following sub-steps: S241. Based on the counter value and delay value at the time of the lower bridge arm's ascent in sub-step S23, calculate the counter value at the time of the lower bridge arm's descent, expressed as: CNT_VALUE4=CNT_VALUE3+(TAP_NUM3+dutycycle) / tclk Where: CNT_VALUE4 is the counter value at the moment the lower bridge arm descends; S242. Based on the delay value of the lower bridge arm's ascent time in sub-step S23, calculate the delay value of the lower bridge arm's descent time, expressed as: TAP_NUM4=(TAP_NUM3+dutycycle)%tclk Where: TAP_NUM4 is the delay value at the moment of the lower bridge arm descent.
5. A high time resolution modulation pulse generating circuit applying the method of any one of claims 1 to 4, characterized in that include: The control module, which is connected to both the phase-locked loop module and the delay module, is used to calculate the counter value and the delay value based on the input modulation pulse period, the first dead time, and the last dead time. It generates an output pulse signal based on the counter value and outputs the output pulse signal and the delay value to the delay module. The delay module, connected to the control module and the latch module, is used to receive the output pulse signal and delay value from the control module, and to control the latch module to be set to 1 or 0 through the output pulse signal and delay value. The latch module, connected to the delay module, is used to output the modulation pulse signal and generate a high time resolution modulation pulse.
6. A high time resolution modulation pulse generating circuit according to claim 5, characterized in that The control module is used to determine the input modulation pulse period, before dead time, and after dead time. Calculate the counter value and delay value at the moment the upper bridge arm rises, generate the output pulse signal at the moment the upper bridge arm rises based on the counter value, and output the output pulse signal and delay value at the moment the upper bridge arm rises to the delay module. Calculate the counter value and delay value at the moment of upper arm descent, generate the output pulse signal at the moment of upper arm descent based on the counter value, and output the output pulse signal and delay value at the moment of upper arm descent to the delay module. Calculate the counter value and delay value at the moment the lower bridge arm rises, generate the output pulse signal at the moment the lower bridge arm rises based on the counter value, and output the output pulse signal and delay value at the moment the lower bridge arm rises to the delay module. Calculate the counter value and delay value at the moment the lower bridge arm descends, generate the output pulse signal at the moment the lower bridge arm descends based on the counter value, and output the output pulse signal and delay value at the moment the lower bridge arm descends to the delay module.
7. A high time resolution modulation pulse generating circuit according to claim 6, characterized in that The delay module includes: The first delay module is used to receive the output pulse signal and delay value at the moment the upper bridge arm rises from the control module, and control the first latch module to be set to 1 by the output pulse signal and delay value at the moment the upper bridge arm rises. The second delay module is used to receive the output pulse signal and delay value of the upper bridge arm descending moment from the control module, and control the first latch module to be set to 0 through the output pulse signal and delay value of the upper bridge arm descending moment. The third delay module is used to receive the output pulse signal and delay value at the time of the lower bridge arm's ascent from the control module, and to control the second latch module to be set to 1 by the output pulse signal and delay value at the time of the lower bridge arm's ascent. The fourth delay module is used to receive the output pulse signal and delay value of the lower bridge arm descending moment from the control module, and to control the second latch module to be set to 0 by the output pulse signal and delay value of the lower bridge arm descending moment.
8. A high time resolution modulation pulse generating circuit according to claim 7, characterized in that The latch module includes: The first latch module is connected to the pulse signal output interface of the first delay module and the second delay module, and is used to control the output of the upper bridge arm modulated pulse signal; The second latch module is connected to the pulse signal output interface of the third and fourth delay modules and is used to control the output of the lower bridge arm modulated pulse signal.
