Download Introduction to Circuits, CAD, and Instrumentation

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Schmitt trigger wikipedia , lookup

Surge protector wikipedia , lookup

Switched-mode power supply wikipedia , lookup

Rectiverter wikipedia , lookup

Current mirror wikipedia , lookup

Opto-isolator wikipedia , lookup

RLC circuit wikipedia , lookup

Lumped element model wikipedia , lookup

Power MOSFET wikipedia , lookup

Resistive opto-isolator wikipedia , lookup

Valve RF amplifier wikipedia , lookup

Network analysis (electrical circuits) wikipedia , lookup

Two-port network wikipedia , lookup

Transcript
EENG 2920:
Circuit Design and Analysis Using PSpice
Class 3: DC and Transient Analysis
Oluwayomi Adamo
Department of Electrical Engineering
College of Engineering, University of North Texas
Modeling of Elements


PSpice simulation of circuits is based on the models
of circuit elements.
A model that specifies a set of parameters for an
element is specified in PSpice by the “.MODEL”
command.


The general form of the model statement is
.MODEL MNAME TYPE (P1=A1 P2=A2 …)
TYPE is the type name of the elements and must have the
correct model type name (shown in Table 3.2, page 43)
There can be more than one model of the same type in a
circuit with different model names.
EENG 2920, Class 3
2
Resistor Models




The name of a resistor must start with R.
Models in PSpice Capture
 The user can assign the model name of the breakout devices in
the library “breakout.olb”
 The user can edit the model parameters.
Model Parameters for Resistors (Table 3.1, page 41)
 R: Resistance, no unit, default: 1.
 TC1: linear temperature coefficient, unit: oC-1, default: 0.
 TC2: quadratic temperature coefficient, unit: oC-2, default: 0.
 TCE Exponential temperature coefficient, unit: oC-1, default: 0.
Resistance as a function of temperature:
RES  RVALUE  R  [1  TC1 (T-T 0)  TC 2  (T  T 0) 2 ] 1.01TCE (T-T 0)

T and T0 are the operating temperature and the room
temperature, respectively, in degree Centigrade
EENG 2920, Class 3
3
EENG 2920, Class 3
4
A Simple Demo of PSpice Model Editor

This step-by-step demo will show how to do the following:









Add library breakout.olb
Place breakout elements, e.g., Rbreak
Invoke PSpice Model Editor
Create new resistor models
6Vdc
Label breakout resistor models
Run simulations
Show voltages and currents
Edit model parameters
Also demonstrate how to edit property
R1
6.00 0V
3.00 0mA
V1
R1
6.00 0V
3.00 0mA
V1
R2
3.00 0V
3.00 0mA
Rbre ak
1k
Rbre ak
1k
3.00 0mA
0V
0
R2
3.30 0V
3.00 0mA
Rmo d1
1k
Rmo d2
1k
6Vdc
3.00 0mA
0V
0
Note: In the Capture CIS that we are using in labs, we have to write “R=.9”, instead of “R=0.90”;
that is, you have to remove 0 at both ends. The Lite version does not have such bugs.
EENG 2920, Class 3
5
Example 3.2


Create a new blank Analog or Mixed A/D project E3_2
Draw the following circuit:




Resistors are from the library “breakout.olb”, Rbreak
Select one of the Rbreak resistor, right-click mouse, select “Edit PSpice Model”
Create resistor models Rmod1 and Rmod2, save the models:
Correctly label the
breakout resistor models:
20Vd c
R1
R2
1
2
3
500
Rmo d1
Vs
1k
800
Rmo d1
R3
Rmo d2
200
R4
Rmo d2
IDC
50m Adc
0
EENG 2920, Class 3
6

Create simulation profile “sim1”


Analysis type is “Bias Point”
Run simulation, show the following simulation results
Figure 3.2.1:
R1
1 20.0 0V
15.7 3mA
R2
2 11.7 4V
500
Rmo d1
15.7 3mA
20V dc
3
13.0 5mA
Vs
1k
9.48 4V
800 2.68 7mA
Rmo d1
52.6 9mA
R3
Rmo d2
200
R4
Rmo d2
50.0 0mA
IDC
50m Adc
0V
0

Try the following menu commands


PSpice – Bias Points
PSpice – Create Netlist, and PSpice – View Netlist
EENG 2920, Class 3
7
Example 3.3


Create a new blank Analog or Mixed A/D project E3_2
R1
R2
Draw the following circuit:
1
2

Define node numbers: 1, 2, 3, 4.
5
Vin
10V dc
3
10
R3
20
R4
40
Is
2Ad c
R5
4

Create a new simulation profile sim1


10
0
Analysis type is Bias Point
Define parameters to
Calculate Small Signal
DC Gain (.TF) as shown
in the figure:
Vin
V(2,4)
EENG 2920, Class 3
8

Run simulation and obtain the following simulation results:
R1
R2
1 10.0 0V
2
5
3
500. 0mA
10
23.7 5V
1.12 5A
12.5 0V
500. 0mA
Figure 3.3.1:
625. 0mA
Vin
10Vd c
875. 0mA
R3
20
R4
40
Is
2Adc
2.00 0A
R5
0V
1.12 5A
4
-11.2 5V
10
0

Check Output File for the Small Signal Characteristics

Go to menu PSpice – View Output File:
Figure 3.3.2:
EENG 2920, Class 3
9
Transient Analysis




A transient analysis deals with the behavior of an electric circuit
as a function of time.
If a circuit contains an energy storage elements, a transient can
also occur in a DC circuit after a sudden change due to switches
opening and closing.
PSpice allows simulating transient behaviors, by assigning initial
conditions to circuit elements, generating sources, and the
opening and closing of switches.
The simulation of transients in circuits with linear elements
requires modeling of
 Resistors, capacitors, and inductors,
 Model parameters of elements,
 Operating temperature,
 Transient sources.
EENG 2920, Class 3
10
Capacitor
i (t )
i
v
R
v (t )
C
v  iR

C<name> N+ N- CNAME CVALUE IC=V0
where IC is the initial condition, i.e., the initial voltage of the capacitor.
Model parameters for capacitors (Table 4.1, page 86)






dv(t )
dt
The symbol for a capacitor is C. The name of a capacitor must start with C,
and the general form is:


i (t )  C
C: capacitance multiplier, no unit, default: 1.
VC1: linear voltage coefficient, unit: V-1, default: 0.
VC2: quadratic voltage coefficient, unit: V-2, default: 0.
TC1: linear temperature coefficient, unit: oC-1, default: 0.
TC2: quadratic temperature coefficient, unit: oC-2, default: 0.
Capacitance as a function of voltage and temperature:
CAP  CVALUE  C  (1  VC1V  VC 2 V 2 )  [1  TC1 (T-T 0)  TC 2  (T  T 0) 2 ]


T and T0 are the operating temperature and the room temperature, respectively,
in degree Centigrade
The capacitor device from “breakout.olb” can be edited and new models can
be defined in the same way as resistor. For example,

.MODEL Cmod1 CAP (C=1 VC1=0.01 VC2=0.002 TC1=0.02 TC2=0.005)
EENG 2920, Class 3
11
i (t )
Inductor
v (t )
L
v(t )  L

The symbol for an inductor is L. The name of an inductor must start with L,
and the general form is:


L<name> N+ N- LNAME LVALUE IC=I0
where IC is the initial condition, i.e., the initial current of the inductor.
Model parameters for inductors (Table 4.2, page 88)






di (t )
dt
L: inductance multiplier, no unit, default: 1.
IL1: linear current coefficient, unit: A-1, default: 0.
IL2: quadratic current coefficient, unit: A-2, default: 0.
TC1: linear temperature coefficient, unit: oC-1, default: 0.
TC2: quadratic temperature coefficient, unit: oC-2, default: 0.
Inductance as a function of voltage and temperature:
IND  LVALUE  L  (1  IL1 I  IL 2  I 2 )  [1  TC1 (T-T 0)  TC 2  (T  T 0) 2 ]


T and T0 are the operating temperature and the room temperature, respectively,
in degree Centigrade
The inductor device from “breakout.olb” can be edited and new models can
be defined in the same way as resistor and capacitor. For example,

.MODEL Lmod1 IND (L=1 IL1=0.1 IL2=0.002 TC1=0.02 TC2=0.005)
EENG 2920, Class 3
12
Exponential Source

The symbol of exponential sources is EXP, and the general form is


Model parameters (Table 4.3, page 91)







EXP (V1 V2 TRD TRC TFD TFC)
V1: initial voltage, unit: V, default: none
V2: pulsed voltage, unit: V, default: none
TRD: rise delay time, unit: S, default: 0
TRC: rise-time constant, unit: S, default: TSTEP
TFD: fall delay time, unit: S, default: TRD+TSTEP
TFC: fall-time constant, unit: S, default: TSTEP
Among the parameters, V1 and V2 must be specified by the user.
EENG 2920, Class 3
13
Pulse Source

The symbol of pulse sources is PULSE, and the general form is


Model parameters (Table 4.4, page 92)








PULSE (V1 V2 TD TR TF PW PER)
V1: initial voltage, unit: V, default: none
V2: pulsed voltage, unit: V, default: none
TD: delay time, unit: S, default: 0
TR: rise time, unit: S, default: TSTEP
TF: fall time, unit: S, default: TSTEP
PW: pulse width, unit: S, default: TSTOP
PER: period, second, default: TSTOP
Among the parameters, V1 and V2 must be specified by the user. TSTEP
and TSTOP are the incrementing time and stop time, respectively, during
the transient analysis.
EENG 2920, Class 3
14
Piecewise Linear Source

The symbol of piecewise linear sources is PWL, and the general
form is



PWL (T1 V2 T2 V2 … TN VN)
A point in a waveform can be described by (Ti, Vi) or (Ti, Ii) and every
pair of values specifies the source value at time Ti. The voltage at time
between the intermediate points is determined by PSpice using linear
interpolation.
Model parameters (Table 4.5, page 94)


Ti: time at a point, unit: second, default: none
Vi: voltage at a point, unit: V, default: none
EENG 2920, Class 3
15
Single-Frequency Frequency Modulation

The symbol for a source with single frequency modulation is SFFM,
and the general form is


Model parameters (Table 4.6, page 95)






SFFM (VO VA FC MOD FS)
VO: offset voltage, unit: V, default: none
VA: amplitude of voltage, unit: V, default: none
FC: carrier frequency, unit: Hz, default: 1/TSTOP
MOD: modulation index, unit: none, default: 0
FS: signal frequency, unit: Hz, default: 1/TSTOP
Among the parameters, VO and VA must be specified by user and
can be either voltages or currents.
EENG 2920, Class 3
16
Sinusoidal Source

The symbol for sinusoidal source is SIN, and the general form is


Model parameters (Table 4.7, page 96)








SIN (VO VA FREQ TD ALP THETA)
VO: offset voltage, unit: V, default: none
VA: peak voltage, unit: V, default: none
FREQ: frequency, unit: Hz, default: 1/TSTOP
TD: delay time, unit: S, default: 0
ALPHA: damping factor, unit: 1/S, default: 0
THETA: phase delay, unit: degrees, default: 0
Among the parameters, VO and VA must be specified by user and can be
either voltages and currents.
The waveform stays at 0 for a time of TD, and then the voltage becomes an
exponentially damped sine wave. The exponentially damped sine wave is
described by:
V  VO  VAe  (t td ) sin[ 2f (t  t d )   ]
EENG 2920, Class 3
17
PSpice Demo
Draw circuit


To show how to set up PWL source parameters:


T1=0, T2=1ns, T3=1ms, V1=0, V2=1, V3=1
To show how to display component pin ID.
Simulation profile



Analysis type: Time Domain (Trasient)
Run to time: 500us, Max step size: 1us
Menu command “Pivot” in property editor


To show how to make the appearance of the Property Editor more user friendly.
“Copy to clipboard” in PSpice AD


2.0V
To show how to copy clearly visible plots to Word.
R1
1
L1
2
1
2
3
2
50uH
V
0V
V
2
V1
C1
IC = 2V
10uF
1
Figure 4.1.2
-2.0V
0s
Figure 4.1.1
0
EENG 2920, Class 3
250us
V(3)
V(1)
Time
500us
18
Example 4.2


L1
2
1
50uH
V1
V1 = -220
V2 = 220
TD = 0
TR = 1ns
TF = 1ns
PW = 100us
PER = 200u s
The voltage source is VPULSE from “source.olb”
Add a voltage marker and a current marker
2
3
V
C1
10uF
0
Create a new simulation profile




R1 2
1
I
Draw a circuit as shown in the figure:


Figure 4.2.1:
Analysis type is “Time Domain (Transient)”
Run to time: 400us
Maximum step size: 1us
Run simulation to obtain the results:
200A
0A
SEL>>
-200A
I(R1)
400V
In PSpice AD, use menu command “Plot –
Add Plot to Window ” to add a new plot in
the same window.
0V
-400V
0s
Figure 4.2.2:
100us
200us
V(3)
Time
300us
400us
EENG 2920, Class 3
19
Example 4.3


2
Vin1
L2
1
1
50uH
V
V
R3
2
L3
1
8
50uH
V
Vin2
C1
10uF
2
50uH
V
Vin3
C2
10uF
C3
10uF
Select VPWL device, right-click mouse, select “Edit Properties …”
Create a new simulation




R2
2
The source is
Figure 4.3.1
VPWL from “source.olb”
0
The parameters of VPWL is T1=0, T2=1ns, T3=1ms, V1=0, V2=1, V3=1. These
parameters are set in the Property Editor:


L1
1
Draw circuit:


R1
Analysis type is Time Domain (Transient)
Run to time: 400us
Maximum step size: 1us
1.5V
1.0V
Run simulation to obtain the result:
Please observe how the circuits respond
to the same step input voltage signal. 0 . 5 V
0V
0s
Figure 4.3.2:
EENG 2920, Class 3
V(L1:2)
100us
V(L2:2)
200us
V(R1:1)
Time
300us
V(L3:2)
400us
20
Example 4.4
Figure 4.4.1:
R1
L1
1
2
1
2
2
3
50uH
V
I
Vin

Draw circuit:



C1
The source is VSIN from “source.olb”
The parameters of VSIN is shown in the circuit.
10uF
0
Create a new simulation




VOF F = 0
VAMPL = 1 0
FRE Q = 5k Hz
Analysis type is Time Domain (Transient)
Run to time: 500us
Maximum step size: 1us
Run simulation to obtain the result:
4.0A
0A
SEL>>
-4.0A
I(R1)
20V
0V
-20V
Figure 4.4.2:
0s
250us
500us
V(3)
Time
EENG 2920, Class 3
21
Example 4.5
R1
1
L1
2
V
6
IC = 3A
3
1
RMO D
1.5m H
2
LMO D
V
2
Vin

Draw circuit as shown in figure:





2.5u F
CMO D
R2
2
RMO D
1
R, L, C are all from “breakout.olb”
Define models RMOD, LMOD, and
CMOD as shown in the figure on the
Figure 4.5.1
bottom. Use the new models in the circuit.
0
Define initial conditions (IC) of L and C in the property editor.
The PWL voltage source is the VPWL from “source.olb”. The VPWL source
parameters are: (T1=0, T2=10ns, T3=2ms, V1=0, V2=10, V3=10)
Create a new simulation profile



C1
IC = 4V
Analysis type is: Time Domain (Transient). Run to time: 1ms, Max step size: 5us.
20V
Temperature (sweep): Run at 50°C.
Obtain the simulation result in the figure:
10V
0V
-10V
0s
EENG 2920, Class 3
0.5ms
V(1)
V(3)
Time
1.0ms
22
Figure 4.5.2
Example 4.6
R1
L1
1
2
6
3
RMO D
1.5m H
LMO D
V
2
Vin




C1
IC = -4V
Repeat Example 4.5 with
the following difference:
2.5u F
CMO D
R2
2
RMO D
1
L1 has no initial condition
The initial condition for C1
has been changed to -4V.
Figure 4.6.1
0
Notice that the response is completely different from Example 4.5,
because the initial conditions of L and C are different.
4.0V
2.0V
Figure 4.6.2
0V
0s
0.5ms
1.0ms
V(3)
Time
EENG 2920, Class 3
23