From b1940770ac4c9d467e74dc4640f47811080d5608 Mon Sep 17 00:00:00 2001 From: yeokwanggoo-stack Date: Tue, 29 Jul 2025 22:15:44 +0900 Subject: [PATCH] Add path for antenna pattern --- System_Analysis_Main.m | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/System_Analysis_Main.m b/System_Analysis_Main.m index e7d7ec8..280242a 100644 --- a/System_Analysis_Main.m +++ b/System_Analysis_Main.m @@ -3,6 +3,7 @@ close all; clc addpath(genpath(fullfile(pwd, 'Functions'))); +addpath(genpath(fullfile(pwd, 'Antenna_Pattern'))); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % @@ -297,7 +298,7 @@ g = [G_dB_LNA G_dB_Mixer G_dB_HPF1 G_dB_VGA1 G_dB_HPF2, G_dB_VGA2 G_dB_LPF1 G_dB % nf = [4.0 0.5 5.0 1.0 0.6 1.0 6.0]; % g = [20.0 -0.5 -7.0 -1.0 21.75 21.75 -5.0]; -[cnf,ng] = noisefigure(nf,g) +[cnf,ng] = noisefigure(nf,g); % NF_dB2 = cal_nf(nf, g, T0); NF_dB = 12; @@ -314,6 +315,7 @@ thermal_noise_LNA = sqrt(Pn) * randn([size(rxsig_wo_n)]); % 02. Mixing % 2-1. Product mixed_sig = zeros(size(rxsig_wo_n)); +mixed_noise = zeros(size(thermal_noise_LNA)); for rxidx = 1 : Nr mixed_sig(:,:,rxidx) = dechirping(rxsig_wo_n(:,:,rxidx), Ref_wave(:,:,rxidx)); mixed_noise(:,:,rxidx) = dechirping(thermal_noise_LNA(:,:,rxidx), Ref_wave(:,:,rxidx)); @@ -344,7 +346,7 @@ for rxidx = 1 : Nr mixed_noise_hpf(:,:,rxidx) = mixed_noise(:,:,rxidx); end end -[h_hpf1, w] = freqz(hpf1_d_num,hpf1_d_den, rngFFTlen); +[h_hpf1, ~] = freqz(hpf1_d_num,hpf1_d_den, rngFFTlen); Loss_hpf1_dB = pow2db(sum(abs(h_hpf1).^2)/rngFFTlen); Loss_hpf2_dB = pow2db(sum(abs(h_hpf1).^2)/rngFFTlen); @@ -380,9 +382,9 @@ for rxidx = 1 : Nr mixed_noise_lpf(:,:,rxidx) = mixed_noise_hpf(:,:,rxidx); end end -[h_lpf1, w] = freqz(lpf1_d_num, lpf1_d_den, rngFFTlen); +[h_lpf1, ~] = freqz(lpf1_d_num, lpf1_d_den, rngFFTlen); Loss_lpf1_dB = pow2db(sum(abs(h_lpf1).^2)/rngFFTlen); -[h_lpf2, w] = freqz(lpf2_d_num, lpf2_d_den, rngFFTlen); +[h_lpf2, ~] = freqz(lpf2_d_num, lpf2_d_den, rngFFTlen); Loss_lpf2_dB = pow2db(sum(abs(h_hpf1).^2)/rngFFTlen); % figure()