Recivecing an error "Unable to convert the model to a transfer function because of overflow." when dealing with large state space models
24 views (last 30 days)
Show older comments
Hello,
I have a state-space (lets called "ss_total") containg A,B,C,D matrices and the dimension of those matrices are around 1000. I need to get the transfer function for each input and output however if use tf(ss_total(1,1)) (for the tf of first input and output) I recieve an error "Unable to convert the model to a transfer function because of overflow." I have tried different functions such as [num,denum]=ss2tf(A,B,C,D) (this case it only calculates until the 60th order and the rest is NaN of INF), sparse matrices however it is not working. I dont want to to model order reduction (pz cancellation and etc.) since I will lose dynamics hence, I would be happy if someone has experience on this topic.
Best regards,
Onur
3 Comments
Paul
on 27 Feb 2024
Representing a system of that size as a tf object is probably infeasible from a numerical represesentation standpoint, except for very special cases. In general, ss objects are preferred over tf anyway. Why is there a need to convert to tf in the first place?
Sam Chak
on 27 Feb 2024
I rarely encounter systems with extremely high orders. Are 1000 states truly physically plausible and interpretable? For instance, a train engine coupled with 999 compartment coaches. In this case, I am simply testing whether any errors occur when modeling a Transfer Function of the 1000th order.
n = 1000;
A = magic(n);
B = [zeros(n-1, 1); 1];
C = [1, zeros(1, n-1)];
D = 0*C*B;
sys = ss(A, B, C, D);
G = tf(sys)
p = pole(G);
size(p)
Accepted Answer
Nirupama
on 27 Feb 2024
From the information that you have provided I understand that you are working with a system which has multiple states, inputs and outputs. You are able to create a state-space system from various matrices. But you are getting an overflow error while using ‘tf’ function to convert the specified state-space system to the transfer function model.
- For a Multi Input Multi Output system (MIMO), there will be multiple transfer functions representing cross coupling of various inputs and outputs.
- When passing an LTI object to the "tf" function, if any of the zeros or poles in the system are infinite or NaN, the "tf" function will return an overflow error. This can be predicted by computing the roots of the numerator and denominator polynomials for the transfer function representation of the system and checking if any of these values are not finite using the "isfinite" function.
In your current model I guess for some combination of inputs and outputs, the poles or zeros are either infinte or NaN and hence the resulting transfer function will also be NaN which is why the overflow error is thrown.
Refer to the following documentation for more details on MIMO State-Space models: https://www.mathworks.com/help/control/ug/mimo-state-space-models.html
Hope this helps!
1 Comment
Paul
on 27 Feb 2024
Hi @Nirupama
i doubt this issue has anything to do with zeros or poles being infinite or NaN (I'm not ever sure what that means). Here's an example that seems to indicate as such.
rng(100);
sys = rss(1000);
size(sys)
[any(~isfinite(pole(sys))) , any(~isfinite(zero(sys)))]
systf = tf(sys);
More Answers (0)
See Also
Categories
Find more on Time and Frequency Domain Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!