Professional Documents
Culture Documents
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.
(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:
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.
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.
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 .
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
(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
(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.