control system bode plot

조회 수: 1 (최근 30일)
Irshad Baruah
Irshad Baruah 2020년 3월 26일
댓글: Birdman 2020년 3월 30일
how to plot this two equatio and the resutant output is shown in the figure

채택된 답변

Birdman
Birdman 2020년 3월 26일
Try this:
alpha=1;Wcr=10;
syms w
Mag(w)=piecewise(w<Wcr,20,w>=Wcr,-26.144+20*alpha*log(w));
w=logspace(-1,3,1000);
semilogx(w,Mag(w));grid on;xlabel('Frequency');ylabel('dB')
  댓글 수: 9
Irshad Baruah
Irshad Baruah 2020년 3월 27일
alpha value should be fractional,in this code if i chang the alpha value the graph got cut
Birdman
Birdman 2020년 3월 30일
Hello Irshad,
Sorry for the late reply. There has been something in the code that I missed, so the following code is working:
hold off;
alpha=0.09;Wcr=10;
w1=logspace(-1,log10(Wcr),1000);w2=logspace(log10(Wcr),3,1000);
Mag1=20*alpha*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')

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Frequency-Domain Analysis에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by