i want to find out area under the curve using quad command ,the curve is generated after running the programme

조회 수: 2 (최근 30일)
clc
clear all
s=tf('s')
alpha=0.05
mu=0.05;
ztap=0;
ztaa=sqrt(3*mu/(8*(1+mu)));
omegaa=(1/(1+mu));
a1=1-alpha;
a2=2*ztaa*omegaa+2*ztap+2*ztaa*omegaa*mu;
a3=omegaa^2+4*ztap*ztaa*omegaa+mu*omegaa^2+1;
a4=2*ztap*omegaa^2+2*ztaa*omegaa;
a5=omegaa^2;
A=s^2+2*ztaa*omegaa*s+omegaa^2;
D=a1*s^4+a2*s^3+a3*s^2+a4*s+a5;
G=A/D;
bodemag(G)
After running this programme a curve is generated (bode plot) i want find out area under this curve by using quad syntax i tried to solve this many times i m very new to matlab please help me to find out the answer

답변 (1개)

Grzegorz Knor
Grzegorz Knor 2012년 11월 7일
If you draw yourself Bode plot (see code), you receive vectors 'x' and 'y', which can be numerically integrate.
[HMag, HPhase, HOmega] = bode(G);
HMag = squeeze(HMag);
HPhase = squeeze(HPhase);
figure
semilogx(HOmega, 20*log10(HMag),'r')
xlabel('Frequency (rad/s)')
ylabel('Magnitude (dB)')
title('Bode Diagram')

카테고리

Help CenterFile Exchange에서 Classical Control Design에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by