Frequency Response Analyzer with Bode Plots

Post discussions on applications you are writing
Post Reply
springburo
Newbie
Posts: 0
Joined: Mon Jun 08, 2015 5:24 pm

Re: Frequency Response Analyzer with Bode Plots

Post by springburo »

the FRA is really good. We save the data to excel and then post process to evaluate inductance etc. But it is a bit tedious manual work.
Is there any way to control) the fra from excel and get is to automatically save the data in excel using VBA or similar

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

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer »

springburo wrote:the FRA is really good. We save the data to excel and then post process to evaluate inductance etc. But it is a bit tedious manual work.
Is there any way to control) the fra from excel and get is to automatically save the data in excel using VBA or similar
Thank you for the feedback. To help me keep track of compatibility, could you tell me which PicoScope you are using?

As far as automating your application, I can think of a few options, which I'll categorize since there are probably several suboptions in some:

1) Programmatically through writing your own application. E.g through Windows UI Automation (https://msdn.microsoft.com/en-us/librar ... 84009.aspx)
2) Using an automation tool like Winrunner or AutoIT
3) Eventually when I make this multi-platform, I'll likely wrap the PicoScope FRA class into a Dll, which you could use from Excel VBA

Another option altogether would be to build LCR calculations into the program itself, i.e. akin to post processing for phase and gain margin.

springburo
Newbie
Posts: 0
Joined: Mon Jun 08, 2015 5:24 pm

Re: Frequency Response Analyzer with Bode Plots

Post by springburo »

We are using picoscope 6.11.4.929, with a 5443A.

Our preferred solution is embedding in excel or being able to set up through excel vba.

As this allows full and universal post processing.

thanks again for the great tool

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

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer »

zolkow wrote:I think they look as expected.. great job!

I have some thoughts btw., maybe some of them are relevant only for me, so take these very subjective :)
-I'd like to see a fullscreen option,I like to investigate the plots in high resolution :)
-maybe really only useful for me, but if I could invert one channel's phase... some of my preamps are inverting, some are not. I know that the phase plot's usual drawing method is to jump to the other side of the plot instead of taking a continouos line beyond for example 270 degrees, so it's normal, but sometimes I'd like to see the continouos line.
Instead of inverting also a setting for phase offset could do that: inverting output=+180 degrees, non-inverting= no offset.
-Probably sometimes I would hide the phase plot, just for the cleaner look. (maybe that's already done,I didn't search for that too hard)

Anyway, for me, this tiny scope with this program became a great tool :)
Thanks again!
Hi Zolkow. I've been working on some changes toward a v0.5b release. One feature will be a "phase unwrapping" option, which I think is what you're asking for above so that you don't get phase jumps when wrapping to/from +/-180. The attached is a graph of a two stage LPF that exhibits a full 360 phase response. Let me know if this is what you had in mind.

For anyone wondering about the graph ... you may notice that the response starts to change around 20 kHz. There are a couple of reasons for that. First is that the attenuation is getting beyond 90dB, so it's really pushing the dynamic range of the scope - at 90 dB attenuation, a 2Vpp signal gets attenuated down to only about 63 microvolts. To the right of this, the gain and phase gets even more noisy. Second is probably that the inductance in my long ground leads are starting to have an effect at high frequency.
Attachments
4th Order, Lowpass, Sallen Key, Butterworth, 1kHz Unwrapped (PS5444A, high noise mode, zoomed).png

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

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer »

I would like to announce v0.5b of FRA4PicoScope: https://bitbucket.org/hexamer/fra4picos ... 200.5b.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. I'd like to start building a list of scope model compatibility reports.

Below is a list of the major changes.
  • Added support for PS3000D[MSO], PS4000A, PS5000, and PS6000 family scopes. This code is currently untested.
    • This completes initial implementation of all compatible PicoScope models.
  • Plotting enhancements
    • Independently plot gain and phase
    • Specify phase wrapping threshold
    • Phase unwrapping option
    • Store and recall plot settings
  • Compute and plot gain and phase margins
    • Includes ability to control phase crossover point for gain margins
  • Analysis efficiency enhancements
    • Initial range for input channel considers the signal generator amplitude
    • Option to traverse frequencies in descending order (sweepDescending)
  • Switched to new Pico Technology installed API, version 10.6.10.22
  • Fixed several bugs, most notably:
    • Fixed another issue with time domain diagnostic plots which prevented them from working on machines without PLplot build files.
    • Signal generator precision was being calculated incorrectly for PS3000 family scopes
    • Data capture timeout was not computed correctly for some scope families, preventing lower frequencies from being used.

garya
Newbie
Posts: 0
Joined: Mon Nov 16, 2015 10:02 pm

Re: Frequency Response Analyzer with Bode Plots

Post by garya »

I have downloaded windows installer 0.5b
Plug in scope: 6402
start FRA and get
"Error: Unable to initialize device with serial number AQ552/011"

???

Gary

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

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer »

garya wrote:I have downloaded windows installer 0.5b
Plug in scope: 6402
start FRA and get
"Error: Unable to initialize device with serial number AQ552/011"

???

Gary
Gary,

Thank you for trying this out. I appreciate your patience. I'll take a look and see if there is anything obvious related to that error message. If I can't spot it, I will build a special diagnostic version for you. Then, hopefully you can run it and report your results.

Thanks,

Aaron.

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

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer »

garya wrote:I have downloaded windows installer 0.5b
Plug in scope: 6402
start FRA and get
"Error: Unable to initialize device with serial number AQ552/011"

???

Gary
Gary,

Just a couple quick questions before I dig too far ... (1) Is the error repeatable? (2) Since this is a scope with external DC power, do you have DC power connected?

For other scopes such as PS5000A, I decided that if the initialization returned "PICO_POWER_SUPPLY_NOT_CONNECTED", I would fail the initialization since you can't run two channels and the signal generator without DC power. I copied that logic to other scopes including PS6000. But, I'm not sure if that logic should apply to all scopes with external DC power, so I'll do some more research on that topic.

Thanks,

Aaron.

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Frequency Response Analyzer with Bode Plots

Post by Martyn »

PICO_POWER_SUPPLY_NOT_CONNECTED is not applicable as the Power Supply is always needed for 6000 series devices.
Martyn
Technical Support Manager

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

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer »

Martyn wrote:PICO_POWER_SUPPLY_NOT_CONNECTED is not applicable as the Power Supply is always needed for 6000 series devices.
Thank you for clarifying that, Martyn. Will the PS6000 scopes still establish a USB connection without external DC power, and would they also enumerate? If so, what code would they return on attempting to open? PICO_NOT_FOUND?

So, I assume Gary is used to the scope always requiring external DC power, but I would still like to double check just to be sure that's not the problem.

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

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer »

garya wrote:I have downloaded windows installer 0.5b
Plug in scope: 6402
start FRA and get
"Error: Unable to initialize device with serial number AQ552/011"

???

Gary
Gary,

Could you confirm that you are using the 6402 model and not 6402A/B/C/D? For some reason I missed that there exist versions without letter suffixes. I should be able to provide a version to confirm this is the problem.

Thanks,

Aaron.
Last edited by hexamer on Wed Nov 18, 2015 4:32 am, edited 1 time in total.

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

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer »

hexamer wrote:
garya wrote:I have downloaded windows installer 0.5b
Plug in scope: 6402
start FRA and get
"Error: Unable to initialize device with serial number AQ552/011"

???

Gary
Gary,

Could you confirm that you are using the 6402 model and not 6402A/B/C/D? For some reason I missed that there exist versions without letter suffixes. I should be able to provide a version to confirm this is the problem.

Thanks,

Aaron.
Gary,

Here's a version that should be able to open a 640x PicoScope: https://bitbucket.org/hexamer/fra4picos ... 0.5.1b.msi

Also, I found some similar issues with the newly added PS3000D[MSO] scopes - so if anyone was having similar trouble with those scopes, you can try this version which fixes those issues too.

Aaron.

garya
Newbie
Posts: 0
Joined: Mon Nov 16, 2015 10:02 pm

Re: Frequency Response Analyzer with Bode Plots

Post by garya »

Sorry, Aaron, I was a bit lax about getting back to look. Thought I read that replies would be emailed but no. Anyway, I'm about to try the new build you've just linked to.
It has no a/b/c/d after the model number that I can find.
It is repeatable as I tried it many times. Rebooted windows; opened 'scope with PicoscopeSW and then tried (obviously scope used by PicoSW so didn't see a 'scope available) so closed picoscopeSW and retried.
Hang on...

garya
Newbie
Posts: 0
Joined: Mon Nov 16, 2015 10:02 pm

Re: Frequency Response Analyzer with Bode Plots

Post by garya »

OK, Aaron, that part works but now I get:

Fatal error: Failed to setup input channel: 269
Status: 6402 S/N: AQ552/011 successfully initialized.

Gary

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

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer »

garya wrote:OK, Aaron, that part works but now I get:

Fatal error: Failed to setup input channel: 269
Status: 6402 S/N: AQ552/011 successfully initialized.

Gary
Gary,

Thank you again for helping out. As I mentioned before I really am "flying blind" with scopes I can't test. The detailed error message you provided helped me zero in on the new problem and it should be a simple fix. Error code 269 (10D) is PICO_BANDWIDTH_NOT_SUPPORTED - Bandwidth limit is not supported on the opened device.

I think the documentation is a little ambiguous here. As far as I can tell the 6402 scope has a bandwidth limiter. But, due to a bug in the code, the application tries to use the 25MHz bandwidth limit value, which is only legitimate on the 6404 scopes. The code should use the 20 MHz bandwidth limiter for 6402 and 6403. I'll look for similar problems and get a fix published soon.

Thanks,

Aaron.

Post Reply