You are on page 1of 28

# PartIAIntegratedElectricalProject:Activity1 Page1

IEPActivity1:CircuitsimulationusingLTspice Page1of28

TeachyourselfcircuitsimulationusingLTspice
Aim To learn how to use the circuit simulation software LTspice for the design and
analysisofelectricalcircuits.
Objectives
1. TolearnhowtouseLTspiceSchematicstosetupcircuitmodels.
2. Togainexperiencewithusingthecomponentlibrary,andinparticulartobeableto
specifythefollowingcomponents:resistors,capacitors,inductors,DCandACvoltage
sources,diodes,fieldeffecttransistors(FET)andoperationalamplifiers(opamp).
3. To learn how to use a variety of simulation modes by carrying out a series of
exercises: steady state DC and AC; transient DC and AC; smallsignal analysis;
frequencyresponse.
4. TogainexperiencewiththepostprocessingfacilitiesofLTspiceinordertoviewand
analysetheresultsofyoursimulations.
5. To reinforce the IA Linear Circuits lecture course by comparing LTspice simulation
resultswithanalyticalresults.
6. ToseehowsomeoftheIAMathematicscourseisappliedinelectricalengineering.
Introduction
In the IA Linear Circuits and Digital Circuits courses you will learn about the properties of
circuit components, how they are connected together to form circuits which perform a
varietyofusefulfunctions,andhowsuchcircuitsareanalysed.Whilstitisimportanttohave
agoodunderstandingoftheprinciplesofelectricalengineering,inpracticethemethodsof
circuit analysis you will be taught have limited applicability. For example: the analysis of
circuits with many circuit components results in large systems of equations to solve; for
transient studies these equations can turn out to be systems of coupled differential
equations; nonlinear circuit elements such as diodes and fieldeffect transistors (FETs) can
resultintheequationsbecominganalyticallyintractable.Forthesereasonsitiscommonto
findthatelectricalengineersusecircuitsimulationpackages,ofwhichLTspiceisanexample.
The aim of this lab is for you to gain experience using LTspice, so that you can apply what
IntegratedElectricalProject(IEP).
ThehandoutstartsbyexplaininghowtousetheLTspiceSchematiceditorinordertodefine
circuits, and how to define component values within the editor (Model definition). It then
continuestoshowhowLTspicecanbeusedtoperformavarietyoftypesofanalysis:DC,AC,
frequencyresponse,transient,biaspointandsmallsignalanalysis(Modelsimulation).Some
PartIAIntegratedElectricalProject:Activity1 Page2
IEPActivity1:CircuitsimulationusingLTspice Page2of28

of the facilities for obtaining useful output from the simulations are explored (Post
processing).Allofthisisachievedviaanumberofexercises,whichhavebeensynchronised
withtheIALinearCircuitslecturessothatyoucanworkthroughthematyourownpace.
Organisationandpracticalities
Following on from the Introductory Lecture, there will be a onehour supervised LTSpice
sessionintheEIETLdesignedtohelpyougettogripswiththebasicsofusingLTSpice.Thisis
halfofyourfirst2hourlab.sessionscheduledintheEIETLfortheIEP(theotherhalfofthat
session is for IEP Activity 2). After that, you are expected to work through the rest of this
handout in synchronism with the IA Linear Circuits lectures. So the idea is that when you
have covered a particular topic in the lecture course, you should attempt the associated
exercise.Exercise1reliesonnothingmorethanknowledgeofOhmsLawandyoushouldbe
able to complete that within the supervised 1 hour LTspice session. Exercise 2 concerns
chargingofacapacitor,whichmanyofyouwillhavecoveredpriortocominghere.Forthose
out the exercise. Again, it is expected that you attempt this within the supervised LTspice
sessions. After that,you should attempt the remaining exercises according to the schedule
below.
Exercise Title Page Whentoattempt
1 Potentialdivider 3 DuringLTspicesession
2 Transientanalysis 7 DuringLTspicesession
3 Diodecharacterisation 10 AfterLecture6
4 FETcharacterisation 12 AfterLecture7
5 BiasingaJFETamplifier 13 AfterLecture7
6 ACcircuitanalysis 15 AfterLecture9
7 Frequencyresponse 16 AfterLecture11
8 Amplifiersmallsignalanalysis 20 AfterLecture13
9 JFETsmallsignalparameters 22 AfterLecture13
10 Amplifiercouplingcapacitors 23 AfterLecture14
11 Amplifierfrequencyresponse 25 AfterLecture14
12 Opampcircuits 26 AfterLecture17
LTspiceisaWindowsapplicationandisavailableontheWindowsPCsintheDPOandallof
the EIETL PCs. If you have your own PC running Windows as its operating system then you
PartIAIntegratedElectricalProject:Activity1 Page3
IEPActivity1:CircuitsimulationusingLTspice Page3of28

can easily download and install LTspice and use it without needing to come into the
Department.
You can quickly generate lots of files whilst running LTspice, and so you are advised to
createanLTspicefolder,perhapswithsubfoldersforthevariousexercises.Itisalsoagood
ideatosaveyourworktoamemorystick.
Completing all 12 exercises in this handout will ensure that you gain experience with
simulating all the circuit components, and all the modes of circuit simulation that you will
meetintheIALinearCircuitscourse.ItwillalsomeanthatyoucanuseLTspicetosimulate
Four marks of standard credit are available on successful completion of all 12 exercises. A
markup will be conducted in the Lent term, as detailed in the Individual IEP Project
SpecificationandOrganisationDocument.Youshouldbringyourcompletedhandouttothis
markup,andbepreparedtodemonstrateyourunderstandingofthisactivity.
Exercise1 Potentialdivider
YoushouldattemptthisexerciseduringthesupervisedLTspicesession.
TheoryConsiderthecircuitshowninFig.1,consistingoftworesistorsinseriesconnected
to a 10V DC power supply. Determine the current flowing in the circuit and the voltage
L
.Ifyoudontknowhowtodothisrefertotherelevantsectionin
theIEPTheoryDocument.

Fig.1Potentialdividercircuit
Current=..mA
VoltageacrossR
L
=V
Any LTspice simulation may be regarded as three operations: circuit definition; circuit
simulation; results processing (this may be trivial/nonexistent in the case of very simple
circuitssuchasthisone!)
R
S
=100
R
L
=900
10 V
V
L
PartIAIntegratedElectricalProject:Activity1 Page4
IEPActivity1:CircuitsimulationusingLTspice Page4of28

Circuit definition is achieved via the LTspice Schematic editor. This provides a convenient
graphicaluserinterface(GUI)forthispurpose,andalsoprovidestheinterfaceforspecifying
thecircuitsimulationtobecarriedout.
LTspicesimulation
1. OpenLTspice.
2. OpenanewfileFile,NewSchematic.
3. Get the components you will need. For resistors, capacitors, inductors and diodes
you will see shortcuts on the top toolbar ( , , and respectively). For
othercomponents(aswellastheaforementionedones)click .Anewwindowwill
appear.Thisgivesaccesstoahugelibraryofpredefinedcomponents.Forexample,
if you use the scrollbarto scroll across you will come to res. Click on this and a box
willappearwiththecircuitsymbolforaresistor(oldfashionedone!)andsometext
toconfirmthatitisindeedaresistor.IfyounowclickonOKtheboxdisappearsand
you will be able to place resistors on the main window by clicking the lefthand
mouse button. When you have enough resistors click the righthand mouse button
to halt the procedure. You will also need a voltage source follow the same
procedure as you did for resistors except click on voltage in the component list.
Finallyyouwillneedagroundforyourcircuit.Thereisashortcutforthisonthetop
toolbar,clickon andthenplaceyourgroundonthemainwindow.Atthisstage
gonetoplanthenyourmainwindowshouldlooksomethinglikeFig.2below.

Fig.2LTspicescreenafterstep3
PartIAIntegratedElectricalProject:Activity1 Page5
IEPActivity1:CircuitsimulationusingLTspice Page5of28

4. Nowyouneedtoorientateyourcomponentsandwirethemupintoacircuit.Usually
somesortofsquareformationworkswell.Accordingly,selectoneofyourresistors.
To do this, click on from the top toolbar, and then click on the resistor. Now
enterCtrl+rthisrotatestheresistorsothatitishorizontal.Alternatively,selectthe
componentyouwanttorotateandclickonthe symbolfromthetoptoolbar.Click
on the left mouse button. You can click on all of your components whilst is
highlightedanddragthemtowhereyouwantthem.Nowwireupyourcircuit.Todo
thisclickon fromthetoptoolbarandalignthecrosshairsthatappearwithone
of the component terminals. Trace a path with the mouse in order to link the
componentwiththenextcomponentinthecircuit.Clicktheleftmousebuttonifyou
needtoputarightangledbendintothewire.Alsoclicktheleftmousebuttonwhen
you reach the next component. You can repeat this process until all components
formacircuit.Finallyattachyourgroundpointusingthewiringtool.Noticethatthis
creates a node, which appears as a square dot on your circuit. This square dot
indicatesthatthereisanelectricalconnection.InLTspicewirescancrosseachother
without an electrical connection existing in that case there is no square dot. You
shouldnowhavesomethinglikeFig.3below.

Fig.3LTspicescreenafterstep4
5. Nowyouneedtogiveallyourcomponentsvalues.Foraresistor,pointattheresistor
and right click. A dialogue box will appear and you simply type the value of the
resistorintheResistor[]:box.Thereareboxesfortheresistortoleranceandpower
rating but these can be left blank. LTspice allows some useful abbreviations as
follows:
ppico=10
12
nnano=10
9
umicro=10
6
mmilli=10
3

PartIAIntegratedElectricalProject:Activity1 Page6
IEPActivity1:CircuitsimulationusingLTspice Page6of28

kkilo=10
3
megmega=10
6
ggiga=10
9

Thus,toentera1Mresistorforexample,youcouldeitherenter1000000or1meg.
valueoftheDCvoltageintotheDCvalue[V]:box,andoptionallyaseriesresistance
too. Notice that LTspice displays on the main window voltage source and series
resistancevalues.
6. At this point your circuit is fully defined and so the next step is to simulate it. The
only relevant simulation here is a DC analysis, known in LTspice as DC operating
will appear. Note the various analysis modes available. Select DC op pnt and click
OK. At this point the more basic side of LTspice is revealed. You will see that a box
hasappearedthatyoucandragaroundyourschematic.Leftclickandinthatboxyou
willseethetext.op.ThisiscalledanLTspicedirectiveoriginallythisprogramwasa
purelycommandlinedrivencircuitsimulatorwithnoGUI,andasyouhavejustseen,
relicsofthishistorystillremain!
7. NowclickSimulate,Run,orusethetoptoolbarshortcut .Followingthisyouwill
seeawindowappearcontainingtheresultsofthesimulation.Ifalliswell,your
screenshouldnowlooksomethinglikeFig.4below.

Fig.4LTspicewindowafterstep7

Again,alegacyofthehistoryofLTspiceisrevealed,namelyaratherconfusingtext
basedsetofresults,sayingthingslike:

PartIAIntegratedElectricalProject:Activity1 Page7
IEPActivity1:CircuitsimulationusingLTspice Page7of28

## V( n002) : 9 vol t age

This means that the voltage at node2 of the circuit is 9V. But what is meant by
node2?LTspiceinternallyallocatesnodenumberstoallnodesinthecircuit(ground
excluded)butdoesntrevealtotheuserwhatthisallocationis.Fortunatelyyoucan
labelnodesinthecircuittomakeinterpretingtheseresultsmorestraightforward.
8. Close the results window and now select . A dialogue box appears and you can
enter a name for a node. So, since you want to know what the load voltage is type
Vload into the box labeled ABC. Click OK and then attach the resulting box to the
thatsaid:
V( n002) : 9 vol t age
has been r epl aced by:

V( vl oad) : 9 vol t age

Much clearer! Notice that currents are described in a much more straightforward
fashion since currents flow through components they are referenced by the
componentnamesthatappearonyourcircuite.g.
I ( R1) : 0. 01 devi ce_cur r ent

meansthecurrentflowingthroughresistorR1.

9. Checkyourresultsdothevaluesprintedonthescreenforthecircuitcurrentand
10. FinallysaveyourcircuitFile,SaveAs.
Exercise2 Transientanalysis
YoushouldattemptthisexerciseduringthesupervisedLTspicesession.
In this exercise you will explore the ability of LTspice to simulate electrical transients by
looking at the charging of a capacitor. You will also gain familiarity with some of the post
processingfacilitiesavailablewithinLTspiceforanalyzingresults.
Theory
InthecircuitshowninFig.5thecapacitorisinitiallyuncharged,andsoinitiallyacurrentof
V
DC
/R flows (since there is no capacitor voltage at t=0 and the voltage across a capacitor
cannot be changed instantaneously), depositing charge onto the plates of the capacitor.
Thusthecapacitorvoltageincreasesandsothecurrentdecreases,resultinginaslowerrate
ofchargingofthecapacitor.
PartIAIntegratedElectricalProject:Activity1 Page8
IEPActivity1:CircuitsimulationusingLTspice Page8of28

Fig.5RCcircuit
ItisshownintheIEPTheoryDocumentthatthecapacitorvoltageisgivenby:
|
|
.
|

\
|
=

RC
t
DC
e V t V 1 ) (
There is also an exercise in the IEP Theory Document for you to work through concerning
thetransientbehaviourofresistorinductorcircuits.
LTspicesimulation
1. Tosavetime,startwiththecircuitusedinExercise1File,Openandthennavigate
to the required file. Replace resistor R
L
with a 1 mF capacitor, and change R
S
to a 1
k resistor. Capacitors are denoted cap in the components menu and the value is
altered in the same way as for resistors. Save the file under a different file name,
perhapsExercise_2.
2. Thiswillbeatransientsimulation,soclickSimulate,EditSimulationCmdandselect
the simulation. With the given components the RC time constant is 1 second. So it
makes sense for the simulation to be over a period of time lasting say 5 time
constants i.e. 5 seconds. 10 time steps per time constant would mean that
reasonable accuracy was achieved, giving a maximum time step length of 0.1s. By
savingthedatafromtime=0thenthewholeoftheresultingwaveformcanbeseen.
Thus, enter 5 in Stop Time, 0 in Time to Start Saving Data and 0.1 in Maximum
Timestep. Leave all the other boxes unchecked. Then click OK and place the box
containingtheresultingLTspicedirectivesomewhereonyourschematic.
set to zero. This is done using LTspice directives. Click on button from the top
and then click OK. Then place the box containing this text somewhere on your
schematic.Thesyntax.icmeansInitialCondition.
R= 1 k
V
DC
=10V
C=1mF
V(t)
PartIAIntegratedElectricalProject:Activity1 Page9
IEPActivity1:CircuitsimulationusingLTspice Page9of28

4. Nowclick torunthesimulation.Ifalliswellanewwindowwillappearwhichis
usedtoviewwaveforms.Thehorizontalaxisforthistypeofstudyisalwaystime.To
plot the voltage across the capacitor click on . This will bring up a dialogue box
withalistofquantitiesthatLTspicehassavedfromthesimulationandthatyoucan
plot. Click on V(Vload) to observe the capacitor voltage. Also click on I(C1) and the
capacitorcurrentwillappear.YoucanplotbothonthesamewindowbypressingCtrl
and then clicking on V(Vload) and I(C1). Do this, and if all is well, you should have
somethinglikeFig.6below.

Fig.6LTspicewindowafterstep4
A nice feature of LTspice is that it will use a different axis scaling for currents and
voltages, so although the current is three orders of magnitude smaller than the
voltageinthiscircuit,thewaveformsbothfillupthegrapharea.
5. Do the LTspice results agree with your predictions? Using the equation for the
capacitorvoltageV(t),itmaybeshownthatI(t)isgivenby:
PartIAIntegratedElectricalProject:Activity1 Page10
IEPActivity1:CircuitsimulationusingLTspice Page10of28

RC
t
DC
e
R
V
t I

= ) (
Calculatethefollowingquantites:
I(0)=.mA I(1)=..mA I(5)=.mA
V(0)=.V V(1)=V V(5)=V
appear,aswellasaboxtellingyouthehorizontalvalue(time)andtheverticalvalue
(Volts) depending on where you position the cross of the cursors on the V(Vload)
Doeseverythingagreewithyouranalyticalsolution?.
Exercise3 Diodecharacterisation
YoushouldattemptthisexerciseafterLecture6oftheIALinearCircuitscourse.
Theory
The diode has the circuit symbol shown in Fig.7(a). It is a semiconductor device which
conducts current when the voltage of the anode is positive with respect to that of the
cathode, but not when the cathode is positive with respect to the anode. These situations
are termed forward biased and reverse biased respectively. Furthermore, in the forward
biased case the voltage across the diode needs to reach a certain value known as the
forwardvoltagedropbeforeanysubstantialcurrentflows.Butafterthatthediodevoltage
increasesverylittlewithfurtherincreasedcurrentthroughit.Thereisafiniteslope,dV
D
/dI
D

inthisregionandthisgivesrisetowhatisknownastheonstateresistanceofthediode.An
idealised current vs voltage plot for a silicon diode is shown in Fig.7(b), and from this it is
seen that a diode can be characterised by its forward voltage drop and its onstate
resistance.

Fig.7(a)Diodesymbolandterminalnames Fig.7(b)IdealisedIvsVcharacteristic
I
V
anode cathode
V
I
V
f
PartIAIntegratedElectricalProject:Activity1 Page11
IEPActivity1:CircuitsimulationusingLTspice Page11of28

LTspicesimulation
LTspice can be used to plot these characteristics using the idea of the DC Sweep. The DC
a lower and upper limit and with a certain increment. It will then plot the variable of your
choiceagainstthesweptvariable.

Fig.8Diodecharacterisationcircuit
1. SetupthecircuitshowninFig.8.SelecttheIN4148silicondiodebyrightclickingon
thediodeinyourschematic,PickNewDiodeandthenclickonIN4148fromthelist
ofdiodes,thenclickOK.SettheDCvoltagesourceto0V.
2. SetupthesimulationselectDCSweepandenterV1astheNameof1
st
sourceto
Sweep assuming this is the default name for the voltage source in your LTspice
schematic. Set Type of Sweep to Linear, Start Value to 0, Stop Value to 3 and
Incrementto1mV.ClickonOKandplacetheresultingLTspicedirectivesomewhere
onyourschematic.Runthesimulation.
3. Select I(D1) to view, and observe that the diode current only starts to become
significant when the diode voltage exceeds a certain value, around 0.7V. You may
youcouldmeasuretheslopeofthecharacteristicandtakeitsreciprocal.Butyoucan
make LTspice do the hard work for you. If you right click on I(D1) in the results
window a dialogue box will appear into which you can enter expressions which are
functions of I(D1) to plot. LTspice has a mathematical library of functions which is
reasonably extensive. You can also write your own functions using the .func
directive.IfyouwanttofindoutwhatLTspiceiscapableofinthisrespectclickHelp,
UserDefined Functions. But for now just type d(I(D1)) into the Expression Editor
thisisLTspicesyntaxforfindingandplottingthederivativeofI(D1).Thiswillgiveyou
a graph showing the conductance of the diode vs voltage (conductance is the
reciprocal of resistance). Notice that the plot has zero slope for small voltages (ie
infinite resistance) but a finite and approaching constant slope at V=3V. Using
V
I
PartIAIntegratedElectricalProject:Activity1 Page12
IEPActivity1:CircuitsimulationusingLTspice Page12of28

cursors,findoutwhatthisslopeis,andhencewritedownthedioderesistance.Also
writedownthediodeforwardvoltagedrop.
R
diode
=.. V
f
=..V
Exercise4 FETcharacterisation
YoushouldattemptthisexerciseafterLecture7oftheIALinearCircuitscourse.
The theory and analysis of amplifier circuits based on fieldeffect transistors (FET) forms a
significantpartoftheIALinearCircuitscourse.Thisexerciseisconcernedwithdetermining
the DC characteristics of these devices in the form of graphs showing drain current (I
D
) vs
drainsourcevoltage(V
DS
)fordifferentvaluesofgatesourcevoltage(V
GS
).
Theory
FETs are three terminal devices, and the three terminals are known as the gate, drain and
source as shown in Fig.9(a) below, and abbreviated G, S and D respectively in subsequent
figures.Bycontrollingthevoltageatthegatewithrespecttothesource,thecurrentflowing
fromdraintosourcemaybecontrolled.Thiseffectiscausedbythegatevoltagecontrolling
the resistance of the drainsource channel, and is frequently expressed using families of
curvesinwhichthedraincurrent,I
D
,isexpressedasafunctionofthedrainsourcevoltage,
V
DS
,foravarietyofvaluesofgatesourcevoltage,V
GS
.N.B.thegatecurrentofaJFETiszero,
asshowninFig.11(b).Thismeansthatthedraincurrentandsourcecurrentarealwaysthe
same.InthefirstexerciseyouwilluseLTspicetoderivethesecharacteristicsforthe2N3819
JFET.

Fig.9(a)CircuitsymbolforthenchannelJFET Fig.9(b)JFETtestcircuit
LTspicesimulation
1. Using the LTspice schematic editor set up the circuit shown in Fig.9(b). The JFET
appears in the component menu as njf, standing for nchannel JFET. To select the
specificJFETshowninthecircuit,rightclickontheFETandawindowwillappear,in
whichyouclickonPickNewJFET.Inthenextwindowclickon2N3819,thenclickOK.
V
DS
V
DS

I
D

gate(G)
drain(D)
source(S)
V
GS

I
D

V
GS
G
S
D
I
G
=0
I
S
=I
D

PartIAIntegratedElectricalProject:Activity1 Page13
IEPActivity1:CircuitsimulationusingLTspice Page13of28

2. Next set upthe simulation. To do this, use theDC Sweepwhich you used to obtain
the diode characteristics in the previous exercise. In this case you need to vary two
quantities, V
DS
and V
GS
so the set up is slightly different. In the DC sweep menu set
thefirstsourcetobeV
DS
bytypingthenameofthevoltagesourceinyourschematic
which supplies the drainsource voltage into the Name of 1
st
source to Sweep box.
Set the Start Value, Stop Value and Increment to 0, 10 and 0.1 respectively. Now
clickon2
nd
sourceandsetNameof2
nd
sourcetoSweeptothenameofthevoltage
sourceinyourschematicwhichsuppliesthegatesourcevoltage.SettheStartValue,
StopValueandIncrementto5,0and0.5respectively.
3. Runthesimulationandviewtheresults.ItisthevariationofI
D
withV
GS
andV
DS
you
are interested in, so within Plot Settings, Visible Traces select Id(J1). You will then
see the family of I
D
vs V
DS
curves for different values of V
GS
. If everything has gone
accordingtoplanyourcurveswilllooksimilartothoseshownintherelevantsection
oftheIEPTheoryDocumentandinyourLinearCircuitslecturenotes.
Exercise5 BiasingaJFETamplifier
YoushouldattemptthisexerciseafterLecture7oftheIALinearCircuitscourse.
Theory
In order to operate a JFET as an amplifier, it must be biased. Biasing is the art of selecting
resistorsandDCpowersupplyvoltagesinordertoachieveacertainoperatingpointforthe
transistor. This operating point should be in the saturation region of the transistors
operatingcharacteristics.ThismeansthattheregiontotheleftofthekneeofalltheI
D
V
DS

characteristicsmustbeavoided.Also,thegatesourcevoltagemustneverexceed0V.Often
agoodoperatingpointisonewhichisinthemiddleoftheV
DS
range.Anoperatingpointof
V
DS
=5V,V
GS
=1.5VandI
D
=3mAissuggested.Alsoassumetheavailabilityofasingle10V
DCpowersupply.ThismeansthatthecircuitofFig.10belowshouldbeused.
Thisisaselfbiasingamplifier,anditworksbecausethe1Mresistorholdsthegateat0V
(remember that no gate current can flow in a FET, so there can be no current in the 1M
resistor. This ensures there is no voltage across it, and therefore the gate voltage is 0V).
ThismeansthattheV
GS
valueof1.5VissetbytheresistorR
S
,andisgivenby:
V
GS
=I
D
R
S
=V
S
whereV
S
isthevoltageofthesourcewithrespecttoground.
CalculatethevalueofR
S
neededtogiveV
GS
=1.5VwhenI
D
=3mA.
R
S
=.

PartIAIntegratedElectricalProject:Activity1 Page14
IEPActivity1:CircuitsimulationusingLTspice Page14of28

Fig.10SelfbiasedJFETamplifiercircuit
TocalculateR
D
wehave:
10=V
S
+V
DS
+I
D
R
D
,withV
S
=1.5V,V
DS
=5VandI
D
=3mA.CalculateR
D
tosatisfythisequation.
R
D
=k
LTspicesimulation
1. SetupthecircuitofFig.10inLTspiceusingyourcalculatedvaluesofR
S
andR
D
.Use
thesameJFETasbefore,the2N3819.Youshouldalsoapplylabelstothegate,drain
and source terminals e.g. gate, drain and source! This will aid in viewing results
2. To set up the simulation, Simulate, Edit Simulation Cmd, DC op pnt, OK. This tells
3. WritedownthevaluesofV
DS
,V
GS
(rememberthatV
DS
=V
D
V
S
,V
GS
=V
G
V
S
)andI
D

thatresultfromthesimulation.
V
DS
=.V V
GS
=..V I
D
=..mA
Dothesevaluesagreewiththeoperatingpointyouwereaimingfor?.
1M
10V
0V
R
S
R
D
G
D
S
I
D
=3mA
V
DS
=5V
V
S
=1.5V
V
G
=0V
PartIAIntegratedElectricalProject:Activity1 Page15
IEPActivity1:CircuitsimulationusingLTspice Page15of28

Exercise6 ACcircuitanalysis
YoushouldattemptthisexerciseafterLecture9oftheIALinearCircuitscourse.
Theory
ConsiderthecircuitshowninFig.11.Itshowsa127.3mHinductor,symbolL,connectedin
series with a 30 resistor R to a sinusoidal voltage source of peak voltage 100V and
frequencyfof50Hz.

Fig.11RLACcircuit
Themagnitudeofthecurrentisgivenby
2 2
) ( L R
V
I
e +
=
inwhich=2fwherefisthefrequencyoftheacsinusoidalsupply.Thephaseangle ,of
thecurrentwithrespecttothevoltageisgivenby
R
L e

1
tan

=
ForthecircuitshowninFig.11determinethemagnitudeandphaseangleofthecurrent:
Magnitude=..A Phaseangledegrees
LTspicesimulation
1. Set up the circuit shown in Fig.11. The inductor has part name ind, and its value is
setinasimilarwaytoresistorsandcapacitors.Forthevoltagesupply,rightclickonit
and then click on Advanced. This enables you to set a variety of different voltage
source waveforms, but the one you need is the one on the righthand side of the
dialogue box entitled Smallsignal AC Analysis(.AC). Enter the AC Amplitude as
100VandtheACPhaseas0,thenclickOK.
2. Now set up the simulation by clicking Simulate, Edit Simulation Cmd and select AC
Analysis. This dialogue box assumes that you want to know how the circuit will
behave at a variety of frequencies, whereas you are only interested in its
R=30
L=127.3mH
~
V=100V,f=50Hz
PartIAIntegratedElectricalProject:Activity1 Page16
IEPActivity1:CircuitsimulationusingLTspice Page16of28

performancewitha50Hzvoltagesupply.Soenter50intoboththeStartFrequency:
Type of Sweep are then redundant, so it doesnt matter what is entered into those
(but you have to enter something!). Click OK, and then place the resulting box
containingtheLTspicedirectivesomewhereonyourschematic.
3. Nowrunyoursimulationintheusualway.Aresultsboxwillappear.Writedownthe
magnitudeandphaseofthecurrentpredictedbyLTspice.
Magnitude=..A Phase=..degrees
Dotheyagreewithyourearliercalculations?..
Exercise7 Frequencyresponse
YoushouldattemptthisexerciseafterLecture11oftheIALinearCircuitscourse.
In the previous exercise the steadystate AC analysis of an RL circuit at 50Hz was
explored.HereyouwilllookattheabilityofLTspicetodeterminethefrequencyresponseof
anRCcircuitwhichbehavesasalowpassfilter,andaresonantcircuitwhichbehavesasa
bandpassfilter.
Thefrequencyresponseofacircuittellsushowtheinputoutputcharacteristicofthecircuit
(often the voltage gain) varies withfrequency.Why is this important?This question is best
output of a CD player playing some music, and some loudspeakers. Also imagine breaking
the signal from the CD player down into different frequencies. Thus there will be low
frequenciespresentowingtothebassplayer,mediumfrequencies,andpossiblysomevery
high frequencies e.g. drummer hitting cymbals. For the amplified version of the signal
coming from your CD player to sound as intended then all of these components should be
amplifiedequally.Thus,thegainoftheamplifiershouldbeconstantforallfrequencies.Or
should it? Well, to answer this you need to think about the experience of the listener i.e.
you! The audible frequency range of the human ear is typically from 20Hz20kHz. So it
doesnt really matter whether the gain of the amplifier starts to reduce for frequencies
below 20Hz and above 20kHz since you cant hear them anyway. Thus, a typical audio
amplifiermighthaveaconstantvoltagegainovertheaudiorangeoffrequencies,butthen
someattenuationbelow20Hzandabove20kHz.
PartIAIntegratedElectricalProject:Activity1 Page17
IEPActivity1:CircuitsimulationusingLTspice Page17of28

TheoryLowpassfilter

Fig.12(a)RClowpassfilter
Consider the circuit shown in Fig.12(a). The impedance of a capacitor is 1/C and so for
large frequencies is very small, and for zero frequency (dc) is infinite. Thus, at high
frequenciestheoutputofthecircuitiseffectivelyconnectedtoground,whereasatdcthere
is an open circuit between the output and ground and so the output voltage and input
voltagewillbethesame.Thiscircuitisthereforeknownasalowpassfilteritallowslow
frequencysignalsfromtheinputtopropagatetotheoutput,butattenuateshighfrequency
signals.Wecanexpressallofthismathematicallyas:
2
) ( 1
1
CR
v
v
Gain
i
o
e +
= =
Thephaseoftheoutputvoltagewithrespecttotheinputvoltageisgivenby:
CR e
1
tan

=
You should be able to derive these expressions from your IA Linear Circuits course. The
derivation is also outlined in IEP Theory Document, and you should consult the relevant
section if necessary. By examining this equation you can see that for small values of
frequency (and hence ) the gain is unity, but for very large values it varies approximately
as1/(CR),asexpectedfromthephysicalreasoninggivenabove.
Howdoyoucharacterisesuchcircuits?Normallythereisarangeoffrequenciesoverwhich
thegainispracticallyconstant.Thisrangeoffrequenciesisreferredtoasthemidband,and
thecorrespondinggainasthemidbandgain.Bylookingattheequationforthegainabove
youcanseethatprovidingCR<<1thenthegainis1,andthisisthenthemidbandgainof
thecircuit.Itiscommonpracticetoquotethefrequencyatwhichthegainhasfallento1/2
of the midband gain too. This frequency goes by a bewildering variety of names corner
frequency,3dBfrequency,halfpowerfrequency.Anexplanationofthesetermsisgivenin
the IEP Theory Document. In this case this frequency is the upper limit of the midband
range of frequencies, the lower limit being DC i.e. zero. It is seen from the equation above
thatthisconditioncorrespondsto CR=1,andsoprovidingRandCareknown,the3dB
frequencyofthecircuitmaybefound(dontforgetthat=2f,areallycommonmistake!).
Alternatively, for a desired value of 3dB frequency a circuit designer can easily work out
v
i
=1V
R=1k
C=159.2nF v
0
~
PartIAIntegratedElectricalProject:Activity1 Page18
IEPActivity1:CircuitsimulationusingLTspice Page18of28

what values of R and C are needed. For the circuit shown in Fig.12(a), calculate and write
downthe3dBfrequencyandthecorrespondingphaseangleoftheoutputvoltage.
3dBfrequency=..Hz Phaseat3dBfrequency=..degrees
LTspicesimulation
1. MakeanLTspicemodelforthecircuitofFig.12(a).Tosavetimeyoucouldstartwith
the LTspice circuit of Exercise2, making any necessary changes to the component
values.Setthevoltagesourceasyoudidinthepreviousexercisebutto1Vandzero
phase.GetridofanyexistingLTspicedirectives.
the Stop Frequency. This will cause LTspice to compute the frequency response of
the circuit over a range of frequencies from 10Hz up to 100kHz, displaying the
results so that decadechanges in frequency (this means a change in frequency of a
factorof10e.g.10Hzupto100Hz)takeequalincrementsalongthehorizontalaxis.
3. Select V(Vload) as the output variable to plot. Notice that this produces two plots,
one for the magnitude of the output voltage, the other one for its phase. The solid
lineistheformer,thedashedlinethelatter.Usingthecursorsfindandwritedown
the3dBfrequencyandthecorrespondingphaseangle.
3dBfrequency=..Hz Phaseat3dBfrequency=..degrees
Dothesevaluesagreewithyourtheoreticalpredictions?
Theoryresonantfilter
ConsiderthecircuitshowninFig.12(b)consistingofaninductorLinserieswithacapacitor
C.TheresistorRmodelstheeffectoftheresistanceofthewirefromwhichtheinductoris

Fig.12(b)Seriesresonantcircuit
Inelectricalresonance,energyisswappedbetweentheenergystoredintheelectricfieldof
a capacitor and the energy stored in the magnetic field of an inductor. For any circuit
C = 175.9 pF
v
0

v
i

~
R = 10
L = 400 H
PartIAIntegratedElectricalProject:Activity1 Page19
IEPActivity1:CircuitsimulationusingLTspice Page19of28

## containing inductance and capacitance there will be a natural, or a resonant frequency at

whichthistransferofenergytakesplace.Theseideasareanaloguestoaformofmechanical
resonance with which you will be familiar, that of pendulum of a clock. Here, energy is
swapped between potential and kinetic energy, and the frequency of the resulting
Resistors consume electrical power, converting it into heat, and so they act to damp down
fromtheswingingpendulum,andthetermforthisisdamping.Todescribehowsignificant
thedampingis,thetermqualityfactor,orQ,ofthesystemisused.Qisdefinedastherate
atwhichenergyisswappedbetweenthetwotypesofenergydividedbytherateatwhich
energy is dissipated due to damping. Thus, a heavily damped resonance will soon die out,
whereasalightlydampedonewillcontinueformanyperiodsofoscillation.InyourIALinear
Circuits notes, and in the IEP Theory Document the following results are derived for series
electricalresonantcircuitsofthetypedepictedinFig.12(b):
LC
f
1
2
0 0
= = t e
f
f
C
L
R CR R
L
Q
A
= = = =
0
0
0
1 1
e
e

Theequationforthegainoftheresonantcircuitis
2 2 2
) 1 ( ) (
1
LC CR
v
v
Gain
i
o
e e +
= =
Gainatresonance
CR
o
e
1
=
ForthecircuitshowninFig.12(b),calculatetheresonantfrequency,f
0
,theQfactorandthe
3dBbandwidthf.
f
0
=.kHz Q=. f=..kHz
LTspicesimulation
1. MakeanLTspicemodelforthecircuitofFig.12(b).Setthevoltagesourceasyoudid
inthepreviousexercise.GetridofanyexistingLTspicedirectives.
0
/10and
theStopFrequencytof
0
10.Thiswillensurethatthefrequencysweepincludesthe
frequenciesaroundresonance.
3. Select V(Vload) as the output variable to plot. As before, there will bea magnitude
and a phase plot. You will notice that the magnitude plot contains a sharp peak.
Using the cursors find and write down the resonant frequency and the gain at
PartIAIntegratedElectricalProject:Activity1 Page20
IEPActivity1:CircuitsimulationusingLTspice Page20of28

resonance,whichisalsothesamethingastheQfactorofthecircuit.Thencalculate
theoutputvoltageatthe3dBpoint,andusingcursorsdeterminethebandwidthof
thecircuit,fandwriteitdown.Toachievegoodaccuracyyouwillneedtozoomin
onthemagnitudeplotaroundtheresonantpeak.
Resonantfrequencyf
0
=kHz Qfactor= f=..kHz
Dothevaluesagreewithyourtheoreticalvalues?
4. Plotthecapacitorcurrentandwritedownitsphaseattheresonantfrequency.
Phase=.degrees
Explainthisresult.

5. To illustrate the effect of damping, increase the resistor to 100 and rerun the
simulation. How does the new magnitude plot of the capacitor voltage compare to
thepreviousone?Why?

Calculate the new theoretical value of Q, and write down the new value of Q
obtainedusingyourLTspicesimulations.
TheoreticalvalueofQ=...................... SimulatedvalueofQ=.......................
Commentontheiragreement.......................................................................................
Exercise8 Amplifiersmallsignalanalysis
YoushouldattemptthisexerciseafterLecture13oftheIALinearCircuitscourse.
Theory
HavingbiasedtheFETamplifier(seeExercise5)itisnowinterestingtoseehowitperforms
asanamplifier.Onewayofdoingthisistoapplyasinusoidalvoltageofsmallamplitude(say
0.1V) at the amplifier input (the gate of the FET). Indeed, this idea gives rise to the name
smallsignalanalysis.ThiswillcausethevoltageatthedrainoftheFET(theoutputvoltage
of the amplifier) to have a component which oscillates at the same frequency as the input
voltage. By observing the peakpeak amplitude of this component of the output voltage it
will become clear that amplification has occurred. A full explanation of this is provided in
theIEPTheoryDocumentandinyourIALinearCircuitslecturenotes.
PartIAIntegratedElectricalProject:Activity1 Page21
IEPActivity1:CircuitsimulationusingLTspice Page21of28

LTspicesimulation
i

as shown in Fig.13 below. This will supply the smallsignal input voltage. Rightclick
on this voltage source and in the window that appears select Advanced, and then
fromthelefthandlistofoptionsselectSINE.Aseriesof7boxeswillappearbutyou
only have to enter values into the first three of them. Enter 0 for DC offset[V], 0.1
for Amplitude[V] and 1k for Freq[Hz]. This will apply a 1kHz sinusoidal voltage of
0.1VpeakamplitudeandzeroDCoffsettotheinputoftheamplifier.
2. Also insert the capacitor C
S
shown in Fig.13, in parallel with R
S
. Set its value to
100F. You will find out more about the effect of this capacitor in Exercise 10, but
for now it is enough to understand that capacitors become shortcircuits as far as
smallsignals are concerned (capacitor impedance is 1/C and this is negligible
compared to other resistances in the circuit at 1kHz). Thus, the effect of this
capacitor is to connect the source of the JFET to ground as far as smallsignals are
concerned.

Fig.13SmallsignalanalysisofJFETamplifier
3. Firstofall,solveforthedcoperatingpointSimulate,EditSimulationCmd,DCop
pnt, OK. Then set up a transient simulation: Stop Time 0.01; Time to Start Saving
Data:0;MaximumTimestep:1u.ThenRunthesimulation.
4. Plot the gate voltage and the drain voltage. These plots illustrate what is going on
withyouramplifier.Thegatevoltagewillbea1kHzsinusoidofpeakpeakamplitude
0.2V,becausethatwaswhatyousetittobeinStep1.Thedrainvoltagewillhavea
1M
10V
0V
R
S
R
D
C
S ~
v
i

v
0

G
S
D
PartIAIntegratedElectricalProject:Activity1 Page22
IEPActivity1:CircuitsimulationusingLTspice Page22of28

DC component, and that is the bias value that you set it to when you set the
operating point of the JFET in the previous exercise. But superimposed on this is a
1kHzsinusoidofgreateramplitudethantheinputsinusoid.Sothesmallsignalinput
voltage has been amplified. Click on V(vd) and use the cursors to measure the
minimumandmaximumvoltageatthedrain.
Min.voltage=V Max.voltage=V Peakpeakvoltage=V
Hence find the gain of the amplifier by dividing the peakpeak drain voltage by the
peakpeakinputvoltage. Gain=.
ofaround1.5V,assetinthepreviousexercise.Itwillalsohavea1kHzcomponent,
butitwillbetiny.YouareobservingtheeffectofthecapacitorC
S
.Thiscapacitorhas
noeffectonthebiasingofthecircuitbecauseitisanopencircuittoDC.Howeverit
more or less gets rid of any smallsignal voltage at the source. Measure the peak
peakvoltageatthesourceusingcursorsandwriteitdown.
Peakpeakvoltageatthesource=V
6. Repeat steps 4 and 5 above, but this time without the capacitor C
S
connected in
parallelwithR
S
.Writedownthenewamplifiergainandthepeakpeakvoltageatthe
sourceoftheJFET.
Gain= Peakpeakvoltageatthesource=..V
Whyhasthegaingonedown?
Exercise9 JFETsmallsignalparameters
YoushouldattemptthisexerciseafterLecture13oftheIALinearCircuitscourse.
Theory
For small variations in I
D
, V
DS
and V
GS
about the JFET operating point, a method of analysis
known as smallsignal analysis is used. Briefly, the JFET is characterised for smallsignal
operationbytwoparameters:g
m
,whichisknownasthemutualconductanceandr
d
whichis
knownasthedrainsourceresistance.Thesearedefinedas:
GS
D
m
V
I
g
c
c
= and
DS
D
ds
V
I
r c
c
=
1

These definitions suggest a way of deducing the parameters from the operating
characteristics of the FET found in Exercise 4. Supposing V
DS
is held at its bias value of 5V,
and V
GS
is varied, and a graph of I
D
vsV
GS
is then plotted. The slope of the characteristic
measuredatV
GS
=1.5Vwillbetherequiredvalueofg
m
,sincethatisthedefinitionofg
m
.
PartIAIntegratedElectricalProject:Activity1 Page23
IEPActivity1:CircuitsimulationusingLTspice Page23of28

Then,byholdingV
GS
constantat1.5VandvaryingV
DS
,aplotofI
D
vsV
DS
maybeobtained.
The slope of this plot measured at V
DS
=5V is then the reciprocal of the drainsource
resistance.OnceyouhavethesmallsignalparametersoftheFETitispossibletoderivethe
smallsignalgainoftheamplifieras:
Gain
d D
d D
m
i
o
r R
r R
g
v
v
+
= =
DetailsofwherethisexpressioncomesfromareprovidedintheIEPTheoryDocumentand
inyourIALinearCircuitsnotes.
LTspicesimulation
1. FirstfindthesmallsignalparametersoftheJFETatthebiaspoint.Tofindg
m
,setup
amodelwithafixedvalueforV
DS
of5V,andvaryV
GS
from5Vto0V(usetheDC
sweepthatyouusedinthediodecharacterisationexercise,Exercise3).ThenplotI
D

asafunctionofV
GS
,andfindtheslopeofthecharacteristic,again,asyoudidinthe
diodeexercise.
g
m
=mS
NowfixV
GS
=1.5VandvaryV
DS
from0V10V,plotI
D
vsV
DS
andfinditsslope.The
drainsourceresistanceisthenthereciprocaloftheslopeatV
DS
=5V.
r
ds
=
2. Insertthevaluesintotheexpressiondevelopedforgainabove.
Gain=.
HowdoesitcomparewiththegainfoundinExercise8?..

Exercise10 Amplifiercouplingcapacitors
YoushouldattemptthisexerciseafterLecture14oftheIALinearCircuitscourse.
Theory
As you have seen, Exercise 8 shows that the amplifier produces an output voltage which
consists of a DC voltage(the bias drain voltage)onto which is superimposed an ACvoltage
(the amplified version of the input voltage). In reality it is only the AC voltage that is of
interest, and the bias voltage becomes a nuisance when connecting the amplifier, for
example, to a loudspeaker. The bias component of the output voltage will simply waste
power in the loudspeaker. Thus, coupling capacitors are generally used. This relies on the
factthatcapacitorshaveinfiniteimpedancetoDC,sinceX
C
=1/C,butverylowimpedance
PartIAIntegratedElectricalProject:Activity1 Page24
IEPActivity1:CircuitsimulationusingLTspice Page24of28

to AC. They also enable amplifiers to be connected in series without worrying about
connecting two points which are at different DC bias voltage levels. Thus, it is usual to see
capacitorsbetweeninputvoltageandinputterminalofanamplifier,andsimilarlybetween
LTspicesimulation
1. Use LTspice Schematics to set up the circuit shown in Fig.14. To save time you can
startwiththecircuitofExercise8andmodifythat.Setallthecapacitorsto100F
thisissolargethattheycanallbethoughtofasshortcircuitsatthe1kHzfrequency
L
to5k.
2. Perform a transient analysis as you did in Exercise 8. Observe the output voltage of
L
.Noticethatasexpected,the
coupling capacitor hasremoved the DCcomponent of thisoutput voltage. Measure
thegainoftheamplifierandwriteitdown.
Gain=..
Notice that the gain is somewhat smaller than you got before. Why? HINT:
ExperimentwiththevalueofR
L
andseehowitaffectsthegain.

1M
10V
0V
R
S
R
D
C
S ~
v
i

V
0

C
0
C
i
R
L
G
D
S
PartIAIntegratedElectricalProject:Activity1 Page25
IEPActivity1:CircuitsimulationusingLTspice Page25of28

Exercise11 Amplifierfrequencyresponse
YoushouldattemptthisexerciseafterLecture14oftheIALinearCircuitscourse.
Theory
Is there any down side to the capacitors introduced in theprevious exercise? Yes,there is.
At very low frequencies the coupling capacitors behave as open circuits, and so effectively
the input voltage to the amplifier becomes disconnected from the amplifier input, and the
load resistor becomes disconnected from the amplifier output. The trick involves making
sure that these low frequencies are so low that they are outside the frequency range that
theamplifierisrequiredtoamplify.Forexample,foranaudioamplifierthismeansmaking
sure that the attenuation due to the coupling capacitors occurs below the lowest audible
frequencythatthehumanearcanheartypicallyaround20Hz.
In addition to the circuit capacitors, at very high frequencies the presence of parasitic
capacitances between gate and source(C
gs
) and gate and drain (C
gd
) of the JFET may make
themselvesfelt. Thus, for high frequencies theJFET modelused in thesmallsignal analysis
must include the effect of these capacitances. Fortunately the LTspice model for JFETs
includestheseanyway,andsotheireffectsareautomaticallyincludedinanysimulation.The
effectofthesecapacitancesistoreducethegainoftheamplifierathighfrequencies.Thisis
hasbothlowandhighfrequencylimitations.
LTspicesimulation
1. Usethesamecircuitasforthepreviousexercise,butthistimesetallthecapacitors
to1F.
2. Do a dc operating point simulation first. Then set up a frequency response
simulation from 10Hz up to 1GHz and Run the simulation. Plot the gain of the
amplifier vs frequency. Set the vertical axis to decibels. Using cursors estimate the
high frequency 3dB frequency of the amplifier and write it down. It should be of
theorderof100MHz.
Highfrequency3dBfrequency=MHz
WhatyouareobservingistheeffectoftheparasiticcapacitancesoftheJFET.
3. Nowinvestigatetheeffectsofthethreecircuitcapacitances.Dothisbyleavingtwo
of them with very large values (1F) and altering the other one to something more
realisticsuchas10F.Observetheamplifiergainvsfrequencycharacteristicasyou
didinstep2,butthistimegoforarangeoffrequenciesfrom0.1Hzto10kHz.Seeif
youcancalculatevaluesforC
i
,C
0
andC
S
sothateachcapacitorindependentlygivesa
3dB frequency of 10Hz, using your IA Linear Circuits lecture notes. Or, if youd
PartIAIntegratedElectricalProject:Activity1 Page26
IEPActivity1:CircuitsimulationusingLTspice Page26of28

ratherjustexperiment,thensimplytryalteringthevalueofthecapacitanceuntilyou
achievea3dBfrequencyof10Hz.Asaruleofthumb,increasingthecapacitanceby
a certain factor will reduce the 3dB frequency by the same factor, and vice versa.
So for example, if you find that you get a 3dB frequency of 100Hz with C
i
set to
10F then changing C
i
to 100F should bring it down to 10Hz. This exercise
illustrates a major benefit of LTspice: rather than having to physically build a circuit
andtryoutdifferentvaluesofcomponents,orattempttoperformacomplexcircuit
analysis,youcanplayaroundwithcomponentvaluesuntilthecircuitbehavesasyou
When you have found values for C
i
, C
0
and C
S
that satisfy the requirement above,
writedowntheirvalues,andperformafrequencyresponseanalysisoftheamplifier
from1Hzto1GHz.
C
i
=..F C
0
=F C
S
=..F
Exercise12 Opampcircuits
YoushouldattemptthisexerciseafterLecture17oftheIALinearCircuitscourse.
The operational amplifier (opamp for short) is a very useful device for electronics
engineers,andcanbeusedtoperformalargevarietyoffunctions.Theyaremanufactured
as integrated circuits (IC) and Fig.15(a) below shows a photograph of one of the many
different types of this device known as the 741. Fig.15(b) is an illustration of the internal
configurationofthisopamp,fromwhichyoucandeducewhatthevariouspinsoftheICdo.

Fig.15(a)741opampin8pinpackage Fig.15(b)Internalconfiguration
Inthisexerciseyouwillsimulateanoninvertingopampcircuit.
Theory
For more detail on the theory of opamps and their circuits, consult the IEP Theory
Document. Only a very brief overview is provided here. Opamps have the circuit symbol
shownbelowinFig.16,whichalsoshowsthenamesgiventothethreeterminals.Theyalso
CC
andV
CC

inFig.16.Sometimesthissupplyisunipolare.g.thepositivesupplyis5V,thenegativeone

PartIAIntegratedElectricalProject:Activity1 Page27
IEPActivity1:CircuitsimulationusingLTspice Page27of28

0V, sometimes it is bipolar e.g. 15V. These connections are often not shown in circuit
diagrams,butitisimportanttobeawareofthemsinceinrealitytheopampoutputvoltage
isconstrainedtoliewithintherangeofitspowersupplyvoltages.

Fig.16Opampcircuitsymbol
Asetofassumptions,knownastheidealopampassumptionsareoftenusedtomakethe
analysisofopampcircuitswithnegativefeedbackeasier.Negativefeedbackmeansthata
fraction of the output voltage is fed back to one of the input terminals in a way which
opposes the input voltage. In turn, this means that the voltages at the inverting and non
inverting inputs are always the same, and this is known as the virtual earth principle. In
addition, the input resistance of opamps is extremely high, and so it is assumed that no
current can flow into either of the inputs. Finally, the output resistance of the opamp is
verysmall,whichmeansthatitmaybeassumedthattheoutputvoltagewillnotchangeas
the opamp output current changes. These approximations enable surprisingly accurate
predictions to be made about opamp circuits, and you can use them to analyse the
performanceofthecircuitshown belowinFig.17.Thisisastandardnoninvertingopamp
circuit.

Fig.17Noninvertingopampcircuit
+

+V
CC

V
CC

Output
Noninvertinginput
Invertinginput
+

R
1
R
2

v
0

v
i

PartIAIntegratedElectricalProject:Activity1 Page28
IEPActivity1:CircuitsimulationusingLTspice Page28of28

ThebehaviourofthiscircuitisanalysedintheIEPTheoryDocument,page46.Here,onlythe
finalresultisgiven.
Gain
2
1
1
R
R
v
v
i
o
+ = =
WithR
2
setto1kfindthevalueofR
1
requiredtogiveagainof10:R
1
=k
LTSpicesimulation
1. Set up the circuit shown in Fig.17 using the resistor values you found above. Be
carefulnottogettheinvertingandnoninvertinginputsmixedup!Fortheopamp,
withinthecomponentlibraryclickon[Opamps],OK,andthenscrolltotheendand
click on UniversalOpamp2, OK. Set the positive power supply to the opamp to 5V
andthenegativeoneto0V.Forv
i
choosethestandardDCvoltagesourceandsetits
voltage to 0V. For the simulation itself, perform a DC sweep so that v
i
varies from
1Vto+1V.
2. Plottheopampoutputvoltagevsv
i
andalsothevoltageattheinvertinginputvsv
i
.
Forv
i
between0Vand0.5Vhowistheoutputvoltagerelatedtotheinputvoltage?

Howarethevoltagesattheinvertingandnoninvertinginputsrelated?
Doesthisagreewiththeory?.
Explainwhatishappeningwhenv
i
islessthan0Vandv
i
isgreaterthan0.5V.

..

DrTJFlack September2010,revisedOctober2012
DrPARobertson revisedSeptember2013