⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 effects of amplitude.txt

📁 This MATLAB code simulates the effects of amplitude variation between modulators for the wireless L
💻 TXT
字号:
%This MATLAB code simulates the effects of amplitude variation between modulators for
% the wireless LO
clear
close all
rad=pi/180;
% radar parameters
f=2.4e9; % Hz
wavelength=3e8/f;
k=2*pi/wavelength;
% box dimensions
xmin=0; xmax=50;
ymin=0; ymax=100;
% location of source (LO) in box
xs=25; ys=17;
% location of observation points in box
xp=[11.5 37.5]; yp=[50 50];
No=length(xp); % No. of elements
% reflection coefficient of box walls
gam=[1 1 1 1]*0.316; % 10dB = 10e(-10/20) abs
% location of images
X=[xs xmax+(xmax-xs) xs xmin-(xs-xmin)];
Y=[ymin-(ys-ymin) ys ymax+(ymax-ys) ys];
% reflected path lengths for all observation points
for n=1:No
for i=1:4
R(n,i)=sqrt((xp(n)-X(i))^2+(yp(n)-Y(i))^2);
end
end
%Phi=0; % Fixed phase
Phi=pi/2;
% Amplitude loop; From 0 to 5V in 0.25V increment
a1=0; a2=5; da=0.25;
ia=floor((a2-a1)/da)+1;
for ii=1:ia
a=a1+(ii-1)*da;
A(ii)=(ii-1)*da;
% total reflected field at each observation point
for n=1:No
summ=0;
for i=1:4
summ=(summ+exp(-j*k*R(n,i))/R(n,i)*gam(i));
end
70
% direct field at each observation point
Rd=sqrt((xp(n)-xs)^2+(yp(n)-ys)^2);
Ed(n,ii)=exp(-j*k*Rd)/Rd;
% sum of direct and reflected field at each observation point
E(n,ii)=summ+Ed(n,ii);
end
end
% Total E-field from both observation points (with amplitude imbalance)
Etot=(5*E(1,:))+((A.*E(2,:)).*exp(-j*Phi)); % 0.8 amplitude imbalance
Etotdb=20*log10(abs(Etot));
figure(1)
% Measured results
%ss=csvread('Ampl_0.csv');
ss=csvread('Ampl_90.csv');
ampl_r=ss(1,:);
power_r=ss(2,:);
% Expected plot is scaled for comparison
for n=1:No
plot(A,0.6*Etotdb+4.8,'b', ampl_r, power_r, 'r*')
xlabel('Amplitude difference between receivers, V')
ylabel('Array Output, dB')
legend('Expected', 'Measured',0)
axis([a1 a2 -20 0])
hold on
end
hold off

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -