The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Design >> High-Power Design >> Frequency Analyzer for Switching Regulator in Spice
https://designers-guide.org/forum/YaBB.pl?num=1226329316

Message started by krab on Nov 10th, 2008, 7:01am

Title: Frequency Analyzer for Switching Regulator in Spice
Post by krab on Nov 10th, 2008, 7:01am

Hi guys,

I am an IC designer, mainly designing chips for buck and boost converters. I use plain vanilla HSPICE for simulations - I have no fancy stuff like Spectre etc. at my disposal.

Recently I created a model of a buck converter for time domain simulations. I replaced all digital components of the chip with spice behavioural sources while keeping the analog components (current sense, error amp power train etc.) real. This helps me to do top level simulations in 1/50th of the time I would need if I just ran a simulation of the real chip at the top level.

Now I am toying with the idea of creating a frequency response analyzer in spice so that I can do a bode plot analysis on the (almost) real chip, instead of creating a averaged AC model. My idea is to use the method outlined by Dean Venable in his paper Testing Power Supplies for Stability

http://www.venable.biz/tp-01.pdf

In this he has described a way to inject a signal into the loop without breaking the loop. Of course he is talking about a real power supply where as I am referring to the spice model.

What I plan to do is inject AC signals of 10 different frequencies for every decade and check the amplification and phase of the output signal. Then plot the bode plot in excel. So if I want to run the sweep from frequency of 0.1Hz to 1Meg I would get gain phase sample at 70 different points. Since my model can run a simulation in 10 mins, I could finish the simulation in 700 mins = 11 hrs. The whole thing should be finished overnight.

What I would like to know is - Is this the best way of going about this or is there a faster way? Anyone tried anything like this before?

Cheers
krab






   


Title: Re: Frequency Analyzer for Switching Regulator in Spice
Post by Frank Wiedmann on Nov 10th, 2008, 1:23pm

I don't know HSPICE but if there is no specialized analysis for periodic circuits, then the approach you described is probably the best you can do. By the way, this is also the approach used by the BodeCAD program from Linear Technology, which is available at http://www.linear.com/designtools/software/. Of course, with SpectreRF, the method of choice would be to use the pstb analysis.

Title: Re: Frequency Analyzer for Switching Regulator in Spice
Post by Peruzzi on Nov 10th, 2008, 9:47pm

Frank,

Here's something you might think about.

If you have access to MATLAB/Simulink, you can use it to design a multi-tone signal which will make your simulation test a lot shorter.

The idea is to sum up sinusoids of all your desired frequencies into a so-called pseudo-noise signal or multi-tone.

What you need to do, though, is find a set of phases for each sinusoid which will give you a low peak to rms ratio.  Otherwise your test signal will have huge spikes.  This can be done by assigning a random phase to each sinusoid, and run the Simulink block diagram in a Matlab loop, randomizing the phases each time, and drop out of the loop when your peak to rms is less than some threshold you choose.  If you plot the time-domain waveform and the spectrum the idea will become clear to you.  Copy down your good set of phases from the Matlab loop.  Then find a scale factor so the high and low peaks of the waveform fit into the range you want.  Finally, hard code the phases and amplitude into your HSPICE signal sources.  Once you've done this (it takes a bit of trial and error), your full test will only take as long as that of your lowest frequency test tone.  It should take you less time to figure this all out than the eleven hours of your present test.

Furthermore, if you judiciously choose the frequencies and sampling rate to get your FFT data from the output waveform, your spectrum will be clean as a whistle, without frequency bleeding from bin to bin.

For complete information, do a search on Pseudo-noise testing and Multi-tone testing.  This technique is used routinely in ATE testing.

Best of luck.

Bob P.

Title: Re: Frequency Analyzer for Switching Regulator in Spice
Post by krab on Nov 13th, 2008, 6:34am

Hi Frank, Bob,

Thanks the information you have provided was helpful. Bob I must admit that your suggestion is too complex for me to implement right now. But I may try it once I get the first idea working.

Thanks
krab

Title: Re: Frequency Analyzer for Switching Regulator in Spice
Post by Eugene on Nov 17th, 2008, 8:38pm

I agree with Frank. With just a vanilla version of spice and a brute force model, your plan is the best you can do. (I assume our are talking about injecting a time domain sinusoidal perturbation.)

BTW, if you also sweep amplitude you could generate a describing function with which you could estimate the amplitude and frequency of any oscillation. But that is probably only of academic interest.

But what don't you like about state space averaged models? If you know the conduction mode they are fairly straightfoward. It is only when you try to make them work in both continuous and discontinuous conduction modes that they run into convergence issues. They can cut your 11 hours down to 11 milliseconds (or so). I have never seen an useful analysis that gets done just once. Even if it is right the first time, someone always asks for another analysis with a slight modification. Monte Carlo analyses also become more practical with short run times. Unless you are concerned about sampled data effects I think a state space averaged model would be well worth the investment. If you have never derived one I think it would also give you some valuable insight into the control loop.

Title: Re: Frequency Analyzer for Switching Regulator in Spice
Post by Frank Wiedmann on Nov 18th, 2008, 2:02am

There are also ready-made averaged models developed by Vatche Vorperian for frequently used switch configurations. See http://focus.ti.com/lit/an/slva057/slva057.pdf and http://focus.ti.com/lit/an/slva059a/slva059a.pdf for the models and http://www.powersystemsdesign.com/design_tips_nov06.pdf for an application of such a model.

The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.