You are on page 1of 16

%

%
%
%
%
%
%
%

ECE3084, Summer 2014, Problem 3.2


In the homework, I asked you to compute the relevant values of
a_k and H using the GUIs. You can do that; alternatively, I'm happy
if you just used MATLAB or a calculator. For this solution, I wrote
this MATLAB script to do the computations. Most people probably
used their calculator to compute the b_k intermediate step and
get the B_k and phi_k

omega0 = 40*pi;
k = 0:3;
% remember MATLAB starts indexing at 1; a_k(1) is really "a_0"
a_k = (1 - exp(-j*pi*k)) ./ (j*pi*k);
a_k(1) = 0; % fixing the DC coefficient
disp('Magnitude of a_k')
abs(a_k)
disp('Phase a_k')
angle(a_k)
H_komega0 = 40*pi / (40*pi + j*k*omega0);
disp('Magnitude of H_komega0')
abs(H_komega0)
disp('Phase of H_komega0')
angle(H_komega0)
b_k = a_k .* H_komega0;
disp('Magnitude of b_k')
abs(b_k)
disp('Phase of b_k')
angle(b_k)
% remember MATLAB starts indexing at 1; B_k(1) is really "B_0"
B_k = 2 * abs(b_k);
B_k(1) = abs(b_k(1)); % fixing the DC coefficient, which doesn't need
multiply by 2
disp('B_k')
B_k
psi_k = angle(b_k)
break

Magnitude of a_k
ans =
0
0.6366
0.0000
Phase a_k
ans =
0
-1.5708
-3.1416
Magnitude of H_komega0
ans =
1.0000
0.7071
0.4472
Phase of H_komega0
ans =
0
-0.7854
-1.1071
Magnitude of b_k
ans =
0
0.4502
0.0000
Phase of b_k
ans =
0
-2.3562
2.0344
B_k
ans =
0
0.9003
0.0000
psi_k =
0
-2.3562
2.0344

0.2122
-1.5708
0.3162
-1.2490
0.0671
-2.8198
0.1342
-2.8198

GEORGIA INSTITUTE OF TECHNOLOGY


SCHOOL of ELECTRICAL and COMPUTER ENGINEERING

ECE 3084
Summer 2014
Problem Set #3
Assigned: 29-May-14
Due Date: 5-June-14

Answer sheet for Problem 3.2 (Solution)


Find the {bk } Fourier series coefficients of the output signal. List the values of !0 , ak , H(jk!0 ),
bk , Bk and k in the table below. Note: Bk 6= bk .

!0 = 40

H(jk!0 )

k=0

a0 = 0

k=1

a1 = 0.6366e

k=2

a2 = 0

k=3

a3 = 0.2122e

j1.5708

j1.5708

b0 = 0

0.7071e

j0.7854

b1 = 0.4502e

0.4472e

j1.1071

b2 = 0

0.3162e

j1.249

b3 = 0.0671e

B0 = 0
j2.3562

j2.8198

B1 = 0.9003

B2 = 0

=0

B3 = 0.1342

Remember that for complex numbers, if the magnitude is 0, then the phase is arbitrary. Ive
used a phase of 0 in the above table for such cases, but any phase will do.

2.3562

2.8198

You might also like