simulation of electronic circuits using pspice

33

Click here to load reader

Upload: swagatkarnany

Post on 18-Nov-2014

3.689 views

Category:

Documents


15 download

TRANSCRIPT

Page 1: Simulation of Electronic Circuits Using Pspice

SIMULATION OF ELECTRONIC CIRCUITS

USING PSPICE

(LINEAR INTEGRATED CIRCUITS LAB)

SWAGAT KARNANY 109/EC/07

Page 2: Simulation of Electronic Circuits Using Pspice

INDEX

S.No. Expt No.

AIM Page no.

Sign.

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

3

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

10

3. III Create a macro-model of op-amp taking 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.

14

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

22

5. V PSpice simulation of KHN Biquad filter. 27

2

Page 3: Simulation of Electronic Circuits Using Pspice

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 inputVout: outputVS+: 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 analysisDC 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 AnalysisTime domain response (.TRAN)Fourier analysis (.FOUR)

3

Page 4: Simulation of Electronic Circuits Using Pspice

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

Non-inverting amplifier

*Non-Inverting Amplifier - AC Analysis

R1 0 2 1kR2 2 6 2kX 3 2 7 4 6 UA741.lib c:\msimev71\lib\eval.libVP 7 0 DC 12VVN 0 4 DC 12VVIN 3 0 AC 0.1V.AC DEC 50 1Hz 1MegHz.PROBE.END*Non-Inverting Amplifier - DC AnalysisR1 0 2 1kR2 2 6 2kX 3 2 7 4 6 UA741.lib c:\msimev71\lib\eval.libVP 7 0 DC 12VVN 0 4 DC 12VVIN 3 0 DC 0V.DC LIN VIN -10 10 0.1V

4

Page 5: Simulation of Electronic Circuits Using Pspice

.PROBE

.END

* Non-Inverting Amplifier - Transient AnalysisR1 0 2 1kR2 2 6 2kX 3 2 7 4 6 UA741.lib c:\msimev71\lib\eval.libVP 7 0 DC 12VVN 0 4 DC 12VVIN 3 0 sin(0.005 0.01 1KHz).TRAN 0.01ms 5ms 0ms 0.01ms.PROBE.END

5

Page 6: Simulation of Electronic Circuits Using Pspice

Inverting Amplifier

*Inverting Amplifier - AC AnalysisR1 1 2 1kR2 2 6 10kX 0 2 7 4 6 UA741.lib "nom.lib"VP 7 0 DC 12VVN 0 4 DC 12VVIN 1 0 AC 0.1V.AC DEC 50 1Hz 1MegHz.PROBE.END

6

Page 7: Simulation of Electronic Circuits Using Pspice

*Inverting Amplifier - DC AnalysisR1 1 2 1kR2 2 6 2kX 0 2 7 4 6 UA741.lib "nom.lib"VP 7 0 DC 12VVN 0 4 DC 12VVIN 1 0 DC 0V.DC LIN VIN -10 10 0.1V .PROBE.END

7

Page 8: Simulation of Electronic Circuits Using Pspice

*Inverting Amplifier - Transient AnalysisR1 1 2 1kR2 2 6 10kX 0 2 7 4 6 UA741.lib "nom.lib"VP 7 0 DC 12VVN 0 4 DC 12VVIN 1 0 sin(0 0.01 1KHz).tran 0.01ms 5ms 0ms 0.01ms.PROBE.END

8

Page 9: Simulation of Electronic Circuits Using Pspice

9

Page 10: Simulation of Electronic Circuits Using Pspice

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

Page 11: Simulation of Electronic Circuits Using Pspice

INTEGRATOR PROGRAM

* OPAMP INTEGRATOR SURBHI.LIB "NOM.LIB"X 0 2 7 4 6 UA741R1 1 2 .5KC1 2 6 10UVdd 7 0 DC 12VVss 0 4 DC 12VVin 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 UA741Vdd 7 0 DC 12VVss 0 4 DC 12VVin 2 0 AC 1V.AC DEC 50 .5HZ 1MEGHZ.PROBE.END

11

Page 12: Simulation of Electronic Circuits Using Pspice

INTEGRATION:

Time

0s 0.1s 0.2s 0.3s 0.4s 0.5s 0.6s 0.7s 0.8s 0.9s 1.0sV(6) V(1)

-10V

0V

10V

20V

FREQUENCY RESPONSE:

Frequency

100mHz 1.0Hz 10Hz 100Hz 1.0KHz 10KHz 100KHz 1.0MHz 10MHzV(6)

0V

50KV

100KV

150KV

200KV

12

Page 13: Simulation of Electronic Circuits Using Pspice

DIFFERENTIATOR PROGRAM

* OPAMP DIFFERENTIATOR BY SURBHI .LIB "NOM.LIB"

X 0 2 7 4 6 UA741R1 2 6 .5KC1 1 2 10UVdd 7 0 DC 12VVss 0 4 DC 12VVin 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

Time

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

-20V

-10V

0V

10V

20V

13

Page 14: Simulation of Electronic Circuits Using Pspice

EXPERIMENT NO. 3

AIM: Create a macro-model of op-amp taking 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.

THEORY:

The following circuit diagrams are attached:1. Macro-model of op-amp2. 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 ohmRout = 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 byT(s) = 1+R2/R1 ts(1+R2/R1)+1

where: t = 1/ wp Ao.

14

Page 15: Simulation of Electronic Circuits Using Pspice

MACROMODEL OF OPAMP

*MACROMODEL OF OPAMP BY SURBHI X 3 2 6 OPAMP1.SUBCKT OPAMP1 3 2 6R1 3 0 10MEGR2 3 2 2MEGR3 0 2 10MEGE1 4 0 3 2 2E5RP 4 5 1KCP 5 0 32UE2 10 0 5 0 1R0 10 6 75.ENDS OPAMP1

15

Page 16: Simulation of Electronic Circuits Using Pspice

UNCOMPENSATED NON-INVERTING AMPLIFIER

*NON INVERTING AMPLIFIER BY SURBHI .LIB "NOM.LIB"X 3 2 7 4 6 UA741R1 2 0 1KR2 2 6 1KVdd 7 0 DC 15VVcc 0 4 DC 15VVin 3 0 AC .1V.AC DEC 50 10HZ 1MEGHZ.PROBE.END

16

Page 17: Simulation of Electronic Circuits Using Pspice

MAGNITUDE RESPONSE

Frequency

10Hz 100Hz 1.0KHz 10KHz 100KHz 1.0MHzV(6) V(3)

80mV

120mV

160mV

200mV

PHASE RESPONSE

Frequency

10Hz 100Hz 1.0KHz 10KHz 100KHz 1.0MHzP(V(6)) P(V(3))

-100d

-50d

0d

17

Page 18: Simulation of Electronic Circuits Using Pspice

COMPENSATED NON-INVERTING AMPLIFIER

*COMPENSATED NON INVERTING AMPLIFIER GAIN VS FREQUENCY BY SURBHI.LIB C:\EC2\MACROOP1.LIBX1 3 2 6 OPAMP1X2 6 5 4 OPAMP1R1 2 0 1KR2 2 4 1KR3 6 5 1KR4 5 4 1KVin 3 0 AC .1V.AC DEC 50 10HZ 1MEGHZ.PROBE.END

18

Page 19: Simulation of Electronic Circuits Using Pspice

MAGNITUDE RESPONSE

Frequency

10Hz 100Hz 1.0KHz 10KHz 100KHz 1.0MHzV(3) V(6)

100mV

200mV

300mV

400mV

PHASE RESPONSE

Frequency

10Hz 100Hz 1.0KHz 10KHz 100KHz 1.0MHzP(V(6)) P(V(3))

-100d

-50d

0d

50d

19

Page 20: Simulation of Electronic Circuits Using Pspice

COMPENSATED INVERTING AMPLIFIER

*COMPENSATED INVERTING AMPLIFIER BY SURBHI.LIB C:\EC2\MACROOP1.LIBX1 1 2 4 OPAMP1X2 1 3 7 OPAMP1X3 1 9 6 OPAMP1R1 4 3 2KR2 3 0 2KR3 3 6 2KR4 7 9 .5KR5 9 6 .5KR6 2 0 2KR7 6 2 .5KVin 1 0 AC .1V.AC DEC 50 10HZ 1MEGHZ.PROBE.END

20

Page 21: Simulation of Electronic Circuits Using Pspice

MAGNITUDE RESPONSE

Frequency

10Hz 100Hz 1.0KHz 10KHz 100KHz 1.0MHzV(6) V(1)

50mV

100mV

150mV

PHASE RESPONSE

Frequency

10Hz 100Hz 1.0KHz 10KHz 100KHz 1.0MHzP(V(6)) P(V(1))

-60d

-40d

-20d

-0d

21

Page 22: Simulation of Electronic Circuits Using Pspice

EXPERIMENT NO. 4

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

22

Page 23: Simulation of Electronic Circuits Using Pspice

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 Q2N2222Q2 5 3 2 Q2N2222Q3 8 8 9 Q2N2222Q4 2 8 9 Q2N2222Vd 10 0 DC 1VRd 10 0 1Vcc 6 0 DC 5VVee 0 9 DC 5VVc1 6 4 DC 0VVc2 6 5 DC 0VE1 1 0 10 0 0.5E2 0 3 10 0 0.5Rb 8 0 4.3K.DC Vd -5V 5V .1V.PROBE.END

23

Page 24: Simulation of Electronic Circuits Using Pspice

Vd

-5.0V -4.0V -3.0V -2.0V -1.0V 0.0V 1.0V 2.0V 3.0V 4.0V 5.0VI(Vc1) I(Vc2)

0A

0.4mA

0.8mA

1.2mA

AC ANALYSISVc1 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 Q2N2222Q2 5 3 2 Q2N2222Q3 8 8 9 Q2N2222Q4 2 8 9 Q2N2222Vd 10 0 AC 1VRd 10 0 1Vcc 6 0 DC 5VVee 0 9 DC 5VE1 1 7 10 0 0.5E2 7 3 10 0 0.5Rb 8 0 4.3KVcm 7 0 AC 1VRc1 6 4 1KRc2 6 5 1K.AC DEC 50 1HZ 10MEGHZ.PROBE.END

24

Page 25: Simulation of Electronic Circuits Using Pspice

Frequency

1.0Hz 10Hz 100Hz 1.0KHz 10KHz 100KHz 1.0MHz 10MHzIC(Q1)-IC(Q2)

19.0mA

19.5mA

20.0mA

TRANSIENT ANALYSIS

* TRANSIENT ANALYSIS OF DIFFERENTIAL AMPLIFIER BIASED WITH CURRENT MIRROR BY SURBHI.LIB "NOM.LIB"Q1 4 1 2 Q2N2222Q2 5 3 2 Q2N2222Q3 8 8 9 Q2N2222Q4 2 8 9 Q2N2222Vd 10 0 SIN(0 0.1V 1KHZ)Rd 10 0 1Vcc 6 0 DC 5VVee 0 9 DC 5VE1 1 7 10 0 0.5E2 7 3 10 0 0.5Rb 8 0 4.3KVcm 7 0 AC 0VRc1 6 4 1KRc2 6 5 1K.TRAN 1US 10MS .PROBE.END

25

Page 26: Simulation of Electronic Circuits Using Pspice

Time

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

-1.0V

-0.5V

0V

0.5V

1.0V

26

Page 27: Simulation of Electronic Circuits Using Pspice

Time

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

0A

0.4mA

0.8mA

1.2mA

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

Page 28: Simulation of Electronic Circuits Using Pspice

EXPERIMENT NO. 5

AIM-PSpice simulation of KHN Biquad filter

X1: AdderX2: IntegratorX3: IntegratorR1 = R2 = 20kR3 = Rf = 10kRa = Rb = 707ohmC1 = C2 = 0.01 Uf

28

Page 29: Simulation of Electronic Circuits Using Pspice

*KHN BIQUAD FILTER BY SURBHI.LIB "NOM.LIB"X1 3 2 7 4 6 UA741X2 0 5 7 4 8 UA741X3 0 9 7 4 10 UA741Vdd 7 0 DC 10VVss 0 4 DC 10VR1 2 10 20KR2 1 3 20KR3 3 8 10KRf 2 6 10KRa 6 5 707Rb 8 9 707C1 5 8 0.01UFC2 9 10 0.01UFVin 1 0 AC 10V.AC DEC 50 1HZ 10MEGHZ.PROBE.END

29

Page 30: Simulation of Electronic Circuits Using Pspice

Frequency

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

0V

4V

8V

12V

30