Plotting Reflection Coefficient as a function of frequency

조회 수: 5 (최근 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 CenterFile Exchange에서 Antennas 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