Skip to content

minreal does not give a minimal realisation #992

@hurak

Description

@hurak

When forming a matrix of transfer functions as in the following code

using ControlSystems
G = tf(1, [2, 3])
W1 = tf(4, [5, 6])
W2 = tf(7, [8, 9])
W3 = tf(10, [11, 12])
P = [W1 -W1*G; 0 W2; 0 W3*G; 1 -G]

the corresponding state-space realization is of order 7. This is expected, since the matrix or transfer functions contains 7 first-order transfer functions. Indeed,

julia> P = ss(P);

julia> size(P.A,1)
7

Some of the transfer functions defining P are repeated, hence we want to get a minimal realization

julia> Pmin = minreal(P);

julia> size(Pmin.A,1)
5

This I do not expect, because the number of distinct first-order systems is 4, which is also the order of a minimal realization that I would expect.

By the way, this is also the order of a minimal realization returned by Matlab:

>> G = tf(1, [2, 3]);
W1 = tf(4, [5, 6]);
W2 = tf(7, [8, 9]);
W3 = tf(10, [11, 12]);
P = [W1 -W1*G; 0 W2; 0 W3*G; 1 -G];
P = ss(P);
size(P.A,1)
Pmin = minreal(P);
size(Pmin.A,1)
ans =
     7
3 states removed.
ans =
     4

I will perhaps dig deeper, but at this point there is at least a difference between ControlSystems.jl and Matlab' Control Systems Toolbox.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions