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 dantooth » Mon Jul 04, 2016 3:48 pm

Thanks Aaron.

Yes, agreed, the low frequency response is not usually where we're looking at primarily.
Also you're right that it is +/-50mV full scale is the most sensitive setting for 3206B.

I was also wondering - do you make use of the moving average filter? That increases the effective resolution of the ADC, at the expense of lower overall sampling frequency. Could be useful, maybe at low frequencies where I guess you inject a small signal due to the high gain of the control loop at the low frequencies?
(When I fire up my Picoscope software GUI, then the averaging is found under the Channel Options for that particular channel and the Resolution Enhancement allows you to increase the effective resolution up to 12 bits.)

Actually that reminds me - are you planning on implementing the adjustable stimulus amplitude across the frequency range? I think that is usual method, as I read up on the subject.
I know it's easy for me to ask, but takes time for you...

When I look at various videos of people doing these measurements using the typical gain/phase analyzer's on the market, then they are using scope probes and other cable connections that use co-ax cable, but then have either a long ground leads (in the case of a scope probe) or flying leads with hook-type connectors on the end (in the case of the cable that injects the signal from the transformer). This kind of test set-up picks up a lot of switching noise (from the dc/dc converter) and couples it right into your signal, increasing the noise. To greatly reduce this there are better ways to connect the probes into the circuit using soldered connectors. My picoscope came with some adapters that allow you to remove the probe tip and instead fit something that would connect right into a miniature BNC connector that is soldered onto the PCB. That would keep the scope shielded for right up to the PCB. The link below shows what I'm on about, but the solution used there is a bit makeshift and I think the adapters I mention would be even better.
http://www.eetimes.com/document.asp?doc_id=1273282

Regards Dan
dantooth
Newbie
 
Posts: 0
Joined: Wed Jun 29, 2016 4:56 pm

Re: Frequency Response Analyzer with Bode Plots

Postby hexamer » Tue Jul 12, 2016 10:51 pm

Hi Dan,

Sorry for the delay in responding. I've been studying some other signal processing enhancements related to a topic mentioned earlier in the thread.

I appreciate the recommendation for resolution enhancement. Provided sufficient background noise, I think it could help with small signal cases. Just a note, the resolution enhancement in the PicoScope application is implemented in the PC software. So I'd have to implement equivalent processing in the FRA app. The modular design should make that relatively straightforward though.

Adaptive input signal amplitude is definitely at the top of the priority list - it's probably the most important enhancement for SMPS loop analysis. I've been mulling over various options, but haven't started implementing it yet. While I can't commit to a timeline, I assure you it's pretty important to me!

Thank you for pointing out the importance of probe connections. I like what you're proposing. I assume you're talking about something like placing a U.FL connector on the board and then running a coax of appropriate impedance to the scope. Minimizing apparent ripple and switching transients would also help the dynamic range problem.

Thanks,

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

Re: Frequency Response Analyzer with Bode Plots

Postby dantooth » Wed Jul 13, 2016 7:38 am

HI Aaron
Yes regarding the probes. My probes come with a connector that you can attach to your scope probe, after you have removed the tip and gnd lead. So you can use the scope probe to connect into that connector on your pcb.
(The gnd lead picks up a lot of switching noise and makes the probed signal look noisy when in fact it is noise coupled into the probe lead.)
Regards Dan
dantooth
Newbie
 
Posts: 0
Joined: Wed Jun 29, 2016 4:56 pm

Re: Frequency Response Analyzer with Bode Plots

Postby nano » Wed Aug 17, 2016 7:10 pm

dear hexamer,

nice piece of software!!! Works flawlessly with my 2205a. :D

Wanted to ask, if there is a possibility to work without the gui (i.e. via command line interface, )? I intend to do some scripted/automated measurements based on python and octave.

something like:
#1 define measurement parameters (start, stop, etc.)
#2 call fra4picoscope module, sweep and return array or save .csv dataset directly
#3 ...postprocessing

Any ideas? Thakns a lot in advance!
nano
nano
Newbie
 
Posts: 0
Joined: Wed Aug 17, 2016 7:00 pm

Re: Frequency Response Analyzer with Bode Plots

Postby hexamer » Mon Aug 22, 2016 2:55 am

nano wrote:dear hexamer,

nice piece of software!!! Works flawlessly with my 2205a. :D

Wanted to ask, if there is a possibility to work without the gui (i.e. via command line interface, )? I intend to do some scripted/automated measurements based on python and octave.

something like:
#1 define measurement parameters (start, stop, etc.)
#2 call fra4picoscope module, sweep and return array or save .csv dataset directly
#3 ...postprocessing

Any ideas? Thakns a lot in advance!
nano


Nano,

Thank you for the kind comments.

If I'm understanding you correctly, your asking for something like what was discussed in this post: topic14311-75.html#p55541

If there were a Dll, I assume it would be accessible from Python, then you could do pretty much whatever you wanted to setup/control the FRA, gather data, then post-process.

Please let me know if this is not what you're thinking.

Thanks,

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

Re: Frequency Response Analyzer with Bode Plots

Postby nano » Mon Aug 22, 2016 7:23 pm

Hello!

yes exactly, i intend to do automated measurements -scripted via python or octave. Most of my lab-equipment is already controlled via python, therefore python is preferred. It's a personal project for my little home-lab - nothing commercial.

That DLL-Wrapper Option seems the best solution for me. Do you intend to implement such a tool some day?

Otherwise I'll have to recode the whole DFT-extraction, which seems to be "not so straight forward", concerning some details.

I appreciate your advice!
nano
Newbie
 
Posts: 0
Joined: Wed Aug 17, 2016 7:00 pm

Re: Frequency Response Analyzer with Bode Plots

Postby hexamer » Mon Aug 22, 2016 8:44 pm

I think a Dll is realistic based on the way the program is designed. It is pretty modular, but I'm sure some changes would be required since I've not been building it that way - probably a little more complicated than just repackaging. I'll try some quick-n-dirty repackaging just to see how close it is. If it's pretty close I can include a sub project to build a Dll. But I probably wouldn't be able to put much effort into testing it in the near term.
hexamer
Advanced User
Advanced User
 
Posts: 62
Joined: Tue Aug 12, 2014 10:09 pm

Re: Frequency Response Analyzer with Bode Plots

Postby hexamer » Tue Aug 23, 2016 2:27 am

I tried a few things out and found that modularity is probably not going to be much of an issue. Isolating and building things like the PicoScopeFRA, ScopeSelector, and the Scope implementation classes (e.g. ps2000aImpl) into a Dll is easily achievable with minor changes.

Initially I was thinking of exporting whole classes, which would give a Dll client access to the most functionality. However after encountering some trouble exporting some aspects of the classes and then researching some more, I realized that such an approach would likely only be usable from a C++ client. I could use something like SWIG to provide a more universal interface, but I'm not sure I want to climb that learning curve, and it would probably be useful to build a custom C wrapper around those classes anyway to simplify operations. I'm pretty sure a C interface would be accessible to must programming languages. That's what I'll investigate next.
hexamer
Advanced User
Advanced User
 
Posts: 62
Joined: Tue Aug 12, 2014 10:09 pm

Re: Frequency Response Analyzer with Bode Plots

Postby nano » Tue Aug 23, 2016 7:56 pm

Thanks a lot! I am looking forward to your future findings! :D
nano
Newbie
 
Posts: 0
Joined: Wed Aug 17, 2016 7:00 pm

Re: Frequency Response Analyzer with Bode Plots

Postby Barnett » Mon Nov 07, 2016 5:33 pm

Hello Aaron, That is a very cool program for FRA. I was thinking about using your program so I would not have to buy or rent a very expensive VNA. I would be using your program with a 2 ch Picoscope and would connect the output of the signal generator to an isolation xfmr across a 20 ohm resistor that is in series with the control loop in power supplies. Do you think this would work?
Barnett
Newbie
 
Posts: 0
Joined: Mon Nov 07, 2016 5:20 pm

Re: Frequency Response Analyzer with Bode Plots

Postby hexamer » Tue Nov 08, 2016 12:38 am

Barnett wrote:Hello Aaron, That is a very cool program for FRA. I was thinking about using your program so I would not have to buy or rent a very expensive VNA. I would be using your program with a 2 ch Picoscope and would connect the output of the signal generator to an isolation xfmr across a 20 ohm resistor that is in series with the control loop in power supplies. Do you think this would work?


Hello and thanks for the interest. I can tell you that the program was designed with this use case in mind. I've had success with SMPS measurement: topic14311-120.html#p78941

This is using a Jensen VB-1BB transformer.

As I've mentioned elsewhere in this thread, you may need one of the more capable Picoscopes to do SMPS stability measurements: topic14311-150.html#p83041 and topic14311-120.html#p79061

Low voltage ranges (+/-10mV), high resolution (15 bits), and very deep buffers are all helpful. I use a 5444A, but I suspect other 5000 series scopes would work too. It's possible that other models would work too, but I can't confirm.
hexamer
Advanced User
Advanced User
 
Posts: 62
Joined: Tue Aug 12, 2014 10:09 pm

Re: Frequency Response Analyzer with Bode Plots

Postby hexamer » Sat Nov 12, 2016 11:16 pm

nano wrote:Thanks a lot! I am looking forward to your future findings! :D


Nano,

I just completed a version of a DLL that I feel is ready for some further testing - beyond just my PC :)

I'm hoping that you and others who have requested this before might get a chance to give it a whirl before I work on packaging it.

I've tested it in a Native C++ project as well as from Excel/VBA (2016).

There is a ZIP file here that contains the necessary headers, import lib, DLL and example programs: https://bitbucket.org/hexamer/fra4picos ... opeAPI.zip (For reference this is a debug build of commit eeb998d)

Depending on how your computer is setup, you may find that you can get away with having the DLL in the same directory as the executable. Otherwise you'll have to copy it to a directory that is in your PATH.

Please let me know what you find. I'm curious to know how it behaves with Python.
hexamer
Advanced User
Advanced User
 
Posts: 62
Joined: Tue Aug 12, 2014 10:09 pm

Re: Frequency Response Analyzer with Bode Plots

Postby PicoTom » Thu Nov 17, 2016 11:49 am

Hi Aaron,

today I found your software and liked it from the beginning.
I try to measure Piezo transducer with it and encountered a problem. I generate the signal for the piezo by a speaker, which always "pops" when the software changes to the next frequency. So my measurement is distorted by these pops.
Another thing is, that I tried to find a setting, but the setting button does not work. So I cannot change the sampling rate and the sampling time.
I hope you can help me.

Thank you from Tom
PicoTom
Newbie
 
Posts: 0
Joined: Thu Nov 17, 2016 11:38 am

Re: Frequency Response Analyzer with Bode Plots

Postby hexamer » Sat Nov 19, 2016 12:07 am

PicoTom wrote:Hi Aaron,

today I found your software and liked it from the beginning.
I try to measure Piezo transducer with it and encountered a problem. I generate the signal for the piezo by a speaker, which always "pops" when the software changes to the next frequency. So my measurement is distorted by these pops.
Another thing is, that I tried to find a setting, but the setting button does not work. So I cannot change the sampling rate and the sampling time.
I hope you can help me.

Thank you from Tom

Hi Tom,

Thank you for trying it out. I hope I can help you get it working for your experiment.

Firstly, the pops make sense to me due to this issue listed in the "outstanding bugs": https://bitbucket.org/hexamer/fra4picos ... nding-bugs

As the API and scopes are currently setup, there isn't a way to change frequencies without such a discontinuity. In addition to the AC coupling mode adaptation mentioned on the Wiki, there is also a configuration variable you can set to insert an additional delay after each changing of the stimulus frequency. Since there is no GUI editor, you'll have to modify it by hand. It's in the Fra4PicoScopeSettings.xml file. In Windows 7 and 10, that file is here: C:\Users\<Username>\AppData\Roaming\FRA4PicoScope\

While the FRA application is not running, Modify the extraSettlingTimeMs setting, which is in the expert section, probably near the bottom of the file

It represents the number of milliseconds to delay the start of sampling after changing the AWG.

Of course this will slow down the overall FRA execution, but until we can have continuous DDS frequency switching in the AWG, I think it's the only option.

Thanks,

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

Re: Frequency Response Analyzer with Bode Plots

Postby nano » Sat Nov 19, 2016 10:56 pm

Hallo Aaron, thanks a million! Already downloaded your zip. I'll have to figure out how to call a .dll directly from python. Since Iveneverdonethat before. At The moment I am rather busy at work, but during christmas holidays i might get a couple of days to play around with your API!
nano
Newbie
 
Posts: 0
Joined: Wed Aug 17, 2016 7:00 pm

PreviousNext

Return to Applications

Who is online

Users browsing this forum: No registered users and 0 guests