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,
 

I am measuring a 1 kHz stepwise signal at a sampling frequency of 200 kHz using a PXI 4461 board.

The result is not stepwise at all and there are oscillations before and after each step oscillation (see jpg-file)!

If I can understand oscillations after the step transition (cable reflection or other) I can not figure out why there are also oscillations before the step transition!

Moreover, these oscillation are not present on the oscilloscope!

Is it an artifact of the sigma-delta conversion algorithm or a defect of my board?

 

Does anybody explain to my the origin of these oscillations?

 

I thank you in advance

 

Frédéric

 

 

 
 
 
0 Kudos
Message 1 of 12
(4,521 Views)
Hello Frederic,

There is no problem with your board. In fact, the square is generated out of sinus (Fourier series) and that's why such artefacts are created.

see the GIF image in this link below:
http://en.wikipedia.org/wiki/Square_wave

Now, the PXI 4461 has a 24-bit resolution and your oscilloscope should have less. In your oscilloscope, you have for sure by default a hanning window or an other one which is actually a low-pass filter and eliminate these artefacts.
If you really want to delete this artefacts, add a filter in your VI using Express VI or in Signal Processing  palette.


Best regards,
Laurent

NI Switzerland
0 Kudos
Message 2 of 12
(4,482 Views)

Hi Laurent,

 

Thanks for your answer but it does not fix my problem. I do understand that one can not generate a perfect stepwise signal with a small (200 kHz) bandwidth. However, in my case, the signal is not generated by the 4461 board but by an external source (an ac Josephson voltage array) and the signal is indeed almost stepwise (with few tens of nanoseconds of rise time). On the other hand, even with a cheap oscilloscope, I would be able to see the 50 mV oscillation! Therefore, the oscillation is definitively not included in the generated stepwise signal.

 

What I am doing with the board is only to use the ADC input and I am still looking for the reason of such oscillation on the sampled results…

 

Do you have any other suggestion?

 

Best regards,

 

Frédéric

0 Kudos
Message 3 of 12
(4,465 Views)
Laurent is correct that what you are seeing is a sum of sine waves. The reason you see it on your 4461 and not your oscilloscope is that your 4461 has a very sharp anti-aliasing filter, and your oscilloscope does not. If you're sampling at 200kS/s, then you have roughly 100kHz of bandwidth and you'll see only the first 97-99 harmonics of a 1kHz signal. This results in the ringing you see. If it causes a problem for you, it's possible you're using the wrong sort of hardware and maybe one of our multifunction DAQ products would be more appropriate. I'm sure someone on this forum could make a suggestion if you were to describe your application for us.

Chris
0 Kudos
Message 4 of 12
(4,419 Views)

Hi Frédéric,

Do you know how your „ac Josephson voltage array“ external source generates square waveforms. If they are done out of sinus as I suppose, the antialiasing filter present in the PXI 4461 can remove some harmonics.

Explanations:


Indeed, according to the specifications, the sampling frequency (Fs) of the PXI 4461 is 204,8kHz. Between the input and the DAC, there is an antialiasing filter (low pass filter) which cuts all the frequency above Fs/2; So in your case, 100kHz. As a result just the harmonics under 100kHz are taken into account and that’s for sure the reason why the square has these oscillations.

To check this theory, try first with a higher frequency you should have more oscillations, and then try with lower frequency you should have less oscillations.

 

The documentation of the PXI 4461 board can be found here:

24-Bit, 204.8 kS/s Dynamic Signal Acquisition and Generation
http://www.ni.com/pdf/products/us/pxi4461.pdf


Best regards,

Laurent

0 Kudos
Message 5 of 12
(4,411 Views)
Sorry Chris,

I haven't seen your post... At least it means we're right 🙂

Laurent
0 Kudos
Message 6 of 12
(4,410 Views)
Thanks Chris,
 
If I understand correctly, the oscillations should decrease if I decrease the frequency of the stepwise signal keeping the same sampling rate. Therefore, for a 50 Hz signal I would have almost 2000 harmonics and the measured signal should be steeper. Is it right?
I will do the experiment and let you know... however, I am ready to bet that will not be the case for the following reason:
An RC filter (for exemple) will increase the rising time and the transition from one step to the next one will be "rounded". Moreover, the effect of the filter should be see after the step and not before (like it can be seen on the jpg-file). Otherwise, you will be in trouble with the causality...
 
Best regards,
 
Frédéric
 
 
 
 
0 Kudos
Message 7 of 12
(4,407 Views)

@Ov_metas wrote:

Therefore, for a 50 Hz signal I would have almost 2000 harmonics and the measured signal should be steeper. Is it right?




You'd have more harmonics, so the signal would look more square, but the frequency of the highest harmonic wouldn't be any higher, so the signal wouldn't be any steeper.

You seem worried about causality. Don't worry; it's just an illusion. The ringing starts before the transition at the output of the antialias filter, but not before the transition at the input of the filter. In other words, the filter has many samples of delay, and during the delay interval, the output starts ringing. It's a digital filter, which makes that quite easy to do.

Chris
0 Kudos
Message 8 of 12
(4,398 Views)
Thanks to Chris and Laurent,

I have visibly still a lot of things to learn about how the signal is processed inside the board...
I will read more deeply the docs and make further tests...

Does the delay Chris is speaking about the 63 samples delay?
Can we turn off this digital filter?


Laurent wrote:
"Do you know how your „ac Josephson voltage array“ external source generates square waveforms. If they are done out of sinus as I suppose, the antialiasing filter present in the PXI 4461 can remove some harmonics."

Yes I know how the "ac Josephson voltage array" generates the signal. It switches between quantized levels (-V, 0 and +V) with a transition time of few tens of nanosecond. The bandwidth of the source is then more than 10 MHz!

Best regards,

Frédéric



0 Kudos
Message 9 of 12
(4,382 Views)
Does the delay Chris is speaking about the 63 samples delay?


Yes.

Can we turn off this digital filter?


No. Even if it were possible, doing so would completely alter the character of the board.

Chris
0 Kudos
Message 10 of 12
(4,346 Views)