Description
ECE300 Communication Theory Homework 1
1. A square wave has period T, amplitude A and duty cycle τ /T (the signal takes value A from
time 0 to time τ , then 0 from time τ to T). Find the Fourier series representation of this
signal.
2. Does the signal from the previous question have finite energy? Does it have finite power? If
the answer to either question is yes, find the value of the energy or power.
3. What is sinc(t) ∗ sinc(t)? Hint: use the convolution theorem.
4. Suppose a system acts on signal x and produces output y by the rule
y(t) = |x(t + 3)|.
Is the system linear? Is the system time invariant? Is the system causal?
5. Let x(t) be the signal given by cos(2πf t) for 0 ≤ t ≤ T and 0 otherwise, where T = 1/f. Find
the Fourier transform, X(ω), of this signal. Demonstrate Parseval’s theorem by comparing
the norms of x and X.
6. Suppose we pass x(t) from the previous question through the system from question 4. Use
MATLAB to find the amplitude and phase of the output signal’s Fourier transform Y (ω).
Plot X(ω) as well – how do the signals compare?
7. Let z(t) = y(t) cos(64πt + θ). Write z as a sum of in-phase and quadrature components. Plot
the Fourier transform Z(ω) for θ = π/3, and comment on the effect of the modulation on the
amplitude and phase (comparing to Y (ω).
8. Write a function that takes as an input a time-domain signal and outputs the Hilbert transform
of that signal (also in the time-domain). Plot the Hilbert transforms of x, y and z in the
frequency and time domains.
9. Using MATLAB, demonstrate the orthagonality of a signal and its Hilbert transform for all
of x, y and z.
ECE300 Communication Theory Homework 2
Load a short audio clip (either one you record, one from online or one built in to MATLAB)
into MATLAB and call this signal m(t). You will explore noise-free AM strategies using m(t) as
your message signal. Scale the message so that the maximum, in absolute value, is 1.
1. Plot m(t) in time and its Fourier transform M(ω) (both amplitude and phase). What is the
bandwidth of your message?
2. Generate a carrier signal over the same timespan to be used for DSB-SC AM and DSB AM.
There is no one signal that will work here, but try to make it realistic! Hint: Think of the
sorts of frequencies used in AM radio to come up with a carrier frequency if you are having
trouble.
3. Generate the DSB-SC and DSB modulated signals with message m(t) and plot them in the
time and frequency domains. In one sentence, describe the difference.
4. Using the same carrier frequency, generate lower SSB and upper SSB AM signals, and plot
them in time and frequency.
5. Using the same carrier frequency, create a conventional AM signal (ensure you choose the
amplitude of the carrier correctly). Plot this signal in the time domain and frequency domain
as well.
6. For the conventional AM signal, do demodulate we rectify and then apply a low-pass filter. In
MATLAB, you should be able to rectify the signal in one line. Plot the rectified signal in time
and frequency. Then, design a first-order low-pass filter (you decide the cutoff frequency)
and apply it to the signal.
You can do this using MATLAB filter functions, or through
convolution in time/multiplication in frequency directly. Plot the resultant output signal in
time and frequency and play the signal as audio.
ECE300 Communication Theory Homework 3
1. A source generates 0s and 1s randomly according to a Bernoulli distribution, where the
probability of a 0 is 0.3 and the probability of a 1 is 0.7. The value is then sent across a long
wire, and corrupted by thermal noise.
A system at the other end receives the corrupted signal
and guesses if it received a 1 or a 0. It has an error probability (either guessing a 1 was a 0
or guessing a 0 was a 1) of 0.2. If the receiver guesses it received a 1, what is the probability
a 1 was transmitted?
2. Let Θ be a random variable uniformly distributed from 0 to π. Let X = cos Θ and Y = sin Θ.
Are X and Y uncorrelated? Are they independent? Are they orthogonal?
3. Let X(t) be a random process defined by X(t) = A + Bt where A and B are independent
random variables uniformly distributed from -1 to 1. Find mX(t) and RX(t1, t2). Is the
process WSS? If not, is it cyclostationary? If the answer to either question is yes, find the
PSD of X.
4. Let X(t) = Y cos(ω0t)−Z sin(ω0t), where Y and Z are zero-mean independent Gaussians with
variance σ
2
. Find mX(t) and RX(t1, t2). Is the process WSS? If not, is it cyclostationary? If
the answer to either question is yes, find the PSD of X.
5. If X(t) has PSD SX(ω), what is the PSD of 4X0
(t) + X(t − T)?
6. In the discrete-time case, suppose we have a random process defined by {Xn} for n ∈ Z. If
we observe N samples of the random process, {xn} for n = 1, 2, . . . , N, we define the sample
autocorrelation as
RX(m) = ( 1
N−m
PN−m
n=1 xnxn+m, m = 0, 1, . . .
1
N−|m|
PN
n=|m|
xnxn+m, m = −1, −2, . . .
This approximates the autocorrelation. In practice, we don’t let m take infinitely many values,
but instead look at it over a finite range of values from −M to M for some integer M. The
Power Spectral Density is computed through the Wiener Khinchin Theorem, using the DFT
rather than the CTFT:
SX(ω) = X
M
m=−M
RX(m)e
−jωm
2M+1
Using MATLAB, write a function that takes an input vector of N samples and an integer M
as inputs, and returns the autocorrelation and PSD.
7. Use your function from above to plot the power spectral density white noise with some variance
you choose so as to validate your function’s operation. Make sure to use sufficiently large N
and M.
THERE IS A PROBLEM 8 DON’T STOP HERE
8. Use your function to plot the PSD of the of X(t) from problem 4 with ω = 10000 rad/s, as
well as the PSD of the integral of X(t). Please don’t perform an integral numerically (except
to check your work if you want to) – instead, use the relationship of PSDs at the input and
output of an LTI system.
ECE300 Communication Theory Homework 4
1. I have a baseband analog signal with a 20 kHz bandwidth. How fast must I sample to ensure
a 4 kHz guard band?
2. Suppose I have bandlimited noise with PSD 8 for frequency less than 200 kHz in absolute
value. Sampling this noise at Nyquist and applying a 16-level quantizer, what are the rate
and distortion (mean squared error)? What is the SQNR?
The next few problems will consider the following setup: Suppose I am doing a digital logic
design project, and I represent 1 as a 2.5 V pulse of duration A and 0 as a -2.5 V pulse of
duration A. My chips perform a least squares decision when they receive a signal.
The noise
over a wire is largely thermal noise caused by statistical variations in charge carriers, modeled
as AWGN. This noise has variance 4kBT R where kB ≈ 1.38 × 10−23 J/K is the Boltzmann
constant, T is the absolute temperature (in Kelvin) and R is the total resistance of the wire.
A commonly used wire type (available in the lab at school) is 22 AWG solid copper wire, for
which 1 m of wire has 52.7 mΩ resistance. Recall that resistance is proportional to length.
3. Describe the operation of a least squares decision system for this problem.
4. Is the least squares decision rule the same as a matched filter decision rule in this case? Is it
the same as maximum likelihood? Is it the same as maximum a posteriori? If there is not
enough information to answer, give the conditions that would guarantee the equality. In each
case, don’t just say “yes” or “no”, provide a one-sentence explanation.
5. What is the name of this modulation scheme? What is the basis? Draw the geometrical
representation.
6. For this scheme, suppose I transmit a 1 75% of the time – what are the MAP decision regions?
7. Assume now that the symbols are equiprobable. In terms of A, T and wire length L, write a
formula for the SNR and probability of error.
8. Assume we are operating the system at room temperature – how long does the wire have
to be to yield an error probability of 1/10? Write this number in lightyears. Compare this
to the size of the Milky Way. This should give you an appreciation for how robust wired
communication is to thermal noise.
“Professor, my project doesn’t work, and I think it might be because of thermal noise!”
ECE300 Communication Theory Homework 5
1. Describe when and why we use raised cosine pulses, citing the necessary conditions, at least
one theorem and drawing at least one figure.
2. True raised cosine pulses are not realizable – why not? What is done in practice to approximate
the raised cosine?
3. Find the entropy of a geometrically distributed random variable (that is, a variable with
probability mass function f(m) = p(1−p)
m−1
for positive integer m and some fixed probability
p) as a function of p.
4. Suppose a source has alphabet {a1, a2, a3, a4, a5, a6, a7, a8} with corresponding output probabilities {
1
16 ,
1
16 ,
1
4
,
1
32 ,
3
32 ,
1
8
,
1
16 ,
5
16 }. Determine the entropy of the source.
5. Design a Huffman code for the above source. Validate that it satisfies the Kraft inequality,
and that the average length satisfies the Huffman code entropy inequalities.
6. Find the transmission power (in Watts) necessary for an AWGN channel with N0 = 108 J
and transmission bandwidth B = 1 MHz to achieve a channel capacity of 1 Mb/s.
7. The next several questions will refer to the (n,k) linear block code with generator matrix
G =
0 1 1 1 0 1 1
1 0 0 1 1 1 1
0 0 1 1 1 0 1
You may use MATLAB to help with any question below, although they can all be done by
hand.
First – What are n and k?
8. Make a list of every data vector and associated codeword.
9. What is the minimum Hamming distance of the code, dmin? How many errors can this code
correct?
10. There exists a systematic code with the same codewords as this code – how can you know
that from looking at the list? It hould be straightforward to create the generator matrix of
this systematic code, GS.
11. Find the parity check matrix of GS, H.
12. Does H work as a parity check matrix for G? To help answer this, find GH and GSH.