minreal not working as expected
Show older comments
Hi everyone, I need to calculate the minimal realization form of a transfer function, which is a combination of other transfer function previously defined.
minreal(-G12*G21*R1 /(1+R1*G11))
The expected result is be 10 / (s^2+6s+5), while minreal returns (10s^2+20s+10)/(s^4+8s^3+18s^2+16s+5). Now, launching the roots command on the numerator and the denominator returns the roots I expected, which can be simplified, obtaining the expected result. There are also two strange behaviors:
- The roots of the numerator are treated as real numbers, while the roots of the denominator are treated as complex number with a null immaginary part.
- Launching
pzmap(minreal(-G12*G21*R1 /(1+R1*G11)))
I obtain the attacched map, in which some zeros don't have null immaginary part, while the roots of numerator are real numbers.
- Launching
minreal(-G12*G21*R1 /(1 + minreal(R1*G11)))
returns the expected result. Can someone explain me what is happening?
Here is the data used:
s = tf('s')
G11 = 1/(s+1)
G12 = 2/(s+1)
G21 = -1/(s+1)
G22 = -1/(s+1)
R1 = 5*(s+1)/s
3 Comments
Flavio Tonellli
on 26 Jun 2016
Edited: Flavio Tonellli
on 26 Jun 2016
EDIT : moved in the answer section.
Star Strider
on 26 Jun 2016
@Flavio Tonelli —
That is an excellent Answer! Please list it as one so Fabio Bonassi can Accept it.
Flavio Tonellli
on 26 Jun 2016
oh well you are right! I mistakenly posted it as a comment
Accepted Answer
More Answers (1)
Harvey Louzon
on 21 Sep 2021
0 votes
Interestingly the same problem arises in the following senario: Take
TF = (0.0001998*s + 2e-6)/(s^3 + 0.03*s^2 + 0.0003998*s + 2e-6).
this has poles at
-0.0100 + 0.0100i
-0.0100 - 0.0100i
-0.0100 + 0.0000i
and a zero at -0.0100
However minreal will not cancel the the zero at -0.0100 with the pole at -0.0100 + 0.0000i unless a tolerance is stipulated.
Categories
Find more on MATLAB in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!