PWM signal modulation method and system

文档序号:814299 发布日期:2021-03-26 浏览:27次 中文

阅读说明:本技术 一种pwm信号的调制方法和系统 (PWM signal modulation method and system ) 是由 吴涛 卢志坚 董辰飞 徐玮 于 2019-09-24 设计创作,主要内容包括:本发明提供了一种PWM信号的调制方法,考虑到功率器件最小脉宽的限制和脉宽限制后的脉宽补偿方法的实现,在每个PWM信号的时间周期内通过脉宽补偿来更新实际脉宽和理论计算脉宽的差值,可以使得本周期内的产生的最小脉宽在下个周期内得到补偿,由于电机动态工作的变化,任意时刻产生的最小脉宽都可以在下一个周期内迅速补偿。还可在所述调制方法中预先设定一个最大脉宽。通过比较当前周期的脉宽计算值和最大脉宽的大小关系来调整当前周期的实际脉宽。并且,若超过了满脉宽,所述调制方法会报错以提醒当前周期的脉宽超限。本发明还提出一种PWM信号的调制系统,利用所述方法。(The invention provides a modulation method of PWM signal, considering the limit of the minimum pulse width of the power device and the realization of the pulse width compensation method after the pulse width limit, the difference value of the actual pulse width and the theoretical calculation pulse width is updated by the pulse width compensation in the time period of each PWM signal, the minimum pulse width generated in the period can be compensated in the next period, and the minimum pulse width generated at any time can be rapidly compensated in the next period due to the change of the dynamic work of the motor. A maximum pulse width may also be preset in the modulation method. And adjusting the actual pulse width of the current period by comparing the calculated value of the pulse width of the current period with the maximum pulse width. And if the pulse width exceeds the full pulse width, the modulation method can report an error to remind that the pulse width of the current period exceeds the limit. The invention also provides a modulation system of the PWM signal, and the method is utilized.)

1. A modulation method of a PWM signal is applied to a vehicle inverter, and is characterized by comprising the following steps:

s1: acquiring a pulse width calculation value of a PWM signal in a t period, wherein the pulse width calculation value of the PWM signal in the t period is the product of a modulation degree of the PWM signal in the t period and a full pulse width of the PWM signal and is added with a compensation pulse width value of the PWM signal in a t-1 period;

s2: if the calculated value of the pulse width of the PWM signal in the t period is smaller than the minimum pulse width of the PWM signal, entering S3;

s3: setting the actual pulse width of the PWM signal in the t period as the minimum pulse width of the PWM signal, updating the compensation pulse width value of the PWM signal in the t period, and returning to S1.

2. The method for modulating the PWM signal according to claim 1, wherein the updating the compensated pulse width value of the PWM signal at t periods in S3 comprises:

the compensation pulse width value of the PWM signal in the t period is the difference value of the pulse width calculation value of the PWM signal in the t period and the minimum pulse width of the PWM signal, and the compensation pulse width value of the PWM signal in the t-1 period is added.

3. The method for modulating the PWM signal according to claim 1, wherein the S2 further comprises:

if the calculated value of the pulse width of the PWM signal in the t period is greater than or equal to the minimum pulse width of the PWM signal, entering S4;

s4: and setting the actual pulse width of the PWM signal in the t period as the calculated value of the pulse width of the PWM signal in the t period, and returning to the step S1.

4. A method for modulating a PWM signal according to claim 3, wherein the S4 includes:

s41: if the calculated value of the pulse width of the PWM signal in the t period is less than or equal to the maximum pulse width of the PWM signal, entering S42;

s42: and setting the actual pulse width of the PWM signal in the t period as the calculated value of the pulse width of the PWM signal in the t period, and returning to the step S1.

5. The method for modulating the PWM signal according to claim 4, wherein the S41 further comprises:

if the calculated value of the pulse width of the PWM signal in the t period is larger than the maximum pulse width of the PWM signal, the step S5 is entered;

s5: judging whether a pulse width calculation value of the PWM signal in a t period is smaller than or equal to a full pulse width of the PWM signal, if so, entering S6, and if not, entering S7;

s6: setting the actual pulse width of the PWM signal in the t period as the maximum pulse width of the PWM signal, updating the compensation pulse width value of the PWM signal in the t period, and returning to S1;

s7: and outputting an abnormal alarm.

6. The method according to claim 5, wherein the step of updating the compensated pulse width value of the PWM signal at t periods in S6 comprises:

the compensation pulse width value of the PWM signal in the t period is the difference value of the pulse width calculation value of the PWM signal in the t period and the maximum pulse width of the PWM signal, and the compensation pulse width value of the PWM signal in the t-1 period is added.

7. The method of claim 4, wherein the maximum pulse width of the PWM signal is a difference between a full pulse width of the PWM signal and a minimum pulse width of the PWM signal.

8. A system for modulating a PWM signal, said system comprising:

the processing module is used for acquiring a pulse width calculation value of the PWM signal in a t period and sending the pulse width calculation value of the PWM signal in the t period to the judging module;

the judging module is used for judging whether the pulse width calculation value of the PWM signal in the t period is smaller than the minimum pulse width of the PWM signal or not and sending the judgment result to the executing module;

and the execution module is used for setting the actual pulse width of the PWM signal in the t period, updating the compensation pulse width value of the PWM signal in the t period and sending the compensation pulse width value of the PWM signal in the t period to the processing module.

9. The system for modulating a PWM signal according to claim 8, wherein the processing module calculates the calculated value of the PWM signal pulse width at t-period by multiplying the modulation degree of the PWM signal at t-period by the full pulse width of the PWM signal and adding the value of the compensated pulse width of the PWM signal at t-1 period.

10. The system for modulating a PWM signal according to claim 8, wherein the determining module is further configured to determine whether the calculated pulse width of the PWM signal at t period is greater than the maximum pulse width of the PWM signal.

11. The system for modulating a PWM signal according to claim 8, wherein the determining module is further configured to determine whether the calculated PWM signal width at t period is greater than the full PWM signal width.

Technical Field

The present invention relates to the field of signal modulation, and in particular, to a method and a system for modulating a PWM signal.

Background

The high-frequency motor drive needs to meet the requirement of reducing the current harmonic component on the stator side of the motor as much as possible in a wider motor rotating speed range. The conventional motor drive employs power devices in order to satisfy reliability, it must be ensured that the minimum pulse width of the power device is not less than the sum of on and off delay times of the devices, and therefore the limit of the minimum pulse width must be considered when actually generating the PWM modulated wave. Due to the limitation of the minimum pulse width, the modulation signal output by the control signal can be deviated, and the control distortion of the current on the alternating current side of the motor is caused.

Therefore, a scheme for compensating the distortion of the motor ac side signal caused by the minimum pulse width limitation is needed.

Disclosure of Invention

The invention provides a modulation method and a modulation system of a PWM signal, which are used for solving the problems that in the prior art, due to the limitation of the minimum pulse width, the modulation signal output by a control signal can deviate, so that the control distortion of the current at the alternating current side of a motor is caused, and the like.

In order to solve the above technical problem, a first aspect of the present invention provides a method for modulating a PWM signal, which is applied to a vehicle inverter, the method comprising:

s1: acquiring a pulse width calculation value of a PWM signal in a t period, wherein the pulse width calculation value of the PWM signal in the t period is the product of a modulation degree of the PWM signal in the t period and a full pulse width of the PWM signal and is added with a compensation pulse width value of the PWM signal in a t-1 period;

s2: if the calculated value of the pulse width of the PWM signal in the t period is smaller than the minimum pulse width of the PWM signal, entering S3;

s3: setting the actual pulse width of the PWM signal in the t period as the minimum pulse width of the PWM signal, updating the compensation pulse width value of the PWM signal in the t period, and returning to S1.

Optionally, the updating the compensated pulse width value of the PWM signal at t period in S3 includes:

the compensation pulse width value of the PWM signal in the t period is the difference value of the pulse width calculation value of the PWM signal in the t period and the minimum pulse width of the PWM signal, and the compensation pulse width value of the PWM signal in the t-1 period is added.

Optionally, the S2 further includes:

if the calculated value of the pulse width of the PWM signal in the t period is greater than or equal to the minimum pulse width of the PWM signal, entering S4;

s4: and setting the actual pulse width of the PWM signal in the t period as the calculated value of the pulse width of the PWM signal in the t period, and returning to the step S1.

Optionally, the S4 includes:

s41: if the calculated value of the pulse width of the PWM signal in the t period is less than or equal to the maximum pulse width of the PWM signal, entering S42;

s42: and setting the actual pulse width of the PWM signal in the t period as the calculated value of the pulse width of the PWM signal in the t period, and returning to the step S1.

Optionally, the S41 further includes:

if the calculated value of the pulse width of the PWM signal in the t period is larger than the maximum pulse width of the PWM signal, the step S5 is entered;

s5: judging whether a pulse width calculation value of the PWM signal in a t period is smaller than or equal to a full pulse width of the PWM signal, if so, entering S6, and if not, entering S7;

s6: setting the actual pulse width of the PWM signal in the t period as the maximum pulse width of the PWM signal, updating the compensation pulse width value of the PWM signal in the t period, and returning to S1;

s7: and outputting an abnormal alarm.

Optionally, the updating the compensated pulse width value of the PWM signal at t period in S6 includes:

the compensation pulse width value of the PWM signal in the t period is the difference value of the pulse width calculation value of the PWM signal in the t period and the maximum pulse width of the PWM signal, and the compensation pulse width value of the PWM signal in the t-1 period is added.

Optionally, the maximum pulse width of the PWM signal is a difference between a full pulse width of the PWM signal and a minimum pulse width of the PWM signal.

The second aspect of the present invention also proposes a system for modulating a PWM signal, the system comprising:

the processing module is used for acquiring a pulse width calculation value of the PWM signal in a t period and sending the pulse width calculation value of the PWM signal in the t period to the judging module;

the judging module is used for judging whether the pulse width calculation value of the PWM signal in the t period is smaller than the minimum pulse width of the PWM signal or not and sending the judgment result to the executing module;

and the execution module is used for setting the actual pulse width of the PWM signal in the t period, updating the compensation pulse width value of the PWM signal in the t period and sending the compensation pulse width value of the PWM signal in the t period to the processing module.

Optionally, the processing module calculates the calculated pulse width value of the PWM signal at the t period by adding the compensated pulse width value of the PWM signal at the t-1 period to the product of the modulation degree of the PWM signal at the t period and the full pulse width of the PWM signal.

Optionally, the determining module is further configured to determine whether a pulse width calculated value of the PWM signal in the t period is greater than a maximum pulse width of the PWM signal.

Optionally, the determining module is further configured to determine whether a pulse width calculation value of the PWM signal in the t period is greater than a full pulse width of the PWM signal.

The invention provides a modulation method of a PWM signal, which considers the limit of the minimum pulse width of a power device and the realization of a pulse width compensation method after the limit of the pulse width, updates the difference value of the actual pulse width and the theoretical calculation pulse width by pulse width compensation in the time period of each PWM signal, can immediately compensate the PWM signal when the minimum pulse width is generated in the period, and the compensation value of the PWM signal in the period can be compensated in the next period. For example, if the theoretical calculation value in the present period is smaller than the minimum pulse width, the pulse width of 5us is added to the PWM signal in the present period, and when the theoretical calculation value of the PWM signal in the next period is calculated, the pulse width of 5us is subtracted to compensate the pulse width added in the present period until the PWM signal in each last period meets the expected condition, that is, the minimum pulse width does not occur. Due to the change of the dynamic work of the motor, the minimum pulse width generated at any moment can be quickly compensated in the next period, so that the problem of control distortion of the current on the alternating current side of the motor due to deviation of a control signal output modulation signal caused by the limitation of the minimum pulse width can be avoided.

In addition, a maximum pulse width is set in advance in the modulation method in consideration of the limit of the maximum pulse width of the PWM signal. And adjusting the actual pulse width of the current period by comparing the calculated value of the pulse width of the current period with the maximum pulse width. And if the pulse width exceeds the full pulse width, the modulation method can report an error to remind that the pulse width of the current period exceeds the limit.

The invention also provides a modulation system of the PWM signal, and the method is utilized.

Drawings

Fig. 1 is a logic block diagram of a PWM signal modulation method according to an embodiment of the present invention;

FIG. 2 is a logic diagram of a PWM signal modulation method according to another embodiment of the present invention;

fig. 3 is a schematic diagram of a method for generating a PWM signal when 0< UpwmOut <1 according to an embodiment of the present invention;

fig. 4 is a schematic diagram of a method for generating a PWM signal when the updmout is 0 according to an embodiment of the present invention;

fig. 5 is a schematic diagram of a method for generating a PWM signal when the uppermout is 1 according to an embodiment of the present invention;

fig. 6 is a schematic diagram of an apparatus for generating a PWM signal according to an embodiment of the present invention.

Detailed Description

The following describes a PWM signal modulation method and system in detail with reference to the accompanying drawings and specific embodiments. The advantages and features of the present invention will become more apparent from the following description. It is to be noted that the drawings are in a very simplified form and are not to precise scale, which is merely for the purpose of facilitating and distinctly claiming the embodiments of the present invention.

As shown in fig. 1, the present invention provides a modulation method of a PWM signal, wherein the modulation method considers the limitation of a minimum pulse width and the realization of a pulse width compensation method after the pulse width limitation, the logic block diagram of the modulation method is shown in fig. 1, the modulation method can be applied to a vehicle inverter, and the method comprises the steps of:

s1: acquiring a pulse width calculation value of a PWM signal in a t period, wherein the pulse width calculation value of the PWM signal in the t period is the product of a modulation degree of the PWM signal in the t period and a full pulse width of the PWM signal and is added with a compensation pulse width value of the PWM signal in a t-1 period;

s2: if the calculated value of the pulse width of the PWM signal in the t period is smaller than the minimum pulse width of the PWM signal, the step S3 is entered, and if the calculated value of the pulse width of the PWM signal in the t period is not smaller than the minimum pulse width of the PWM signal, the actual pulse width of the PWM signal in the t period is set as the theoretical calculated value of the pulse width of the PWM signal in the t period, and the step S1 is returned;

s3: setting the actual pulse width of the PWM signal in the t period as the minimum pulse width of the PWM signal, updating the compensation pulse width value of the PWM signal in the t period, and returning to S1.

The difference from the prior art is that the method considers the limit of the minimum pulse width of the power device and the realization of the pulse width compensation method after the pulse width limit, the difference value between the actual pulse width and the theoretical calculation pulse width is updated through pulse width compensation in the time period of each PWM signal, so that the PWM signal can be immediately compensated when the minimum pulse width is generated in the period, and the compensation value of the PWM signal in the period can be compensated in the next period. For example, if the theoretical calculation value in the present period is smaller than the minimum pulse width, the pulse width of 5us is added to the PWM signal in the present period, and when the theoretical calculation value of the PWM signal in the next period is calculated, the pulse width of 5us is subtracted to compensate the pulse width added in the present period until the PWM signal in each last period meets the expected condition, that is, the minimum pulse width does not occur. Due to the change of the dynamic work of the motor, the minimum pulse width generated at any moment can be quickly compensated in the next period, so that the problem of control distortion of the current on the alternating current side of the motor due to deviation of a control signal output modulation signal caused by the limitation of the minimum pulse width can be avoided. The value of the minimum pulse width of the PWM signal may be set to a sum of on and off delay times of the power device, and the modulation degree is a degree to control an amplitude, a frequency, or a phase of the PWM signal by the low frequency modulation signal. It is noted that the UrefFrac in the initial state is zero.

For convenience of explanation, it is possible to define: the minimum pulse width of the PWM signal is pwmmins 0, the full pulse width of the PWM signal is PwmTics, the actual pulse width of the PWM signal in the t period is UpwmOut, the calculated value of the pulse width of the PWM signal in the t period is UpwmTics0, the compensated pulse width of the PWM signal in the t period is UrefFrac0, the compensated pulse width of the PWM signal in the t-1 period is UrefFrac, and the modulation degree of the PWM signal in the t period is Uref, where the flowchart of the method is shown in fig. 2.

Optionally, considering the limitation of the minimum pulse width of the power device, if the UpwmTics0 is smaller than the pwmmipls 0 in the current cycle, pulse width compensation needs to be performed on the UpwmTics 0. Updating the compensated pulse width value of the PWM signal at t period in S3 includes: the compensation pulse width value of the PWM signal in the t period is the difference value of the pulse width calculation value of the PWM signal in the t period and the minimum pulse width of the PWM signal, and the compensation pulse width value of the PWM signal in the t-1 period is added. Namely:

UrefFrac0=UpwmTics0-PwmMinPls0+UrefFrac,

since the UpwmTics0 in the current period is smaller than the pwmmipls 0, if the UpwmOut in the current period is pwmmipls 0, the PWM signal needs to be compensated to a certain degree, and the compensation value is a positive value, so that the compensated value needs to be subtracted in the next period. Since UpwmTics0-PwmMinPls0 is negative, it can be seen from the formula that the UrefFrac0 is smaller than the UrefFrac. Note that if UpwmTics0 for the next cycle is still smaller than PwmMinPls0, the UrefFrac0 accumulates the values of the two offsets.

Optionally, the S2 further includes:

if the calculated value of the pulse width of the PWM signal in the t period is greater than or equal to the minimum pulse width of the PWM signal, entering S4;

s4: and setting the actual pulse width of the PWM signal at the t period as the calculated pulse width of the PWM signal at the t period, and returning to S1, namely UpwmOut being UpwmTics 0.

Further, a maximum pulse width may be preset in the modulation method in consideration of the limitation of the maximum pulse width of the power device. And adjusting the actual pulse width of the current period by comparing the calculated value of the pulse width of the current period with the maximum pulse width, and if the calculated value of the pulse width of the current period exceeds the full pulse width, reporting an error by the modulation method to remind that the pulse width of the current period exceeds the limit. Wherein the maximum pulse width of the PWM signal is the difference between the full pulse width of the PWM signal and the minimum pulse width of the PWM signal, i.e. PwmTics-PwmMinPls 0. As shown in fig. 2, the S4 includes:

s41: if the calculated value of the pulse width of the PWM signal in the t period is less than or equal to the maximum pulse width of the PWM signal, entering S42;

s42: and setting the actual pulse width of the PWM signal in the t period as the calculated value of the pulse width of the PWM signal in the t period, and returning to the step S1.

Optionally, the S41 further includes:

if the calculated value of the pulse width of the PWM signal in the t period is larger than the maximum pulse width of the PWM signal, the step S5 is entered;

s5: judging whether a pulse width calculation value of the PWM signal in a t period is smaller than or equal to a full pulse width of the PWM signal, if so, entering S6, and if not, entering S7;

s6: setting the actual pulse width of the PWM signal in the t period as the maximum pulse width of the PWM signal, updating the compensation pulse width value of the PWM signal in the t period, and returning to S1;

s7: and outputting an abnormal alarm.

Optionally, the updating the compensated pulse width value of the PWM signal at t period in S6 includes:

the compensation pulse width value of the PWM signal in the t period is the difference value of the pulse width calculation value of the PWM signal in the t period and the maximum pulse width of the PWM signal, and the compensation pulse width value of the PWM signal in the t-1 period is added. Namely:

UrefFrac0=UpwmTics0-(PwmTics-PwmMinPls0)+UrefFrac,

since the UpwmTics0 in the current cycle is larger than the PwmTics-PwmMinPls 0. Therefore, if the UpwmOut in the current period is PwmTics-pwmmipls 0, the PWM signal needs to be compensated for a certain amount, and the compensation value is negative, so that the compensation value needs to be increased in the next period. Since UpwmTics0- (PwmTics-PwmMinPls0) is positive, it can be seen from the formula that the UrefFrac0 is larger than the UrefFrac. Note that if UpwmTics0 for the next cycle is still larger than PwmTics-PwmMinPls0, the UrefFrac0 accumulates the values of the two offsets.

According to the logic steps, the minimum pulse width generated at any time can be quickly compensated in the next PWM signal period due to the dynamic working change of the motor. The inventor finds that the modulation method of the PWM signal provided by the invention can effectively optimize the resource dissipation rate of the modulation method to the main frequency of the MCU in practical operation. The modulation method of the PWM signal provided by the embodiment of the invention considers the limit of the minimum pulse width of the power device and the realization of the pulse width compensation method after the pulse width limit, updates the difference value between the actual pulse width and the theoretical calculation pulse width through pulse width compensation in the time period of each PWM signal, can ensure that the minimum pulse width generated in the period is compensated in the next period, and can quickly compensate the minimum pulse width generated at any moment in the next period due to the change of the dynamic work of the motor, thereby avoiding the problem that the modulation signal output by the control signal can generate deviation due to the limit of the minimum pulse width, thereby causing the control distortion of the current at the alternating current side of the motor.

The embodiment of the present invention further provides a system for modulating a PWM signal, where the system includes:

the processing module is used for acquiring a pulse width calculation value of the PWM signal in a t period and sending the pulse width calculation value of the PWM signal in the t period to the judging module;

the judging module is used for judging whether the pulse width calculation value of the PWM signal in the t period is smaller than the minimum pulse width of the PWM signal or not and sending the judgment result to the executing module;

and the execution module is used for setting the actual pulse width of the PWM signal in the t period, updating the compensation pulse width value of the PWM signal in the t period and sending the compensation pulse width value of the PWM signal in the t period to the processing module.

Optionally, the processing module calculates the calculated pulse width value of the PWM signal at t period by adding the product of the modulation degree of the PWM signal at t period and the full pulse width of the PWM signal to the compensated pulse width value of the PWM signal at t-1 period.

Optionally, the determining module is further configured to determine whether a pulse width calculated value of the PWM signal in the t period is greater than a maximum pulse width of the PWM signal.

Optionally, the determining module is further configured to determine whether a pulse width calculated value of the PWM signal in the t period is greater than a full pulse width of the PWM signal.

The PWM signal modulation method provided by the embodiment of the invention can solve the influence of the minimum pulse width on the current of the alternating current side of the motor, but has some defects. For example, the application of wide bandgap SiC devices to automotive inverters has been recognized as a revolutionary technology for next-generation motor controllers. Since the channel formed by the SiC device field effect can flow reverse current, the MOSFET can be considered as a power device in which current flows in both directions. Since the MOSFET does not physically have a so-called anti-parallel diode, the current in the dead zone of the vertical tube time flows from the body diode formed by the P-N junction of the MOSFET. However, based on the existing semiconductor technology, the body diode of the SiC MOSFET has poor characteristics, and both conduction loss and reverse recovery characteristics are poor. In order to fully exploit the advantages of low switching losses of SiC devices, increasing the switching frequency generally achieves improvements in motor control performance, including noise improvement, reduction in ripple current, and improvement in thermal performance. The switching frequency of the traditional IGBT-based inverter is limited to 10kHz, so that the software implementation of the PWM signal modulation method is mostly limited to 100us of operation threads. Once the switching frequency is increased, the modulation method for generating the SVPWM signal needs to be further optimized, so as to reduce the software load rate of the MCU. At present, the modulation mode of the MCU for implementing the PWM signal mostly depends on the output port of the MCU's own PWM modulation wave (for example, the output port of the PWM modulation wave of the DSP TC 275: the ATOM port) to output the duty ratio, which may consume the thread resource of the MCU.

Furthermore, in consideration of the consumption problem of the thread resources by the modulation method of the PWM signal, in order to reduce the software load rate of the MCU, the invention also provides a method for generating the PWM signal, and the method does not depend on an external module of a comparator in the MCU. As shown in fig. 3 to 5, after the pulse width of the current period in the modulation method is determined, the output waveform of the PWM signal of the current period can be uniquely determined according to the value of the actual pulse width UpwmOut, the on-time Ton, the off-time Toff, and the corresponding 3 state output variables state [0], state [1], and state [2], and it is necessary to first determine the pulse width of the current period given in the modulation method. The method comprises the following specific steps:

the first step is as follows: if the value of UpwmOut is between 0 and 1, the PWM signal is generated as shown in fig. 3, where 0< Ton < T3/2, state [0] is 0, state [1] is 1, and state [2] is 0; and the time to is corrected by the minimum pulse width limitation method.

The second step is that: when the value of UpwmOut is 0, the PWM signal is generated as shown in fig. 4, where Ton ═ Toff ═ T3/2, state [0] ═ 0, state [1] ═ 0, state [2] ═ 0, and the output pulse width in this period is 0.

The third step: if the value of UpwmOut is 1, that is, when full-pulse width is output, at this time, the PWM signal is generated as shown in fig. 5, where Ton is 0, Toff is T3, state [0] is 1, state [1] is 1, and state [2] is 1, and the full-pulse width output can be guaranteed for the PWM signal in the current period.

Furthermore, the above method can realize the generation of the switching signal of each switching tube by transmitting the state variables Ton, Toff, state [0], state [1] and state [2] generated in each PWM signal period to the CPLD. Therefore, the present invention further provides a device for generating PWM signals, wherein the device utilizes an interface formed by parallel output between the MCU and the CPLD in a hardware level, as shown in fig. 6, the MCU and the CPLD are connected by an SPI communication link, so as to achieve high-speed PWM signals, and the generation of the signals does not increase the software load factor of the MCU.

Optionally, the MCU may further include a low voltage MCU and a high voltage MCU, and the low voltage MCU is connected to the low voltage MCU and the CPLD through an SPI communication link. It should be noted that, besides the SPI communication link, an I2C communication link or a UART communication link may be used, and the specific choice needs to be selected according to actual needs, and of course, different communication links need to follow corresponding communication protocols.

Optionally, the apparatus includes a power component, the power component may use a three-phase rectifier and inverter controlled by a PWM signal, and the design of the hardware circuit may be extended to a three-level and more complex topology, which is not limited herein.

In summary, the present invention provides a method for modulating a PWM signal, in consideration of the limitation of the minimum pulse width of a power device and the realization of a pulse width compensation method after pulse width limitation, the difference between the actual pulse width and the theoretically calculated pulse width is updated by pulse width compensation in each time period of the PWM signal, so that the PWM signal can be immediately compensated when the minimum pulse width is generated in the current period, and the compensation value of the PWM signal in the current period can be compensated in the next period. For example, if the theoretical calculation value in the present period is smaller than the minimum pulse width, the pulse width of 5us is added to the PWM signal in the present period, and when the theoretical calculation value of the PWM signal in the next period is calculated, the pulse width of 5us is subtracted to compensate the pulse width added in the present period until the PWM signal in each last period meets the expected condition, that is, the minimum pulse width does not occur. Due to the change of the dynamic work of the motor, the minimum pulse width generated at any moment can be quickly compensated in the next period, so that the problem of control distortion of the current on the alternating current side of the motor due to deviation of a control signal output modulation signal caused by the limitation of the minimum pulse width can be avoided.

In addition, a maximum pulse width is set in advance in the modulation method in consideration of the limit of the maximum pulse width of the PWM signal. And adjusting the actual pulse width of the current period by comparing the calculated value of the pulse width of the current period with the maximum pulse width. And if the pulse width exceeds the full pulse width, the modulation method can report an error to remind that the pulse width of the current period exceeds the limit.

The invention also provides a modulation system of the PWM signal, and the method is utilized.

In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example" or "a specific example" or the like are intended to mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. And the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments. Furthermore, various embodiments or examples described in this specification can be combined and combined by those skilled in the art.

Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

14页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:电驱动系统和用于运行变流器的方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类