Frequency Response Analyzer with Bode Plots

Post discussions on applications you are writing
Post Reply
hexamer
Advanced User
Advanced User
Posts: 0
Joined: Tue Aug 12, 2014 10:09 pm

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer » Sat Nov 03, 2018 7:17 pm

Hi Justin,

You'd be helping me just as much! If you don't mind helping me test and confirm it works, I could post a trial version. Of course it won't be a "released" version since I won't do that until the SDK is released, but I do have the updated code ready for testing. Just to be safe we should coordinate on what unreleased version of the SDK we each have. The trial application I give you should be linked against the version of the SDK you will use. The one I have is 10.6.13.58. What is yours?

Thanks,

Aaron.

hexamer
Advanced User
Advanced User
Posts: 0
Joined: Tue Aug 12, 2014 10:09 pm

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer » Sat Nov 03, 2018 7:26 pm

ewald wrote:
Mon Oct 29, 2018 3:46 pm
Hi Aron And Martyn
Thank you
I mean the 3205 docent have a arbitrary waveform generator that i can control it is for sweeping filters and other stuff as far as I remember . That's the reason why I think that might be a problem

Below you will find the lock

while (0 < ps3000_open_unit( );
ps3000_get_unit_info( 1, 008FE3C8, 32, 4 );
while (0 < ps3000_open_unit( );
ps3000_get_timebase( 1, 3, 0, 0, 0, 1, 008FE7F0 );
ps3000_get_timebase( 1, 3, 0, 0, 0, 1, 008FE7F0 );Fatal error: Failed to determine sample buffer size: 0
ps3000_get_unit_info( 1, 008FE7D8, 32, 3 );
ps3000_set_channel( 1, 0, 1, 0, 3 );
ps3000_set_channel( 1, 1, 1, 0, 3 );
ps3000_get_timebase( 1, 3, 0, 0, 0, 1, 008FE81C );
ps3000_get_timebase( 1, 3, 0, 0, 0, 1, 008FE81C );Fatal error: Failed to determine sample buffer size: 0
ps3000_get_unit_info( 1, 008FE978, 32, 3 );
ps3000_get_unit_info( 1, 008FE978, 32, 4 );
Status: 3205 S/N: YSR76/070 successfully initialized.
ps3000_get_unit_info( 1, 008FE6E0, 32, 3 );
ps3000_get_unit_info( 1, 008FE6E0, 32, 4 );

Best
Lars
Hmmm ... this call pattern pretty much matches what works fine on my PS2204A (uses the PS2000 driver). The double printing of the call is due to a benign bug in the code.

There must be some rules on the use of ps3000_get_timebase that I don't know about. My suspicion is that it doesn't like setting "no_of_samples" to 0. I could confirm by making a console based test application for you to try out. Or perhaps Pico support can tell me what I am doing incorrectly? For context, I am using this function to get the size of the scopes's sample buffer. The setting of the "no_of_samples" shouldn't matter for that, so I can use whatever is safe (hopefully a number that is common for all scopes).

hochfrequenz
Newbie
Posts: 0
Joined: Sat Nov 03, 2018 7:14 pm

Re: Frequency Response Analyzer with Bode Plots

Post by hochfrequenz » Sat Nov 03, 2018 7:47 pm

Hello,
are there any differences in measuring Speed between 2204A and 2205A? Start Frequency 50Hz, stop frequency 3,3kHz, steps 50 Hz.

I want to measure rc, lc-networks in at this Low frequency. I wonder if 2205A will be double-fast because of his double sample-rate? I don' t need the picoscope for any other application.

Is it possible to estimate the duration of the measurement using 2204A ans 2205A?

Best regards
Marco Schramm

jmasse
Newbie
Posts: 0
Joined: Fri Nov 02, 2018 3:44 am

Re: Frequency Response Analyzer with Bode Plots

Post by jmasse » Mon Nov 05, 2018 6:28 pm

Hi Aaron,

Thanks for getting back. I do indeed have 10.6.13.58 in both 32bit & 64bit (my understanding is that this application is 32bit). I'd be happy to test it out for you. Would you just branch it on bitbucket? Please let me know what works best for you.

Cheers,
-Justin

hexamer
Advanced User
Advanced User
Posts: 0
Joined: Tue Aug 12, 2014 10:09 pm

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer » Thu Nov 08, 2018 12:22 am

jmasse wrote:
Mon Nov 05, 2018 6:28 pm
Hi Aaron,

Thanks for getting back. I do indeed have 10.6.13.58 in both 32bit & 64bit (my understanding is that this application is 32bit). I'd be happy to test it out for you. Would you just branch it on bitbucket? Please let me know what works best for you.

Cheers,
-Justin
Here is an updated version with what I hope is working PS5000D series support: https://bitbucket.org/hexamer/fra4picos ... %20RC4.msi

Also, I should mention to others that since I have not updated the DLL version dependency checker, this will likely fail with the earlier officially released versions of the SDK, due to API signature changes. It may work if you have a newer version of the PicoScope app installed and no SDK installed, but no promises :)

Please let me know how it turns out.

hexamer
Advanced User
Advanced User
Posts: 0
Joined: Tue Aug 12, 2014 10:09 pm

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer » Thu Nov 08, 2018 12:34 am

hochfrequenz wrote:
Sat Nov 03, 2018 7:47 pm
Hello,
are there any differences in measuring Speed between 2204A and 2205A? Start Frequency 50Hz, stop frequency 3,3kHz, steps 50 Hz.

I want to measure rc, lc-networks in at this Low frequency. I wonder if 2205A will be double-fast because of his double sample-rate? I don' t need the picoscope for any other application.

Is it possible to estimate the duration of the measurement using 2204A ans 2205A?

Best regards
Marco Schramm
Hi Marco,

The speed of analysis is ultimately tied to other factors than underlying sampling rate. So there would be no speed advantage for a PS2205A. For independent RC and LC networks (low noise mode measurements), the speed is mostly driven by a couple of things:

1) The number of stimulus cycles captured, by default 16.
2) How much range seeking needs to be done.

Item 1 can be influenced by setting the number of stimulus cycles captured lower than the default, but may come at the expense of measurement noise, since DFT "processing gain" is lowered.

Item 2 can be helped by a setting that affects the initial guess on starting range, but is also going to be driven by the characteristic of the response. If the response is pretty predictable, the amount of range seeking will be too.

Thanks,

Aaron.

jmasse
Newbie
Posts: 0
Joined: Fri Nov 02, 2018 3:44 am

Re: Frequency Response Analyzer with Bode Plots

Post by jmasse » Thu Nov 08, 2018 9:57 pm

Hi Aaron,

I've tried the RC4 version you posted on two machines, both detected the 5444D without issue, initialized it, and I was able to run sweeps. Great work on a first cut!

There are some long term things that may make sense to sort out (e.g. plot axis settings auto range after running a new sweep [option to disable that], the axis pre-configs in the settings menu don't seem to do anything, would like to change plot background colors [menu is greyed out], would like the option to move the text on the plot for phase and gain margin read outs, would like to be able to dynamically scale injection level throughout a sweep). There are likely more things not on the tip of my tongue, I'll try to keep a running list.

Thank you for a great application! I'll make sure to keep an eye out for the final release supporting the 5000D series :)

Cheers,
-Justin

hexamer
Advanced User
Advanced User
Posts: 0
Joined: Tue Aug 12, 2014 10:09 pm

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer » Fri Nov 09, 2018 2:09 am

hochfrequenz wrote:
Sat Nov 03, 2018 7:47 pm
Hello,
are there any differences in measuring Speed between 2204A and 2205A? Start Frequency 50Hz, stop frequency 3,3kHz, steps 50 Hz.

I want to measure rc, lc-networks in at this Low frequency. I wonder if 2205A will be double-fast because of his double sample-rate? I don' t need the picoscope for any other application.

Is it possible to estimate the duration of the measurement using 2204A ans 2205A?

Best regards
Marco Schramm
Marco,

When I ran a scenario similar to the one you describe it takes approximately 14 seconds to run a sweep on an RC filter with 1st order response.

As a note, the FRA application currently does not have a linear step mode (it's a log sweep, specified in steps per decade), but I targeted a sweep with a similar number of steps (~65)

Thanks,

Aaron.

In fase
Newbie
Posts: 0
Joined: Tue Nov 13, 2018 11:12 am

Re: Frequency Response Analyzer with Bode Plots

Post by In fase » Tue Nov 13, 2018 11:14 am

What is the minimum frequency you can set the sweep too?

hexamer
Advanced User
Advanced User
Posts: 0
Joined: Tue Aug 12, 2014 10:09 pm

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer » Tue Nov 13, 2018 1:53 pm

In fase wrote:
Tue Nov 13, 2018 11:14 am
What is the minimum frequency you can set the sweep too?
This depends on the sampling mode and scope model.

For low noise mode (the default) it should be able to go as low as the scope/API will allow. If you have a specific scope in mind I could tell you what this is.

For noise reject mode, it depends on the sampling rate and scope buffer size. With the scope connected, in the options dialog there is a field that will tell you how low the sweep can start. This changes as sampling rate (timebase) is changed.

Post Reply