functiontoBalancedForm
Perform the similarity transformation to a balanced form (to make further numerical computations on the StateSpace system more reliable)
Information
Syntax
ssBalanced = StateSpace.Transformation.toBalancedForm(ss);
Description
Balancing a linear dynamic system in state space form ss means to find a state transformation x_new = T*x = diagonal(scale)*x so that the transformed system is better suited for numerical algorithms. In more detail:
This function performs a similarity transformation with T=diagonal(scale) such that S_scale
|inv(T)*ss.A*T, inv(T)*ss.B|
S_scale = | |
| ss.C*T, 0 |
has a better condition as system matrix S
|ss.A, ss.B|
S = | |
|ss.C, 0 |
that is, conditionNumber(S_scale) ≤ conditionNumber(S). The elements of vector scale
are multiples of 2 which means that this function does not introduce round-off errors.
Example
import Modelica.Math.Matrices.norm;
ss = Modelica_LinearSystems2.StateSpace(A=[1, -10, 1000; 0.01, 0, 10; 0.005, -0.01, 10],
B=[100, 10; 1,0; -0.003, 1],
C=[-0.5, 1, 100],
D=[0,0]);
sb = Modelica_LinearSystems2.StateSpace.Transformation.toBalancedForm(ss);
-> Results in:
norm(ss.A) = 1000.15, norm(ss.B) = 100.504, norm(ss.C) = 100.006
norm(sb.A) = 10.8738, norm(sb.B) = 16.0136, norm(sb.C) = 10.2011
The algorithm is taken from
- H. D. Joos, G. Grübel:
- RASP'91 Regulator Analysis and Synthesis Programs
DLR - Control Systems Group 1991
which is based on the balance function from EISPACK.
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| StateSpace | ss | State space system |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| StateSpace | ssBalanced | Balanced ss |