sol11.pdf

April 3, 2018 | Author: Michael ARK | Category: Signal Processing, Algorithms, Mathematical Objects, Mathematical Concepts, Algebra


Comments



Description

EECS 16B Designing Information Devices and Systems IIFall 2017 Miki Lustig and Michel Maharbiz Homework 11 This homework is due November 21, 2017, at noon. 1. Aliasing The concept of “aliasing” is intuitively about having a signal of interest whose samples look identical to a different signal of interest — creating an ambiguity as to which signal is actually present. While the concept of aliasing is quite general, it is easiest to understand in the context of sinusoidal signals. (a) Consider two signals, x1 (t) = a cos(2π f0t + φ ) and x2 (t) = a cos(2π(− f0 + m fs )t − φ ) where fs = 1/Ts . Are these two signals the same or different when viewed as functions of continuous time t? Solution: They are different in the continuous time. x1 has a frequency of f0 , which is different from the frequency of x2 , which is f0 − m fs . They would only be the same if m = 0, in which case, x2 (t) = a cos(−2π f0t − φ ) = a cos(2π f0t + φ ) = x1 (t) (b) Consider the two signals from the previous part. These will both be sampled with the sampling interval Ts . What will be the corresponding discrete-time signals xd,1 [n] and xd,2 [n]? (The [n] refers to the nth sample taken — this is the sample taken at real time nTs .) Are they the same or different? Solution: Using the fact that the nth sample is taken at t = nTs , we can write out: xd,1 [n] = x1 (nTs ) = a cos(2π f0 nTs + φ ) and xd,2 [n] = x2 (nTs ) = a cos(2π(− f0 + m fs )nTs − φ ) 1 = a cos(2π(− f0 + m )nTs − φ ) Ts = a cos(2π(− f0 nTs + mn) − φ ) = a cos(2π(− f0 )nTs − φ ) = a cos(2π f0 nTs + φ ) = xd,1 [n] Therefore, for any t = nTs , xd,2 [n] = x2 (nTs ) = x1 (nTs ) = xd,1 [n]. As can be seen, the sampled signals are exactly the same. EECS 16B, Fall 2017, Homework 11 1 (c) What is the sinusoid a cos(ωt + φ ) that has the smallest ω ≥ 0 but still agrees at all of its samples (taken every Ts seconds) with x1 (t) above? Solution: As we can see from (b), to match frequencies we can choose any integer value of m for x2 (t) and the corresponding sampled signal will have the same frequency as x1 (t), under the same sampling frequency, fs . Note however, that since we are free to select only ω and not φ , we cannot use the absolute value as in part b. To find the smallest ω ≥ 0, we need to find m such that ω = 2π( f0 − m fs ) is the smallest while still greater than or equal to 0. Notice that we assume fs and f0 follow the sampling theorem, which implies f2s > | f0 |. (d) Watch the following video: https://www.youtube.com/watch?v=jQDjJRYmeWg. Assume the video camera running at 30 frames per second. That is to say, the camera takes 30 photos within a second, with the time between photos being constant. Given that the main rotor has 5 blades, list all the possible rates at which the main rotor is spinning in revolutions per second assuming no physical limitations. Hint: Your answer should depend on k where k can be any integer. Solution: Let the main rotor have a frequency of 2π T radians per second. That is to say, it completes one revolution in T seconds, where T is the period of the revolution. 1 Let ∆ = 30 s be the sample period. Since there are 5 blades, the rotor will look like itself after it finishes a fifth of a revolution, which takes T5 seconds. This means that, in one ∆, the rotor could have completed T5 k revolutions, where k is an integer. This k means that the rotor could be spinning at 5∆ revolutions per second, which is (6 × k) Hz. 2. The vector space of polynomials A polynomial of degree at most n on a single variable can be written as p(x) = p0 + p1 x + p2 x2 + · · · pn xn where we assume that the coefficients p0 , p1 , . . . , pn are real. Let Pn be the vector space of all polynomials of degree at most n. (a) Consider the representation of p ∈ Pn as the vector of its coefficients in Rn+1 . h iT ~p = p0 p1 . . . pn Show that the set Bn = {1, x, x2 , . . . , xn } forms a basis of Pn , by showing the following. • Every element of Pn can be expressed as a linear combination of elements in Bn . • No element in Bn can be expressed as a linear combination of the other elements of Bn . (Hint: Use the aspect of the fundamental theorem of algebra which says that a nonzero polynomial of degree n has at most n roots, and use a proof by contradiction.) Solution: We can write every polynomial of degree n on x as p(x) = p0 + p1 x + · · · pn xn , which is a linear combination of the elements in Bn . Let xi ∈ Bn , for 0 ≤ i ≤ n. We show that xi cannot be written as a linear combination of the other elements of Bn . Suppose that there exist real constants c j for j 6= i, such that xi = ∑ j6=i c j x j . This gives us an equation ∑ c j x j − xi = 0 . 0≤ j≤n, j6=i The left hand side is a nonzero polynomial of degree at most n, which we know has at most n roots by the relevant aspect of the fundamental theorem of algebra. Thus the equality cannot hold for all x, which is a contradiction. EECS 16B, Fall 2017, Homework 11 2 (b) Suppose that the coefficients p0 , . . . , pn of p are unknown. To determine the coefficients, we evaluate p on n + 1 points, x0 , . . . , xn . Suppose that p(xi ) = yi for 0 ≤ i ≤ n. Write the matrix V in terms of the xi , such that     p0 y0  p1  y1      V ..  =  ..  .      . . pn yn Solution: We can write each equation p(xi ) = yi as   p0  p1     p0 + p1 xi + p2 xi2 + · · · + pn xin = 1 xi xi2 n · · · xi  ..  = yi .  . pn If we arrange these n + 1 equations into a matrix, we get      1 x0 x02 · · · x0n p0 y0 1 x1 x12 · · · x1n   p1  y1        .  =  .  . . . .. .. ..      . . . . . . .   ..   ..  1 xn xn2 · · · xnn pn yn   The matrix V above with rows 1 xi xi2 · · · xin is also known as a Vandermonde matrix. (c) For the case where n = 2, compute the determinant of V and show that it is equal to det(V ) = ∏ (x j − xi ) . 0≤i< j≤n Under what conditions is this matrix invertible? Solution: If n = 2, we can write V as   1 x0 x02 V = 1 x1 x12    1 x2 x22 We can compute the determinant of V by using row reduction. This gives us the matrix   1 x0 x02 0 x1 − x0 x12 − x02    0 0 2 x2 − x1 x2 − x0 x2 + x0 x1 Since this is upper-triangular, we can compute the determinant by taking the product of the diagonal entries. det(V ) = x1 x22 − x12 x2 − x0 x22 + x02 x2 + x0 x12 − x02 x1 . We can check that this is equal to (x2 − x1 )(x2 − x0 )(x1 − x0 ) = x1 x22 − x12 x2 − x0 x22 + x02 x2 + x0 x12 − x02 x1 Note that det(V ) is nonzero, or V is invertible, if and only if all x0 , x1 , x2 are distinct. If this is the case, then there is a unique solution for p0 , p1 , p2 . EECS 16B, Fall 2017, Homework 11 3 (d) We can define an inner product on Pn by setting Z 1 hp, qi = p(x)q(x) dx . −1 Show that this satisfies the following properties of a real inner product. (We would need a complex conjugate if we wanted a complex inner product). • hp, pi ≥ 0, with equality if and only if p = 0. • For all a ∈ R, hap, qi = ahp, qi. • hp, qi = hq, pi. Solution: 1 p2 (x) dx ≥ 0 since p2 (x) ≥ 0 for all x. The integral is 0 if and only if p = 0 for all x, R • hp, pi = −1 or p is the zero polynomial. R1 R1 • hap, qi = −1 (ap(x))(q(x)) dx = a −1 p(x)q(x) dx = ahp, qi. R1 R1 • hp, qi = −1 p(x)q(x) dx = −1 q(x)p(x) dx = hq, pi. (e) (optional) An alternative inner-product could be placed upon real polynomials if we simply represented them by a sequence of their evaluations at 0, 1, . . . , n and adopted the standard Euclidean inner product on sequences of real numbers. Can you give an example of an orthonormal basis with this alternative inner product? Solution: For p, q ∈ Pn , this alternative inner product is given by n hp, qi = ∑ p(i)q(i) . i=0 An example of an orthonormal basis with this inner product would be the Lagrange polynomials Li (x) constructed on the points 0, 1, . . . , n. Since Li (i) = 1 and Li ( j) = 0 for j 6= i, 0 ≤ i, j ≤ n, thus for i 6= j we clearly have hLi , L j i = 0 and we can also check that hLi , Li i = 1. 3. Sinc functions The sinc function is defined as, ( sin(πx) πx , x 6= 0 sinc(x) = 1, x = 0 (a) Verify that, sin(πx) lim =1 x→0 πx Hint. Look into L’Hospital’s Rule. Solution: d sin(πx) dx sin(πx) lim = lim d x→0 πx x→0 dx πx π cos(πx) = lim x→0 π = 1 = sinc(0) EECS 16B, Fall 2017, Homework 11 4 (b) Verify that, 1 Z π cos(ωx)dω = sinc(x) π 0 Solution: 1 sin (ωx) π   1 Z π cos(ωx)dω = π 0 π x ω=0 sin (πx) = πx (c) If we think of the above integral as a sum of oscillatory functions of different frequencies, the sinc function has continuous frequency components in the range [0, π]. What is the range of frequencies of the function,   x f (x) = sinc ? T Hint. Try to use substitution and the above integral. Solution: We have,   1 π Z ωx cos dω π 0 T Let λ = ωT . Then, Z π 1 T π cos (λ x) dλ T 0 π Since we’re summing  π  over a continuum of frequencies from 0 to T , this tells us that the range of frequencies is in 0, T . (d) Continuing the idea of integration as the continuous version of sums, we define the continuous inner product between two real functions as, Z ∞ hp, qi = p(x)q(x)dx −∞ similarly to question 2 (note that we integrate from −∞ to ∞ instead of -1 to 1). Given that the length squared of a vector ~v of length n is, n kvk2 = hv, vi = ∑ vi vi , i=1 what is the analogous length squared of a function, f , using the inner product definition above? This is a one-line answer. Solution: Z ∞ k f k2 = h f , f i = | f (x)|2 dx −∞ We only consider interpolating functions where k f k < ∞, so the inner product is well defined. It turns out that the set of shifted sinc functions are orthonormal with the above inner product! Let, φk (x) = sinc (x − k) where k is an integer. Then, ( 1, m = n kφk k = 1 and hφm , φn i = 0, otherwise EECS 16B, Fall 2017, Homework 11 5 4. LTI Low Pass Filters Given a sequence of discrete samples with high frequency noise, we can de-noise our signal with a discrete low-pass filter. Two examples are given below: y[n] = 0.5y[n − 1] + x[n] (1) y[n] = 0.25x[n] + 0.25x[n − 1] + 0.25x[n − 2] + 0.25x[n − 3] (2) (a) Write the impulse responses h[n] for (1) and (2). Are they IIR or FIR? Solution: for (1) ( h[n] = 0.5n n ≥ 0 h[n] = h[n] = 0 n<0 This has an infinite impulse response (IIR). for (2) ( h[n] = 0.25 n = 0, 1, 2, 3 h[n] = h[n] = 0 else This has a finite impulse response (FIR). (b) Are either of these filters causal? Are either of these filters stable? Solution: Yes, y[n] depends only on inputs from x[n] and before. Yes, both filters are stable. (c) Give the output y for each filter given the input sequence x[n] = 2cos(πn) + n from n = 0 to n = 7. Assume that y[n] = 0 for n < 0. Solution: for (1) y = [2, 0, 4, 3, 7.5, 6.75, 11.375, 10.6875] for (2) y = [0.5, 0.25, 1.25, 1.5, 2.5, 3.5, 4.5, 5.5] Since the original problem asked for the input sequence x[n] = cos(πn) + n from n = 0 to n = 7, the answers should be: for (1) y = [1, 0.5, 3.25, 3.625, 6.8125, 7.4062, 10.7031, 11.3516] and for (2) y = [0.25, 0.25, 1, 1.5, 2.5, 3.5, 4.5, 5.5] Contributors: • Siddharth Iyer. • Justin Yim. EECS 16B, Fall 2017, Homework 11 6
Copyright © 2024 DOKUMEN.SITE Inc.