1
\$\begingroup\$

I may be pushing physics here so please tell me if I am. I have a signal I'm trying to anti-alias at 50Hz (sampling at 100Hz). The problem is my input signal is essentially an Amplitude Modified square wave that matches the sampling frequency with a very short duty cycle (~2-5%, settable). I'm timing my samples so that they only read the pulses at their peak after a settling time ts. I just realized though that my 50Hz cuttoff passive AA LPF will filter out the square wave and make ts far too long.

We've been banging our heads against the wall on this one, but here's what we want (don't know if it exists):

A Low Pass Filter that can be turned on or off quickly. Desired sequence of events is as followed:

  1. Signal input is at 0V (off duty cycle). Filter can be on or off during this time.
  2. Filter is turned off so signal can quickly rise to it's max amplitude (on duty cycle).
  3. After ts, Filter is turned on again so that it is now being filtered at that higher level taking whatever value the signal is at as a sort of initial value.
  4. After a few ms, the signal has been sampled by the ADC and the filter is turned off so the signal can return to 0V.

I dream of the circuit that can accomplish it, but cannot figure out how to pull it off. Does this exist? If so, what should I be googling?

\$\endgroup\$
7
  • \$\begingroup\$ I think the answer is "no", but a diagram of what the signal looks like would be helpful. Do you actually just want a better sampling trigger system like an osciliscope? \$\endgroup\$
    – pjc50
    Commented Jun 19, 2013 at 15:19
  • \$\begingroup\$ A slow turn-on or turn-off ramp of the filtered signal is probably best dealt with by using a comparator in the signal chain. Signal captures would help understand better, as @pjc50 mentions. \$\endgroup\$ Commented Jun 19, 2013 at 15:45
  • \$\begingroup\$ As described, this doesn't much sense. If you're sampling at 100Hz, you sample at 10ms intervals. Your signal, as described, consists of short pulses at 10ms intervals. And, you're timing the sampling to occur during the pulse after some settling time. You're getting one sample per pulse. What possible use is an AA filter here? \$\endgroup\$ Commented Jun 19, 2013 at 15:59
  • \$\begingroup\$ Are you using a microcontroller/DSP to read your data? If you can afford to give some processor cycles, you could use an IIR or FIR filter in software? \$\endgroup\$
    – Jay Greco
    Commented Jun 19, 2013 at 16:09
  • \$\begingroup\$ @AlfredCentauri Ideally the signal would have a 100% duty cycle and could just be sampled normally and the AA filter makes sense. Our application prevents us from powering the resistive sensor constantly so we want to power cycle it very quickly to save power. To the ADC the signal looks identical ideally, but the current AA filter doesn't allow that. \$\endgroup\$ Commented Jun 19, 2013 at 16:39

2 Answers 2

3
\$\begingroup\$

The easiest and most effective way of doing this is not to filter your signal but start taking plenty of ADC samples as soon as you hit the area you want to sample. Carry on sampling until the pulse is about to change and stop sampling.

Average your ADC samples - that's all you have to do and if you can't take "enough" ADC samples, get a better ADC. Alternatively, if you can use samples on the next peak, accumulate values and average over several peaks.

There are analogue solutions but these involve comparators and tunable low-pass filters because the filter has to be in-circuit all the time and all you are able to "move" is the cut-off frequency (when the signal reaches the bounds of what you want to sample). Use the power of a decent ADC.

Moving the filter frequency - use a switched capacitor filter and bring down the clock to create the required low pass filter when the signal has stabilized.

Alternative idea - Use your signal (once it has achieved stability) to charge a capacitor with constant current (V to I converter). The voltage attained on the cap divided by the time to get to that voltage is dv/dt - you know the cap value and therefore you can calculate what the average current was over that time period (I = c dv/dt). The average current is the average voltage applied to the V to I converter. Timing and sequencing is necessary to start the V to I then when you have taken your reading you need to discharge the cap to zero before the next cycle begins. It's called an integrating ADC - look it up.

\$\endgroup\$
3
  • \$\begingroup\$ Can you "move" the cut-off frequency online like that? Depending on the circuit it seems like you'd have the same problem we have now which is the cap that hadn't been used so far needs to charge to the new signal level. Can temporarily switch to the higher cut-off during the level change but the lower filter will still need time to change to the high level once you sitch back. \$\endgroup\$ Commented Jun 19, 2013 at 16:35
  • \$\begingroup\$ Answer added to re tunable filter and new idea. \$\endgroup\$
    – Andy aka
    Commented Jun 19, 2013 at 17:00
  • \$\begingroup\$ Switched capacitor filter may be exactly what I need \$\endgroup\$ Commented Jun 19, 2013 at 17:31
1
\$\begingroup\$

Some ideas:

  1. Get rid of the anti-alias filter. Your signal is in the aliased band, so anti-aliasing with a LPF will necessarily eliminate your signal. If the high-frequency noise is not too bad, maybe you can just live without the filter.

  2. What your sampling scheme does is use aliasing as an advantage to downshift your signal to baseband. Instead of an LPF, you can design an antialising filter appropriate to this scheme. That would be a bandpass filter from maybe 50 to 150 Hz.

  3. Use a track and hold or sample and hold circuit. This is essentially your proposed solution, and it is another way to downmodulate your signal to baseband.

\$\endgroup\$
4
  • \$\begingroup\$ The circuit is an RF Transceiver so HF noise is a major problem. Bandpass is an interesting idea. Doesn't solve the problem completely, but is something. Sample and hold is too power intensive, we looked into it. \$\endgroup\$ Commented Jun 19, 2013 at 16:18
  • \$\begingroup\$ Alternate LPF solution: Just move the cutoff of the LPF up to 200 Hz, or however high is needed to capture the features you need in your signal, but reject HF. \$\endgroup\$
    – The Photon
    Commented Jun 19, 2013 at 16:23
  • \$\begingroup\$ Still not an anti-aliasing filter, which is what we're trying to achieve. \$\endgroup\$ Commented Jun 19, 2013 at 16:50
  • \$\begingroup\$ It doesn't block all aliased frequency bands, but it does block some of them...so I would still call it an anti-aliasing filter. Again, the signal you want is in the alias bands, so a complete anti-aliasing filter is not possible in your application. \$\endgroup\$
    – The Photon
    Commented Jun 19, 2013 at 16:52

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