Professional Documents
Culture Documents
1
1.1
y (t) =
k=
dk ejk(/4)t .
y (t)ejk(/4)t dt =
1 8
4 0
(1)ejk(/4)t dt,
but will do something simpler (and more interesting) instead. Rectangular waveform: derivative signal Consider instead the derivative of the previous signal z (t) =
2 z(t) 0 2 4 0 4 t (seconds) 8 12
d dt y (t):
z (t) =
k=
fk ejk(/4)t .
Note that this is of the same form as the FS for y (t), just with a dierent set of coecients. FS coecients for derivative signal Find the FS coecients for z (t) by integrating over one complete period. Choose the interval t = 2 to t = 6 to avoid integrating over half a Dirac delta (were free to choose the integration
z (t)ejk(/4)t dt =
2 6 2 6
1 8 2 8
[2 (t) 2 (t 4)]ejk(/4)t dt
2 6 2 6 2 6
(t)ejk(/4)t dt
1 = 4 =
1 (t)ejk(/4)0 dt 4 2
z (t) = =
dk ejk(/4)t =
k= k=
d dk ejk(/4)t dt
dk
k=
d jk(/4)t = e dt
dk jk (/4)ejk(/4)t .
k=
z (t) =
k=
fk ejk(/4)t ,
so each of the coecients must be equal: fk = dk jk (/4) = jk dk . 4 The FS coecients dk (for the square wave) are related to the coecients fk (for the derivative signal) by 1 dk = fk . jk/4 This formula will work for all k except k = 0 (where it becomes an indeterminate form division by zero). To nd d0 , just go back to y (t) and calculate directly:
8
d0 =
0
y (t)dt =
1 8
(1)dt +
0
1 8
(1)dt = 0.
4
ejk )
(k = 0) (k = 0).
0.5
0 2 dk
2 pi
pi
pi
2 pi
2 pi
pi
pi
2 pi
1.2
Triangular waveform
x(t) =
k=
ck ejk(/4)t .
x(t)ejk(/4)t dt x(t)ejk(/4)t dt + 1 8
8 4
1 = 8 = so ck = 1 8
4 0
x(t)ejk(/4)t dt
8 4
1 8
(t 2)ejk(/4)t dt +
1 8
(4 t)ejk(/4)t dt
tejk(/4)t
2 8
4 0
ejk(/4)t +
4 8
8 4
ejk(/4)t
1 8
8 4
tejk(/4)t .
Two of these integrals are easy, but two have to be done by parts. Exercise 1: Calculate the FS coecients for the above. 3
y (t) =
k=
dk ejk(/4)t
jk
(k = 0) (k = 0).
d d x(t) = dt dt
ck ejk(/4)t =
k= k=
d ck ejk(/4)t dt
ck
d jk(/4)t = e dt
ck jk (/4)ejk(/4)t .
k=
y (t) =
k=
dk ejk(/4)t ,
so each of the coecients must be equal: dk = ck jk (/4) = jk ck . 4 The FS coecients ck (for the triangular wave) can therefore be found from the coecients dk (for the square wave) using 1 ck = dk , jk/4 as long as k = 0. To nd c0 , just go back to x(t) and calculate directly: c0 = 1 8
8
x(t)dt =
0
1 8
(t 2)dt +
0
1 8
(4 t)dt = 0.
4
ejk )
(k = 0) (k = 0).
|ck|
0.5
0 5 ck
2 pi
pi
pi
2 pi
2 pi
pi
pi
2 pi
Check with Matlab j = sqrt(-1); % to be sure tv = -6:0.001:14; % time values (a row vector) xv = zeros(size(tv)); % signal values initially zero N = 10; % highest term in synthesis equation for k=-N:N % Current complex exponential values (a row vector) xcv = exp(j*k*pi/4*tv); % Coefficient for current complex exponential if k==0 ck = 0; % DC else ck = 4/((j*k*pi)^2)*(1 - exp(-j*k*pi)); % formula %ck = 1/(j*k*pi)*(1 - exp(-j*k*pi)); % y(t) %ck = 1/4*(1 - exp(-j*k*pi)); % z(t) end % Add scaled complex exponential to signal values xv = xv + ck*xcv; end plot(tv,real(xv)); % the values *should* be real Exercise 2: Run the above code in Matlab. Open Matlab, type edit fs reconstruct.m, press enter. Copy the code above into the editor, save it, and run the le. You will see the reconstruction of the triangular wave using N terms. Try dierent values N . Look at the code and nd the line that calculates the formula, and try the formulas for the two derivative signals. Whats going on for the impulse train signal? Triangular wave: synthesis
Exercise 3:
Notes Some interesting observations: 1. Triangular waveform is continuous (quite smooth), but has discontinuous derivatives FS 1 coecients decreases as 2 they decrease very quickly as frequency increases. 2. Rectangular waveform is discontinuous (less smooth than triangular waveform) FS coef1 cients decreases as more slowly. 3. Smooth waveforms generally contain less high frequency components their coecients go to zero closer to the origin in the frequency domain. 4. Alternatively, to reconstruct a signal with fast variations (i.e. discontinuities) requires large components at high frequencies. Linking coecients for other transformations Consider a signal x(t) with period T : it has a FS expansion
x(t) =
k=
ck ejk0 t
with 0 = 2/T . Let y (t) be a signal related to x(t). If y (t) is also periodic with period T then it has a FS expansion
y (t) =
k=
dk ejk0 t .
and the coecients ck and dk are related. Relationship for shift transformation
Consider the case where y (t) = x(t a) for some a. Clearly y (t) is periodic with the same period as x(t), and
y (t) = x(t a) =
k=
ck ejk0 (ta) =
k=
=
k=
The coecients are therefore related by dk = ck ejk0 a Thus a shift corresponds to a change in the phase of each coecient, where the amount of the change is proportional to the size of the shift. Exercise 4: Find the FS of the signal below, using the series coecients ck found earlier for x(t):
2 x(t) 0 2 4 0 4 t (seconds) 8 12