当前位置:网站首页>(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)');
边栏推荐
- [redis]配置文件
- 建立自己的网站(12)
- [palindrome structure of or36 linked list]
- Extended ribbon supports metadata based version management
- 72 results and development suggestions of the latest on-site production system optimization
- Baijia forum Wu Zetian
- 查询es分页下标超过1万
- [redis]发布与订阅
- NBA playoff match chart
- 【剑指Offer】面试题44.数字序列中的某一位数字
猜你喜欢
![[redis]redis的持久化操作](/img/83/9af9272bd485028062067ee2d7a158.png)
[redis]redis的持久化操作
![[redis]redis6 transaction operations](/img/50/639867a2fcb92082ea262a8a19bb68.png)
[redis]redis6 transaction operations

2022 a special equipment related management (elevator) examination questions and simulation examination

Numpy learning notes (6) -- sum() function

杰理之开启四声道通话近端卡顿问题【篇】

【138. 复制带随机指针的链表】

2022 chemical automation control instrument examination exercises and online simulation examination

The access succeeds but an exception is thrown: could not find acceptable representation

las 点云创建网格

云服务器中安装mysql(2022版)
随机推荐
密码学系列之:PKI的证书格式表示X.509
Apple Objective-C source code
【876. 链表的中间结点】
72 results and development suggestions of the latest on-site production system optimization
Arcgis中las点云数据抽稀
[the penultimate node in the linked list]
百家讲坛 雍正十三年(下部)
5分钟快速上线Web应用和API(Vercel)
ACM. HJ24 合唱队 ●●
牛客 52次月赛 B牛牛的身高 (思维题 模拟题)
解决phpstudy中mysql无法启动,与本地安装的mysql冲突
Redis learning notes
[book delivery at the end of the article] AI has spread all over the Internet to color old photos. Here is a detailed tutorial!
ACM. HJ45 名字的漂亮度 ●●
【21. 合并两个有序链表】
[206. reverse linked list]
C语言中int和char的对应关系
[redis]集群与常见错误
杰理之开启四声道通话近端变调问题【篇】
[cm11 linked list splitting]