balreal_direct_pyΒΆ
Find balanced realisation of continuous (DLTI = False
) and discrete (DLTI = True
)
time of LTI systems using scipy libraries.
The function proceeds to achieve balanced realisation of the state-space system by first solving the Lyapunov equations. They are solved using Barlets-Stewart algorithm for Sylvester equation, which is based on A matrix Schur decomposition.
to obtain the reachability and observability gramians, which are positive definite matrices.
Then, the gramians are decomposed into their Cholesky factors such that:
A singular value decomposition (SVD) of the product of the Cholesky factors is performed
The singular values are then used to build the transformation matrix \(\mathbf{T}\)
The balanced system is therefore of the form:
Warning
This function may be less computationally efficient than the balreal
Matlab implementation and does not offer the option to bound the realisation
in frequency and time.
Notes
Lyapunov equations are solved using Barlets-Stewart algorithm for Sylvester equation, which is based on A matrix Schur decomposition.
param A: | Plant Matrix |
---|---|
type A: | np.ndarray |
param B: | Input Matrix |
type B: | np.ndarray |
param C: | Output Matrix |
type C: | np.ndarray |
param DLTI: | Discrete time state-space flag |
type DLTI: | bool |
param Schur: | Use Schur decomposition to solve the Lyapunov equations |
type Schur: | bool |
returns: |
|
rtype: | tuple of np.ndarrays |
References
Anthoulas, A.C.. Approximation of Large Scale Dynamical Systems. Chapter 7. Advances in Design and Control. SIAM. 2005.