Simulink State Space Error

조회 수: 22 (최근 30일)
Dylan Ishman
Dylan Ishman 2023년 3월 28일
댓글: Dylan Ishman 2023년 3월 28일
I'm receiving the error:
Error in port widths or dimensions. 'Output Port 1' of 'Project1/Step' is a one dimensional vector with 1 elements.
Component:Simulink | Category:Model error
Error in port widths or dimensions. 'Input Port 1' of 'Project1/State-Space' has 2 elements. This port does not accept the dimensions (or orientation) specified by the input signal.
Component:Simulink | Category:Model error
When I run the attached simulink model. I inputted state space variables with size A: 4x4, B: 4x2, C: 1x4, D: 1x2 into the state space block. It seems that there is a dimension error with the sine wave input. How do I fix this?

채택된 답변

Paul
Paul 2023년 3월 28일
Hi Dylan,
Unclear why the error message refers to "Project1/Step" when the model apparently does not contain a Step block.
Anyway, the state space model is expected a 2-dimensional input, so the parameters of the Sine block need to specify a 2D signal. That means at least one of the block parameters of the Sine block needs to be a 2-element vector. For example, set the Amplitude parameter to
[1 1]
so that Simulink "knows" the output should be 2D. Or if you want them to have different amplitudes, then
[1 2]
for example.
Use a two-element vector for any of the other parameters to assign different properties for the sine wave outputs.
  댓글 수: 2
Fangjun Jiang
Fangjun Jiang 2023년 3월 28일
The "Sine" block is named as "Step". :)
Dylan Ishman
Dylan Ishman 2023년 3월 28일
This worked, thank you!

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

추가 답변 (1개)

Fangjun Jiang
Fangjun Jiang 2023년 3월 28일
Your A, B, C, D values specify that the size of the input is 2x1 (two inputs) but the Step block provides only one input.

카테고리

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

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by