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 hexamer » Fri May 20, 2016 1:40 pm

srnec wrote:
hexamer wrote:Does it work if you plug in the AC adapter?


Hello, yes with aux 5V is it working, but 5244B is supplied without 5V adapter because USB power is enough for 2 CH scope. Is it possible to avoid this by modification of FRA?


Ahhh. Thats interesting. I missed the fact that this is a 2 channel scope. But I think I learned some things in the process. First is that these two channel 5000A series scopes have an aux DC connector. Perhaps that's in case the USB port is not capable of supplying enough power. Second is that even though those scopes might not need the aux power its still going to report that the AC adapter is not plugged in.

I do plan on enhancing the application to better accomodate flexible power. I am tracking this as an issue in Bitbucket.
hexamer
Advanced User
Advanced User
 
Posts: 62
Joined: Tue Aug 12, 2014 10:09 pm

Re: Frequency Response Analyzer with Bode Plots

Postby hexamer » Wed Jun 01, 2016 2:05 am

hexamer wrote:
srnec wrote:
hexamer wrote:Does it work if you plug in the AC adapter?


Hello, yes with aux 5V is it working, but 5244B is supplied without 5V adapter because USB power is enough for 2 CH scope. Is it possible to avoid this by modification of FRA?


Ahhh. Thats interesting. I missed the fact that this is a 2 channel scope. But I think I learned some things in the process. First is that these two channel 5000A series scopes have an aux DC connector. Perhaps that's in case the USB port is not capable of supplying enough power. Second is that even though those scopes might not need the aux power its still going to report that the AC adapter is not plugged in.

I do plan on enhancing the application to better accomodate flexible power. I am tracking this as an issue in Bitbucket.


I've made an update to support flexible power in the PS3000A and PS5000A scopes. I have tested it on my PS5444A. For anyone wanting to try it out I made a binary: https://bitbucket.org/hexamer/fra4picos ... 0.5.4b.msi

A special thanks to Martyn for helping me understand the flexible power implementation of these scopes.
hexamer
Advanced User
Advanced User
 
Posts: 62
Joined: Tue Aug 12, 2014 10:09 pm

Re: Frequency Response Analyzer with Bode Plots

Postby ibdami21 » Thu Jun 02, 2016 12:26 am

Hi Aaron,

I finally got around to testing out my active PFC converter. Note the results are looking a bit weird here, but wanted to share what I found.

The compensation tuning on the converter is stable and works well during load transients and shows no overshoot, so to start I know this converter is not some unstable device. Yes, it is slow to recover due to the limitations I needed to impose on it for active PFC.

In low noise mode I am able to get the start frequency low enough for my needs. This converter has a really low fc in order to provide active power factor correction. But in low noise mode I am getting some weird response once I get above ~40Hz and all the waveforms get fuzzy. I also seem to be getting some interference around the 1kHz mark as well, which may be from the high peak to peak ripple at 120Hz going on.

In high noise mode I do see more realistic results, but the phase is very noisy and I can't set the start frequency low enough since the minimum is 119Hz. Is there any way this could be lowered? Looking at the high noise curve I can interpolate with my head where the true data is... but the large ripple seems to really hurt the tool's effectiveness. This was under the same load condition... all I did here was change the xml file and restart the SW.

I will have some DC-DC converters to check this out on which won't be so difficult, but wanted to show this limit I've found.

Also note I am using the same Jensen transformer as you've got now, since I wanted to ensure that would not cause any offsets or any weird behaviour in response. This is using the latest code you've got, which is nice to not need to plug in the AC-DC adapter for taking this measurement.

Thanks,
Mitch
Attachments
low_noise_300_screen.png
high_noise_80.png
ibdami21
Newbie
 
Posts: 0
Joined: Sat Mar 26, 2016 3:11 am

Re: Frequency Response Analyzer with Bode Plots

Postby hexamer » Thu Jun 02, 2016 2:20 am

Hi Mitch,

Thank you for posting the results of your PFC converter. I would like to help you get better results. But I will apologize in advance since it's possible some of my answers may not necessarily be applicable to your converter. I don't know much about PFC converters.


1) Low noise mode is not likely to be very useful for SMPS measurements. I assume you tried that that to go below the 119 Hz limitation. The issue with low noise mode is that it assumes there is not significant noise such as the ripple and switching transients common to SMPS. Specifically, what it does is sample some modest amount above the stimulus frequency. At some stimulus frequencies, that will be well below the Nyquist frequency of the main noise source. Depending on the relationship between the noise source frequency and the sampling frequency, the noise might show up as an alias. In the case where the noise is much higher amplitude than the stimulus (as is common with SMPS measurements), the aliased noise would be very destructive.

2)There is an enhancement I plan to make to relax the lower frequency limitation. It will give an ability to make tradeoffs between the lower limit and measurement quality. But I can't predict how it will impact the quality at lower frequencies. Here's what I plan to do, which may help explain the trade off. In the current design, the lower stimulus frequency limit is determined by the combination of high-noise sampling frequency, scope buffer size, and an imposed limit of 16 stimulus cycles. (See the end of this post: topic14311-90.html#p67481) What I plan to do is remove the min (16) and max (100) stimulus cycles (min. would probably still be 1), and replace with a fixed or maximum filter bandwidth. At those lower frequencies, the filter (DFT bin) width will be relatively larger compared to the stimulus. In the case of 1 cycle, the width will be Fstim +/- Fstim/2. That may or may not be OK for some applications. But in any case, it will be good to let the user have the flexibility to choose. For your scope that value would be adjustable to around 8 Hz.

3) I notice your input amplitude is set to the maximum, 4.0 V. I don't know how that relates to the overall voltages your dealing with, perhaps it's relatively small? In the DC SMPS I am dealing with, I am using stimulus in the 10's or millivolts. You might get better results with smaller stimulus amplitude.

4) One other limitation related to input amplitude is that there is an important enhancement (adaptive stimulus signal amplitude) not yet available in the application. As mentioned in several sources about this SMPS measurement technique, the stimulus needs to be "right sized", which varies by frequency. By right sized it means not so large that it affects the converter operation (e.g. drive it into non-linear operation), but large enough that the SNR provides for good measurement quality. For the TPS5420 I have, I've found that I can get away with fixed stimulus, but might get better results with this enhancement. Briefly, the way adaptive stimulus would work is to find the lowest stimulus capable of achieving some SNR metric, while also limiting the maximum output.

Again, I apologize if some of this doesn't really apply to your PFC. I'll probably learn something in this process :)

The enhancements I mention above are the two highest priority enhancements on my list.

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 hexamer » Thu Jun 02, 2016 3:00 am

Mitch,

On closer inspection, I noticed that the second plot is in high noise mode with the noisy output you explained. It might be a good idea for us to take a look at the time domain diagnostic plots. It's another setting in the XML file. While they will look noisy, the plots also record the SNR. So we should be able to tell if the noisy output is due to low SNR. Before you do that, I'd recommed turning down the steps per decade so that there aren't an excessive number of plot files generated.

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 ibdami21 » Thu Jun 02, 2016 11:29 am

Thanks, Aaron.

Yesterday was long, since looking at the first curve I read that wrong. The bump up is the 120Hz ripple (just above 100Hz) which is the huge ripple causing grief. Ripple is about 2-4Vpk-pk.

For low noise, yes I tried that to get beneath the 120Hz limitation and to see just what it would do. Interestingly that may work fine for my needs since the crossover and phase margin do seem to be free of noise at low frequency. Just not as clean as a regular network analyser once we get more noise in the signal.

The 8Hz point for that change you are considering would be a good help here, since my Fc should be around the 40Hz to 70Hz mark at full load, and of course a bit lower when the load is lightened up. I'm looking forward to that!

I did set the injection to quite a few voltages since in my loop I found the following:
1. A 47 ohm resistor to break the loop actually made a voltage offset once I affixed the transformer in parallel with it. I dropped this to 10 ohms and don't see any of that offset now. I can try a 22 ohm resistor or so to get a little more voltage from the transformer injected into the feedback path. Just was concerned a lot of the signal was getting killed by that resistor.
2. Since there is a lot of 120Hz ripple, I wanted to make sure the stimulus could be measured around that mark. I can try more stimulus settings this morning when I head in.

I'll play with the stimulus settings, and if that doesn't show a change I can share some of the time domain results. I'll also see if this converter really has that ~15 degrees of phase margin which the low noise plot is showing. That would be strange if true... but it certainly may be.

I almost want to try 2 identical notch filters to kill this 120Hz signal on both the reference and 'output' leads to the picoscope. Or, I could also try putting this converter in a steady state by setting a high DC voltage on the input. That won't be its true use case but may be worth a try to kill this noise as well.

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

Re: Frequency Response Analyzer with Bode Plots

Postby ibdami21 » Fri Jun 03, 2016 11:51 am

Hi Aaron,

Lots of attachments this time, and let me know if I've collected the appropriate data for debugging this.

Before looking at the converter's plots, I recorded more step responses. One example is shown with 120VAC at the input going from a 0mA to 700mA load. With the damped oscillation in response and how slow the oscillation is, we can get a feel for the phase margin per this write-up:
http://powerelectronics.com/power-elect ... ase-margin

From that, my hunch is the phase margin is around the 20 to 30 degree mark for this converter seeing how damped we are. Not great, but for this slow converter may be ok for my needs. A lot of these single-stage flyback PFC converters are a bit of a cow to stabilise, so I'll have to see how stable and quick this could be made while not affecting power factor too much.

I remeasured ripple and have 1Vpk-pk at 120Hz (or 100Hz if I set that 50Hz my programmable AC supply). I've been playing with how much capacitance could fit, this seems to be the most I can get for the least ripple.

All the bode attachments were done with low noise mode due to the frequency limitation. I changed the input stimulus from 50mV in several steps up to 4V where I was. With the 4V setting I do note some affects on the converter's output voltage. 1V seems to not show any of that mess at the output and still gives a good result. Low signals seem to only be noise. Granted this was not high noise mode.

I've also attached screen snips from some of the time domain debugging like you requested. There are quite a few files, so hopefully I chose the two most meaningful ones. The large ripple is easily seen there, and I did fail to note before that the switching frequency of this converter is not fixed and floats between around 30kHz and 150kHz depending on where in the mains sine wave we happen to be, what load is present, and how much input voltage we have.

Thanks,
Mitch
Attachments
step7try0.PNG
step0try6.PNG
trial4.PNG
trial2.PNG
transient_0_700mA.PNG
ibdami21
Newbie
 
Posts: 0
Joined: Sat Mar 26, 2016 3:11 am

Re: Frequency Response Analyzer with Bode Plots

Postby hexamer » Fri Jun 03, 2016 6:20 pm

Hey Mitch, thanks a ton for posting these! Seeing the time domain plots reminds me that I should put more info on the plots for context, but I should be able to deduce what they are. When I started to look at them it generated some questions. First, can you tell me the actual names of the PNG files and what sweep range was being used when they were generated?

In low noise mode the application always tries to capture 16 stimulus cycles. So it would seem likely that the dominant signal in those plots is the stimulus and not the 120Hz ripple. Though it would also seem that the ripple is not there or the capture happened to be near a ripple zero crossing. If the timespans are correct, that signal is about 1 MHz. I didn't think you were sweeping that high. Im going to check to see if there is a bug in the plotting of the time axis.

I assume the difference in the two time domain plots is the stimulus amplitude (0.1 vs 1.0 V)? The output signal in the first plot has a very low SNR, and probably more importantly a very low amplitude (beyond the lower end of the scope's dynamic range). So that would definitely result in a noisy output.

Ill have to give this a little more thought once I have some answers to those questions.
hexamer
Advanced User
Advanced User
 
Posts: 62
Joined: Tue Aug 12, 2014 10:09 pm

Re: Frequency Response Analyzer with Bode Plots

Postby hexamer » Fri Jun 03, 2016 6:34 pm

The other weird thing here is that the gain calculation in the top plot should be about -40 dB. I dont see any data point in the Bode plots that matches that. I should warn you that the diagnostic plots are not expunged each run, so you may need to be careful not to grab one from an older run.
hexamer
Advanced User
Advanced User
 
Posts: 62
Joined: Tue Aug 12, 2014 10:09 pm

Re: Frequency Response Analyzer with Bode Plots

Postby ibdami21 » Fri Jun 03, 2016 10:50 pm

Hi Aaron,

Those files I found in the FRA4PicoScope/diag folder, and I copied the names from the svg files over to the png's. Note this was made from 1 run as I never ran that before, and I see all the timestamps were at the same time.

That sweep was from 10Hz to 500Hz if I recall correctly with 10 steps at a 1V stimulus.

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

Re: Frequency Response Analyzer with Bode Plots

Postby hexamer » Sat Jun 04, 2016 12:11 pm

ibdami21 wrote:Hi Aaron,

Those files I found in the FRA4PicoScope/diag folder, and I copied the names from the svg files over to the png's. Note this was made from 1 run as I never ran that before, and I see all the timestamps were at the same time.

That sweep was from 10Hz to 500Hz if I recall correctly with 10 steps at a 1V stimulus.

Thanks,
Mitch


Mitch,

Could you zip your whole diag directory and upload it? There are some suspect items on these plots that I can't seem to reproduce. Besides the fact that the span (~1.6 E-5) is inconsistent with a sweep of 10 to 500 Hz, two different steps (0 and 7) should not have the same time span.

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 ibdami21 » Sat Jun 04, 2016 12:26 pm

Morning Aaron,

Compressed diag folder is attached. Note I had to get this on here being sneaky... that's really a 7z file for the 256k size constraints but the forum here won't accept a 7z file. Zipping was a bit too large, so just rename the extension 7z to unpack it.

Thanks,
Mitch
Attachments
diag.zip
(174.04 KiB) Downloaded 25 times
ibdami21
Newbie
 
Posts: 0
Joined: Sat Mar 26, 2016 3:11 am

Re: Frequency Response Analyzer with Bode Plots

Postby hexamer » Sun Jun 05, 2016 7:13 pm

Mitch,

I've been trying to do some detective work on the time domain plots. In short, I've been able to replicate the time-scale problem when I'm in high noise mode on my PS5444A. There is probably a bug there that I'll need to track down. There are other hints that these plots were taken in high noise mode. Is that possible?

While I was investigating these plots, I realized that I do have a setting that will help you use lower frequencies in high noise mode. It's also in the main XML file and is called minCyclesCaptured. It's referring to the number of stimulus cycles to capture and its default is 16. Obviously, you'll also need to be in high noise for it to be meaningful. Just change it to 1 and you should be able to get to around 8 Hz. If you want to find out the exact limit, try setting the frequency much lower (e.g. 0.1 Hz) and the log will tell you the minimum.

The effect of capturing just one stimulus cycle is that the bin for the lowest frequency measurement will be 4 Hz to 12 Hz. That's still a relatively low bandwidth. I can't predict what this will do to measurement quality for your scenario, but it's probably worth a try.

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 ibdami21 » Mon Jun 06, 2016 12:05 am

Hi Aaron,

I just checked the XML, and yes that was actually set for high noise mode. One thing I forgot to switch back. I must've done those plots at 120Hz to 500Hz.

Tomorrow I can try another plot setting the minimum cycles captured down to 1 and see what it looks like.

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

Re: Frequency Response Analyzer with Bode Plots

Postby ibdami21 » Wed Jun 08, 2016 2:51 am

Hi Aaron,

Reporting back now that I've had time to do quite a few things with the tool.

I did find with a buck converter EVB (a Rohm 9B300) I am playing with that I can get a clean response, however there always seems to be some noise on the line. Note I did see weird things happen when I had the input stimulus set to 50mV where I had phase shifts, and changing this down to 10mV improved matters. A few mV was not enough to be over the noise of the converter even in high noise mode.

I also was able to try out the change for minimum cycles captured. I changed this down to 1 from 16. I noted no difference in signal quality overall. This allows my scope to start plotting down at 8Hz.

So from this I know the setup I have here can definitely measure plots from converters. I don't seem to be getting as clean of data as you got with the TI board, but still pretty good.

On the PFC front, I've tried a couple of things. One was a notch filter which the response shown. This actually helped quite a bit in regular scope mode to remove of the 120Hz ripple and make it very easy to inject a waveform and simply measure the phase lag. Something is correlating to having too much injected signal like I saw with the buck converter and phase shifts... I need to try some further attempts with that filter in place and reducing the amplitude. Note I have 2 of these filters made with very similar responses which I was placing on each scope channel. Relative phase offsets between them should be minimal which is key for this to measure properly.

Another attempt I also made, but not shown, was placing a low pass filter to cut the switching harmonics on both channels. This didn't help really... but perhaps we want 2 filters here. One to cut the 120Hz and the other to cut >10kHz for my application. I'll give this a try.

Interestingly I kept measuring about 15 degrees of phase margin and a crossover of about 35Hz using a 1V injected wave. I was able to improve transient response with some tweaks and show the time domain step response. I now should have between 30 and 40 degrees of phase margin looking at that. Just need to see if the injected signal is simply too large and what I was finding before was misleading data due to the very high 120Hz component interfering with the true data.

Thanks,
Mitch
Attachments
0to700mA_120V.PNG
22_withfilter.PNG
22_nofilter.PNG
notch1.png
50mV.PNG
10mV_500pointsperdecade.PNG
ibdami21
Newbie
 
Posts: 0
Joined: Sat Mar 26, 2016 3:11 am

PreviousNext

Return to Applications

Who is online

Users browsing this forum: No registered users and 0 guests