Solutions for HW_2

Solutions for HW_2 - At: (a) )(Cn‘fivmlz...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 6
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 8
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: At: (a) )(Cn‘fivmlz ixi‘xlvfln—JJ WM _7 = i an~11= \fEn] wow “En—5.3 “ea 5 [.9 n'rta,n4o _‘ o o (375 0 Q3} anJ-arr fin}: Avfn] + an—t‘j n D l :1 3 n7 - 1En3*\ffln] O 1 '5 a o o 5 a. - -J. -1 U l "1- 3 4 S b n 3 (c0 3 (D 32 32 i a ‘5'1 .51 0o 2 4 e E)0 1 2 3 4 n n x[|"]‘\"[|"|] T M h 0') ("K n \u/ $1.10 (a) {2mm Pmucm HQ) uCnl‘FuCfl-l: n-H -Q€D xCrflr‘srxfln}: n 83:— n45) KCHE"? xcnj: =n+| Fur- gush; he 7:: I)“: '3' an3=- 2 .— a n3 baa} a?) n-H «For (bani B 51.:0 (A) Conhnucd erQéE Kiln} = a ‘For' n > :3 gym", XLnl‘EXCflE :- “LHE‘IE'HLHB on!) wk{m n E? (15‘) =5 (50 .1): in 6 15 4 1.0 'E' 'E' '5: fl 2 5 o ' o D 5 10 O 5 10 15 20 n n 'flw. Mccr'lab f‘cs‘ulfi Had-ck guns». Pf‘tdatm G. parl- I1- M‘fckeg "Phi: Cmvo‘lwigfi 0%) Mo 5111') mla .Pm— clans? 1J3 See-14w. {unmet-:11 in Pru‘akn 3J0 derd‘in‘ TL; ‘ numer'fco' cannuluJ-Ibn a]?- ‘lnRfiH-t clum‘hbn gig-“ml; (9)1 (91 o 5 1o 15 20 o 5 1o 15 20 (61.5 n n 1 E )\ 0.5 ' o 5 1o_ 15 20 ‘ I'I LE‘F- xfnfia Slim-3 (Luci UEH3=Janj , 'T‘wen fomgfl a?qu Kim-0+ . raskfifl = Q5“: 525'“) 59153 - .1s(,S"*3-.ns"“3 uCfl+'U +,mS (fin—.35“) tin] = . 5"(.D.S #573 +495) 1- .DS“(-.OL:IS+.18'1§-.1353 £3.- 11; o h [n+1] -. 75!. [Mr] +. India} :0 ‘Fur' nzo -.S'"‘(.5—~.15') +.;>s“**(—.as+;1s) 'Fcr 0:" -= 9.355 far n=.-‘1 :3: O “For {Va-3» I fiercFem) him-33H .15" +Cn+fl +II93-fon]= 0.95 901+ I] [pk \. Ek Si‘fiswpic 3 ’Tke e % 9|».th .On Q) E TR: PCSth 'Erunt; K0.5 r _ USInj ({Qur artT‘kg 34m: «.5 "145951 0 0 5 1o 15 20 Rama 5. Paw-T-(Ex) 22.20 Lad.ch ;; + ,L 1: 0L1- +R~ ('91 C :xtt) [D Léfi‘ifi‘) flag—t: + 3m: 0%) 5U“ air 0” (a). Vegan—— 4:; Tm)», go ' Ld‘vaijr‘) an " “1%? ‘P titty: % mm 1115' C0») dig) n: 1555* (5.11 (rt) +~ Rafi-15611)) + 6—. ‘51- écosét) _ 4.51%(21333 1 . (Lam : .15 5.5: (5;, (3.1) + was (1r)).,se:-=* (_;I cum» my} -.sa-5*cacusm—45Intm3 are?” Gasman—)- Eccaflafl} S‘U-LS‘}T"-m+‘bfi «9 fits: a):mean and “IPv1 admin UH) 1km T’ke AFFFGNF‘HOI‘ fcbuafim we“: 6"”smbfl [.25 + 2.1 +9. -4j+€“5:°s(1‘t)ES““ ’3'] ‘L 6' sN'fiBE—Js-‘B +e."s*cos@r)[—l +20 + 6*“ 5" smut) (9.353 + 6—5:;05 (3.1“)(EJC?) : 0 SD/ Aflffflrfiml €1ufl+ffi~ 'I'S. sadfisfit-J. Also, Tswt bulufi'lhh "Far- :jL-P) Sm¥1sfit3 Th. Wrintfij (NEIFN la) a- n-I- _ ( [n+2] aagyyl+alin§ + EC +1 3%.] +qfllsflflfl 39a?» + SEW] ("r a) + 3 [n1 ( '. Jr €151.35) =T‘xm WILT'L- T1“ «jEnJraQ‘ L‘i UCnH] + ORHJSjL-n] =6“ Kfn] (if-0'3 =2} and 3C1] *Ufoj 4413(0) _- Q. 1 pl) mr‘L T= has I Ufin +1") — ms 313+?) +0.95% 3&1: 0.05xfn] fife]: a aml 3C1]: 9.05 flu: FDHULJI'I‘j C? Manna; COL“ 5-1.. “Sta TC: Ciltmlc-R 14"“- ckrfmwmhafi‘lmn win-tn Taofl. ' '1' = 0.1; n = [T-2 1-‘1‘+4.25*T*T]3 b - [D O 0],: ya - [2 2+T] :0 = [CI 0]; n - 2:10:11; 3 - zerastl,langth{n}}; $1 = racurta,h,n,x,x0.yfl]; 1'1 I {1'9 1'1]: ' n1 - 0:100; iuhplutl211},p1ot{n1,y1, '9‘]: Time {sec} i 5 *1, xCJ’HvLfl =9 $.30 R”— - am For“ 4212's, neawm= 941). = ask-*2. l Jr+1 For 0 ii 5' ‘; >¢d~3+flfi= flan «limbs +5 MA = 312+; I. ‘2. Far I 5* =51,» ufiwtd’): j 1:1)». 331a). +J¥1k= 4*” t-i I For $25.5: E3, xtfiawtsfi =f1du= FH'FIB 3:4 For 1-2.3! xcfiwqu) =— :3 134(1) Buthsystenuhnueimpulserespmaa 2", tea. [b] Mr]=e"*e" = :2", 1* an {a} The inpuumnpm difi‘eremial equation ufthe REC cirmit is fit) + m = 1'17!) = -vm+ rm = —[Hr}+y(r}]+ r0} uflfifihcanherewfiflnnas H!) + ZfifHflf} = xiii} Using III; fimctinn file de4fifunc containing the Wadi: functinn dY = de4_func[t,Y} dY=zer05{2,1}F dfillflYIEI: dY{EJ=*2*Y[2}~1E1}+sin{tl; andflmhdATLABlnugmm tspan = [D 13]; TU = [U D]; It,Y]=ade45{flde4_func,t5pan,YU}; plot{t,¥{:,1},'.'} - xlabel 1' ‘Time {sec} ‘Ir ylahelf'yItl‘} 13+ (:1) Con'é'lhued we obtain the following outwt response.- arm [d] The dimetimd inptflimnput equation is fln+2]—2)T;£n+l]+y[n]+2){n+g-fin]+l{n]:x["] fin+2]+{2r—2} y[n+1]+[1—2T +14] m] = 194:2] When T- 0.1, the dismatized eqlmion becomesyfn+2l—l.8}{n+l]+0.31y[n}=0.fllx{n]. Replacingnby "-2 givesfln]—l.fly[nfltj+fl.31}{n—2]=D.flh{n—2]. The MATLAB prom for computing the approme output response using recur is a=[—1.B D.Bl]:b=[0 0 .01]; FU=EU 01:30=[0 0]; n=0:100; x=3in{.l*n]: y-recur {a,b,n, and). ya),- plot{.1*n,y. 'o'} The response is plofled below using o's, along with the plot obtained in Part (c): 1 9.546%) “fit-lured Theplot inwsflmthe-appl'ofimefiomuemycloee. (e) 'I'hemotrospmsooanbefoundusing theSymholio Math Toolbox usingtheoommand Fdsolve E 'D2y=-2*Dy-y+sin{t} ‘, 'Dy[0}=fl' .. 'yim=0') whiohgives y = 1f2*exp {-t}+lf2*expi-t}*t-1l2*cosit} ThosymbolioaohjtionoanbeplouedovertheitumaiDfitsfibyusingthecummmd ezpletw, [0 51). Themultisplottedbeiowasasofidmalonguifllthereapmsesfmrdixmm (fimfiflf {La 0.4 '0 1 2 3 4 5 B T B 9 10 From this plot it is seen that the approximation generated in Part (a) is It'it'tuallg.r the same as the exact solution while the approximation using reun- gmerated in Part {:1} is ofi'a little. ...
View Full Document

Page1 / 8

Solutions for HW_2 - At: (a) )(Cn‘fivmlz...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online