Digital Signal Processing Reference
In-Depth Information
6
Case Studies
Digital signal processing is all-pervading, so we have mostly selected the areas that
interest engineers. Often the solutions look very similar, indicating many common-
alities between them. These case studies also demonstrate that it is very difficult to
categorise a given problem as exclusively DSP or non-DSP. Frequently we need to
stretch our engineering hand a little and remove our blinkers to get an overall view
of the solution.
In addition, problems are non-linear and we need a good systems background as
well as DSP. Inverse problems are more difficult than forward problems or
synthesis. For instance, the design of a filter for a given specification is trivial. It
is the combinations of many disciplines put together that makes a problem very
interesting. Perhaps you feel that problems are centred around some common
solutions. But this chapter aims to demonstrate that the essence of any solution is a
good problem formulation.
6.1 Difference Equation to Program
The following C code is for a digital filter implementation that includes testing by
exciting it with a white Gaussian noise (WGN); the output is captured in the file
filter.dat . The spectral characteristic of the output time series is the same as that
of the filter, since the input is a WGN. This code demonstrates only that converting
a given difference equation to a code is relatively trivial. Here we designate
xk1
¼
x k , xk2 ¼
x k 1 , xk3 ¼
x k 2 and the filter
is x k ¼
0
:
5871 x k 1
0
:
9025
x k 2 þ
0
:
0488
ð
u k
u k 2 Þ
.
// Translating a difference equation to C
# include <stdio.h>
# include <stdlib.h>
Search WWH ::




Custom Search