当前位置:网站首页>(DUC/DDC)数字上混频/正交下混频原理及matlab仿真
(DUC/DDC)数字上混频/正交下混频原理及matlab仿真
2022-06-22 20:06:00 【wgm1996】
数字上混频、下混频matlab仿真,读者有兴趣的话后面更新FPGA实现代码。
代码中lowpass低通滤波器用matlab内部APP Filter Designer生成,具体配置如下:

仿真运行结果:











仿真代码:
%% 数字上变频、数字正交下变频仿真
clc;
clear;
close all;
%% 参数设置
T = 20e-6; %脉宽20us
B = 50e6; %带宽50M
f0 = 120e6; % 120M中频
Fs = 960e6; %1G采样
N = T*Fs;
K = B/T;
t = linspace(-T/2, T/2, N);
F = ((1:N)-1)*Fs/N - Fs/2;
%% DUC 数字上变频
%LFM
sig = exp (-1j*pi*K*(t).^2);
figure;
plot(real(sig)) ;
hold on;
plot(imag(sig)) ;
title('原始信号时域(实部)');
%脉压
coe = exp(1j*pi*K*(t).^2);
len = length (coe);
coe = coe.*hamming(len).';
pc = conv(sig, coe);
figure;
plot(abs(pc));
title('原始信号脉压结果');
figure;
plot(20*log10(abs(pc)/max(abs(pc))));
title('原始信号脉压结果(dB)');
figure;
plot(F/1e6, abs(fftshift(fft(sig))));
xlabel('频率/Mz');
title('基带信号频谱');
%中频
mid_f =exp(1j*2*pi*f0*t);
figure;
plot (F/1e6, abs(fftshift(fft(mid_f))));
xlabel('频率/MHz');
title('中频信号频谱');
%上混频
f_up = sig.*mid_f;
figure;
plot(F/1e6,abs(fftshift(fft(f_up))));
xlabel('频率/MEz');
title('上混频信信号频谱');
%% DDC 数字下变频
%数字正交下混频
mid_f_in = cos(2*pi*f0*t + pi*K*(t).^2);
figure,
plot(F/1e6, abs(fftshift(fft(mid_f_in))));
xlabel('频率/MHz');
title('下混频输入信号频谱');
mif_f_sin = sin(2*pi*f0*t);
mif_f_cos = cos(2*pi*f0*t);
f_down_real = mid_f_in.*-mif_f_sin;
f_down_imag = mid_f_in.*mif_f_cos;
f_down = f_down_real + 1j*f_down_imag;
figure;
plot(F/1e6, abs(fftshift(fft(f_down))));
xlabel('频率/MHz');
title('数字正交下混频信号频谱');
% IQ两路分别进行低通滤波
f_down_new_real = zeros(1,50000);
f_down_new_real(1:length(f_down_real)) = f_down_real;
f_down_new_imag = zeros(1,50000);
f_down_new_imag(1:length(f_down_imag)) = f_down_imag;
%5OM低通滤波器
load lowpass
f_down_lowpass_real = filter(lowpass, 1, f_down_new_real);
f_down_lowpass_imag = filter(lowpass, 1, f_down_new_imag);
f_down_lowpass = f_down_lowpass_real + 1j*f_down_lowpass_imag;
figure;
plot(abs(fftshift(fft(f_down_lowpass))));
% xlabel('频率/MHz');
title('低通滤波信号频谱');
figure;
plot(imag(f_down_lowpass)) ;
hold on;
plot(real(f_down_lowpass));
title('低通滤波信号时域(实部)');
pc = conv(f_down_lowpass, coe);
figure;
plot(abs(pc));
title('低通滤波信号脉压结果');
figure;
plot (20*log10(abs(pc)/max(abs(pc))));
title('低通滤波信号脉压结果(dB)');
边栏推荐
- 百家讲坛 黄帝内经(第一部)
- Flutter System Architecture(Flutter系统架构图)
- [redis]发布与订阅
- Correspondence between int and char in C language
- redis学习笔记
- NBA playoff match chart
- 【138. 复制带随机指针的链表】
- 2022 a special equipment related management (elevator) examination questions and simulation examination
- 2022危险化学品经营单位主要负责人上岗证题库及模拟考试
- Agricultural futures account opening
猜你喜欢

【OR36 链表的回文结构】

53页智慧校园智能化系统设计方案(附下载)

One line of code binds swiftui view animation for a specific state

大势智慧创建倾斜模型和切割单体化

Redis learning notes

Adblock屏蔽百度热搜

Flutter System Architecture(Flutter系统架构图)

Remote access to raspberry pie via the Internet.
![[142. circular linked list II]](/img/c1/f3a0b863286e9eeda0ae4021420912.png)
[142. circular linked list II]

优化求解器 | Gurobi的MVar类:矩阵建模利器、求解对偶问题的备选方案 (附详细案例+代码)
随机推荐
2022 question bank and simulated examination for work license of main principals of hazardous chemical business units
Five uses of 87 with as
嵌入式开发基础之任务管理(线程管理)
【20. 有效的括号】
快速排序模板 & 注意事项
redis学习笔记
Correspondence between int and char in C language
Objective-C不同数据类型占用字节大小
[876. intermediate node of linked list]
73- find the SQL example during the business peak period (report development class)
苹果GCD源代码
2022 chemical automation control instrument examination exercises and online simulation examination
【206. 反转链表】
2022 group programming TIANTI race L1
NumPy学习笔记(六)——sum()函数
Win10 installation net3.5. docx
采用网络远程访问树莓派。
ByteDance proposes a lightweight and efficient new network mocovit, which has better performance than GhostNet and mobilenetv3 in CV tasks such as classification and detection
php 镜像制作
数据库总结:mysql在开发过程中常见的问题及优化