Papers on the Mathematical Basis for Using PWM for Sine-Wave Generation

Click For Summary
PWM is favored in inverters for DC-AC conversion due to its efficiency in generating sine waves while minimizing harmonic distortion. Unlike square waves, PWM allows for a varied duty cycle that can adapt to changes in load and input voltage, resulting in a more stable output. The harmonic content of PWM is managed effectively, making it easier to filter out unwanted frequencies compared to traditional square wave filtering methods. Additionally, PWM circuits can be smaller and lighter than those required for filtering square waves, which often necessitate larger inductors and capacitors. Overall, PWM provides a more efficient and flexible solution for sine wave generation in inverter applications.
  • #31
The OP specified inverter technology (power based electronics) so that's my working premise of signal design. There are huge numbers of square wave (some are modified to use several steps from zero to peak voltages) power inverters that don't bother internally to filter square wave harmonics to something approaching a sine wave. The harmonic 'filter' is the load. For a typical AC to DC power modern switching power supply in a typical modern PC computer and monitor the shape of the incoming AC (most will also take an equivalent DC input voltage) from a inverter is usually not a problem as the incoming AC is converted to a DC power bus for high-frequency switching to the desired set of DC voltages. For the induction motors commonly seen in commercial products that square wave is usually a problem.

The load still acts as a filter but the harmonic content sees the motor winding as more of a resistive load causing overheating and excessive current from the inverter. Waveform sensitive loads like motors (reactive loads in general) really need the power efficiency and ease of signal purity PWM can deliver with proper design.

https://toshiba.semicon-storage.com/info/docget.jsp?did=61546
 
Last edited:
Engineering news on Phys.org
  • #32
Averagesupernova said:
@DaveE I did notice as I dialed the fundamental frequency around harmonics would definitely change. Being tied to a fixed sample frequency it was unavoidable. It was also 'good enough'. I haven't read the link so I apologise if I misinterpret what it is about.
That's exactly it. People like to move the noise away from the carrier, typically minimizing the 3rd or maybe the first several harmonics. Depends on the application and your filtering, of course. The common application is to keep big motors from getting hot; they really don't need great sinewaves after all.

BTW, I didn't read it either. I would bet only about 4 people have actually read through the whole thing. I stumbled across it looking for a much simpler article I remembered about this in one of those free magazines (Electronic Design, EDN, Power Technology, etc.).

Also, here's an odd one, a mix of PWM and multi-level. And no, I didn't really read this one either. I just linked to it for the waveform pictures.
https://www.researchgate.net/publication/326700690_Harmonics_reduction_of_a_five-level_inverter_by_unbalanced_carriers_and_over-modulation_techniques
 
  • #33
DaveE said:
More than y'all probably wanted to know about the best way to minimize harmonics in a multi-level stepped waveform. If you aren't going to do high frequency PWM, you can choose the "best" time to switch your waveform.

https://vtechworks.lib.vt.edu/handle/10919/35333
In the first page, they show a 3 bit ADC (7 level) output which is a lot harder to make at high power without very low efficiency. So PWM is clearly a better option.
The detailed spectrum of a PWM waveform will have components which are spaced by the basic sampling frequency, with sidebands of the wanted mains frequency. That's the same idea as for a multi-level ADC. The point is that the only low frequency component will be the 50 or 60 Hz mains and there will be a large gap to the first of the comb of frequencies due to the sampling.
I don't understand why there would be a problem with the motor dissipating the power of the sampling products because (probably?) they could be filtered out. But it may be that filter inductors components would be as lossy as a motor core if they are to handle seriously high powers.The 'worst' low harmonic content will be for square wave as there's no advantage from the 'sampling'. I don't know if a highly super-sampled one bit ADC would be a contender??
 
  • #34
Off topic a bit but while discussing sampling, built up sine waves by stepping, etc, I thought I'd mention something that I found interesting. When the sample frequency was very high in comparison to the desired synthesized waveform, a significant number of steps no longer had a period of the sample frequency. In other words, the changing voltage of the desired signal occurred so slow that one sample to the next did not cause a step in the waveform. This causes activity in the spectrum at half the sampling frequency. This sort of work was outside of my normal area so it was a bit surprising at the time. But, it shouldn't have as it is really just basic math.
 
  • #35
Averagesupernova said:
a significant number of steps no longer had a period of the sample frequency.
What exactly do you mean by this? Is it a time or frequency domain statement? Are you saying that, near max and min values, the quantised samples don't change in (digital) amplitude? This isn't surprising if the baseband waveform changes less than 1 bit.
Overall, it's a modulation effect. The sample frequency component (and its harmonics) is modulated by the baseband signal. Each comb frequency will have sidebands which will have the same basic structure as the baseband signal. If a single tone is being A/D coded (or synthesised) then the detailed sideband structure will be simpler and sidebands 'frozen'.
 
  • #36
@sophiecentaur I'll describe it with a little more detail.
-
I was using an 8 bit D/A with sine values stored in ROM. The address of the sine lookup table was also 8 bits wide but was derived from a 24 bit (or wider, can't recall) counter. I simply took the most significant 8 bits from this counter every 50 microseconds and used this as the address for the sine lookup table. Depending on how I stepped through the 24 bit counter would determine the frequency I wanted to synthesize. If you hadn't put it together yet, it's a numerically controlled oscillator.
-
Now where it got interesting is if I stepped through the counter in such small steps that the sine value didn't change from one 20 microsecond step to the next. I didn't really worry about it since the frequencies I wanted to synthesize were not in the range this occurred.
 
  • #37
Averagesupernova said:
I was using an 8 bit D/A
Averagesupernova said:
50 microseconds
I see. You were using a sample rate of 20kHz and a quantisation of 1/28 relative to maximum value. For synthesising a 50Hz sinusoid, that would be very healthy. That makes 400X oversampling (or perhaps you could say 200X). Not surprising that many of the samples were 'repeated', near +1 and -1. The value of sin x doesn't change a lot around max and min. With 200X oversampling, you can throw away a lot of the resolution per sample.

Single bit DACs generate (of course) a lot of quantisation noise (distortion) but the power spectrum is spread out over the gap between zero and the sampling frequency. The final low pass filtering reduces the amount of noise power pro-rata, according to the base band bandwidth. Very low demands on the filter, in many cases if you can handle the high sample frequency.

As a matter of interest, what sort of maximum frequency will your synthesiser deliver?
 
  • #38
I generally don't need it to generate anything above 3 KHz so the filter was set up to start cutting slightly above this. If I recall it was a 4 pole salen-key. However, that is not to say that if you plug the right numbers into it you can generate above that. It can go down into millihertz but there was really no need. Down to 75 or 80 Hertz was good enough.
-
Edit: For those following this, you probably realize that if there is no need to go down to millehertz then you may wonder why the counter is so large at 24 bits. After all, it takes forever to overflow a counter that size clocking through one count at a time every 50 uSeconds. The reason is for fine resolution within the band of interest. Numerically controlled oscillators are a fascinating subject. To me at least.
 
Last edited:
  • Like
Likes sophiecentaur
  • #39
Probably seems like beating a dead horse here, but I thought I'd share this image as well.

mpx96wav.jpg


-
What you are seeing is a stereo MPX signal without the pilot. The MPX signal consists of baseband audio and a double sideband suppressed carrier at 38 KHz. The signal in the link shows both left and right channels carrying the same tone. So the 38 KHz signal is carrying the same tone as the baseband audio. Notice how similar it looks to a stepped waveform. The spectrum looks similar except the 38 KHz does not have any harmonics.
-
Comment about stepped waveforms having a modulation effect is spot on.
 

Similar threads

  • · Replies 10 ·
Replies
10
Views
2K
Replies
7
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K
Replies
16
Views
3K
  • · Replies 10 ·
Replies
10
Views
8K
  • · Replies 139 ·
5
Replies
139
Views
10K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 11 ·
Replies
11
Views
6K