The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
May 6th, 2024, 11:31am
Pages: 1
Send Topic Print
Frequency Analyzer for Switching Regulator in Spice (Read 5739 times)
krab
New Member
*
Offline



Posts: 3

Frequency Analyzer for Switching Regulator in Spice
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






   

Back to top
 
 
View Profile   IP Logged
Frank Wiedmann
Community Fellow
*****
Offline



Posts: 678
Munich, Germany
Re: Frequency Analyzer for Switching Regulator in Spice
Reply #1 - 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.
Back to top
 
 
View Profile WWW   IP Logged
Peruzzi
Community Member
***
Offline



Posts: 71

Re: Frequency Analyzer for Switching Regulator in Spice
Reply #2 - 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.
Back to top
 
 
View Profile   IP Logged
krab
New Member
*
Offline



Posts: 3

Re: Frequency Analyzer for Switching Regulator in Spice
Reply #3 - 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
Back to top
 
 
View Profile   IP Logged
Eugene
Senior Member
****
Offline



Posts: 262

Re: Frequency Analyzer for Switching Regulator in Spice
Reply #4 - 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.
Back to top
 
 
View Profile   IP Logged
Frank Wiedmann
Community Fellow
*****
Offline



Posts: 678
Munich, Germany
Re: Frequency Analyzer for Switching Regulator in Spice
Reply #5 - 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.
Back to top
 
 
View Profile WWW   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.