Homework 2 with Solution Key - Signals and Systems | ECE 30100, Assignments of Signals and Systems

Material Type: Assignment; Class: Signals And Systems; Subject: ECE-Electrical & Computer Engr; University: Purdue University - Main Campus; Term: Fall 2010;

Typology: Assignments

2011/2012

Uploaded on 04/27/2012

koofers-user-xyf
koofers-user-xyf 🇺🇸

5

(2)

10 documents

1 / 9

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ECE 301 Fall 2010 Division 2 Homework 2
Due Thursday September 16, 2010 at 4pm in MSEE 330
Reading: textbook Chapter 1.
Problem 1. Evaluate the following integrals.
(a)
Z
−∞
t2δ(t)dt
(b)
Z
−∞
t2δ(t2)dt
(c)
Z
−∞
[u(t)u(t1)]dt
(d)
Z
−∞
t[u(t)u(t2)]dt
Problem 2. A CT signal xis defined for all tby
x(t) = 3u(t)2u(t2) u(t3),
where uis the CT unit step.
(a) Sketch xas a function of t.
(b) Find the energy of x.
(c) Let ybe a CT signal such that y(t) = x(t). Find and sketch y.
(d) Let vbe a CT signal such that
v(t) = Zt
−∞
x(τ)dτ.
Find and sketch v.
Problem 3. Consider the DT signals xkgiven by
xk[n] = sin(ωkn),
where ωk= 2πk/5. For k= 1, 2, 4, and 6, use the stem command in Matlab to plot each signal on the
interval 0 n9. All of the signals should be plotted with separate sets of axes in the same figure,
using subplot. How many unique signals have you plotted? If two signals are identical, explain how
different values of ωkcan yield the same signals.
Matlab Example. Here is a piece of Matlab code that defines two signals, y1[n] = nand y2[n] = n/2,
for 0 n5, plots them in the same figure with two different sets of axes, and labels the axes.
1
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download Homework 2 with Solution Key - Signals and Systems | ECE 30100 and more Assignments Signals and Systems in PDF only on Docsity!

ECE 301 Fall 2010 Division 2 Homework 2

Due Thursday September 16, 2010 at 4pm in MSEE 330

Reading: textbook Chapter 1.

Problem 1. Evaluate the following integrals.

(a) (^) ∫ ∞ −∞

t^2 δ(t)dt

(b) (^) ∫ ∞

−∞

t^2 δ(t − 2)dt

(c) (^) ∫ ∞ −∞

[u(t) − u(t − 1)]dt

(d) (^) ∫ ∞ −∞

t[u(t) − u(t − 2)]dt

Problem 2. A CT signal x is defined for all t by

x(t) = 3u(t) − 2 u(t − 2) − u(t − 3),

where u is the CT unit step.

(a) Sketch x as a function of t.

(b) Find the energy of x. (c) Let y be a CT signal such that y(t) = x′(t). Find and sketch y. (d) Let v be a CT signal such that v(t) =

∫ (^) t

−∞

x(τ )dτ.

Find and sketch v.

Problem 3. Consider the DT signals xk given by

xk[n] = sin(ωkn),

where ωk = 2πk/5. For k = 1, 2, 4, and 6, use the stem command in Matlab to plot each signal on the interval 0 ≤ n ≤ 9. All of the signals should be plotted with separate sets of axes in the same figure, using subplot. How many unique signals have you plotted? If two signals are identical, explain how different values of ωk can yield the same signals.

Matlab Example. Here is a piece of Matlab code that defines two signals, y 1 [n] = n and y 2 [n] = n/2, for 0 ≤ n ≤ 5, plots them in the same figure with two different sets of axes, and labels the axes.

n = 0:5; y1 = n; y2 = n/2; figure;

subplot(2,1,1); stem(n,y1); title(’Plot of y_1’); xlabel(’n’); ylabel(’y_1’);

subplot(2,1,2); stem(n,y2); title(’Plot of y_2’); xlabel(’n’); ylabel(’y_2’);

Problem 4. Consider the following three signals:

x 1 [n] = cos

2 πn N

  • 2 cos

3 πn N

x 2 [n] = 2 cos

2 n N

  • cos

3 n N

x 3 [n] = cos

2 πn N

  • 3 sin

5 πn 2 N

Assume N = 6 for each signal. Determine whether or not each signal is periodic. If a signal is periodic, plot the signal in Matlab for two periods, starting at n = 0. If the signal is not periodic, plot the signal in Matlab for 0 ≤ n ≤ 4 N and explain why it is not periodic. Remember to use stem and to appropriately label the axes.

−2^0 −1 0 1 2 3 4 5

1

2

3 CT staircase signal for Problem 2

x(t)

t^ −2^ −2^ −1^0 1 2 3 4

−1.

−0.

0

1

2

3

y(t)

t^ −2^0 −1^0 1 2 3 4

1

2

3

4

5

6

7

v(t)

t (a) (b) (c)

Figure 1: The graphs of (a) x, (b) y = x′, and (c) y =

∫ (^) t

−∞

x(τ )dτ.

(b) Note that the energy of x is the integral of the following signal:

|x(t)|^2 =

9 , 0 ≤ t < 2 1 , 2 ≤ t < 3 0 , otherwise

Hence, the energy of x is 9 · 2 + 1 · 1 = 19.

(c) Differentiating x produces a weighted sum of three CT impulses:

y(t) = 3δ(t) − 2 δ(t − 2) − δ(t − 3).

The sketch of y is shown in Fig. 1(b).

(d) If t < 0 then the integral is equal to zero, and therefore v(t) = 0. For 0 ≤ t < 2, we have

v(t) =

∫ (^) t

−∞

x(τ )dτ =

∫ (^) t

0

3 dτ = 3t.

For 2 ≤ t < 3, we have

v(t) =

∫ (^) t

−∞

x(τ )dτ =

0

3 dτ +

∫ (^) t

2

1 dτ = 3 · 2 + (t − 2) = t + 4.

For t ≥ 3, we have

v(t) =

∫ (^) t

−∞

x(τ )dτ =

0

3 dτ +

2

1 dτ = 3 · 2 + 1 = 7.

Putting all these cases together, we get:

v(t) =

0 , t < 0 3 t, 0 ≤ t < 2 t + 4, 2 ≤ t < 3 7 , t ≥ 3

The sketch of v is shown in Fig. 1(b).

Problem 3. Consider the DT signals xk given by

xk[n] = sin(ωkn),

where ωk = 2πk/5. For k = 1, 2, 4, and 6, use the stem command in Matlab to plot each signal on the interval 0 ≤ n ≤ 9. All of the signals should be plotted with separate sets of axes in the same figure, using subplot. How many unique signals have you plotted? If two signals are identical, explain how different values of ωk can yield the same signals.

Matlab Example. Here is a piece of Matlab code that defines two signals, y 1 [n] = n and y 2 [n] = n/2, for 0 ≤ n ≤ 5, plots them in the same figure with two different sets of axes, and labels the axes.

n = 0:5; y1 = n; y2 = n/2; figure;

subplot(2,1,1); stem(n,y1); title(’Plot of y_1’); xlabel(’n’); ylabel(’y_1’);

subplot(2,1,2); stem(n,y2); title(’Plot of y_2’); xlabel(’n’); ylabel(’y_2’);

Solution. The plots are shown in Fig. 2, and the Matlab code is below. There are three distinct signals: x 1 , x 2 , and x 4. Since the frequencies of x 6 and x 1 differ by 2π, the two sinusoids are the same.

k = [1 2 4 6]; omega_k = 2pik/5; n = 0:9; x1 = sin(omega_k(1)n); x2 = sin(omega_k(2)n);

angular frequency ω 0 = 2π/4 and fundamental period 2π/ω 0 = 4. The fundamental period of the sum of the two sinusoids will be the lowest common multiple of 4 and 6, which is 12.

Similarly, for x 3 , the fundamental periods of the two terms are 6 and 24, and so the fundamental period of x 3 is 24.

N = 6;

n1 = 0:23; x1 = cos(2pin1/N) + 2cos(3pin1/N); n2 = 0:23; x2 = 2cos(2n2/N) + cos(3n2/N); n3 = 0:47; x3 = cos(2pin3/N) + 3sin(5pi*n3/2/N);

figure; subplot(3,1,1); stem(n1,x1); xlabel(’n’); ylabel(’x_1[n]’);

subplot(3,1,2); stem(n2,x2); xlabel(’n’); ylabel(’x_2[n]’);

subplot(3,1,3); stem(n3,x3); xlabel(’n’); ylabel(’x_3[n]’);

0 1 2 3 4 5 6 7 8 9 −

−0.

0

1

n

x^1

[n]

0 1 2 3 4 5 6 7 8 9 −

−0.

0

1

n

x^2

[n]

0 1 2 3 4 5 6 7 8 9 −

−0.

0

1

n

x^4

[n]

0 1 2 3 4 5 6 7 8 9 −

−0.

0

1

n

x^6

[n]

Figure 2: The graphs of the four sinusoids for Problem 3.