I have a single phase AC current source operating fine in open loop. There are three interleaved dual IGBTs switching at 10KHz each with an effective 30 KHz of ripple on the output. Like I said, everything looks fine in open loop.
When I close the loop using the difference equation that was calculated with the Bilinear transform, it operates like a conditionally stable loop. As I increase the DC bus over 150 volts, resulting in a modulator gain of over 34dB (150 Vdc / 3 volt tri wave) it becomes very unstable.
As any analog engineer would do, I revisited my compensation. I modified it to a type II configuration with 90 degrees of phase margin. That sounded good until I plotted phase and gain using MatLab and noticed how my compensation phase bump decreased significantly at 1/2 the sample rate with the discrete compensation, the continuous was fine. Until now, Nyquist was something I brought up when I wanted to sound smart.
I am new to digital control, so let me know if my approach is correct: I sample my current feedback at 10 KHz. Right after I sample, I compare the sample to my sine wave reference. The error generated is compensated with my difference equation. The compensated error is loaded into my compare register to generate the PWM duty cycle.
Looking at the discrete time Bode plot, it seems like I need to sample at a faster rate, but changing the PWM duty cycle more than once a period seems like a jittery, high frequency, unstructured technique to me. So what do I do with all of the extra samples? Average them?
I sure hope I'm on the right track.