Plotting Reflection Coefficient as a function of frequency
5 次查看(过去 30 天)
显示 更早的评论
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')
0 个评论
回答(1 个)
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
.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Antennas and Electromagnetic Propagation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
