当前位置:网站首页>Implementation of MATLAB mixer
Implementation of MATLAB mixer
2022-07-22 17:29:00 【Nanyou school slag】
List of articles
One 、 Mixer introduction
The frequency of the output signal of the mixer is equal to the sum of the two input signal frequencies 、 Difference or other combination of the two circuits .
Two 、Matlab Code
Realization function : Input two 500kHz Signal mixing output 1000kHz And filter out the sinusoidal signal output of the DC component
% Set system parameters
fi=500000; % Input signal frequency
fc=500000; % Frequency of LO signal
Fs=5000000; % sampling frequency
L=1024; % Data length
N=10; % Quantization Bits
% Generate input signal
t=0:1/Fs:(1/Fs)*(L-1); % Generate a time series of sampling frequencies
theta=rand()*2*pi; % Generate a random phase angle
si=sin(2*pi*fi*t+theta);% Generate sine wave input signal with random starting phase
si=round(si*(2^(N-1)-1));%10bit quantitative
% Generate LO signal
sc=sin(2*pi*fc*t); % Generate LO signal
sc=round(sc*(2^(N-1)-1));%10bit quantitative
% Simulate the mixing output and draw pictures
so=si.*sc; % Mixer output
sof=so-mean(so); % The mixer filters out the DC component and outputs
fso=abs(fft(so,L)); % seek FFT Transformed amplitude value
% normalization
sc=sc/max(abs(sc));
si=si/max(abs(si));
so=so/max(abs(so));
sof=sof/max(abs(sof));
fso=fso/max(fso);
% Convert it into a signal symmetrical relative to the origin
fso=[fso(L/2+1:L),fso(1:L/2)]; % drawing
m=[-L/2:1:(L/2-1)]*Fs/L*(10^(-6)); % Generate frequency axis , Unit is MHz
t=t*(10^6); % Generate time axis , Unit is us
subplot(221);plot(t(1:32),si(1:32));
xlabel(' Time /us');ylabel(' Range ');
title('10bit Quantized input signal (a)','fontsize',8);
subplot(222);plot(t(1:32),so(1:32));
xlabel(' Time /us');ylabel(' Range ');
title('20bit Quantized mixing output signal (b)','fontsize',8);
subplot(223);plot(t(1:32),sof(1:32));
xlabel(' Time /us');ylabel(' Range ');
title(' The mixing output signal after filtering the DC component (c)','fontsize',8);
subplot(224);plot(m,fso);
xlabel(' frequency /MHz');ylabel(' Range ');
title(' Amplitude frequency response of mixing output signal (d)','fontsize',8);
3、 ... and 、 Waveform simulation
边栏推荐
- Sparse array (sparse)
- 电子信息工程专业毕设题目选题推荐
- 【图文并茂】在线一键重装win7系统详细教程
- Go语言学习日记【三十一】golang与pgsql交互
- 牛客网 Fibonacci数列
- Angr principle and Practice (I) -- principle
- Default constraint of MySQL constraint default
- Information security CISP certification - what are your concerns?
- PostgreSQL判断是否为空coalesce
- final、finally、finalize的区别
猜你喜欢
pytorch
[C language interesting experiment]
李宏毅机器学习2020--P20&21 RNN
《PyTorch深度学习实践》-B站 刘二大人-day1
Openeuler is ambitious, open source huizhichuang future | 2022 open atom global open source summit openeuler sub forum is about to open
Go language learning diary [XXXI] interaction between golang and PgSQL
Qianxin joined the Euler open source community to jointly promote the application of commercial passwords
LCD notes (2) framebuffer Driver Framework
Abaqus实现二自由度振动系统模态计算
Distributed computing framework map/reduce
随机推荐
Write a sequencer plug-in sequence subtitle (1)
mysql约束之_自增长约束_auto_increment
广度优先遍历(Breath First Search)
1312. Minimum number of inserts to make a string a palindrome string
【图文并茂】在线一键重装win7系统详细教程
This competition is a bit against the sky! Kunpeng application innovation competition openeuler track is fully opened
什么是NumPy?
大佬们,flink sql job往yarn提交作业,报不能执行sql错误,本地执行不报错,服务器
STL resize容量规律集合
[machine learning] how pytorch loads custom datasets and divides them
IO流的分类和方法
PostgreSQL判断是否为空coalesce
ssrf漏洞攻击内网Redis复现
What if only the mouse displays when win11 is turned on?
An annotation implementation method writes the returned data to the cache (facet, redis Implementation)
ACL和NET
浅谈不可转让的声誉积分NFT SBTs面临的困境
This article introduces you to the workflow of Redux - action/reducer/store
Openeuler is ambitious, open source huizhichuang future | 2022 open atom global open source summit openeuler sub forum is about to open
How to solve the problem of uncontrollable win11 flashing white screen?