Plotting the attenuation constant against frequency

23 ビュー (過去 30 日間)
Vinci
Vinci 2021 年 3 月 23 日
回答済み: VBBV 2024 年 9 月 3 日
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 件のコメント
Vinci
Vinci 2021 年 3 月 27 日
Sorry about the late response. I was expecting something like this.
Mathieu NOE
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 件)

Abrham De La Torre
Abrham De La Torre 2021 年 9 月 29 日
12

VBBV
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

カテゴリ

Help Center および File ExchangeMultirate Signal Processing についてさらに検索

製品


リリース

R2016a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by