# A non PWM <5% distortion sinewave inverter.

Status
Not open for further replies.

#### Warpspeed

Sinewave inverters seem to be a subject of particular interest here on the Forum, and high frequency PWM seems to be the method of choice.
But it is not the only method.

Generating PWM sinewave is not that difficult, but filtering out the high frequency switching noise to an acceptable level without creating other problems can often be a challenge.....

Its the post switching filtering that is the problem.
Any shunt impedance is going to load down the inverter and create a constant useless power drain. Series impedance just degrades voltage regulation, and loses us even more precious power.

Hard switched modified sinewave inverters can be quite useful, but many motor loads are not happy with this and run hot, or complain acoustically.
So the low harmonic distortion of something much closer to a pure sinewave becomes well worth the effort for mixed loads typical of a domestic application.

Where I am, harmonic distortion of incoming grid power usually measures around 4%, sometimes a bit more, sometimes less. A typical modified sinewave inverter has something like 40% actual measured distortion. It can vary depending on the exact duty cycle and slew rate, but its always pretty high.

So something around 4% harmonic distortion should do us very nicely, anything better than that is probably overkill for normal domestic power.

So the idea behind all this is to come up with a simple straightforward easily designed and efficient power output stage that requires little or no post filtering to reach (or better) our harmonic distortion goal.

It can be done by generating a multi step sinewave.
The more and smaller the steps, the closer it approaches a sinewave.
Although the voltage goes up and down in discrete jumps, the current waveform in an inductive load will look far smoother. So its much more motor friendly than the voltage waveform might appear.

The idea is to start off with something that looks exactly like a modified sinewave inverter, because that is what it is.
Basically (for this example) something that hard switches from 0V / +300v / 0v / -300v / 0v

A second "medium" power inverter also hard switches across the same +300v and -300v dc rails and drives a transformer with an exact 3:1 step down ratio.
The secondary voltage can then be either zero, +100v or -100v

The secondary of this transformer is connected in series with the "big" inverter so by adding or subtracting 100 volts we can generate 100 volt steps from -300v to +300v.

In fact three steps up, zero, and three steps down.
Harmonic distortion should be around a measured 11% without filtering, and its all hard switched at low frequency for lowest switching and conduction losses.

We then add a third "small" inverter with a 9:1 transformer to generate 33 volt steps.
That gives us nine steps up to +300v plus an extra step to +333v, ten steps up and ten down each half cycle.
Or 21 steps peak to peak including zero.

Measured distortion is around 4% and it looks pretty nice on an oscilloscope. You could fit a fourth stage and very easily get well below 2% distortion but I never bothered.

The drive waveforms are very easy to generate.
A long counter is clocked at 3.2768 Mhz and directly addresses a 2Kx8 EPROM.
The EPROM just cycles through every address sequentially, 10uS per address, completing 50 cycles per second. An eight bit latch on the data outputs locks in stable data to drive the IGBTs in the three half bridge power output stages.
Additional IGBTs clamp the respective output to ground when the required output is zero volts for each of the three output stages.

It all works very well, its simple, very efficient, and worked very first attempt without any problems.

The two transformers I just happened to already have here worked perfectly for a 1.5Kw prototype.
One is 240v to 80v (40+40v) toroid giving a 3:1 ratio.
The other 240v to 26v, close enough to 9:1 ratio.
The voltage steps are not perfect, but are close enough to easily meet the target harmonic distortion.

Its been a wonderfully simple project where everything worked very first go without a single problem !!!

Next step will be to fit larger more optimum transformers to get me up to the 4-5Kw range.

Current limit forces the main counter to zero, which is the exact zero crossing point in the data.
Reset the main counter, and everything turns off in only 1.5uS.

A 20A 1mH powdered iron dimmer choke (standard fitment for large SCR light dimmers) in the ac output limits di/dt so even with a sudden dead short, the IGBTs are all turned off before fault current can rise to dangerous levels.
This choke also knocks the edges off the output waveform, but EMI problems are going to be pretty minimal anyway using this approach.

This thing works far better than I ever dared to hope.
I have been messing about with PWM inverters for years, this wins hands down for lack of problems.

Its still at the "Mickey Mouse" prototype stage but working well enough to fully test.

Cheers, Tony.

#### Attachments

• 40.9 KB Views: 45
Last edited by a moderator:

#### Audioguru

In his book, Cmos cookbook, Don Lancaster shows a stepped sinewave. It is linear so it wastes a lot of power making heat.
Your stepped trianglewave will also waste a lot of power.

A "modified sinewave" is actually a modified squarewave. A PWM sinewave inverter uses a very high switching frequency so its output filter is simple and efficient. Class-D audio amplifiers are the same.

#### Warpspeed

Its not a stepped triangle wave, it may look that way in the very roughly drawn sketch I drew up, because I am not a good draughtsman.
The steps are equal height, but the timing of the steps is definitely not linear.

An EPROM is programmed to switch each step with 10 microsecond time resolution (2,048 available steps over 20mS).

You need to program the sine values into the EPROM, so the steps occur non linearly in time, so the slope is continually changing. If done with care, the distortion can be kept acceptably low.
You can generate any king of waveform with this system, its really a form of high power digital to analog conversion.

Its really a series of points in a matrix, 2,048 points wide, and 21 points high.
You just pick the closest points to switch each step compared to true correct sine values.

Where is the power loss ? Its hard switched.

I only have a cheap and nasty camera that will not focus very well up close.
Its getting late here now, but tomorrow I will attempt to photograph the actual waveforms if that will help.

#### schmitt trigger

General Electric's SCR Manual 5th edition, had a similar conceptual stepped waveform. It used SCRs which were difficult to switch off, though.

Having myself worked in power electronics and motors, the most important harmonics to attenuate are the triplens (3rd, 6th, 9th...) and the 5th.

From a practical point of view though, there is no need to go past the 6th, meaning you can switch at 300/360 Hz (depending on the mains frequency) which nicely accommodates the range of the better magnetic steels without excessive core loss.
If you are in a 50 Hz system, you could push your luck a little and switch at 450 Hz....going higher than that does not really accomplish much and the losses start to increase.

#### Audioguru

PWM uses hard switching and is very efficient. The width of the pulses determines the average output voltage after filtering. If there are a lot of pulses per wave then the filtering is simple.
Voltage steps require a variable voltage divider that has current through it all the time that wastes power.

#### Warpspeed

Re: A non PWM &lt;5% distortion sinewave inverter.

If you are in a 50 Hz system, you could push your luck a little and switch at 450 Hz....going higher than that does not really accomplish much and the losses start to increase.
Yes you are quite right.
In fact I was particularly interested in investigating transformer losses for this application.

As frequency increases, the flux density obviously falls, and so should the magnetizing current.
But eddy current losses increase with frequency.
The overall effect seems to be that compared to 50Hz operation, the combined total no load losses dip to a low at around 350Hz for the toroids I am using, and rise fairly sharply above that frequency. The manufacturer provides loss curves up to 400 Hz so its not pushing the envelope too far.

Another aspect, the 3:1 transformer operates at one third total output power (500vA) for a 1.5Kw inverter, so its small for the output power.
The 9:1 transformer is only 160 vA in my prototype so its even smaller. Losses are proportionally higher, in the small transformer, but overall it has worked out pretty well using +/-300V dc bus, and off the shelf commercial transformers with 240V 50Hz primaries.

In the US +/-150v bus would be more appropriate with US made 110 volt transformers.

I intend to explore the transformer possibilities a bit deeper, but I can see little room for improving on what I already have, except scaling it up in size.

I am still at the initial working prototype stage, and there is still much test and measurement to do.

- - - Updated - - -

Voltage steps require a variable voltage divider that has current through it all the time that wastes power.
This is probably more efficient than high frequency, because the hard switching is done at very low frequencies, so switching losses will be vastly lower. Not a big point, but every bit helps.
Total elimination of any output filtering is the big bonus.

Agree that very high frequency PWM is a lot easier to filter, but the switching losses will be higher too, so its difficult to say which approach is best.

There is no variable voltage divider.
All the switching is done directly at +/- 300 volts, so IGBT conduction losses are proportionally very low.

Voltage reduction occurs in the two transformers, which are small in size for the total power throughput. Transformer efficiency can be quite high with grain oriented silicon toroids with suitably heavy low resistance windings.

#### schmitt trigger

Do you have a scope that does FFTs or a good power analyzer?
It can help you visualize the individual harmonics, and focus to minimize the ones I mentioned.

#### betwixt

##### Super Moderator
Staff member
Adding and subtracting small increments to build the wave shape is one option, another, which requires careful transformer design is to use multiple primaries on a single transformer. Consider the simplest arrangement of two primaries, call them A and B:

1. Both windings are 'off'
2. Current is switched through winding A
3. Current is switched through winding B
4. Winding A is turned off
5. Winding B is turned off.

So at steps 1 and 5 there is no current, at steps 2 and 4 there is 1x current and at step 3 there is 2x current, giving a stepped up and down waveform rather than a square wave. The principle can be expanded so more windings overlap to create more steps. It has the advantage that each winding and it's driver circuit has approximately the same duty cycle.

Brian.

#### Warpspeed

Re: A non PWM &lt;5% distortion sinewave inverter.

Do you have a scope that does FFTs or a good power analyzer?
It can help you visualize the individual harmonics, and focus to minimize the ones I mentioned.
What I have is an ancient Hewlett Packard distortion analyzer. It measures total THD, and there is an output of the residual after a pure fundamental frequency has been subtracted.

Most of the 4% THD would be fairly high order harmonics, possibly fairly easy to filter out if you wished to do that.
For me, 4% total THD unfiltered is as good as the incoming mains supply, so I am content with that.

The first picture is pretty horrible, but its 100v per division, and you need to use your imagination a bit. My camera simply will not focus up close, and a long shot is just too small to see.

Second picture, it was built to be mechanically simple and very easy to work on (not beautiful) and it still needs most of the wiring to be completed, but the electronics all all there, working, and in place.

- - - Updated - - -

Adding and subtracting small increments to build the wave shape is one option, another, which requires careful transformer design is to use multiple primaries on a single transformer. Consider the simplest arrangement of two primaries, call them A and B:

1. Both windings are 'off'
2. Current is switched through winding A
3. Current is switched through winding B
4. Winding A is turned off
5. Winding B is turned off.

So at steps 1 and 5 there is no current, at steps 2 and 4 there is 1x current and at step 3 there is 2x current, giving a stepped up and down waveform rather than a square wave. The principle can be expanded so more windings overlap to create more steps. It has the advantage that each winding and it's driver circuit has approximately the same duty cycle.

Brian.
I had considered using four stacked toroids with individual primaries, and one secondary around the whole lot.
As normal 240v commercial off the shelf transformers work better than I dared to hope, I think I will stick with that.
Individual flat transformers are also a lot easier to package side by side than one huge single lump.
But you are quite right Brian, there are several good ways to skin this particular cat.

As I am only using six data bit outputs from my EPROM, a third and even smaller 50Va transformer would be quite easy to add.
Thus giving three times as many 11 volt steps. It would be an even smoother output waveform with 1% to 2% distortion.

Many possibilities with this.

Last edited:

There are many such inverter circuit details on internet. They are especially used for high power. For example this has 81 steps.

You have practically done it. Are you going to share schematic and programing code?

andre_teprom

### andre_teprom

points: 2

#### mtwieg

So you're basically doing a transformer coupled multilevel converter? You can get even better results by moving the isolation from the output to the input side, allowing you to use small HF SMPS transformers instead of steel 50/60Hz transformers. What you end up with is a stacked H-bridge, similar to what is used for MRI gradient amplifiers, which are basically audio amps in the MW range.

If you need low distortion, PWM is always going to get you the highest possible power density.

#### Warpspeed

Yes, this is definitely not a new or an original idea.
Many of these ancient and now largely forgotten techniques can be well worth revisiting.

As many people here on the Forum are discovering, pwm is not without its own set of challenging problems for the circuit designer, especially at higher power levels.

The main attraction of this for me was that it is something a bit different to have a go at.

For anyone deciding to build themselves a reasonably low distortion inverter at the multi kilowatt level, this approach has far fewer problems to overcome.
The component count is certainly higher, but a lot of it is repetition, and multiple identical circuit boards are an effective solution.

It was the magnetics that initially had me a bit worried, but both theoretical investigation and some practical testing has proved off the shelf tape wound grain oriented silicon toroids work just fine, with "normal" mains voltage primary windings.

The higher frequencies also considerably reduce the flux swing, and that gets us around the flux doubling problem that these toroids are notorious for.
All things considered, the potential problems with the magnetics seem to have all resolved themselves very favourably.
The main thing seems to be getting the turns ratios fairly exact. otherwise your steps will not be even.
Fortunately, the secondaries are on the outside so its not a big deal to add, or remove a very few turns.
Just select transformers that have a secondary current rating similar to the inverter output current rating, and you cannot go too far wrong.

In this example, I used 300 volt dc link voltages to generate 235 volt rms output.

I could have added more steps, for example 300 + 100 + 33 = 433 volts peak, and could have reached 306v rms output with the same link voltages.

There is great flexibility in choosing dc input and ac output voltages, but the required switching points and number of steps need to be worked out on an individual basis for each application.

You could also use multiple lookup tables and do some autoranging, so that the ac output voltage can be stepped up and down in very fine increments.
Think about what happens if you make every step just 1% wider in time.
The rms output voltage increases, even with no extra added steps.
Very fine control of output voltage would be possible that way.

#### Warpspeed

Re: A non PWM &lt;5% distortion sinewave inverter.

You have practically done it. Are you going to share schematic and programing code?
Schematic easy.
Lookup table will depend on your specific input and output voltage requirements, and number of steps, and will vary with the application.

Eprom address is updated every 10uS, output latch clocked every 610nS.
The reason for this is the current limit forces the address counter to zero, and we want to turn all our IGBTs off, with minimum delay.

Eprom data is inverted. Logic high is off.

At the top of the schematic is an H bridge driver to supply 50 Khz power to the nine isolated gate drivers, and other isolated supplies such as digital volt and amp meters.
You could end up needing a dozen or so individually isolated supplies !

- - - Updated - - -

There are three identical power boards.

The only odd thing about this is the way the two opto isolator LEDs are connected in inverse parallel. This was an afterthought, but it pretty much guarantees that both opto isolators can never be on at the same time.

Last edited:

points: 2

#### Warpspeed

Are you going to share schematic and programing code?
O/k, here is some code......

There are three inverters, each with three possible output states, so we have 3x3x3 = 27 possible output combinations. That would be thirteen steps positive, thirteen steps negative, with a zero step in the middle.

My prototype only uses 21 steps, because that sets my target output of 235v rms from +/- 300 volt dc supply bus.
More steps would give a higher output voltage and better performance.

But here is the 21 step data I used.
Its a 2K eprom with address range 000 to 7FF
Only the six lower bits are used, and the data is inverted. Logic hi = off

Code dot - [expand]1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
000-010 3F  (zero crossing all off)
011-031 3E
032-052 39
053-074 3B
075-098 3A
099-03D 25
03E-0E6 27
0E7-114 26
115-14A 2D
14B-198 2F
199-267 2E (+ve peak ten steps up)
268-2B4 2F
2B5-2EB 2D
2EC-318 26
319-341 27
342-367 25
369-38B 3A
3AE-3CE 39
3CF-3EF 3E
3F0-40F 3F (zero crossing)
410-430 3D
431-451 36
452-473 37
474-493 35
494-4BD 1A
4BE-4E6 1B
4E7-513 19
514-54A 1E
54B-597 1F
598-666 1D (-ve peak)
667-6B4 1F
6B5-6EA 1E
6EB-718 19
719-741 1B
742-766 1A
767-78A 35
78B-7AC 37
7CE-7EE 3D
7EF-7FF 3F (zero crossing)

That should at least produce something to get you started.

Last edited by a moderator:

points: 2

#### The Electrician

##### Full Member level 5
Is your +/- 300 volts derived directly from batteries or solar panels, or is it regulated?

#### SunnySkyguy

Do you have snubbers across each switch?

Thanks for sharing, I'll surely try this. I was already considering this approach for making inverter for air-conditioning system, working on 220V AC supply, due to the same reason you described. I will try to put this LUT in PIC chip.

#### schmitt trigger

Warpspeed:
All in all, I'm suitably impressed.

Thanks for sharing. There is a LOT of time, money and effort spent into this project.

Status
Not open for further replies.