I.
Objective:
Introduction to the simulator PSPICE.
Study in a static regime.
Study in a transient regime.
Study in a frequency regime.
I. Preparation work
1. We wish to carry out a simulation of the operating point (.op).
In this case, give the voltages VA and VS of the circuit in Figure 1.
1 R3 3
1k
R2
500 Vs
I1 R1 2 C1
4mA 800 33n
V1
30V
Figure 1: Fundamental circuit
2. We assume that the voltage source V1 is variable. I1=4mA.
In this case, give the forms of the voltages V(1) and V(3) as a function of V1.
3. Find the Thevenin equivalent circuit seen between the nodes 3 and 0 (External to C1).
4. It is assumed that the capacity is initially discharged. V1=30V and I1=4mA.
Give the equation of Vs(t) for t≥0. Calculate the final voltage and the constant of Capacity
charge time τ.
5. Carefully trace the curve Vs(t) specifying the scale, the constant of time and the
remarkable values of Vs(t).
The circuit in figure 1 can be simplified as that presented in figure 2.
Rth
Vth C1
33n
0
Figure2. Thevenin equivalent circuit
6. If we replace Vth by sinusoidal signal Ve in figure .2, Calculate the transfer function
of the circuit: A(jω)=Vc/Ve.
7. Calculate the theoretical cutoff frequency.
8. Study the Bode diagram of this transfer function A(jω) in magnitude and phase.
1
II. Process and principles of Electrical Simulation
1. PSPICE
PSPICE is an electrical circuit simulation software that includes components such as voltage
sources, resistors, capacitors, and transistors. The simulator performs its numerical
calculations using models of these components, for example, the Ebers-Moll model for
bipolar transistors. It allows for the evaluation of a circuit's performance before it is
physically constructed. Such a tool is particularly important when working on integrated
circuits as prototyping can be costly.
For circuit analysis, PSpice enables you to:
- Visualize voltages, currents, powers, or noise on each component.
- Study the behavior of a circuit based on component variations using parametric
analyses.
- Introduce the effect of temperature on specific components for more comprehensive
analyses.
- Analyze circuit behavior using continuous analysis (DC and OP), frequency-domain
analysis (AC), transient-domain analysis (TRAN), or noise analysis.
2. Electrical Schematic and Simulation Parameters
To simulate the operation of a circuit, it is necessary to describe it first. This can be done
using specialized language (PSPICE A/D) or more simply, by drawing the schematic
(CAPTURE).
With PSPICE, electrical schematics can be entered using the PSPICE A/D tool, where the
circuit's topology is created using a circuit schematic editor.
Figure.2 : PSPICE Editor
A text file (.CIR) is required to describe the circuit and specify the analyses to be
performed for simulation in PSPICE. The part that describes the components and their
interconnections is included directly in the .CIR file.
To create or edit .CIR text files, you can use the editor in PSPICE by going to File ->
New -> Text File.
In a PSpice Netlist file (.CIR file), you must describe the components and connections
between the elements of the circuit to be simulated. This includes specifying libraries (e.g.,
.LIB "[Link]") to be read, which contain the circuit elements, and directives for the
simulation analyses. Finally, the program is terminated with .END.
2
3. Conducting a Simulation
After describing the circuit schematic in the PSpice Netlist, it is necessary to define
the simulation profile. This involves specifying the electrical quantities for which you want to
obtain values, the simulation mode you desire (e.g., transient mode .TRAN, static mode .DC,
frequency analysis .AC), and the duration of the simulation. To initiate the simulation, simply
click on Simulation -> Run.
Figure.3 : Run simulation
4. Editing and Analyzing Results
After the simulation, PSPICE generates an .OUT file containing the simulation results, which
include the state of inputs and outputs over time or the state of outputs as a function of inputs.
These results are presented in the form of a table of values and graphs. The PROBE display
module is activated using the command .PROBE. To select the signal to visualize, you can
use the Trace menu -> Add... option. A window displaying the available signal names will
appear, and you can click on the signal(s) you want to display.
Figure.4 : Display module PROBE
When you launch the simulation, the PSPICE window displays the variable on the x-
axis corresponding to the specified analysis (e.g., "Time" for time-domain analysis). The
command "Trace -> Add Trace" provides access to a menu that presents all the viewable
signals. The names of the signals that are selected using the mouse will appear in the "Trace
Expression" field.
3
III. Simulation part
1 1 R3 3
1k
R2
500 Vs
I1 R1 C1
2
4mA 800 33n
V1
30V
1. Write the netlist describing the circuit in Figure 1.
2. Perform a DC operating point simulation (by using the command .OP) to record the
values of voltages V(1) and V(3).
3. Perform a continuous simulation (by using the command .dc) on V1 from 0 to 30 and
plot the voltages V(1) and V(3) as function of V1.
4. Give the forms of the voltages V(1) and V(3) as a function of V1
5. By using the command .TF, find the value of the equivalent resistance Req and the
Thevenin voltage source Vth to form the Thevenin equivalent circuit seen between the
nodes 3 and 0 (External to C1).
6. It is assumed that the capacity is initially discharged. V1=30V and I1=4mA. Perform a
transient simulation using the command .Tran, specifying the time scale and time step
in accordance with the theoretical analysis conducted.
7. Plot the simulated curve and record the remarkable values of Vs(t). find the final
voltage and the constant of the capacity charge time τ.
Rth
Vth C1
33n
0
Figure.2: Thevenin equivalent circuit
8. If we replace Vth by a square wave signal “PULSE source” with an amplitude of 5V,
visualize and plot the charging and discharging voltage of the capacitance VC for four
periods (at different frequencies:1KHz, 10KHz and 20KHz).
4
9. If we replace Vth by sinusoidal signal Ve=5sin(2π×f×t), visualize and compare the
voltages Vc to Ve for two periods at various frequencies 100Hz, 3.7KHz and 10KHz
according to the table below.
f (KHz) 0.1 3.7 10
VC(V)
∆T (ms)
T
360
T
Vc
G dB 20 log
Ve
10. Plot the transfer function curves (magnitude(dB) and phase(°))using the command
.AC.
11. Find from these curves the cutoff frequency fc.
12. Interpret the all the simulation results and draw conclusions.
Dr. BENDIB Toufik