I have been further investigating three level PWM (unipolar PWM) using a half bridge, and thought I would document my findings here for anyone else who might happen down this curious path.
First of all, my conclusion is this. Using a half bridge three level (V, 0, -V) PWM is possible, however you may well be disappointed because while the half bridge can drive the output to V or -V, it cannot drive the output to 0 but has to let the output 'fall' to zero. This is a problem when a low pass filter is placed on the output of the bridge, as is commonly done in order to filter out higher harmonics (to reduce EMI). The result is that there is significantly more harmonic distortion in the output than you might expect. Ironic really as the reason for choosing three level PWM in the first place was likely to be to reduce distortion.
How I arrived at the conclusion follows (long).
I was impressed with alec_t's simulation, so thought I'd run some too. I went and downloaded a simulation package, LT Spice. In retrospect I should have been looking at simulations a lot earier. LT Spice is my new favourite package; it's awesome.
I also found a good tutorial called **broken link removed** which is not too easy and not too hard.
To start with I put some real world values into alec_t's working simulation to see how things would look. This involved 325V for each rail (230VAC line output has 325V peaks), and changing the load to 100 Ohms (effectively my load as I hope to run four inverters into a single 2kW element (26 Ohm element) and each will see a quarter of that (100 = approx 4 x 26), I think...).
The low pass filter required some investigation. LC (12 dB/octave) filters seem to be almost universal on the output of mains inverters but I needed to figure out the cutoff frequency to use. I read somewhere that a good guideline is to choose the cutoff frequency to be logarithmically half way between the desired output freqency (line frequency, 50Hz) and the switching frequency. The switching frequency I'm using is 1500Hz (see original post, above) being 50Hz with 30 bits per cycle = 50 x 30 = 1500. So the logarithmic half way point, Fc = sqrt(f1 x f2) = 274Hz. A good starting point if nothing else. Filters have particular responses, described by the Q of the filter. I chose a filter with a Q of 0.5 (Linkwitz Riley response) because that is a low value for Q and low Qs don't have peaks. I thought peaks would be a bad idea. Q = 1/d and d is called the damping. C and L can be calculated as follows:
C = 1/(2 PI z d f) and L = z d / (2 PI f)
z is the impedance of the load, 100 Ohms in my case, assuming it is predominantly resistive. The result, C = 2.9uF and L = 116mH. I used these values in the simulations.
I was interested in looking at the total harmonic distortion (THD) of the output. Lower is of course better. For reference a square wave is a sine wave with 45% THD. Three level modified square wave can achieve as low as 23.8% THD depending on the pulse width (126.8 degrees of conduction time (out of 180 degrees) for a single pulse) is the optimal duration. The 30 bit magic power sine wave I'm using is theoretically around 12% (as long as you don't include hamonics above the 9th, where things get bad, hence the need for a low pass filter).
Some
square wave, modified sine waveforms, as well as a
diagram.
Incidentally, in LT Spice if you add the directive .fourier{freq} V(output) and another one .param freq 50 (for 50Hz - see my Spice file) you can perform THD analysis in LT Spice. You need to create an output label at the point you wish to measure the distortion. The results appear under View->SPICE Error Log after you have run the simulation.
Hint: under simulate->control panel, turn off 1st and 2nd order compression in order to improve (lower) the noise floor of fast fourier transfors (FFT) too.
I changed the simulation time window from displaying the first two cycles (0-40ms) to instead skip the first cycle and display 20-60ms. The filter isn't working at time=0 and by delaying for one cycle you make sure the filter is at its proper operating point for the first point displayed (or FFTed). This is actually quite important and if you don't get this right your distortion measurements will be probably not what you expect.
Initially I ran the 30-bit simulation with L = 0 and C = 0. THD 11.8%. Then I put in the chosen values of L and C. THD 25.1%. It actually increased! I would have expected a filter to reduce the harmonics, not increase them.
Half bridge, 30-bit waveform: L = 0, C = 0. THD 11.8%.
Half bridge, 30-bit waveform: L = 116mH, C = 2.9uF. THD 25.1%.
(I have attached the LT Spice files to this posting, so hopefully they too will appear somewhere, perhaps at the end of the post)
(also note, if you open each thumbnail in a separate tab on your browser it's easy to compare waveforms jst by flipping between tabs!)
I decided to simplify things and changed to a three level modified square wave with single pulses of 126.8 degrees duration.
Half bridge: L = 0, C = 0. THD 23.8%.
Half bridge: L = 116mH, C = 2.9uF. THD 18.0%
So for the traditional modified sine wave the filter reduced the THD (as expected).
I still had at the back of my mind the suspicion that the 0 level not being driven to 0 in the half bridge was causing a problem. If one looks carefully at the half bridge waveform you can see the issue. The voltage is not being pulled to 0 but to the opposite voltage due to the fly-back action (the yellow trace). At the output after the filter (blue trace), the slope of the curve is steeper in that part of the waveform than ideal.
As a comparison I decided to model the full bridge where 0 levels are actaully driven to 0. Notice that for L = 0, C = 0, the output THD is the same as for the half bridge. Putting in real values for L and C we see the THD for the full bridge drop significantly compared to the half bridge (12.0% vs 18.0%).
Full bridge: L = 0, C = 0. THD 23.8%.
Full bridge: L = 116mH, C = 2.9uF. THD 12.0%
This shows that if you are interested in the harmonics and the advantages that three level PWM (unipolar PWM) can provide, that you shouldn't be using a half bridge but something else that can drive to 0, like a full bridge.
For the sake of completeness I have simulated the 30-bit waveform running a full bridge:
Full bridge, 30-bit waveform: L = 0, C = 0. THD 11.8%.
Full bridge, 30-bit waveform: L = 116mH, C = 2.9uF. THD 4.9%.
With the 30-bit waveform in the case of the full bridge, we see the filter lowers the THD in stark contrast to the half bridge situation where it actually increases.
The upshot, I think I'll re-design my output stage to be a full bridge.