% 读入IQ数据 load IQdata1.mat t = (0:length(IQdata)-1)/fs; % 时间轴

% 对I信号进行L倍插值、M倍抽取、L/M采样率转换 L = 4; % L倍插值 M = 3; % M倍抽取 I_l = interp(IQdata, L); % L倍插值 I_lm = I_l(1:M:end); % M倍抽取 I_c = resample(IQdata, L, M); % L/M采样率转换

% 对Q信号进行L倍插值、M倍抽取、L/M采样率转换 Q_l = interp(Qdata, L); % L倍插值 Q_lm = Q_l(1:M:end); % M倍抽取 Q_c = resample(Qdata, L, M); % L/M采样率转换

% 时域分析 figure subplot(2,2,1) plot(t, IQdata) title('原始信号') xlabel('时间(秒)') ylabel('幅度') subplot(2,2,2) plot(t(1:L:end), I_l) title(sprintf('%d倍插值后的I信号', L)) xlabel('时间(秒)') ylabel('幅度') subplot(2,2,3) plot(t(1:M:end), I_lm) title(sprintf('%d倍抽取后的I信号', M)) xlabel('时间(秒)') ylabel('幅度') subplot(2,2,4) plot(t, I_c) title(sprintf('%d/%d采样率转换后的I信号', L, M)) xlabel('时间(秒)') ylabel('幅度')

figure subplot(2,2,1) plot(t, IQdata) title('原始信号') xlabel('时间(秒)') ylabel('幅度') subplot(2,2,2) plot(t(1:L:end), Q_l) title(sprintf('%d倍插值后的Q信号', L)) xlabel('时间(秒)') ylabel('幅度') subplot(2,2,3) plot(t(1:M:end), Q_lm) title(sprintf('%d倍抽取后的Q信号', M)) xlabel('时间(秒)') ylabel('幅度') subplot(2,2,4) plot(t, Q_c) title(sprintf('%d/%d采样率转换后的Q信号', L, M)) xlabel('时间(秒)') ylabel('幅度')

% 频域分析 NFFT = 2^nextpow2(length(IQdata)); f = fs/2*linspace(0,1,NFFT/2+1);

figure subplot(2,2,1) plot(f, 2/NFFTabs(fft(IQdata, NFFT/2+1))) title('原始信号') xlabel('频率(赫兹)') ylabel('幅度') subplot(2,2,2) plot(f, 2/NFFTabs(fft(I_l, NFFT/2+1))) title(sprintf('%d倍插值后的I信号', L)) xlabel('频率(赫兹)') ylabel('幅度') subplot(2,2,3) plot(f, 2/NFFTabs(fft(I_lm, NFFT/2+1))) title(sprintf('%d倍抽取后的I信号', M)) xlabel('频率(赫兹)') ylabel('幅度') subplot(2,2,4) plot(f, 2/NFFTabs(fft(I_c, NFFT/2+1))) title(sprintf('%d/%d采样率转换后的I信号', L, M)) xlabel('频率(赫兹)') ylabel('幅度')

figure subplot(2,2,1) plot(f, 2/NFFTabs(fft(IQdata, NFFT/2+1))) title('原始信号') xlabel('频率(赫兹)') ylabel('幅度') subplot(2,2,2) plot(f, 2/NFFTabs(fft(Q_l, NFFT/2+1))) title(sprintf('%d倍插值后的Q信号', L)) xlabel('频率(赫兹)') ylabel('幅度') subplot(2,2,3) plot(f, 2/NFFTabs(fft(Q_lm, NFFT/2+1))) title(sprintf('%d倍抽取后的Q信号', M)) xlabel('频率(赫兹)') ylabel('幅度') subplot(2,2,4) plot(f, 2/NFFTabs(fft(Q_c, NFFT/2+1))) title(sprintf('%d/%d采样率转换后的Q信号', L, M)) xlabel('频率(赫兹)') ylabel('幅度')

雷达基带I/Q数据处理:插值、抽取和采样率转换

原文地址: https://www.cveoy.top/t/topic/nvNB 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录