10.7MHz的FM中频信号的AD带通采样的MATLAB
时间: 2024-05-19 21:15:40 浏览: 125
基于MATLAB的音频信号采样滤波
5星 · 资源好评率100%
代码如下:
% 10.7MHz FM IF signal sampling
fs = 22.1e6; % Sampling frequency
fc = 10.7e6; % Center frequency
bw = 200e3; % Bandwidth of signal
n = 1000; % Number of samples
t = (0:n-1)/fs; % Time vector
x = cos(2*pi*fc*t + 2*pi*bw*cos(2*pi*10e3*t)); % FM IF signal
figure;
plot(t*1e6,x);
xlabel('Time (us)');
ylabel('Amplitude');
title('FM IF signal');
% AD bandpass sampling
f0 = fc-bw/2; % Lower frequency of signal
fn = fc+bw/2; % Upper frequency of signal
f1 = fs/n; % Sampling frequency
m = -n/2:n/2-1; % Sample index vector
h = 2*f1*sinc(2*f1*m); % Ideal lowpass filter
f = m*f1; % Frequency vector
H = fftshift(fft(h)); % Frequency response of filter
X = fftshift(fft(x)); % Frequency response of signal
Y = X.*H; % Frequency response of filtered signal
y = real(ifft(ifftshift(Y))); % Filtered signal
figure;
plot(f/1e6,abs(H));
xlabel('Frequency (MHz)');
ylabel('Magnitude');
title('Frequency response of lowpass filter');
figure;
plot(f/1e6,abs(X));
xlabel('Frequency (MHz)');
ylabel('Magnitude');
title('Frequency response of signal');
figure;
plot(f/1e6,abs(Y));
xlabel('Frequency (MHz)');
ylabel('Magnitude');
title('Frequency response of filtered signal');
figure;
plot(t*1e6,y);
xlabel('Time (us)');
ylabel('Amplitude');
title('Filtered signal');
阅读全文