Demux and State Space Dimension errors

10 visualizaciones (últimos 30 días)
Ryan DiTullio
Ryan DiTullio el 1 de Jun. de 2021
Editada: Paul el 3 de Jun. de 2021
Hi,
I am trying to run this sim, and I keep getting these errors "Invalid setting for input port dimensions of 'Feedback_Control_System/Demux'. The dimensions are being set to [-1]. This is not valid because the total number of input and output elements are not the same" and "Error in port widths or dimensions. Invalid dimension has been specified for 'Output Port 1' of 'Feedback_Control_System/State-Space'."
I am not sure how to solve this issue. Any help would be much appreciated!

Respuestas (2)

Paul
Paul el 1 de Jun. de 2021
If the output of the State Space block has four elements, then set the "Number of outputs" parameter of the Demux block to 4.
  7 comentarios
Paul
Paul el 1 de Jun. de 2021
If each sensor measurement is a scalar quantity (which is what would make sense), then the input to the State Space block is a 4-dimensional vector of error signals. In this case, B and D both must have four columns. Similarly, it looks like the output of the State Space block should be a four dimensional vector of meausrements, so the C and D matrices both must have four rows. The A matrix, of course, must be square and B has the number of rows of A and C has the same number of columns. So you can't just put A = B = C = D = 1 as the parameters. I have no idea what you want to put in that State Space block. But just to get things connnected properly, try A = B = C = D = eye(4).
Paul
Paul el 2 de Jun. de 2021
Editada: Paul el 3 de Jun. de 2021
In response to this comment: "Oh! I didn't realize we could create a matrix for the values of A,B,C, and D in the parameters. That makes so much more sense! Thanks for the help."
What are the values of A, B, C, D supposed to be? Is a State Space block is what should be used for this application?

Iniciar sesión para comentar.


Ryan DiTullio
Ryan DiTullio el 2 de Jun. de 2021
Oh! I didn't realize we could create a matrix for the values of A,B,C, and D in the parameters. That makes so much more sense! Thanks for the help.

Categorías

Más información sobre Event Functions en Help Center y File Exchange.

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by