h30231 s 00001/00001/00363 d D 1.31 23/11/01 15:24:02 bevans 31 30 c Up e s 00001/00001/00363 d D 1.30 21/12/03 19:01:37 bevans 30 29 c Updated e s 00009/00000/00355 d D 1.29 21/11/13 13:39:48 bevans 29 28 c Updated e s 00046/00020/00309 d D 1.28 21/11/01 17:56:06 bevans 28 27 c Updated e s 00021/00000/00308 d D 1.27 21/11/01 15:42:21 bevans 27 26 c Updated e s 00005/00001/00303 d D 1.26 21/10/31 14:24:53 bevans 26 25 c Updated e s 00010/00006/00294 d D 1.25 21/10/30 20:01:44 bevans 25 24 c Updated e s 00002/00002/00298 d D 1.24 21/10/30 18:39:04 bevans 24 23 c Updated e s 00017/00008/00283 d D 1.23 21/10/30 18:26:06 bevans 23 22 c Updated e s 00010/00002/00281 d D 1.22 21/10/29 15:24:06 bevans 22 21 c Updated e s 00010/00000/00273 d D 1.21 21/10/29 15:19:39 bevans 21 20 c Updated e s 00005/00000/00268 d D 1.20 21/10/29 08:56:09 bevans 20 19 c Updated e s 00045/00000/00223 d D 1.19 21/10/29 08:36:48 bevans 19 18 c Updated e s 00010/00006/00213 d D 1.18 21/10/28 23:09:30 bevans 18 17 c Updated e s 00026/00002/00193 d D 1.17 21/10/28 23:05:11 bevans 17 16 c Updated e s 00002/00001/00193 d D 1.16 21/10/28 22:35:58 bevans 16 15 c Updated e s 00018/00000/00176 d D 1.15 21/10/28 22:32:52 bevans 15 14 c Updated e s 00005/00004/00171 d D 1.14 21/10/28 22:14:41 bevans 14 13 c Updated e s 00001/00001/00174 d D 1.13 21/10/28 18:32:21 bevans 13 12 c Updage e s 00006/00000/00169 d D 1.12 21/10/28 18:30:41 bevans 12 11 c Updated e s 00027/00055/00142 d D 1.11 21/10/28 17:57:12 bevans 11 10 c Updated e s 00041/00002/00156 d D 1.10 21/10/28 10:53:07 bevans 10 9 c Updated e s 00012/00006/00146 d D 1.9 21/10/28 01:35:54 bevans 9 8 c Updated e s 00008/00000/00144 d D 1.8 21/10/28 00:39:50 bevans 8 7 c Updated e s 00017/00002/00127 d D 1.7 21/10/27 04:04:00 bevans 7 6 c Updated e s 00045/00003/00084 d D 1.6 21/10/27 03:01:59 bevans 6 5 c Updated e s 00002/00002/00085 d D 1.5 21/10/26 14:38:34 bevans 5 4 c Updated e s 00030/00000/00057 d D 1.4 21/10/26 14:27:50 bevans 4 3 c Updated e s 00026/00001/00031 d D 1.3 21/10/24 19:21:12 bevans 3 2 c Updated e s 00001/00028/00031 d D 1.2 21/10/24 19:14:27 bevans 2 1 c Updated e s 00059/00000/00000 d D 1.1 21/10/24 18:42:56 bevans 1 0 c date and time created 21/10/24 18:42:56 by bevans e u U f i f e 0 t T I 1
E 29 I 12
utplotspec used the obsolete
phase function to compute the phase response.
In the updated version, phase has been replaced with
D 23
a way to compute unwrapped phase using the Matlab commands unwrap
and angle.
E 23
I 23
a way to compute unwrapped phase using the Matlab commands unwrap
and angle.
E 23
E 14
E 12 I 4 D 5
D 6 s(t) = exp(j pi W t^2 / T for -T/2 ≤ t ≤ T/2. E 6 I 6 s(t) = exp(j pi W t2 / T) for -T/2 ≤ t ≤ T/2. E 6
in MATLAB using the parameters in Table 10.1 on page 320.
T = 25E-6; %% pulse length 25us W = 2E6; %% swept bandwidth 2MHz fs = 20E6; %% sampling rae 20 MHz Ts = 1/fs; t = (-T/2) : Ts : (T/2); s = exp(j*pi*W*(t.^2)/T);which gives a time-bandwidth product TW = 50.
Since s(t) is complex-valued, we could plot the real part:
figure; plot(t, real(s)); xlabel( 't' );
I 6 As continuous time increases from -T/2 to 0, the chirp decreases in frequency from -W/2 to 0, and then increases in frequency from 0 to W/2 from time 0 to T/2.
E 6 The next step is to connect s(t) for -T/2 ≤ t ≤ T/2 D 6 and s[n] for 0 ≤ n ≤ N-1. E 6 I 6 and s[n] for 0 ≤ n ≤ N-1 where
s[n] = exp(j 2 pi alpa (n - N/2)2)
With a sampling time of Ts, the N samples in discrete time span T seconds of continuous time, i.e. T = N Ts.
The problem asks us to find correct formulas for alpha and N in terms of p and T W. We know the following:
fs = p W
Ts = 1 / fs = 1 / (p W)
T = N Ts = N / (p W)
From the last equation, we can get the relationship for N in terms of p and T W:
T W = N / p
N = p T W
Here, N has to be an integer. E 6 D 7 In order to have a symmetric signal s[n] and include the origin of s(t), N will have to be odd. E 7
I 7 The text has the following note in part (a):
(Note: It may not be possible to make the discrete-time chirp symmetric, depending on how the sampling times are defined. Starting at tn = -T/2 may not be the best strategy if t = 0 is not included in the sampling gird.)
When sampling s(t), the first sample is taken at -T/2 and the subsequent N-1 samples are taken at increments of Ts. The origin is included. However, the most positive sample time is at -T/2 + (N-1) Ts, which does not include the sample at time T/2 because that would correspond to s[N]. The value of s[0] = s(-T/2) = exp(pi T W / 4) is not zero, which means that s[n] is not conjugate symmetric about its midpoint.
E 7 D 6 More hints for Exercise 1.1 to follow shortly. E 6 I 6 To find the value for alpha in terms of p and T W, there are a couple of different ways:
I 6 Please show your work in your report. For reference, my intermediate answer is
alpha = T W / (2 N2)
and from there, you can substitute information from above to express alpha in terms of p and T W.
I 15
function s = dchirp( TW, p ) % DCHIRP generate a sampled chirp signal % usage s = dchirp( TW, p ) % s : samples of a discrete-time "chirp" signal % exp(j pi (W/T) t^2 ) for -T/2 <= t <= T/2 % TW : time-bandwidth product % p : sample at p times the Nyquist rate (W) N = p*TW; alpha = TW / (2*N^2); n = 0 : N-1; s = exp(j*2*pi*alpha*(n - N/2).^2);
I 21
E 21 E 15 I 8 D 10
utplotspec(x, Ts);where x is the discrete-time signal and Ts is the sampling time. I 22 Please use the value for Ts for the chirp signal being analyzed. E 22 E 9
I 9
D 10
The utplotspec function will plot a magnitude and phase of the signal's
E 10
I 10
The utplotspec function will plot a magnitude and phase of the signal's
E 10
Fourier transform vs. frequency in Hz and return the frequency-domain
samples computed by the FFT algorithm and their corresponding frequencies in Hz.
Please see Appendix A in the Mini-Project #2 assignment for more information
on the connection between the discrete-time Fourier transform and the FFT.
I 10 D 11
D 11
The utplotspec command returns two vectors:
[ fourierInfo, contFreqValues ] = utplotspec(x, Ts);E 11 I 11
D 11 We can compute the total power in the frequency domain by summing the magnitude squared of each frequency domain sample:
totalPowerInTime = sum( abs(fourierInfo).^2 );E 11 I 11
I 21
E 21 D 11 In a similar way, we can compute the power over a range of frequencies. E 11 I 11
D 11
D 11 At any point in time, the instantaneous power is the square of the magnitude of the signal value. This is the power through a 1 Ohm resistor. To compute the total power, we can add up all of the instantaneous power:
totalPowerInTime = sum( abs(x).^2 );In a similar way, we can compute the total power in the frequency domain. For the discrete-time Fourier transform, we would have to integrate the frequency content magnitude squared from -pi to pi.
However, we can answer this problem without using Parseval's Theorem. E 11 I 11
I 17 D 28
I 23 To find the distance, a radar system will transmit a discrete-time complex chirp pulse signal s[n] as a continuous-time signal through its antenna. After that, we process the received signal to try to detect the chirp after it bounces off a metallic object in the environment and returns to the radar. The processing applies the matched filter to the received signal and searches for a peak in the absolute value of the output signal of the matched filter. Based on the time at which the peak in the response occurs, we can estimate the round-trip delay from the radar transmission to the radar reception, and use the round-trip delay to find the distance of the object.
E 23 D 24 The matched filter is an linear time-invariant (LTI) finite impulse E 24 I 24 The matched filter is a linear time-invariant (LTI) finite impulse E 24 response (FIR) filter whose impulse response is directly related to the pulse shape to be detected. D 23 In discrete time, for a pulse shape s[n], the matched filter would have an impulse response h[n] equal to E 23 I 23 In discrete time, for a discrete-time complex-valued pulse shape s[n], D 25 the matched filter would have an impulse response h[n] equal to E 25 I 25 the matched filter would have an impulse response E 25 E 23
D 18 h[n] = s*(-n) E 18 I 18 h[n] = s*[-n] E 18
D 25
where * indicates complex conjugation.
The relevant Matlab commands are fliplr to flip the vector
D 18
of signal values implement the argument "-n" in s*(-n) and
E 18
I 18
of signal values implement the argument "-n" in s*[-n] and
E 18
conj to conjugate the values of the signal.
E 25
I 25
where * indicates complex conjugation and the argument -n
means to flip the signal in time.
The relevant Matlab commands are
conj to conjugate the elements of the vector of signal values and
fliplr to flip the vector of signal values.
You could conjugate the vector of signal values and then flip the
resulting vector, or vice-versa.
The answer will be the same either way.
E 25
I 18 By using h[n] = s*[-n], the matched filter will correlate the received signal against the pulse shape s[n]. When the correlation is high, i.e. the output of the matched filter D 25 is high in absolute value, there is a detection of the pulse. E 25 I 25 is high enough in absolute value, the pulse has been detected. E 25 I 19 See the comments below on Exercise 2.1(c) concerning correlation. E 19
I 28 This problem introduces a constant G without explaining what it represents. It could represent the attentuation experienced by the propagating pulse. Please set it to one.
E 28 E 18 The phrase "mainlobe" refers to the shape of the real part of the chirp pulse in the time domain around its middle values, i.e. at t = 0 for the continuous-time chirp and n = (N-1)/2 for the discrete-time chirp.
I 28 Please see Exercise 2.1(b) Hint #2 next.
s(t) = exp(j pi W t2 / T) for -T/2 ≤ t ≤ T/2.
In MATLAB, using the parameters in Table 10.1 on page 320, a vector of samples for s(t) can be defined as
T = 25E-6; %% pulse length 25us W = 2E6; %% swept bandwidth 2MHz fs = 20E6; %% sampling rae 20 MHz Ts = 1/fs; t = (-T/2) : Ts : (T/2); s = exp(j*pi*W*(t.^2)/T);To delay a signal by Td seconds, we would write mathematically
s(t - Td)
For the continuous-time chirp signal, the range of continuous-time values would be
-T/2 ≤ t - Td ≤ T/2
which is equivalent to
(-T/2) + Td ≤ t ≤ (T/2) + Td
In the MATLAB code, we could change the range of t being evaluated in the second-to-last line of the code to be
t = (-T/2) + Td : Ts : (T/2) + Td;In addition, please see Exercise 2.1(b) Hint #1 above.
E 28 E 17 E 10 E 9 E 8 E 6 E 4 D 2
"Noise" is a random signal. That is, each amplitude value is a random number.
Additive thermal noise is commonly modeled as having a Gaussian distribution. Thermal noise is from random motion of electrons due to temperature. The hotter the temperature, the more motion and hence noise power there is.
In Matlab, the randn generates one real-valued random value that follows
a Gaussian (Normal) distribution with zero mean and unit variance.
The following code will create a column vector of N values of a complex normal
distribution:
N = 700; variance = 10; complexGaussianNoise = sqrt(variance/2)*(randn(N,1) + i*randn(N,1));One can check the random signal values by computing the mean, which should close to zero, and the variance, which should be close to 10:
mean(complexGaussianNoise) var(complexGaussianNoise) E 2 I 2 D 3
oo *
R [k] = Sum x[n] y [n+k]
xy n=-oo
The outer discrete-time variable k indicates the shift in time between
the two discrete-time signals.
That is, correlation involves sliding y*[n] across x[n]
and summing the result for each value of the shift, k.
Correlation is very similar to convolution:
oo * oo *
R [k] = Sum x[n] y [n+k] = Sum x[n] y [k+n]
xy n=-oo n=-oo
In convolution, the y*[k+n] term would be y*[k-n].
Note that the roles of k and n are reversed in correlation.
We can write correlation as
*
R [k] = x[n] * y [-n]
xy
That is, prior to convolution, we'll flip y*[n] and convolution will flip it back. That way, we'll "fool" convolution to perform sliding y*[n] across x[n].
Autocorrelation measures how similar a signal x[n] is vs. shifts in time of itself:
oo *
R [k] = Sum x[n] x [k+n]
xx n=-oo
I 20 The maximum value for Rxx[k] occurs when k = 0, i.e. when x[n] is aligned with x*[n]. For a complex-valued signal x[n], the product x[n] x*[n] is the magnitude squared of x[n] because the phases subtract out.
E 20
E 19
D 17
The built-in Matlab command for correlation is xcorr.
Using xcorr with one argument will compute the autocorrelation.
E 17
I 17
The built-in Matlab command for correlation is xcorr.
Using xcorr with one argument will compute the autocorrelation.
E 17
E 11
D 11 "Noise" is a random signal. That is, each amplitude value is a random number. E 11 I 11
I 27
D 28 s(t) = exp(j pi W t2 / T) for -T/2 ≤ t ≤ T/2.
In MATLAB, using the parameters in Table 10.1 on page 320, a vector of samples for s(t) can be defined as
T = 25E-6; %% pulse length 25us W = 2E6; %% swept bandwidth 2MHz fs = 20E6; %% sampling rae 20 MHz Ts = 1/fs; t = (-T/2) : Ts : (T/2); s = exp(j*pi*W*(t.^2)/T);In the second-to-last line, we could change the range of t being evaluated to be
t = (-T/2) + Td : Ts : (T/2) + Td;
E 28 E 27 D 11 Additive thermal noise is commonly modeled as having a Gaussian distribution. Thermal noise is from random motion of electrons due to temperature. The higher the temperature, the more motion and hence noise power there is. E 11 I 11
D 11
In Matlab, the randn generates one real-valued random value that follows
a Gaussian (Normal) distribution with zero mean and unit variance.
The following code will create a column vector of N values of a complex Normal
distribution:
E 11
I 11
D 11
N = 700; variance = 10; complexGaussianNoise = sqrt(variance/2)*(randn(N,1) + i*randn(N,1));One can check the random signal values by computing the mean, which should be close to zero, and the variance, which should be close to 10:
mean(complexGaussianNoise) var(complexGaussianNoise) E 11 I 11
E 11 E 3 E 2
bevans@ece.utexas.edu
E 1