2
\$\begingroup\$

I need to read the frequency and duty cycle of a PWM signal that is expected at 88Hz. It is getting a lot of noise (during radiated immunity).

Before noise:

Before Noise

After noise injected:

After noise injected

What filter would you recommended to clean this signal without affecting the rise and fall times of the PWM (such as a LPF would do)?

\$\endgroup\$
3
  • \$\begingroup\$ If your filter slows down both rising and falling edges equally, it won't change the duty cycle, but it will get rid of the noise. \$\endgroup\$
    – bobflux
    Nov 15, 2023 at 1:06
  • \$\begingroup\$ triggering on the undistorted signal may give a better scope picture. \$\endgroup\$ Nov 15, 2023 at 2:15
  • \$\begingroup\$ That looks a lot like oscilloscope aliasing to me = xy problem. \$\endgroup\$
    – Andy aka
    Nov 15, 2023 at 9:00

3 Answers 3

2
\$\begingroup\$

You should be able to filter out the high frequency component fairly easily, since it's an order of magnitude higher than your signal of interest.

Your signal is 88Hz, maybe up a couple hundred if you consider the edge sharpness. Your noise signal is >10MHz. That sine wave is likely the modulation of the carrier.

My first priority would be to try to reduce reception of the noise by using a ~1nF shunt cap to "ground" the PWM signal line.

A common mode choke or clip on ferrite will likely help as well.

Follow that with some RC filtering and maybe some chip ferrites and it will likely clean up nicely. Will those technically effect the rise and fall times? Yes, but if your rise times are 100uS-1mS, and you reduce that by 1uS, does that really matter?

https://emcfastpass.com/emc-testing-beginners-guide/emc-immunity-testing/

\$\endgroup\$
1
  • \$\begingroup\$ this is common mode noise across a sense resistor, so I think it will be a good idea to feed it not an instrumentation amplifier to get high cmrr \$\endgroup\$
    – wgthompson
    Dec 6, 2023 at 6:54
3
\$\begingroup\$

What filter would you recommended to clean this signal without affecting the rise and fall times

Mathematically, it's impossible to do this with a linear filter, as a sharp edge has an infinite bandwidth, and reducing the bandwidth would increase rise and fall times, and because reducing the bandwidth is the only option you have to remove noise.

Looking at your noise, I'd say this looks a lot like anything but white noise, more like something harmonic and periodic. So, erasing that might simply be a matter of locking onto it and subtracting the regenerated "unwanted" signal from the mixture. A PLL might be a tool here, but I'm really not able to advise without knowing much more about what your "noise" specifically is.

Other than that, chances are you could directly estimate the frequency and duty cycle from the noise&PWM mixture, instead of trying to remove the noise. But that, again, would require a specific noise model.

\$\endgroup\$
4
  • \$\begingroup\$ Thanks marcus,I was a little suspicious this was going to be the case but was hoping that wasnt the answer. The noise is 20-55MHz rf not modulated \$\endgroup\$
    – wgthompson
    Nov 14, 2023 at 23:59
  • 1
    \$\begingroup\$ please tell us more, and do it by editing your question! also tell us what the relevant range of PWM frequencies is. I get the feeling this isn't a problem at all! \$\endgroup\$ Nov 15, 2023 at 0:14
  • \$\begingroup\$ @MarcusMüller That looks a lot more (to me) like the interference is correlated to something with a specific frequency (or two.) Perhaps a narrow notch filter? (But I may be mis-reading.) \$\endgroup\$ Nov 15, 2023 at 2:37
  • \$\begingroup\$ This is radiated immunity testing, so the "noise" is well characterized. emcfastpass.com/emc-testing-beginners-guide/… \$\endgroup\$
    – Drew
    Nov 15, 2023 at 3:06
1
\$\begingroup\$

What filter would you recommended to clean this signal without affecting the rise and fall times of the PWM (such as a LPF would do)?

Do you simply need to measure the frequency and duty ratio of the clean signal, or do you need to extract in real time a cleaner version of your signal from the noisy version?

If you merely need to make measurements, there are mathematical tools that can extract that information from a noisy signal. If you do not need PWM data on a cycle by cycle basis, but can assume it is constant over a number of cycles, you can get greater precision by analyzing a more cycles. A Digital Signal Processor (DSP) chip could be a solution to extracting that information fairly quickly.

If you need to reconstruct a cleaner version of the signal for use in real time, and the amplitude of the PWM signal is greater than the amplitude of the noise, and you know the amplitude of the PWM signal, then you can use a Schmitt trigger to clean up the signal.

If the amplitude of the PWM signal is not known in advance, or the noise has an approximately equal or greater amplitude than the PWM signal, then it will be challenging to clean up the noisy signal in real time. However, prior knowledge of the sorts of noise present may aid the attempt. For example Gaussian noise poses different challenges than noise that might come from fixed frequency noise sources.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.