opamp supplementary
TRANSCRIPT
Opamp supplementary Author(s): Fred-Johan Pettersen
Oslo University Hospital HF Last saved: 21/02/2020 08:24:00 OpampSupplementary-v5.docx
Page 1 of 11
OpampsupplementaryFred-JohanPettersen1,21OsloUniversityHospitalHF,DepartmentofClinicalandBiomedicalEngineering,Norway2UniversityofOslo,DepartmentofPhysics,Norway
AbstractAverybriefsupplementarytotheofficialsyllabus-definingliterature.Thissupplementaryisdescribingoperationalamplifiersverybrieflyalongwithsomenicecircuits.
Keywords:opamp,circuits,FYS4250,FYS9250,FYS3240,FYS4240
1 Introduction
1.1 Whythissupplementary?Ademandforabriefsupplementarytoothersourcesofknowledgeaboutoperationalamplifiers(opamps)hasbeenvoiced,andthisisanattempttomakesuchasupplementary.Itisonlyintroductory,andisbyanymeannotaimingtobeareferencedocument.Thereareliterallytonsofbooksthatcoveropampsbetter,morethoroughly,moreelegant,andsoon;sogoaheadandstudythesubjectmoreifyoulike.Ifyouonlywantonebookonelectronics,andonethatcoversapracticalapproach,youshouldconsiderTheArtofElectronics,thirdedition,byPaulHorowitzandWinfieldHill(https://artofelectronics.net).Ifyoujustwanttolookatsomecoolopampapplications,trythis: https://en.wikipedia.org/wiki/Operational_amplifier_applications.
1.2 Whyopamps?Mostphysiologicalquantitieswewanttohavealookatstartasaphysicalquantity-utterlyuselessandinaccessibleforthephysician.Butdon'tdespair-therearewaysoftransformingthephysicalquantitiestosomethingthatcanbedisplayedonascreen.Thewayittypicallyhappensislikethis:
1. Physicalquantity.2. Transducerconvertphysicalquantitytoanalogueelectricalquantity=>Current,voltage,
charge,etc.3. Processingofelectricquantity:
a. Transformationbetweenelectricalrepresentations(current,voltage,charge,etc.).b. Amplification.c. Summation.d. Filtering.e. Othermathematicalstuff.
4. Conversionformanaloguerepresentationtodigitalrepresentation.5. Processingbycomputer.6. Displayofresult.
Itisintheprocessingoftheanaloguesignalsopampsplayanimportantrolesinceopampswithafewexternalconnectionsandcomponentscanperformmostrequiredmathematicaloperationsonthesignals.
Opamp supplementary Author(s): Fred-Johan Pettersen
Oslo University Hospital HF Last saved: 21/02/2020 08:24:00 OpampSupplementary-v5.docx
Page 2 of 11
2 LawsandverybasicintroductorystuffInmuchthesamewayaswehavetoobeylaws,electronshavetoobeylawstoo.Themostimportantonesarepresentedhere.
2.1 Ohm'slaw ๐ = ๐ ๐ผ (1)Anyresistorwillbehaveaccordingtothislaw.Thepositivesideis,bydefinition,wherethecurrententers.Theimpedance(ZR)ofaresistorisalwaysthesameasit'sresistance,R.
2.2 Kirchhoff'sfirstlawThesumofallcurrentsintoanodeiszero.
Thissimplymeansthatchargeisconserved,andthatanelectricnodecannotstorechargeinanyway.
2.3 Murphy'slawWhatcangowrong,will.
Justforfun.Butthereisatouchofexperienceheresayingthatitisimportanttokeepcircuitsassmallandsimpleaspossible.
2.4 ThecapacitorIfyouknowanythingaboutcapacitors,pleasedon'treadthissinceitisaveeeeerysimplifiedviewofhowwecanuseacapacitor.OK,soyoudon'tknowmuchaboutcapacitors.That'sfine.Hereistheinformationyouneedtoenableyoutoreadthistext.Someusefulformulaswhenlookingatthecapacitorinthetimedomain: ๐ = !
" โซ ๐ผ๐๐ก (2)
๐ผ = ๐ถ #$#% (3)
Equations2and3arereallythesameequationsaftersomefiddling.Thereshouldofcoursebeaconstantinequation2,butit'sleftoutforsimplicity.TheequationsshowthattherelationbetweenUandIissomewhatdifferentfromtherelationforresistorsasdescribedbyOhm'slaw.Asforresistors,thepositivesideofthevoltageacrossthecapacitorisonthesidethecurrententers.Ifweconsideracapacitorinthefrequencydomain,ithassomefunnyproperties.Itturnsoutthatthecapacitorcanbeseenasadevicewithfrequencydependentimpedance.Impedanceisanexpansionoftheresistanceconcept,andanimpedancevalueisactuallyavectorintheimaginaryplane.Weareonlygoingtoconsiderthevectorlength,orimpedancemagnitudehere.Thefrequencydependenceofthecapacitorimpedanceisgivenby
Opamp supplementary Author(s): Fred-Johan Pettersen
Oslo University Hospital HF Last saved: 21/02/2020 08:24:00 OpampSupplementary-v5.docx
Page 3 of 11
|๐"| =
!&'("
. (4)Theessenceofequation4isthatthecapacitorishavinghighimpedanceatlowfrequenciesandlowimpedanceathighfrequencies.Thisissummarizedintable1alongwiththeimpedanceoftheresistor.
Device DC(f=0Hz) Lowfrequency Highfrequency Infinitefrequency|๐๐ | R R R R|๐๐ถ| โ High Low 0
Table1:Impedanceforresistorsandcapacitorforsomefrequencies.
3 Theopamp
3.1 TheidealopampTheopampisadevicemadeofanumberofothercomponentsliketransistors,resistors,andcapacitorsneatlypackagedintoasmallpackage.Fourourconvenience,suppliersofopampsmaketheminavarietyofsizesandwithavarietyofcapabilities.Thebasicopampisathree-pindeviceasshowninfigure1a),whileinrealityithasatleastfivepinsasshowninfigure1b).Wewillusethethree-pinsymbolforsimplicity.
a)Opamp,threepinsymbol. b)Opamp,fivepinsymbol.
Figure1:Opampsymbols.Thebasicfunctionisdescribedbyequation5 ๐)$* = ๐ด+(๐,-. โ ๐,-/) (5)whereUOUTistheoutputvoltage,UIN+isthevoltageatUIN+,UIN-isthevoltageattheUIN-,andADisthedifferentialgain.ADistypicallyverylarge,solargethatitispointlesstousetheopampwithoutanyformoffeedback.ADcaeasilybeintherange1000to1000000,andiscommonlyexpressedindecibels1.
3.2 CMRRandPSRRSinceopampsarenotideal,wehavetolookatsomemorefeatures.Fromequation5,wecanbeledtobelievethatopampsareignoringcommonmodevoltages.Well,theyusuallydoaprettygoodjobatit,buttheyarenotperfect.Acommonmodevoltageasavoltagethatispresentonbothinputs.Asaresult,wehavetoexpandequation6abit,andget:
1Decibelisalogarithmicscale,andforsignalvalues(notpowervalues),itisdefinedas๐ด#0 = 20๐๐๐!1(๐ด).
Opamp supplementary Author(s): Fred-Johan Pettersen
Oslo University Hospital HF Last saved: 21/02/2020 08:24:00 OpampSupplementary-v5.docx
Page 4 of 11
๐)$* = ๐ด+(๐,-. โ ๐,-/)+๐ด"2 6$#$%.$#$&
&7 (6)
whereACMisthecommonmodegain.ACMisusuallyverylow,andcaneasilybelessthan0.01.Sinceweareinterestedinknowinghowmuchthecommonmodevoltageisrejected,weareusuallytalkingabouttheCommonModeRejectionRate(CMRR)whichusuallyisexpressedindecibels,andgivenby ๐ถ๐๐ ๐ = 3'
|3()|= 20๐๐๐!1 6
3'|3()|
7 ๐๐ต. (7)Asignalonthepowersupplies2mayalsobetransferredtotheoutput.Onceagain,wehavetoexpandtheequationdescribingtheopamp,andget ๐)$* = ๐ด+(๐,-. โ ๐,-/)+๐ด"2 6
$#$%.$#$&&
7 + ๐ด56๐56 (8)whereAPSisthegainofasignalonthepowersupplyandUPSistheunwantedsignalthatliesontopofthepowersupplyvoltage.Theratioofrejectionisofinterest,andsimilarlytoCMRR,PowerSupplyRejectionRate(PSRR)isgivenby ๐๐๐ ๐ = 3'
|3*+|= 20๐๐๐!1 6
3'|3*+|
7 ๐๐ต. (9)
3.3 SomeotherpropertiesSomepropertiesoftheopamparepresentedinthetablebelow.
Property Idealopamp Real-worldopampInputimpedance Infinite. Veryhigh.
Outputimpedance(outputisseenasavoltagesource) Zero. From1Wto100W.Differentialgain Infinite. Veryhigh.
Commonmodegain Zero. Verylow.Powersupplygain Zero. Verylow.
Bandwidth Infinite. Finite.Noise Zero. Yes.
Table2:Opamppropertiesforidealandreal-worldopamps.
4 Somecoolopampcircuits
4.1 AnalysisAnalysisiflefttothereaders3.Tosimplifyanalysisofasensibledesignedopampcircuit,therearetworulesofthumbthatwillmakeiteasy:
โข Thevoltagesonbothinputsareidenticalifsomesortoffeedbackisused.โข Therewillnotflowanycurrentintotheinputs.
Theserulesofthumbapplyforallcircuitshere.Thetwomostcommonwaytodescribehowacircuitisprocessingasignalareanoutputfunctionorbyatransferfunction.Anoutputfunctionsimplystateswhattheoutputis,anda
2ThesignalistypicallynoiseorinterferenceaddedtothepureandsomewhatidealDCvoltageonthepowersupply.3Lecturersandauthorsjustlovethissentence.Firstofall,it'sfun,andthenit'saquetotheseriousreaderthatthisissmartifshe/he/itwanttolearnthestuff.
Opamp supplementary Author(s): Fred-Johan Pettersen
Oslo University Hospital HF Last saved: 21/02/2020 08:24:00 OpampSupplementary-v5.docx
Page 5 of 11
transferfunctionmustbemultipliedbyaninputsignal.Forexample,equation10isanoutputfunction,andequation11isantransferfunctionofthesamecircuit. ๐)$* = ๐,- 61 +
7,7-7 (10)
๐ป = $./0
$#$= 1 + 7,
7- (11)
4.2 Non-invertingamplifier
Figure2:Non-invertingamplifier.
Parameter Value/Description
Transferfunction ๐123๐45
= 1 +๐ 6๐ 7
Inputimpedance Veryhigh.Outputimpedance Verylow.
Pros Notinverting.Cons Gainunder1impossible.
Table3:Opampcircuitpropertiesfornon-invertingamplifier.
4.3 Unitygainbuffer
Figure3:Unity-gainbuffer.
Parameter Value/Description
Transferfunction ๐123๐45
= 1 +0โ = 1
Inputimpedance Veryhigh.Outputimpedance Verylow.
Pros Buffer.Cons Mayaddnoise.
Table4:Opampcircuitpropertiesforunity-gainbufferamplifier.
4.4 Invertingamplifier
Opamp supplementary Author(s): Fred-Johan Pettersen
Oslo University Hospital HF Last saved: 21/02/2020 08:24:00 OpampSupplementary-v5.docx
Page 6 of 11
Figure4:Invertingamplifier.
Parameter Value/Description
Transferfunction ๐123๐45
= โ๐ 7๐ 6
Inputimpedance =R1Outputimpedance Verylow.
Pros Largerangeofgainpossible,evenbelow1.Lowoutputimpedance.
Cons Inverting.Lowinputimpedance.
Table5:Opampcircuitpropertiesforinvertingamplifier.
4.5 Integrator/low-passfilter
Figure5:Integrator/lowpassfilter.
Parameter Value/Description
Outputfunction ๐123 = โ1๐ถ6+๐ผ45 ๐๐ก = โ
1๐ถ6+๐45๐ 6
๐๐ก = โ1
๐ 6๐ถ6+๐45 ๐๐ก
Inputimpedance =R1Outputimpedance Verylow.
Pros Largerangeofgainpossible.Lowoutputimpedance.
Cons Inverting.Lowinputimpedance.
NeedR2orsomeotherformofdischargingofC1topreventbuild-upofcharge.Table6:Opampcircuitpropertiesforanintegrator/low-passfilter.
Asanexercise,lookatthetransferfunctionfortheinvertingamplifier,andthinkofthecapacitorasanimpedancewithvaluesthatvariesaccordingtotable1.Whichfrequenciesareletthrough,andwhicharestopped?
4.6 Derivator/high-passfilter
Opamp supplementary Author(s): Fred-Johan Pettersen
Oslo University Hospital HF Last saved: 21/02/2020 08:24:00 OpampSupplementary-v5.docx
Page 7 of 11
Figure6:Derivator/high-passfilter.
Parameter Value/Description
Outputfunction ๐123 = โ๐ 6๐ผ45 = โ๐ 6๐ถ6๐๐๐๐ก
Inputimpedance Capacitive.Outputimpedance Verylow.
Pros Largerangeofgainpossible.Lowoutputimpedance.
Cons Inverting.Capacitive/lowinputimpedance.
Table7:Opampcircuitpropertiesforaderivator/high-passfilter.Asanexercise,lookatthetransferfunctionfortheinvertingamplifier,andthinkofthecapacitorasanimpedancewithvaluesthatvariesaccordingtotable1.Whichfrequenciesareletthrough,andwhicharestopped?
4.7 Logarithmicandexponentialamplifier
Figure7:Exponentialandlogarithmicamplifiers.
Parameter Value/Description
Outputfunction ๐123 = โ๐ 6๐พ exp(๐45)
๐123 = โ๐พ ln7๐45๐ 68
Inputimpedance Low=R1
Outputimpedance Verylow.Pros Coolcircuits.
Lowoutputimpedance.Non-lineareffectsmaybeuseful.
Cons Inverting.Inaccurateandtemperaturedependent.
Lowinputimpedance.Table8:Opampcircuitpropertiesfortworelatednon-linearcircuits.
Sinceitmaybethatareaderdoesnotknoweverythingthereistoknowaboutdiodes,equation12describingthevoltage-currentrelationofadiode:
๐ผ+ = ๐ผ6 >๐/'890 โ 1@. (12)
Opamp supplementary Author(s): Fred-Johan Pettersen
Oslo University Hospital HF Last saved: 21/02/2020 08:24:00 OpampSupplementary-v5.docx
Page 8 of 11
Ifwesimplify,andacceptthattheconstantsarejustoffsetsandannoyingnumbers,wecanreduceequation12tosomethingmoreuseful,asshowninequations13andequation14. ๐ผ+ = ๐พ๐$' (13) ๐+ = ๐พ๐๐(๐ผ+) (14)Thismeansthatwecanimplementthefunctionsln ๐and๐8 .Andsincewecandoaddition(sesummingamplifierbelow),wecanimplementmultiplicationsince๐9: 3.9:0 = ๐ด๐ต.Howcoolisthat?
4.8 Summingamplifier
Figure8:Summingamplifier.
Parameter Value/Description
Outputfunction ๐123 = โ๐ :9๐;๐ ;
Inputimpedance =RnOutputimpedance Verylow.
Pros Largerangeofgainpossible.Lowoutputimpedance.
Cons Inverting.Lowinputimpedance.
Table9:Opampcircuitpropertiesforsummingamplifier.Itispossibletoadjustgainofeachinputbychangingthevalueofthecorrespondinginputresistor.
4.9 Differentialamplifier
Figure9:Differentialamplifier.
Opamp supplementary Author(s): Fred-Johan Pettersen
Oslo University Hospital HF Last saved: 21/02/2020 08:24:00 OpampSupplementary-v5.docx
Page 9 of 11
Parameter Value/DescriptionOutputfunction ๐123 =
๐ 7/=๐ 6/>
(๐? โ๐@)
Inputimpedance = ๐ 6/> + ๐ 7/=Outputimpedance Verylow.
Pros Lowoutputimpedance.Accurateifgainislow.
Cons Lowinputimpedance.Largeerrorifgainishigh.
PoorCMRR,especiallyifgainishigh.Table10:Opampcircuitpropertiesfordifferentialamplifier.
4.10 Instrumentationamplifier
Figure10:Aninstrumentationamplifier.
Thisisabeauty,soitwillbeexplainedinabitmoredetail.Thecircuithastwostages,andtheinputstageisprovidingdifferentialgainandhighinputimpedance.Ourruleofthumbsaysthatthevoltagesontheopampinputsareidentical,whichmeansthatU+andU-arethevoltagesoneachsideofRG.I1cannowbecalculated ๐ผ! =
$&/$%7A
(15)Sincenocurrentsareflowingintothe-inputsofthetwoopamps,weknowthatI1ispassingthroughtheresistorchain,andwecanuseOhm'slawtocalculatethevoltageacrosstheresistorchain ๐/& โ ๐.& = ๐ผ!(2๐ 3 + ๐ ;) =
$&/$%7A
(2๐ 3 + ๐ ;) (16)SincethevoltageacrosstheresistorchainisthesameastheoutputofstageI,wecandosomefiddlingonequation16,andweseethatthedifferentialgainofstageIisgivenby ๐ด+(6%=>?,) = 1 + &7B
7A (17)
SincethecommonmodevoltageontheoutputofstageIisthesameastheinput,thestageIcommonmodegainis1.NowthatwehaveanicelyamplifiedinputsignalavailableafterstageI,wewanttogetridofthecommonmodevoltage.ThisisdoneinstageIIbyusingadifferentialamplifierwheregainissetto1(orcloseto1inordertoreducenoiseanderrorandsuch).Notethatthereisapincalled
Opamp supplementary Author(s): Fred-Johan Pettersen
Oslo University Hospital HF Last saved: 21/02/2020 08:24:00 OpampSupplementary-v5.docx
Page 10 of 11
UREF.Thisistypicallyplacedatsomereferencelevellikeground,butitcanbeanyreferencelevelyouchoose.ThepointisthattheoutputvoltageUOUTisrelativetothis.Theoutputfunctionisthen ๐)$* = (๐. โ ๐/) 61 +
&7B7A7 (18)
relativetothepotentialonUREF.Bothstagescombinedwillthen:
โข haveverylowinputimpedance.โข haveadifferentialgainwhichcanbesetbychangingRG.โข haveaverylowcommonmodegain.โข beadifferentialamplifieronsteroids.
Luckyforus,therearealoadofthesecommerciallyavailable.
4.11 Activefilterexamples(Sallen&Key)
Figure11:SallenandKeyfilters.Thetopcircuitsalow-passfilterandthebottomcircuitisahigh-passfilter.
Asanexampleoffiltersusingopamps,theSallen&Keyfiltersarenice.Thesearesecondorderfilterswithanopampamplifier.Theycanbebothlow-passandhigh-pass.Itisverycommontousethesamevalueonbothresistorsandbothcapacitors.Moreinformationhere:https://en.wikipedia.org/wiki/SallenโKey_topology.
5 AmoreaccurateanalysisoftheinvertingopampcircuitTherulesofthumbcanbeabitfrustratingforsomeofyou,sohereisamorethoroughanalysisforonecircuitjusttoshowhowitcanbedone.Similaranalysescanbedoneforallcircuits.Theequationsthatdescribethecircuitare ๐8 = ๐)$* + ๐ผ,B๐ & = ๐)$* +
$#$/$.CD7,.7-
๐ & (19)and ๐)$* = โ๐8๐ด+ . (20)Byinserting20into19,weget
Opamp supplementary Author(s): Fred-Johan Pettersen
Oslo University Hospital HF Last saved: 21/02/2020 08:24:00 OpampSupplementary-v5.docx
Page 11 of 11
โ $./0
3'= ๐)$* + ๐,-
7-7,.7-
โ ๐)$*7-
7,.7- (21)
whichcanbemanipulatedinto $./0
$#$= โ 3'7-
3'7,.7,.7-. (22)
IfweassumethatADisverylarge,sayโ,thisreducestothefamiliarform $./0
$#$= โ 7-
7,. (23)
IfweassumethatADisverylarge,andthattheoutputiswithinreasonablelimits,equation5tellusthattheinputsmustbeveryclosetoeachother,andifADapproachesโ,thepotentialdiferencebetweenUIN+andUIN-approaches0.