Professional Documents
Culture Documents
Experiment 04
Experiment 04
DISCUSSION:
SIGNAL SMOOTHING
As indicated earlier, the purpose of signal processing is to generate a signal with more desirable properties from
one or more given discrete-time signals. The processing algorithm consists of performing a combination of basic
operations such as addition, scalar multiplication; time-reversal, delaying, and product operation. We consider here
very simple example to illustrate the application of such operations.
A common example of a signal processing application is the removal of the noise component from a signal
corrupted by additive noise.
Let s[n] is the signal corrupted by a random noise d[n] resulting in the noisy signal: x[n]=s[n]+d[n]. The objective
is to operate on x[n] to generate a signal y[n] which is a reasonable approximation to s[n].
To this end, a simple approach is to generate an output sample by averaging a number of input samples around the
sample at instant n.
For example, a three-point moving average algorithm is given by:
y[n]=1/3(x[n-1]+x[n]+x[n+1])
x1 = [0 0 x];
x2 = [0 x 0];
x3 = [x 0 0];
y = (x1 + x2 + x3)/3;
subplot(2,1,2);
plot(m,y(2:R+1),'r-',m,s,'g--');
legend('y[n] ','s[n] ');
xlabel('Time index n');
ylabel('Amplitude');
QUESTIONS
Q4.1 Run Program P1_4 and generate all pertinent signals.
Q4.2 What is the form of the uncorrupted signal s[n]? What is the form of the additive noise d[n]?
Can you use the statement (x=s+d) instead of (x=s+d') to generate the noise-corrupted signal?
Q4.3
If not, why not?
Q4.4 What are the relations between the signals x1, x2, and x3, and the signal x?
Q4.5 What is the purpose of the legend command?