Frequency Response Analyzer with Bode Plots

Post discussions on applications you are writing
Post Reply
yosi
Newbie
Posts: 0
Joined: Mon Mar 22, 2021 12:50 pm

Re: Frequency Response Analyzer with Bode Plots

Post by yosi »

Dear Aaron, Thanks a lot !

I could managed to fix.
When I installed PicoscopeSDK, I unselected Ps6000x devices.
That seems to be the reason of this problem.

First, I uninstall and re-install v0.7.3b of FRA4. -- nothing changed.
Next, signed in as different user, and try -- same, no change.

As to your suggestion '2)' , I could not figure out what you meant acturally,
because I 've never seen FRA4's splash screen at that time.
I thought you mean picotech's Picoscope application, and questioned why?
I have installed FRA4 into windows 7 environment, and knew FRA4 splash screen.

Then to make things clean, I reinstalled both FRA4 and SDK, that worked.
After mean time, I remember that I might disabled Ps6000a device.

Thanks again.

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

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer »

Thank you, yosi, for reporting back. Since this:
yosi wrote:
Sat Mar 27, 2021 5:29 am
When I installed PicoscopeSDK, I unselected Ps6000x devices.
seems like a completely reasonable thing to do, I'll see if I can replicate. If I can, I'll work on improving the application so it doesn't crash and offers a better diagnostic.

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

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer »

yosi wrote:
Sat Mar 27, 2021 5:29 am
Dear Aaron, Thanks a lot !

I could managed to fix.
When I installed PicoscopeSDK, I unselected Ps6000x devices.
That seems to be the reason of this problem.

First, I uninstall and re-install v0.7.3b of FRA4. -- nothing changed.
Next, signed in as different user, and try -- same, no change.

As to your suggestion '2)' , I could not figure out what you meant acturally,
because I 've never seen FRA4's splash screen at that time.
I thought you mean picotech's Picoscope application, and questioned why?
I have installed FRA4 into windows 7 environment, and knew FRA4 splash screen.

Then to make things clean, I reinstalled both FRA4 and SDK, that worked.
After mean time, I remember that I might disabled Ps6000a device.

Thanks again.
Well, I'm happy you got it working :), but I can't really tell what was going on. I tried re-installing the SDK without PS6000a and ps6000 support, but can't get it to crash. Only other thing I can think of that may be relevant is what version of the Picoscope app you had installed. The FRA app is setup to delay load the DLL files in order to implement a preference for the versions from SDK folders first. If it fails to load those, it can load DLLs from the Picoscope app. If there were some kind of incompatibiity there maybe it would cause an issue.

GJA14
Newbie
Posts: 0
Joined: Sat Apr 17, 2021 11:46 pm

Re: Frequency Response Analyzer with Bode Plots

Post by GJA14 »

I'm looking to do loop gain and phase Bode plots on SMPS with switching frequency 100Khz or less. Are the 2204A and 2205A capable of doing adequate FRA plots for the above scenario or is it necessary to go up to higher models with higher sample rates, memory depth, and resolution and if so what are the minimum scope specifications needed for the above case?

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

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer »

GJA14 wrote:
Tue Apr 27, 2021 3:43 am
I'm looking to do loop gain and phase Bode plots on SMPS with switching frequency 100Khz or less. Are the 2204A and 2205A capable of doing adequate FRA plots for the above scenario or is it necessary to go up to higher models with higher sample rates, memory depth, and resolution and if so what are the minimum scope specifications needed for the above case?
Hello GJA14! Here's a good thread covering this topic: topic41113.html

Key takeaways:
  1. Due to the small buffer and 8-bit resolution, scopes like the 2204A and 2205A will likely have problems with SMPS FRA
  2. Both larger memories and higher resolution can help, but both may not be required
  3. One key factor is the amount of ripple (noise) you'll be recovering the small stimulus from
So, while I've not tested to confirm (all of) this, here is my opinion:
  1. The PS5000D scopes are probably best for this application due to huge buffer depth, high resolution and bandwidth limiter
  2. The PS4x24A scopes are probably a good choice because of their huge buffer depth and 12-bit resolution
  3. If you could guarantee very low ripple and get away with a relatively large stimulus, an 8-bit scope with large buffer (e.g. PS2208B) may work just fine

GJA14
Newbie
Posts: 0
Joined: Sat Apr 17, 2021 11:46 pm

Re: Frequency Response Analyzer with Bode Plots

Post by GJA14 »

Thanks hexamer for your points and opinions.

I had previously read the thread you linked along with all of the links within it, however I wasn't sure what range of freq. was being attempted in that one. By the numbers it would seem that for 100Khz and below that the 2000 series should work with the exception of the very small buffer memory depth on the 2204A and 2205A, but after looking through the specifications on the 2000 series: https://www.picotech.com/oscilloscope/2 ... ifications --- I noticed that under the SDK/API section it calls out that the "Buffer Memory in USB Streaming Mode" is "Limited Only by PC". This would seem to make the very small buffer depth on the 2204A and 2205A a none issue if indeed the FRA software through the SDK/API was able to take advantage of that.

Can you confirm whether the FRA uses only the internal buffer memory (block mode) or if it uses or is able to use the USB streaming mode and the PC's memory for the buffer memory?

I know that the latest version of the FRA offers real time plotting so it makes me think that perhaps it is using the USB streaming mode.

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

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer »

GJA14 wrote:
Thu Apr 29, 2021 6:38 am
Thanks hexamer for your points and opinions.

I had previously read the thread you linked along with all of the links within it, however I wasn't sure what range of freq. was being attempted in that one. By the numbers it would seem that for 100Khz and below that the 2000 series should work with the exception of the very small buffer memory depth on the 2204A and 2205A, but after looking through the specifications on the 2000 series: https://www.picotech.com/oscilloscope/2 ... ifications --- I noticed that under the SDK/API section it calls out that the "Buffer Memory in USB Streaming Mode" is "Limited Only by PC". This would seem to make the very small buffer depth on the 2204A and 2205A a none issue if indeed the FRA software through the SDK/API was able to take advantage of that.

Can you confirm whether the FRA uses only the internal buffer memory (block mode) or if it uses or is able to use the USB streaming mode and the PC's memory for the buffer memory?

I know that the latest version of the FRA offers real time plotting so it makes me think that perhaps it is using the USB streaming mode.
I appreciate you doing the research and thinking out of the box.

This seems like a nice idea, but unfortunately (1) I can confirm the current version only supports block capture/transfer and (2) even if it did support USB streaming mode, there would be limitations:

The 2204A and 2205A have a sampling rate limit of 1 MS/s in USB streaming mode. Why is that important? It means that signals above 500 kHz will be aliased into the measurement. In your SMPS example there are higher order harmonics of the 100 kHz switching frequency above 500kHz, and some switching transients well above that. Might you get lucky that these don't get aliased into the DFT/filter? Maybe, but hard to tell. For SMPS measurements it's best to set the sampling rate to at least 2x the scopes bandwidth limiter. For the PS5000D scopes, with a 20 MHz bandwidth limiter, the default "Noise reject" mode sampling frequency is 62.5 MS/s

As for others scopes that support faster USB streaming, well ... they also have much larger buffers. The 2206A with its 32 MS buffer may be workable in block mode. The narrowest bandwidth it could achieve in the DFT is about 30 Hz, which seems pretty decent. That may be workable for SMPS, but again, I have not tested it, and you need to consider takeaway 3 above.

I certainly don't want to discourage experimentation, but I am doubtful :(

GJA14
Newbie
Posts: 0
Joined: Sat Apr 17, 2021 11:46 pm

Re: Frequency Response Analyzer with Bode Plots

Post by GJA14 »

Thanks, I appreciate all the information.

Do you think you might add the feature of USB streaming mode to a future update? I understand why the 2204A and 2205A are still not good choices for this application, but I am just thinking it could add some additional performance to some of the other models that have better sampling rates and adequate but not necessarily huge buffer sizes.

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

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer »

hexamer wrote:
Tue Mar 30, 2021 1:50 am
Well, I'm happy you got it working :), but I can't really tell what was going on. I tried re-installing the SDK without PS6000a and ps6000 support, but can't get it to crash. Only other thing I can think of that may be relevant is what version of the Picoscope app you had installed. The FRA app is setup to delay load the DLL files in order to implement a preference for the versions from SDK folders first. If it fails to load those, it can load DLLs from the Picoscope app. If there were some kind of incompatibiity there maybe it would cause an issue.
Nicosten, Yosi and anyone else who also stumbled on this problem ... I found out what's going on. The function that demand-loads the DLLs throws an exception when a DLL does not exist anywhere (SDK or PicoScope Application folders). The FRA App was not handling the exception, so it crashed. I was unable to reproduce this before, because I still had the PicoScope application installed. I fixed the issue and also re-wrote some code so that installing only some PicoScope SDK DLLs is valid. That fix will be included in the next release. Until that time, you can workaround the issue by making sure to install the SDK for all scope families.

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

Re: Frequency Response Analyzer with Bode Plots

Post by _Wim_ »

_Wim_ wrote:
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
I updated my app to work with the lastest verion of FRA (some small API changes were implemented related to scope resolution in the lastest version of FRA). Other small changes:
- renamed the tabs to clearly indicate series capacitance & inductance are measured
- added the option to disable the positive gain limiting

Source code still available on GitHub for those interested (https://github.com/WimHuyghe/FRA-Impedance-Viewer)
Attachments
ImpedanceViewer1014.zip
(539.85 KiB) Downloaded 400 times

lazy_electron
Newbie
Posts: 0
Joined: Wed Mar 10, 2021 2:53 pm

Re: Frequency Response Analyzer with Bode Plots

Post by lazy_electron »

Aaron - thank you for a very useful tool for all picoscope owners.

A few pages back, someone reported a problem when using a 5443D. I believe the reason for that issue was not having the power supply connected to the picoscope. The four channel 5000 series will only operate in two channel mode (A&B) when powered solely by USB. Despite FRA only requiring two channels, it seems the device does not initialise correctly in FRA without the external power adapter connected. I tested this with my 5444D and saw similar error messages.

Maybe there is a way FRA could operate in the 2 channel only mode (A&B), or otherwise just show an error to explain requirement for the external power adapter. Maybe the API has a method to check for external power?

Anyway, thanks again for FRA.

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

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer »

lazy_electron wrote:
Sat Sep 18, 2021 9:10 am
Aaron - thank you for a very useful tool for all picoscope owners.

A few pages back, someone reported a problem when using a 5443D. I believe the reason for that issue was not having the power supply connected to the picoscope. The four channel 5000 series will only operate in two channel mode (A&B) when powered solely by USB. Despite FRA only requiring two channels, it seems the device does not initialise correctly in FRA without the external power adapter connected. I tested this with my 5444D and saw similar error messages.

Maybe there is a way FRA could operate in the 2 channel only mode (A&B), or otherwise just show an error to explain requirement for the external power adapter. Maybe the API has a method to check for external power?

Anyway, thanks again for FRA.
Thank you for reporting your experience. Can you tell me what error code you're getting during initialization?

The application is designed to allow 2 channel mode for USB-only power on flexible power scopes like the 5000A/B/D series. I regularly test it on my PS5444A. In the issue you cited, the problem is that the scope reported that it's not getting enough power from USB to run two channels. So, I'd like to see if that's what you're seeing or if it's some other issue specific to the 5000D.

Or, perhaps your comment is more about the messaging? I agree that "Fatal error: Failed to disable channel: 290" is not terribly insightful to anyone that doesn't program with the API. So, perhaps that aspect could be improved since it's a "normal" sort of error that can be corrected by the user.

lazy_electron
Newbie
Posts: 0
Joined: Wed Mar 10, 2021 2:53 pm

Re: Frequency Response Analyzer with Bode Plots

Post by lazy_electron »

hexamer wrote:
Wed Sep 22, 2021 11:39 am
Thank you for reporting your experience. Can you tell me what error code you're getting during initialization?
Sure, this is the error message I see with 5444D scope (serial number obscured **** by me)

Code: Select all

ps5000aSetChannel( 16384, 2, 0, 0, 0, 0 );Fatal error: Failed to disable channel: 290
Status: 5444DMSO S/N: IO716/**** successfully initialized.

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

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer »

lazy_electron wrote:
Fri Sep 24, 2021 12:33 pm
hexamer wrote:
Wed Sep 22, 2021 11:39 am
Thank you for reporting your experience. Can you tell me what error code you're getting during initialization?
Sure, this is the error message I see with 5444D scope (serial number obscured **** by me)

Code: Select all

ps5000aSetChannel( 16384, 2, 0, 0, 0, 0 );Fatal error: Failed to disable channel: 290
Status: 5444DMSO S/N: IO716/**** successfully initialized.
Thank you for the details. 290 is the error code indicating the USB port is not supplying enough power. I'll work on enhancing that message so that the solution is more apparent to the user.

I'll reiterate the solution from a few posts ago (but different order):

1) Try a USB 3 port if your computer has one
2) If you don't have a USB 3 port, try a different USB port on your computer
3) Use the Picotech USB cable if you're not already
4) Plug the scope into to AUX DC power

Post Reply