Author Topic: PWM modulation and highpass filter  (Read 2264 times)

0 Members and 1 Guest are viewing this topic.

Offline fonographTopic starter

  • Frequent Contributor
  • **
  • Posts: 369
  • Country: at
PWM modulation and highpass filter
« on: May 26, 2017, 04:10:27 pm »
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?
« Last Edit: May 26, 2017, 04:12:51 pm by fonograph »
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14183
  • Country: de
Re: PWM modulation and highpass filter
« Reply #1 on: May 26, 2017, 04:14:41 pm »
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.
 

Offline fonographTopic starter

  • Frequent Contributor
  • **
  • Posts: 369
  • Country: at
Re: PWM modulation and highpass filter
« Reply #2 on: May 26, 2017, 04:21:52 pm »
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.
« Last Edit: May 26, 2017, 04:25:23 pm by fonograph »
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21660
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: PWM modulation and highpass filter
« Reply #3 on: May 27, 2017, 10:29:24 am »
Since you asked about information, 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 carrier
1960kHz 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) sidebands
25MHz harmonic +/- 500kHz (25x audio) sidebands
26MHz harmonic +/- 520kHz (26x audio) sidebands

Note 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
« Last Edit: May 27, 2017, 10:31:40 am by T3sl4co1l »
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: fonograph

Offline fonographTopic starter

  • Frequent Contributor
  • **
  • Posts: 369
  • Country: at
Re: PWM modulation and highpass filter
« Reply #4 on: May 27, 2017, 07:30:31 pm »
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.
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21660
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: PWM modulation and highpass filter
« Reply #5 on: May 27, 2017, 07:55:31 pm »
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
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline MagicSmoker

  • Super Contributor
  • ***
  • Posts: 1408
  • Country: us
Re: PWM modulation and highpass filter
« Reply #6 on: May 27, 2017, 08:36:08 pm »
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.

What 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).

 

Offline vk6zgo

  • Super Contributor
  • ***
  • Posts: 7585
  • Country: au
Re: PWM modulation and highpass filter
« Reply #7 on: May 28, 2017, 02:06:49 am »
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).
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf