Plotting Reflection Coefficient as a function of frequency

4 ビュー (過去 30 日間)
KG573
KG573 2022 年 2 月 12 日
回答済み: Star Strider 2022 年 2 月 12 日
Hi, for some reason my matlab code isn't giving me the result i expected for return loss.
It seems like it's just calculating one value.
Result I was Expecting:
Result I got:
Code:
c = 299797458;
freq = linspace(700e6,1300e6,1000);
lambda = c./freq;
beta = (2.*pi)./lambda;
reflection_coeff = .1888.*(exp(-1i.*2.*beta));
reflection_coeff_db = 20.*log10(reflection_coeff);
plot(freq,reflection_coeff_db);
xlabel('Freq')
ylabel('Return Loss')

回答 (1 件)

Star Strider
Star Strider 2022 年 2 月 12 日
I am not familiar with these equations. However, calculating the deicbel conversion only on the real part of ‘reflection_coeff’ and then plotting only the real part of ‘reflection_coeff_db’ produces a periodic plot. Restricting it to a narrower band of frequencies to display only one of the periodic series produces a plot simoilar to the desired result. (I made no changes to the code other than restricting the calculations to the real parts of their respective complex vectors.)
c = 299797458;
freq = linspace(700e6,1300e6,1000);
lambda = c./freq;
beta = (2.*pi)./lambda;
reflection_coeff = .1888.*(exp(-1i.*2.*beta));
reflection_coeff_db = 20.*log10(real(reflection_coeff));
figure
plot(freq,real(reflection_coeff_db));
xlabel('Freq (Hz)')
ylabel('Return Loss (dB)')
xlim([7 7.25]*1E+8) % Optional
.

カテゴリ

Help Center および File ExchangeAntennas and Electromagnetic Propagation についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by