PWM modulation and highpass filter - Page 1
Forum section: electronics / beginners

author: fonograph
author_rank: Frequent Contributor
timestamp: May 26, 2017, 04:10:27 pm
content: Imagine this,you have 1MHz 1bit PWM carrier,you modulate the carrier duty cycle with audio signal.If you lowpass that modulated PWM signal you get low freqency audio signal,but what would happen if you highpass that PWM at 20kHz before lowpass filtering it first? Obviously if you highpass it at 20kHz after its been "demodulated" or reconstructed by lowpass filter to remove that 1MHz PWM carrier,then you cut out the audio freqency signal,but if you highpass it before lowpassing,since its 1MHz carrier,way higher than our 20kHz highpass,will the audio information within that modulated carrier still be lost/cut out?

author: Kleinstein
author_rank: Super Contributor
timestamp: May 26, 2017, 04:14:41 pm
content: It somewhat depends on how you modulate the signal. If it is done the simple, straight forward way, there tend to be also signal contributions in the 1 MHz +-20 kHz band.

author: fonograph
author_rank: Frequent Contributor
timestamp: May 26, 2017, 04:21:52 pm
content: I know that is the case in Amplitude Modulated sinewave,you get upper and lower sideband.But this is duty cycle modulated squarewave,I am no expert,but I dont know if PWM carrier have upper and lower sidebands.Even if there truly was sidebands at 9980000Hz and 1020000Hz,coming back to my original question,that means if I highpass it at 20kHz,then the carrier with audio signal in it will be not affected since the lowest freqency in it is the low sidebands at 9980000Hz.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: May 27, 2017, 10:29:24 am
content: Since you asked aboutinformation, yes. The modulation appears on every harmonic, as sidebands mixed in above and below the harmonic.Only the fundamental is useful, because it resembles AM. If the PWM is biased at 50% duty and modulated above and below there, the 2nd harmonic averages zero, and the sidebands around it are doubled (which means it's 100% distortion, which shouldn't be surprising since this is around a harmonic!). All harmonics go similarly, so the 3rd harmonic has tripled audio, and so on. At some point, the multiplied audio overlaps itself from adjacent harmonics, and the HF spectrum begins to resemble noise with harmonic spikes on it, rather than spikes with sidebands.For example, a 1MHz carrier with 20kHz BW audio has:0-20kHz: audio (baseband)980kHz to 1020kHz: audio (sidebands above and below), 1000kHz carrier1960kHz to 2040kHz: doubled audio (sidebands), 2000kHz null harmonic (if biased at 50%)2940kHz to 3060kHz: tripled audio (sidebands), 3000kHz 1/3 amplitude harmonic (consistent with the average square wave form)...24MHz harmonic +/- 480kHz (24x audio) sidebands25MHz harmonic +/- 500kHz (25x audio) sidebands26MHz harmonic +/- 520kHz (26x audio) sidebandsNote that at this point, the sidebands overlap, so it starts to look more broadly noisy.Note also that, although in theory, even harmonics are always null (because of the 50% bias condition), in practice, they will be present due to the imperfect matching of rising and falling edges, and imperfect 50% balance.The harmonics themselves taper off as 1/N, until frequencies on the order of the rise/fall time, where they drop off as 1/N^2 or steeper. So a waveform with 10ns rise time will have notable harmonics out to 200MHz, then dropping off more rapidly beyond there.Audio can still be recovered, even from higher harmonic sidebands, but a nonlinear recovery is required, because of the multiplier. It could be done with DSP, but isn't tractable with analog circuitry.As for filters, note that HP * LP = LP * HP = BP (bandpass). It doesn't matter which order you put them in, or they can be mixed together in place (a typical BP filter prototype replaces the L's and C's of a LP design with L+C and L||C pairs, respectively). For an LC filter, matching is still required, so that you cannot simply wire them together directly, but some matching or termination impedance has to be introduced between them. For an active (op-amp) filter, matching doesn't matter.For power signals, rather than informational purposes -- note that only baseband (LP recovered audio) and the fundamental (AM) matter. These will recover useful power with the respective filter type (LP or BP), while the remaining signal power is reflected back to the amplifier (hopefully without causing high pulsed currents, which is bad for amplifiers).Tim

author: fonograph
author_rank: Frequent Contributor
timestamp: May 27, 2017, 07:30:31 pm
content: That was excellent post but I am still not sure if I can highpass Class D pwm carrier,then lowpass it and get my audio signal back.I think I made mistake by using word "information",I dont care if some information gets lost in the highpass process,I want to know if the audio signal can be recovered from the PWM carrier after going through highpass filter by using simple analog lowpass filter.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: May 27, 2017, 07:55:31 pm
content: HP at high frequency followed by LP at low frequency means you've filtered 100% of the signal, period. So, no, no significant signal power in baseband.Tim

author: MagicSmoker
author_rank: Super Contributor
timestamp: May 27, 2017, 08:36:08 pm
content: Quote from: fonograph on May 27, 2017, 07:30:31 pmWhat are you trying to do, exactly? The only useful reason I can think of to high pass filter a Class-D audio PWM signal is to remove infrasonic information from the carrier (e.g. - "rumble" in the argot of vinyl LP recordings). However, this filtering should either be done in the digital domain or else combined with the low-pass output filter (which then makes it a bandpass filter).

author: vk6zgo
author_rank: Super Contributor
timestamp: May 28, 2017, 02:06:49 am
content: If you start out with a rectangular wave which "returns to zero" ( has a dc component) & Pulse Width modulate it, a LP filter (with dc pass ability), or a simple CR Integrating network will allow you to recover the original modulating signal.If you pass the signal through a HP filter first, (which normally will remove the dc component), you will not recover your modulating signal unless you run the modulated signal through some type of dc restoration circuit followed by the LP filter ( really just an envelope detector).