# Adventures with Analog

Welcome to adventures with analog!

Let me begin by thanking Linear Technology and Mike Engelhardt, the author of LTspice, for providing the worldwide electrical engineering community with such a highly functional and well supported design tool.

Before using any of my models I would suggest taking a quick look at the files: "Waveform_Arithmetic_&_B-sources" and "LTspice_Hot_Keys". The former explains several useful functions and features that were somehow omitted from the help file, including the "Freq" syntax of behavioral sources. It also clarifies which waveform arithmetic functions work with only real or imaginary arguments and lists many previously undocumented internal constants such as an electron's charge, the speed of light and the temperature of absolute zero.

Clearly, in the hands of the development team at Linear Technology, LTspice is quite capable of adeptly modeling very complex power supply control ICs. The models you'll find in this folder are the work of a team of one and, as such, may not be as thoroughly debugged as those from Linear Technology.

My models are generally developed in schematic format and are intended to be used via their accompanying symbol file as hierarchical objects within higher level schematics. This is a very powerful and easy to use feature of LTspice that is worth the small effort required to learn (just place a copy of the hierarchical model's symbol and schematic files in the same directory as the top level design and use the drop-down Top Directory menu to get to the model via the component button on the tool bar).

Index of models to be uploaded:

UC384X series of single output PWM control ICs. UCC38083 (dual output PWM control IC - requires SwitchYard). IR21064 (half bridge driver). TL431A (shunt regulator - very difficult to simulate well). V320LA40B (varistor). An NTC inrush current limiter (with temperature output). A simple photovoltaic panel model. One and two pole generic op amp models with reasonable BW, slew rate limiting, voltage and current limiting, PSRR, noise and power draw from the power supplies (these models will work with "floating" power supplies). A neon light bulb model. An incandescent light bulb model. A basic LISN model. Techniques for simulating conducted EMI. Methods for simulating realistic transformers. Methods for generating average models of switching circuits. Some example switch mode power supplies. Some interesting class d amplifier stuff along with a bass loudspeaker model.

Enjoy and comments welcome -- analog(spiceman)

Adventures with Analog listing

## Commentary, Explanations and Examples

Q: I am struggling to understand the simulation results in ChanCore.asc reference design. Thanks for making this available analogspiceman. Don't want to sound like I am complaining. Very nice of you to offer your work to others.

When I run the simulation and measure the current flowing through the core, I get a close to 90 kA DC. I don't understand why this should be. I thought the current through the core is the magnetizing current. And for an AC input the DC current is zero at steady state, otherwise the core is saturating. Is this not right? I also have assumed that the value for the magnetizing current is simply the impedance of the magnetizing inductance divided into the primary voltage -which I calculate to be around 320 mA pk. I ran the circuit for 5 s. Is this 90 kA the inrush current? So maybe I need to run the simulation longer? I am sure I have made some error in my assumptions. Can someone please enlighten me?

A: If a transient simulation starts with an initial voltage across an inductor, when the simulator finds the initial (dc) current through the inductor, only the winding resistance limits the dc current (the inductance component of impedance is zero at dc). You must either specify that the simulator skip the initial operating point solution (UIC) or set up the voltage sources (control phasing or ramping, etc.) such that no net voltage appears across the problematic inductor (or transformer winding) at time zero.

blog comments powered by Disqus