A signal has the information of two different freqency. How to distinguish betwwen these two frequencis?

3 次查看(过去 30 天)
A received signal has two different frequency. I want to separate the amplitude and phase for those two frequencies separately. I am using bandpass option but it's overlapping. I would like to mention, the separation between the frequencies will be small like 500MHz.
clc;
clear all;
close all;
Fs = 100e9; % Sampling frequency for 36 GHz signal (adjust as needed)
T = 1/Fs; % Sampling period
L = 1500; % Length of signal
t = (0:L-1)*T; % Time vector
f1 = 36e9;
f2 = 37e9;
S=exp(1i*2*pi*f1*t)+exp(1i*2*pi*f2*t);
Y = fft(S);
P2 = (Y/L);
P1 = P2(1:L/2+1);
P1(2:end-1) = 2*P1(2:end-1);
f = Fs*(0:(L/2))/L;
subplot(3,1,1)
plot(f,P1)
Warning: Imaginary parts of complex X and/or Y arguments ignored.
subplot(3,1,2)
Y1=bandpass(Y,[35.8e9 36.2e9],Fs);
P3 = (Y1/L);
P3 = P3(1:L/2+1);
P3(2:end-1) = 2*P3(2:end-1);
plot(f,P3)
Warning: Imaginary parts of complex X and/or Y arguments ignored.
subplot(3,1,3)
Y2=bandpass(Y,[37.8e9 38.2e9],Fs);
P4 = (Y2/L);
P4 = P4(1:L/2+1);
P4(2:end-1) = 2*P4(2:end-1);
plot(f,P4)
Warning: Imaginary parts of complex X and/or Y arguments ignored.
  2 个评论
Tasin Nusrat
Tasin Nusrat 2024-1-25
Hello, I need to use the signal information at a specific frequency separately. What I mean is I need one plot only with the information for f1 then another plot only for f2.

请先登录,再进行评论。

回答(1 个)

vidyesh
vidyesh 2024-1-25
Hi Tasin,
I understand that you are trying to isolate the amplitude and phase of two closely spaced frequencies within a received signal using a bandpass filter, but you're experiencing overlap.
The signal passed in bandpass should be in time domain, so pass the 'S' variable to the bandpass function instead of 'Y'. Implement the following changes:
Y1=bandpass(S,[34e9 36e9],Fs);
P3 = (fft(Y1)/L);
Y2=bandpass(S,[37.8e9 38.2e9],Fs);
P4 = (fft(Y2)/L);
Be aware that while these steps will help in separating the frequencies, they may not completely eliminate the overlap due to the small frequency separation. To enhance the separation, consider adjusting the sampling frequency 'Fs' or the frequency range specified in the bandpass function. Fine-tuning these parameters can help reduce the overlap. For more information on the bandpass function and its parameters, you can refer to the MATLAB documentation.
Hope this helps

类别

Help CenterFile Exchange 中查找有关 Single-Rate Filters 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by