Frequency Response Analyzer with Bode Plots

Post discussions on applications you are writing
Post Reply
Rolandvanroy
Newbie
Posts: 0
Joined: Sun Jan 28, 2018 8:34 am

Re: Frequency Response Analyzer with Bode Plots

Post by Rolandvanroy »

Hi,

I have uploaded a PDF file to my website which shows details on how I did several gain-phase measurements using the PicoScope FRA utility on a buck converter prototype . You can download the file via below link:

http://www.simprojects.nl/images/Gain_P ... ements.pdf

I will post more info on how to make the signal injection transformer when I receive the common-mode choke I ordered for this purpose.

Roland

Rolandvanroy
Newbie
Posts: 0
Joined: Sun Jan 28, 2018 8:34 am

Re: Frequency Response Analyzer with Bode Plots

Post by Rolandvanroy »

Hi,

You can find a tutorial on how to make a signal injection transformer for testing DC/DC converter gain-phase with the FRA utility via the below link.

http://www.simprojects.nl/images/DIY_si ... former.pdf

The tutorial describes the basic transformer requirements and the materials you need for making your own transformer. I used the core from a Coilcraft CMT4 series common mode choke. (I ordered it via their free sample service), but Mouser also carries some of these types. I used the PicoScope FRA to verify the simulation results with actual measured results, which match quite closely :D

Picofreak
Newbie
Posts: 0
Joined: Thu May 10, 2012 4:47 am

Re: Frequency Response Analyzer with Bode Plots

Post by Picofreak »

Hi Aaron,
Your FRA4 utility in version 0.6.1 makes Picoscope and 3000 Series a very versatile tool! I tested this with Picoscope 3207B works well, Picoscope 4227 works not. The log output is the following:

Status: 4227 S/N: CO149/145 successfully initialized.
Status: Starting frequency step 1 (1.001 Hz)
Status: Starting frequency step 1, range try 1
Status: Setting signal generator frequency to 1.001 Hz
Status: Setting input channel range to ± 2 V
Status: Setting output channel range to ± 50 mV
Status: Capturing 1025 samples (16 cycles) at 64.1 Hz takes 16.0 sec.
Fatal error: Failed to setup stimulus signal: 46
Error: Failed to disable signal generator.

So the issue is here the bold line. When i press the cancel button before the data is submitted (time < 16s) i can stop the application, otherwise the application crashes. Restart is then not possible, so i must kill the process manually. I found the position in the source code, but i'am not sure what is the problem.
best regards
Armin

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 »

Hi Armin,

Thank you for trying out the FRA app on your scopes! Compatibility reports are very helpful. I hope I can help get this working on your PS4227.

Just to clarify, I assume the log you're showing is from a canceled run? - because if the application crashed I assume you can't get the log.

I assume the crash is not silent (application does not simply disappear) if you can go into debug mode to get the source information. Or are you building the application yourself in debug mode? I'm pretty sure all of the versions I'm publishing on Bitbucket are Release versions.

Can you supply a source module and line number for where the application is crashing?

Thank you,

Aaron.

Picofreak
Newbie
Posts: 0
Joined: Thu May 10, 2012 4:47 am

Re: Frequency Response Analyzer with Bode Plots

Post by Picofreak »

Hi Aaron,

Just to clarify, I assume the log you're showing is from a canceled run? - because if the application crashed I assume you can't get the log.
Yes your assumption is correct. When i not cancel the application, then the following log is the output:

Status: 4262 S/N: AW737/147 successfully initialized.
Status: Starting frequency step 1 (10.000 Hz)
Status: Starting frequency step 1, range try 1
Status: Setting signal generator frequency to 10.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 640 Hz takes 1.6 sec.
Status: Starting frequency step 1 (10.000 Hz)
Status: Starting frequency step 1, range try 1
Status: Setting signal generator frequency to 10.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 640 Hz takes 1.6 sec.
Status: Transferring and processing 1025 samples

Note: 1.
The transferring process starts, and after this moment the application is blocked and you can only kill with the task manager, otherwise the box "Fatal Error" is visible with the message "Cannot run multiple instances of FRA4
Note 2.
I have tested this on two machines one with Windows 7 and one with Windows 10
Note 3.
I have total 1 times 3207B, 1 times 4262, 5 times 4227 and 1 time 6404B. Above is the log with the 4262.
Note 4.
I assume only the 3207B runs correct. The 4262, 4227, 6404B does not run.
Note 5.
The signal generator delivers 1Vpp with 10 Hz output correctly.

I assume the crash is not silent (application does not simply disappear) if you can go into debug mode to get the source information. Or are you building the application yourself in debug mode? I'm pretty sure all of the versions I'm publishing on Bitbucket are Release versions.

Can you supply a source module and line number for where the application is crashing?


For the moment i have not debugged the application. For me is clear that inside or after the transfer process is the bug. Eventually next week is room for debugging.

best reagards
Armin

Ian P
User
User
Posts: 2
Joined: Fri May 26, 2017 8:54 am
Location: UK

Re: Frequency Response Analyzer with Bode Plots

Post by Ian P »

Dear Aaron

I've now been using your software for a while and once again many thanks for such a useful tool.
Based on this use I have some suggestions for future upgrades should you choose to undertake them. Please don't take these suggestions as criticism, if you never do any more work on it I will still be using it every day! And I have workarounds for all the items below.

1 – Annotation of plots. Add the setup data in the control pane to the plot and also a free text box to describe the measurement. It would be great to add a printer capability too, I know it's already on your list to do that. In my own work I would probably mostly output to a PDF writer. Workaround - a pencil :-)

2 – Ability to switch from magnitude and phase to real and imaginary parts. I already do a workaround for this by using the CSV output and calculating in a spreadsheet, but it would be nice to be able to see it in real-time within the program. One application is that it's extremely useful to be able to view in this way for complex filter networks such as multi-way loudspeaker crossover networks. Amplifiers can be susceptible to sudden dips in the real part of impedance than are not so easily seen in a magnitude/phase plot.

3 – Comparison of an output with a reference file (checking 2 circuits perform identically or within specified tolerance). Again I've done this externally by comparing CSV data. Also another workaround is to use both measurement channels on the outputs, with one channel being connected to the reference circuit as ”input” and both channels driven from the signal generator. This works well.

4 – Ability to load custom probe files? For example: I already have custom files for my Tektronix P6021 current probe for use with the usual Picoscope software, it would be nice to be able to load them into FRA4 too.

I hope this is helpful. I would normally PM this sort of thing but I don't have sufficient site privileges. If there is an admin reading this who can change that I would appreciate it.
Best regards
Ian

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 »

Hi Ian,

Feedback is always appreciated! I've included some thoughts below.
Ian P wrote:Dear Aaron

I've now been using your software for a while and once again many thanks for such a useful tool.
Based on this use I have some suggestions for future upgrades should you choose to undertake them. Please don't take these suggestions as criticism, if you never do any more work on it I will still be using it every day! And I have workarounds for all the items below.

1 – Annotation of plots. Add the setup data in the control pane to the plot and also a free text box to describe the measurement. It would be great to add a printer capability too, I know it's already on your list to do that. In my own work I would probably mostly output to a PDF writer. Workaround - a pencil :-)
This is a good idea. It probably would not be practical to include all setup info (consider advanced settings too), so do you have any suggestions on which is most important?
Ian P wrote: 2 – Ability to switch from magnitude and phase to real and imaginary parts. I already do a workaround for this by using the CSV output and calculating in a spreadsheet, but it would be nice to be able to see it in real-time within the program. One application is that it's extremely useful to be able to view in this way for complex filter networks such as multi-way loudspeaker crossover networks. Amplifiers can be susceptible to sudden dips in the real part of impedance than are not so easily seen in a magnitude/phase plot
I assume you're referring to a Nyquist or Nichols plot. I understand the importance. I can put it on the future features list.
Ian P wrote:
3 – Comparison of an output with a reference file (checking 2 circuits perform identically or within specified tolerance). Again I've done this externally by comparing CSV data. Also another workaround is to use both measurement channels on the outputs, with one channel being connected to the reference circuit as ”input” and both channels driven from the signal generator. This works well.
I really like the creativity of your workaround, but I also see the utility in having a feature to compare to a stored reference. Are you thinking of a strictly visual comparison? Or maybe something more automated that compares against reference data with tolerances?
Ian P wrote:
4 – Ability to load custom probe files? For example: I already have custom files for my Tektronix P6021 current probe for use with the usual Picoscope software, it would be nice to be able to load them into FRA4 tool.
Definitely a good idea. I have some homebrew probes that could use this. I wonder if the PicoScope format for these files is public? If so that would make it easier because it would be a lot more work to make a GUI configuration like that in the PicoScope App.
Ian P wrote:
I hope this is helpful. I would normally PM this sort of thing but I don't have sufficient site privileges. If there is an admin reading this who can change that I would appreciate it.
Best regards
Ian
Definitely helpful, thank you. Also, if you really had a strong need for customizations, do remember that there is a FRA4PicoScope API. With a little Excel + VBA much of what you're wanting above could be accomplished.

Thanks again for your feedback!

Ian P
User
User
Posts: 2
Joined: Fri May 26, 2017 8:54 am
Location: UK

Re: Frequency Response Analyzer with Bode Plots

Post by Ian P »

Dear Aaron
Sorry for the delay in replying, combination of work, holiday and illness!

1. Annotation
I would suggest all the data in the basic setup pane, and any advanced settings can go in as free text along with the description of the measurement. It might be wise to limit the size of the text (200 characters?)

2. Magnitude and phase:
Yes certainly a Nyquist plot. I hadn't heard of Nichols plot (had to google it!) but I imagine some users would find it useful. My graphing uses neither of the above. From the spreadsheet I generate X= log frequency, Y= linear ohms, for both real and imaginary. Don't know if this visualisation has a name!

3. Measurement comparison:
Visual is fine but I also see the benefit of a reference file. Your call I think.

Best regards
Ian

1audio
Newbie
Posts: 0
Joined: Fri Apr 20, 2018 4:57 pm

Re: Frequency Response Analyzer with Bode Plots

Post by 1audio »

I have an early PS3206. While I believe it should work the application reports "no compatible device found". It seems this generation needs a different driver from the 3206a-d.
demian

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 »

1audio wrote:I have an early PS3206. While I believe it should work the application reports "no compatible device found". It seems this generation needs a different driver from the 3206a-d.
demian
Demian,

Yes, it looks like the PS3206 should be a compatible scope. Would you mind checking a few things for me?

1) Does the scope work in the standard PicoScope application?
2) What version of the FRA application are you running?
3) Do you have the latest Pico SDK installed?
4) If your log says anything more than "No compatible PicoScope device found", please post it here.

Next steps may be to try to run one of the Picotech SDK examples and see if there are further diagnostics.

Thank you,

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 »

The 3206 will require the ps3000 driver and not the ps3000a which the later devices use. The signal generator also has less functionality than the newer devices so this may be an issue.
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:The 3206 will require the ps3000 driver and not the ps3000a which the later devices use. The signal generator also has less functionality than the newer devices so this may be an issue.
Thank you for the details, Martyn. The application was coded to handle the PS3206, but of course it will also limit the signal generator frequency to a range of 100Hz to 1MHz and amplitude fixed to 1Vpp. Though none of that logic has been tested (to my knowledge), I would not expect any of those limitations to inhibit opening the scope.

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 »

The PicoScope 4444 does not have a signal generator so will not be supported by the application.
Martyn
Technical Support Manager

WMAlbers
Newbie
Posts: 0
Joined: Wed Jun 27, 2018 5:26 pm

Re: Frequency Response Analyzer with Bode Plots

Post by WMAlbers »

Hello Aaron,
I am a new user hobbyist of the picoscope (2204A). The FRA analyzer you provided works well. Very usefull tool! I only want to check if the magnitude is voltage or power based Decibels... I need to convert the Decibels back to peek voltage ratio, so as to be able to further compute the impedance modulus of my test setup. The application is generally testing of loudspeakers I repair/build.
Best greetings,
Martin Albers

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 »

WMAlbers wrote:Hello Aaron,
I am a new user hobbyist of the picoscope (2204A). The FRA analyzer you provided works well. Very usefull tool! I only want to check if the magnitude is voltage or power based Decibels... I need to convert the Decibels back to peek voltage ratio, so as to be able to further compute the impedance modulus of my test setup. The application is generally testing of loudspeakers I repair/build.
Best greetings,
Martin Albers
Hi Martin,

Thank you for the feedback. The dB scale is voltage based: 20 log(Aout/Ain), Ax = Amplitude of the DFT on the voltage signal.

Aaron.

Post Reply