找到增益交叉频率?

时间:2013-12-08 13:10:01

标签: matlab

对于G(s)= K /(s(s + 0.5)(s + 4.6)),K选择标量

G(s) =   
            1
  ---------------------
  s^3 + 5.1 s^2 + 2.3 s

找到增益交叉频率,这将提供45度相位裕度。

我使用sisotool解决了这个问题,据我所知,我的答案是0.42,但我的教程表显示答案为0.23。请有人帮我这个吗?

1 个答案:

答案 0 :(得分:1)

以下功能是找到增益:

function findGainM()

phasemargin = 45; 

s = tf([1 0],1);               % definition of Laplace-Operator
A = 1/(s*(s+0.5)*(s+4.6));     % Transferfunction with K=1

disp(A)
fun = @(x) findGain(x,phasemargin,A); 
fzero(fun,1);

% display result
K = evalin('base','K');
w = evalin('base','wco');
disp( ['absolute gain: ' num2str(K)] )
disp( ['logarithmic gain: ' num2str(20*log10(K)) ' dB'] )
disp( ['crossover frequency: ' num2str(w) ' rad/s'] )
disp( ['crossover frequency: ' num2str(w/(2*pi)) ' Hz'] )

figure(1)
bodeplot(K*A)
grid on;

end

function rootPhase = findGain(w,phasemargin,A)
[mag,phase] = bode(A,w);
disp([mag,phase])
rootPhase = 180 - phasemargin + phase;
gain = 1/mag;
assignin('base','K',gain)
assignin('base','wco',w)
end

返回:

absolute gain: 1.2536
logarithmic gain: 1.963 dB
crossover frequency: 0.4169 rad/s
crossover frequency: 0.066352 Hz

enter image description here


我还检查了sisotool获得与我的功能相同的结果。

enter image description here