SNOAAA7 April 2024 LMG3522R030
Current loop is connected after the voltage loop. The updated rate is set to 100kHz, so the sample rate of the inductor current is also 100kHz. The output signal of the notch filter multiplied by the sinusoidal wave created by the sinusoidal module creates the reference current signal. Similar to the voltage loop, current error signal is processed by the PI compensator. To avoid oversaturation of integral, an anti-windup is used in the PI compensator. Figure 3-10 shows the code for the current loop.