2013-12-08 33 views
-1

對於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。請有人可以幫助我嗎?

+0

更明確地說明您遇到的問題。幾句話就可以做到。 –

+0

看看我的最終編輯。你的問題肯定有錯誤。 – thewaywewalk

+0

根據這個特定問題我的答案是0.42正確的頻率增益是否爲正確? –

回答

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

+2

只是一個提示:你可以這樣定義拉普拉斯算子's = tf('s');' – remus

+0

@remus:我真的知道了,只是忘了它,謝謝! – thewaywewalk