Topic | Video |
---|---|
Getting started with OrCAD Capture | |
OrCAD PSpice how to perform a Bias point analysis 1 | |
OrCAD PSpice how to perform a Bias point analysis 2 | |
OrCAD PSpice, how to perform a transient analysis | |
How to mark Voltage and Currents in OrCAD PSpice | |
How to perform a DC Sweep Analysis in PSpice OrCAD | |
Performing an AC Sweep Analysis in PSpice OrCAD | |
Using the Monte Carlo Analysis in PSpice OrCAD | |
Worst-Case Circuit Analysis with PSpice | |
A Differential Amplifier Analyzed with PSpice | |
How to design the current source for a Differential Amplifier with PSpice | |
A complete video tutorial from the schematic to the PCB layout with OrCAD PCB Editor |
Category Archives: SPICE
Documentation about the major SPICE simulation softwares and tools
SPICE modeling of Magnetic Core from Datasheet
Vittorio Carboni
Department of Electronics and Automatic, University of Ancona 1999/2000
SPICE simulations and analisys by Ing. Cristoforo Baldoni
1. Switching power supply: Choice of ferrite
2. Simplified calculation of the transformer
3. Transformer for Flyback converter: Calculation example
4. Transformer for Forward converter :Calculation example
5. Windings: Supports, wires and insulation
On what
How
With what
Skin and proximity effects
6. Let’ s complete the design of the flyback transformer
Primary
Secondary
Conclusions
7. Appendix
8. SPICE modeling of ETD49 N67 core from datasheet
9. Bibliography
1. Switching power supply: Choice of ferrite
The first step in the design of the transformer is the choice of the ferrite as physical form, type of material and dimensions. It’s a very important choice that characterizes the project as all subsequent calculations based on it. An error of assessment may lead, at the end of designing, to realize, for example, that the dimensions are not suitable: this means start again with considerable lost of time and resources.
The ferrites are characterized by very low losses at high frequencies, they are made with alloys of iron oxides and other metals such as zinc and manganese. The material is pulverized together with insulating oxides and then modeled using techniques typical of ceramics. This allows to make ferrites with a great variety of shapes and sizes and tolerances very restricted about magnetic and mechanically characteristics. They, also, can be machined with precision after the operation of the cooking.
The ferrites typically have a density of the saturation flux between 3 and 5 kGauss, also the presence of oxides increases its specific resistivity at very high levels thus allowing to reduce losses due to eddy currents. The available shapes include bars, toroids, EE EI and UI cores. The Curie temperature TC, namely the temperature at which the material loses its ferromagnetic properties, is between 100 and 300 ° C, depending on the type of material; the phenomenon is reversible, reducing the temperature to below the TC material regains its properties.
For low to medium power transformers E-Series is the best choice. As the acronym suggests, the magnetic core is composed of two elements in the shape of E. The two pieces forming the magnetic circuit, are slipped into the holder of the windings and locked in place with the clips and / or bonded with Araldite or other epoxy adhesives. The three contact surfaces of the half-cores are machined so as to reduce the roughness and therefore contain to negligible size the not intentional air gap . In some cases the air gap is desired, this can be obtained realizing the central column of the half-core shorter than outer ones.
Figure 1 – Example of assembling of a kit composed of the support for the windings, a pair of ferrites of ETD type and a pair of fastening clips. (FERRITES and Accessories, Siemens Matsushita Components)
It’s possible choose from a catalog of half-cores with air gap calibrated. For the ferrite type ETD49, for example, we can have 4 values of the air gap: 0.20 +- 0.02 mm, 0.50 +- 0.05 mm, 1.00 +- 0.05, 2.00 +- 0.05 mm.
Coupling a half-core with air gap with another without, or also with air gap, also of different value, it is possible to obtain numerous combinations.
The ferrites of series E and ETD are widely used, so are easy to find. The catalog Siemens Matsushita indicates that the materials available for the E-series are different and coded with the initials N27, N67, N87, N49, N30, T37. The choice of material to use is correlated with the switching frequency: the type N27 is suitable for power applications in a frequency band of switching up to 100KHz, N67 is suitable for similar application, but the frequency range is between 100KHz and the 300KHz. Table 1 shows the possible applications for different materials. The E series has the classical central square column, other families in the same series are available for special applications such as the best known:
• ETD stands for Economic Transformer Design, with circular cross-section of the center column
• EFD stands for Economic Flat Design transformer for applications with space vertical content.
Table 1 – Some parameters for the type ferrites ETD (FERRITES and Accessories, Siemens Matsushita Components).
Table 2 – Maximum permissible temperature rise for different materials (FERRITES and Accessories, Siemens Matsushita Components).
Table 3 – Thermal resistance for different types and sizes of ferrite (FERRITES and Accessories, Siemens Matsushita Components).
The most important parameters for a correct choice of the ferrite are:
1. Maximum power (Ptrans)
2. Type of converter (Forward, Flyback, Push-Pull)
3. Switching frequency and maximum permissible temperature
4. maximum volume
To make the choice you might consider that the manufacturer, as a rule, always indicates the limit values, so if it is not pressing the issue of costs, it is a good idea to choose on the table, the type immediately above the one that delivers the requested power. This will avoid,later in the phase of winding, to discover that the number of turns calculated, with the wire section calculated does not enter for lack of space in the throat of the support of the windings. This precaution is especially recommended if the transformer should be wrapped in accordance with the safety standards (minimum distances between the different layers of the windings, using wire with double insulation etc..).
It follows an example of calculation of a switching transformer in [1]; the approach to this type of calculation is in many passages forcibly empirical, in many other simplified. On the other hand a completely theoretical discussion would result in a significant waste of resources without the benefits of improved performance.
SPICE modeling of a JFET from Datasheet
In this article we’ ll see how to find the parameters used to describe the mathematical behaviour of JFET (Junction Field Effect Transistors).The syntax for the N-channel model is:
model ModelName NJF( par1=a par2=b………parn=x)
while for the P-channel model is:
model ModelName PJF( par1=a par2=b………parn=x)
Where par1 par2… parn are the parameters that allow us to model the equations of the JFET transistor.
The main parameters for modeling the JFET are listed below in this table:
Parameters | Description | Units | Default Value |
---|---|---|---|
AF | Flicker noise exponent | no unit dimension | 1.0 |
ALPHA | Ionization coefficient | 1/V | 1e-006 |
BETA | Transconductance coefficient | A/V^2 | 0.0001 |
BETATCE | BETA exponential temperature coefficient | %/°C | -0.5 |
CGD | Zero-bias gate-drain p-n capacitance | F | 1e-012 |
CGS | Zero-bias gate-source p-n capacitance | F | 1e-012 |
FC | Forward-bias depletion capacitance coefficient | no unit dimension | 0.5 |
IS | Gate p-n saturation current | A | 1e-014 |
ISR | Gate p-n recombination current parameter | A | 0 |
KF | Flicker noise coefficient | no unit dimension | 1e-018 |
LAMBDA | Channel-length modulation | 1/V | 1e-006 |
M | Gate p-n grading coefficient | no unit dimension | 0.5 |
N | Gate p-n emission coefficient | no unit dimension | 1.0 |
NR | Emission coefficient for ISR | no unit dimension | 2.0 |
PB | Gate p-n potential | V | 1.0 |
RD | Drain ohmic resistance | Ohm | 1.0 |
RS | Source ohmic resistance | Ohm | 1.0 |
VK | Ionization knee voltage | V | 1.0 |
VTO | Thresold voltage | V | -2.0 |
VTOTC | VTO temperature coefficient | V/°C | -0.0025 |
XTI | IS temperature coefficient | no unit dimension | 3.0 |
SPICE modeling of a BJT from Datasheet
BJT bipolar transistors require a certain number of parameters to get a good model.The syntax for this model is:
.model ModelNameNPN (par1=a par2=b………parn=x)
for PNP case:
.model ModelNamePNP (par1=a par2=b………parn=x)
where par1 par2…….parn are the parameters that allow to model equations of the BJT.
The main parameters for a reasonable modeling of the behavior of the component are summarized in the following table:
Parameters | Description | Units | Default Value |
---|---|---|---|
IS | Transport saturation current | A | 1e-16 |
XTI | IS temperature effect exponent | no unit dimension | 3.0 |
EG | Bandgap voltage (barrier height) | eV | 1.11 |
VAF | Forward Early voltage | V | Infinite |
BF | Ideal maximum forward beta | no unit dimension | 100 |
ISE | Base-emitter leakage saturation current | A | 0 |
NE | Base-emitter leakage emission coefficient | no unit dimension | 1.5 |
IKF | Corner for forward-beta high-current roll-off | A | Infinite |
NK | High-current roll-off coefficient | no unit dimension | 0.5 |
XTB | Forward and reverse beta temperature coefficient | no unit dimension | 0 |
BR | Ideal maximum reverse beta | no unit dimension | 1.0 |
ISC | Base-collector leakage saturation current | A | 0 |
NC | Base-collector leakage emission coefficient | no unit dimension | 2.0 |
IKR | Corner for reverse-beta high-current roll-off | A | Infinite |
RC | Collector ohmic resistance | Ohm | 0 |
CJC | Base-collector zero-bias p-n capacitance | F | 0 |
MJC | Base-collector p-n grading factor | no unit dimension | 0.33 |
VJC | V | 0.75 | |
FC | Forward-bias depletion capacitor coefficient | no unit dimension | 0.5 |
CJE | Base-emitter zero-bias p-n capacitance | F | 0 |
MJE | Base-emitter p-n grading factor | no unit dimension | 0.33 |
VJE | Base-emitter built-in potential | V | 0.75 |
TR | Ideal reverse transit time | sec | 1e-8 |
TF | Ideal forward transit time | sec | 0 |
ITF | Transit time dependency on Ic | A | 0 |
XTF | Transit time bias dependence coefficient | no unit dimension | 0 |
VTF | Transit time dependency on Vbc | V | Infinite |
RB | Zero-bias (maximum) base resistance | Ohm | 0 |
SPICE modeling of a Diode from Datasheet
Modeling in SPICE& a diode is not a trivial work. Although the operation of the diode is quite simple, extract a model from datasheet takes some time.Every component has its own syntax defined in SPICE , in the case of the diode:
.model ModelName D (par1=a par2=b………parn=x)
where par1 par2 …. parn are characteristic parameters of diode.
we can sum up the set of main parameters in the following table:
Parameter | Description | Unit | Default value |
---|---|---|---|
BV | Reverse breakdown knee voltage | V | Infinite |
CJO | Zero-bias p-n capacitance | F | 0 |
EG | Bandgap voltage | eV | 1.11 |
FC | Forward-bias depletion capacitance coefficient | no unit dimension | 0.5 |
IBLV | Low-level reverse breakdown knee corrent | A | 0 |
IBV | Reverse breakdown knee corrent | A | 1e-10 |
IKF | High-injection knee current | A | Infinite |
IS | Saturation corrent | A | 1e-14 |
ISR | Recombination current parameter | A | 0 |
M | p-n grading coefficient | no unit dimension | 0.5 |
N | Emission coefficient | no unit dimension | 1.0 |
NR | Emission coefficient for ISR | no unit dimension | 2.0 |
RS | Parasitic resistance | Ohm | 0 |
TT | Transit time | sec | 0 |
VJ | p-n potential | V | 1.0 |
XTI | IS temperature exponent | no unit dimension | 3.0 |
All these parameters are used by SPICE to describe the behavior of the diode in the different situations of signal, for example in direct polarization in DC that, forward current will be:
ID = IS*(e^(VD/(N*Vt))-1)
where VD is the forward voltage, Vt = k * T / q is the thermal voltage equal to 0.026 V at 27 degrees Celsius.
The so-called recombination current is instead calculated as
Irec = ISR*(e^(VD/(N*Vt))-1).
Other equations from the given parameters describing the capacitance of the junction, its evolution with temperature and more.
At this point we have to derive the various parameters from the datasheet of the component. Assume we want to model a silicon diode 1N4148. The extraction of the parameters of the table from the values reported in the datasheet, is not immediate for almost none of the parameters.look at the values of our interest in datasheet:
From the table we can get BV which is equal to VRM, in other cases reported as Vbr, or in the case of Zener diode Vz.
From this second table we see that the maximum leakage current at 25 degrees is Ir = 5 uA.We can take IBV as equal to 10 times Ir. Usually for this type of diodes the value of IBV is around 100uA. For Zener diodes Ir can be called Izk, or in other cases as Ibr.
CJO can be directly equal to the value specified in the datasheet as Cj or Ctot, in this case is 4pF.
PSpice Textual Description
1.INTRODUCTION :
The SPICE is a software which works as a tool for electronic circuit simulation.In actually it is short form of SIMULATION PROGRAM WITH INTEGRATED CIRCUIT EMPHASIS.
• General purpose circuit program which can calculate and simulate the performance of electrical and electronic circuits.
• Perform various analysis of circuits: operating point analysis, time-domain response, a small signal frequency response
• A circuit is described by a file known as circuit file and must be specified in terms of element names, element values, nodes, variable parameters, sources, and the commands for what to calculate and what to provide as output.
• The circuit file is the input file to the SPICE program which produces the output file.
In short form we can defined it as- It is a general purpose analog electronic circuit simulator. It is a powerful program that is used in IC and board-level design to check the integrity of circuit designs and to predict circuit behavior.
2.VERSIONS OF SPICE TOOL :
• SPICE3
• HSPICE
• PSPICE
• AIM-SPICE
3.PSPICE VERSION :
PSPICE : This popular version of SPICE, available from Orcad (now Cadence) runs under the PC platforms. An evaluation (student) version, which can handle small circuits with up to 10 transistors, is freely available. For a full fledged version or for more information, please contact Orcad.
4.PROCEDURAL STEPS FOR PSPICE TOOL :
-Description of the circuit to SPICE
-Type of analysis to be performed
-Define the required output variables
5.FEATURES AND STRUCTURE :
TYPES OF ANALYSIS :
* Non-linear DC analysis (.DC)
* Non-linear Transient analysis (.TRAN)
* Linear AC analysis (.AC)
* Noise analysis (.NOISE)
* Sensitivity analysis (.SENS)
* Bias Point (.OP)
* Fourier analysis (.FOUR)
* Small Signal DC Transfer function (.TF)
* Others
.DC(DC ANALYSIS) :
Purpose : The .DC command performs a linear, logarithmic, or nested DC sweep analysis on the circuit. The DC sweep analysis calculates the circuit’s bias point over a range of values for<sweep variable name>.
General form .DC [LIN] <sweep variable name>+ <start value> <end value> <increment value>
+ [nested sweep specification]
.TRAN(TRANSIENT ANALYSIS) :
Purpose : The .TRAN command causes a transient analysis to be performed on the circuit and specifies the time period for the analysis.
General form : .TRAN[/OP] <print step value> <final time value>+[no-print value [step ceiling value]
.AC(AC ANALYSIS) :
Purpose : The .AC command calculates the frequency response of a circuit over a range of frequencies.
General form .AC <sweep type> <points value>+ <start frequency value> <end frequency value>
NOTE : <sweep type>-Must be LIN, OCT, or DEC.
<points value>-Specifies the number of points in the sweep, using an integer.
.OP(BIAS POINTS) :
Purpose : The .OP command causes detailed information about the bias point to be printed.
General form: .OP
NOTE : Using a .OP command can cause the small-signal (linearized) parameters of all the nonlinear controlled sources and all the semiconductor devices to be printed in the output file.
.TF(TRANSFER ANALYSIS) :
Purpose : The .TF command/statement causes the small-signal DC gain to be calculated by linearizing the circuit around the bias point.
General form: .TF <output variable> <input source name>
6.DEVICE MODELS :
* Analog device models
* Digital device models
*ANALOG DEVICES *
Letter | Device Type |
---|---|
B | GaAsFET |
C | Capacitor |
D | Diode |
E | Voltage-controlled voltage source |
F | Current-controlled current source |
G | Voltage-controlled current source |
H | Current-controlled voltage source |
I | Independent current source & stimulus |
J | Junction FET |
K | Inductor coupling (and magnetic core) |
K | Transmission line coupling |
L | Inductor |
M | MOSFET |
N | Digital input (N device) |
O | Digital output (O device) |
Q | Bipolar transistor |
R | Resistor |
S | Voltage-controlled switch |
T | Transmission line |
U | Digital primitive summary |
U STIM | Stimulus devices |
V | Independent voltage source & stimulus |
W | Current-controlled switch |
X | Subcircuit instantiation |
Z | IGBT |
*DIGITAL DEVICES*
Behavioral primitives
Bidirectional transfer gates
Delay line
Digital input (N device)
Digital output (O device)
File stimulus
Flip-flops and latches
Input/output model
Multi-bit A/D and D/A converter
Programmable logic array
Pullup and pulldown
Random access read-write memory
Read only memory
Standard gates
Stimulus generator
Tristate gates
7.INPUTS AND OUTPUT FORMAT :
* Basically, SPICE operates like this:
1. Describe a circuit in a text file (“.cir” extension) called a netlist OR draw the circuit using graphical symbols on a schematic page.
2. Run a simulation. SPICE reads the net list and then performs the requested analysis: AC, DC, or TRANSIENT RESPONSE. The results are stored in a text output file (“.out” extension) or a binary data file.
3. View the results of the simulation in a text output file ( “.out” ) using a text editor. Most SPICE programs provide a graphical viewer to plot the waveforms stored in the binary data file.
INPUT CONTROL:
* MODELS : In this section we describe the models for elements using in the circuit. We have described type of models earlier.
* ANALYSIS : In this part give the type of analysis, what you want to find?
We have described type of analysis earlier.
OUTPUTS CONTROL:
• .PLOT (plot)- The .PLOT command causes results from DC, AC, noise, and transient analyses to be line printer plots in the output file.
General form :.PLOT <analysis type> [output variable]+( [<lower limit value> , <upper limit value>] )
• .PRINT (print)- The .PRINT command allows results from DC, AC, noise, and transient analyses to be an output in the form of tables, referred to as print tables in the output file.
General form : .PRINT[/DGTLCHG] <analysis type> [output variable]
• .PROBE (probe)- The .PROBE command writes the results from DC, AC, and transient analyses to a data file used by Probe.
General form : .PROBE[/CSDF][output variable]
• .END (end of the circuit)-The .END command marks the end of the circuit. All the data and every other command must come before it. When the .END command is reached, PSpice does all the specified analyses on the circuit.
8.POINTS TO BE REMEMBER BEFORE STARTING PSPICE :
• PSpice is not case sensitive
• All element names must be unique
• There must be a node designated “0” (Zero). This is the reference node against which all voltages are calculated.
• If any change is made in circuit make sure you create netlist again before simulating it.
• After completing the circuit save it and run it.
• Plot appropriate waveform by probing on circuit.
How to simulate a PSpice project
Simple Steps to run a PSpice simulation project.
If you have properly executed installation in the file pspiceev.ini you can read the path where you installed the libraries:
After installing the program and libraries, run the program:
This is the OrCAD Capture Student version :
Unpack the purchased project wherever you want, and click “Open document” icon to open the project:
Check libraries path you indicated during installation:
Now we can run the simulation:
If you wish to add markers for voltages and currents select “Markers” in the menu “PSpice”: