필터 지우기
필터 지우기

How to separate signals with diffrent frequencies

조회 수: 18 (최근 30일)
Srey
Srey 2015년 1월 1일
댓글: aarthi arunachalam 2016년 3월 11일
t = linspace(0, 1, 1001);
x=sin(2*pi*t*3) + sin(2*pi*t*6) + sin(2*pi*t*10)+sin(2*pi*t*13)+sin(2*pi*t*20)+sin(2*pi*t*50)+sin(2*pi*t*100)+sin(2*pi*t*200);
% my signal with frequencies 3,6,10,13,20,50,100,200 KHz
sigma=0.1;
y=x+randn(size(x)).*sigma; % adding noise
I filtered the signal using fft.
I want to separate signals.
Eg : from my original signal, I want a signal with frequency range say 3 to 8 KHz, another signal say from 100 to 200 KHz. How can I separate them and display those signals.How can I do this. Anybody Please help me to solve this.?
  댓글 수: 2
mouh nyquist
mouh nyquist 2015년 1월 1일
you must read about chebishev and butter filter
aarthi arunachalam
aarthi arunachalam 2016년 3월 11일
i too want to seperate certain frequency range from my original signal. can you help me?

댓글을 달려면 로그인하십시오.

채택된 답변

Shoaibur Rahman
Shoaibur Rahman 2015년 1월 1일
Add the following lines of code at the bottom of your code (after y=x+randn(size(x)).*sigma;):
ffty = fft(y);
ffty = abs(ffty(1:ceil(length(y)/2)));
ffty(ffty<100)=0;
[~,locs] = findpeaks(ffty);
freqs = (locs-1)/t(end)
signal_1 = sin(2*pi*t*freqs(1))+sin(2*pi*t*freqs(2))+sin(2*pi*t*freqs(3)); % 3-10
signal_2 = sin(2*pi*t*freqs(6))+sin(2*pi*t*freqs(7)); % 50-100
subplot(211), plot(t,signal_1)
subplot(212), plot(t,signal_2)
  댓글 수: 10
Shoaibur Rahman
Shoaibur Rahman 2015년 1월 1일
편집: Shoaibur Rahman 2015년 1월 1일
Use any sinusoidal function to generate a signal with that frequency, and then plot that against time. For example:
t = .....
out1 = sin(2*pi*f1*t);
out2 = cos(2*pi*f2*t);
etc....
This is just from the Fourier analysis, that states any signal (with some criteria) can be represented as summation of infinite sinusoidal functions. So, to represent only one frequency, use one sinusoidal function, or to represent multiple frequency components, use summation of multiple sinusoidal functions with those frequencies.
Srey
Srey 2015년 1월 1일
Thank you so much..It works.:)

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Pourya Alinezhad
Pourya Alinezhad 2015년 1월 1일
1-you can use several filters with different center frequencies (chebishev or butter filter)
h = fdesign.bandpass('N,F3dB1,F3dB2', N, Fc1, Fc2, Fs);
Hd = design(h, 'butter');
filter (Hd,input_signal);
2- you can use an adaptive filter and feed the signal and the desired signals to it (LMS filter).
  댓글 수: 2
Srey
Srey 2015년 1월 1일
I want a signal with freq range:say 3-10Hz and another signal with freq say 50-100. I want to plot them separately.How can be done from my original signal
Pourya Alinezhad
Pourya Alinezhad 2015년 1월 1일
assign Fc1, Fc2 values as 3 and 10Kz for a filter. then make another filter with 50 to 100 kHz spectrum.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Spectral Measurements에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by