Hi,

I am referring to two app. notes from Microchip -

1. PICREF-1 2. AN1279

These app.notes deal with making a Un-interruptible Power Supply.
I see that both these app. notes use a (digital) filter (in the control
software) to drive the PWM. The PWM is used to generate the sine wave
output from the inverter. Here's the flow:

1. Sample output voltage. 2. Compare with sine PWM reference table. 3. Calculate the error. 4.

I am not able to make out the exact sampling rate used for filter in step 4. But the two possible sampling rates are 32

My question is, what seems more appropriate? - Does one write a filter for a sine-PWM output with a gain crossover frequency for the desired frequency (50 Hz) or for twice the desired frequency (100 Hz).

Thanks, Anand

Here's the code:

numd=[0.09261 0.09261]; %coefficients from PICREF-1. dend=[1 -1]; ffP; fsÿ*32; %or 64 Ts=1/fs; sysd=tf(numd,dend,Ts); syscÒc(sysd)

and it's result:

Transfer function: 0.09261 s + 296.4 ----------------- s

>> 296.4/(2*3.142)

ans 47.1674

I am referring to two app. notes from Microchip -

1. PICREF-1 2. AN1279

These app.notes deal with making a Un-interruptible Power Supply.

1. Sample output voltage. 2. Compare with sine PWM reference table. 3. Calculate the error. 4.

***Filter the error***. 5. Use the filter output as the PWM pulse width.I am not able to make out the exact sampling rate used for filter in step 4. But the two possible sampling rates are 32

***50 Hz and 64***50 Hz (50 Hz being the desired output frequency). When I do the discrete to continuous conversion (using a "d2c" in Matlab), these two possibilities lead to a gain crossover frequency of 50 Hz or 100 Hz. (Obviously.) (By the gain crossover frequency, I mean the frequency at which the gain of the filter falls to 0 dB.)My question is, what seems more appropriate? - Does one write a filter for a sine-PWM output with a gain crossover frequency for the desired frequency (50 Hz) or for twice the desired frequency (100 Hz).

Thanks, Anand

Here's the code:

numd=[0.09261 0.09261]; %coefficients from PICREF-1. dend=[1 -1]; ffP; fsÿ*32; %or 64 Ts=1/fs; sysd=tf(numd,dend,Ts); syscÒc(sysd)

and it's result:

Transfer function: 0.09261 s + 296.4 ----------------- s

>> 296.4/(2*3.142)

ans 47.1674