Borrar filtros
Borrar filtros

Recivecing an error "Unable to convert the model to a transfer function because of overflow." when dealing with large state space models

24 visualizaciones (últimos 30 días)
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 comentarios
Paul
Paul el 27 de Feb. de 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
Sam Chak el 27 de Feb. de 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)
G = 9.99e05 s^998 - 2.497e14 s^997 + 4.142e19 s^996 + 4.498e12 s^995 + 1.516e06 s^994 - 0.07009 s^993 - 8.876e-11 s^992 + 8.781e-18 s^991 - 2.974e-26 s^990 - 2.118e-34 s^989 + 1.069e-42 s^988 + 2.171e-51 s^987 - 1.681e-59 s^986 - 8.789e-69 s^985 + 1.596e-76 s^984 - 3.421e-86 s^983 - 1.042e-93 s^982 + 7.079e-103 s^981 + 5.033e-111 s^980 - 5.193e-120 s^979 - 1.883e-128 s^978 + 2.53e-137 s^977 + 5.627e-146 s^976 - 9.338e-155 s^975 - 1.372e-163 s^974 + 2.77e-172 s^973 + 2.763e-181 s^972 - 6.835e-190 s^971 - 4.61e-199 s^970 + 1.437e-207 s^969 + 6.301e-217 s^968 - 2.618e-225 s^967 - 6.747e-235 s^966 + 4.191e-243 s^965 + 4.774e-253 s^964 - 5.957e-261 s^963 + 2.417e-272 s^962 + 7.586e-279 s^961 - 7.846e-289 s^960 - 8.722e-297 s^959 + 1.649e-306 s^958 + 9.072e-315 s^957 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- s^1000 - 5e08 s^999 - 8.333e13 s^998 + 4.167e22 s^997 + 7.322e14 s^996 - 3.785e05 s^995 + 1.06 s^994 + 3.887e-08 s^993 - 5.977e-16 s^992 + 2.621e-24 s^991 - 1.349e-30 s^990 - 3.18e-38 s^989 - 5.342e-46 s^988 - 4.06e-54 s^987 - 1.109e-61 s^986 + 1.203e-68 s^985 + 2.576e-76 s^984 - 7.228e-84 s^983 + 1.982e-91 s^982 - 2.325e-100 s^981 + 2.441e-107 s^980 - 2.532e-114 s^979 + 1.492e-122 s^978 - 2.919e-129 s^977 + 3.039e-137 s^976 + 5.092e-144 s^975 - 2.44e-152 s^974 + 8.105e-161 s^973 - 2.799e-167 s^972 + 7.258e-175 s^971 + 5.109e-182 s^970 + 5.03e-190 s^969 + 1.252e-197 s^968 + 3.423e-205 s^967 + 3.83e-213 s^966 + 2.686e-221 s^965 + 1.153e-229 s^964 - 7.468e-238 s^963 - 2.356e-245 s^962 - 1.228e-253 s^961 + 1.021e-262 s^960 + 3.61e-270 s^959 + 1.904e-278 s^958 - 1.766e-288 s^957 - 5.373e-295 s^956 - 2.311e-303 s^955 + 4.599e-312 s^954 + 5.845e-320 s^953 Continuous-time transfer function.
p = pole(G);
size(p)
ans = 1×2
1000 1

Iniciar sesión para comentar.

Respuesta aceptada

Nirupama
Nirupama el 27 de Feb. de 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 comentario
Paul
Paul el 27 de Feb. de 2024
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)
State-space model with 1 outputs, 1 inputs, and 1000 states.
[any(~isfinite(pole(sys))) , any(~isfinite(zero(sys)))]
ans = 1×2 logical array
0 0
systf = tf(sys);
Error using DynamicSystem/tf
Unable to convert the model to a transfer function because of overflow.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Time and Frequency Domain Analysis en Help Center y File Exchange.

Productos


Versión

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by