Error due to multiple causes in Simulink block diagram

19 visualizaciones (últimos 30 días)
Linee Teh
Linee Teh el 22 de Abr. de 2020
Respondida: Priyanshu Mishra el 27 de Abr. de 2020
I am facing error while computing the maltab coding in my state-space simulink block diagram.
The error is:
Error using to_mathwork (line 43)
Error due to multiple causes.
Caused by:
Error using to_mathwork (line 43)
Unsupported input format for From Workspace block 'LQR_v2/Gain'. Available formats are double
non-complex matrix, a structure with or without time, or a structure with MATLAB timeseries
as leaf nodes. All formats require the data to be finite (not Inf or NaN).
Error using to_mathwork (line 43)
Unsupported input format for From Workspace block 'LQR_v2/Input matrix'. Available formats
are double non-complex matrix, a structure with or without time, or a structure with MATLAB
timeseries as leaf nodes. All formats require the data to be finite (not Inf or NaN).
The Gain and Input matrix blocks are time varying, I need to make sure that the system compute every Input matrix and Gain values at the specific time. For example, when time, t = 1s, the values of Input matrix and Gain should be on t = 1s. The matlab and simulink file are attached together.
I hope my clarification is clear and really thanks for the help.
  1 comentario
Ameer Hamza
Ameer Hamza el 24 de Abr. de 2020
It appears that this question is similar to one I answered here: https://www.mathworks.com/matlabcentral/answers/520162-how-to-insert-a-time-varying-matrix-in-simulink? If this issue is resolved, then please close or delete this question.

Iniciar sesión para comentar.

Respuestas (1)

Priyanshu Mishra
Priyanshu Mishra el 27 de Abr. de 2020
Hi Linee,
The error is due to the "From worksapce" block, which you are using in your model. The first collumn of your data (which you are importing) should be time vector.
For more information on this, you may refer to following documentaion

Categorías

Más información sobre Block Libraries en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by