rlocus behaviour seems inconsistent for system with cancelling pole and zero
조회 수: 5 (최근 30일)
이전 댓글 표시
In the past, if sys included a coincident pole/zero pair, rlocus(sys) would show both. Now the plot shows neither (i.e. it seems to have made a unilateral decision to cancel the pole with the zero). However, the closed-loop poles obtained via rlocfind(sys) or feedback(sys,k) still include the coincident one.
e.g.
sys = tf([1 2 0],[1 4 6 17 0]); % coincident pole and zero at s = 0
rlocus(sys) % shows neither pole or zero at s = 0
[k,poles] = rlocfind(sys) % shows a red + at s = 0
cl = feedback(sys,15); % returns a closed-loop transfer function with both pole and zero at s = 0
This is quite confusing. Is the change deliberate? I would suggest that rlocus should leave the user to decide whether to eliminate any matching pole/zero pairs rather than taking matters into its own hands.
댓글 수: 1
Paul
2022년 3월 28일
One would think that rlocus and rlocfind would be consistent with each other, i.e., either show the open loop pole/zero and the closed loop pole, or show none of them.
It looks like the tolerance used to not show the open/loop pole zero is very tight. I changed the numerator to [1 2 eps] and rolcus showed the open loop pole/zero at/nearly at the origin.
AFAIK, feedback() will never do the pole zero cancellation.
답변 (1개)
nick
2024년 2월 7일
Hi Will,
I understand from your query that you're looking to create a root locus plot of a system using MATLAB's "rlocus" function without automatically cancelling coincident poles and zeros.
One approach as mentioned by Paul is to utilise "eps" to obtain pole and zero nearly at origin. Alternatively you can convert the "transfer function model" to "zero pole gain" model. The rlocus doesnt perform pole-zero cancellation for "zero pole gain" model of the system as shown:
sys_zpk = zpk(1,1,1)
rlocus(sys_zpk)
Hope this helps.
댓글 수: 2
Paul
2024년 2월 7일
Well, this is all very interesting.
Examples by @Neelanshu
sys_zpk = zpk(1,1,1);
figure,rlocus(sys_zpk);
sys_tf = tf([1 -1],[1 -1]);
figure,rlocus(sys_tf);
To be clear, the pole/zero cancellation is actually affecting the calculation, it's not just a plotting thing. We can see this by
r = rlocus(sys_zpk)
r = rlocus(sys_tf)
But, add a pole at the origin:
sys_zpk = zpk(1,[1 0],1)
figure
rlocus(sys_zpk)
systf = tf([1 -1],[1 -1 0]);
figure
rlocus(systf)
r = rlocus(systf)
Hmm, that pole/zero at s = 1 is kept on the plot and the calculation
Here's the original example by @Will Graham
sys = tf([1 2 0],[1 4 6 17 0]); % coincident pole and zero at s = 0
figure
rlocus(sys) % shows neither pole or zero at s = 0
r = rlocus(sys)
Only three roots returned, but there should be four.
sys_zpk = zpk(sys)
But everything is as expected for zpk
sys_zpk = zpk([-2 0],[0, -3.636, roots([1 0.3642 4.676]).'],1);
figure
rlocus(sys_zpk)
r = rlocus(sys_zpk)
For the tf cases, I'm pretty sure this behavior can be explained as follows.
Buried in rlocus, the tf input is converted to an ss object
sys_ss = ss(sys)
We can see, by inspection of the structure of the system, that x4 has no effect on th input/output behavior. Matlab calls this structurally non-minimal. Inside rlocus, it makes a call to sminreal and we lose the pole/zero at the origin
sminreal(sys_ss)
tf(ans)
and we get the root locus of the reduced order system.
Now let's check a different case with tf
sys = tf([1 -1],[1 -1 0])
In this case, the conversion to ss results in a structurally minimal system
ss(sys)
because C(1,2) is non-zero. So the call to sminreal does nothing
sminreal(ans)
and the rlocus results include the pole/zero at s = 1.
I didn't poke around in the code for the zpk case, but I suspect it's a similar issue. Going all the way back to the simplest case
sys_zpk = zpk(1,1,1);
The ss realization is structurally minimal
ss(sys_zpk)
sminreal(ans)
so the pole/zero at s = 1 stays.
But the ss realization of the tf form
sys_tf = ss(tf([1 -1],[1 -1]))
is structurally minimal because C = 0
sminreal(sys_tf)
and the pole/zero at s = 1 is eliminated.
Summary: rlocus converts tf (and probably also zpk) objects to ss and then calls sminreal on the result. If the ss realization is not structurally minimal, pole/zero cancellations will ensue.
I don't know why that call to sminreal was implemented in rlocus. Maybe it improves the accuracy of the results, or maybe it was some other reason. Regardless, it seems like the inconsistent behavior from the user's perspective is undesirable and that, if the call to sminreal is needed, some other action might be warranted, like a warning if sminreal eliminated some poles/zeros, or an option to have the the cancelled poles/zeros added back in to the output returned to the user (the output arguments and/or the plot).
참고 항목
카테고리
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!