RC Filter Circuits

download RC Filter Circuits

of 21

description

Investigating the Behavior and Applications ofRC Circuits

Transcript of RC Filter Circuits

  • 1

    RCFilterCircuitsInvestigatingtheBehaviorandApplicationsof

    RCCircuits

    PresentedtotheUniversityofCalifornia,SanDiegoDepartmentofMechanicalandAerospaceEngineering

    MAE1704/24/15

    Preparedby:DavidDittmar,JeffreyWangSectionB07,Fridaymorning

  • 2

    AbstractThisexperimentwasconductedtoexaminetheresponseoflowpassandhighpasscircuitssubjectedtosquarewaveandsinewaveinputs,andalsotoinvestigatetheuseofcircuitfiltersinregardstonoisecancellation.Usingtheresponseofalowpasscircuittoasquarewaveinputthevalueofa691nFcapacitorwasdeterminedexperimentallytobe68.7nF.The3dBfrequencyofourlowpassandhighpassfilterwasfoundbyinputtingasinewaveintothedifferentcircuitsandfindingthetimeatwhichtheratio .Usingthe3dBfrequenciestwobodeplots(oneV in

    V out = 12 forlowpassoneforhighpass)wereproducedinexcel.FinallyusingtheDataAcquisitionSystem(DAS)andtheSignal&Noisevithecancellationofnoiseinacircuitwasmadepossibleusingalowpassfilter.

  • 3

    TableofContents

    PageNumber

    Abstract 2

    Introduction 4

    Theory 5

    ExperimentalProcedure 67

    Results 89

    Discussion 1011

    ErrorAnalysis 12

    Conclusion 13

    Appendices

    Figures 1418

    Tables 1920

    References 21

  • 4

    IntroductionAlowpassfilterisafilterthatallowssignalsatafrequencylowerthanthecutofffrequencytopassthroughwhiledecreasingtheamplitudeofhigherfrequencysignals.Ahighpassfilterworkstheoppositewayitallowshighfrequencysignalstopassthroughwhileattenuatinglowerfrequencysignals.Lowpassandhighpassfiltersareusedinavarietyofapplications,andcanbecombinedtomakebandpassandbandstopfilters(theseallowandattenuatesignalsinacertainrangeoffrequencies,respectively.)Lowpassandhighpassfilterscanbeconstructedinmanydifferentways,includingelectroniccircuits.Inthislab,weconstructalowpassandhighpassfilterusingRCcircuits.Thisisoftendone,forexample,inaudiosystemswherealowpassRCcircuitisusedtoblockhighfrequenciestothesubwoofers.Toinvestigatethesecircuits,wefindtheir3dBfrequencyandusemultiplemeasurementstoplotaroughBodeplot.

  • 5

    TheoryInordertounderstandhowanyfirstorderRCcircuitworksonemustconsiderthedrivingequationsthatrelatevoltageinandouttothecircuitcomponents(resistorsandcapacitors).Tofindtheoutputvoltageduetoastepresponsetheequation isused.Tau()out V in[1 ]V = e RC isthetimeconstantwhichmeasuresthetimerequiredforacircuittorespondtoasignal.WhentauequalsRC( thentheequationbecomes .ThereforeC) = R out V in(1 ) .632V inV = e1 = 0 byknowingthetimeittakesforthecircuittoreach63%oftheappliedvoltagethenthevalueofcapacitancecanbefoundifthevalueoftheresistorisknown( .Ifacircuithasasine)C = R waveinputthentheratioofVoutoverVinisdescribedbytheequation .WhereV in

    V out = 11+(RC)2

    omega()isthefrequencyofthesinewave. Anotherkeyconceptexaminedinthisexperimentisthedesignanduseoffilters.Alowpass/highpassfiltercanbecreatedwithoneresistorandonecapacitorconnectedinseries.Filtersareusedtocutofffrequenciesaboveorbelowacertainfrequency.Infiltersanimportanttransitionpointwhichisdefinedasthe3dBfrequencyisthepointwheretheoutputpowerishalftheinputpower,or .WherethecapacitorisplacedinaRCcircuitiswhatV in

    V out = 12 determineswhattypeoffilteritis.Whenthecapacitorisconnecteddirectlytotheinputvoltage

    thecapacitoronlyletshighfrequencysignalspasssincelowfrequencysignalsallowthecapacitortobecomefullychargedandoncethecapacitorisfullychargedthecurrentstopsrunningthroughthecircuit,thisiswhyitiscalledahighpassfilter.Ontheotherhandwhenthecapacitorisconnectedinparallelwiththeinputvoltage

    lowfrequencysignalsdonotgothroughthecapacitor(sincethecapacitorisfullychargedforlowfrequencies)andinreturnthelowsignalspasstotherestofthecircuitinsteadofchoosingtheoptionofshortcircuitingandgoingthroughthecapacitor.Thisishowwegetthetermlowpass.

  • 6

    ExperimentalProcedurePartI:Focus1InthispartoftheexperimentweconstructaRCcircuitanduseasquarewaveinputtofindthetimeconstantofthecircuitbyobservingitsresponse.WithourmeasurementoftheresistanceR,wearethenabletofindthetheoreticalvalueofthecapacitanceC.ApparatusUsed:Inthispart,weuseaDASNI626connectedtoaPCinordertogeneratesquarewavesignal.WealsouseaprotoboardtoassembletheRCcircuitconsistingofa10kOhmresistorandacapacitor.WeuseaDigitalMultimeter(DMM)tomeasurevariousvalues.Finally,weuseaAgilentDSO1002Aoscilloscopetomeasurethevoltageacrosstheresistor.Procedure:First,wesetuptheRCcircuitontheprotoboard.UsingtheDMM,wemeasuretheresistanceoftheresistor,includingmuchofthewiring.Theoretically,thevalueofRincludesthetotalresistanceofthecircuit,sowewanttoincludeasmuchofthecircuitaspossible.Next,weconnecttheRCcircuittotheDataAcquisitionSystem(DAS)andconnecttheoscilloscopesuchthatChannel1measuresthesignalfromtheDAS(inputvoltage),andChannel2measurestheoutputvoltagesignal,asshownbelow:

    Figure1:SetupofFocus1,takenfromthelabprocedures(seeReferences,inAppendix).ThenusingaLabviewvirtualinstrument(vi),wegeneratea100Hz.5voltspeaktopeakvoltagewaveformastheinputsignalthisisdisplayedonChannel1onouroscilloscope.Notethepeaktopeakvalueofthesignal.Channel2thendepictstheoutputsignal.Usingthecursor(trackingmode),wesetonecursorataminimumintheoutputsignal.WethenmovetheothercursoruntilthedeltaYvaluedisplayedequals63%ofthepeaktopeakvaluewenotedbefore.ThedeltaXvaluedisplayedisthenourtimeconstant.Usingthisvalue,wecanthenfindthetheoreticalvalueofthecapacitorandcompareittothevaluewemeasuredwiththeDMM.PartI:Focus2Inthisportionoftheexperiment,wefindthe3dBfrequencyofourRCcircuit(whichwearenowusingasalowpassfilter),andotherwisecharacterizethefrequencyresponseofthecircuitbymeasuringtheoutputvoltagetoanarrayofinputvoltages.

  • 7

    ApparatusUsed:OtherthanthosementionedinFocus1,theonlyotherpieceofequipmentweusedwasExcelsoftwaretoplotthefrequencyresponseofourlowpassfilter.Procedure:First,westartedwithalowfrequency(100Hz)asourinputsignal.Increasingthefrequencyindecreasingincrements,wecontinuouslymeasuredthepeaktopeak(pkpk)valuesofVinonChannel1(ourinputsignal,generatedwiththevi),andVoutonChannel2.WhentheratioofVin/Voutreached ,notethefrequencythatsthecutofffrequency.Thenwetookthe2 valueofourcutofffrequencyandmultiplieditby[0.1,0.2,0.4,0.6,0.8,1,2,4,6,8,and10].WethentooknoteofbothVinandVout(pkpk)atthesefrequencies.UsingExcel,weplottedthevaluesof20log(Vout/Vin)(yaxis)versusfin/f3dB(frequencyoftheinputsignaldividedbythe3dBfrequency)andsetthexaxistologarithmicscale.PartI:Focus3ByswitchingthepositionsoftheresistorandthecapacitorinourRCcircuit,weconstructahighpassfilter.ThefollowingprocedurethencloselyfollowsFocus2.Procedure:Firstweswaptheresistorwiththecapacitor(andvv),beingcarefultonotetheinitialpositionofboth.Startingwithahighfrequency(1000Hz)anddecreasingthefrequencyindecreasingincrements,wecontinuouslymeasuredthevoltagesinthesamemannerasthepreviousprocedureandobtainedthe3dBfrequency.WealsomeasuredthefrequencyresponseinthesameincrementsandproducedasimilarExcelplot.PartIIInthissectionoftheweinvestigatetheeffectofalowpassfilteronanoisysignal.Apparatus:Weuseadifferentvi(Signal&Noise)togeneratetheinputsignal,butotherwiseequipmentandsetupareequivalenttoPartI:Focus1.Procedure:Ontheprotoboard,weswaptheresistorandthecapacitorsuchthatthesetupisnowidenticaltoPartI:Focus1.Thuswehavealowpassfilteragain.Next,weusetheSignal&Noisevitoconstructourinputwaveform.Weselected5Vpkpkand80HzintheSIGNALportionofourvi,and0.5Vpkpkand2153HzforNOISEportion.Wethenruntheviandobservebothchannelsontheoscilloscope,occasionallyvaryingthepkpkvoltageofournoiseportion.

  • 8

    ResultsPartI:Focus1Theresistorselectedwasmeasured(usingtheDMM)tobe99511Ohms.Thetimerequiredforthecircuittoreach63%ofthe5.16peaktopeaksquarewavevoltagewas684s.Thistimewasdeterminedusingtheoscilloscopeandreadingthechangeinxforachangeinyof3.25V.Thereforethecalculatedvalueobtainedforcapacitancewas68.7nF.Thiswasverysimilartothevalueof691nFwhichwastheDMMmeasuredvalueofthecapacitor.Note:thesoftwareforcapturingscreenshotsoftheoscilloscopewasnotfunctioningwhenwedidourlab,soinsteadwetookphotosoftheoscilloscopescreen.Foranillustrationofourresults,seeFigure3intheAppendix.PartI:Focus2The3dBfrequencyofthelowpassfilterobtainedwas210Hz.Thisfrequencywasobtainedbystartingatalowfrequencyandincreasingtheinputfrequencyinsmallstepsuntil .V in

    V out = 12 Aftermultiplyingthe3dBfrequencyby0.1,0.2,0.4,0.6,0.8,1,2,4,6,8,10thesenewvaluesoffrequencywereinputtedintothecircuitandthecorrespondingoutputvoltageswererecorded.Aplotwasmadeinexcelof vs ,seefigure1.0log( )2 V in

    V out finf3dB

    PartI:Focus3The3dBfrequencyofthehighpassfilterobtainedwas240Hz.Thefrequencywasobtainedthesamewayasinfocus2howeverinsteadofstartingatlowfrequenciesandworkingup,frequenciesstartingfromhighandworkingdownwereinputteduntil .AnotherplotV in

    V out = 12 wasproducedinexcelusingtheexactsameprocedureasinfocus2,seefigure2.PartIIUsingtheSignal&NoiseviinLabViewasignalvoltageof5Vwithfrequency80Hzandanoisevoltageof0.5Vwithfrequency2153Hzwereinputtedintoalowpassfilter.Theoscilloscopewasusedtodisplaytheinputsignal(yellowsignalwithnoise)andoutputsignal(greensmoothsignal).

    Asshowninthisfigureabovethecircuitwassuccessfulatfilteringoutthehighfrequencynoiseandonlylettingthelowfrequencysignalpassthroughthecircuit.Afterchangingthenoise

  • 9

    voltageto1Vthefilterwasjustassuccessfulatfilteringoutthenoiseasbefore(whichcanbeseeninthefigurebelow,thegreenoutputsignalremainssmoothandcontainsnonoise).

    Afterchangingtheinputsignalfrequencyto160Hzthefilteroutputamplitudechangedfrom4.92Vto4.24V(seefigurebelow).

  • 10

    DiscussionPartI:Focus1Asshowninthefollowingfigure(Figure3intheappendix),thepeaktopeakvoltageofthesquarewavesignalisactuallylargerthanthe5voltsspecified,aswellastheoutputpeaktopeakvoltage.Alsointerestingisthefactthatthesquarewaveisnotexactlysquare,butcurvesdownaftertheinitialjump.Obviouslyitisimpossibletocreateaperfectlysquaresignal,soperhapsthelargerpeaktopeakvoltageisintendedtooffsettheslightcurvedownwards.

    Asfortheunitsofthetimeconstant(andthus,theunitsoftimeinoursetup).aquicklooksuggeststhatsincewereusingallSIunits,timeshouldbeinseconds.Asimplecalculationconfirmsthis:

    isdimensionless,Rhasunits andChasunits soRChas/RCt kgm )/(sC )( 2 2 s C )/(kgm ),( 2 2 2 units ,andthereforetalsohasunits .s s PartI:Focus2Itisinterestingtonotethatasthefrequencychanged,theVppofthesignalgeneratedbytheDASchanged.ObviouslytheVppofthefilteredsignalwouldchange,butthefactthattheVppoftheinputsignalchangedreflectsonhowdifficultitistogenerateaconsistentvoltagesignalatdifferentfrequencies.SinceweweremerelyinterestedintheratioofVouttoVin,however,ithadnoimpactonourexperiment.Thefilteringalsohadnoinfluenceonthefrequencyoftheoutputsignalitexactlymatchedtheinputsignal.Therewasaphaseshifthowever:lowpassfilterstendtochangethephaseofthesignal.Also,asyoucanseeinFigure1(appendix),whiletheotherpartsofthegraphareniceandsmooth,thethirdtolastdatapointisalittlebitofananomaly.LookingatTable1(appendix)revealsthatVindecreasedratherdrastically,perhaps

  • 11

    becauseofaquirkoftheDAS.Inanycase,thisdatapointdoesnotinfluencetheprocedureasawholemuch.PartI:Focus3UsingwhatwelearnedinMAE143A(SignalsandSystems),wecalculatedthetheoretical3dBfrequencyofourhighpassfilter:

    Perhapsbecauseofsomeerrorinthetimeconstantweused,itdidnotmatchourexperimentalvalueexactly,butitwaswellwithinthemarginoferror(1.2%error).PartII:Aswesawwhenwechangedthevoltageofthenoisefrom0.5Vto1V,thefilterwasabletofilteroutthenoisequiteeffectivelyandtheoutputvoltagesignaldidnotreallychange.Whenwedoubledthefrequencyofthesignalhowever,thesignalitselfbegantobefilteredout,andconsequentlydecreasedinamplitude.Obviously,thisistobeexpectedofalowpassfilter.Also,therewasaphaseshiftbetweentheinputandoutputsignal.Inallthreescenarios,however,itisinterestingtonotethatthephaseshiftstayedconstant,atleastasfaraswecouldtellbyvisualinspection.

  • 12

    ErrorAnalysisInfocus1thecapacitorvaluewascalculatedusingthetimeittooktoforthecircuittoreach63%oftheappliedvoltageandthemeasuredvalueofourresistor.Errorfrombothreadingspropagatesinourcalculatedvalueofcapacitance.Calculationofcapacitance: 8.7nFC = R =

    684s9951 = 6

    Errorpropagationforcapacitance: C ) )68.7nF .107nF = ( R| |

    R + | | C| | = ( 19951 +

    1684 = 0

    Thereforethetheoreticalvalueofcapacitanceis68.70.1nFTheerrorcouldthenbecalculatedusingtheformula

    rror 00% 00% .78%E = theoreticaltheoreticalmeasured 1 = 68.7

    68.769 1 = 0 ThissmallerrormaybeduetotheresistornotbeingtheexactvalueofwhatwasreadfromtheDMMorapossiblemiscalibrationintheDASoroscilloscopethereforecreatingawrongreadingoftau.Infocus2the3dbfrequencyofthelowpassfilterwasfoundexperimentallytobe210Hzand240Hzforthehighpass.ThecalculatedvalueforthisfrequencycanbeobtainedusingtheratioequationofVo/Viandsolvingforomega.

    1 RC 456.4rad/s ||V iV o || = 12 =1

    1+(RC)22 =1 + (RC)2 = = 1RC = 1(9951)(69nF) = 1

    31.8Hzf = 2 = 2

    1456.4 = 2 f = ) )231.8 .383( R| |

    R + C| |C f| | = ( 19951 +

    169 = 3

    Thereforethetheoreticalfrequencyvalueis2313Hz rror(Low ass) 00% 00% .09%E p = theoretical

    theoreticalmeasured 1 = 231231210 1 = 9

    rror(High ass) 00% 00% .9%E p = theoretical

    theoreticalmeasured 1 = 231231240 1 = 3

    Theseerrorsmaybeduetotheresistororcapacitornotbeingexactlywhattheyweremeasuredtobe.Conclusion

  • 13

    Inthefirstpartofthisexperiment,wefoundthetimeconstantofourRCcircuit,thenusedittofindthetheoreticalvalueofthecapacitorwewereusing.UsingtheDMM,wethenconfirmedthevalue.WethenrealizedtheRCcircuitcouldbeusedasalowpassfilter,andbegantocharacterizetheresponseofthecircuitasalowpassfilter.Wefoundthe3dBfrequencytobe210Hz,thenproceededtogenerateaplotillustratingthefrequencyresponseofthefilter(seeFigure1).Byswappingthepositionsoftheresistorandcapacitor,wethenconstructedahighpassfilterwiththeRCcircuit.Wefoundthe3dBfrequency(boththeoreticallyandexperimentally).Itturnedouttobe240Hz.Wethengeneratedafrequencyresponseplotforthehighpassfilteraswell(seeFigure2).Finally,weexploredarealworldapplicationofthelowpassfilter:toblockhighfrequencynoise.WeobservedtheresponseoftheRCcircuittoseveraldifferentnoisyinputs,andfoundthatitwasveryeffectiveatfilteringaspecificfrequencyrangeofinputsignals.Howithandlesotherfrequencies,however,couldbeinvestigatedinanotherexperiment.

  • 14

    Figures

    Figure1:Illustrationofthefrequencyresponseofourlowpassfilter

    Figure2:Illustrationofthefrequencyresponseofourhighpassfilter

  • 15

    Figure3:Astillimageofouroscilloscopescreen,recordingtheresponseoftheRCcircuittoasquarewaveinputvoltagesignal

    Figure4:Astillimageofouroscilloscopescreen,recordingthecursorsandtheprocessbywhichwefoundthetimeconstantofourRCcircuit

  • 16

    Figure5:Astillimageofouroscilloscopescreen,recordingthescreenusedtofindthe3dBfrequencyofourlowpassfilter(210Hz),aswellasthepeaktopeakvoltagesofourinput(yellow)andoutput(green)

    Figure6:Astillimageofouroscilloscopescreen,recordingtheappearanceofournoisysignal(yellow)andthefilteredresult(green)

  • 17

    Figure7:Astillimageofouroscilloscopescreen,againrecordingtheappearanceofournoisysignal(yellow)andthefilteredresult(green),butwiththenoisemagnitudeincreasedto1volt

    Figure8:Aimageofourcomputermonitor,displayingthegraphicswindowofourvishowingthetheoreticalappearanceofournoisysignal

  • 18

    Figure9:Astillimageofouroscilloscopescreen,againrecordingtheappearanceofournoisysignal(yellow)andthefilteredresult(green),butwiththenoisevoltagereducedbackto0.5Vandthesignalfrequencyincreasedto160Hz(double)

    Figure10:Aimageofourcomputermonitor,displayingthegraphicswindowofourvishowingthetheoreticalappearanceofournoisysignal

  • 19

    TablesFrequency(Hz)

    Vppout(Volt)

    Vppin(Volt)

    21 4.8 4.84

    42 4.84 5

    84 4.82 5.24

    126 4.56 5.32

    168 4.12 5.2

    210 3.76 5.16

    420 2.44 5.16

    840 1.34 5.12

    1260 0.92 4.4

    1680 0.7 5.08

    2100 0.56 5.08

    Table1:LowPassfilterfrequenciesinputtedtoobtainbodeplot(figure1)

  • 20

    Frequency(Hz)

    Vppout(Volts) Vppin(Volts)

    24 0.56 4.92

    48 1.04 5.08

    96 2 5.28

    144 2.76 5.24

    192 3.24 5.2

    240 3.64 5.16

    480 4.52 5.12

    960 4.84 5.08

    1440 4.88 5.08

    1920 4.92 5.08

    2400 4.92 5.08

    Table2:HighPassfrequenciesinputtedtoobtainbodeplot(figure2)

  • 21

    References

    1. Experiment3BRCFiltersandSignalConditioningCircuitsLabProcedure,MAEDepartment,UniversityofCalifornia,SanDiego.October2013