Author Topic: Reduce PWM ripple  (Read 2139 times)

0 Members and 1 Guest are viewing this topic.

Offline Terry BitesTopic starter

  • Super Contributor
  • ***
  • Posts: 2393
  • Country: gb
  • Recovering Electrical Engineer
Reduce PWM ripple
« on: January 21, 2022, 05:58:04 pm »
Want to reduce PWM ripple? RC LP filters will only get you so far, active filters need opamps. What about this idea... Ripple plus antiripple * Untitled.pdf (241.25 kB - downloaded 179 times.)
« Last Edit: January 21, 2022, 06:00:03 pm by Terry Bites »
 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3036
  • Country: us
Re: Reduce PWM ripple
« Reply #1 on: January 21, 2022, 06:28:02 pm »
Are X1 and X2 standard CMOS inverters -- 74HC04/CD4049?
 

Online moffy

  • Super Contributor
  • ***
  • Posts: 1738
  • Country: au
Re: Reduce PWM ripple
« Reply #2 on: January 21, 2022, 11:28:21 pm »
If you use a sample and hold synchronised to the PWM frequency, after filtering, you can almost completely eliminate the ripple.
 

Offline Cerebus

  • Super Contributor
  • ***
  • Posts: 10576
  • Country: gb
Re: Reduce PWM ripple
« Reply #3 on: January 22, 2022, 12:44:23 am »
There's a full write up of how to do this trick of reducing ripple using what's effectively a differentiator capacitor in "The Art of Electronics The X Chapters". pp 383-385. You can trade off between reduction of ripple and settling time.

I've simulated the AoE scheme (which only uses first order passive filters) in LTSpice with a ±9V, 20kHz PWM square wave settling to a ripple of 22 uV pp (a little over 1 ppm) in 200 ms for a 90% duty cycle and with a worst case ripple 62uV pp (3.5 ppm) with a 50% duty cycle (also 200 ms settling time). Quite impressive. something on the order of 18 ENOB.
Anybody got a syringe I can use to squeeze the magic smoke back into this?
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21686
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Reduce PWM ripple
« Reply #4 on: January 22, 2022, 01:22:50 am »
Yes, that's been done:
https://www.edn.com/cancel-pwm-dac-ripple-with-analog-subtraction/
It provides slightly better performance than a 2nd order of similar spec, IIRC?

You can still get faster settling with a higher order active filter, of course; and a 3rd order active only needs one op-amp, which may or may not be preferable to two inverters and one less RC.  YMMV.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline Terry BitesTopic starter

  • Super Contributor
  • ***
  • Posts: 2393
  • Country: gb
  • Recovering Electrical Engineer
Re: Reduce PWM ripple
« Reply #5 on: January 22, 2022, 09:29:18 am »
It works fine with HC04s, but any inverting CMOS gate will work.
It cheap and dirty. If you're not in a hurry its pretty good.

 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8172
  • Country: fi
Re: Reduce PWM ripple
« Reply #6 on: January 22, 2022, 10:25:57 am »
Yes, that's been done:
https://www.edn.com/cancel-pwm-dac-ripple-with-analog-subtraction/

This solution is especially appealing if the microcontroller PWM offers the negated output (with deadtime set to 0) in a separate pin, simplifying the BOM by getting rid of that inverter (and also its delay; the two PWM outputs are likely well matched).
 
The following users thanked this post: T3sl4co1l

Offline Cerebus

  • Super Contributor
  • ***
  • Posts: 10576
  • Country: gb
Re: Reduce PWM ripple
« Reply #7 on: January 22, 2022, 02:52:46 pm »
You could also use any bit of little logic with complementary outputs: a flip flop, a differential bus driver, and so on.

If you're looking to use a better reference voltage than simply taking whatever a CMOS gate tied to a digital logic supply rail will give you then something like a 74x4053 analog switch with two switches wired in complementary fashion would do the trick. (If the non-linearity of the switching element RDSon with voltage bothers you it can be largely eliminated by placing it at an op amp virtual earth summing point.)
Anybody got a syringe I can use to squeeze the magic smoke back into this?
 

Offline macaba

  • Regular Contributor
  • *
  • Posts: 205
  • Country: gb
Re: Reduce PWM ripple
« Reply #8 on: January 25, 2022, 02:22:07 pm »
I think it's worth pointing out that this ripple cancellation technique has exactly the same response as a normal 2nd order passive filter with the same values. Where it might be beneficial is if you have an output load - the ripple cancellation technique will suffer less drop.

Things get even more interesting when combining with multi-phase PWM... simulation attached. I've picked 25% duty cycle because that is the worse case ripple in this 2-phase PWM example. If it was 50%, there would be near-zero ripple.

« Last Edit: January 25, 2022, 02:26:54 pm by macaba »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf