[go: up one dir, main page]

0% found this document useful (0 votes)
71 views22 pages

DSP 1a, 1b

Uploaded by

Gurusreenu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
71 views22 pages

DSP 1a, 1b

Uploaded by

Gurusreenu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 22
S.V, UNIVERSITY COLLEGE OF ENGINEERING, TIRUPATI 50. no Ekeperiment:- 1G): utes Generation _of Continuous Time Signals_| Airo + Te generite a functional Sequence of a Sigral Csine, Cosine, triengular, Square, saustroth and Sine) Using MATLAS “function. Teols Required + MATLAB Softwore, Personal Computer. aa : i the QPreration oF continuous~time Signals involves crest- ing functions thet describe how o Signal evolves over an unbroken range of time: Centinvous-‘time Signals ore -Fundomental in various fields , including. Signal Processing , coritrel Systems ond Cormmunications . a The — continvous- time. Signals are functions ‘that describe. a physical quantity or phenomenon over an Unbroken renge- Sy they ore typically represented by a function aeCt), where t is a feal-valed variable, representing time. 1% Continuous - time Signal: be classified as either Periodic or aperiodic Cnon‘periodic). y, % Rriodic Signals repeat “their tern over time with o Wall defined pericd T tes 2S S.V. UNIVERSITY COLLEGE OF ENGINEERING, TIRUPATI 25..No. ee Yb Contimous—time signals are defined from —s0 “te +5° Some of the genemition of continous time Signals are + @)Sine and cosine signals are periodic and can be generated Using ‘the falknalng envatins : * Sine: weCt) = AsinGnst +) e . * cosine: eet) Acos Gnft+) tohere ~ is Amplitude Fis Frequency $ 1S phase angle by Square wove 1S a periodic Signa] With 2 discrete, valves typically <1 and 1. Sts equation is : 3 BCL) = SgnCsinG@nft)) where @qy is Sign function © Saustesth Love is ancther periodic signal with a linear rise a sudden drop. Its eqution is + eC eT Le] =) here at rate @ © periodic signal , C)= abs(i- y LTT. abs is absclute valse function. © Sine signal er function is given as , aeCt) = Sore ® Exponentially furction is given os; eect) = Ac%* here A (s initial vale. TF &20 ‘then it is growth. IR aco then it is decay. li Tire! ® ee §.V. UNIVERSITY COLLEGE OF ENGINEERING, TIRUPATI page vo. AA i x é @ 4t<° q> Unit step Si ral, UCe) = 4S wos 1 | i tic ho Unit “Impulse Signal also known as Delta Dirac Function . | te, BOO - ct) = r te9 | | Pyesedte, ? , EF | Stort the MATLAB program 2) Open new ™-File: BH pe the progrom, si "2 Save in current directory. 5 Compile and Run the! progrars. > ZLE any enor occuts “in the program , correct! the error and. Fon Hogan, og ees ¢ TW) fer the output, see command window] Figure windows © Stop the progroro. Progrors + ‘} Program for Sine wove t=0:04 ilo; a Y= Sin(a*pi*t) 5 Subplot Cuu.1) 5 Plt Cuyk’)s Sawtocth Wave a a wc) = Se TE) = a 3 i 5 ° 2: a é i Sa wae oe Time, 1 Sine vleve ed 1 a Sintt 4) - Sore 3 eet) = TE os pe en ie 2 < poate ato. aqeol aes 10 Time 1 fal S.V, UNIVERSITY COLLEGE OF ENGINEERING, TIRUPATI -..,... ——————— eelabe| C Time) 5 Ylabel CAmplitude?), EitleC Sing Wave”), } Prograin for cowl woave t= O10 105 Jecost*pieey, : Subplet Cy, %2), Plot hy *K), Relabe] CTime?); 2 geen label Camphiates | BtleC* Cosine Whve’); h Program for Square Wave | t=O :0.001210 5 Ws Grease co). ee Subplot Cu4,3); . Plot Ciuy), Pelabel (Tire); ylobel CAmplitude’); Litle CSquare Wave’): t Pregrarn For Sa th Wave Crontto; | Ur Sustest Ct} Subphet Cut), — Plot (4y,5k)5 melabelC time’) six TT pasa ws NEL eponentiolly erent it) és | 5.V. UNIVERSITY COLLEGE OF ENGINEERING, TIRUPATI! 2, No ylabel CArplitude’)s FitleCSastosth Wave”)s hb Progrars For “Tiangubr tlave £=0%0.0001:20 5 Y= Sarctooth ,.5)5 ‘FSausteoth vith sol. duty Subplot Cu.u5)5 PlotCtay), Selabe| CTiene”); Webel CAmplitude”): tidiooneg apisadDs ‘I Progrars Ror Sine false t= lor 0.01 to; Ya Sinctos aeisCE10 19 -2 21)3 Subplot Cy ,446)5 Plot Ct.y); selabel CeTime’)s label CAmplitude’); title Sing Pulse”); cycle. Ctr angular) b Prograrn for Exeponential Grovsing Signal EON ae es Y= explore); Subplot G45 plot Ctyy)s cocci S.V. UNIVERSITY COLLEGE OF ENGINEERING, TIRUPATI page vo, telabel Ct Time’); tA label Cc-Amplitude’); “title C* Eeeponential Growing Signal’); b Progror “for exponentially decaying signal toro. a=2; WeeepCort); Subplet C448); plot uy); telabelCtime™); label CAmplitude’), title Eeeponential Decaying Sgral”)s t Program, for Unit Step Signal te-S i001 55 Step = [zeres C1, 500) pones C5019] 5 Subplot C49); Plet Ce, step); axis(s 5 0 15); relabel time’); dflabel CAmplitude); tle Cunit Step Signal’): + Progrars for Unit. mpulse Signal t= 1: 0.000115 Jee + [2er9C1,1000),0n€8C1, 1)» zere5C1,1000)] 5 S.V. UNIVERSITY COLLEGE OF ENGINEERING, TIRUPATI 25. Subplot Ch ty10)5 Plot Ce, impulse) Belabel (* Time”); Ylabel CAmplitede”): oeeis(Ea a 0 2); Eitle CsDmpulse Signal’); Result + whos, the Fogroms for continvous ‘time Signals were preg} a @eecuted Success Full; ad VSing «MATLAB and the results a plotted. —_ §.V. UNIVERSITY COLLEGE OF ENGINEERING, TIRUPATI pace no Eéeperimnentt= 1Cb) Date + Generation of ‘Discrete “Time Signals Air To generate a discrete time Signal sequence Cunit step, Unit ramp, Sine, Cosine. 2 8aeponenttial, Unit impulse) using MATLAB Fonction. “Tools Required : MATLAB Softunre Fersonal Cornputer Theory + Discrete time signals are defined only ot Specific, isolated time instances ©r) discrete tine Points. Time is represented OS Wteger Values and denoted as ‘nm’. os [Hh]. Discrete time signals have Finite precision as ‘they ore defined only at discrete time points Sorne of the generation of discrete-time Signals are + 99 Sine _Signal + ef] = Asin Gipl*fn T+ Pht) — « b> cosine, sgnal + RIN} = Acosamfn T+) where A ts amplitude TiS Sampling period. Fie Frequency 1S Sample Indes $ is phase angle: S.V, UNIVERSITY COLLEGE OF ENGINEERING, TIRUPAT! 2:01 (0. © Square save signal con be genemited by teggling betoeen ‘two Valves. 4 Smoteoth can be genertted Using a linear ramp or modulo operation. © Tranguler Signal 1 Similar-to Sausteoth wove byt hos o Sypometric triangular shape. Sime Fonction is defined as rel] = Frac {sin th} fr} sory e{n]= _Sintm ™ ® Exeponerstially Growing Signal , xefn] = Aee?T hy Exponentially ‘Decaying Signal, cet] = AST where. *® As initial value a is Groth rate | ~2 19 decay rate © Unit step signal , moa= fh nz0 ©, n--7 IVERSITY COLLEGE OF ENGINEERING, TIRUPATI page no Brocedure + 19 Start. the MATLAB Programs 2) Open new M-File- 3) Type the Progrars Save in currerit~ directory. Compile and Run the proprorn wD SD 2. Et ony errors occur in the Program , correct: the error ard run HE opein 1 For the output, see Gonroand loindow/ Figure voindow & Stop the. programs Program + - x gaia bh Pregrars For Sinuscidal sequences, ele; clear all; Close oll; n= ©: piio 12*pts, Y=Sinen); Subplot Cu, us StemCny)s zlabel (on --->Ds Uebel Comp--->9 Btle (‘Sinusoidal Signal”)s Z=costn)s a oa oP Exeponential Signal ‘ ; E é aeqny's' EAM" 470 grousing! See cpotasley §.V. UNIVERSITY COLLEGE OF ENGINEERING, TIRUPATI page no Subplot C444), stemn,2)5 welabel C+m ~~ ->2); label C= eo glebel Carnp— 2h Ete cosine. Signal): hb Progrars For Sqrore Signal N=0tpihoraxpi ‘ P= squerechy; Subplet Cu,4,3), Stemcrp); * eelabel Csn- ~~ 59); Ylabel Cramp--—>)5 BtleCspoe Sipal): “h Progran For Savctouth signal N=o:pi/io .a™pi 5 a = SaustoothCn)s Subplt Gui.) s stem (qs fp ei, eelabel Con -— ; label Camp -~~>9)5 title CSauter Spr; eS ~piangitlar Signal mW eyayep DL sone '-r is, Time period amp---7 3 ° xs i\5] SubplstC4,5)5 Stem Cords eebbel Cn --5»), Ylabe| Carp --—>); title Cine Sigel): Te Program er Eisponential Signal N=010.2:95 S=exptn); SubplstCu, WS8)5 Stem(n,s) 5 lobel Gn ~~), lake] Camp -i-—7’) titleC ceeporlentidl Signal’): th Prograny for THanguler Signal! NE-Sio5 155 width = 55 Tatripuls Cn width) ; Subplet a1) Stem Ch); eelakel Cn--- > oS Ylabel Camp >); title Trangular Signal’) h Progrars for Unit Ramp Signal N= O10.5 +955, Tampen 5 app terpenes S.V. UNIVERSITY COLLEGE OF ENGINEERING, TIRUPATI! PageNo. subplot C4.4,8)5 Stem Cn,romp)> telabel Cen-- ->’)5 Ylabe | Camp ~~~) tle C Ramp Signal”): th Prograry for Unit Step Seqence. N="S10.5 +55 Step = [zeros C110), onescuti)] 5 Subplst CuO; Stern Cn, step); telabel (en __ Ylobel Carmp--->); *ssCL-5 5 © 1.5]); Hitle Unit Step sequence’); th Prograro fr Unit “Empuke Sequence N=-lsOA sls Tinpuled = TeeresCii0) ones Cit), zeros Cit0)] jot Cy hylo)s, Stem Cn, Impulse); tlabel C¢n--—5>), Ylebel Ctamnp_~->)5 pero Eee §.V. UNIVERSITY COLLEGE OF ENGINEERING, TIRUPATI p25. o. a ne 5 aeis(t2 2 023); Ree : Reg bitle CcOnit: Impolbe Sequerce’) 5 ct R 4 esult + a thes, the Programs for discrete time Sequences are eee, 4 oe ee tech Successfully Using MATLAB and the rewlts plotted. » oO co Ye? > : > o e & »

You might also like