Using a while loop in MATLAB, verify your result in (b) by computing the poles of the closed-loop transfer function as k increases from 0.001 in increments of 0.001. When your loop finishes running, display the largest gain k = kmax that guarantees..
1 次查看(过去 30 天)
显示 更早的评论
I found a stability k factor by hand for a unity feedback control system.
I am geting stuck on this part.
Using a while loop in MATLAB, verify your result in (b) by computing the poles of the closed-loop transfer function as k increases from 0.001 in increments of 0.001. When your loop finishes running, display the largest gain k = kmax that guarantees closed-loop stability. Hint: >> help max, >> help pole, >> help real
this is my code so far.
s = tf('s'); %define transfer function variable
k = 0.001;
SYS = (10*k*(s+1)) / ( s^4 + 4*s^3 + 9*s^2 + (10*k + 10)*s); %define TF
while k < kmax
pole(SYS)
k = k + 0.001; %increment k
end
disp kmax
help would be appreciated
[SL: formatted the code as code]
0 个评论
回答(1 个)
Sarvani Panguluri
2020-8-6
Hi,
I assume you are trying to find the maximum k for which the system is stable. As per my knowledge, the system is stable when the poles of closed loop transfer function lie on the left-hand side of the s-plane. So, the real part of the poles have to negative.
try implementing the following code.
s = tf('s'); %define transfer function variable
k =0.001;
temp=true;
while temp
SYS = (10*k*(s+1)) / ( s^4 + 4*s^3 + 9*s^2 + 10*k*s + 10*k);
if(all(real(pole(SYS)) <=0))
k=k+0.001;
else
temp=false;
end
end
disp(k-0.001)
Hope it helps!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Classical Control Design 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!