-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Too few poles for MIMO tf #111
Comments
Took a quick look at this. The problems seems to be in |
Does this still happen with my new implementation of _common_den ? |
I'll try to take a look this weekend. I see you have put the brakes on this
over at #194 [edit: oops, meant #206].
I see Matlab describe their MIMO tf pole algorithm here:
https://www.mathworks.com/help/control/ref/pole.html (see "algorithms"
near the end)
I can't remember if that's what is intended here.
…On Wed, 30 May 2018, 13:39 Rene van Paassen ***@***.***> wrote:
Does this still happen with my new implementation of _common_den ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#111 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAGxfv5bMBTnl9GS9sOmwUAK9p21zAB4ks5t3oT6gaJpZM4J4Tko>
.
|
Here's a moderately tricky case from Maciejowski's Multivariable Control, Example 2.2: num = [ [ [1], [-1] ],
[ [1,1,-4], [2,-1,-8] ],
[ [1,-2], [2,-4] ] ]
den = [ [ [1,3,2], [1,3,2] ],
[ [1,3,2], [1,3,2] ],
[ [1,1], [1,1] ] ]
g = control.tf(num, den) This has three poles: two at -1, and one at -2. It also has a transmission zero at +2, which might be of interest as a test case for #205. Matlab's pole(tf(num,den)) gives poles [-2,-2,-1,-1,-1] for this system (but pole(minreal(ss(tf(num,den)))) gives the right answer). Octave's control toolbox version 3.0.0 resorts to minreal(ss(g)) for MIMO poles; for this example, it gives [-1,-1,-2,-2]. If I do the same thing in python-control, I get [-1,-1,-2]. |
This is system can be put into
Then we have 5 poles indeed. However if we decompose to the other side by MFD then we get the four pole answer by adding So we shift the problem from pole to zero in terms of minimality. The actual answer is only possible to find if the common denominator can be completed to Since |
Is an algorithm based on extracting common denominators to left (row-wise) or right (column-wise) (or both?) a reasonable option? Or should we just convert to state-space and get the poles that way? |
Unfortunately, I am not aware of any algorithms that solves this satisfactorily for transfer models by obtaning Mcmillan forms. As your example nicely demonstrates, there is a need to evaluate the pole directions and I am not sure that it is worth the effort to bother with all pathological cases. However, the initial example clearly has a bug of not taking into account the multiplicities as Richard mentioned. I guess having more poles than the Mcmillan degree is OK since nonminimality is a common expectation. But fewer poles is not correct in my opinion and might be misleading. |
* replaced the _common_den function internals. Passes tests * make xferfcn.py python2 compatible again * working tf -> ss transformation now, also solved #111 * disabled MIMO test when no slycot * do not cancel pole/zero pairs before calculating pole() in xferfcn.py - for the above reason, do conversion on minreal'd xferfcn in statesp.py - add a test for not canceling pole/zero pairs when calculating pole() - add import of matlab in discrete_test.py * change testModred; that one did state removal on a system of which the selection of states was automatic
PR #206 claims to have fixed this problem. It definitely fixes the problem identified by @roryyorke at the top of this issue. For the "tricky case from Maciejowski's Multivariable Control, Example 2.2", I get the following:
This appears to be right, but leaving for @roryyorke to confirm and then we can close out this issue. |
Will try to review this weekend.
…On Wed, 18 Jul 2018, 06:07 Richard Murray ***@***.***> wrote:
Assigned #111
<#111> to
@roryyorke <https://github.com/roryyorke>.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#111 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAGxfpa1sVu7Xlv58tkj5kYHKBxMYHmbks5uHrRogaJpZM4J4Tko>
.
|
Tested a007fcc, looks good to me. |
2x2 MIMO system I/s (diagonal, integrators on diagonal) is reported as having 1 pole. Converting to state-space gives the correct number of poles.
tested with slycot python-control/Slycot@a1f43ab and python-control cdd3e73
output:
The text was updated successfully, but these errors were encountered: