hamming
.
The amplitude values of the causal Hamming window
of length N samples is defined as
w[n] = 0.54 - 0.46 cos(2 pi n / (N - 1))for n = 0, 1, ..., N-1.
The group delay of a Hamming pulse of length N samples is (N-1)/2 samples.
More on applications for adaptive algorithms on homework assignments 6 and 7.
The basic idea of steepest descent is illustrated on Figure 6.15 at the top of page 116 in JSK. We are trying to find the value x* that is the minimum for a cost/objective function J(x) by updating x at each iteration so that we make progress toward the minimum value. The minimum value will be reached when J'(x*) = 0. If our current value for x > x*, then we want to decrease x. If our current value for x < x*, then we want to increase x. The update equation for iteration k+1 to realize these goals is shown in JSK (6.5):
d | x[k+1] = x[k] - mu -- J(x) | dx | x = x[k]Here, mu is a constant positive value that controls by how much x is updated in each iteration. Generally, mu is kept small, e.g. 0.1 or 0.01 or even 0.001. When mu is zero, no update to the initial guess is made during the iterations. When J'(x[k]) = 0, the minimum value of the objective function is reached, and x[k+1] = x[k].
The choice of mu has an analogy with the location of a single real-valued pole in a discrete-time LTI system. Consider using a squared distance for J(x), e.g. J(x) = x2. Then, J'(x) = 2 x and
x[k+1] = x[k] - mu (2 x[k]) = (1 - 2 mu) x[k]This is a recursive difference equation with a pole at 1 - 2 mu. When mu = 0, the pole is at location 1, which is BIBO unstable. When mu = 1, the pole is at location -1, which is also BIBO unstable. The update is BIBO stable when 0 < mu < 1.
The error surface is "basically a plot of the objective as a function of the variable that is being optimized" (JSK page 118). Examples of error surfaces are in Fig. 6.17 on JSK page 119.
In this problem, the objective function is of the form J(x) = (x - C)2 which has a global minimum at x = C.
Problem 2.1 on spring 2016 midterm #2 might be helpful in solving this problem.
Marker board explanation of this problem from spring 2020 might also be helpful.
The problem is based on the code in idsys.m. In idsys.m, parameter l is set to 125. Page 172 of Software Defined Radio has the following explanation: "The initial delay of 125 corresponds to half the length of the lowpass filter (0.5*fl) plus half the length of the correlator filter (0.5*M) plus half a symbol period (0.5*M), which accounts for the delay from the start of each pulse to its peak."
Correction: The parameter l is the delay in samples through the transmitter and receiver in Fig. 9.1 on page 166 in JSK. The transmitter has a pulse shaping filter of length M samples, which has a group delay of (M-1)/2 samples. The receiver has a lowpass demodulating filter, which is a linear phase finite impulse response filter with a group delay of f1/2 samples because f1 is the filter order. The receiver also has a pulse correlator filter (a.k.a. matched filter) of M samples, which has a group delay of (M-1)/2 samples. Assuming that the receiver is synchronized with the transmitter with respect to symbol timing, the total delay l is 0.5*f1 + M - 1 samples. The book has 0.5*f1 + M.
In analyzing the results, it might be helpful to analyze the sequence of processing steps in the transmitter and receiver in idsys.m in the discrete-time frequency domain as follows.
The parameter M controls the number of samples per symbol. Hence, the duration of the discrete-time pulse shape is M samples.
In continuous time, the wider the pulse, the narrower the bandwidth. For example, a rectangular pulse of T seconds in duration has a null bandwidth of 1/T in Hz or 2 pi / T in rad/s, as seen in homework problem 0.1. A similar insight holds in discrete time. For example, a rectangular pulse of N samples in duration has a null bandwidth of 2 pi / N in rad/sample.
The Matlab simulation is in discrete time. The discrete-time index is implied in the Matlab code
t= 1/M : 1/M : length(x)/M;which can be rewritten as
n = 1 : length(x); t = n / M;M is both the number of samples per symbol and the sampling rate.
c(t) = cos(2 pi fc t)Letting t = n / M,
c[n] = cos(2 pi (fc / M) n)To prevent aliasing, M > 2 fmax where fmax = 2 fc + 2, as described in the next paragraph. With M = 100, having fc < 24 would prevent aliasing. In idsys.m, fc = 20.
For the communication system in idsys.m, it might help to draw the key signals in the continuous-time Fourier domain: transmitter baseband signal, transmitted modulated signal, received modulated signal and received baseband signal. Assume that the sampling rate fs is chosen such that fs > 2 fmax where fmax = (2 fc + 2) and only plot frequencies from -fs/2 to fs/2. In idsys.m, fs = M.
All polyphase filters see the same input signal a[n], which is a stream of symbol amplitudes. Part 3 illustrates a polyphase filter bank sharing one delay line, which stores the current and previous Ng symbol amplitudes, instead of each polyphase filter having its own identical delay line.