Design of LC filter for SPWM inverter

Hi everyone, I just come up with problem regarding the design of output filter for PWM inverter. Obviously the resonant or cut off frequency of filter should be above 50 Hz and below the switching frequency, and the value is found by 1/(2*pi*root(LC)). When sizing the values of L and C, should I use a bigger C and smaller L, or the other way round? Is it depended on the type of load, whether it's inductive or purely resisitive?

I've made a simulation using Electronic workbench on my 230VAC 50Hz inverter circuit driving a resisitive load, and found that the reproduced waveform is hugely dependent on the value of loading resistance, in terms of the peak amplitude and sine wave accuracy. The result makes sense and is well within my expectation, since when the load is placed in parallel with the C, different value of loading resistance essentially change the whole transfer function and behaviour of output filter. As my inverter is designed to suit the entire range of output power from 0-300W, how should I design my circuit so that the output waveform remains same regardless to loading current, as what I saw in commercial product?

I've seen a constant load is used in most designs from IEEE articles and thesis projects from students, and very few describe the issue of change in sine waveform due to different loading condition. I would appreciate for any helps and advice on which articles I should read for this matter, thanks everyone

Reply to
w2kwong
Loading thread data ...

You want to start by looking at the output section current. The inductance controls the ripple. Once you have the inductance selected, the capacitance can then be calculated.

You can also use the SwitcherCad-II

You need a good feedback servo loop. Without the feedback, the output depends on the load impedance and the natural output impedance. With feedback it is reduced up to near the gain crossover frequency.

Don't read the IEEE articles. Put on your thinking cap and look at practical examples.

BTW: I"ve made a PWM inverter. The topology was like this:

GND----/o------ ---/o----+-----)))))--+--- ) ( ! ! ) ( ! --- -----))))))------ -------- !--- --- ) ( ! ! ! ) ( ! --------+--- GND----/o------ ---/o----

The primary side switches were single MOSFETs. Their conduction overlapped slightly.

The secondary side switches were each a noise to tail pair of MOSFETs. The secondary side switches were driven by couple of gate transformers. Their conductions also overlapped slightly. Sliding the phase relationship between the primary switches and the secondary ones controlled the output voltage.

Reply to
MooseFET

Good question. There are many tradeoffs regarding cost/size, the quality of the output and the operating frequency. You have to optimize all of that. Generally, you want the bigger inductance as long as you can satisfy the peak current requirement. As for the LC frequency, generally it should be more then about 100 times of AC frequency and less then

1/10 of PWM frequency. So the practical value would be from several kHz to several tens of kHz.

It looks like the closed loop control is not working properly.

You should consider no load and max load. The invertor should be unconditionally stable. Take the non-idealities of L and C into the account also.

Quite often you can see the ad-hoc approach and near-square waveforms :-)

Vladimir Vassilevsky

DSP and Mixed Signal Design Consultant

formatting link

Reply to
Vladimir Vassilevsky

Thanks for replying, you two kind people has been really helpful

No. I bought a pure sine inverter and it's measured waveform is clean and nice regardless to load condition.

My design does not do closed loop. I use a PIC18F1220 microcontroller to generate the SPWM signal by means of lookup table, which is just fast enough to produce 10-bit PWM at 39 kHz switching and sampling frequency. Given its limited processing speed at 10 MIPS and 8 bit architecture it is not possible to perform A/D conversion and then multiplication of table entries in real time, which is otherwise necessary if I'm to do a closed loop control by making the modulation index adjustable according load condition. I know DSPs such as TMSC320XXX can do this nicely, the reason for me to use a PIC is because of low pin count and ease of programming. I'm an undergraduate student doing thesis project and do not have equipment nor do I want to work with DSP which are mostly SMDs.

So my question is, is it not possible to generate a nice sine wave by open loop PWM structure using a microcontroller which can't do feedback? Or unless I take step back to do analog SPWM?

Below shows the simulation result using MATLAB. switching freq =

39kHz, LC cut-off frequency is at 5 kHz. Ltotal = 400 mH, C = 47 nF

Circuit:

formatting link
Gating signal:
formatting link
Output waveform with 30 ohm load:
formatting link
With 300k ohm load:
formatting link

P.S. Hi Moose I can't see clearly the output filter you drew in ASCII. However I suppose your filter is similar to the one shown in my circuit right?

Many thanks again!

Reply to
w2kwong

Besides, other then using DSP/FPGA and design my own control algorithm, are there any off-the-shelf digital controllers designed particularly for the inverter or VFD purpose which also allow me to do closed loop control?

Reply to
w2kwong

It is indeed possible to do the closed loop regulation even using the shameful PIC which is the worst of the microcontrollers.

  1. There is no need for multiplications. The regulator is done by shifts and additions.
  2. There is no need to do everything at every period of 39kHz.

which is otherwise

There is no necessity to use the DSP for that.

I have done that. If you carefully account for the misc. sources of error, you can get the sinewave to the accuracy of several percent without closing the loop.

That will bring up the different problems: soft start and shutdown, dead time control, etc.

There is no need for MATLAB either.

Mr. Moose got a very elegant idea of controlling the duty ratio avoiding several different problems at once.

The main principle of operation is the same.

Vladimir Vassilevsky DSP and Mixed Signal Consultant

formatting link

Reply to
Vladimir Vassilevsky

Something to keep in mind is that there is an LR filter present (R is the load), and the LR cutoff frequency varies with load. The reactance of your .4 H inductance is about 126 ohms at 50 Hz. Therefore, when you apply loads of less than about that magnitude, the output voltage is going to drop off drastically. Try decreasing your inductance by a factor of 10, increasing the C by 10, and re-running your simulation. Then try a factor of 100.

Reply to
The Phantom

On Jul 24, 7:44 pm, snipped-for-privacy@hotmail.com wrote: [.....]

Try changing the font to make sure it is a fixed one.

My filter was only single sided. It is the basic LC lowpass.

Reply to
MooseFET

additions. When you mentioned the word shift, are you suggesting me to write my own multiplication/division algorithm by shift and additions ( that's possibly take at least 100 instruction cycles for each operation ), or by simply adding the difference between target voltage and actual voltage to every entries of lookup table to compensate the drop?

Thanks again for sharing your thought.

Reply to
w2kwong

Hi Vladimir, may I clarify my statement again.

Vd*m*sin(wt), where Vd is DC link voltage, m being modulation index. With my original open loop approach the m*sin(wt) is stored in lookup table. In order to make output AC voltage adjustable for regulation purpose, we'll need to either change Vd or m. The first parameter Vd is determined by 12VDC - 360VDC converter which can't be changed freely and swiftly. So to make closed loop control of DC-AC stage possible with fast transient response, our only option is to change m in real time. The microprocessor will need to set duty cycle at every switching period ( or phase angle ) by multiplying the required modulation index ( found by subtracting the ref value from feedback at A/D input somehow ) with every single entries of lookup table ( or at every phase angle ) containing sin(wt) to adjust the magnitude of sine wave.

If what I said makes sense, then the microcontroller will need to perform division/multiply so that Vd*m*sin(wt) is variable. It seems it requires more then a few shift/addition as you said.

I know PIC is bad performer, but there are not much choice at my disposal, given the hassle to learn a new platform and to work with SMDs. I've seen Microchip makes disPIC which has 16 bit core at

10MIPS. Do you think it will be fast enough to do such real time calculation @ 39kHz?

Many Thanks ^_^

Reply to
w2kwong

Sort of going back to talk of multiplies, if you have enough code space:

There are two faster ways you can do a multiply that involve tables.

The first is the square law. 2*A*B = (A+B)^2 - (A-B)^2 You can have a table of 0.5 * X^2 to implement the multiply.

The second is to use the log rule. log)(A*B) = log(A)+Log(B) Your m*sin(wt) table would become log(m*sin(wt)) and the feedback signal would be a little non-linear. The second table would hold B^X where the Base is adjusted so that you get the nominal PWM width result for the middle of the feedback span.

You can do feedback without actually doing a multiply. If you can stand a bit of extra distortion of the waveform, you can add to the PWM number instead of multiplying. This would let you make a several percent of change.

In my circuit I used a mostly analog method. There was a 22V10 and an LM339 and a pile of other parts. If I was doing it again it is quite likely I would use a PIC.

Reply to
MooseFET

If all that you need is the PID regulator, you are OK with the coefficients accurate to the power of 2. Thus there is no need for multiplications. Just a simple shifts will do the job.

Vladimir Vassilevsky DSP and Mixed Signal Consultant

formatting link

Reply to
Vladimir Vassilevsky

The sinewave of 50 Hz changes by less then 1% per period of 39kHz. Thus it is absolutely unnecessary to do everything on every period of PWM. How fast you have to do the things depends on the required bandwidth of the loop. The minimum reasonable loop sample rate without significantly affecting the performance would be about the cutoff of the output LC filter.

Vladimir Vassilevsky DSP and Mixed Signal Consultant

formatting link

Reply to
Vladimir Vassilevsky

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.