This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Instability due to under sampling?

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.

  • I don't think sampling at a higher frequency is going to help much unless you also increase the switching frequency.  A cleaner approach is to stay with 10kHz sampling and look again at the compensator.  It's hard to say without seeing the gain/phase curves, but possibly the extra pole-zero in a type 3 compensator might help. 

    Increased phase lag close to the Nyquist limit is expected when you convert to digital.  What you're seeing in Matlab comes from the transformation method, but in the actual system there will be computational and other delays which will also contribute.  There's information on this in various places, but you may like to start with the video on discrete time systems on this web site: www.controltheoryseminars.com

    Hopefully this helps.  Please post back if you need more.

    Regards,

    Richard

  • Richard,

    I watched your video last night (if that was in fact you, I guess I'm talking to the right guy) and it was very helpful.  A great deal of it was a review of a DSP class that I took in the spring.  It's complicated stuff and I grasp a little more every time I hear it.  Anyway, the light bulb went off for me when you mentioned the 'matched' and 'tunstin' parameters in your MATLAB scripts.  I didn't know MATLAB used different methods for obtaining the difference equation coefficients.

    The coefficients were significantly different for each method.  However, when I looked at the coefficients, intuitively it seemed like the output of the difference equation was destined to saturate.  When I substituted them in, they did in fact saturate.

    I was getting frustrated and desperate, and since I had found some rookie mistakes with my software I decided to give the coefficients that I'd calculated a try.  Low and behold I had a functioning error amplifier.  I exported the difference equation output to one of the unused PWM channels where I could observe it and it was exactly what I wanted.  Yipppeeee!

    Anyway, the Bilinear Transform that I learned in the spring, substituted (2/T) *[(z-1)/ (z+1)] in for s.  That along with the frequency pre-warp resulted in coefficients that worked.  I admit that the algebra was not trivial for a rusty engineer that graduated 25 years ago, but why does MATLAB fool around with inferior approximations?  Also, my professor often mentioned roundoff error.  MATLAB provided coefficients with 3 and 4 decimal places.  Is that sufficient or should the coefficients have information out to 5 or 6 decimal places?

    I wanted to thank you for your assistance and warn you that I will need to ask some questions in the future.  

    Thanks again,

    Tom

    I'm not sure where to indicated that my question was answered, but the issue is resolved.