solution
solution solution
square wave signal 2 () x t looks like: x 2 (t) 1 0.5 0 -0.5 -3 -2 -1 0 1 2 3 x 10 -5 -1 t How to get this square wave signal? It’s just from a similar and basic function 3 () x t , as shown below. Then x2() t = x3() t × 2− 1. x 3 (t) 1 0.5 -3 -2 -1 0 1 2 3 x 10 -5 0 t The expression for this x3 () t is just a convolution of a rectangle function and impulse train: ⎛ t ⎞ x3() t = rect ⎜ δ 5 5 () t 21/10 × 1/10 ⎟∗ ⎝ ⎠ ⎛ t ⎞ x () 2 x () t − 1= 2rect ∗ () t − 1 ⎝1/10 ⎠ ⇒ 2 t = 3 ⎜ δ 5 ⎟ 5 21/10 × 6 ⎛ ⎛ t ⎞ ⎞ xt () = x1() t x2() t = sin(2× 10 πt) ×⎜2rect ⎜ 5 δ 5 () t 1 21/10 × ⎟ 1/10 ⎟∗ − ⎝ ⎝ ⎠ ⎠ 1 From Fourier Series Pairs table, with T 0 = 2× 5 10 , 1 rectangular function is T = 5 10 , ω π 5 0 = × 10 , width of
5 5 5 ⎡ ⎛ × kπ × ⎞ ⎤ ⎢ 5 ⎜ ⎟ ⎥ 1 1/10 1/10 10 X[ k] = ⎡δ[ k 20 ] δ[ k 20] 2 sinc δ[ k] 2j ⎣ − − + ⎤⎦∗ × − ⎣ 2/10 ⎝ 2 ⎠ ⎦ 1 ⎡ ⎛kπ⎞ ⎤ = ⎡δ[ k 20 ] δ[ k 20] ⎤ sinc δ[ k] 2j ⎣ − − + ⎦∗⎢⎜ ⎟− 2 ⎥ ⎣ ⎝ ⎠ ⎦ j ⎡ ⎛( k− 20) π ⎞ ⎛( k+ 20) π ⎞ ⎤ =− sinc sinc δ[ k 20 ] δ[ k 20] 2 ⎢ ⎜ ⎟−⎜ ⎟−− + + 2 2 ⎥ ⎣ ⎝ ⎠ ⎝ ⎠ ⎦ The magnitude and phase of the harmonic function are shown as follow: |X[k]| Phase of X[k] Code: 0.1 0.05 0 -30 -20 -10 0 10 20 30 2 1 0 -1 -2 -30 -20 -10 0 10 20 30 k = -30:30; N_k = 1/(2*j).*(sinc(pi/2.*(k-20))-sinc(pi/2.*(k+20))-dirac(k-20)+dirac(k+20)); figure(1), subplot(2,1,1),stem(k,abs(N_k),'fill'), figure(1), subplot(2,1,2),stem(k,angle(N_k),'fill'), Problem 5 (Chapter 12, P. 32) 10 jω10 jω jω+ 10 jω+ 10 ( jω) + 20 jω+ 100 (b). H( jω) = ⋅ = 2 Code: k k
- Page 1 and 2: Problem 1 (Chapter 8, P. 22) T 0 =
- Page 3 and 4: Problem 2 (Chapter 8, P. 23) From (
- Page 5: for every value of k . (2) From the
- Page 9 and 10: as shown (dashed line). Similarly,
- Page 11 and 12: asym_1 = 20*log10(ym); figure(2),su
- Page 13 and 14: The dB-scale magnitude asymptote fr
- Page 15: omg2 = omg_p+1:1:10000; ym = zeros(
5 5 5<br />
⎡ ⎛ × kπ<br />
× ⎞ ⎤<br />
⎢ 5 ⎜ ⎟ ⎥<br />
1 1/10 1/10 10<br />
X[ k] = ⎡δ[ k 20 ] δ[ k 20] 2 sinc<br />
δ[<br />
k]<br />
2j ⎣ − − + ⎤⎦∗<br />
× −<br />
⎣ 2/10 ⎝ 2 ⎠ ⎦<br />
1<br />
⎡ ⎛kπ⎞ ⎤<br />
= ⎡δ[ k 20 ] δ[ k 20] ⎤ sinc δ[<br />
k]<br />
2j ⎣ − − + ⎦∗⎢⎜<br />
⎟−<br />
2<br />
⎥<br />
⎣ ⎝ ⎠ ⎦<br />
j ⎡ ⎛( k− 20) π ⎞ ⎛( k+<br />
20) π ⎞<br />
⎤<br />
=− sinc sinc δ[ k 20 ] δ[<br />
k 20]<br />
2<br />
⎢ ⎜ ⎟−⎜ ⎟−−<br />
+ +<br />
2 2<br />
⎥<br />
⎣ ⎝ ⎠ ⎝ ⎠<br />
⎦<br />
The magnitude and phase of the harmonic function are shown as follow:<br />
|X[k]|<br />
Phase of X[k]<br />
Code:<br />
0.1<br />
0.05<br />
0<br />
-30 -20 -10 0 10 20 30<br />
2<br />
1<br />
0<br />
-1<br />
-2<br />
-30 -20 -10 0 10 20 30<br />
k = -30:30;<br />
N_k = 1/(2*j).*(sinc(pi/2.*(k-20))-sinc(pi/2.*(k+20))-dirac(k-20)+dirac(k+20));<br />
figure(1), subplot(2,1,1),stem(k,abs(N_k),'fill'),<br />
figure(1), subplot(2,1,2),stem(k,angle(N_k),'fill'),<br />
Problem 5 (Chapter 12, P. 32)<br />
10 jω10 jω<br />
jω+ 10 jω+ 10 ( jω) + 20 jω+<br />
100<br />
(b). H( jω)<br />
= ⋅ = 2<br />
Code:<br />
k<br />
k