You are on page 1of 10

SOLUTIONS to ECE 2026 Summer 2017 Problem Set #4

PROBLEM 3.1.* Consider a periodic signal that satisifies x( t ) = e– t for time in the range 0 < t <
1, and that is periodic with fundamental period 1, as shown below:
x( t )
1

0.8

... 0.6 ...

0.4

0.2

-2 -1 0 1 2 t

(a) Find its fundamental frequency f0, in Hz.

The fundamental frequency is the inverse of the fundamental period ⇒ f0 = 1 Hz .

P∞
(b) The k-th coefficient in the Fourier series x( t ) = ake jkf t can be
k = –∞
written as
A
ak = -------------------- .
1 + jkB
Find numerical values for the constants A and B.

The k-th FS coefficient can be found using the analysis equation:

1 T
0
ak = --- x( t )e –jk2f t dt
T

1 1
0
= --- e –te –jk2(1)t dt
1

1
0 e
= –(1 + jk2)t
dt

1
–1
= ---------------------- e –(1 + jk2)t
1 + jk2
0

1 – e – 1 + jk2 
= ------------------------------------
1 + jk2
1 – e –1 e – jk2
= --------------------------------- (But e–jk2 = 1 for all k)
1 + jk2
1 – e –1
= ---------------------- ⇒ A = 1 – e – 1 ≈ 0.632, B = 2 ≈ 6.28.
1 + jk2
PROBLEM 3.2.* The disk in a hard disk drive has a defect near the edge that appears
as a large black dot. The disk rotates continuously in a clockwise
direction at a rate of 7200 rotations per minute (rpm). The disk is
being filmed by a digital camera. The camera periodically captures
still images at a frame rate (sampling rate) of fs frames per second
(fps). When the images are played back at the same number of frames per
second, it appears to the eye as a continuous-time video.
7200
7200 rotations per minute corresponds to f0 = ------------ = 120 rotations per second. It’s
60
not strictly necessary, but it is convenient to represent the location of the black dot via
the complex exponential:

z( t ) = e –j2f0 t = e –j240t
This is the equation for a point in the complex plane that rotates in a clockwise
direction with a frequency of 120 rotations per second, or f0 = 120 Hz, just like the
black dot.

(a) If the sample rate is fs = 119 fps, would the black dot appear to rotate clockwise
or counterclockwise when the video is played back? Explain.
Evaluating z( t ) at t = n/fs yields:

z[ n ] = z( t )|t=n/119 = e –j240n/119
= e –j(2 + 2/119)n
= e –j2n/119,
where we used the fact that the ratio 240/119 is a little bigger than 2, namely
240/119 = 2 + 2/119, and we also used the fact that e–j2n = 1 for any integer n.
The final equation above is the equation for a point that moves in a
clockwise direction by an angle of 2/119 for each sample, or about 3°.

(b) Specify three distinct frame rates for which the black dot appears to be stationary
(not moving) when the video is played back.
One possibility is when the sample rate is identical to the frequency f0, for in this case
the black dot will make precisely one complete rotation between sampling times.
Other possibilities are when the black dot makes precisely two complete rotations, or
in general  complete rotations for any integer . In this case, the black dot will always
return to its original position at the sampling times.

120
⇒ fs = --------- .

For example: fs = 120, 60, 40.

(c) Specify all frame rates in the range 50 fps < fs < 100 fps for which the black dot
appears to be rotating in a counterclockwise direction when the video is played
back.
When the digital frequency ̂ = 240/fs is between 3 and 4

⇒ for all sample rates in the range 60 < fs < 80 fps .


PROBLEM 3.3.* Suppose that a continuous-time sinusoid x( t ) is sampled at a sampling rate of
6000 samples/sec, resulting in the following discrete-time signal:

x[ n ] = 6cos(n/3 + 0.1).
Knowing x[ n ] does not uniquely determine x( t ); there are many continuous-
time sinisuoidal signals x( t ) that when sampled would produce this x[ n ].
Name three that have a frequency less than 8 kHz. In other words, specify three
different continuous-time sinsusoidal signals x1( t ) = A1cos(2f1 t + 1),
x2( t ) = A2cos(2f2 t + 2), and x3( t ) = A3cos(2f3 t + 3) that could have
produced this particular x[ n ], subject to the constraint that 0 < fi < 8 kHz in all
cases.

An important fact that will help in this problem (established in June 9 lecture):

Adding fs to the frequency of a pure sinusoid will not change its samples when
sampled at rate fs.

To confirm, observe that sampling x( t ) = Acos(2(f0 + fs)t + ) at rate fs yields

x[ n ] = x(n/fs) = Acos(2(f0 + fs)n/fs + )


= Acos(2f0n/fs + 2n + )
= Acos(2f0n/fs + ).
This same answer would result from sampling Acos(2f0t + ) at t = n/fs.

Observe that the given discrete-time sinusoid x[ n ] = 6cos(n/3 + 0.1) has a


digital frequency ̂ that falls in the principle range, – < ̂ < . Therefore, we can
recover the “no aliasing” input by simply making the substitution n = tfs:

x1( t ) = x[ n ]|n = 6000t


= 6cos(n/3 + 0.1)|n = 6000t

= 6cos(2t + 0.1) .

This is a sinusoid of f1 = 1000 Hz. We can add any integer multiple of 6000 Hz to
this frequency and get the same samples. In particular, adding 6000 Hz ( = 1) yields
a frequency of f2 = 7000 Hz < 8000 Hz:

⇒ x2( t ) = 6cos(2(1000 + 6000)t + 0.1)

= 6cos(14t + 0.1).

Another answer can be found by subtracting 6000 Hz ( = –1), which after


accounting for the sign change yields a sinusoid with freq f3 = 5000 Hz < 8000 Hz:

⇒ x3( t ) = 6cos(2(1000 – 6000)t + 0.1)


= 6cos(–10000t + 0.1)

= 6cos(10t – 0.1).
PROBLEM 3.4.* Refer to Fig. 1 on page 1, the cascade of an ideal C-to-D converter and an ideal D-
to-C converter. Suppose that the spectrum for the input signal x( t ) is as shown
below:

2
1.5e – j/3 1.5e j/3
e j/4 e –j/4

–490 –260 0 260 490 f


(Hz)
(a) Is the signal periodic? Yes
If so specify its fundamental frequency. If not, explain why not.

The fundamental frequency is f0 = gcd(260, 490) = 10 Hz .

(b) Specify three distinct sampling frequencies for which the continuous-time output
signal y( t ) will be a constant, independent of time, i.e. of the form y( t ) = c.

Since the signal is periodic with period T0 = 1/f0 = 0.1 seconds, the signal returns to
the same value every T0 seconds. It further also returns to the same value every 2T0
seconds, and also every 3T0 seconds, etc. So we will get a constant when the sampling
period (time between samples) is any integer multiply of T0 :
1 f 10
⇒ fs = -------- = ----0- = ------ for any integer .
T0  
For example, fs = 10 Hz, fs = 5 Hz, fs = 2.5 Hz.

(c) Give a simple formula for the continuous-time output signal y( t ) when the
sampling frequency (for both the C-to-D and D-to-C converters of Fig. 1) is fs =
5000 Hz.

First, from the spectrum we can write an equation for the input signal:fs

x( t ) = 2 + 2cos(520t – /4) + 3cos(980t + /3).


Next, since the conditions of the sampling theorem are met:

fs = 5000 Hz > 2fmax = 2(490) = 980 Hz


it follows that the output is equal to the input, y( t ) = x( t ), i.e.

y( t ) = 2 + 2cos(520t – /4) + 3cos(980t + /3) .


(d) Give a simple formula for the continuous-time output signal y( t ) when the
sampling frequency (for both the C-to-D and D-to-C converters of Fig. 1) is
fs = 570 Hz.

In this case the sampling theorem condition is satisfies for the DC component and the
260-Hz component, so they will not be aliased, but the high-frequency component will
be aliased. In particular, sampling 3cos(980t + /3) at fs = 570 Hz yields:

3cos(980n/570 + /3)
= 3cos(98n/57 + /3)
= 3cos((98/57 – 2)n + /3)
= 3cos((–16/57)n + /3)
= 3cos((16/57)n – /3).
Since the digital frequency is now in the range – to , we can make the substitution
n = tfs to get the corresponding output of the ideal D-to-C converter:

6cos((16/57)tfs – /3)
= 6cos((16/57)t570 – /3)
= 6cos(160t – /3).
Combining this aliased output with the other two non-aliased components yields an
overall output of:

y( t ) = 2 + 2cos(1040t – /4) + 3cos(160t – /3) .


PROBLEM 3.5.* Refer to Fig.1 for the sampling and reconstruction system. Assume that the
sampling rates for the C-to-D and D-to-C converters are equal, and that the input
to the C-to-D converter is:

x( t ) = cos(900t + /4) + 2 cos(2100t – /4).


(a) If the output of the ideal D-to-C converter is equal to the input, i.e. y( t ) = x( t )
in Fig. 1, then what general statement can you make about the sampling
frequency fs?

That it is larger than twice fmax, namely fs > 2100 Hz .

(b) Find the value of the sampling frequency fs if the output of the ideal D-to-C
converter is not the same as the input, but instead is:
y( t ) = cos(900t + /4) + 1.

Sampling at fs = 1050 Hz does the job.


PROBLEM 4.6. Suppose that a continuous-time sinusoid s( t ) = cos(800t + 0.1) is first
delayed and then sampled with a sampling rate of fs = 800 samples/sec, as
shown below:

s( t ) = cos(800t + 0.1) DELAY x( t ) = s(t – ) IDEAL x[ n ] = x(n/fs )


BY  C-to-D

fs = 800 samples/sec

(a) Find a value for the delay  such that the sampled sequence is x[ n ] = (–1)n for
all n. If there is more than one possible answer, specify them all.

We want x( t ) = cos(800(t – ) + 0.1) = cos(800t), which happens when


–800 + 0.1 = – 2 for any integer 

⇒ = (0.05 +  )/400 = 0.125 ms + (2.5 ms) ∈{0.125ms, 2.625 ms, ...}.

(b) Find a value for the delay  such that the sampled sequence is x[ n ] = 0 for all n.
If there is more than one possible answer, specify them all.

We want x( t ) = cos(800(t – ) + 0.1) = sin(800t), which happens when


–800 + 0.1 = –/2 – 2 for any integer 

⇒ = (0.3 +  )/400 = 0.75 ms + (2.5 ms) ∈{0.75ms, 3.25 ms, ...}.

PROBLEM 4.7. (Sampling a periodic signal need not yield a periodic sequence.)
Show that, although the continuous-time sinusoid x( t ) = cos(2t) is periodic, the
sampled sequence x[ n ] = x(nTs ) is not periodic when the sampling period is
Ts = .

If x[ n ] were periodic then we would have x[ 0 ] = x[ N ] for some positive integer N.


But x[ 0 ] = cos(2t)|t=0 = 1, and x[ N ] = cos(2t)|t=N/fs = cos(22N). In order
for these two numbers to be equal, we must have that (22N) is a multiple of 2, say
22N = 2 for some integer . But if it were true that 22N = 2, then by dividing
both sides by 2N we would have that:


 = ---- .
N
This would imply that  is rational. Since  is not rational, x[ n ] cannot be periodic.
PROBLEM 4.8. We have all seen the phenomenon in a video where a car is driving
forwards but its wheels appear to be spinning backwards. (For
example, see https://youtu.be/jHS9JGkEOmA .) This is an
instance of aliasing, caused by a video camera that is sampling too
slowly (in frames per second) to accurately capture the rotating wheel. In this
problem we will assume that the car is traveling left to right at a constant speed,
so that the wheel rotates clockwise at a constant rate.

(a) Suppose that the above five-spoke wheel has a diameter of d = 0.3183 meters,
and that it is filmed with a video camera whose frame sampling rate is 30 frames
per second (near the NTSC rate). If the spoke pattern appears to be standing
still, how fast is the car traveling (in km/h)? If there is more then one answer,
specify them all.
Approach: First translate the “appears to be standing still” condition to a condition on
the rotational frequency of the wheel; second translate this frequency to the car speed
using the fact that the wheel rotates once each time the car traverses a distance equal to
the wheel circumference; third solve for the car speed.

An obvious reason that the wheel might appear stationary is because it is stationary,
i.e., the car is not moving! So a speed of 0 km/h is going to be one valid answer. But
another way the wheel might appear stationary is if the spoke pattern appears the same
each time the video camera samples (i.e. takes a picture); this will happen when the
sampling time is precisely an integer multiple of the time it takes the wheel to rotate
by an angle of 2/N, where N is the number of spokes. In other words, if Ts = 1/fs
is the sampling period and TR is the time for one complete rotation, then the wheel
will appear stationary whenever:

Ts = TR/N
for some integer . But the rotation period is related to the wheel diameter d and speed
v by

d
TR = ------ .
v
Therefore, the wheel will appear stationary whenever:

d
Ts =  --------
Nv
df
or equivalently v =  -----------s-
N
for any integer . This is the general equation.

Substituting d = 0.3183 m, fs = 30 Hz, N = 5 spokes, and converting to km/h


yields:

  0.3183   30 
v =  ------------------------------------
5
= 6 m/s
or equivalently v = 21.6km/h ∈{0, 21.6km/h, 43.2km/h, 86.4km/h, ...}.
(b) Derive a general equation for all possible speeds v (expressed in km/h) that
would cause an N-spoked wheel of diameter d to appear to be standing still, when
the sampling rate is Rs frames per second. In other words, find v expressed as a
function of d, N, and Rs. As a sanity check, verify that the general equation
produces the answer from part (a) as a special case.
The general equation was derived above:

df
v =  -----------s- .
N

PROBLEM 4.9. Here are some simple MATLAB programs. In each case, the length of the nn or tt
vector is so large that it would exceed the memory requirements of any
conventional computer. (It might run on a supercomputer.) Therefore, rather
than attempting to run the code, you should instead analyze the code and
determine your answers via the theory of sampling and aliasing.

For each part, draw a cascade of C-to-D and/or D-to-C blocks (with their
sampling rates) that is equivalent to the MATLAB code. Keep in mind that —
unlike Fig.1 — the sampling rate of the C-to-D and D-to-C blocks will be
different for these problems.

(a) Suppose the following MATLAB code is run (on a supercomputer):


nn = 0:7184985;
xx = cos(2*pi*0.3*nn + 0.1*pi);
soundsc(xx, 3000)
Determine the analog frequency (in Hertz) of the tone heard from the computer
speaker.

(b) Suppose the following MATLAB code is run (on a supercomputer):


tt = 0:0.0001:10000;
xx = (2/pi) * sin(2*pi*500*tt + pi/3);
soundsc(xx, fsamp);
If the analog tone that results has a frequency of 1800 Hz, what is the value of the
variable fsamp?
(c) Supposing the following MATLAB code is run (on a supercomputer):
tt = 0:(1/48000):40;
xx = cos(pi*4000*tt);
soundsc(xx, 24000);
Determine the duration (in seconds) of the analog tone that is heard from the
speaker.

You might also like