Desiging a very simple filter (Very Basic Sort of)???

Status
Not open for further replies.

xpress_embedo

Advanced Member level 4
Joined
Jul 5, 2011
Messages
1,154
Helped
161
Reputation
396
Reaction score
189
Trophy points
1,353
Location
India
Activity points
10,591
I want to generate a very simple Filter which removes the noise at-least little bit from a signal (Sinusoidal of 100Hz Frequency).

I don't want to use the complex filter's.

this is my Signal

Code:
fSampling = 10000;           %Sampling Frequency
tSampling = 1/fSampling;    %Sampling Time
L = 10000;                   %Length of Signal
t = (0:L-1)*tSampling;      %Time Vector
F = 100;                    %Frequency of Signal

%%Signal without noise
xsig = sin(2*pi*F*t);

I calculate its Fourier Transform as Follow:-
Code:
NFFT = 2^nextpow2(L);
Xsig = fft(xsig,NFFT)/L;
f1 = fSampling/2*(linspace(0,1,NFFT/2+1));
plot(f1,2*abs(Xsig(1:NFFT/2+1)),'r');
grid on
axis([-50 500 0 1.1])
title('\itSingle-Sided Amplitude Spectrum of xsig(t)')
xlabel('\itFrequency (Hz) \rightarrow')
ylabel('|Xsig(f)| \rightarrow');

Then i add a Little bit of Noise into it as follow:-
Code:
xnoise = xsig + 0.45*randn(size(t));

Then calculates its Fourier Transform again...

Now i want to remove the noise from this signal and want to retrieve a pure sinusoidal signal..

Pls Some Body help me....
 

A Two Stage Passive Low Pass RC filter might fulfill your requirements:

Passive Low Pass Filter

Although it is difficult to be specific without more details of your design.


BigDog


Thanks for reply...
I thought i need a band pass filter so that i can remove the noise and obtain my signal which is having a 100Hz Frequency

How can i implement it in matlab...


As i have to apply the filter to the signal xnoise(t) and then plot it again..

Pls help

- - - Updated - - -

I have to retrieve the original signal back...

Have a look at this video..
http://www.youtube.com/watch?v=ujhzQ42dk1k

Have to remove the noise...
Need help
 

I may have misunderstood your project.

I thought you were referring to a physical hardware solution for a project like an inverter, not a theoretical analysis.


BigDog
 

Look at my thread and see if it is of any help to you. I needed some filtering done aswell. I imported a sound clip and used a butterworth filter to get rid some high freq noise. I had the code right, just used the wrong .wav file https://www.edaboard.com/threads/258701/
 
please advise inductance and Irate current and dimension requirement for the filter

- - - Updated - - -

please advise inductance and Irate current and dimension requirement for the filter
 


Thanks for your reply....

I am not able to get much...
As i am new to this...
If possible can you do it for me... i just want to retrieve my sine wave back...
Please taking it as my base i can move towards more complex problems......

Please help me...
I am uploading my *.m file



View attachment fft_example.zip
 

sorry. can not open the file.

What happens.. its opening fine on my system...
i am uploading it again...

View attachment fft_example.zip

- - - Updated - - -

I searched internet and found some tutorial and then uses a low-pass filter(Butterworth)

Don't know why (means i know a low pass filter can also serve the purpose to remove the noise but when i used a band pass filter it just produces something else)

Code:
%Butter Worth Filter Code
[B,A] = butter(2,100/5000);
filt_sig = filter(B,A,xsig);

then ploted the three signal noise gets removed (What i want)
but a phase shift occurs..
Have a look at this image..

 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…