Plotting the attenuation constant against frequency
23 次查看(过去 30 天)
显示 更早的评论
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 个评论
Mathieu NOE
2021-3-29
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;
回答(2 个)
VBBV
2024-9-3
@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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Multirate Signal Processing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!