ECS 332: Principles of Communications 2015/1 HW 6 — Due: November 3, 10:39 AM (in class) Lecturer: Prapun Suksompong, Ph.D. Instructions (a) ONE part of a question will be graded (5 pt). Of course, you do not know which part will be selected; so you should work on all of them. (b) It is important that you try to solve all problems. (5 pt) The extra question at the end is optional. (c) Late submission will not be accepted. (d) Write down all the steps that you have done to obtain your answers. You may not get full credit even when your answer is correct without showing how you get your answer. Problem 1. Consider a “square” wave (a train of rectangular pulses) shown in Figure 6.1. Its values periodically alternates between two values A and 0. At t = 0, its value is A. ݐ ݎ A … … ܶ ݐ ܶ Width Figure 6.1: A train of rectangular pulses Some values of its Fourier series coefficients are provided in the table below: k ck -7√ − 7 π2 -6 − 31π -5√ − 5 π2 -4 0 -3 -2 2 3π 1 π √ -1 0 2 π 1 2 √ (a) Find its duty cycle. (b) Find the value of A. (Hint: Use c0 .) 1 6-1 1 2 2 π 1 π √ 3 √ 2 3π 4 0 5√ − 5 π2 6 − 31π 7√ − 7 π2 (c) Identify the upper sideband (USB ) and the lower s ideband (LSB) spectra. 4.2-2 Repeat Prob. 4.2-1 if (i) m(t ) = sine ( lOOm); (ii) m(t) = ( l + t 2 )- 1; (iii) m(t) = e- IO it- l l _ Observe that e- 10 lt - 11 is e- IO irl delayed by l second. For the last case yo u need to consider both th e amplitude and the phase spectra. 4.2-3 You are asked to design a DSB-SC modulator to generate a mod ulated signal km(l) cos (we t +8), HW 6a — Due: November 3, 10:39 AMa (in class) 2015/1 where m(t) is signal band -limited to B Hz. Figure P4 .2-3 shows DSB-SC modu lator ava il able 3 in the stoc kroo m. The ca tTi er generato r ava il able ge nerates not cos We t, but cos We i . Exp lain whether you wo uld be able to generate the desired signal using onl y thi s equip ment. You may use any kind of fil ter yo u li k~ . ECS 332 (a) What kind of filter is req uired in Fi g. P4 .2 -3? Problem 2. You are asked to design a DSB-SC modulator to generate a modulated signal (b) Determ ine the signal spectra at points b and c, and ind icate th e frequ ency bands occ upied by km(t) cos(2πfc t), these where m(t) is a signal band-limited to B Hz. Figure 6.2 shows a DSB-SC spectra. modulator available inisthe stockroom. that, (c) What the minim um usable Note value of eve? as usual, ωc = 2πfc . The carrier generator 3 available generates not cos (2πf t), but cos (2πfc t). Explain you would be able to (d) Wo ul d this sc heme cwo rk if the ca rri er ge nerator output werewhether sin 3 cvc l') Explain . generate the desired signal using only this equipment. You may use any kind of filter you (f) Wo ul d thi s sc he me work if th e carri er ge nerator out put were cos" cvet for an y integer n ::: 2.? like. Figure P.4.2-3 ., I m (t) M (.f ) Filter @..__ __, B -8 (a) J- - (b) Figuremodulator 6.2: Problem 4.2-4 You are asked to design a DSB-SC to generate2a modul ated signal km(l ) cos wet with the carrier frequency f e = 500kHz (we = 2.rr x 500, 000). The follo wing equipment is ava ilable in the stockroom: (i) a signal generator of frequency I 00 k.H z; (ii) a ring modulator; (iii ) a bandpass fi Iter tuned to 500 k.Hz. (a) What kind of filter is required in Figure 6.2? (b) Determine the signal spectra at points (b) and (c), and indicate the frequency bands occupied by these spectra. (c) What is the minimum usable value of fc ? (d) Would this scheme work if the carrier generator output were cos2 ωc t? Explain. (e) (Optional) Would this scheme work if the carrier generator output were cosn ωc t for any integer n ≥ 2? [Lathi and Ding, 2009, Q4.2-3] Problem 3. Consider the basic DSB-SC transceiver with time-delay channel presented in class. Recall that the input of the receiver is √ x (t − τ ) = m (t − τ ) 2 cos (ωc (t − τ )) F * where m(t) − )− − − M (f ) is bandlimited to B, i.e., |M (f )| = 0 for |f | > B. We also assume −1 F that fc B. 6-2 ECS 332 HW 6 — Due: November 3, 10:39 AM (in class) x t v t H LP f 2015/1 m̂ t 2 cos ct Figure 6.3: Receiver for Problem 3a √ √ (a) Suppose that, at the receiver, we multiply by 2 cos ((ωc t) − θ) instead of 2 cos (ωc t) as illustrated in Figure 6.3. Assume 1, |f | ≤ B HLP (f ) = 0, otherwise. Find m̂(t) (the output of the LPF). HWR (b) Use√the same assumptions as part (a). However, at the receiver, instead of multiplying by 2 cos ((ωc t) − θ), we pass x(t − τ ) through a half-wave rectifier (HWR) as shown in Figure 6.4. HWR Figure 6.4: Receiver for Problem 3b Make an extra assumption that m(t) ≥ 0 for all time t and that the half-wave rectifier input-output relation is described by a function f (·): x, x ≥ 0, f (x) = 0, x < 0. Find m̂(t) (the output of the LPF). Problem 4. Solve Question 7 in [M2011]. Problem 5. Consider an AM transmitter. (a) Suppose the message m(t) = 4 cos(10πt) and the transmitted signal is xAM (t) = A cos(100πt) + m(t) cos(100πt). Find the value of A which yields the modulation index in each part below. 6-3 ECS 332 HW 6 — Due: November 3, 10:39 AM (in class) 2015/1 (i) µ = 50% (ii) µ = 100% (iii) µ = 150% (b) Suppose the message m(t) = α cos(10πt) and the transmitted signal is xAM (t) = 4 cos(100πt) + m(t) cos(100πt). Find the value of α which yields the modulation index in each part below. (i) µ = 50% (ii) µ = 100% (iii) µ = 150% Extra Question Here is an optional question for those who want more practice. Problem 6 (M2011). In this question, you are provided with a partial proof of an important result in the study of Fourier transform. Your task is to figure out the quantities/expressions inside the boxes labeled a,b,c, and d. ∞ P We start with a function g(t). Then, we define x (t) = g (t − `T ). It is a sum that `=−∞ involves g(t). What you will see next is our attempt to find another expression for x(t) in terms of a sum that involves G(f ). ∞ P To do this, we first write x(t) as x (t) = g (t) ∗ δ (t − `T ). Then, by the convolution`=−∞ in-time property, we know that X(f ) is given by X (f ) = G (f ) × ∞ X a δ f+ b `=−∞ We can get x(t) back from X(f ) by the inverse Fourier transform formula: x (t) = R∞ −∞ After plugging in the expression for X(f ) from above, we get Z∞ x (t) = j2πf t e G (f ) ∞ X a b df b df. `=−∞ −∞ = δ f+ a Z∞ X ∞ j2πf t e G (f ) δ f + −∞ `=−∞ 6-4 X (f ) ej2πf t df . ECS 332 HW 6 — Due: November 3, 10:39 AM (in class) 2015/1 By interchanging the order of summation and integration, we have x (t) = a ∞ Z∞ X ej2πf t G (f ) δ f + b df. `=−∞−∞ We can now evaluate the integral via the sifting property of the delta function and get x (t) = a ∞ X e `=−∞ 6-5 c G d . Q1 Square Wave: Fourier coefficients and duty cycle Wednesday, October 21, 2015 5:54 PM ECS332 2015 HW6 Page 1 Q2 Powered Cosine Modulator Sunday, July 03, 2011 6:01 PM ECS332 2015 HW6 Page 2 ECS332 2015 HW6 Page 3 ECS332 2015 HW6 Page 4 Q3 (a) Time Delay and Phase Offset (b) HWR Rx with Time Delay Thursday, November 11, 2010 11:17 AM ECS332 2015 HW6 Page 5 ECS332 2015 HW6 Page 6 ECS332 2015 HW6 Page 7 Q4 FWR Rx with Time Delay Sunday, August 05, 2012 9:46 PM ECS332 2015 HW6 Page 8 ECS332 2015 HW6 Page 9 Q5 AM Wednesday, October 21, 2015 9:03 PM ECS332 2015 HW6 Page 10 Q6 Poisson Sum Formula [M2011 Q5] Monday, August 06, 2012 7:49 PM ECS332 2015 HW6 Page 11 ECS 332: Principles of Communications 2015/1 HW 7 — Due: November 19, 12:59 PM (right before class) Lecturer: Prapun Suksompong, Ph.D. Instructions (a) ONE part of a question will be graded (5 pt). Of course, you do not know which part will be selected; so you should work on all of them. (b) It is important that you try to solve all problems. (5 pt) The extra question at the end is optional. (c) Late submission will not be accepted. (d) Write down all the steps that you have done to obtain your answers. You may not get full credit even when your answer is correct without showing how you get your answer. (e) For questions that require the use of MATLAB, (i) the codes used should be printed, (ii) if the code is based on some provided code, all modified lines should be highlighted or underlined, (iii) the results displayed in the command window and the figures generated should be captured and printed out as well. 7-1 ECS 332 HW 7 — Due: November 19, 12:59 PM (right before class) 2015/1 Problem 1. Recall that, in QAM system, the transmitted signal is of the form √ √ xQAM (t) = m1 (t) 2 cos (2πfc t) + m2 (t) 2 sin (2πfc t) . In class, we have shown that n o √ LPF xQAM (t) 2 cos (2πfc t) = m1 (t) . Give a similar proof to show that n o √ LPF xQAM (t) 2 sin (2πfc t) = m2 (t) . Problem 2. Recall that, in QAM system, the transmitted signal is of the form √ √ xQAM (t) = m1 (t) 2 cos (2πfc t) + m2 (t) 2 sin (2πfc t) . We want to express xQAM in the form xQAM (t) = √ 2E(t) cos(2πfc t + φ(t)), where E(t) ≥ 0 and φ(t) ∈ (−180◦ , 180◦ ]. (This shows that QAM can be expressed as a combination of amplitude modulation and phase modulation.) In each part below, we consider different examples of the messages m1 (t) and m2 (t). (a) Consider m1 (t) and m2 (t) plotted in Figure 7.1. Draw the corresponding E(t) and φ(t). 1 m1(t) t -1 1 t -1 m2(t) Figure 7.1: m1 (t) and m2 (t) for part (a) of Problem 2 7-2 1 ECS 332 HW 7 — Due: November 19, 12:59 PM (right before class) 2015/1 (b) Suppose m1 (t) = cos(2πBt) and m2 (t) = sin(2πBt) where 0 < B fc . Find E(t) and φ(t). Hint: cos α cos β + sin α sin β = cos(α − β) (c) Suppose m1 (t) = cos(2πBt) and m2 (t) = 2 sin(2πBt). Let fc = 5 and B = 2. Use MATLAB to plot the corresponding E(t) and φ(t) from t = 0 to t = 5 [sec]. (Hint: the function angle or atan2 will be helpful here.) Problem 3. In quadrature amplitude modulation (QAM ) or quadrature multiplexing , two baseband signals m1 (t) and m2 (t) are transmitted simultaneously via the following QAM signal: √ √ xQAM (t) = m1 (t) 2 cos (ωc t) + m2 (t) 2 sin (ωc t) . An error in the phase or the frequency of the carrier at the demodulator in QAM will result in loss and interference between the two channels (cochannel interference). In this problem, show that n o √ LPF xQAM (t) 2 cos ((ωc + ∆ω) t + δ) = m1 (t) cos ((∆ω) t + δ) − m2 (t) sin ((∆ω) t + δ) o n √ LPF xQAM (t) 2 sin ((ωc + ∆ω) t + δ) = m1 (t) sin ((∆ω) t + δ) + m2 (t) cos ((∆ω) t + δ) . Problem 4. Consider the message m(t) along with the carrier signal cos(2πfc t + φ) plotted in Figure 7.2. m(t) 50 0 cos(2 fc t + ) -50 0 0.5 1 1.5 2 2.5 t 3 2.5 t 3 3.5 4 4.5 x 10 1 0 -1 0 0.5 1 1.5 2 3.5 4 4.5 x 10 xAM(t) Figure 7.2: The message and the carrier signals for Problem 4. 0 -100 5 -3 100 0 0.5 1 1.5 2 7-3 1 xFM(t) 5 -3 2.5 t 3 2.5 t 3 3.5 4 4.5 5 -3 x 10 0 -1 0 0.5 1 1.5 2 3.5 4 4.5 5 -3 x 10 ECS 332 HW 7 — Due: November 19, 12:59 PM (right before class) 2015/1 (a) Find the carrier frequency fc from the plot. (Hint: It is an integer.) (b) Sketch the following signals. Make sure that (the unspecified parameter(s) are selected such that) the important “features” of the graphs can be seen clearly. (i) xAM (t) = (A + m (t)) cos (2πfc t + φ) whose modulation index µ = 100%. Rt m (τ )dτ . (ii) xFM (t) = A cos 2πfc t + φ + 2πkf −∞ • You may assume m(t) = 0 for t < 0. (iii) xPM (t) = A cos (2πfc t + φ + kp m (t)) with kp = π . mp (c) Check your answers in part (b) using MATLAB. (Hint: The m-file for the quiz solution can be used as a starting point. There, the integration is done numerically.) • For xFM (t), use kf = 200. Problem 5. Consider the FM transmitted signal Zt xFM (t) = A cos 2πfc t + φ + 2πkf m (τ )dτ , −∞ where fc = 5 [kHz], A = 1, and kf = 75. The message m(t) is shown in Figure 7.3. 40 m(t) 20 0 -20 -40 0 0.5 1 1.5 2 2.5 t 3 3.5 4 4.5 5 -3 x 10 cos(2 fc t + ) 1 Figure 7.3: The message m(t) for Problem 5 0.5 0 The magnitude spectrum |XFM (f )| is plotted in Figure 7.4. -0.5 (a) Find the-10values0.5of f1 , 1f2 , and f3 . 1.5 2 (b) Find the width W in Figure 7.4. 2.5 t 3 3.5 4 4.5 5 -3 x 10 1 xFM(t) 0.5 7-4 0 -0.5 -1 0 0.5 1 1.5 2 2.5 t 3 3.5 4 4.5 5 -3 x 10 ECS 332 HW 7 — Due: November 19, 12:59 PM (right before class) 2015/1 𝑋FM 𝑓 f1 f2 BW f f3 W Figure 7.4: The magnitude spectrum |XFM (f )| for Problem 5 1 (c) Find the occupied bandwidth denoted by BW in Figure 7.4. Extra Questions Here are some optional questions for those who want more practice. Problem 6. Consider a complex-valued signal x(t) whose Fourier transform is X(f ). (a) Find and simplify the Fourier transform of x∗ (t). (b) Find and simplify the Fourier transform of Re {x(t)}. • Hint: x(t) + x∗ (t) = ? F −− * Problem 7. Consider a (complex-valued) baseband signal xb (t) ) − − Xb (f ) which is band−1 F limited to B, i.e., |Xb (f )| = 0 for |f | > B. We also assume that fc B. (a) The passband signal xp (t) is given by √ xp (t) = 2 Re ej2πfc t xb (t) . Find and simplify the Fourier transform of xp (t). (b) Find and simplify √ j2πfc t √ −j2πfc t LPF 2 2 Re e xb (t) e . | {z } xp (t) 7-5 ECS 332 HW 7 — Due: November 19, 12:59 PM (right before class) Assume that the frequency response of the LPF is given by 1, |f | ≤ B HLP (f ) = 0, otherwise. 7-6 2015/1 Q1 QAM Key Equations (Cos-Sin Form) Sunday, August 05, 2012 9:20 PM ECS332 2015 HW7 Page 1 Q2 QAM: Envelope-and-Phase Form Sunday, November 08, 2015 12:25 AM ECS332 2015 HW7 Page 2 ECS332 2015 HW7 Page 3 ECS332 2015 HW7 Page 4 ECS332 2015 HW7 Page 5 Q3 QAM with Phase and Frequency Offset Sunday, November 8, 2015 8:46 PM ECS332 2015 HW7 Page 6 Q4 AM FM PM signals Sunday, November 8, 2015 2:30 PM ECS332 2015 HW7 Page 7 ECS332 2015 HW7 Page 8 ECS332 2015 HW7 Page 9 ECS332 2015 HW7 Page 10 Q5 FM BW Sunday, November 08, 2015 10:02 PM ECS332 2015 HW7 Page 11 Q6 More properties of FT Monday, November 09, 2015 10:40 AM ECS332 2015 HW7 Page 12 ECS332 2015 HW7 Page 13 Q7 QAM Key Equation (Complex-Exponential Form) Monday, November 09, 2015 10:42 AM ECS332 2015 HW7 Page 14 ECS 332: Principles of Communications 2015/1 HW 8 — Due: November 26, 12:59 PM (right before class) Lecturer: Prapun Suksompong, Ph.D. Instructions (a) ONE part of a question will be graded (5 pt). Of course, you do not know which part will be selected; so you should work on all of them. (b) It is important that you try to solve all problems. (5 pt) The extra question at the end is optional. (c) Late submission will not be accepted. (d) Write down all the steps that you have done to obtain your answers. You may not get full credit even when your answer is correct without showing how you get your answer. (e) For questions that require the use of MATLAB, (i) the codes used should be printed, (ii) if the code is based on some provided code, all modified lines should be highlighted or underlined, (iii) the results displayed in the command window and the figures generated should be captured and printed out as well. Problem 1. Find the “perceived” frequency when we sample the following signals at sampling rate fs = 12 [Sa/s] (a) the signal cos(2π(1, 111, 111)t) (b) the signal cos(2π(111, 111)t) (c) the signal ej2π(11,111)t (d) the signal e−j2π(1,111)t Remark: In lecture, we defined the “perceived” frequency to be the frequency that plotspect “sees” the signal. Now that we learned about reconstruction, we can define the “perceived” frequency to be the frequency of the signal reconstructed by the “reconstruction equation”. If the reconstructed signal is cos(2π f˜0 t) where f˜0 ≥ 0, the perceived ˜ frequency is f˜0 . If the reconstructed signal is ej2πf0 t , the perceived frequency is f˜0 . Note that for complex-exponential signal, the perceived frequency can be negative. 8-1 ECS 332 HW 8 — Due: November 26, 12:59 PM (right before class) 2015/1 Problem 2. The (magnitude) spectrum of a periodic square wave can be found using: % specsquare.m plot the close all f0=10; EndTime=2; Ts=1/1000; t=0:Ts:(EndTime−Ts); x=sign(cos(2∗pi∗f0∗t)); plotspect(x,t) spectrum of a square wave % % % % % % "(fundamental) frequency" of the square wave Will consider from time = 0 to EndTime sampling interval (time interval between samples) create a time vector square wave = sign of cos wave call plotspec to draw spectrum 1 0.5 0 −0.5 −1 0 0.2 0.4 0.6 0.8 1 1.2 Seconds 1.4 1.6 1.8 2 −200 −100 0 100 Frequency [Hz] 200 300 400 500 Magnitude 1.5 1 0.5 0 −500 −400 −300 Figure 8.1: Plots from specsquare.m The output of specsquare.m is shown in Figure 8.1. The top plot shows the first 2 seconds of a square wave with fundamental frequency f0 = 10 cycles per second. The bottom plot shows a series of spikes that define the frequency content. In this case, the largest spike occurs at ±10 Hz, followed by smaller spikes at all the odd-integer multiples (i.e., at ±30, ±50, ±70, etc.). Modify specsquare.m to investigate the relationship between the time behavior of the square wave and its spectrum. Try square waves with different (fundamental) frequencies: f0 = 20, 40, 100, 300 Hz. (Keep Ts = 1/1000.) Describe the aliasing effect on each of cases. How do the time plots change? (You may need to use the xlim command to limit your view. Use the subplot command to select whether you want to control the upper plot or the lower plot.) How do the spectra change? 8-2 ECS 332 HW 8 — Due: November 26, 12:59 PM (right before class) 2015/1 Problem 3. Determine the Nyquist sampling rate and the Nyquist sampling interval for the signals: (a) sinc(100πt) (b) sinc2 (100πt) (c) sinc(100πt) + sinc(50πt) (d) sinc(100πt) + 3 sinc2 (60πt) (e) sinc(50πt) sinc(100πt) Remark: Recall that in our class, sinc(x) = sin(x) . x Problem 4. Consider a signal g(t) = sinc(πt). (a) Sketch the Fourier transform G(f ) of g(t). (b) Find the Nyquist sampling rate. (c) The sequence of sampled values g[n] is constructed from g(t) by g[n] = g (t)|t=nTs . Recall that the instantaneous sampled signal gδ (t) is defined by ∞ X gδ (t) = g[n]δ(t − nTs ) n=−∞ where Ts is the sampling interval. (i) Let Ts = 0.5. Sketch the Fourier transform Gδ (f ) of gδ (t). (ii) Let Ts = 4/3. Sketch the Fourier transform Gδ (f ) of gδ (t). (d) Recall the reconstruction equation: gr (t) = ∞ X g[n] sinc(πfs (t − nTs )). n=−∞ Note that we write gr (t) instead of g(t) to accommodate the case that the sampling rate is too low; in which case, the reconstructed signal is not the same as g(t). 8-3 ECS 332 HW 8 — Due: November 26, 12:59 PM (right before class) 2015/1 (i) With Ts = 1, i. Find g[n] for n = . . . , −4, −3, −2, −1, 0, 1, 2, 3, 4, . . . ii. Use the reconstruction equation to find gr (t). (ii) Let’s test the reconstruction equation by using MATLAB to plot gr (t). Note that the sum in the reconstruction equation extends from −∞ to +∞. In MATLAB, we can not add that many terms. So, we need to stop at some n. In this part, use Ts = 0.5. i. Use MATLAB to plot gr (t) when only the ii. Use MATLAB to plot gr (t) and all of its −1, 0, 1. iii. Use MATLAB to plot gr (t) and all of its −5, −4, . . . , −1, 0, 1, . . . , 4, 5. iv. Use MATLAB to plot gr (t) and all of its −10, −9, . . . , −1, 0, 1, . . . , 9, 10. n = 0 term is included. sinc components. Include only n = sinc components. Include only n = sinc components. Include only n = In all these plots, consider t from -4 to 4. Also include the plot of sinc(πt) for comparison. 8-4 Q1 The "folding" and the "tunneling" techniques Sunday, November 22, 2015 11:14 AM ECS332 2015 HW8 Page 1 ECS332 2015 HW8 Page 2 Derivation of the "folding" and the "tunneling" techniques Saturday, November 21, 2015 10:16 PM ECS332 2015 HW8 Page 3 ECS332 2015 HW8 Page 4 ECS332 2015 HW8 Page 5 ECS332 2015 HW8 Page 6 Problem 2: Aliasing and periodic square wave First, let’s recall some theoretical results we studied earlier. We know, from Example 4.20 in lecture, that 1 2 2 𝜋 1 cos𝜔0 𝑡 ≥ 0 = + 1 1 1 3 5 7 cos𝜔0 𝑡 − cos3𝜔0 𝑡 + cos5𝜔0 𝑡 − cos7𝜔0 𝑡 + ⋯ , where 𝜔0 = 2𝜋𝑓0 . Here, we have a bipolar square pulse periodic signal sgn(cos𝜔0 𝑡) which alternates between “-1 and 1” instead of “0 and 1”. Observe that sgn(cos𝜔0 𝑡) = 2 × 1 cos𝜔0 𝑡 ≥ 0 − 1. Therefore, sgn(cos𝜔0 𝑡) = 4 𝜋 1 1 1 3 5 7 cos𝜔0 𝑡 − cos3𝜔0 𝑡 + cos5𝜔0 𝑡 − cos7𝜔0 𝑡 + ⋯ . Hence, theoretically, its Fourier transform should have spikes (impulses) at all the odd-integer multiples of f0 Hz. The center spikes (at f0) should be the largest among them as shown in the Figure below. sign(cos(2:ft)) where f = 10 using sampling interval T S =0.001 1 0.5 0 -0.5 -1 0 0.1 0.2 0.3 0 -500 -400 -300 -200 0.4 0.5 0.6 Seconds 0.7 0.8 0.9 1 -100 0 100 Frequency [Hz] 200 300 400 500 Magnitude 1.5 1 0.5 In fact, we could even try to predict the height of the spikes shown in the plot as well. Note that, in the script, we consider the time between 0 to 2 sec. Therefore, actually, we are not looking at the signal sgn(cos𝜔0 𝑡) from - to . This time-limited view means that, in the frequency domain, we won’t see the impulses but rather sinc pulses at those mentioned locations. (This is the same as seeing two sinc pulses instead of two impulses when looking at the Fourier transform of the cosine pulse.) The sinc function is simply the Fourier transform of the rectangular windows. Because the area of the rectangular window is 1×2 = 2, its Fourier transform (which is a sinc function) has its peak value of 2. This is further scaled by a factor of ½ from the cosine. Therefore, each “impulse” (“sinc”) that we see should have its height being the coefficient of corresponding cosine. For 4 example, at f0, the coefficient of the cosine is . Therefore, we expect the height of the 𝜋 “impulse” at f0 to be 4 𝜋 1.2732. The height values for other impulse locations is shown by the pink circles in the plot. We see that our predicted values match the plot quite well. In the time domain, the switching between the values -1 and 1 should be faster as we increase f0. All the plots here are adjusted so that they show 10 periods of the “original signal” in the time domain. (This is done so that the distorted shape (if any) of the waveform in the time domain is visible.) From the plots, as we increase f0 from 10 to 20 Hz, the locations of spikes changes from all the odd-integer multiples of 10 Hz to all the odd-integer multiples of 20 Hz. In particular, we see the spikes at 20, 60, 100, 140, 180, 220, 260, 300, 340, 380, 420, 460. Note that plotspect (by the way that it is coded) only plots from [-fs/2,fs/2). So, we see a spike at -500 but not 500. Of course, the Fourier transform of the sampled waveform is periodic and hence when we replicate the spectrum every fs, we will have a spike at 500. Note that, in theory, we should also see spikes at 540, 580, 620, 660, and so on. However, because the sampling rate is 1000 [Sa/s], these high frequency spikes will suffer from aliasing and “fold back”1 into our viewing window [-fs/2,fs/2). However, they fall back to the frequencies that already have spikes (for example, 540 will fold back to 460, and 580 will fold back to 420) and therefore the aliasing effect is not easily noticeable in the frequency domain. sign(cos(2:ft)) where f = 40 using sampling interval T S =0.001 sign(cos(2:ft)) where f = 20 using sampling interval T S =0.001 1 1 0.5 0.5 0 0 -0.5 -0.5 -1 -1 0 0.05 0.1 0.15 0.2 0.25 0.3 Seconds 0.35 0.4 0.45 0 0.5 0.15 0.2 0.25 1.5 Magnitude Magnitude 1 0.1 Seconds 1.5 1 0.5 0 -500 0.05 -400 -300 -200 -100 0 100 Frequency [Hz] 200 300 400 500 1 0.5 0 -500 -400 -300 -200 -100 0 100 Frequency [Hz] 200 300 400 500 Because the squarewave is real and even, the Fourier transform is also real and even. Therefore, the “folding effect” is equivalent to the “tunneling effect”. When f0 = 40 Hz, we start to see the aliasing effect in the frequency domain. Instead of seeing spikes only at 40, 120, 200, 280, 360, 440, the spikes at higher frequencies (such as 520, 600, and so on) fold back to lower frequencies (such as 480, 400, and so on). The plot in the time domain still looks quite OK with small visible distortion. At high fundamental frequency f0 = 100 Hz, we see stronger effect of aliasing. In the time domain, the waveform does not look quite “rectangular”. In the frequency domain, we only see the spikes at 100, 300, and 500. These are at the correct locations. However, there are too few of them to reconstruct a square waveform. The rest of the spikes are beyond our viewing window. We can’t see them directly because they fold back to the frequencies that are already occupied by the lower frequencies. Note also that the predicted height (pink circles) at 300 Hz is quite different from the plotspect value. This is because the content from the folded-back higher-frequencies is being combined into the spikes. sign(cos(2:ft)) where f = 100 using sampling interval T S =0.0001 sign(cos(2:ft)) where f = 100 using sampling interval TS =0.001 1 1 0.5 0.5 0 0 -0.5 -0.5 -1 -1 0 0.01 0.02 0.03 0.04 0.05 0.06 Seconds 0.07 0.08 0.09 0 0.1 Magnitude Magnitude 0.02 0.03 0.04 0.05 0.06 Seconds 0.07 0.08 0.09 0.1 2000 3000 4000 5000 1.5 1.5 1 0.5 0 -500 0.01 -400 -300 -200 -100 0 100 Frequency [Hz] 200 300 400 500 1 0.5 0 -5000 -4000 -3000 -2000 -1000 0 1000 Frequency [Hz] Our problem can be mitigated by reducing the sampling interval to TS = 1/1e4 instead of TS = 1/1e3 as shown by the plot on the right above. Finally, at the highest frequency f0 = 300 Hz, if we still use T = 1/1e3, the waveform will be heavily distorted in the time domain. This is shown in the left plot below. We have large spikes at 300 as expected. However, the next pair which should occur at 900 is out of the viewing window and therefore folds back to 100. Again, the aliasing effect can be mitigated by reducing the sampling time to T = 1/1e4 instead of T = 1/1e3. Now, more spikes show up at their expected places. Note that we can still see a lot of small spikes scattered across the frequency domain. These are again the spikes from higher frequency which fold back to our viewing window. sign(cos(2:ft)) where f = 300 using sampling interval T S =0.0001 sign(cos(2:ft)) where f = 300 using sampling interval TS =0.001 1 1 0.5 0.5 0 0 -0.5 -0.5 -1 -1 0 0.005 0.01 0.015 0.02 Seconds 0.025 0 0.03 Magnitude Magnitude 0.01 0.015 0.02 Seconds 0.025 0.03 1.5 1.5 1 0.5 0 -500 0.005 -400 -300 -200 -100 0 100 Frequency [Hz] 200 300 400 500 1 0.5 0 -5000 -4000 -3000 -2000 -1000 0 1000 Frequency [Hz] 2000 3000 4000 5000 Q3 Nyquist sampling rate and Nyquist sampling interval Sunday, July 17, 2011 2:09 PM ECS332 2015 HW8 Page 7 ECS332 2015 HW8 Page 8 Q4 Sinc Reconstruction of Sinc Thursday, August 30, 2012 1:51 PM ECS332 2015 HW8 Page 9 ECS332 2015 HW8 Page 10 ECS332 2015 HW8 Page 11 ECS 332: Principles of Communications 2015/1 HW 9 — Due: Not Due Lecturer: Prapun Suksompong, Ph.D. Problem 1. State the Nyquist’s (first) criterion for zero ISI (a) In the time domain. (b) In the frequency domain. Problem 2. In each part below, a pulse P (f ) is defined in the frequency domain from f = 0 to f = 1. Outside of [0, 1], your task is to assign value(s) to P (f ) so that it becomes a Nyquist pulse. Of course, you will also need to specify the symbol interval T as well. Hint: To avoid dealing with complex-valued P (f ), you may assume that p(t) is real-valued and even; in which case P (f ) is also real-valued and even. (a) Find a Nyquist pulse P (f ) whose P (f ) = 0.5 on [0, 1]. (b) Find a Nyquist pulse P (f ) whose P (f ) = 0.25 on [0, 1]. (c) Find a Nyquist pulse P (f ) whose P (f ) = 0.5, 0 ≤ f < 0.5 0.25, 0.5 ≤ f ≤ 1 (d) Find a Nyquist pulse P (f ) whose 0.5, f ∈ [0, 0.25) ∪ [0.5, 0.75) P (f ) = 0.25, f ∈ [0.25, 0.5) ∪ [0.75, 1] Problem 3. Consider a raised cosine pulse pRC (t; α) and its Fourier transform PRC (f ; α). Assume the rolloff factor α = 0.3 and the symbol “duration” T = 1. (a) Carefully sketch PRC (f ; α). (b) Find pRC (2; α). (c) Find PRC (0.5; α). (d) Find PRC (0.3; α). 9-1 ECS 332 HW 9 — Due: Not Due 2015/1 (e) *Find PRC (0.4; α). Remark: You should be able to solve this problem without referring to the “ugly” expression(s). Problem 4. Consider a raised cosine pulse p(t) with rolloff factor α and symbol “duration” T. (a) Find p(T /2) as a function of α. (b) Use MATLAB to plot p(T /2) as a function of α. 9-2 Q1 Nyquist's Criterion Monday, September 17, 2012 9:47 PM ECS332 2015 HW9 Page 1 Q2 Nyquist Pulses Monday, September 17, 2012 4:20 PM ECS332 2015 HW9 Page 2 ECS332 2015 HW9 Page 3 ECS332 2015 HW9 Page 4 Q3 Raised Cosine Pulse Monday, September 17, 2012 7:51 PM ECS332 2015 HW9 Page 5 ECS332 2015 HW9 Page 6 Q4 Raised Cosine Pulse Monday, September 17, 2012 7:38 PM 1 0.8 0.6 0.4 0.2 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 ECS332 2015 HW9 Page 7 0.9 1 ECS 332: Principles of Communications 2015/1 HW 10 — Due: Not Due Lecturer: Prapun Suksompong, Ph.D. Problem 1. In a digital PAM system, equally-likely message symbols are selected from an alphabet set A = {−5, 5}. The pulse used in the transmitted signal is a Nyquist pulse. The additive white noise at each particular time instant is Gaussian with mean 0 and standard deviation σN = 3. The noise and the message are independent. As described in class, a simple receiver samples the received signal (the transmitted signal combined with the noise) and then compare the value to the thresholding level. If the sampled value is greater than the threshold, the decoded value of the message will be “5”. Otherwise, the decoded value of the message will be “-5”. Here, assume that 0 is used as the threshold level for the decoding decision at the receiver. (a) Suppose the message selected was “-5”. What is the probability that the decoded value is “5”? (b) Suppose the message selected was “5”. What is the probability that the decoded value is also “5”? (c) Suppose the message selected was “-5”. What is the probability that the decoded value is also “-5”? (d) Suppose the message selected was “5”. What is the probability that the decoded value is “-5”? (e) Find the symbol error probability. (f) Suppose the alphabet set is A = {−5, 5, 15}. How would you perform the decoding from the sampled received signal value? Problem 2. Suppose we are using a digital PAM system to transmit a string: “I love ECS332.”. (a) Suppose each character is converted into real number using MATLAB command real(). For example, the character “I” gives real(’I’) = 73. The sequence of number is then transmitted using digital PAM. (Each number is a symbol.) Suppose the decoded string at the receiver is “I like ECS332.” Estimate the symbol error rate. (b) Suppose each character was converted to 7-bit binary before transmission. We can perform this operation on the whole string in MATLAB via the expression 10-1 ECS 332 HW 10 — Due: Not Due 2015/1 dec2bin(’I love ECS332.’) The resulting binary string was then transmitted with digital PAM. At the receiver, suppose the decoded string is “I like ECS332.”. Estimate the bit error rate. 10-2 Q1 Digital PAM with Noise Wednesday, December 02, 2015 1:27 PM ECS332 2015 HW10 Page 1 ECS332 2015 HW10 Page 2 Q2 SER and BER Wednesday, December 02, 2015 3:28 PM ECS332 2015 HW10 Page 3