CN112994507B - PWM pulse generation method and PWM pulse generation device - Google Patents

PWM pulse generation method and PWM pulse generation device Download PDF

Info

Publication number
CN112994507B
CN112994507B CN202110145866.1A CN202110145866A CN112994507B CN 112994507 B CN112994507 B CN 112994507B CN 202110145866 A CN202110145866 A CN 202110145866A CN 112994507 B CN112994507 B CN 112994507B
Authority
CN
China
Prior art keywords
phase
target
generating
pwm pulse
wave
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110145866.1A
Other languages
Chinese (zh)
Other versions
CN112994507A (en
Inventor
孙驰
何娜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Junhai Suneng Technology Co ltd
Original Assignee
Nanjing Junhai Suneng Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Junhai Suneng Technology Co ltd filed Critical Nanjing Junhai Suneng Technology Co ltd
Priority to CN202110145866.1A priority Critical patent/CN112994507B/en
Publication of CN112994507A publication Critical patent/CN112994507A/en
Application granted granted Critical
Publication of CN112994507B publication Critical patent/CN112994507B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03KPULSE TECHNIQUE
    • H03K3/00Circuits for generating electric pulses; Monostable, bistable or multistable circuits
    • H03K3/02Generators characterised by the type of circuit or by the means used for producing pulses
    • H03K3/53Generators characterised by the type of circuit or by the means used for producing pulses by the use of an energy-accumulating element discharged through the load by a switching device controlled by an external signal and not incorporating positive feedback
    • H03K3/57Generators characterised by the type of circuit or by the means used for producing pulses by the use of an energy-accumulating element discharged through the load by a switching device controlled by an external signal and not incorporating positive feedback the switching device being a semiconductor device

Abstract

The invention provides a PWM pulse generating method and a PWM pulse generating device, wherein the method comprises the following steps: generating an original modulation wave according to the number of the preset phase-shifting clocks, the preset modulation ratio and the counting peak value; generating a plurality of target modulation waves according to the original modulation waves, generating a phase-shifting triangular carrier corresponding to each phase-shifting clock based on each phase-shifting clock and the counting peak value respectively, and generating a target triangular carrier with the same frequency as the switching frequency based on a combinational logic circuit according to each phase-shifting triangular carrier; and based on a combinational logic circuit, generating PWM pulses according to each target modulation wave and the target triangular carrier wave respectively. The PWM pulse generating method and the PWM pulse generating device provided by the invention can improve the precision of the generated PWM pulse on the premise of not improving the clock main frequency, the processing logic of the process of generating the PWM pulse is simple, and the control precision of the power electronic converter can be further improved by generating the high-precision PWM pulse.

Description

PWM pulse generation method and PWM pulse generation device
Technical Field
The present invention relates to the field of power electronics, and in particular, to a PWM pulse generating method and a PWM pulse generating apparatus.
Background
At present, a power electronic power converter usually adopts a Pulse width modulation technology, and generates a PWM (Pulse width modulation) control Pulse by comparing a modulation wave with a carrier. The adopted modes mainly comprise the following two modes: firstly, directly utilize the PWM peripheral module of DSP (digital signal processing) module self-carrying to produce the PWM pulse, specifically include: generating a carrier in an external PWM module by setting control parameters of the PWM external module, and comparing a modulated wave with the carrier to generate a required PWM pulse; secondly, utilizing an FPGA (Field Programmable Gate Array) to generate PWM pulses, specifically including: after receiving the modulated wave, the FPGA program module compares the modulated wave with a carrier wave generated by a counter in the FPGA program module to obtain the needed PWM pulse.
In the power electronic product, the switching frequency of a switching device in the power converter is improved, and the miniaturization and high power density of the power electronic product are favorably realized. However, as the switching frequency of the switching device increases, the two PWM pulse generation methods are limited by the clock frequencies of the DSP program module and the FPGA program module, and the count value of the generated carrier wave in each switching period is small, resulting in a low accuracy of the PWM pulse generated by comparing the modulated wave with the carrier wave. Further, the low precision of the PWM pulse will result in limited control precision of the power electronic system, and even limit cycle oscillation will be introduced, which affects the performance of the power electronic system. For example: if the switching frequency of the switching device is 200KHz, the clock master frequency of the DSP program module and the FPGA program module is 100MHz, and the maximum count value of the carrier in each switching period can be known to be 250 according to the switching frequency and the clock frequency, then the control error introduced by modulation in each switching period is 0.8%. If non-rational factors such as sensing and sampling errors are considered, the error of the whole power electronic system is further increased. In summary, for an application scenario with a high precision control requirement, it is difficult for the existing PWM pulse generation method to generate a high precision PWM pulse that meets the actual requirement.
Disclosure of Invention
The invention provides a PWM pulse generation method and a PWM pulse generation device, which are used for solving the defect that high-precision PWM pulses meeting actual requirements are difficult to generate in the prior art and realizing the generation of high-precision PWM pulses.
The invention provides a PWM pulse generation method, which comprises the following steps:
generating an original modulation wave according to the number of the preset phase-shifting clocks, the preset modulation ratio and the counting peak value;
generating a plurality of target modulation waves according to the original modulation waves, generating phase-shifted triangular carriers corresponding to each phase-shifted clock based on each phase-shifted clock and the counting peak respectively, and generating target triangular carriers with the same frequency as the switching frequency based on a combinational logic circuit according to each phase-shifted triangular carrier;
based on the combinational logic circuit, generating a plurality of PWM pulses according to each target modulation wave and the target triangular carrier wave respectively;
the frequency of each phase shifting clock is the same, and the phase of each phase shifting clock is sequentially different from a preset phase difference; the count peak is determined according to the frequency of the phase-shifted clock and the switching frequency; the predetermined phase difference is determined according to the number of the predetermined phase-shifted clocks.
According to the PWM pulse generating method provided by the present invention, the generating of the target triangular carrier having the same frequency as the switching frequency based on the combinational logic circuit according to each of the phase-shifted triangular carriers specifically includes:
adding the phase-shifted triangular carriers through the combinational logic circuit to generate the target triangular carrier of the current switching period;
according to the present invention, there is provided a PWM pulse generating method, generating a plurality of target modulation waves according to the original modulation wave, specifically including:
latching the original modulation wave at the current interrupt moment to acquire the original modulation wave of the current switching period;
and correcting the original modulation wave of the current switching period to obtain a plurality of target modulation waves of the current switching period.
According to the PWM pulse generating method provided by the present invention, the modifying the original modulation wave of the current switching period to obtain a plurality of target modulation waves of the current switching period specifically includes:
correcting the amplitude of the original modulation wave of the current switching period according to a correction value to obtain a plurality of target modulation waves of the current switching period;
wherein the correction value is determined according to the length of the dead time.
According to the PWM pulse generating method provided by the present invention, the modifying the original modulation wave of the current switching period to obtain a plurality of target modulation waves of the current switching period specifically includes:
and carrying out amplitude limiting on the original modulation wave of the current switching period according to the minimum pulse width allowed by a target switching device, and obtaining the target modulation wave of the current switching period.
According to the PWM pulse generating method provided by the present invention, the modifying the original modulation wave of the current switching period to obtain a plurality of target modulation waves of the current switching period specifically includes:
correcting the amplitude of the original modulation wave of the current switching period according to a correction value to obtain a plurality of correction modulation waves of the current switching period; wherein the correction value is determined according to the length of the dead time;
and according to the minimum pulse width allowed by a target switching device, carrying out amplitude limiting on each correction modulation wave in the current switching period, and obtaining each target modulation wave in the current switching period.
According to the present invention, there is provided a PWM pulse generating method, wherein the generating a plurality of PWM pulses according to each of the target modulation waves and the target triangular carrier wave based on each of the combinational logic circuits respectively comprises:
and comparing each target modulation wave with the target triangular carrier wave through the combinational logic circuit to generate each PWM pulse.
According to the PWM pulse generating method provided by the present invention, the generating a phase-shifted triangular carrier corresponding to each phase-shifted clock based on each phase-shifted clock and the count peak value specifically includes:
and counting according to each phase-shifting clock to generate a phase-shifting triangular carrier corresponding to each phase-shifting clock.
According to the PWM pulse generating method provided by the present invention, the generating of the original modulated wave according to the number of the preset phase-shifted clocks, the preset modulation ratio and the count peak specifically includes:
calculating the product of the number of preset phase-shifting clocks, the preset modulation ratio and the counting peak value, and rounding the product to obtain a calculation result;
and generating the original modulation wave according to the calculation result.
The present invention provides a PWM pulse generating apparatus, including:
the DSP module is used for generating an original modulation wave according to the number of the preset phase-shifting clocks, the preset modulation ratio and the counting peak value;
the FPGA module is used for generating a plurality of target modulation waves according to the original modulation waves, generating phase-shifting triangular carriers corresponding to each phase-shifting clock based on each phase-shifting clock and the counting peak value respectively, and generating the target triangular carriers with the same frequency as the switching frequency based on a combinational logic circuit according to each phase-shifting triangular carrier; based on the combinational logic circuit, generating a plurality of PWM pulses according to each target modulation wave and the target triangular carrier wave respectively;
the frequency of each phase shifting clock is the same, and the phase of each phase shifting clock is sequentially different from a preset phase difference; the count peak is determined according to the frequency of the phase-shifted clock and the switching frequency; the predetermined phase difference is determined according to the number of the predetermined phase-shifted clocks.
According to the PWM pulse generation method and the PWM pulse generation device, after the phase-shifting triangular carrier corresponding to each phase-shifting clock is generated, the target triangular carrier is generated based on the combinational logic circuit, and the plurality of PWM pulses are generated according to each target modulation wave and the target triangular carrier, so that the precision of the generated PWM pulses can be improved on the premise of not improving the clock main frequency, the processing logic of the process of generating the PWM pulses is simple, the required operation resources are small, the practicability is strong, and the control precision of the power electronic converter can be further improved by generating the high-precision PWM pulses.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a schematic flow chart of a PWM pulse generation method according to the present invention;
fig. 2 is a schematic diagram of a generation process of a current switching period target triangular carrier in the PWM pulse generation method provided by the present invention;
FIG. 3 is a diagram comparing PWM pulses generated by the PWM pulse generation method provided by the present invention with PWM pulses generated by the conventional method;
fig. 4 is a schematic diagram of a generation process of a target modulation wave of a current switching period in a PWM pulse generation method provided by the present invention;
FIG. 5 is a schematic diagram of a PWM pulse generation process in the PWM pulse generation method provided by the present invention;
FIG. 6 is a schematic structural diagram of a PWM pulse generating apparatus provided in the present invention;
fig. 7 is a schematic flow chart of a PWM pulse generating apparatus according to the present invention for executing a PWM pulse generating method.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the description of the present invention, it should be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
Fig. 1 is a schematic flow chart of a PWM pulse generation method according to the present invention. The PWM pulse generation method of the present invention is described below with reference to fig. 1. As shown in fig. 1, the method includes: step 101, generating an original modulation wave according to the number of the preset phase-shifting clocks, the preset modulation ratio and the counting peak value.
The frequency of each phase-shifting clock is the same, and the phases of the phase-shifting clocks sequentially differ by a preset phase difference; the counting peak value is determined according to the frequency of the phase-shifting clock and the switching frequency; the predetermined phase difference is determined according to a predetermined number of phase-shifted clocks.
It should be noted that the main execution body of the PWM pulse generation method in the embodiment of the present invention is a PWM pulse generation apparatus.
The original modulated wave may refer to an information wave carrying target information.
A phase-shifted clock may refer to a clock signal having a phase. In the embodiment of the invention, n phase-shift clocks can be generated by the PWM pulse generating device; n is the number of phase shifted clocks preset. The n phase-shifting clocks have the same frequency Fc, the phases sequentially have a preset phase difference, and the phase difference of any two phase-shifting clocks is an integral multiple of the preset phase difference theta.
The preset number n of phase shifting can be determined according to actual requirements. The specific value of the preset number n of phase-shifted clocks is not particularly limited in the embodiment of the present invention.
The preset phase difference θ may be obtained according to the number of preset phase-shifted clocks. The preset phase difference θ may be obtained by dividing 360 ° by the preset number n of phase-shifted clocks, where θ is 360 °/n.
The value range of the preset modulation ratio m is 0-1. The preset modulation ratio m is used to describe the modulation depth of the PWM generation method in the embodiment of the present invention. For example: if the preset modulation ratio is 1, the PWM modulation is full modulation. The preset modulation ratio m may be determined according to an actual control system. The specific value of the preset modulation ratio is not particularly limited in the embodiment of the present invention.
The switching frequency refers to the frequency at which the target switching device is turned on and off.
The count peak N may be determined from the frequency Fc of the phase-shifted clock and the switching frequency Fs. For example: the count peak N may be one-half of the calculation result of dividing the frequency Fc of the phase-shifted clock by the switching frequency Fs, where N is Fc/2 Fs.
And determining the amplitude of the original modulation wave according to the preset phase-shifting clock number N, the preset modulation ratio m and the counting peak value N. After determining the amplitude of the desired modulation wave, the PWM pulse generating means may generate an original modulation wave of the amplitude.
And 102, generating a plurality of target modulation waves according to the original modulation waves, generating a phase-shifting triangular carrier corresponding to each phase-shifting clock based on each phase-shifting clock and the counting peak value, and generating a target triangular carrier with the same frequency as the switching frequency based on the combinational logic circuit according to each phase-shifting triangular carrier.
Specifically, if the original modulation wave is only used for generating a PWM pulse of a target switching device, the original modulation wave in the current switching period does not need to be processed, and the original modulation wave can be directly used as the target modulation wave corresponding to the target switching device in the current switching period. If the original modulation wave is used for generating PWM pulses of a plurality of target switching devices, the original modulation wave may be processed to obtain target modulation waves corresponding to the plurality of target switching devices.
The carrier wave is a periodic waveform, and may be a triangular wave, a sawtooth wave, and the like, and is usually generated by counting by a digital controller. The triangular carrier wave and the modulation wave are compared, and the on and off of the switching device are controlled at the moment of the change of the logic relation of the comparison result, so that the pulse proportional to the size of the modulation wave is obtained.
Based on any phase-shifted clock and the counting peak value N, a phase-shifted triangular carrier corresponding to the phase-shifted clock can be generated.
The traditional PWM pulse generation method is based on only one phase-shifting clock and generates a phase-shifting triangular carrier corresponding to the phase-shifting clock. Limited by the frequency of the phase-shifting clock, the time resolution of the phase-shifting triangular carrier is low, and the precision of the PWM pulse generated according to the phase-shifting triangular carrier is limited.
Fig. 2 is a schematic diagram of a generation process of a current switching period target triangular carrier in the PWM pulse generation method provided by the present invention. As shown in fig. 2, a target triangular carrier having the same frequency as the switching frequency is generated based on a combinational logic circuit based on n number of phase-shifted triangular carriers. The frequency of the target triangular carrier is Fs, and one period is 1/Fs. The peak count value of the target triangular carrier is N x N.
Compared with the time resolution of the phase-shifting triangular carrier, the time resolution of the target triangular carrier is higher and is one n times of the time resolution of the phase-shifting triangular carrier. On the premise of not increasing the frequency of the phase-shifting clock, the precision of the PWM pulse can be increased by n times.
And 103, generating a plurality of PWM pulses respectively according to each target modulation wave and each target triangular carrier based on a combinational logic circuit.
Specifically, according to any one target modulation wave and a target triangular carrier, a combination circuit is adopted to directly compare and generate a high-precision PWM pulse corresponding to the target modulation wave.
Fig. 3 is a comparison graph of PWM pulses generated by the PWM pulse generation method provided by the present invention and PWM pulses generated by the conventional method. As shown in fig. 3, compared with the conventional PWM pulse generation method, in the embodiment of the present invention, according to the phase-shifted clocks that are n in number and have phases sequentially different by the predetermined phase difference θ, the target triangular carrier with higher time resolution can be generated, and further, the high-precision PWM pulse can be generated according to the target triangular carrier and the target modulated wave.
It should be noted that operations such as generating interrupt pulses, latching modulated waves, dead zone compensation, minimum pulse width limitation, and generating triangular carriers by using an FPGA are common implementation methods based on a pure sequential logic circuit in the industry at present. In the embodiment of the invention, the sequential logic circuit and the combinational logic circuit are combined at the same time to generate the high-precision PWM pulse. And particularly, based on a combinational logic circuit, generating a target triangular carrier wave according to a plurality of phase-shifted triangular carrier waves, and generating high-precision PWM pulses according to the target triangular carrier wave and a target modulation wave. The prior literature has no technical scheme similar to the inventive concept in the embodiment of the invention
According to the embodiment of the invention, after the phase-shifting triangular carrier corresponding to each phase-shifting clock is generated, the target triangular carrier is generated based on the combinational logic circuit, and the plurality of PWM pulses are generated according to each target modulation wave and the target triangular carrier, so that the precision of the generated PWM pulses can be improved on the premise of not improving the clock main frequency, the processing logic of the process of generating the PWM pulses is simple, the required operation resources are small, the practicability is strong, and the control precision of the power electronic converter can be further improved by generating the high-precision PWM pulses.
Based on the content of the foregoing embodiments, according to each of the phase-shifted triangular carriers, a target triangular carrier having a frequency identical to a switching frequency is generated based on a combinational logic circuit, which specifically includes: and adding the phase-shifted triangular carriers through a combinational logic circuit to generate a target triangular carrier of the current switching period.
In particular, the interruption time may refer to the start time of the switching cycle.
And all the phase-shifted triangular carriers are superposed through a combinational logic circuit to generate a target triangular carrier of the current switching period. The time resolution of the generated target triangular carrier is higher compared with the phase-shifted triangular carrier.
According to the embodiment of the invention, all phase-shifted triangular carriers are superposed through the combinational logic circuit to generate the target triangular carrier of the current switching period, compared with the phase-shifted triangular carrier, the generated target triangular carrier has higher time resolution, and the PWM pulse generated according to the target triangular carrier has higher precision.
Based on the content of the foregoing embodiments, generating a plurality of target modulated waves according to an original modulated wave specifically includes: and acquiring the original modulation wave of the current switching period from the original modulation wave latched at the current interrupt moment.
And correcting the original modulation wave of the current switching period to obtain a plurality of target modulation waves of the current switching period.
Specifically, based on consideration of protection of the circuit, the number of target switching devices, and the like, the amplitude of the original modulation wave of the current switching period may be corrected to obtain a number of target modulation waves of the current switching period.
According to the embodiment of the invention, the original modulation waves are latched and corrected to obtain a plurality of target modulation waves of the current switching period, the original modulation waves of any switching period can be enabled to correspond to the target triangular carrier waves of the switching period by latching the original modulation waves, the safe operation of each switching device can be ensured by correcting the original modulation waves, and the circuit can be protected.
Based on the content of each embodiment, the method for correcting the original modulation wave in the current switching period to obtain a plurality of target modulation waves in the current switching period specifically includes: and correcting the amplitude of the original modulation wave of the current switching period according to the correction value to obtain a plurality of target modulation waves of the current switching period.
Wherein the correction value is determined in dependence on the length of the dead time.
Specifically, for each switching device that is complementarily turned on, in order to ensure safe operation of each switching device, dead time is usually added between PWM pulses corresponding to each switching device. By correcting the original modulation wave, a target modulation wave to which the dead time has been added corresponding to each switching device can be generated.
Fig. 4 is a schematic diagram of a generation process of a target modulation wave of a current switching period in the PWM pulse generation method provided by the present invention. As shown in fig. 4, the target switching device may be two switching devices that are complementarily turned on, and is divided into an upper switching tube and a lower switching tube.
And subtracting the correction value delta M from the amplitude of the original modulation wave in the current switching period to obtain a target modulation wave corresponding to the switching tube in the current switching period.
And adding the correction value delta M to the amplitude of the original modulation wave in the current switching period to obtain a target modulation wave corresponding to the switching tube in the current switching period.
The correction value is determined based on the length of the dead time. The correction value Δ M is specifically determined based on one-half of the dead time. The amplitude of the original modulation wave of the current switching period is added with and subtracted with the correction value delta M, half of dead time can be added into the target modulation wave corresponding to the upper switching tube and the target modulation wave corresponding to the lower switching tube respectively, and the dead time is equivalent to adding a complete dead time between the PWM pulses corresponding to the upper switching tube and the lower switching tube.
According to the embodiment of the invention, the original modulation wave is corrected to generate the target modulation wave which is corresponding to each switching device and is added with the dead time, so that the safe operation of each switching device can be ensured.
Based on the content of each embodiment, the method for correcting the original modulation wave in the current switching period to obtain a plurality of target modulation waves in the current switching period specifically includes: and carrying out amplitude limiting on the original modulation wave of the current switching period according to the minimum pulse width allowed by the target switching device, and obtaining the target modulation wave of the current switching period.
The minimum pulse width allowed for the target switching device refers to the minimum on and off time of the target switching device.
And according to the minimum pulse width allowed by the target switching device, amplitude limiting can be carried out on the original modulation wave in the current switching period, and the target modulation wave in the current switching period is obtained. And the PWM pulse of the current switching period generated according to the obtained target modulation wave of the current switching period is within the range of the minimum pulse width allowed by the target switching device.
According to the embodiment of the invention, the original modulation wave is subjected to amplitude limiting to obtain the target modulation wave, so that the target modulation wave can be ensured to be within the range of the minimum pulse width allowed by the target switching device, the safe operation of each switching device can be ensured, and the circuit can be protected.
Based on the content of each embodiment, the method for correcting the original modulation wave in the current switching period to obtain a plurality of target modulation waves in the current switching period specifically includes: and correcting the amplitude of the original modulation wave of the current switching period according to the correction value to obtain a plurality of correction modulation waves of the current switching period. Wherein the correction value is determined in dependence on the length of the dead time.
Specifically, for each switching device that is complementarily turned on, in order to ensure safe operation of each switching device, dead time is usually added between PWM pulses corresponding to each switching device. By correcting the original modulation wave, a target modulation wave to which the dead time has been added corresponding to each switching device can be generated.
And subtracting or adding the correction value to the amplitude of the original modulation wave to obtain the correction modulation wave corresponding to each target switching device in the current switching period.
It should be noted that the correction value is determined according to the length of the dead time that is usually required to be added between the PWM pulses corresponding to the respective switching devices.
And according to the minimum pulse width allowed by the target switching device, carrying out amplitude limiting on each modified modulation wave in the current switching period to obtain each target modulation wave in the current switching period.
Specifically, according to the minimum pulse width allowed by the target switching device, the modified modulation wave corresponding to any target switching device in the current switching period may be limited, and the target modulation wave corresponding to the target switching device in the current switching period may be obtained. And generating a PWM pulse corresponding to the target switching device in the current switching period according to the obtained target modulation wave corresponding to the target switching device in the current switching period, wherein the PWM pulse is within the range of the minimum pulse width allowed by the target switching device.
According to the embodiment of the invention, after the correction modulation waves with the added dead time corresponding to each switching device are generated by correcting the original modulation, each correction modulation wave is subjected to amplitude limiting to obtain each target modulation wave, so that the safe operation of each switching device can be ensured, and the circuit can be protected.
Based on the content of the foregoing embodiments, based on the combinational logic circuit, the method specifically includes, according to each of the target modulation wave and the target triangular carrier wave: and comparing each target modulation wave with the target triangular carrier wave through a combinational logic circuit to generate each PWM pulse.
Specifically, each target modulation wave is compared with a target triangular carrier wave through a combinational logic circuit, and the high-low level and the level inversion time of the PWM pulse are determined according to the comparison logic result.
Fig. 5 is a schematic diagram of a PWM pulse generation process in the PWM pulse generation method according to the present invention. As shown in fig. 5, in the FPGA, a combinational logic circuit is used to compare a target modulation wave corresponding to the upper switch tube with a target triangular carrier wave, and generate a PWM pulse corresponding to the upper switch tube. The starting time of the PWM pulse corresponding to the upper switch tube is advanced by one half of the dead time compared with the starting time of the PWM pulse generated by comparing the original modulation wave with the target triangular carrier. The end time of the PWM pulse corresponding to the upper switching tube is delayed by half of the dead time compared with the end time of the PWM pulse generated by comparing the original modulation wave with the target triangular carrier. In FPGA, a combinational logic circuit is adopted to compare a target modulation wave corresponding to a lower switch tube with a target triangular carrier wave and generate PWM pulse corresponding to the lower switch tube. The starting time of the PWM pulse corresponding to the lower switching tube is delayed by half of the dead time compared with the starting time of the PWM pulse generated by comparing the original modulation wave with the target triangular carrier. The end time of the PWM pulse corresponding to the lower switching tube is advanced by one half of dead time compared with the end time of the PWM pulse generated by comparing the original modulation wave with the target triangular carrier. Therefore, dead time is added between PWM pulses corresponding to the upper switching tube and the lower switching tube.
According to the embodiment of the invention, each target modulation wave is compared with the target triangular carrier wave through the combinational logic circuit to generate each PWM pulse, and the logic for generating the PWM pulse is simple and the practicability is strong.
Based on the content of the foregoing embodiments, the generating a phase-shifted triangular carrier corresponding to each phase-shifted clock based on each phase-shifted clock and the count peak specifically includes: and counting according to each phase-shifting clock to generate a phase-shifting triangular carrier corresponding to each phase-shifting clock.
Specifically, a counter is used for counting any phase-shifting clock, the phase-shifting clock starts from zero, and every time a period passes, the counter is increased by 1 until the counting value of the phase-shifting clock is increased to a counting peak value N; or, the phase-shift clock starts from the counting peak value N, and the counter is decremented by one every time a period passes until the counting value of the phase-shift clock is reduced to zero, so that the phase-shift triangular carrier corresponding to the phase-shift clock can be obtained.
It should be noted that the counter may be reset at each interrupt time.
The embodiment of the invention generates the phase-shifting triangular carrier corresponding to each phase-shifting clock based on each phase-shifting clock and the counting peak value, can simply and quickly generate a plurality of phase-shifting triangular carriers, and can generate the target triangular carrier with higher time resolution by adopting a combinational logic circuit based on the generated plurality of phase-shifting triangular carriers.
Based on the content of the foregoing embodiments, generating an original modulated wave according to the number of preset phase-shifted clocks, the preset modulation ratio, and the count peak, specifically includes: and calculating the product of the number of the preset phase-shifting clocks, the preset modulation ratio and the counting peak value, and rounding the product to obtain a calculation result.
Based on the calculation result, an original modulation wave is generated.
Specifically, the magnitude of the amplitude of the desired modulation wave can be determined by calculating the product of the preset number of phase-shifted clocks, the preset modulation ratio, and the count peak value, and rounding the product. According to the magnitude of the amplitude of the modulation wave required for determination, the original modulation wave of the amplitude can be generated.
The embodiment of the invention determines the amplitude of the original modulation wave by calculating and rounding the product of the preset phase-shifting clock number, the preset modulation wave and the counting peak value, generates the original modulation wave with the amplitude according to the determined amplitude of the original modulation wave, and can accurately and quickly generate the required original modulation wave.
Fig. 6 is a schematic structural diagram of a PWM pulse generating apparatus according to the present invention. The PWM pulse generating apparatus of the present invention is described below with reference to fig. 6. As shown in fig. 6, the apparatus includes: a DSP module 601 and an FPGA module 602, wherein:
the DSP module 601 is configured to generate an original modulation wave according to a preset number of phase-shift clocks, a preset modulation ratio, and a count peak.
The FPGA module 602 is configured to generate a plurality of target modulation waves according to the original modulation wave, generate a phase-shifted triangular carrier corresponding to each phase-shifted clock based on each phase-shifted clock and the count peak, and generate a target triangular carrier having the same frequency as the switching frequency based on the combinational logic circuit according to each phase-shifted triangular carrier; based on the combinational logic circuit, a plurality of PWM pulses are generated according to each target modulation wave and the target triangular carrier wave respectively.
The frequency of each phase-shifting clock is the same, and the phases of the phase-shifting clocks sequentially differ by a preset phase difference; the counting peak value is determined according to the frequency of the phase-shifting clock and the switching frequency; the preset phase difference is determined according to the number of the phase-shifted clocks.
Specifically, the DSP module 601 may determine the amplitude of the original modulated wave according to a preset number N of phase-shifted clocks, a preset modulation ratio m, and a count peak value N. After determining the amplitude of the desired modulation wave, the DSP module 601 may generate an original modulation wave of the amplitude.
The FPGA module 602 may directly use the original modulated wave as the target modulated wave. The FPGA module can also generate a plurality of target modulation waves after correcting the original modulation waves.
The carrier wave is a periodic waveform, and may be a triangular wave, a sawtooth wave, and the like, and is usually generated by counting by a digital controller.
The FPGA module 602 may generate a phase-shifted triangular carrier corresponding to any phase-shifted clock based on the phase-shifted clock and the count peak N.
The FPGA module 602 may further generate a target triangular carrier having the same frequency as the switching frequency according to the n number of phase-shifted triangular carriers. The frequency of the target triangular carrier is Fs, and one period is 1/Fs. The peak count value of the target triangular carrier is N x N.
The FPGA module 602 may further generate a high-precision PWM pulse corresponding to any one of the target modulation wave and the target triangular carrier. Compared with the PWM pulse generated by the conventional method, the high-precision PWM pulse has higher time resolution.
The PWM pulse generation method of the embodiment of the present invention is explained below by an example. Fig. 7 is a schematic flow chart of the PWM pulse generating apparatus according to the present invention executing the PWM pulse generating method, as shown in fig. 7, firstly, the DSP module 601 can generate an original modulated wave, and the original modulated wave can be transmitted to the FPGA module 602 through data communication, so that the FPGA module 602 can generate a high-precision PWM pulse.
Specifically, the DSP module 601 may multiply the modulation ratio m obtained by the control instruction, the original triangular carrier count peak value N, and the number N of the preset phase shift clocks clk, and then, the product is rounded, so as to determine the amplitude of the original modulation wave. Based on the determined magnitude of the original modulation wave, the DSP module 601 may generate the original modulation wave M of a corresponding magnitude. The value range of the modulation ratio m is 0-1, which represents the modulation depth of the converter, and 1 represents full modulation. The predetermined number n of phase-shifted clocks clk is the predetermined number of phase-shifted clocks generated by the phase-locked loop. The original triangular carrier count peak N is related to the switching frequency Fs of the switching device and the frequency Fc of the phase shift clock clk, where N is Fc/Fs/2.
The original modulation wave M can be obtained through the FPGA module 602, and the original modulation wave M is modified to obtain a plurality of target modulation waves Mc. The FPGA module can also generate a plurality of phase-shifted triangular carriers W, and generate target triangular carriers Wh according to the phase-shifted triangular carriers W. A plurality of high-precision PWM pulses can be generated through the FPGA module.
Specifically, in each switching cycle, the FPGA module 602 may actively read the original modulation wave M transmitted by the DSP module 601 through data communication, and latch the read original modulation wave M at each interrupt time. For each switching device that is complementarily conducting, a dead time is typically added between the PWM pulses corresponding to each switching device. The generation of the dead time can be realized by modifying the original modulation wave M. The FPGA module 602 subtracts or adds the modulation wave correction value Δ M corresponding to half of the dead time from the original modulation wave M corresponding to each switching device, so as to obtain a corrected modulation wave including the dead time for each switching device.
Note that, if the original modulated wave M is used to generate only one PWM pulse for the switching device, the original modulated wave M may be directly used as the modified modulated wave for the switching device without performing dead time correction on the original modulated wave M.
In order to ensure that the on-off duration of each switching device is longer than a certain limit, the FPGA module 602 may perform amplitude limiting on the modified modulated wave corresponding to each switching device according to the minimum pulse width of each switching device, so as to obtain a target modulated wave Mc corresponding to each switching device.
The n phase shifted clocks clk may be generated by the FPGA module 602 phase locked loop. All phase shifted clocks clk are of the same frequency, Fc. The phases of the n phase-shifting clocks sequentially differ by a preset phase difference theta. The preset phase difference theta is 360 DEG/n. By counting each high frequency phase shifted clock separately, n phase shifted triangular carriers can be generated.
Specifically, a counter built in the FPGA module 602 is used to count any phase-shifted clock from zero, and the counter increments by 1 every time the phase-shifted clock passes through one cycle until the count value of the phase-shifted clock increases to a count peak value N; or, counting the phase-shifted clock from the counting peak value N, and subtracting 1 from the counter every time a period passes until the counting value of the phase-shifted clock is reduced to zero, so as to obtain the phase-shifted triangular carrier W corresponding to the phase-shifted clock. Wherein clk < 0 indicates that the phase of the first phase-shifted clock is 0; clk < theta indicates that the phase of the second phase-shifted clock is theta; clk < 2 theta indicates that the phase of the third phase-shifted clock is 2 theta; by analogy, clk < n-1 > theta indicates that the phase of the nth phase shifted clock is (n-1) theta.
The interrupt pulse can be obtained by extracting the rising edge or the falling edge of the interrupt time by any phase-shifted clock. And the phase-shifting triangular carrier counters are reset by utilizing interrupt pulses, so that the synchronization of the phase-shifting triangular carriers is realized. And adding the n synchronized phase-shifted triangular carriers W through a combinational logic circuit to obtain a target triangular carrier Wh.
Each PWM pulse can be generated by comparing each target modulated wave Mc with the target triangular carrier Wh by a combinational logic circuit.
It should be noted that the sub-modules in the FPGA 602 that execute the reading, modulated wave latching, dead time, and minimum pulse width modification steps are implemented by using sequential logic circuits in the FPGA 602. The target triangular carrier wave is obtained by adding the phase-shifted triangular carrier waves, and the target triangular carrier wave and the target modulation wave are compared to generate the PWM pulse, which is realized by adopting a combinational logic circuit in the FPGA module 602. After a plurality of high-precision PWM pulses are generated, the high-precision PWM pulses cannot be processed by using a sequential circuit in the FPGA module 602, so that the operation in the sequential circuit is avoided, and the precision of the PWM pulses is reduced.
According to the embodiment of the invention, after the phase-shifting triangular carrier corresponding to each phase-shifting clock is generated, the target triangular carrier is generated based on the combinational logic circuit, and the plurality of PWM pulses are generated according to each target modulation wave and the target triangular carrier, so that the precision of the generated PWM pulses can be improved on the premise of not improving the clock main frequency, the processing logic of the process of generating the PWM pulses is simple, the required operation resources are small, the practicability is strong, and the control precision of the power electronic converter can be further improved by generating the high-precision PWM pulses.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A PWM pulse generation method, comprising:
generating an original modulation wave according to the number of the preset phase-shifting clocks, the preset modulation ratio and the counting peak value;
generating a plurality of target modulation waves according to the original modulation waves, generating phase-shifted triangular carriers corresponding to each phase-shifted clock based on each phase-shifted clock and the counting peak respectively, and generating target triangular carriers with the same frequency as the switching frequency based on a combinational logic circuit according to each phase-shifted triangular carrier;
based on the combinational logic circuit, generating a plurality of PWM pulses according to each target modulation wave and the target triangular carrier wave respectively;
the frequency of each phase shifting clock is the same, and the phase of each phase shifting clock is sequentially different from a preset phase difference; the count peak is determined according to the frequency of the phase-shifted clock and the switching frequency; the predetermined phase difference is determined according to the number of the predetermined phase-shifted clocks.
2. The PWM pulse generating method according to claim 1, wherein the generating a target triangular carrier having a frequency equal to a switching frequency based on a combinational logic circuit according to each of the phase-shifted triangular carriers specifically comprises:
and adding the phase-shifted triangular carriers through the combinational logic circuit to generate the target triangular carrier of the current switching period.
3. The PWM pulse generation method according to claim 1, wherein the generating a plurality of target modulation waves from the original modulation wave specifically includes:
latching the original modulation wave at the current interrupt moment to acquire the original modulation wave of the current switching period;
and correcting the original modulation wave of the current switching period to obtain a plurality of target modulation waves of the current switching period.
4. The PWM pulse generation method according to claim 3, wherein the modifying the original modulation wave of the current switching period to obtain a plurality of target modulation waves of the current switching period specifically comprises:
correcting the amplitude of the original modulation wave of the current switching period according to a correction value to obtain a plurality of target modulation waves of the current switching period;
wherein the correction value is determined according to the length of the dead time.
5. The PWM pulse generation method according to claim 3, wherein the modifying the original modulation wave of the current switching period to obtain a plurality of target modulation waves of the current switching period specifically comprises:
and carrying out amplitude limiting on the original modulation wave of the current switching period according to the minimum pulse width allowed by a target switching device, and obtaining the target modulation wave of the current switching period.
6. The PWM pulse generation method according to claim 3, wherein the modifying the original modulation wave of the current switching period to obtain a plurality of target modulation waves of the current switching period specifically comprises:
correcting the amplitude of the original modulation wave of the current switching period according to a correction value to obtain a plurality of correction modulation waves of the current switching period; wherein the correction value is determined according to the length of the dead time;
and according to the minimum pulse width allowed by a target switching device, carrying out amplitude limiting on each correction modulation wave in the current switching period, and obtaining each target modulation wave in the current switching period.
7. The PWM pulse generation method according to claim 1, wherein the generating a plurality of PWM pulses based on the combinational logic circuit according to each of the target modulation wave and the target triangular carrier wave respectively comprises:
and comparing each target modulation wave with the target triangular carrier wave through the combinational logic circuit to generate each PWM pulse.
8. The PWM pulse generation method according to claim 1, wherein the generating a phase-shifted triangular carrier corresponding to each phase-shifted clock based on each phase-shifted clock and the count peak value comprises:
and counting according to each phase-shifting clock to generate a phase-shifting triangular carrier corresponding to each phase-shifting clock.
9. The PWM pulse generation method according to any one of claims 1 to 8, wherein the generating of the original modulated wave according to the number of the preset phase-shifted clocks, the preset modulation ratio and the count peak value specifically includes:
calculating the product of the number of preset phase-shifting clocks, the preset modulation ratio and the counting peak value, and rounding the product to obtain a calculation result;
and generating the original modulation wave according to the calculation result.
10. A PWM pulse generating apparatus, comprising:
the DSP module is used for generating an original modulation wave according to the number of the preset phase-shifting clocks, the preset modulation ratio and the counting peak value;
the FPGA module is used for generating a plurality of target modulation waves according to the original modulation waves, generating phase-shifting triangular carriers corresponding to each phase-shifting clock based on each phase-shifting clock and the counting peak value respectively, and generating the target triangular carriers with the same frequency as the switching frequency based on a combinational logic circuit according to each phase-shifting triangular carrier; based on the combinational logic circuit, generating a plurality of PWM pulses according to each target modulation wave and the target triangular carrier wave respectively;
the frequency of each phase shifting clock is the same, and the phase of each phase shifting clock is sequentially different from a preset phase difference; the count peak is determined according to the frequency of the phase-shifted clock and the switching frequency; the predetermined phase difference is determined according to the number of the predetermined phase-shifted clocks.
CN202110145866.1A 2021-02-02 2021-02-02 PWM pulse generation method and PWM pulse generation device Active CN112994507B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110145866.1A CN112994507B (en) 2021-02-02 2021-02-02 PWM pulse generation method and PWM pulse generation device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110145866.1A CN112994507B (en) 2021-02-02 2021-02-02 PWM pulse generation method and PWM pulse generation device

Publications (2)

Publication Number Publication Date
CN112994507A CN112994507A (en) 2021-06-18
CN112994507B true CN112994507B (en) 2021-12-10

Family

ID=76346274

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110145866.1A Active CN112994507B (en) 2021-02-02 2021-02-02 PWM pulse generation method and PWM pulse generation device

Country Status (1)

Country Link
CN (1) CN112994507B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116345982B (en) * 2022-11-30 2024-03-12 中船重工安谱(湖北)仪器有限公司 Voice coil motor control method, system and equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0730383A (en) * 1993-07-09 1995-01-31 Nec Corp Pulse signal generating circuit
CN103580523A (en) * 2013-11-19 2014-02-12 苏州爱科博瑞电源技术有限责任公司 Multipath phase-shift PWM wave generating circuit based on FPGA
CN109857014A (en) * 2019-01-24 2019-06-07 武汉精能电子技术有限公司 A kind of pwm signal generation method based on FPGA
CN110690879A (en) * 2019-10-18 2020-01-14 西安许继电力电子技术有限公司 Parameter-adjustable PWM controller based on programmable device and PWM pulse generation method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8599915B2 (en) * 2011-02-11 2013-12-03 Freescale Semiconductor, Inc. Phase-shifted pulse width modulation signal generation device and method therefor

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0730383A (en) * 1993-07-09 1995-01-31 Nec Corp Pulse signal generating circuit
CN103580523A (en) * 2013-11-19 2014-02-12 苏州爱科博瑞电源技术有限责任公司 Multipath phase-shift PWM wave generating circuit based on FPGA
CN109857014A (en) * 2019-01-24 2019-06-07 武汉精能电子技术有限公司 A kind of pwm signal generation method based on FPGA
CN110690879A (en) * 2019-10-18 2020-01-14 西安许继电力电子技术有限公司 Parameter-adjustable PWM controller based on programmable device and PWM pulse generation method

Also Published As

Publication number Publication date
CN112994507A (en) 2021-06-18

Similar Documents

Publication Publication Date Title
TWI613937B (en) Radio frequency generator, radio frequency system and method using the same
US8826062B2 (en) Apparatus for synchronizing a data handover between a first clock domain and a second clock domain through phase synchronization
US9537493B2 (en) Phase lock loop circuit having a wide bandwidth
US10491201B2 (en) Delay circuit, count value generation circuit, and physical quantity sensor
JP2010166392A (en) Digital phase locked-loop circuit
US8278987B2 (en) Duty cycle based phase interpolators and methods for use
CN108445734A (en) Clock pulse frequency multiplication multiplies frequency and digit pulse generation circuit, time-to-digit converter
CN110798212B (en) Time domain interleaved waveform synthesis timing mismatch calibration device and method
EP0783147A2 (en) Modulator having individually placed edges
CN112994507B (en) PWM pulse generation method and PWM pulse generation device
KR20180070835A (en) Asynchronous clock signal generator and semiconductor device for correcting multi-phase signal using asynchronous clock signal
JP3838654B1 (en) Time interval measuring device and jitter measuring device
WO2019061077A1 (en) Pulse width modification circuit, pulse width modification method, and electronic apparatus
WO2021016085A1 (en) Phase-aligning multiple synthesizers
JP3639000B2 (en) Phase matching device and delay control circuit
WO2022001940A1 (en) Phase jitter compensation method and module and digital phase-locked loop
US9602115B1 (en) Method and apparatus for multi-rate clock generation
TWI466449B (en) Signal generating device and frequency synthesizer
EP2324612B1 (en) Digital polar transmitter with reduced phase error for wireless communication systems
WO2019009997A1 (en) Delay locked loop (dll) employing pulse to digital converter (pdc) for calibration
US20040027181A1 (en) Clock multiplying PLL circuit
CN114978128B (en) Method and apparatus for controlling pulse width modulation waveform
US4573024A (en) PLL having two-frequency VCO
JP4955196B2 (en) AC signal measuring device
US20220231694A1 (en) Phase locked loop, electronic device, and method for controlling phase locked loop

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 211106 Building 9, Huarui Industrial Park, 9 Chengxin Avenue, Jiangning District, Nanjing City, Jiangsu Province (Jiangning Development Zone)

Applicant after: Nanjing Junhai suneng Technology Co.,Ltd.

Address before: 211106 28 Yinlong Road, moling street, Jiangning District, Nanjing City, Jiangsu Province (Jiangning Development Zone)

Applicant before: Nanjing Daquan Electronic Technology Co., Ltd

GR01 Patent grant
GR01 Patent grant