-1
-2
0 1 2 3 4 5 6 7 8
time -- msec
Noise(blue) and colored noise n1
1
0.5
-0.5
-1
0 1 2 3 4 5 6 7 8
time -- msec
Figure 1.
NoisySigal is not different from original signal much as shown in
upper diagram of Figure 1, because the amplitude of colored noise
(n1) is relatively small (lower part of the graph). In general, ANC
problem is solved by the ON-LINE or real time LMS algorithm, instead
of off-line approach. Therefore the for loop (c) is not necessary.
-1
-2
0 1 2 3 4 5 6 7 8
time -- msec
estimation error
2
-1
0 1 2 3 4 5 6 7 8
time --[msec]
Figure 2.
The error plot is not good enough (on-line mode) as shown in Figure
2. Of cause if off-line approach is used, the plot will be better in
performance than those shown in Figure 2.
The better way is to choose the random Gaussian or uniform random
number as noise source instead of saw tooth wave. The ANC solution is
apparent in this case.
[Modification of program]
[w;W]
[mse2(signal);mse2(noisySignal);mse2(errx)]
A4=sum(Wlist.*Px);
figure(45);subplot(211);plot(time,signal,time,T-A4)
title('Input:signal(blue) and estimated signal: restored');
grid on;subplot(212);plot(time,signal-(T-A4))
title(['delays=[' num2str(delays) '],estimation error']);
xlabel(['MSE=' num2str(MSE) ',Off-line mode, time(msec)']);
axis(ax);grid on;
Input signal(red) and noisy input:noisySignal
5
-5
0 2 4 6 8 10 12 14 16 18 20
time -- msec
Noise(blue) and colored noise n1
4
-2
-4
0 2 4 6 8 10 12 14 16 18 20
time -- msec
Figure 3.
-1
-2
0 2 4 6 8 10 12 14 16 18 20
time -- msec
estimation error
1
0.5
-0.5
-1
0 2 4 6 8 10 12 14 16 18 20
Off-line mode,time --[msec]
Figure 4.
ANC solution is quite apparent as shown in Figure 4. Figure 5 shows
the on-line mode result. Figure 6 shows the off-line mode result.
Figure 5 shows the real-time case in normal ANC approach, while
Figure 6 is in off-line or non-real time mode. Off-line mode means
that once we have all waveforms (no restored yet), we do the
reconstruction of restored signal from noisy_signal by an adaptive
filter. Figure 7 is a duplicate of Figure 6 by calculating
A4=sum(Wlist.*Px);
Input:signal(blue) and estimated signal: restored
2
-2
-4
0 2 4 6 8 10 12 14 16 18 20
time -- msec
delays=[0 1 2 3],estimation error
1
0.5
-0.5
-1
0 2 4 6 8 10 12 14 16 18 20
MSE=0.5852,On-line mode, time(msec)
Figure 5.
-1
-2
0 2 4 6 8 10 12 14 16 18 20
0.5
-0.5
-1
0 2 4 6 8 10 12 14 16 18 20
MSE=0.5518,Off-line mode, time(msec)
Figure 6.
Input:signal(blue) and estimated signal: restored
2
-1
-2
0 2 4 6 8 10 12 14 16 18 20
0.5
-0.5
-1
0 2 4 6 8 10 12 14 16 18 20
MSE=0.5518,Off-line mode, time(msec)
Figure 7.
[w;W]
[mse2(signal);mse2(noisySignal);mse2(errx)]