Test and Measurement Forum

Problem with FFT

Forum for discussing PicoScope version 6 (non-automotive version)

Problem with FFT

Postby egonotto » Tue Aug 18, 2015 2:43 pm

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
199kHz_8Bit.png
looks wrong (199kHz 8Bit)
199kHz_12Bit.png
looks wrong (199kHz 12Bit)
496kHz_12Bit.png
looks wrong (496kHz 12Bit)
500kHz_8Bit.png
looks ok (500kHz 8Bit)
time.png
the signal I use 100kHz square 0.9V
egonotto
Newbie
 
Posts: 0
Joined: Thu Mar 12, 2015 12:42 am

Re: Problem with FFT

Postby bennog » Wed Aug 19, 2015 10:39 am

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
bennog
Guru
Guru
 
Posts: 79
Joined: Mon Nov 26, 2012 9:16 am

Re: Problem with FFT

Postby egonotto » Wed Aug 19, 2015 12:43 pm

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
egonotto
Newbie
 
Posts: 0
Joined: Thu Mar 12, 2015 12:42 am

Re: Problem with FFT

Postby bennog » Fri Aug 21, 2015 10:55 am

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
bennog
Guru
Guru
 
Posts: 79
Joined: Mon Nov 26, 2012 9:16 am

Re: Problem with FFT

Postby egonotto » Tue Aug 25, 2015 3:46 am

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.

90kHz.PNG
Wrong


100kHz.PNG
Ok


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

Re: Problem with FFT

Postby bennog » Tue Aug 25, 2015 3:07 pm

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 1067 times

2.png
2.png (4.65 KiB) Viewed 1067 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.
bennog
Guru
Guru
 
Posts: 79
Joined: Mon Nov 26, 2012 9:16 am

Re: Problem with FFT

Postby egonotto » Thu Aug 27, 2015 11:25 pm

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.jpg
3MHz square from intern generator PS 5243A


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

Re: Problem with FFT

Postby bennog » Fri Aug 28, 2015 10:20 am

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

Benno
bennog
Guru
Guru
 
Posts: 79
Joined: Mon Nov 26, 2012 9:16 am

Re: Problem with FFT

Postby Martyn » Thu Sep 10, 2015 1:02 pm

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 Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2355
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots


Return to PicoScope 6 for Windows

Who is online

Users browsing this forum: No registered users and 0 guests