# Don Lancaster's Magic Sinewaves

For several years now Don Lancaster is promoting magic sinewaves. They are strings of binary digits (like 420 bits for a full sine cycle) that, when used to drive a digital switch (MOSFET/IGBP), result in quite a clean sinewave (only very high harmonics remaining). For more details, please read the linked article or any other he wrote on that matter.

Had anybody actually used these for anything? The idea seems quite useful but I cannot find any information about these (that did not come from Lancaster himself).

-
I think they assume ideal switches (which should be true for MOSFETs and IGBTs at several kHz). Note that this has nothing to do with resonant converters. – jpc Mar 22 '11 at 16:38
Sounds like a scam to me. I don't ever trust technical papers that are self-published and have numerous advertisements for the authors work. It may very well work, but there is no reason any signal processing guy can't figure it out on their own. – Kellenjb Mar 22 '11 at 20:09
@Kellenjb You are right but OTOH his typography and drawings are quite nice (especially if you consider he is coding them in raw PostScript) and that there are many really interesting ideas in his other articles as well (he published them for the last 20 years or so). – jpc Mar 22 '11 at 21:09
@Kellenjb, Don Lancaster has an extensive history as a well-known and well-respected EE, designer, and technical writer (1969-1996 in dead tree books, plus magazine columns). Employed by or contractor to: Apple, HP, Motorola, Adobe, Western Digital, etc. He may be odd, but he's a smart odd. – mctylr Apr 3 '11 at 4:44
dropping by to see no real answers still on this one, the saga continues! – boomhauer May 8 '12 at 6:00
show 1 more comment

I think Magic Sinewaves is essentially the sames as "selective harmonic elimination", a well known method in Power Electronics.

This paper has a description of the theory and some experimental results.

-
In the audio world we call that "Noise Shaping". – David Kessner Apr 3 '11 at 23:40
Yes, this looks like the same thing, thanks! – jpc Apr 4 '11 at 13:50
Alejandro, great find, does appear to be the same from what I can determine. I'm still curious how commonly these are implemented though, any ideas? – boomhauer Apr 4 '11 at 16:26

Yes, this will work. He is switching at a much higher frequency then required and then he is slowly changing what percentage of time he is on 0s to being on 1s. This means that the average of the signal is slowly going to shift up. By matching his rate to the rate change of a Sinusoid he can do this very very well.

The issue will probably be the low pass filter, non-ideal components to it will allow odd harmonics though, but a power saving LC filter can probably do the trick by bandpassing for the required frequency.

This could easily be done with DACs and a type D amplifier, he is just cutting out the need of a DAC which is a cost savings.

-
 I do not see any errors in the theory but I am really curious if it will work in practice. Especially since it is already several years since Don first wrote about this and still no one uses it. – jpc Mar 22 '11 at 21:16 @jpc, I really could see issues running the higher frequencies through the LC lowpass. I want to build it now also. – Kortuk♦ Mar 22 '11 at 21:22 actually you hav eit wrong- he's switching at a lower freq than would normally be used for a plain-ol PWM output, but is using a high-freq clock to time the edges of the state changes very precisely in order to finely tune the lenght of each pulse to kill off harmonics. – boomhauer Apr 5 '11 at 0:35 This sounds a lot like the Tripath class-D design (which they called class-T) where they vary both the frequency and the on/off state. They claim it generates a cleaner signal. – Noel Grandin Apr 13 '11 at 9:03

I can't load the linked PDF, but from your description it sounds like a specific instance of a Class D Amplifier.

-
Regarding the PDF: He is writing his own PostScript code to layout the articles and then converts them to PDF so maybe this is triggering a bug in your reader. – jpc Mar 22 '11 at 19:55
The question was "has anybody actually used these for anything?" which I took to mean digital pulse trains driving switches to produce analog output. The answer is yes: Class D amplifiers are used extensively in audio amplifiers. – Ben Jackson Mar 22 '11 at 20:02
@jpc, I will support @BenJackson here. Class D amplifiers are the new wave for power savings, many cell phones are starting to use them. A switching regulator is almost just like a class D regulator, except that it has a set target voltage instead of a slowly changing one. – Kortuk Mar 22 '11 at 20:12
@Kortuk I find it really entertaining that you used "build" and "matlab" in the same sentence. :) – jpc Mar 22 '11 at 21:01
@Ben I don't believe that $\Delta\Sigma$ modulators are optimizing for the switch counts (actually I believe it is to the contrary). – jpc Mar 22 '11 at 21:21