SPWM inverter producing berserk output? - Page 1
Forum section: electronics / projects

author: Artlav
author_rank: Frequent Contributor
timestamp: March 14, 2014, 04:08:34 pm
content: Hello.I want to turn 310VDC into a sine wave 220VAC.Method of choice - full bridge sinusoidal PWM inverter, driven by an attiny85.Schematic attached.The output is filtered by a 6uH+1uF LC filter.It seem to work fine when i test it with 12 VDC input - clean enough sine wave, lights up a light, no problems.But, when i put 310VDC on it, it goes berserk.There is a cracking sound, akin to sparking, coming from the capacitor at the filter, and the output is essentially pulses of white noise.What is going on?It's not the capacitor - i tried as much as 6000 volt rated ones, so it just makes sound.It's not bridge driving issues - i've been increasing dead time, trying all sorts of delays to no effect.It's not the bridge itself - without the filter i get a perfectly working SPWM output, which can light a lightbulb without any heat or problems.It also works nicely into 100W range when driven as a "modified sine" - a square wave.I tried lowering the voltage.At 120 VDC it works kind-of fine.The output is a sine wave, and a light bulb lights up dimly, but there is an ominous hum coming from somewhere, and FETs are heating up (does not happen at either unfiltered, modified sine, berserk, or 12 VDC modes).I probed the drains of the lower fets, and what is happening is on attachments 3 and (zoomed in) 4.Basically, mid-wave there is a spike of power consumption, marked by spikes on one side, and corresponding dips on the other side.I have no clue what i'm looking at there.Adding dead time does not alter it in any meaningful manner, so it does not look like shoot-throughs or similar.I've also tried adding diodes anti-parrallel to the transistors, in case body diodes can't handle some sort of current from the filter, to no effect.The voltages come nowhere near the 400V rating of the transistors.Somewhere around 170VDC it goes from this wacko mode to berserk mode, but i don't have a stable power source to probe around that range, so no idea what it can be.Any ideas what can it be?I'm at my wit's end and been trying to get it working every now and then for months already.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 14, 2014, 04:47:21 pm
content: An LC filter with no damping? Driven by a step waveform?I'd love to see the output current.As for the chaotic behavior, I would guess bad grounding of the drivers causing nonsense logic signals.Tim

author: granz
author_rank: Regular Contributor
timestamp: March 14, 2014, 05:38:32 pm
content: Just taking a quick look at your schematic, you'll definitely want a common-mode choke on the output before the cap, not just a LC filter as you currently have.

author: Artlav
author_rank: Frequent Contributor
timestamp: March 14, 2014, 06:12:20 pm
content: Quote from: T3sl4co1l on March 14, 2014, 04:47:21 pmExactly what i seen in research papers and schematics found online.What did i miss?Quote from: T3sl4co1l on March 14, 2014, 04:47:21 pmLogic signals are fine. That's the first thing i checked. And re-checked, and tweaked, and checked again, and changed to a different approach, and checked, and checked...Besides, it works at 120 VDC.Quote from: granz on March 14, 2014, 05:38:32 pmAdded a 2x47mH choke before the LC filter (http://www.digikey.com/product-detail/en/B82722A2301N1/495-5727-ND/1243507), no effect.I can't see any chokes on schematics for SPWM inverters i can find online, just an LC filter connected directly to the bridge.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 14, 2014, 06:46:42 pm
content: Just because research papers show it, doesn't mean they have any actual engineering sense.Your schematic shows 6mH + 1uF, your post says 6uH + 1uF...which one is right?Any pics or drawings of the layout?If 6uH, you have a cutoff frequency of 65kHz, driven at 31kHz. At 50% PWM (no modulation), little 2nd harmonic content is produced to excite this, but at other duty cycles (particularly around 20-35%), there is plenty. So we can assume a frequency component of at least 100V at 62kHz is available at some point during the 60Hz modulation. If the inductor is crappy, the LC might have a Q around 5 or 10, up to perhaps 100 if it's a high quality part. Either way, with a resonant impedance of sqrt(6uH/1uF) ~= 2.45 ohms, this is more than enough to produce peak currents over 40A, which is probably saturating the inductor, drawing even taller current spikes (for shorter times; the result being, the capacitor fully charges to the square-wave voltage before the inductor comes out of saturation, so we no longer need to assume harmonics: rather, the transient will occur on every switching edge). This is more than enough to short out those poor transistors, in fact, Rds(on) will limit the peak current to much less (at the expense of power dissipation!).If it's actually 6mH, the cutoff frequency is 2kHz, which will still let some ripple through but it won't be crazy. The inductor does have to handle full voltage, and a saturation current over 0.5A.It will still oscillate in a dramatic fashion during transients (startup, source or load). To prevent this, some damping is required. A related example:Note the R+C across the output. This keeps the output waveform reasonably damped when unloaded:Plenty of ripple still superimposed on the waveform (the cutoff is much closer to the switching frequency to maximize bandwidth in this case), but the little up-and-down after the edge is the filter's transient (the much longer time constant is the control loop in the circuit doing its work).The coupled filter choke acts like 40uH (they act in series), and the filter caps act like 0.11uF (ditto), with an impedance of sqrt(40uH/0.11uF) ~= 19 ohms. 51 ohm + 0.22uF gives a Q of about 3, hardly well damped but it keeps the ringing down well enough without consuming too much signal power. Under rated load (4-8 ohms), the filter is overdamped with a Q < 1, but the cutoff frequency remains useful.Tim

author: granz
author_rank: Regular Contributor
timestamp: March 14, 2014, 06:59:49 pm
content: Exactly what T3sl4co1l saidHe knows what he is talking about. (I was composing a response but saw his first)Also, have a look at Microchip AN1279, which is a UPS reference design. You will be interested in the inverter section. Notice the large common mode choke.

author: qno
author_rank: Frequent Contributor
timestamp: March 14, 2014, 08:11:29 pm
content: C10 looks a bit small.Ever tried an Elco of 100u?