functiondcGain
Return steady state gain matrix K (for a stable system: K[i,j] = value of y[i] at infinite time for a step input of u[j])
Information
Syntax
K = dcGain(ss);
(K, finite) = dcGain(ss);
Description
This function computes the steady state gain K of a state space system. K is defined in the following way:
The linear state space system
der(x) = A*x + B*u
y = C*x + D*u
is solved for y under steady state conditions, i.e.,
der(x) = 0
resulting in
y = ( D + C*inv(A)*B )*u
= K*u
Interpretations of matrix K:
- K is the value of the transfer function G(s) at s=0
- For a stable state space system, a step input u[j] results in the output y[i](t->t∞) = K[i,j].
If A is singular (e.g. due to a zero eigenvalue), then a unique inverse of A does not exist. If there are non-unique solutions of the equation "A*X=B", the one with the smallest norm in X is used to compute K. If no solution of this equation exists, K cannot be computed. In this case, output argument finite = false and all elements of K are set to Modelica.Constants.inf (when K could be computed, finite = true).
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| StateSpace | ss | Linear system in state space form |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real[size(ss.C, 1),size(ss.B, 2)] | K | DC gain matrix K (= G(s=0) = D - C*inv(A)*B) | |
| Boolean | finite | True, if K is finite, otherwise K is infinite (K=fill(Modelica.Constants.inf,..) returned) |