SNOAAA7 April   2024 LMG3522R030

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
  5. 2Overview of Inverter Model
    1. 2.1 Power Stage
    2. 2.2 Control and Modulation Method
  6. 3Realization of Digital Control Using C-Script Block
    1. 3.1 Overview of Project Structure
    2. 3.2 AC Voltage Sampling and True RMS Value Calculation
    3. 3.3 Multiple Loop Control
      1. 3.3.1 Voltage Loop With Notch Filter
      2. 3.3.2 Current Loop With PI Compensator Anti-Windup
      3. 3.3.3 Sinusoidal and Sawtooth Wave Generator
      4. 3.3.4 Totem-Pole Modulation and Dead-Time Control
  7. 4Simulation Results
  8. 5Summary
  9. 6References

Sinusoidal and Sawtooth Wave Generator

In PLECS, the update and output function are processed for each sample step. Therefore, the designer can consider the sample time as the system clock, using a counter to generate these signals with proper frequency. For the sinusoidal generator, first create an array and initialize this array with the number that changes sinusoidally. This array is set to 2000 to correspond with the current loop operating frequency.

GUID-20240319-SS0I-Z31Z-TTZP-HC1RV85TTVLL-low.pngFigure 3-11 Sinusoidal Wave Generator

Logic is the same as in the sawtooth wave generator. One important aspect of totem-pole modulation is that two sawtooth signals need to be created; one for the positive cycle and the other for the negative cycle to generate a proper PWM signal, shown in Figure 2-3. The amplitude of these two carrier signals is from 0 to 1 and 0 to –1, respectively. It is worth mentioning that 2 signals are needed because of the case where one sawtooth signal with an amplitude from –1 to 1 to generate PWM signal is used. When the error signal is near zero, the lowest duty cycle is 50%, and the correct duty cycle is supposed to be near zero. Besides, the upper limit is set to 12 and divided by 120 to set the right frequency under the system clock. Figure 3-12 shows the sawtooth generator code.

GUID-20240319-SS0I-QNJ5-XHHR-X5D0FJZR8KTF-low.pngFigure 3-12 Sawtooth Wave Generator