Professional Documents
Culture Documents
Chapter 07 PDF
Chapter 07 PDF
Chapter 07 PDF
tol), if (relerr>0), %W too small WeWrstep; % Increase W by step elseif (relerr> [WE_MJeUS7P2n0d1 (1, .95, 16-9) We 12.7062 EW = 0.4750 ‘Thus, w 2.7062, From the text example, ‘the essential bandwidth corresponding to 95% signal energy is derived as W = 12.706a radians per second. For a nicely with the computed value of Wy == 12.7002, 1, this corresponds (b) Setting a = 2 ond using 90% signal energy results in >> (W,E_W]=NS7P2m04! (2, .90, 16-8) w= 12.6275 EW = 0.2250 ‘Thus, We 2.6275 () Setting a = 3 and using 75% signal energy results in >> [W,ELW]-HS7P2a0d1 (3, .75, 10-8) We 7.2426 EW = 0.1250 ‘Thus, Wa = 7.2426. 7.M-2. To solve this problem, program ¥S7P2 is modified to solve for the pulse width to achieve a desired essential bandwidth, rather than solving for the essential bandwidth ‘that corresponds to a desired pulse. function [tau,E_¥] = MSTP2n0d2(W, beta,tol) % NSTP2n0d2.m % Function M-file computes essential bandwidth W for square pulse YINPUTS: W = essential bandwidth [rad/s) % beta = fraction of signal energy desired in W % tol = tolerance of relative energy error % OUTPUTS: tau = pulse width 349% E.W = Energy contained in bandwidth W tan = 1; step = 4; 1 Initial guess and step values Kequared = inline (? (taueNS7P1 (onegaxtau/2)) .-2? , omega’, "tau’); ELW = 1/(2rpi)equad(k_squared,-W,W, (0), 0,tau); E = betarvau; % Desired energy in W relerr = (B ~ E.W/E; while(abs(relerr) > tel), Af (relerr>0), % tau too small taustautstep; % Increase tau by step elseif (relerr<0), { tau too Large step = step/2; tau = tau-atep; % Decrease step size and then tau. ELM = 1/(2epi)squad(X_squared, -W,W, (1, {1 tau) E~ betartau; Desired energy in W relerr = (E ~ E.N)/E; end (a) Set W = 2n5 and select 95% signal energy >> [eau,E_W) = MS7P2u0d2(2+pie5,.95, 16-9) au = 0.4146 EM = 0.3939, Thus, ny = 0.4146. (b) Set 1Y = 2710 and select 90% signal energy: >> Feau,EW) = MS7P2m0d2(2+pi+i0, 90, 1¢-9) tau = 0.0849 EM = 0.0764 ‘Thus, 2 = 0.0849. (o) Set W = 2720 and select 75% signal energy. >> [tau,£_W] = MS7P2n0d2(24pi*20, .78, 12-9) tan = 0.0236 EW 0.0177 ‘Thus, 75 = 0.0236. 7M ‘To solve this problem, program ¥S7P2 is modified to solve for the decay parameter a to achieve a desired essential bandwidth, rather than solving for the essential bandwidth, ‘that corresponds to a desired decay parameter. function [a,BW] = MS7P2n0d3(W,beta,to2) % NS7P2n003-n) 1 Function M-£ile computes decay parameter a needed to % achieve a given essential bandwidth. INPUTS: W = essential bandwidth (rad/s} beta = fraction of signal energy desired in W tol = tolerance of relative energy error 300% OUTPUTS: a = decay parameter % EW = Energy contained in bandwidth W a= 1; stop = 1; 4 Initial guess and step values X_squared = inline(*t./(omega.~2+a.~2)” , omega’ a’); EW» 1/(2api)squaa(X_squared, -W,¥, 1, 0 ,a); E = bota/(2ea); % Desired energy in W relerr = (E ~ E_W)/E} while(abs(relerr) > tol), Af (relerr<0), a too small aratstep; % Increase tau by stop elseif (relerr0), % a too large step = step/2; a= a-etep; 1% Decrease step size and then tau. end EW © 1/(2spi)*quad(X_squared,-W,W, 01,0 ,a); E = beta/(2#a); % Desired energy in W relerr = (E ~ ELW)/! end (a) Set W = 2n5 and select 95% signal energy. >> [a,EW) = MS7P2mod3 (2*pi*5, .96, 10-9) a= 2.4725 . EM = 0.1921 ‘Thus, ay = 24725, (b) Set. 1Y = 2710 and select 90% signal energy. >> [a,E.W] = MS7P2x0d3(24pi*10, .90, te 2 = 9.9524 EW = 0.0452 ‘Thus, ay = 9.9524. (c) Set W = 2720 and solect 75% signal energy. >> [a,E.W] = MS7P2u0d3 (2*pin20, .75, 16-9) 2 = 52.0899 EW = 0.0072 ‘Thus, ag = 52.0499, 7.M-4. Call the desired unit-amplitude, unit duration triangle function (0). First, notice that -2(f) ean be constructed by convolving two rectangular pulses, each of width 7 = 0.5 and height A = V3. The energy of a(t) is Ez = 2 {25(2t)?dt = 1/3. Furthermore, using the convolution-in-time property and spectrum of rectangular pale, we know that X(e) = ($Esinalu/4)) Next, programm NS7P2 is modified to solve for the essential bandwidths of this signal for various signal energies. 3517M. function [W,E_W] = HS7P2mod4(beta, tol) % NSTP2mod4.a 4% Function M-file computes essential bandwidth W for a % unit-amplitude, unit duration triangle function. Y INPUTS: beta = fraction of signal energy desired in W % tol = tolerance of relative energy error % OUTPUTS: W = essential bandvidth [rad/s] % EW = Enorgy contained in bandwidth W W= 0; step = 4; 4 Initial guess and step values X_squared = intino(? (sqrt (2)/2=NSTPI (onega/4)) .~4” ,"onega") ; E = beta/3; J Desired energy in W relerr = (E-0)/E; Ji Initial relative error is 100 percent vhileCabs(relerr) > tol), if (relerr>0), WW too small WeWestep; % Increase W by step elseif (relerr > [WE] = MS7P2u0d4(.95, 1¢-9) W = 6.2877 EW = 0.3167 Use 90% signal energy to compute the essential bandwidth: >> [WELW] = MS7P2n0d4(.9, 10-9) W > 5.3350 EW = 0.3000 Use 75% signal energy to compute the essential bandwidth: >> [WELW] = MS7P2a0d4(.75, 10-9) w= 3.7672 ELW = 0.2500 ‘Thus, the essential bandwidths are Wo.gs = 6.2877rad/s, Wo. 3.7872rad/s. 5.3360rad/s, Wo Following the example in MATLAB Session 7, the first 10 Fourier series coefficients of 1/3 duty-cycle square wave are (a) Setting Ty = 20 and 7 352TM6. MATLAB is used to evaluate and plot the first ten coefficients, >> tau = 2api/3; TO = 2pi; a 01; >> D_n = tau/T_O+NS7Pi (nepistau/T_0) ; >> stem(n,Dn,’k?); xlabel(’n); ylabel Dn"); >> axis({-0.5 10.5 -0.2 0.551); Figure S7.M-Sa: Fourier series coefficients Dy for x(t), (b) Setting T = x and 1/3 yields Notice, the coefficients D,, depend only on the duty-cycle of the signal, not the period. Since the duty eyele is fixed, the coefficients Dj are identical to those determined in 7.M-5a, Refer to solution 7.M-5a for the MATLAB code and plot. X(w) = [SR a(themtar foetemat Ect asset 0a agp SIGTET pm ct Substituting V3 = and at!) V2 = de yields ve X= ye [Leworenay However, oe [ee at = 1 for any a, s0 Je view MATLAB is used to plot 2() and X(w) >> t = Limepaco(-10,10,1001); x = exp(-t.72 >> omega = linspace(-10,10,1001); X = sqrt (pi)+exp(-omega.°2/4); 353>> subplot(2it); pov(e.x, 7k): >> xabel('t?); ylabe1?x(4)95 >> subplot(212); plot (t,x, 7%); >> elabel(’\omega’); ylabel(°X(\enege)”); Figure S7.M-6: x(t) = e~® and X(w) = Vme~""4, Figure $7.M-6 confirms that X (w) is just a sceled and stretched version of z(t). Thisis something remarkable; the Fourier Transform of a Gaussian pulse is itself a Gaussian pulse! 354