Problem with FFT

Forum for discussing PicoScope version 6 (non-automotive version)
Post Reply
egonotto
Newbie
Posts: 0
Joined: Thu Mar 12, 2015 12:42 am

Problem with FFT

Post by egonotto »

Hello,

The FFT of a 100kHz square seems not always correct. See the pictures
Only "500kHz_8Bit.png" looks correct.

I connect the function generator to input A with a BNC-cable.

I use PicoScope® 6 - PC Oscilloscope software version: 6.10.16.2 with PicoScope 5243A

Best regards
egonotto
Attachments
looks wrong (199kHz 8Bit)
looks wrong (199kHz 8Bit)
looks wrong (199kHz 12Bit)
looks wrong (199kHz 12Bit)
looks wrong (496kHz 12Bit)
looks wrong (496kHz 12Bit)
looks ok (500kHz 8Bit)
looks ok (500kHz 8Bit)
the signal I use 100kHz square 0.9V
the signal I use 100kHz square 0.9V

bennog
Advanced User
Advanced User
Posts: 206
Joined: Mon Nov 26, 2012 9:16 am
Location: Netherlands

Re: Problem with FFT

Post by bennog »

Look at the 100kHz square with a sample rate of 199 and 496 kS/sec

And you will see why the fft is showing the data you posted.

That it works at 500 kS/sec is because the source clock of the generator is the same as the clock source of the scope.
If you had used a external function generator you would get the same odd fft's.

Try making the FFT with 1GS/sec then all works ok.

Benno

egonotto
Newbie
Posts: 0
Joined: Thu Mar 12, 2015 12:42 am

Re: Problem with FFT

Post by egonotto »

bennog wrote:Look at the 100kHz square with a sample rate of 199 and 496 kS/sec

And you will see why the fft is showing the data you posted.

That it works at 500 kS/sec is because the source clock of the generator is the same as the clock source of the scope.
If you had used a external function generator you would get the same odd fft's.

Try making the FFT with 1GS/sec then all works ok.

Benno
Hello Benno,

I understand you not. In no of my picture is a sample rate of 199 or 496 kS/sec. The FFT choose the sample rate automatical. I choose the frequency span to 199kHz or 496kHz. Than PicoScope6 choose the sample rate it needs (398kS/sec or 992kS/sec).
I see no argument why I can not FFT the built in functiongenerator.
Why should FFT work or not work when the scope and functiongenerator is synchron?

Best regards
egonotto

bennog
Advanced User
Advanced User
Posts: 206
Joined: Mon Nov 26, 2012 9:16 am
Location: Netherlands

Re: Problem with FFT

Post by bennog »

See the image below
21-8-2015 12-46-09.png
The 100kHz square wave is at the 1MS/sec not square anymore.
But I can not reproduce your problem with my scope (witch is fixed 12 bit)
I have used an external function generator for this test.

It also makes a lot of difference if your primary view is Spectrum or Scope
The info form the properties window can be very helpful in finding the cause of this.

Benno

egonotto
Newbie
Posts: 0
Joined: Thu Mar 12, 2015 12:42 am

Re: Problem with FFT

Post by egonotto »

Hello bennog,

thanks for your replay.
How would be your spectrum if you use 90 kHz from extern generator and the equal adjustment in PicoScope as in your picture.
Wrong
Wrong
Ok
Ok
Best Regards
egonotto

bennog
Advanced User
Advanced User
Posts: 206
Joined: Mon Nov 26, 2012 9:16 am
Location: Netherlands

Re: Problem with FFT

Post by bennog »

When you want to do FFT on a 100 kHz signal with a sampling rate of 1MS you only get 10 samples per period.
For a sine wave this is not a big problem, but when you use a square wave you will get all kinds of interference problems.
Especially when both are not complete in sync as when you do 90 kHz with 1 MHz sampling rate.
1.png
1.png (5.14 KiB) Viewed 8652 times
2.png
2.png (4.65 KiB) Viewed 8652 times
Both above samples are from a 90 kHz square wave
1st notice it is not a square wave anymore it is more like a trapezium, because of the slow sampling compared to the frequency of the square wave.
2nd the first has a half period time of 5 us witch is about 100 kHz and the second has a half period time of 6 us this is because the scope is sampling with 1 us intervals so there will never be 5.55 us (witch is 90 kHz), the constant variation of the period time will kill the FFT calculation as shown in your pictures.

I I set the FFT range to 10 MHz (witch gives 20 MS sampling rate) and zoom in on the first 500 kHz of the FFT the image is what you would expect.
3.png
Also notice the scope image, the square wave is a square wave again.
If you want more detail on the zoomed part of the FFT you can increase the number of bins so you get the image below.
I used 0.5 Mbins for this one
4.png
Benno.

egonotto
Newbie
Posts: 0
Joined: Thu Mar 12, 2015 12:42 am

Re: Problem with FFT

Post by egonotto »

Hallo bennog,

PicoScope 6 has a "Spectrum Mode". This should work. I can choose span from 100 Hz to 100 MHz in 20 steps. It makes no sense, if you can only use the 100 MHz span.

The attachment shows a 3 MHz square from the internal generator of the PS 5243A with 100 MHz span.
But in this case seems the FFT works ok. The internal generator makes the disturbance.
3MHz square from intern generator PS 5243A
3MHz square from intern generator PS 5243A
Best Regards
egonotto

bennog
Advanced User
Advanced User
Posts: 206
Joined: Mon Nov 26, 2012 9:16 am
Location: Netherlands

Re: Problem with FFT

Post by bennog »

Someone at PicoScope has to answer this for you, I can only point you in the direction where the anomaly came from.

Benno

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Problem with FFT

Post by Martyn »

Well explained.
It all comes down to setting the scope up to accurately collect the data you need and, even though you are running in spectrum mode, the scope operates in the time domain and the fft is created in software.

If you have further questions please use the helpdesk email ticket you have, at support@picotech.com
Martyn
Technical Support Manager

Post Reply