Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

eliminate noise using kalman filter

Status
Not open for further replies.

fuzzhan

Newbie level 3
Joined
Sep 25, 2012
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,299
hi..i really need a help..im a final year student..im still new with matlab..i need to design a filter to eliminate noise in speech processing..im using kalman filter..plizz help me..i really need a help..plizz somebody help me give the coding
 

Mityan

Full Member level 5
Joined
Jul 11, 2012
Messages
281
Helped
48
Reputation
96
Reaction score
47
Trophy points
1,308
Activity points
2,835
The simpliest Kalman may look like this (I use it for sensors processing):

Code:
function Array_FK = Simple_Kalman_fcn(Array, Q, R)
len = size(Array,1);
cur_state = Array(1);
cur_cov = 0;
Array_FK = zeros(len,1);
for i = 1:1:len
    x = cur_state;
    P = cur_cov + Q;
    K = P/(P + R);
    cur_state = x + K*(Array(i) - x);
    cur_cov = (1 - K)*P;
    Array_FK(i) = cur_state;
end

Input - Array - this is your data vector. Output - Array_FK - the vector of the same length.
Parameter R - variance og your noise. You may estimate it in the following way: for example, first 1000 samples of your speech data is silence (noisy). Then R = var(Array(1:1000));
Parameter Q you adjust manually to get a result that you will like.
 

fuzzhan

Newbie level 3
Joined
Sep 25, 2012
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,299
that the code is same if i want to use to filtering noise in speech or audio
 

Mityan

Full Member level 5
Joined
Jul 11, 2012
Messages
281
Helped
48
Reputation
96
Reaction score
47
Trophy points
1,308
Activity points
2,835
I think you should try it. Plot the input and output diagrams in the same axis and adjust Q to get a nice noisy signal shaping at output.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top