LP Filtering Squarewaves After Mixing

Assuming that by "mix" you mean "multiply", then there will be many different components of the mixed sine waves - eight to be precise. If you only want the lowest of these components, they'll be well below the audio range of any of the input signals (since you said they're close in frequency) you should be able to get away with computing the parity (use three dual-input XOR gates) and LP filter that.

Parity is multiplication in the digital realm.

Clifford Heath

Reply to
Clifford Heath
Loading thread data ...

I have four square waves of slightly different audio frequencies, and want to derive something resembling a mix of four sinewaves of the same frequencies.

Is there any disadvantage in mixing the squarewaves _before_ I LP filter them so I can then run the composite signal through just one filter, and not have to use four separate ones?

I understand the latter would be more precise in processing each frequency, but I am willing to compromise.

Mark Granger

Reply to
mgrainger

Also, is there any particular type of filter that would be most suitable for the purpose mentioned in my OP?

Thanks,

Mark Granger

Reply to
mgrainger

"Mixing" to an audio guy is adding.

"Mixing" to a radio guy is multiplication.

Which is your "mixing"?

--
www.wescottdesign.com
Reply to
Tim Wescott

If by mixing you mean summation, then no, as far as I know there's no major advantage to low-pass filtering the square waves before summing. The only thing I can think of is that the summing amplifier might have nonlinearities that would cause intermodulation distortion and subharmonics to appear, but I'm not sure how much of an issue this might be at audio frequencies

Reply to
bitrex

** Nope.

The lowest harmonic needing attenuation is the third - so a steep filter ( say -24db/oct ) commencing just above the highest of your square wave frequencies will do a reasonable job of shaping them into sines.

The result is gonna be a weird sounding mess of beat patterns though.

.... Phil

Reply to
Phil Allison

I am an audio guy who knows nothing about radio.

Just as well, since "multiplication" to too long a word for me to use ;-)

Mark Granger

Reply to
mgrainger

Thanks for your advice Phil.

For anyone who is interested, I believe the third illustration down on this page shows such a filter.

formatting link

Mark Granger

Reply to
mgrainger

Why don't you synthesise sine waves if that is what you want?

It is difficult to filter all the harmonics out of a square wave!

Even a relatively steep low pass filter will only get you so far at reducing the third harmonic.

Integrating the original square waves to triangle waves and then a bit of diode shaping would probably be the least worst crude option.

--
Regards, 
Martin Brown
Reply to
Martin Brown

** A single -12dB/oct filter fed with a square wave at the 3dB down point gives a visually perfect sine wave on a scope. THD being a little over 1%.
** The OP's idea is much simpler & performs far better.

.... Phil

Reply to
Phil Allison

Since the frequencies are close together, one filter won't be far off optim um, true. Depending on the details, the OP might be able to choose a filter with a deep null near the third harmonics, which will help quite a bit.

To the OP: if you pick an op amp active filter, be sure to knock the corner s off the input waveform with a passive RC section before the op amps. Othe rwise you may get a lot of distortion from slew-limiting.

Cheers

Phil Hobbs Phil Hobbs

Reply to
Phil Hobbs

Yes.

You can design individual filters for each, making them as sharp as possible for the exact frequency. Then mix later.

In practice, if the frequencies are within a 10% span or so, this will make only academic difference for all but the sharpest filters. Or to put it another way: you're better off by adding more orders to a single filter, than using a slightly lower order times N channels!

Tim

Reply to
Tim Williams

Then you can mix followed by filtering, with the various caveats already stated.

--

Tim Wescott 
Wescott Design Services 
http://www.wescottdesign.com
Reply to
Tim Wescott

yes you can mix (add) first and then filter as long as the mixer (adder) has no non-linearity.

Also if the frequencies are close to each other and don't move much, you may find it more effective to use a band pass filter instead of a low pass filter.

You can get a steeper roll off for the same number of parts.

Mark

Reply to
makolber

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.