# harold.minimal_realization¶

harold.minimal_realization(G, tol=1e-06)

Given system realization G, this computes minimal realization such that if a State representation is given then the returned representation is controllable and observable within the given tolerance tol. If a Transfer representation is given, then the fractions are simplified in the representation entries.

Parameters: G (State, Transfer) – System representation to be checked for minimality tol (float) – The sensitivity threshold for the cancellation. G_min (State, Transfer) – Minimal realization of the input G

Notes

For State() inputs the alogrithm uses cancellation_distance() and staircase() for the tests. A basic two pass algorithm performs:

1- First distance to mode cancellation is computed then also the Hessenberg form is obtained with the identified o’ble/c’ble block numbers.

2- If staircase form reports that there are no cancellations but the distance is less than the tolerance, distance wins and the corresponding mode is removed.

For Transfer() inputs, every entry of the representation is checked for pole/zero cancellations and tol is used to decide for the decision precision.