Plotting Reflection Coefficient as a function of frequency
9 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Star Strider
on 12 Feb 2022
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 Comments
See Also
Categories
Find more on Antennas and Electromagnetic Propagation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!