control system bode plot

1 回表示 (過去 30 日間)
Irshad Baruah
Irshad Baruah 2020 年 3 月 29 日
コメント済み: Walter Roberson 2020 年 4 月 13 日
how to plot this two equatio and the resutant output is shown in the figure
the alpha value should be any fractional value(eg-alpha=0.01 to 0.09).
one of the matlab community person helped me but his alpha value is 1 not fractional the code is given below
(hold off;
alpha=1;Wcr=10;
w1=logspace(-1,log10(Wcr),1000);w2=logspace(log10(Wcr),3,1000);
Mag1=20*ones(1,numel(w1));Mag2=@(w2) 20*alpha*log10(w2);
semilogx(w1,Mag1);hold on;semilogx(w2,Mag2(w2));grid on;xlabel('Frequency');ylabel('dB'))
  2 件のコメント
Irshad Baruah
Irshad Baruah 2020 年 3 月 29 日
thanx ammer
Walter Roberson
Walter Roberson 2020 年 4 月 13 日
Irshad Baruah:
If you believe that your question is unclear, then since you are the person who posted the question, you have the responsibility to clarify it.

サインインしてコメントする。

採用された回答

Ameer Hamza
Ameer Hamza 2020 年 3 月 29 日
編集済み: Ameer Hamza 2020 年 3 月 29 日
Check this:
alpha=0.1; % alpha is 0.1
Wcr=10;
w1=logspace(-1,log10(Wcr),1000);
w2=logspace(log10(Wcr),3,1000);
Mag1=20*alpha*ones(1,numel(w1)); %<---- you need to multiply alpha here too
Mag2=@(w2) 20*alpha*log10(w2);
semilogx(w1,Mag1);
hold on;
semilogx(w2,Mag2(w2));
grid on;
xlabel('Frequency');
ylabel('dB')
Also try this to plot all values from 0.1 to 0.9 on one graph
Wcr=10;
w1=logspace(-1,log10(Wcr),1000);
w2=logspace(log10(Wcr),3,1000);
ax = axes('XScale', 'log');
hold on;
Alpha=0.1:0.1:0.9;
for i=1:numel(Alpha)
alpha = Alpha(i);
Mag1=20*alpha*ones(1,numel(w1));
Mag2=@(w2) 20*alpha*log10(w2);
semilogx(w1,Mag1);
semilogx(w2,Mag2(w2));
end
grid on;
xlabel('Frequency');
ylabel('dB');

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeRange and Doppler Estimation についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by