Demux and State Space Dimension errors

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!

Antworten (2)

Paul
Paul am 1 Jun. 2021

0 Stimmen

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 Kommentare

Ryan DiTullio
Ryan DiTullio am 1 Jun. 2021
I have that set to 4, and I still get the same error.
Paul
Paul am 1 Jun. 2021
What are the dimensions of A,B,C,D in the State Space block?
Ryan DiTullio
Ryan DiTullio am 1 Jun. 2021
I've done 1 1 1 1, 1 2 3 4, and 4 4 4 4. None of those worked.
Paul
Paul am 1 Jun. 2021
I'm not sure what those numbers mean. From the diagram, it looks like B and D should both have four columns. I'm going to guess that C and D should both have 4 rows. Do the B, C, and D parameters of the State Space model have these characteristics?
Ryan DiTullio
Ryan DiTullio am 1 Jun. 2021
Paul
Paul am 1 Jun. 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 am 2 Jun. 2021
Bearbeitet: Paul am 3 Jun. 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?

Melden Sie sich an, um zu kommentieren.

Ryan DiTullio
Ryan DiTullio am 2 Jun. 2021

0 Stimmen

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.

Kategorien

Produkte

Version

R2021a

Gefragt:

am 1 Jun. 2021

Bearbeitet:

am 3 Jun. 2021

Community Treasure Hunt

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

Start Hunting!

Translated by