Reply by Al Clark November 18, 20052005-11-18
"ralph" <rklimski@o2.pl> wrote in news:1132348580.690793.76180
@g43g2000cwa.googlegroups.com:

> If I delayed of 1 sample the output was just quiet, the same result I > have if I delayed of 2 sample all samples was reset to zero. I tried to > find something about w9gr. > Thanks for all information, and if you know something more about > adaptive noise cancellation (other algoritms or other metods) please > e-mail me: rklimski@o2.pl or please write on this news. > Ralph Klimski > >
I know a lot about this topic but we are entering into stuff that we don't share. Here is a link describing the W9GR ANC: http://www.johanforrer.net/ASP/index.html -- Al Clark Danville Signal Processing, Inc. -------------------------------------------------------------------- Purveyors of Fine DSP Hardware and other Cool Stuff Available at http://www.danvillesignal.com
Reply by ralph November 18, 20052005-11-18
If I delayed of 1 sample the output was just quiet, the same result I
have if I delayed of 2 sample all samples was reset to zero. I tried to
find something about w9gr.
Thanks for all information, and if you know something more about
adaptive noise cancellation (other algoritms or other metods) please
e-mail me: rklimski@o2.pl or please write on this news.
Ralph Klimski

Reply by Al Clark November 18, 20052005-11-18
"ralph" <rklimski@o2.pl> wrote in news:1132333722.394654.96050
@g49g2000cwa.googlegroups.com:

> And what shall I do if the primary signal which I want to clear haven't > got period? My primary signal is only recorded speech with ading white > noise - it has got 40000 samples, and I treid to make delay 10, 100, > 1000 samples and it didn't work, how to easy find the delay? Is there > any way to find it? > >
The type of noise reduction you are discussing is well known. It is not a great method. There was a ham radio article on exactly this method in the early 1990s. Search on keyword: W9GR -- Al Clark Danville Signal Processing, Inc. -------------------------------------------------------------------- Purveyors of Fine DSP Hardware and other Cool Stuff Available at http://www.danvillesignal.com
Reply by Al Clark November 18, 20052005-11-18
"ralph" <rklimski@o2.pl> wrote in news:1132333722.394654.96050
@g49g2000cwa.googlegroups.com:

> And what shall I do if the primary signal which I want to clear haven't > got period? My primary signal is only recorded speech with ading white > noise - it has got 40000 samples, and I treid to make delay 10, 100, > 1000 samples and it didn't work, how to easy find the delay? Is there > any way to find it? > >
Try a delay of 1 sample. If you use many samples, the speech is decorrelated to itself. -- Al Clark Danville Signal Processing, Inc. -------------------------------------------------------------------- Purveyors of Fine DSP Hardware and other Cool Stuff Available at http://www.danvillesignal.com
Reply by ralph November 18, 20052005-11-18
And what shall I do if the primary signal which I want to clear haven't
got period? My primary signal is only recorded speech with ading white
noise - it has got 40000 samples, and I treid to make delay 10, 100,
1000 samples and it didn't work, how to easy find the delay? Is there
any way to find it?

Reply by dbell November 18, 20052005-11-18
Predictive filter output is output of the adaptive FIR (I realize that
other architectures are possible) that is filtering the primary input.

Difference output is the difference between the reference output and
the predictive filter output.

LMS filtering can be applied in either mode, but for a given
application (which includes signal properties), one particular mode is
generally appropriate.  You need to think about what you are trying to
accomplish with the filtering to select the mode, and to define any
delays used, and where any delays are placed, ...

Dirk

Reply by ralph November 18, 20052005-11-18
Dirk,
   I have one more question what is the difference between "the
difference output or the predictive filter output"?

Reply by dbell November 18, 20052005-11-18
Ralph,

The reference signal is not going to be another generated white noise
signal. To work the two white noise signals would have to be
correlated.  The reference signal will commonly be a delayed version of
the noisy input signal (which you said you tried).  The delay would
normally be a multiple of the pitch period. You must also chose the
proper output (the difference output or the predictive filter output).
You would chose the first output when you put exactly the same noise in
as a reference, and the second output when you put in the delayed noisy
speech as a reference.

And, UNFORTUNATELY, if the system is working perfectly it may not work
well enough to be real impressive.

Dirk

Reply by ralph November 18, 20052005-11-18
Dirk,
   I have read about adaptive filtering in "Advanced Signal Processing
and Digital Noise Reduction" and some books in polsish. What level of
understanding? So I think that I knew much about the LMS algoritm, this
is code which I use in MATLAB, the main loop:
-------------------------------
 for n = 1:N;
   %offset n so we can reference the correct value in zero-padded fref
   if (n > 100)
       mu=0.1; % the step first mu = 0.32
   end;
   m = n + noCoefficients -1;
   frefblock = frefpad(m-noCoefficients+1:1:m)';  % its my reference
signal
   refP(n) = w(n,:)*(frefblock);
   output(n) = primary(n) - refP(n);
   w(n+1,:) = w(n,:) + mu.*frefblock'.*output(n);  % updating weights
end;
-----------
and this is all application with comment:
-----------------------------------------------------------------

clear all;
close all;

noCoefficients = 3;

y = wavread('primary.wav'); %whiteNoise_1 = randn(1,N)/4; primary =
signal + whiteNoise_1; wavwrite(primary,10000,8,'primary.wav');
signal = y';


N = length(signal);
t=1:N;

primary = signal;

fref = wavread('whiteNoise.wav')'; % whiteNoise = randn(1,N)/4;
wavwrite(szum,10000,8,'whiteNoise.wav');
% whiteNoise_1 is not equal whiteNoise, but both of them were generated
by randn() function in MATLAB
w(1,:) = ones(1,noCoefficients);
mu = .32;

%Zero pad so we can start filter at 0 and not throw of the index
frefpad = [zeros(1,noCoefficients-1) fref]; %wstawienie dwoch zer
-------------------
the clean signal is speech, the character of the noise: white noise, I
generated white noise in matlab using function: randn(); my primary
signal = sinal clean + whiteNoise_1; I tried to cleaning my primary
signal using the whiteNoise_1 (and off course it works well), and
suppose we only have primary signal (we didn't have reference signal)
and suppose we know that the primary signal is mixed with white noise,
so I tried go generated my own whiteNoise_2 using the same fnction in
MATLAN (randn()) and it did/t work; I also tried to using my primary
signal as a reference signal by delay, exactly like that:
ref = signal(200:length(signal))
ref=[ref signal (1:200)]
------- it also did't work
My question is:
How can I get the clean output having on input only primary signal?



for n = 1:N;
   %offset n so we can reference the correct value in zero-padded fref
   n
   if (n > 100)
       mu=0.1;
   end;
   m = n + noCoefficients -1;
   frefblock = frefpad(m-noCoefficients+1:1:m)';
   refP(n) = w(n,:)*(frefblock);
   output(n) = primary(n) - refP(n);
   w(n+1,:) = w(n,:) + mu.*frefblock'.*output(n);
end;

w(length(w),:)


figure;hold on
for ii = 1:noCoefficients;
   plot(w(:,ii),'r');
end;

figure;
subplot(3,1,1);
plot(primary);axis([0 length(primary) min(primary) max(primary)]);
title('primary microphone signal');
subplot(3,1,2);
plot(output);axis([0 length(primary) min(signal)-.5 max(signal)+.5]);
title('filtered output');

wavwrite(primary,10000,8,'primary.wav');
wavwrite(output,10000,8,'output1.wav');

Reply by dbell November 18, 20052005-11-18
Ralph,

Let me try again.

Have you read Widrow's IEEE article on adaptive filtering?  If not,
what have you read, and what level of understanding do you have?

Second, IN DETAIL, what is your application? What is the character of
the clean signal, the character of the noise, how are they combined,
how is the mixed signal obtained? What have you tried? Why did you try
what you did?

It works better if you have gotten what information you can and have
given it some thought before you post a question and if you tell us as
much information information about your problem, and attempted
solutions. A WHOLE LOT of people coming here don't understand that.

Dirk