Newsletter Issue #63, JUNE 2001

New Product Releases

Intusoft will release the ICAP/4 8.x.9 update in 2 parts. The first release is now available for download from our web site. Its feature set allows for full functionality using Scope5. The second will be available during the Fourth Quarter of 2001.

Later in the fall, we will complete the release with changes mostly to the SpiceNet schematic capture and a major model library update; and as always the latest and greatest for IsSpice4. For power supply design, we are adding a template library that goes with SpiceNet drawing for several canned power supply topologies. This is integrated with Magnetics Designer to give a complete power supply design solution.

We will ship CDs and any new documentation in the fall release. Here’s what’s new for 8.x.9 Build 1716:

1. Our BSIM4 model in IsSpice4 has been updated with the latest 4.2 release from Berkeley. There are 2 new model parameters XW and XL. It is backward compatible with 4.0 and 4.1 releases.

 
In This Issue
1
2
5
12
14
14

 15

 Running Multiple ICAP/4 Versions

2. The Simulation control dialog was slightly re-arranged (except for Rx versions) to allow you to view simulation templates in a list box instead of a drop down menu. The buttons for the older style sweep and optimization that used Scope4 for data reduction were removed. You can still use the Monte button for predefined measurements, which allows the use of multiple processors (SpiceFarm) to speed up the simulations.

3. Sweep, Optimization and Monte Carlo simulation templates are included with all products except ICAP/4Rx. Optimization alone is a separate purchase within our competitor’s Pspice product -- and a very expensive one at that!

4. The power supply template drawing for Forward and Flyback Converters will be posted on the web during the first week in August. See page 8 and 9 for details.

BACK TO THE TOP

Scope5, Version 8.9

1. Several scripts that were lying dormant in Berkeley Spice3 have been brought to life. The compose command lets you build a vector based on an arbitrary table of values. For example, here is how we plot an EMI limit specification for CISPR22:

* plot the specification
setplot constants
compose frequency values 10k+j(0) 500k+j(0)
+ 5meg+j(0) 5.01meg+j(0) 10meg+j(0)
compose level values 90 54 54 60 60
newplot limits
plot level frequency
setplot limits
setscaletype log lin
setunits level dbuv
setunits frequency hertz
Notice that imaginary data is entered for frequency to get the proper plot type. Many people wonder why Spice3 makes frequency a complex number when the imaginary part is always set to zero. It turns out that frequency values can have imaginary components and that’s how Spice3 extracts zeros in the pole zero analysis. You could even do this in a script to get values in the complex plane. Here’s the documentation provided in the source code for the compose command. Right now all we’ve tested (and fixed) is the values specification.

The general syntax is ‘compose name parm = val ...’

The possible params are:

start The value at which the vector should start.
stop The value at which the vector should end.
step The difference between sucessive elements.
lin The number of points, linearly spaced.
log The number of points, logarithmically
spaced.
dec The number of points per decade, logarith- mically spaced.
center Where to center the range of points.
span The size of the range of points.
unif ??
gauss The number of points in the gaussian
distribution.
mean The mean value for the gaussian
distribution.
sd The standard deviation for the gaussian
distribution.
random The number of randomly selected points.
pool The name of a vector (must be already
defined) to get random values --- default is ‘unitvec(npoints).’

The case ‘compose name values val val ...’ takes the values and creates a new vector --- the vals may be arbitrary expressions.

2. As you can see, there are a lot more there, some of which may be useful to you. There are 2 fairly useful assignment operators that extract the mid part of a vector, making a new vector. When running a long simulation, use this feature to get rid of start-up transients before doing operation such as an FFT.

a. The first operant looks like this: vmid = w1[(20,30)]; it makes a new vector, vmid, using elements 20 through 30 of vector w1. The syntax (a,b) actually defines a complex number. It’s a sneaky way to get around the 2 argument limitation to Spice3’s built in functions. Without the () braces, Spice3 won’t understand what you’re talking about, error, error!

b. Even more useful is its indirect cousin: vmid = w1[[(500u,600u)]]; that extracts data based on the scale vector range (time in this case) and makes a new vector out of the data between 500u and 600u. You can make an accompanying time axis for a new plot: t56 = time[[(500u,600u)]], and then plot vmid vs t56. Of course you can subtract the offset from t56 using the following script: t56 = t56 - 500u. This gives you the power to rearrange data during post processing to make things like "eye" diagrams.

3. Scope5 now understands Sweep, Optimize and Monte scripts and allows you to make plot vectors after running a simulation. This is in addition to the usual way of defining measurement results before running the simulation. Look in our previous newsletter to see how it’s done. If you haven’t made measurement scripts before running IsSpice, you’ll be asked if you really want to run the simulation; if you want to make the measurements using Scope5, just go ahead.

4. Scope5 updates are now working for x-y plots in both time and frequency. After re-running a simulation, press <Ctrl>+u to automatically update your documents to immediately see what changed.

5. Checkout the !User scripts. They may give you some idea of what personalized scripts can do. The x hotkey rescales your data to fit in between the cursors. The w hotkey is used to make frequency measurements using the next 10 cycles after cursor 0. The power script takes previously plotted i-v curves and plots them as i vs. v and finds the maximum power dissipation. Besides hot keys, you can stick bitmaps in with the scripts (16 wide by 15 high) and drag them onto your customized toolbar. The emi script does an FFT (64k points) and plots the spectrum vs. the CISPR22 specification.

To make the features in ICAP/4 easily understandable to users, we will release new Multi-Media tutorials. The first of these described the "Two-Port Network Characteristics" article in our last newsletter. To see how to get the most out of Scope5, try the Scope5 Tutorial. If you’re at DAC in June, come and see a live presentation describing Scope5 and Test Designer, straight from the mouth of our MarCom expert, Launa Morosan. If you’re in Europe, visit us at PCIM2001 in Nuremberg to find out more about our power supply templates.

BACK TO THE TOP

Magnetics Designer
Gets Flyback Tab

We will add a special case of the inductor design accessed with a Flyback tab or button. The main difference will be the specification voltage for each winding. Power will be specified for all windings except the input winding. You can either specify the input inductance or let the program pick it based on an aggregate thermal model. The aggregate thermal model will add heat from the switch, including that generated as a result of the leakage inductance. When the auto design is completed, you change inductance by adjusting the gap. Edt will be estimated from the duty ratio, frequency and voltage for new designs. Afterward it can be adjusted manually.

Intusoft’s new Power Supply Template technology allows circuit designers to start with a power supply topology embedded in a working simulation. The initial release features Forward and Flyback converter topologies. In addition, the average models have been beefed up to include PWM losses and sampling transport delay and, best of all, they work for large signals as well as performing a traditional small signal analysis.

Simulations are performed from the appropriate drawing topology. Each topology has a drawing containing multiple configurations. For those interested in exploring the models in depth, one configuration embeds the models in a hierarchical drawing. This technique lets the user push down into the model itself and measure duty ratio, resistive dissipation and dynamic dissipation and more. There are 2 configurations using subcircuits, with and without the loss models. The model without the loss modeling runs faster and is suitable for a number of optimizations. With loss models, the designer gets nearly instantaneous computation of efficiency using the operating point analysis. Finally there is a configuration for cycle-by-cycle switching that is used to validate the average model and to see the transistor switching load-line and measure component transient stress.

Templates consist of functional blocks, modeled as subcircuits, that the designer can assemble from the Intusoft library. A drawing is available with the blocks assembled to make a working DC-DC converter. The designer must rescale the blocks for his or her power and voltage levels. This rescaling is done using the fastest performing average model. The average model of a vendor’s PWM chip is then connected to the new generic Average Switched Inductor model to complete the circuit.

New worlds of design options are opened up when using the new ICAP/4 Windows optimizer and the large signal average models. The critical performance parameters can be tuned using the optimizer. You can find parameter values that give the best performance before actually building a prototype. Transient response without the switching clutter can reveal large signal instability at turn on absent slope compensation.

A limited version is also available in the Intusoft demo version. The demo version includes large signal average models without the PWM losses. Even this demo uses the most advanced PWM model available anywhere.

Pushing into the Hierarchy
Figure 1 shows a portion of the Flyback model with the operating points displayed. Notice that the internal power dissipation is broken down into resistive and switching components and that you can see the inductor current levels. You get to this model by simulating the Avg configuration.

The Flyback Template
The power supply templates let you choose from a number of standard library blocks in order to build a power supply. Your initial design starting point uses a drawing that simulates properly. The drawing shown in Figure 2 is for a Flyback topology.

This drawing uses our configurable schematic to jump between different modeling concepts. Probably the most powerful concept used is the large signal compliant average model. These average models have had a long history of incremental improvement. However; when earlier this year, Intusoft completed a new multi-parameter optimizer, the existing state-of-the-art was missing some important features. First, the existing models wouldn’t give correct transient results. They modeled the steady state solution and figured out whether or not the inductor operates in continuous conduction. But the results were incorrect in the dynamic case. Moreover, losses weren’t modeled dynamically. On start-up, the loss as a percent of power input is much higher than steady state. So, Intusoft stepped back and revisited these models. The result is a new Flyback and Forward average model packaged with this release of the Power Deluxe library. We will be providing a somewhat limited version with our demos and standard libraries.

The new model that goes with this release is capable of accurately replicating the cycle-by-cycle switching simulations in a fraction of the time. This improvement in speed is put to use with our optimizer to select component values that give the best performance for your design. What’s really incredible is the calculation of efficiency using a DC operating point analysis. The fastest possible analysis gives up the answer to one of the most difficult problems. Iterating this efficiency calculation with transformers and inductors designed using Magnetics designer, you can be sure that you get the best efficiency at the operating point of your choice.

Comparison of Switched and Average Models

Figures 3 and 4 compare the run on characteristics of the average and switched models. Remarkably, the average and transient turn characteristics are nearly identical. The average value of the switched currents exposes a moderate oscillation during turn-on that could be easily overlooked in the laboratory.

Figure 1. Portion of a Flyback model showing losses. This feature is only available in the Power Deluxe Library. Notice that the internal power dissipation is broken down into resistive and switching components that you can see the inductor current levels. You get this model by simulating the Avg configuration.

Figure 2. This is a portion of the Flyback power supply template drawing. Power supply templates let you choose from a number of standard library blocks in order to build a power supply.

Figure 3. The switched and average model results are almost exactly the same.

Figure 4. Average model reexposes turn-on instability.

BACK TO THE TOP

Modeling Tips

Needless to say, producing a new model that needs to run reliably in a complex environment led us to revisit some of the IsSpice Simulator Options. The main problems we encountered were:

Divide by Zero
This pesky problem is encountered when Behavioral elements are called upon to divide by a state variable. Now, these state variables can be anything so it shouldn’t surprise us to see them occasionally become zero. Well, it can be more than occasional! IsSpice likes to start at zero and ramp up. So we add a small number to the denominator, surely the simulator can’t figure out how to make this expression zero. Ha, when it gets somewhere in the neighborhood of this singularity during a transient analysis, it shortens the time step to maintain accuracy and creeps right down into the singularity! Behavioral elements produce RHS (right hand side) entries in the matrix solved by Spice. If wild numbers get into this community of numbers, the matrix solution can be corrupted. Well after all of that here’s the trick, if you are dividing by something that may approach zero you need to test it in the Behavioral expression and limit the answer BEFORE the output gets into the matrix. Here’s the calculation we used for efficiency:

100*v(Vout)*i(r10)/(abs(v(Vinp)*i(VMin))+1u)> 150 ? 150 : 100*v(Vout)*i(r10)/(abs(v(Vinp)*i(VMin))+1u)

The syntax for the above expression borrows from the C programming language shorthand for the if-then-else expression. The if condition precedes the ‘?’. If its TRUE, the expression between the ‘?’ and ‘:’ symbols is evaluated, otherwise the expression following the ‘:’ symbol is used.

Without this, if the input current goes through zero, the simulation falls into its little black hole and stops.

Mode Switches
No matter how careful you think you are, a mode switch can throw your simulation into a limit cycle. We found that using a Spice3 switch with hysteresis can break up the limit cycle in the operating point solution. On the other hand you may need to let the matrix

of equations go outside of your model bounds. If you don’t, the derivatives you encounter at a model boundary become intractable. IsSpice estimates the starting point for the next value during its Newton iterations by projecting the solution to the next step using these derivatives.

DC Iterations
When IsSpice finds an operating point it solves the matrix of equations repeatedly until it reaches convergence. Slight errors creep in that could leave models that have feedback drifting to infinity. To overcome this you need to limit the numerical gain. Here’s an example of a resistor that has its value set in order to dissipate power losses.

V= .99/(i(VM2)^2/v(Pr)+ .01) * i(VM2);

Where I(VM2) is the current through the voltage source and Pr is its dissipation. If you substitute I*V for Pr and assume the .01 term is negligible, the equation reduced to V = .99*V. Without the .99 damping you could get numerical "drift" toward infinity. Another way of looking at it is that this equation looks like something you would get using an op-amp as a voltage follower with infinite gain.

This equation was used to model series resistance losses in the PWM models. It makes sure dividing by zero can’t happen and is derived from:

V = IR = I/(1/R1 + 1/R2) where I^2*R1 = Ploss, R2 is the max value to eliminate high loss at low currents.

As a rule of thumb, the gain should be on the order of 1-reltol. We use reltol = .01 a lot, hence the gain of .99.

Note: RELTOL sets the error in the B element calculation. When the change in B element voltage or current is greater than RELTOL*maxval + abstol, the iterations must continue.

BACK TO THE TOP

Intusoft's Configurable
Schematic gets its Pedigree!

On May 8, 2001 US patent 6,230,305 was issued for Methods and Apparatus for Configuring Schematic Diagrams. The techniques used were developed as enabling technology for our Test Designer product and quickly found its way into our mainstream products. We hope you enjoy the quick and easy way this invention lets you deal with the complexity of viewing multiple aspects of a design with a simple visual interface.

BACK TO THE TOP

Getting the Most
from Your Design

Now, you can use Intusoft’s new optimizer to find parameter values that "center" your design about a product specification. We have canned a few objective functions for you to play with in the power supply template drawings. All you need to do is select a configuration to work in and select the components whose parameters you want to optimize. Double click on the part and choose the Tolerance/Sweep/Optimize tab. Then enter a tolerance in the optimize column for as many parameters as you want. The tolerance boundaries constrain the range for each parameter. Bring up the Simulation Control dialog and check out the objective function for each Test Configuration. Select the combination you want, select OPTIMIZE2 for the simulation mode (make sure the radio button near the selection is highlighted), check the script box in data reduction and press the <Simulate Selections> button. Approximately 12 simulations will be performed for each parameter given an optimize tolerance. You’ll see the objective function vary for each parameter and in a few minutes the results will be in your hands.

To get the most out of optimization, you need to ask the right question. It all runs pretty fast and you’ll get a knack for formulating objective functions quickly.

Optimization Under the Hood
Optimization is performed using algorithms that minimize the objective function. Your 2 main challenges are to ask the "right" question with the objective function and to bracket the solution space with the "tolerance" placed on the parameter that can vary.Circuits\Snubber\Snubber.dwg, Circuits\sprobe\sprobe.dwg and Circuits\ Power\FwdTemplate\FwdTemplate.dwg all have objective functions that can be used for optimization.

The optimization process itself consists of measuring the objective function for a set of parameter values, and then finding the parameter value that minimizes objective function. Optimize.scp is a single pass version and Optimize2.scp is a 2-pass version. If you are doing single parameter optimization to select a component value, then optimize should work. If you are doing multi-parameter optimization, use optimize2. You load either of these into IsEd5 and modify them; constants.maxiter, changes the number of iterations. The algorithm uses polynomial regression to make a high order curve fit so that it is possible to find a minimum value in the presence of local minimum values. The pure mathematical versions usually perform more iterations; but, a single iteration usually converges to within the component tolerance value, making further passes unnecessary.

BACK TO THE TOP

Running Multiple
ICAP/4 Versions

We get occasional requests to have more than one version of ICAP/4 available on the same machine. This usually comes with respect to running new product demos when you already have another version installed. Several of the ICAP/4 components use the system registry. When they are launched, the operating system looks in the registry to see where they are located. You get truly strange results if you install a new ICAP/4 program and try to run the older one. That’s because the new components will run and relative folder path associations will fail. To switch back and forth, you need to change the registry entries and change the ICAPSdir environment variable. Here’s a batch file that solves the problem. The trick is to run from an MSDOS or system shell. Any program launched from the shell will inherit environment variables. So the trick is to set ICAPSdir = "your icaps directory" using a batch file. Then is subsequent lines you use regedit to apply the appropriate .reg files. Next run snet5.exe and you have it made. When you exit the DOS shell, the environment variables will revert. If you change the registry back on the way out, then all you need is a single batch file to invoke an alternate copy of ICAP/4.

Rem Location of ICAP/4 demo
set icapsdir=c:\spice8D
set is@@@=c:\spice8D\sn
Rem Location of ICAP4demo.reg registry file.
callregedit.exe c:\spice8D\ICAP4demo.reg

echo off
pause
call c:\spice8D\sn\snet5.exe
rem when spicenet quits, put the registry back
call regedit.exe c:\spice8\ICAP4.reg

We have posted the batch file and .reg files in the technical support portion of our web. Be aware that editing the registry is not for the feint of heart. If you mess up it could make for big-time trouble. You should make frequent repair disks.

BACK TO THE TOP