You are on page 1of 2

BasicSignalsandSystems

Overview
Oneofthebestwaystolearnthematerialinthiscourseisthroughusingacomputer.MATLABisa powerfulsoftwarepackagewhichisveryusefulforgenerating,processing,andplottingsignals,and insightintomanysignalprocessingconceptscanbegainedthroughusingit.Thisprojectisprimarily designedtogetyoufamiliarwithusingMATLAB. TheprojectBasicSignals,Systems,andtheDFTisidenticaltothisprojectwiththeadditionofaDFT exercise. YoumayfindthediarycommandusefulformaintainingahistoryofyourMATLABsession.Other commandsyoumayfindusefulincludesubplot,orient tall,andorient landscape.Toget informationaboutafunctionanditsusage,usetheMATLABhelpcommand,e.g.help subplot, help filter,etc.

BasicSignals
1. Generateandplot(usingMATLAB'Sstemcommand)thesequence x[n]=(0.95)ncos(/20n) for0n63.NotethatMATLAB'Sindexingforthefirstelementstartswith 1andnot0,soyou willhavetoadjustforthisinyourplot. 2. ThefollowingisasimpleexampleofaMATLABfunctionframpwhichgeneratesanNpoint rampx[n]=nfor1nN.TheinputargumentisNandthefunctiongeneratesthedesired values.
function x=framp(N) % function x=framp(N) % Generates an N-point ramp sequence n=l:N; x=n' ; WriteaMATLABfunction,fcosine,whichwillgeneratethevaluesfromafinitelengthsinusoidA

cos( 0n+)forn1nnf.Thefunctionwillneedatotaloffiveinputarguments:A,0,,n1,andnf.The functionshouldreturnacolumnvectorwhichcontainsonlythedesiredvaluesofthesinusoid.Testyour functionbyplottingtheresultswithA=4,0=/10,=/4,n1=20,andnf=20.

ImpulseResponseandStepResponse
ConsideranLTIsystemwheretheinputx[n]andoutputy[n]satisfythefollowingdifferenceequation (assumeinitialrestconditions):

f2000a1

y[n] 1.85 cos( 18 ) y[n 1] + 0.83 y[n 2] = x[n] + 1 3 x[ n 1]

3. Usingfilter,generateandplottheresponsey[n]for10n100whentheinputisx[n]= [n],theunitimpulsesequence. 4. Generateandplottheresponsey[n]for10n100whentheinputisx[n]=u[n],theunitstep sequence.

SystemFunctions,FrequencyResponse,andPole/ZeroPlots
ThesystemfunctionoftheLTIsysteminExercises3and4isgivenby:
1 1 z 3 H ( z) = 1 2 1 1.85 cos z + 0.83z 18 1+

5. UsingfreqzwithN=512,makeplotsofthemagnitudeandphaseresponses|H()|andH() for0.Specifywhattypeoffilterthissystemrepresents(i.e.lowpass,highpass,bandpass, etc.). 6. Usezplanetomakeapole/zeroplotofallfinitepolesandzerosofH(z).(Hint:Todetermineall finitepolesandzeros,ExpressH(z)inpositivepowersofzbymultiplyingthenumeratorand denominatorbyanappropriatepowerofz.)

f2000a1

You might also like