Sie sind auf Seite 1von 30

SIMULATION OF

ELECTRONIC CIRCUITS
USING PSPICE
(LINEAR INTEGRATED CIRCUITS LAB)

SWAGAT KARNANY
109/EC/07
INDEX

S.No. Expt AIM Page


No. no. Sign.
1. I Basic applications of op-amps: AC, DC, 3
and transient response of non-inverting
and inverting amplifiers.

2. II To plot transient response of op-amp 10


integrator and differentiator giving input
as square and triangle wave
respectively.

3. III Create a macro-model of op-amp taking 14


into account Ao, wp, Rin and Rout.
Simulate a non-inverting amplifier , its
compensated version and compensated
inverting amplifier.Plot the magnitude
response and phase response.

4. IV To simulate differential amplifier based 22


with current mirror .Carry out the DC,
AC and transient analysis.

5. V PSpice simulation of KHN Biquad filter. 27

2
EXPERIMENT NO. 1

AIM: Basic applications of op-amps: AC, DC and transient response of non-inverting and
inverting amplifiers.

THEORY:
An operational amplifier is a DC-coupled high-gain electronic voltage amplifier with
differential inputs and, usually, a single output. In its ordinary usage, the output of the op-
amp is controlled by negative feedback which, because of the amplifier's high gain, almost
completely determines the output voltage for any given input. The usual circuit symbol for an
op-amp is:

where:
V+: non-inverting input
V−: inverting input
Vout: output
VS+: positive power supply (sometimes also VDD, VCC, or VCC + )
VS−: negative power supply (sometimes also VSS, VEE, or VCC − )

Types of Analysis:
Pspice allows various types of analysis. The types of analysis and their corresponding .(dot)
commands are follows:
DC analysis
DC sweep of an input voltage/current source, a model parameter, or temperature (.DC)
Linearized device model parameterization (.OP)
DC operating point (.OP)
Small signal transfer function (Thevenin’s equivalent) (.TF)
Small signal sensitivities (.SENS)

Transient Analysis
Time domain response (.TRAN)
Fourier analysis (.FOUR)

3
AC Analysis : Small signal frequency response (.AC)
Noise analysis (.NOISE)

Non-inverting amplifier

*Non-Inverting Amplifier - AC Analysis

R1 0 2 1k
R2 2 6 2k
X 3 2 7 4 6 UA741
.lib c:\msimev71\lib\eval.lib
VP 7 0 DC 12V
VN 0 4 DC 12V
VIN 3 0 AC 0.1V
.AC DEC 50 1Hz 1MegHz
.PROBE
.END
*Non-Inverting Amplifier - DC Analysis
R1 0 2 1k
R2 2 6 2k
X 3 2 7 4 6 UA741
.lib c:\msimev71\lib\eval.lib
VP 7 0 DC 12V
VN 0 4 DC 12V
VIN 3 0 DC 0V
.DC LIN VIN -10 10 0.1V

4
.PROBE
.END

* Non-Inverting Amplifier - Transient Analysis


R1 0 2 1k
R2 2 6 2k
X 3 2 7 4 6 UA741
.lib c:\msimev71\lib\eval.lib
VP 7 0 DC 12V
VN 0 4 DC 12V
VIN 3 0 sin(0.005 0.01 1KHz)
.TRAN 0.01ms 5ms 0ms 0.01ms
.PROBE
.END

5
Inverting Amplifier

*Inverting Amplifier - AC Analysis


R1 1 2 1k
R2 2 6 10k
X 0 2 7 4 6 UA741
.lib "nom.lib"
VP 7 0 DC 12V
VN 0 4 DC 12V
VIN 1 0 AC 0.1V
.AC DEC 50 1Hz 1MegHz
.PROBE
.END

6
*Inverting Amplifier - DC Analysis
R1 1 2 1k
R2 2 6 2k
X 0 2 7 4 6 UA741
.lib "nom.lib"
VP 7 0 DC 12V
VN 0 4 DC 12V
VIN 1 0 DC 0V
.DC LIN VIN -10 10 0.1V
.PROBE
.END

7
*Inverting Amplifier - Transient Analysis
R1 1 2 1k
R2 2 6 10k
X 0 2 7 4 6 UA741
.lib "nom.lib"
VP 7 0 DC 12V
VN 0 4 DC 12V
VIN 1 0 sin(0 0.01 1KHz)
.tran 0.01ms 5ms 0ms 0.01ms
.PROBE
.END

8
9
EXPERIMENT NO. 2

AIM: To plot transient response of op-amp integrator and differentiator giving input as
square and triangle wave respectively.

THEORY:

Op-amp integrator

A circuit in which output voltage is directly proportional to the integral of the input is known
as an integrator or the integration amplifier. Such a circuit is obtained by using operational
amplifier in the inverting configuration with the feedback resistor R replaced by a capacitor, C.
The transfer function is derived as follows:
Vin/R = -Vout x sC

 Vout/Vin = -1/sCR

Op-amp differentiator

A circuit in which output waveform is the derivative of the input waveform is known as the
differentiator or the differentiation amplifier. Such a circuit is obtained by using operational
amplifier in the inverting configuration connecting a capacitor, C at the input. The transfer
function is derived as follows:
Vin x sC = -Vout/R

 Vout/Vin = -Scr

10
INTEGRATOR PROGRAM

* OPAMP INTEGRATOR SURBHI


.LIB "NOM.LIB"
X 0 2 7 4 6 UA741
R1 1 2 .5K
C1 2 6 10U
Vdd 7 0 DC 12V
Vss 0 4 DC 12V
Vin 1 0 PULSE( -2V 2V 0S 1NS 1NS .05S .1S)
.TRAN 10MS 1S
.PROBE
.END

INTEGRATOR FREQUENCY RESPONSE

* OPAMP INTEGRATOR SURBHI


.LIB "NOM.LIB"
X 0 2 7 4 6 UA741
Vdd 7 0 DC 12V
Vss 0 4 DC 12V
Vin 2 0 AC 1V
.AC DEC 50 .5HZ 1MEGHZ
.PROBE
.END

11
INTEGRATION:
20V

10V

0V

-10V
0s 0.1s 0.2s 0.3s 0.4s 0.5s 0.6s 0.7s 0.8s 0.9s 1.0s
V(6) V(1)
Time
FREQUENCY RESPONSE:
200KV

150KV

100KV

50KV

0V
100mHz 1.0Hz 10Hz 100Hz 1.0KHz 10KHz 100KHz 1.0MHz 10MHz
V(6)
Frequency

12
DIFFERENTIATOR PROGRAM

* OPAMP DIFFERENTIATOR BY SURBHI


.LIB "NOM.LIB"
X 0 2 7 4 6 UA741
R1 2 6 .5K
C1 1 2 10U
Vdd 7 0 DC 12V
Vss 0 4 DC 12V
Vin 1 0 PWL(0 0 .5M 5 1M 0 1.5M 5 2M 0 2.5M 5 3M 0 3.5M 5 4M 0)
.TRAN 10NS 4MS
.PROBE
.END

20V

10V

0V

-10V

-20V
0s 0.5ms 1.0ms 1.5ms 2.0ms 2.5ms 3.0ms 3.5ms 4.0ms
V(1) V(6)
Time

13
EXPERIMENT NO. 3

AIM: Create a macro-model of op-amp taking into account Ao, w p, Rin and Rout. Simulate
a non-inverting amplifier , its compensated version and compensated inverting
amplifier . Plot the magnitude response and phase response.

THEORY:

The following circuit diagrams are attached:


1. Macro-model of op-amp
2. Non-inverting amplifier (without compensation)
3. Compensated non-inverting amplifier
4. Compensated inverting amplifier

The parameters of the one-pole op-amp macro-model are:


Ao = 2 x 105
wp = 10 Hz.
Rin = 2 Mega ohm
Rout = 75 ohm

The transfer function for the non-inverting amplifier is:


Vo/Vin = 1 + R2/R1

The compensated non-inverting amplifier behave like a low pass filter, the transfer function of
which is given by
T(s) = 1+R2/R1
ts(1+R2/R1)+1

where: t = 1/ wp Ao.

14
MACROMODEL OF OPAMP

*MACROMODEL OF OPAMP BY SURBHI


X 3 2 6 OPAMP1
.SUBCKT OPAMP1 3 2 6
R1 3 0 10MEG
R2 3 2 2MEG
R3 0 2 10MEG
E1 4 0 3 2 2E5
RP 4 5 1K
CP 5 0 32U
E2 10 0 5 0 1
R0 10 6 75
.ENDS OPAMP1

15
UNCOMPENSATED NON-INVERTING AMPLIFIER

*NON INVERTING AMPLIFIER BY SURBHI


.LIB "NOM.LIB"
X 3 2 7 4 6 UA741
R1 2 0 1K
R2 2 6 1K
Vdd 7 0 DC 15V
Vcc 0 4 DC 15V
Vin 3 0 AC .1V
.AC DEC 50 10HZ 1MEGHZ
.PROBE
.END

16
MAGNITUDE RESPONSE
200mV

160mV

120mV

80mV
10Hz 100Hz 1.0KHz 10KHz 100KHz 1.0MHz
V(6) V(3)
Frequency

PHASE RESPONSE
0d

-50d

-100d
10Hz 100Hz 1.0KHz 10KHz 100KHz 1.0MHz
P(V(6)) P(V(3))
Frequency

17
COMPENSATED NON-INVERTING AMPLIFIER

*COMPENSATED NON INVERTING AMPLIFIER GAIN VS FREQUENCY BY SURBHI


.LIB C:\EC2\MACROOP1.LIB
X1 3 2 6 OPAMP1
X2 6 5 4 OPAMP1
R1 2 0 1K
R2 2 4 1K
R3 6 5 1K
R4 5 4 1K
Vin 3 0 AC .1V
.AC DEC 50 10HZ 1MEGHZ
.PROBE
.END

18
MAGNITUDE RESPONSE
400mV

300mV

200mV

100mV
10Hz 100Hz 1.0KHz 10KHz 100KHz 1.0MHz
V(3) V(6)
Frequency

PHASE RESPONSE
50d

0d

-50d

-100d
10Hz 100Hz 1.0KHz 10KHz 100KHz 1.0MHz
P(V(6)) P(V(3))
Frequency

19
COMPENSATED INVERTING AMPLIFIER

*COMPENSATED INVERTING AMPLIFIER BY SURBHI


.LIB C:\EC2\MACROOP1.LIB
X1 1 2 4 OPAMP1
X2 1 3 7 OPAMP1
X3 1 9 6 OPAMP1
R1 4 3 2K
R2 3 0 2K
R3 3 6 2K
R4 7 9 .5K
R5 9 6 .5K
R6 2 0 2K
R7 6 2 .5K
Vin 1 0 AC .1V
.AC DEC 50 10HZ 1MEGHZ
.PROBE
.END

20
MAGNITUDE RESPONSE
150mV

100mV

50mV
10Hz 100Hz 1.0KHz 10KHz 100KHz 1.0MHz
V(6) V(1)
Frequency

PHASE RESPONSE
-0d

-20d

-40d

-60d
10Hz 100Hz 1.0KHz 10KHz 100KHz 1.0MHz
P(V(6)) P(V(1))
Frequency

21
EXPERIMENT NO. 4

AIM-To simulate differential amplifier based with current mirror .Carry out the DC, AC and
transient analysis.

22
DC ANALYSIS

Vcm=0,Rc1 & Rc2 are removed and Vd is varied from -5V to 5V.

* DC ANALYSIS OF DIFFERENTIAL AMPLIFIER BIASED WITH CURRENT MIRROR BY SURBHI


.LIB "NOM.LIB"
Q1 4 1 2 Q2N2222
Q2 5 3 2 Q2N2222
Q3 8 8 9 Q2N2222
Q4 2 8 9 Q2N2222
Vd 10 0 DC 1V
Rd 10 0 1
Vcc 6 0 DC 5V
Vee 0 9 DC 5V
Vc1 6 4 DC 0V
Vc2 6 5 DC 0V
E1 1 0 10 0 0.5
E2 0 3 10 0 0.5
Rb 8 0 4.3K
.DC Vd -5V 5V .1V
.PROBE
.END

23
1.2mA

0.8mA

0.4mA

0A
-5.0V -4.0V -3.0V -2.0V -1.0V 0.0V 1.0V 2.0V 3.0V 4.0V 5.0V
I(Vc1) I(Vc2)
Vd
AC ANALYSIS
Vc1 and Vc2 are removed and Rc1=Rc2=1kohms

* AC ANALYSIS OF DIFFERENTIAL AMPLIFIER BIASED WITH CURRENT MIRROR BY SURBHI


.LIB "NOM.LIB"
Q1 4 1 2 Q2N2222
Q2 5 3 2 Q2N2222
Q3 8 8 9 Q2N2222
Q4 2 8 9 Q2N2222
Vd 10 0 AC 1V
Rd 10 0 1
Vcc 6 0 DC 5V
Vee 0 9 DC 5V
E1 1 7 10 0 0.5
E2 7 3 10 0 0.5
Rb 8 0 4.3K
Vcm 7 0 AC 1V
Rc1 6 4 1K
Rc2 6 5 1K
.AC DEC 50 1HZ 10MEGHZ
.PROBE
.END

24
20.0mA

19.5mA

19.0mA
1.0Hz 10Hz 100Hz 1.0KHz 10KHz 100KHz 1.0MHz 10MHz
IC(Q1)-IC(Q2)
Frequency
TRANSIENT ANALYSIS

* TRANSIENT ANALYSIS OF DIFFERENTIAL AMPLIFIER BIASED WITH CURRENT MIRROR BY


SURBHI
.LIB "NOM.LIB"
Q1 4 1 2 Q2N2222
Q2 5 3 2 Q2N2222
Q3 8 8 9 Q2N2222
Q4 2 8 9 Q2N2222
Vd 10 0 SIN(0 0.1V 1KHZ)
Rd 10 0 1
Vcc 6 0 DC 5V
Vee 0 9 DC 5V
E1 1 7 10 0 0.5
E2 7 3 10 0 0.5
Rb 8 0 4.3K
Vcm 7 0 AC 0V
Rc1 6 4 1K
Rc2 6 5 1K
.TRAN 1US 10MS
.PROBE
.END

25
1.0V

0.5V

0V

-0.5V

-1.0V
0s 1ms 2ms 3ms 4ms 5ms 6ms 7ms 8ms 9ms 10ms
V(4)-V(5) V(10)
Time

26
1.2mA

0.8mA

0.4mA

0A
0s 1ms 2ms 3ms 4ms 5ms 6ms 7ms 8ms 9ms 10ms
IC(Q1) IC(Q2)
Time

OUTPUT

Differential mode gain, Ad=19.949

Common mode gain, Ac=6.614 * 10^-3

Common mode rejection ratio,


CMRR=2994.71(normal scale)
=69.52(DB)

27
EXPERIMENT NO. 5

AIM-PSpice simulation of KHN Biquad filter

X1: Adder
X2: Integrator
X3: Integrator
R1 = R2 = 20k
R3 = Rf = 10k
Ra = Rb = 707ohm
C1 = C2 = 0.01 Uf

28
*KHN BIQUAD FILTER BY SURBHI
.LIB "NOM.LIB"
X1 3 2 7 4 6 UA741
X2 0 5 7 4 8 UA741
X3 0 9 7 4 10 UA741
Vdd 7 0 DC 10V
Vss 0 4 DC 10V
R1 2 10 20K
R2 1 3 20K
R3 3 8 10K
Rf 2 6 10K
Ra 6 5 707
Rb 8 9 707
C1 5 8 0.01UF
C2 9 10 0.01UF
Vin 1 0 AC 10V
.AC DEC 50 1HZ 10MEGHZ
.PROBE
.END

29
12V

8V

4V

0V
1.0Hz 10Hz 100Hz 1.0KHz 10KHz 100KHz 1.0MHz 10MHz
V(8) V(10) V(1) V(6)
Frequency

30

Das könnte Ihnen auch gefallen