Frequency Response Analyzer with Bode Plots

Post discussions on applications you are writing
Post Reply
Rumpel
Newbie
Posts: 0
Joined: Wed Jun 10, 2020 8:52 pm

Re: Frequency Response Analyzer with Bode Plots

Post by Rumpel »

Hi.
First of all THANKS A LOT for such an extremely useful tool which saved my PSU development :)

Secondly I would like to share my Python script which I have made for converting exported data into excel. It groups data into books and sheets and plots multiple data variants on one chart so it is simplier to compare different configurations. Hope it will be useful to someone.

Can't attach files to this message for some unknown reason so uploaded then on Google Drive:
FRAplotter_v1.0.py
FRAplotter_example.xlsx (better open with proper app, not in web view)

How to use:
You can simply drag and drop exported data files onto this script (this feature needs to be enabled in explorer for python files). If dataGrouping is enabled it will group data files into excel books and sheets according to grouping criteria based on filenames, if not it will simply plot all data into one chart. Almost all formatting can be changed in excelBook -> format section. All format explanations (except what is explicitly explained in coments) is given in xlsxwriter documentation.

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

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer »

Roberto Boucht wrote:
Tue Jun 09, 2020 9:44 pm
Hi Aaron,

I am a 2205A user with your FRA (Ver 0.6.2b RC4) and I appreciate your effort in doing such application.

Is any place where I can get the information about the parameters stated in Setting?
Some of them are not clear for me, especially those related to noise reject.
Thanks.
Roberto
Hi Roberto,

I was about to point you back to an earlier post where I explained all this. But when it took me a while to find it myself, I decided it's probably a good time to document it on the Wiki: https://bitbucket.org/hexamer/fra4picos ... umentation

Let me know if any of it's confusing and I can work to improve it.

Thanks!

Aaron.

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

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer »

mnni wrote:
Wed May 27, 2020 6:14 pm
Fra4picoImpedance.png

Hey Akram i compiled my own version of the FRA and changed some things in this nice code to work as a multi channel impedance analyser together with some hardware i build around the picoscope for use on fuelcell stack impedance testing and as my own LCR meter.
anyway
have a look at the resource folder and open the .rc file of the project Fra4PicoScope there you find the gui dialogs - its more less all win api but i suspect you are kind of new to c++ and windows GUI programming so maybe start by google vc++ gui programming and win api and do some tutorials
and then dig into the code its pretty well organized and well self explained code.
perhaps start by getting the solution to compile i use vc++2015
and then you have a look in PicoScopeFraApp this is where the gui is made and from there on you dig down into the picoScopeFRA class and so on...
Very nice work. Happy to hear you were able to build on it! I try to comment things very well because otherwise I'd be coming back and wondering why I did things the way I did :)

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

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer »

Rumpel wrote:
Fri Jun 12, 2020 2:26 pm
Hi.
First of all THANKS A LOT for such an extremely useful tool which saved my PSU development :)

Secondly I would like to share my Python script which I have made for converting exported data into excel. It groups data into books and sheets and plots multiple data variants on one chart so it is simplier to compare different configurations. Hope it will be useful to someone.
Very well done and thank you for sharing your data analysis tools! If you like programming with Excel, there is an API version of the FRA application along with a VBA application example which you might find useful.

If this data is based on a commercially available PSU, would you mind sharing what it is? If it's a proprietary design, I understand if you can't share. I'm mainly interested in comparing to any published stability plots.

Also, did you need to use adaptive stimulus mode? If you did, how did you find it to use? (easy/hard? effective/ineffective?)

Thank You,

Aaron.
Last edited by hexamer on Tue Jul 14, 2020 3:18 pm, edited 1 time in total.

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

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer »

Akram wrote:
Wed May 06, 2020 10:11 am
Dear hexamer,

I have a question (I precise I am a newbie), i want to add in the interface some button and box, and those buttons and boxes will be used to make some new mathematical calculation according to the measurement of the signal get it.

I am using VS 2019, I downond all the files, but i do not well understand how can I add extra button and boxes to the interface, please could you give some explanation, indication, links, document or any thing else that may help me.

Thank you for your help in advance.
Best regards.
Akram
Hi Akram,

As mentioned by mnni, the code is well documented and pretty straightforward to adapt. However, if you are more comfortable using a language other than Native C++, and you don't mind making your GUI from ground up, you could tryout the API version of FRA4PicoScope.

Thanks,

Aaron.

albertomora1
Newbie
Posts: 0
Joined: Wed Jul 15, 2020 5:27 pm

Re: Frequency Response Analyzer with Bode Plots

Post by albertomora1 »

Hi,
first of all, thanks for your incredible tool. I spent many hours computing FRF "by hands" loading tons of data in MATLAB and computing over there my FRF. Your tool is great.

Just a question: I did not found the possibility to display the coherence plot (quite usefull plot to check the goodness of the frequency response). Is it possible to get such information from the software?

Thanks,
Alberto

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

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer »

albertomora1 wrote:
Fri Jul 17, 2020 12:52 pm
Hi,
first of all, thanks for your incredible tool. I spent many hours computing FRF "by hands" loading tons of data in MATLAB and computing over there my FRF. Your tool is great.

Just a question: I did not found the possibility to display the coherence plot (quite usefull plot to check the goodness of the frequency response). Is it possible to get such information from the software?

Thanks,
Alberto
Hi Alberto,

I appreciate your kind feedback. Since I'm not very familiar with modal analysis, my answer may be a bit off base. I assume since you're using the FRA tool, you're using a method that has single input actuator and a single output accelerometer and you sweep across the spectrum of interest - as opposed to an impulse hammer method.

To compute the frequency response at a single frequency (step), the FRA tool is using a single point DFT method, instead of a full spectral analysis. So, computing functions like coherence would require additional processing for the constituent functions such as cross-spectral density and autospectral density, which is currently beyond the scope of the software.

I have a couple ideas that might be of interest to you.

1) The application does compute a purity value for both input and output at each frequency step. If both input and output are pure (near 1.0) then you'd have reasonable confidence that there was no noise influencing the measurement. If the input was pure and the output was impure, then you'd know that noise may have affected the measurement quality. If both I&O were impure, you may or may not be able to make a determination. If both I&O were very impure (i.e. near 0), then the low SNR probably resulted in a poor quality measurement. If both the I&O were only moderately impure, all the input impurities could have transferred in an LTI way to the output, the measurement would be fine, and you wouldn't know.

2) If you really needed a true coherence function, I could think of a couple ways to get it:
a) While I can't attest to its applicability to your use case, I see that there are free toolboxes to automate vibration analysis in Matlab: e.g. http://www.abravibe.com/toolbox.html
b) There is an API version of the FRA tool that you could develop your own add-on computations. I'd have to add an API to get the raw time domain data, but that's pretty simple. There are examples using Excel VBA and C

Rumpel
Newbie
Posts: 0
Joined: Wed Jun 10, 2020 8:52 pm

Re: Frequency Response Analyzer with Bode Plots

Post by Rumpel »

hexamer wrote:
Sat Jul 11, 2020 8:12 pm
Very well done and thank you for sharing your data analysis tools! If you like programming with Excel, there is an API version of the FRA application along with a VBA application example which you might find useful.
I saw that there was API version for Excel usage, but it is actually more convenient for me to simply save data to CSV files during experimenting and analyse/compare selected data files later. (Also I'm not that experienced in Excel to write applications there :) ). I wrote this tool mainly to compare different configurations on a single chart.

hexamer wrote:
Sat Jul 11, 2020 8:12 pm
If this data is based on a commercially available PSU, would you mind sharing what it is? If it's a proprietary design, I understand if you can't share. I'm mainly interested in comparing to any published stability plots.
This PSU is part of the control panel for locomotive and is not sold separately. I can't share schematics because it's a commercial secret but can describe what it is. It's a simple isolated flyback converter based on UCC28C45 controller. 24V input, 12V 2.5A output. Schematics is basicaly the same as in datasheet for this PWM controller except some efficiency improvements and failure protections added, also based on planar transformer and ceramic capacitors.

hexamer wrote:
Sat Jul 11, 2020 8:12 pm
Also, did you need to use adaptive stimulus mode? If you did, how did you find it to use? (easy/hard? effective/ineffective?)
These graphs were measured with fixed stimulus. I have made an injection transformer from what was left in a junk box and tried adaptive stimulus but it failed. Thought it was because of a bad transformer. It was my first experience of measuring control loop and I was quite in a hurry to finish the project so I didn't have time to figure out how it should work. Thus I used fixed stimulus and it worked (and surprisingly good I must say).

Now I made a way better transformer with flat responce from about 1.2Hz to 700kHz and searched explanation on how adaptive stimulus works. It still don't work for my case though but now I understand why :) I have too high gain in low frequencies and too high attenuation in high frequencies so it fails to find a solution.
The big drawback is when the step fails this datapoint is failed completely (no data at all at this step) instead of getting what have been measured with maximum stimulus amplitude. Also it slows the process a lot by asking for action on a failure - you can't press GO and leave for other tasks. So maybe it's a good idea to add these options in case of step failure: 1. Use data from maximum stimulus 2. Automatically continue to the next step.

I think in this case a more useful approach for SMPS will be user-defined piecewise linear variable stimulus as was already mentioned.
Attachments
fixed stimulus 1Vpp
fixed stimulus 1Vpp
adaptive stimulus 0.001V
adaptive stimulus 0.001V

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

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer »

Rumpel wrote:
Mon Jul 20, 2020 4:39 pm
These graphs were measured with fixed stimulus. I have made an injection transformer from what was left in a junk box and tried adaptive stimulus but it failed. Thought it was because of a bad transformer. It was my first experience of measuring control loop and I was quite in a hurry to finish the project so I didn't have time to figure out how it should work. Thus I used fixed stimulus and it worked (and surprisingly good I must say).

Now I made a way better transformer with flat responce from about 1.2Hz to 700kHz and searched explanation on how adaptive stimulus works. It still don't work for my case though but now I understand why :) I have too high gain in low frequencies and too high attenuation in high frequencies so it fails to find a solution.
The big drawback is when the step fails this datapoint is failed completely (no data at all at this step) instead of getting what have been measured with maximum stimulus amplitude. Also it slows the process a lot by asking for action on a failure - you can't press GO and leave for other tasks. So maybe it's a good idea to add these options in case of step failure: 1. Use data from maximum stimulus 2. Automatically continue to the next step.

I think in this case a more useful approach for SMPS will be user-defined piecewise linear variable stimulus as was already mentioned.
Thank you very much for the specific feedback. There is definitely room for improvement on adaptive stimulus mode and your recommendations make a lot of sense. I agree that a piecewise approach would be helpful in cases where it just won't work or requires too much tuning. I started working on it (https://bitbucket.org/hexamer/fra4picos ... h/issue-72) and need to get back to it!

Your plots look like they're in good agreement with those shown in the datasheet (Figures 34 and 35), but I didn't see anywhere in the datasheet where they specify the load conditions for those plots. Good luck on your project!

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

Re: Frequency Response Analyzer with Bode Plots

Post by hexamer »

I am happy to announce a new release of FRA4PicoScope: https://bitbucket.org/hexamer/fra4picos ... 0.7.0b.msi

The primary new features are:
  • Custom Plan mode for SMPS measurements (as originally proposed by Roland van Roy, and recently reinforced by user Rumpel)
  • Modular Support for External Signal Generators - Caveat: you'll have to create a DLL Plugin to make it useful
  • Support for new PicoScope 5000D models
Full details can be found here: https://bitbucket.org/hexamer/fra4picos ... %20History

Post Reply