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

Voltage Loop With Notch Filter

After the RMS value of the AC voltage is obtained, the value is utilized in the voltage loop first. The reference voltage is first initialized in the start function which is 220. The loop calculation rate is the same as the sample rate, 20kHz. First, the error value between the sampled RMS value and the reference voltage is obtained, using the PI compensator to adjust gain and voltage loop phase.

To further reduce the 100Hz voltage ripple in the sampled signal, a notch filter is employed after the voltage PI compensator. The central frequency of the notch filter is set to 100Hz or 628rad/s, with a bandwidth of 5Hz. Figure 3-8 illustrates the parameter initialization of the notch filter in the start function, while Figure 3-9 demonstrates the code of the voltage loop with the notch filter implemented.

GUID-20240319-SS0I-DV1G-Z8DF-RLWQMC1KMQDB-low.pngFigure 3-8 Initialization of Notch Filter
GUID-20240319-SS0I-FKXP-LW33-STWJ3XJ6HRWB-low.pngFigure 3-9 Voltage Loop With Notch Filter