Demux and State Space Dimension errors

조회 수: 10 (최근 30일)
Ryan DiTullio
Ryan DiTullio 2021년 6월 1일
편집: Paul 2021년 6월 3일
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!

답변 (2개)

Paul
Paul 2021년 6월 1일
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
Paul
Paul 2021년 6월 1일
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 2021년 6월 2일
편집: Paul 2021년 6월 3일
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?

댓글을 달려면 로그인하십시오.


Ryan DiTullio
Ryan DiTullio 2021년 6월 2일
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.

카테고리

Help CenterFile Exchange에서 Event Functions에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by