Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Why are there oscillations when sampling a stepwise signal?

Solved!
Go to solution

Hi Chris and Laurent,

Please find herewith a pdf-file with my last results concerning the oscillation "problem".

You were right in the sense that the oscillations are probably an artefact of the filter. It is not a simple low pass filter at all!

However, I am still disappointed because if I am measuring a stepwise signal, I have to remove about 35 sampled values before and 35 sample values after each step transition to obtain a result that corresponds to the real signal applied at the input of the ADC!!! Therefore, the effective sampling frequency is in fact decreased by a factor of about 65...

I will contact NI directly to have more information about this filter...

I thank you again for your help!

Best regards,

Frédéric

 

0 Kudos
Message 11 of 12
(1,032 Views)
Solution
Accepted by Ov_metas

@Ov_metas wrote:

However, I am still disappointed because if I am measuring a stepwise signal, I have to remove about 35 sampled values before and 35 sample values after each step transition to obtain a result that corresponds to the real signal applied at the input of the ADC!!! Therefore, the effective sampling frequency is in fact decreased by a factor of about 65...




I haven't tried this, but it looks like a moving average filter could eliminate or greatly reduce the apparent oscillations. For each sample, do the following: Y(i) = 0.25Y(i-1) + 0.5Y(i) + 0.25Y(i+1), where Y(i) is the i'th sample in the waveform. And if that doesn't work, I still think there must be some filter that can filter out the harmonics more gradually, thus reducing the Gibbs effect you're seeing. Of course doing any of this will ruin your flatness, but for this application your concern is step response, not frequency flatness.

Chris
0 Kudos
Message 12 of 12
(1,022 Views)