1.3. Easy, Hard, and Impossible Problems
Since our goal is to describe statistical signal processing algorithms that are widely used in practice, we may ask how these algorithms have attained this place of great honor. The reasons are two-fold. The first is that they “work” and the second is that they can be conveniently implemented in digital software/hardware. For an algorithm to “work”, it must meet the specifications of the system. For example, it might be that a specification calls for a parameter to be estimated. The performance of the estimator should be a relative error of no more than 2.5%, as an example. Hence, whether an algorithm “works” or not depends upon what is expected of the algorithm. If the specifications are unreasonable, then a proposed approach or any approach may not work. It is therefore important to assess the feasibility of meeting the performance requirements. For the latter example, a commonly used method for feasible parameter estimation accuracy is the Cramer-Rao lower bound (see Section 8.2.1). It provides a lower bound on the variance of an unbiased estimator (i.e., one that on the average yields the correct result). If the specifications cannot be met in theory, then there is no point in proceeding with a design. Maybe we should require more accurate sensors, if this is a possibility, and/or more data. Given a signal model and a noise model (we will discuss this further in Chapters 3–6), signal processing is capable of providing implementable algorithms that extract all the available information. This information, we hope, is sufficient to yield the desired performance. However, it cannot do the impossible, although we may ask it to do so! As an example, suppose we wish to estimate the value A of a constant discretetime signal s[n], also referred to as a DC level signal (presumably a continuous-time signal that has been sampled by an analog-to-digital (A/D) convertor). The signal is given as
- s[n] = A n = 0, 1,...,N − 1
and is embedded in white Gaussian noise (WGN) w[n] with power σ2 (see Section 4.3). The observed data is then given by x[n] = A + w[n] for n = 0, 1,...,N − 1 and from this data we wish to determine A as accurately as possible. It is well known that the optimal way to do this is to employ the estimator given by the sample mean
(The “hat” will always denote an estimator.) Suppose that A = 10 and that our specifications require for N = 20 and σ2 = 1 that the estimate should fall within the interval [A − 0. 25 , A + 0.25], which for this choice of parameter would be [9.75, 10.25], a maximum relative error of 2.5%. A MATLAB computer simulation is shown in Figure 1.1, in which the estimate ÂN is plotted versus the data record length N.1 (We have connected the points (Â1, Â2,...) in the figure by straight lines to make the viewing easier.) Since our specification was for N = 20, the results seem to indicate that it has been met, with the estimate falling between the dashed lines at 9.75 and 10.25 at N = 20.
Figure 1.1. Estimate of DC level A versus data record length N.
However, this good performance may just be fortuitous in that if we repeat the experiment, whereby a different set of WGN samples w[n] are generated, then we might obtain very different results. In Figure 1.2 the results of five different experiments, corresponding to five different WGN realizations, are shown. (Each realization of N = 100 noise samples will be different.)
Figure 1.2. Five different realizations of the DC level estimator.
Now the specification is not met for N = 20 data points and only appears to be met for more than about N = 40 points. In fact, if we require that the estimate fall within the dashed lines for N = 20 and for 95.5% “of the time”, then it can be shown that the variance var(ÂN) of the estimator must satisfy
or equivalently
But the Cramer-Rao lower bound says that all (unbiased) estimators must have
which for σ2 = 1 and N = 20 produces a lower bound of 1/20, and so this specification is impossible to meet. We will see later that the estimator ÂN, called the sample mean estimator, does indeed attain the bound and so its variance is given by equality in (1.1). Therefore, to meet the specification we would require
which is to say that N must be at least 64 data samples for a noise power of σ2 = 1. As a side note, the reader should heed the implicit lesson seen in Figures 1.1 and 1.2. Since the results depend upon the particular noise sequence generated, it is imperative that the experiment be repeated many times. No conclusions can be drawn from only a few realizations, and in fact, in Figure 1.2 many more realizations should be added.
Exercise 1.1 – Necessity of multiple realizations for performance analysis
- Run the MATLAB program FSSP3exer1_1.m for 100 noise realizations and for N = 64. Do about 95 of the estimates fall within the specified interval [9.75, 10.25]?
- If the accuracy specification is increased to 1% maximum relative error, what should var(ÂN) be? How long does the data record length N need to be to attain this? Finally, modify the code in FSSP3exer1_1.m to simulate the performance for this larger value of N. How many estimates meet the specification?
Some signal processing problems appear in many different fields. For example, it is of interest to be able to accurately determine the frequency of a sinusoidal signal when the signal is embedded in noise. A mathematically optimal approach is to use a periodogram, which is a type of spectral estimator, and pick the location of the maximum value as the estimate (see Algorithm 9.3). This works well in practice and has found widespread acceptance for numerous applications. Additionally, even if the underlying assumptions that need to be made to claim optimality are violated somewhat, the performance does not degrade radically. This is an example of a robust algorithm. In practice, robustness can be a critically important property of an algorithm. Few real-world data sets conform to a set of underlying theoretical assumptions. These assumptions are usually made for mathematical tractability so as to allow the derivation of an optimal approach. We might term the design of a frequency estimator of a single sinusoid as an easy problem, since the solution that performs well and is easily implemented (via an FFT) is the periodogram. Of course, to justify its use, the underlying assumption that we have a single sinusoid embedded in WGN, cannot be totally ignored. If other sinusoids or interfering signals are present and/or if the noise is highly correlated, then this approach may not perform as advertised. Specifically, if a second sinusoid is close in frequency to the one of interest, then the frequency estimator can be severely biased, producing an inaccurate estimate. An example of this is given in Figure 1.3. In Figure 1.3a the periodogram of a single sinusoid with an amplitude of one at a frequency of 0.2 is shown. The maximum is seen to occur at the correct location in frequency. In Figure 1.3b the periodogram is shown for the sum of two sinusoids, the desired one at a frequency of 0.2 combined with an interfering sinusoid at a frequency of 0.22, also with an amplitude of one. It is seen that the peak is now biased away from the desired frequency of 0.2. To account for this possibility we must alter our thinking and acknowledge the potential for one or more interfering sinusoidal signals. This additional complication then leads to a hard problem [Kay 1988]. There may not be a good solution, especially if the frequencies of the interfering sinusoids are unknown. As the reader has no doubt surmised, properly designed algorithms work well (and some can be said to be optimal in performance) when the assumptions under which they were designed are satisfied. It is therefore critical that we be able to verify that these assumptions hold in practice. To prepare ourselves for disappointing performance results we need to assess not only the good properties of the algorithm but also it limitations.
Figure 1.3. Periodogram of a sinusoidal signal and also a sinusoidal signal plus an interfering signal.
It is often the case that a seemingly difficult or hard problem will yield to an easier one if viewed appropriately. It is well known that the linear signal model (see Sections 3.5 and 3.6.4 for a description) leads to optimally performing and easily implementable algorithms. In the real world not all signals can be said to conform to this model. Knowing, however, of the desirable properties of the linear model, it behooves us to try and transform our nonlinear model into a linear one. Continuing with the sinusoidal signal example, we have its mathematical representation in discrete-time as
where A is an unknown amplitude with A > 0, f0 is a known frequency with 0 < f0 < 1/2, and φ is an unknown phase with − π ≤ φ < π. We might wish to estimate the unknown amplitude and unknown phase. As it stands, however, the signal is nonlinear in the phase (since A cos(2πf0n + φ1 + φ2) ≠ A cos(2πf0n+ φ1)+ A cos(2πf0n + φ2)), and this will complicate the development of any estimation algorithm. To convert this problem into a more manageable one, we could use the trigonometric identity cos(C + D) = cos(C) cos(D) − sin(C) sin(D) to yield
- s[n] = A cos(φ) cos(2πf0n) − A sin(φ) sin(2πf0n)
and then let α1 = A cos(φ) and α2 = − A sin(φ) (which is just a type of polar to Cartesian coordinate transformation) to produce
The signal is now linear in the unknown transformed parameters α 1, α2. We have transformed the original hard problem into a relatively easy one, and furthermore, into one whose solution is well known. It can be shown that a good estimator of amplitude and phase based on the observed data set {x[0], x[1],..., x[N − 1]}, which consists of the sinusoidal signal plus noise, is (see Section 3.5.4 and Algorithm 9.2)
But to do so we had to have been familiar with the easy problem (the linear signal model) and then been able to choose the appropriate transformation. In practice, knowledge of easy problems for which we have already known solutions is indispensable. This book contains many of these well known solutions.
In the real world most of the signal processing problems are hard (if they were not, then someone would have already solved them!). But knowing the solutions to simpler problems and building upon the intuition that familiarity with these problems brings, can lead to good solutions for more difficult problems. For example, in (1.3) we might not know the frequency f0. How could we then estimate the frequency in addition to the amplitude and phase? It can be shown that the magnitude of the discrete-time Fourier transform of a time truncated sinusoid, i.e., of (1.2), is
as long as f0 is not very close to 0 or 1/2. You are asked to verify this in the next exercise (the solution is contained in Appendix 1A).
Exercise 1.2 – Derivation of discrete-time Fourier transform of truncated sinusoid
Verify the expression given in (1.6). To do so first break the real sinusoid given in (1.2) into its two complex conjugate components exp(j2πf0n) and exp(−j2πf0n), insert these into (1.5) and then use the complex geometric series result
where the first equality is true for all complex z and the second equality is only true for |z| = 1, where | · | denotes the complex magnitude. Finally, discard the negative frequency contribution, which is negligible if we are evaluating the Fourier transform for f > 0 (and f0 is not near 0 or 1/2).
A plot of |S(f)| is shown in Figure 1.4 for A = 1, N = 20, and f0 = 0.2. This suggests that we might be able to estimate the frequency by using the peak location in frequency as our estimator, and in fact forms the basis for the periodogram estimator previously mentioned and illustrated in Figure 1.3a. Although the effect of noise has not been included in our discussion, it does indeed turn out that even when noise is present, the estimator performs well (see Algorithm 9.3). This result is also intuitively clear in that for large data records, i.e., as N → ∞, the Fourier transform becomes a Dirac impulse, and so should “stand out” above any noise background. The need for a good sense of intuition cannot be overemphasized. It prevents us from pursuing algorithmic approaches that result in dead ends and it explains why a good algorithm works well, apart from the mathematical justification—if there is one. How does one obtain this intuition? Answer: Practice, practice, practice!
Figure 1.4. Magnitude of discrete-time Fourier transform of time truncated sinusoid.