Plotting the attenuation constant against frequency
10 views (last 30 days)
Show older comments
Hello, I'm trying to plot the attenuation coefficient and phase coefficient against a frequency range. The values produced for a single freqency check out correct but my plots don't look similar to the characteristics curves that that I'm expecting from textbooks. Am I messing up the units or dimensions somewhere?
% Clear screen and variables
clc, clear all
% Define distributed parameters
R = 100;
L = 80e-9;
C = 200e-12;
G = 1.6;
% Define frequency range
low_freq = 1; % Enter low frequency here
high_freq = 1e7; % Enter high frequency here
% Calculate frequency axis
freq = low_freq:high_freq;
% Angular frequency
omega = 2*pi.*freq;
% Propagation coefficient
gamma = sqrt((R+(omega.*L*i)).*(G+(omega.*C*i)));
% Attenuation coefficient
alpha = real(gamma);
% Phase coefficient
beta = imag(gamma);
% Plot attenuation coefficient verses frequency
figure('units','pixels','position',[150 200 1000 600])%Set figure properties
plot (freq,alpha)
grid on
title('Attenuation Coefficient verses frequency')% Graph title
xlabel('Frequency (Hz)')% x axis label
ylabel('Attenuation Coefficient')% y axis label
% Plot phase coefficient verses frequency
figure('units','pixels','position',[150 200 1000 600])%Set figure properties
plot (freq,beta)
grid on
title('Phase Coefficient verses frequency')% Graph title
xlabel('Frequency (Hz)')% x axis label
ylabel('Phase Coefficient')% y axis label
3 Comments
Mathieu NOE
on 29 Mar 2021
So far I believe the input values are simply not compatible / coherent with this plot
you cannot have gamme as low as 2e-3 (max y value on this graph) with
R = 100;
L = 80e-9;
C = 200e-12;
G = 1.6;
Answers (2)
VBBV
on 3 Sep 2024
@Vinci Use smaller conductnce value, and semilogx for ploting graph
% Clear screen and variables
clc, clear all
% Define distributed parameters
R = 100;
L = 80e-9;
C = 200e-12;
G = 1.6e-12; % conductance valoue is small,
% Define frequency range
low_freq = 1; % Enter low frequency here
high_freq = 1e7; % Enter high frequency here
% Calculate frequency axis
freq = low_freq:1:high_freq;
% Angular frequency
omega = 2*pi.*freq;
% Propagation coefficient
gamma = sqrt((R+(omega.*L*i)).*(G+(omega.*C*i)));
% Attenuation coefficient
alpha = real(gamma);
% Phase coefficient
beta = imag(gamma);
% Plot attenuation coefficient verses frequency
subplot(211)
semilogx((freq),alpha)
axis([min(freq), max(freq) min(alpha) max(alpha)])
title('Attenuation Coefficient verses frequency')% Graph title
xlabel('Frequency (Hz)')% x axis label
ylabel('Attenuation Coefficient')% y axis label
% Plot phase coefficient verses frequency
subplot(212)
semilogx(freq,beta)
axis([min(freq), max(freq) min(beta) max(beta)])
title('Phase Coefficient verses frequency')% Graph title
xlabel('Frequency (Hz)')% x axis label
ylabel('Phase Coefficient')% y axis label
0 Comments
See Also
Categories
Find more on Multirate Signal Processing 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!