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.

CW555
Newbie
Posts: 0
Joined: Thu Jan 24, 2019 10:31 am

Re: Frequency Response Analyzer with Bode Plots

Post by CW555 » Thu Jan 24, 2019 10:37 am

Hi, I'm having issues with the app after downloading and installing the latest .msi
It worked before that, but after I installed it, I try to open the app and it thinks about it then fails to launch, no prompt as to why.
Using a PS 5554B.

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 Jan 24, 2019 1:14 pm

CW555 wrote:
Thu Jan 24, 2019 10:37 am
Hi, I'm having issues with the app after downloading and installing the latest .msi
It worked before that, but after I installed it, I try to open the app and it thinks about it then fails to launch, no prompt as to why.
Using a PS 5554B.
Just want to confirm a few things to help you out:

1) I assume you probably mean PS 5444B? I need to rule out the new D series scopes because the released application doesn't really have support for them yet.

2) What is the name of the MSI file?

3) What windows versions are you using?

4) When you say fails to launch, does it silently crash? Or does it hang? Something else?

Thank You,

Aaron.

CW555
Newbie
Posts: 0
Joined: Thu Jan 24, 2019 10:31 am

Re: Frequency Response Analyzer with Bode Plots

Post by CW555 » Mon Jan 28, 2019 10:36 am

1. no I'm sure its not a D series
2. file is FRA4PicoScope 0.6.2b RC4.msi
3. windows 10
4. crashes silently

cheers

CW555
Newbie
Posts: 0
Joined: Thu Jan 24, 2019 10:31 am

Re: Frequency Response Analyzer with Bode Plots

Post by CW555 » Mon Jan 28, 2019 10:49 am

Ah. I've just realised the .msi I downloaded is the beta (hence the b) I've installed 0.6.1 and it works now.

just some features and improvements I'd like to suggest:
1. documentation on the settings window. The lay amongst us don't know what some of these settings do.
2. The ability to set amplitude for single frequencies or ranges.

I'm currently trying to measure the PSRR of an LDO and its ideal if I can set the amplitude for a given frequency as sometimes the input or output signal is distorted a little. If I can determine what frequencies need what amplitude and set them in the FRA then that would be very useful.

_Wim_
Advanced
Posts: 0
Joined: Sun Nov 12, 2017 11:31 am

Re: Frequency Response Analyzer with Bode Plots

Post by _Wim_ » Sun Feb 10, 2019 12:13 pm

(copied from my post at EEVBlog)

I have been a big fan of using the app FRA4Picoscope to generate bode plots. This for me makes the Pico products much more useful.

By using a reference resistor in series with a DUT, it is possible to calculate the impedance from the DUT. For this a made a small tool to do the calculation automatically, and also to allow the user to more easy compare different bode plots in once view. Currently, you can open the CSV-files generated by FRA4Picoscope, and view and compare them easily in the different impedance views.

I programmed automatic cursors, a zoom function for each individual axis, and both logarithmic and linear frequency axis. When a CSV file is opened, the used reference resistor is requested. This can be different for each file (to allow the user to choose the optimal value for the DUT) in the same plot view. You can also copy pictures/data to the clipboard (data can be pasted in excel directly), or save them to a file.

Attached is the program, including some test data to allow non-Pico users to have a go also. If some other scopes can generate bode plot data (frequency, gain and phase), it should be no problem to make an import functionality for these also. I am still cleaning up a bit of my code, once finished the code will be available as open source also.

Enjoy! Feedback is off course much appreciated.

Installation is not required, just unzip the package and run the exe. It does need dotNet 4.6.1 or higher. The software was written in Visual Studio2017 community edition, using the standard chart component of dotNet (no external libraries used for charting).

Remark: files are too big to attach here (max 256K allowed), please see http://www.eevblog.com/forum/testgear/r ... plot-data/ for more details
Attachments
Cursor example s.jpg
Inductance s.jpg
Capacitance s.jpg
TestSetup.JPG

Post Reply