Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics 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.

Filtering signals and comparing them to eachother in MATLAB

Status
Not open for further replies.

memeth

Newbie level 5
Joined
Apr 17, 2010
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Milano, Italy
Activity points
1,348
Hi all,

I am actually a mechanical engineering student and i have almost no experience in signal processing. My thesis topic is related to "electrical signature analysis" and i have some questions about filtering signals and comparing them to eachother.

I have some signal vectors that i need to filter high frequency components. First of all, by using fft function, i have plotted frequency vs. amplitude figure. I observed the figure and decided to filter frequency components higher than a certain peak amplitude frequency. (By the way, i am still not sure how to decide on N value while using fft(X,N). I decided on a value of N which is a power of 2 and greater than the length of my signal vector.) Then, i used [B,A] = BUTTER(N,Wn,'low') function to filter out high freq. components. But, i don't know what N really is. Matlab help says that it is the order of the filter so i used a value of 10. How can i decide on the value of N? and moreover, i used Wn = 500/fs Hz. (500 is the cut-off frequency that i decided and fs is the sampling frequency.) How can i decide on the value of fs? i used the N value that i used in fft(X,N) as my fs. Can you please help me? Anyway, i could filter my signal but i want to be sure that i don't make mistakes.

After filtering my signals, i have to compare them to eachother to see whether they are "similar" or not. Do you have any suggestions to do that? The first thing i thought was to use power spectral density or maybe kurtosis or variance. I would be grateful if you suggest me and options, so that i can study accordingly.

Thank you very much.
 

Re: Filtering signals and comparing them to eachother in MAT

Hello memeth!

There is a simple script to give you all the necessary details you need for your filter. Each of the IIR filter has a script to give you the nominators and denominators of the filter (like butter) but they also have a script for evaluating the necessary parameters. For butterworth filter this is called 'buttord'.

Basically you enter the desired cut-off frequency for your passband (Wp) and the starting frequency for the stopband (Ws). You also need to give maximum allowed passband ripple (Rp) and minimum stop band attenuation (Rs) in decibels.

[N, Wn] = BUTTORD(Wp, Ws, Rp, Rs)

The return value is the order of the filter and the natural 3dB frequency. Naturally 'help buttord' gives you tons of more info. Hope this helps!
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top