PID Controller Design by Pole Assignment
古いコメントを表示
Hello, im trying to design a PID controller by polynomial coefficient method by given code below but the code seems to find Ki and bres always zero. Can someone help me understand what the problem is?
clc
clear all
syms s x s h y z t K_d K_p K_i ares bres;
% symbolic variables are defined to see if function is working correctly
h=12;x=15;y=35;z=45;t=50;
pole = 1-1i;
p_ds = expand((s-pole) * (s-(conj(pole))))
coef2=coeffs(p_ds,s,'All');
p_es = (s^2+ares*s+bres);
coef = coeffs(p_es,s,'All');
Gs = h /(x*s^3+y*s^2+z*s+t);
[numGs,denGs] = numden(Gs)
denGs1 = coeffs(denGs)
denGs2 = double(denGs1)
p = (p_es * p_ds)
p1 =coeffs(p,s,'All')
Fs = (K_d*s^2+K_p*s+K_i )/ s
Tss = (Gs*Fs)/(1+Gs*Fs)
[numTss,pcs] = numden(Tss)
prob = coeffs(pcs/x,s,'all') == coeffs(p_ds*p_es,s,'all');
for i = 1:length(prob)
disp(vpa(prob(i),4));
end
sol = solve(prob)
disp(sol)
Kdval = double(sol.K_d)
Kpval = double(sol.K_p)
Kival = double(sol.K_i)
aresval = double(sol.ares)
bresval = double(sol.bres)
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Numeric Solvers についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!