Test and Measurement Forum

Frequency Response Analyzer with Bode Plots

Post discussions on applications you are writing

Re: Frequency Response Analyzer with Bode Plots

Postby hexamer » Mon Feb 20, 2017 2:16 pm

I wanted to offer some further context for this issue since I misspoke about it earlier.

It's not that the 64 bit SDK is installed (that's misleading), but rather lack of the latest 32 bit SDK being installed, which leads to a newer version of PS5000a.dll being loaded from the PicoScope App folder. Unfortunately that newer DLL seems to have an incompatibility with the way FRA4PicoScope uses it. So far all reports have been about PS5000A scopes.

I've provided example code that elicits the issue and the support team is investigating. In the meantime, using the released SDK solves the problem.
hexamer
Advanced User
Advanced User
 
Posts: 62
Joined: Tue Aug 12, 2014 10:09 pm

Re: Frequency Response Analyzer with Bode Plots

Postby nanoscope » Thu Feb 23, 2017 8:45 am

Hello hexamer,
thanks for the application, I am finding it very helpfull with my pico 4824 . I am not an expert in coding but understood that the code is opensource and I was wondering if there is any way to get the actual algorithm used by the application to calculate the frequency response and the bode diagrams since I would like to implement it in Matlal/simulink interfacing with a signal generator.
Thanks!
nanoscope
Newbie
 
Posts: 0
Joined: Thu Feb 23, 2017 8:05 am

Re: Frequency Response Analyzer with Bode Plots

Postby hexamer » Sun Mar 12, 2017 8:20 pm

nanoscope wrote:Hello hexamer,
thanks for the application, I am finding it very helpfull with my pico 4824 . I am not an expert in coding but understood that the code is opensource and I was wondering if there is any way to get the actual algorithm used by the application to calculate the frequency response and the bode diagrams since I would like to implement it in Matlal/simulink interfacing with a signal generator.
Thanks!


The high level approach is pretty straightforward. It involves executing a complex output DFT on the measured input and output signals, then Gain = output magnitude / input magnitude, Phase = output phase - input phase.

Of course there are many ways to execute a DFT. And depending on the problem you're trying to solve, you might choose one over the other.
hexamer
Advanced User
Advanced User
 
Posts: 62
Joined: Tue Aug 12, 2014 10:09 pm

Adaptive Stimulus Update

Postby hexamer » Wed Mar 15, 2017 3:19 am

Here's an update on a feature I've been working on for a while now: Adaptive Stimulus. This feature is mainly useful for SMPS measurements. For some more background, see these posts:
topic14311-105.html#p74591
topic14311-135.html#p80481
topic14311-150.html#p81601
topic14311-165.html#p83201
topic14311-165.html#p83611

Lately I've been testing it on TPS5420EVM-175 and, as expected, it's making significant improvements to the SMPS measurements. First, the low-frequency/high-gain area is much cleaner. Second, and probably more importantly, the GM and PM are very repeatable:

TPS5420EVM-175 (25.0 Vin, 1000 mA Iout, Adaptive stimulus, 15 Hz to 200 kHz, 3-14-17) a.png


TPS5420EVM-175 (25.0 Vin, 1000 mA Iout, Adaptive stimulus, 15 Hz to 200 kHz, 3-14-17) b.png


For comparison. these are the same conditions as these plots: topic14311-120.html#p78941

This feature is slated to be in v0.6b which I plan to release by the end of the month.
hexamer
Advanced User
Advanced User
 
Posts: 62
Joined: Tue Aug 12, 2014 10:09 pm

Re: Frequency Response Analyzer with Bode Plots

Postby hexamer » Fri Mar 24, 2017 3:19 am

I would like to announce v0.6b of FRA4PicoScope: https://bitbucket.org/hexamer/fra4picos ... 200.6b.msi

It address several of the bugs and feature requests on this thread. Thank you to everyone who has provided feedback. Please give the new version a spin and let me know how it works.

Below is a list of the major changes.

  • Added support for new PS2000B series scopes
    • To make this work you will need to have the PicoScope Application installed and the SDK removed.
  • Added a UI for setting the configuration (no more need to hand edit the configuration files)
  • Handle power mode changes on flexible power scopes
    • Allow operation without auxilliary DC power applied
  • Added an API feature
    • Potentially useful to support other custom applications of FRA (e.g component impedance measurement)
    • Exposed via a DLL so it is accessible via multiple languages (e.g. C#, VBA, Python, etc)
    • Available as a separate feature in the installer
  • Adaptive stimulus mode which is important for SMPS stability measurements
  • New bandwidth based sampling for noise reject mode
  • Added a log verbosity mechanism to control what messages get logged
  • Improved the installer to allow for upgrade. No longer any need to remove prior version before installing the new one
  • Detect and report invalid SDK/API version
  • Fixed several bugs, most notably:
    • Fixed compatibility issues with PS3000D/MSO and PS6000 scopes
    • Fixed several issues with time domain diagnostic plots
    • Fixed issue where application window resizes on high DPI displays when the plot is drawn
hexamer
Advanced User
Advanced User
 
Posts: 62
Joined: Tue Aug 12, 2014 10:09 pm

Re: Frequency Response Analyzer with Bode Plots

Postby Techland » Thu Apr 20, 2017 8:15 pm

I really would like to try out this software/tool - unfortunately I can't get it working. Windows 10 64, not the latest Creator's update, FRA 0.6. I have a 4262, which is detected on start of FRA. All standard default settings. I hit go, the log says it will start with the first frequency, I hear a relay click sound - then nothing else happens and FRA hangs forever. Have to exit it via Task Manager.

4262 and Picoscope software run without any problems.
Last edited by Techland on Fri Apr 21, 2017 3:32 am, edited 1 time in total.
Techland
Newbie
 
Posts: 0
Joined: Thu Apr 20, 2017 8:08 pm

Re: Frequency Response Analyzer with Bode Plots

Postby Martyn » Thu Apr 20, 2017 8:29 pm

Do you have the 32bit SDK installed ?
Martyn
Technical Support Manager
Martyn
Site Admin
Site Admin
 
Posts: 2746
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Frequency Response Analyzer with Bode Plots

Postby Techland » Fri Apr 21, 2017 4:00 am

Martyn wrote:Do you have the 32bit SDK installed ?


Yes. Log window says:
Status: 4262 successfully initialized
Status: Starting frequency step 1 (1.000 Hz)

and that's it...
Attachments
sshot-159.png
Techland
Newbie
 
Posts: 0
Joined: Thu Apr 20, 2017 8:08 pm

Re: Frequency Response Analyzer with Bode Plots

Postby hexamer » Fri Apr 21, 2017 12:26 pm

Techland wrote:
Martyn wrote:Do you have the 32bit SDK installed ?


Yes. Log window says:
Status: 4262 successfully initialized
Status: Starting frequency step 1 (1.000 Hz)

and that's it...


Hello and thank you for your interest and patience!

I do test on Windows 10, but unfortunately do not have a PS4262 to test. If you wouldn't mind, please go into Tools->Settings->Log Verbosity and check all boxes, then try again reporting back the log. It might help us figure out more precisely where it is getting hung up.

I won't speculate too much, but the fact that you have to forcibly terminate it would seem to indicate that the data capture timeouts are not being computed properly. If it's something more serious, I could send you a debug version which may be able to report internal exception details.
hexamer
Advanced User
Advanced User
 
Posts: 62
Joined: Tue Aug 12, 2014 10:09 pm

Re: Frequency Response Analyzer with Bode Plots

Postby Techland » Fri Apr 21, 2017 8:09 pm

hexamer - thanks for coding this nice tool and providing it to the community!

I checked all log entries and got this:

Status: 4262 S/N: CU988/013 successfully initialized.
Status: Starting frequency step 1 (1.000 Hz)
Status: Starting frequency step 1, range try 1
Status: Setting signal generator frequency to 1.000 Hz
Status: Setting input channel range to ± 1 V
Status: Setting output channel range to ± 10 mV
Status: Capturing 1025 samples (16 cycles) at 64 Hz takes 16.0 sec.
Status: Transferring and processing 1025 samples

This is when nothing happens anymore and FRA's CPU load is near zero.
Closing the app then leaves it active with 32% CPU (4 core i5), so I have to end the process via Task manager.

I gladly try a debug version if that helps.
Techland
Newbie
 
Posts: 0
Joined: Thu Apr 20, 2017 8:08 pm

Re: Frequency Response Analyzer with Bode Plots

Postby hexamer » Sun Apr 23, 2017 2:06 am

Techland wrote:hexamer - thanks for coding this nice tool and providing it to the community!

I checked all log entries and got this:

Status: 4262 S/N: CU988/013 successfully initialized.
Status: Starting frequency step 1 (1.000 Hz)
Status: Starting frequency step 1, range try 1
Status: Setting signal generator frequency to 1.000 Hz
Status: Setting input channel range to ± 1 V
Status: Setting output channel range to ± 10 mV
Status: Capturing 1025 samples (16 cycles) at 64 Hz takes 16.0 sec.
Status: Transferring and processing 1025 samples

This is when nothing happens anymore and FRA's CPU load is near zero.
Closing the app then leaves it active with 32% CPU (4 core i5), so I have to end the process via Task manager.

I gladly try a debug version if that helps.


Thank you for this detail. I can tell the program is likely getting hung up in GetPeakValues, which is a function that I had problems with in this topic (topic14311-210.html#p97491), though in that case, it's not hanging up and that issues seems specific to PS5000A.

I wonder if the Pico support team can try the example project I gave them on a PS4262 and see if this problem can be replicated?

I can't see any code in the FRA application itself that could hang up to that point. So there's probably no benefit in giving you the Debug version. But I did build it anyway and you can give it a try if you wish: https://bitbucket.org/hexamer/fra4picos ... %200.6.msi
hexamer
Advanced User
Advanced User
 
Posts: 62
Joined: Tue Aug 12, 2014 10:09 pm

Re: Frequency Response Analyzer with Bode Plots

Postby Martyn » Tue Apr 25, 2017 12:05 pm

I have quickly replicated the issue here :( but will need to debug further to see what we can find :)
Martyn
Technical Support Manager
Martyn
Site Admin
Site Admin
 
Posts: 2746
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Frequency Response Analyzer with Bode Plots

Postby Techland » Thu May 25, 2017 2:46 am

One month later....
Techland
Newbie
 
Posts: 0
Joined: Thu Apr 20, 2017 8:08 pm

Re: Frequency Response Analyzer with Bode Plots

Postby martin.s » Thu Jun 22, 2017 9:30 pm

Hello,

I have a problem. FRA4 not works with my new 2206B - "Error: Unable to initialize device with serial number EY465/0001"
I am using PicoSDK_64_10.6.10.24 from included CD.

Before there I used 2204A and everything worked perfect.

Can you tell me some reason? I tried to use 32bit sdk or old version 64bit and something else and nothing works.
I need to do a bode plot with FRA4.
Can you help me? Thanks.
Attachments
fra.PNG
fra.PNG (11.46 KiB) Viewed 610 times
Last edited by martin.s on Tue Jul 18, 2017 6:43 pm, edited 1 time in total.
martin.s
Newbie
 
Posts: 0
Joined: Thu Jun 22, 2017 8:43 pm

Re: Frequency Response Analyzer with Bode Plots

Postby hexamer » Fri Jun 23, 2017 12:41 pm

martin.s wrote:Hello,

I have a problem. FRA4 not works with my new 2208B - "Error: Unable to initialize device with serial number EY465/0001"
I am using PicoSDK_64_10.6.10.24 from included CD.

Before there I used 2204A and everything worked perfect.

Can you tell me some reason? I tried to use 32bit sdk or old version 64bit and something else and nothing works.
I need to do a bode plot with FRA4.
Can you help me? Thanks.


Hello and thank you for reporting this - I suspect this may be a common problem. Since the SDK does not yet include support for the newer 2000B scopes, the API DLLs have to come from the PicoScope application. The FRA4PicoScope application prefers to get its DLLs from the SDK location. So it will load incompatible DLLs for these newer scopes. The workaround is to uninstall all PicoScope 32 bit SDKs, keep the PicoScope Application installed, then run the FRA application. You should be able to keep 64 bit SDKs installed if you need them for something else.

Thanks You,

Aaron.
hexamer
Advanced User
Advanced User
 
Posts: 62
Joined: Tue Aug 12, 2014 10:09 pm

PreviousNext

Return to Applications

Who is online

Users browsing this forum: No registered users and 0 guests