Frequency Response Analyzer with Bode Plots

Post discussions on applications you are writing
Post Reply
ibdami21
Newbie
Posts: 0
Joined: Sat Mar 26, 2016 3:11 am

Re: Frequency Response Analyzer with Bode Plots

Post by ibdami21 »

Hi Aaron,

Thanks for the remote debug. It looks like since I am new on the forums my earlier post was delayed (topic14311-90.html?hilit=hexamer#p74511)

I have it working now and am checking to see what transformers I have for some SMPS stability tests.

I've attached an image of the plot from a transformer I have which seems suitable for my needs (PFC converter with a very low Fc).

Thanks again!
-Mitch
Attachments
bode_Y236202_20ohmload.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 »

ibdami21 wrote:I was able to get it: I had the 64 bit SDK installed. Once I also installed the 32 bit SDK everything seems to be working.
Wow, I'm glad you found that because it would have been a hard problem to diagnose. It is a little disturbing that caused the application to fail in such a difficult to diagnose manner. I'll log this issue to investigate if I can make the application give a diagnostic message.
ibdami21 wrote: I have a switching power supply I'd like to do a stability test on and will use a small isolation transformer from the picoscope to the feedback loop and see if this can enable the device to be a sort of network analyser. Kind of like the setup TI shows here: http://www.ti.com/lit/an/snva364a/snva364a.pdf . But with your program this should now be very easy to make a proper bode plot without manually collecting data points.
I'm glad to hear this. It's actually the original reason I made the application. The 5000A scopes have capabilities well matched to this task (great dynamic range and deep buffers). I have had good success getting the FRA application to match published data sheets. In case you didn't catch this on the Wiki or any of my other posts, you will need to put the application in "high noise" mode for it to work on the SMPS feedback loop. I've been using a Jensen VB-1BB isolation transformer; curious to hear what you're using.
ibdami21 wrote: I know you're working on it and I'll provide one wishlist feature:
-Upon a new run, update the display as data is acquired. I know this will have averse effects to auto-ranging. Perhaps have this option for manual window setup only? For all the work I do I'd be fine without autoranging since I know what to expect from the system at the frequencies being swept, plus if there is any data out of range I won't care about it with the window selected.
I think that's a nice idea. It could help you detect earlier if things aren't going as expected. I don't think updating the Bode plot with each data-point would affect "auto-ranging". When I use that term, I'm talking about the channel voltage range auto-adapting during the measurement process. If, by auto-ranging, you were talking about the Bode plot axes, then there is a feature to set and store axis settings. It's not well documented. If you single click on the plot a dialog box will appear that lets you set the ranges. Then if you press the Store button, the settings are set for later use (you have to have the "Stored Axes" radio button next to the plot selected). I think the way your suggestion would work could depend on the settings. If it's in "Auto Axes" mode, it could simply re-scale the plot for each new point, though that might be a little annoying.
ibdami21 wrote: Thanks again for making this. Too bad I am just a HW engineer with basic programming skills else I would see about helping this project :).
You are helping this project! There are plenty of ways to pitch in. Problem reports and enhancements requests are very important. I see plenty of downloads and I often wonder ... Do some people get an error message and then give up, or do they get it to work on a scope I can't test. It's important for me to know about both cases.

My education is in hardware (EE), but have spent most of my career in embedded S/W development. So my H/W skills are pretty rusty! I have an interest in signal processing which is one reason I enjoy working on this app.

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 »

ibdami21 wrote:Hi Aaron,

Thanks for the remote debug. It looks like since I am new on the forums my earlier post was delayed (topic14311-90.html?hilit=hexamer#p74511)

I have it working now and am checking to see what transformers I have for some SMPS stability tests.

I've attached an image of the plot from a transformer I have which seems suitable for my needs (PFC converter with a very low Fc).

Thanks again!
-Mitch
Here's a plot of the Jensen VB-1BB:

ibdami21
Newbie
Posts: 0
Joined: Sat Mar 26, 2016 3:11 am

Re: Frequency Response Analyzer with Bode Plots

Post by ibdami21 »

Hey Aaron,

The transformer I showed that data on was a regular 50VA toroidal core power transformer I happened to have lying around. For my application I know the fc of my converter needs to be quite low (around 50Hz to 70Hz), and I know these cores are decent up to a few hundred Hz. It's surprising to me it's got decent bandwidth up to 10kHz. This is an Avel Y236202 wired with both primary and secondary in series (as if being used for a 240V application with 24V out). I have a 20 ohm load on the secondary as I would have for stability tests. I've got a big W material core which would make a good wideband transformer if needed.

Probably a silly question... How do I get between low and high noise modes? Is that embedded in the "Input signal Vpp" box?

I'll check this out Monday on my switching supply and let you know the results and any issues I come across.

Thanks!
-Mitch

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 »

ibdami21 wrote:Hey Aaron,

The transformer I showed that data on was a regular 50VA toroidal core power transformer I happened to have lying around. For my application I know the fc of my converter needs to be quite low (around 50Hz to 70Hz), and I know these cores are decent up to a few hundred Hz. It's surprising to me it's got decent bandwidth up to 10kHz. This is an Avel Y236202 wired with both primary and secondary in series (as if being used for a 240V application with 24V out). I have a 20 ohm load on the secondary as I would have for stability tests. I've got a big W material core which would make a good wideband transformer if needed.

Probably a silly question... How do I get between low and high noise modes? Is that embedded in the "Input signal Vpp" box?

I'll check this out Monday on my switching supply and let you know the results and any issues I come across.

Thanks!
-Mitch
The general advice I've seen on measuring SMPS loops is to test up to the switching frequency. Currently, the FRA application doesn't have any kind of adaptive injection signal amplitude capabilities (it's on the to-do list). So, while some lack of flatness in the response of the isolation transformer might be OK for the manual technique described in www.ti.com/lit/an/snva364a/snva364a.pdf, it could lead to sub-optimal measurement accuracy with the current application capabilities.

I had good results with a TPS5420 at 5V Vout with a constant stimulus of 80 mV across a 50 Ohm resistor - 15 Hz to 200 kHz sweep. So, if you can get a transformer that's relatively flat across the sweep you want, I think you'll still be able to get good results with a fixed-amplitude stimulus.

Here's what I wrote on the Bitbucket Wiki on changing noise modes:

Currently, there is no UI to switch sampling modes. It can be changed by editing the application settings XML file, which is in the current user's roaming profile directory. E.g. on Windows 7 the file is located here: C:\Users\\AppData\Roaming\FRA4PicoScope\Fra4PicoScopeSettings.xml. While the application is not running, change the samplingMode element to 0 for low noise and 1 for high noise, then start the application.

One other thing to note ... due to the way the application currently fixes the relationships between sampling rate, required capture length, and scope buffer size, in high noise mode with 5442B, you will be limited to about 120Hz as a lower frequency. The application will tell you if you set it too low. With some planned changes to the way the sampling works, that number could become lower, but possibly at the expense of some TBD measurement accuracy.

ibdami21
Newbie
Posts: 0
Joined: Sat Mar 26, 2016 3:11 am

Re: Frequency Response Analyzer with Bode Plots

Post by ibdami21 »

Thanks again Aaron.

That was one part I overlooked on the bitbucket site you've got since I was looking for a UI cue. It was easy enough to change and I've got that mode set.

For pretty much all SMPSs, fc needs to be quite a bit lower than the switching frequency. It depends on the converter topology and what its design parameters are. Some very fast converters (CPU cores with multi-phase bucks) will be really quick, but for a buck I understand this is limited to about fsw/3 or thereabouts. For a flyback AC adapter you may be switching at 70kHz and have your crossover around 7kHz. So it really depends on the converter's design how far you want to sweep. On top of that, the crossover point will change based on the load condition. I'm actually trying to tame one now which looks a tad off at full load.

There needs to be good attenuation to the switching harmonics in the compensation network, else weird things happen. I had one buck a while ago show spurious instability with fc set too high, although my simulated model showed plenty of phase margin. That was an attempt at ~200kHz fc for a ~275kHz converter. Slowing the control loop's fc to 50kHz made all the issues go away.

Thanks for the tip on the lower frequency limit. I'll see if it complains and check what I can do to check this really slow converter. Worst case that TI document's method should show what the crossover point is, but I will try your application first and report back later today.

Let me know if you've got any SW which I could help look at as changes are made. I know this converter is a bit weird from normal converters (single stage active PFC flyback) and requires a very low fc.

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 »

ibdami21 wrote: For pretty much all SMPSs, fc needs to be quite a bit lower than the switching frequency. It depends on the converter topology and what its design parameters are. Some very fast converters (CPU cores with multi-phase bucks) will be really quick, but for a buck I understand this is limited to about fsw/3 or thereabouts. For a flyback AC adapter you may be switching at 70kHz and have your crossover around 7kHz. So it really depends on the converter's design how far you want to sweep. On top of that, the crossover point will change based on the load condition. I'm actually trying to tame one now which looks a tad off at full load.
That's really useful to know. I suppose the advice to measure up to near the switching frequency may be in case there are multiple crossovers? But I don't know how common that is.
ibdami21 wrote: There needs to be good attenuation to the switching harmonics in the compensation network, else weird things happen. I had one buck a while ago show spurious instability with fc set too high, although my simulated model showed plenty of phase margin. That was an attempt at ~200kHz fc for a ~275kHz converter. Slowing the control loop's fc to 50kHz made all the issues go away.
A reason I'm needing to measure SMPS stability is I'm trying to design a boost converter with variable voltage output. I'm trying a couple different routes: (1) specialized converters like TPS61170 and (2) ordinary converters with a resistor network with an injected voltage on the feedback. I have run into some stability issues, but in some cases I'm wondering if it's because I'm pushing the converter to its duty cycle limit.
ibdami21 wrote: Let me know if you've got any SW which I could help look at as changes are made. I know this converter is a bit weird from normal converters (single stage active PFC flyback) and requires a very low fc.
Definitely. Several of the future enhancements are to make SMPS measurements easier. It would be good to have some real-world testing.

ibdami21
Newbie
Posts: 0
Joined: Sat Mar 26, 2016 3:11 am

Re: Frequency Response Analyzer with Bode Plots

Post by ibdami21 »

Not to veer this too far into SMPS control loops... but hey may as well add to the chain.

A converter shouldn't have multiple crossovers but it could happen. That would be something interesting where there typically is not correct pole/zero placement and the gain of the closed loop bounces around zero. But, the fc does move about with load variation and with input voltage variation. Measuring up to fsw does show the entire converter's bandwidth, so as to ensure you don't have anything weird happening near that point. In well behaved converters the gain just keeps dropping by the time you get near fsw that we won't see much.

Boost converters, unlike the buck, are not a linear transfer function. The 1/(1-D) is exponential as duty cycle is increased. This along with the converter naturally having a RHP zero make the control loop more difficult to stabilise than a simple buck. Not impossible by any means, just not as easy as a buck. This stems from how the boost converter operates (i.e. indefinitely closing the switch would mean we short the input to ground and no power arrives at the output in a boost, where a buck would effectively pass the input to the output). That is one of the reasons boost converters are usually current mode controlled. Then there are interesting issues which current mode presents in itself...

That TI converter you mention is a current mode device. Note the built in current sensor and the summing component in the block diagram. Current mode controllers need an artificial ramp added to not go unstable, but this does cause a little jitter in duty cycle.

I wasn't able to look at the converter today but hopefully this week I can see what the FRA application can do.

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 »

ibdami21 wrote:Not to veer this too far into SMPS control loops... but hey may as well add to the chain.

A converter shouldn't have multiple crossovers but it could happen. That would be something interesting where there typically is not correct pole/zero placement and the gain of the closed loop bounces around zero. But, the fc does move about with load variation and with input voltage variation. Measuring up to fsw does show the entire converter's bandwidth, so as to ensure you don't have anything weird happening near that point. In well behaved converters the gain just keeps dropping by the time you get near fsw that we won't see much.

Boost converters, unlike the buck, are not a linear transfer function. The 1/(1-D) is exponential as duty cycle is increased. This along with the converter naturally having a RHP zero make the control loop more difficult to stabilise than a simple buck. Not impossible by any means, just not as easy as a buck. This stems from how the boost converter operates (i.e. indefinitely closing the switch would mean we short the input to ground and no power arrives at the output in a boost, where a buck would effectively pass the input to the output). That is one of the reasons boost converters are usually current mode controlled. Then there are interesting issues which current mode presents in itself...

That TI converter you mention is a current mode device. Note the built in current sensor and the summing component in the block diagram. Current mode controllers need an artificial ramp added to not go unstable, but this does cause a little jitter in duty cycle.

I wasn't able to look at the converter today but hopefully this week I can see what the FRA application can do.
You are very knowledgeable on SMPS design, thank you for sharing. Hopefully my goals will be achievable without too many trials! Any recommendations on good books to read? Most of what I've learned is in theory sections of datasheets and various online articles.

ibdami21
Newbie
Posts: 0
Joined: Sat Mar 26, 2016 3:11 am

Re: Frequency Response Analyzer with Bode Plots

Post by ibdami21 »

Hey Aaron,

Sure. In college I had luck to have a very knowledgeable professor in power electronics. We used Fundamentals of Power Electronics by Erickson. This book is pretty good overall and things are explained well.

In that class the instructor had us derive the control transfer functions for a final class project using state-space equations. I recall it wasn't too hard but terribly consuming in time especially with any algebra mistakes. Simulators do so well anyway that deriving transfer functions seems academic.

On control loops this was an interesting article I had read when doing my sensior design project in college. Quite detailed but the end results are what is interesting and can be quickly measured on a scope to get a 'ballpark' look at stability:
http://powerelectronics.com/power_syste ... in-PET.pdf

This week is pretty busy now. Checking my PFC flyback is definitely on the list of things to do but will need to wait a little bit. Maybe I can sneak this in tomorrow and report back how the application did.

mark.didat@ge.com
Newbie
Posts: 0
Joined: Fri Apr 15, 2016 1:21 pm

Re: Frequency Response Analyzer with Bode Plots

Post by mark.didat@ge.com »

Aaron,

I am unable to connect my Picoscope 3406D. I have SDK 32bit installed. Below is the error message I get:

Error: Unable to initialize device with serial number CW698/004


Any help would be appreciated. Would really like to use your software.

Thanks,
Mark

PS: Boiler Up!!

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 »

mark.didat@ge.com wrote:Aaron,

I am unable to connect my Picoscope 3406D. I have SDK 32bit installed. Below is the error message I get:

Error: Unable to initialize device with serial number CW698/004


Any help would be appreciated. Would really like to use your software.
Thanks, Mark. I'd be glad to help. Can we start by confirming what version you're using? The 0.5b version was released with a bug that prevents it from recognizing the 3406D. That should be fixed in the latest version.
mark.didat@ge.com wrote:PS: Boiler Up!!
:D

mark.didat@ge.com
Newbie
Posts: 0
Joined: Fri Apr 15, 2016 1:21 pm

Re: Frequency Response Analyzer with Bode Plots

Post by mark.didat@ge.com »

I think it is the latest :

FRA4PicoScope 0.5.3b

I'm running Windows 7 64bit and installed the SDK 32bit (did not work) and also tried the 64bit.

Really appreciate the help.

Mark

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 »

mark.didat@ge.com wrote:I think it is the latest :

FRA4PicoScope 0.5.3b

I'm running Windows 7 64bit and installed the SDK 32bit (did not work) and also tried the 64bit.

Really appreciate the help.

Mark
Version 0.5.3b is the latest. I've you're not sure which version you have installed, it's listed in Help->About. On first glance, I don't see anything that would lead to scope initialization problems. As a next step I'll use the debugger to simulate a 3406D and see what happens.

mark.didat@ge.com
Newbie
Posts: 0
Joined: Fri Apr 15, 2016 1:21 pm

Re: Frequency Response Analyzer with Bode Plots

Post by mark.didat@ge.com »

Thanks Aaron. I have confirmed I do have 0.5.3b installed.

Post Reply