clear; close all; clc; s = tf('s'); P = 1/(s^2 + 10*s + 20); t = 0:0.01:2; rs = []; sts = []; os = []; ses = []; Kps = []; maxk=1000; for Kp=1:maxk C = pid(0,0,Kp); T = feedback(C*P,1); [y,~]=step(T); info = stepinfo(T); Kps = [Kps Kp]; rs = [rs info.RiseTime]; sts = [sts info.SettlingTime]; os = [os info.Overshoot]; ses = [ses abs(y(end)-1)]; end subplot(221); plot(Kps,rs,'r'); xlabel('Kd'); title('rise time'); subplot(222); plot(Kps,ses,'c'); xlabel('Kd'); title('steady-state error'); subplot(223); plot(Kps,sts,'b'); xlabel('Kd'); title('settling time'); subplot(224); plot(Kps,os,'g'); xlabel('Kd'); title('overshoot'); big;
RIse time・・・変化なし
Settling time・・・増加
Steady state error・・・変化なし
Overshoot・・・無限大
Dゲインに関する根軌跡を調べる。
H=s/(s^2+10*s+20); rlocus(H);
常に極はLHPにあるのでDゲインに関わらず安定。
比例ゲインを1、積分ゲインを1、最大Dゲインを10000とおいてやってみた結果。
Dゲインが2321でオーバーシュートが減少に転じている。何がおこってるんだろう。
根軌跡を調べる
>> H=s^2/(s^3+11*s+20*s+1); >> rlocus(H); >> pole(H) ans = 0.0161 + 5.5678i 0.0161 - 5.5678i -0.0323 + 0.0000i
ゲインが2000付近で特に何かが起こってるわけではなさそう。