필터 지우기
필터 지우기

'Error in port widths or dimensions' I can't solve it

조회 수: 7 (최근 30일)
건우
건우 2024년 4월 30일
답변: Ishu 2024년 4월 30일
Error in port widths or dimensions.

답변 (1개)

Ishu
Ishu 2024년 4월 30일
Hi 건우 ,
I understand that you are encountering an error in the feedback loop and while using the "Sum" block.. The most common cause is when the output of the "Integrator" block does not match the expected input dimensions of the Sum block or vice versa.
For the feedback loop to work without errors, all signals within the loop must have compatible dimensions. If your input signal is a scalar, ensure that the output of the "Integrator" block (and thus the feedback signal) is also a scalar. If dealing with vectors or matrices, all elements in the loop must have matching dimensions.
From the model you've provided, I noticed that the signal dimension from the "Integrator" block is (1), whereas the expected dimension is (4), resulting in a mismatch of signal dimensions. To resolve this issue, you can adjust by setting the initial condition in the "Integrator" block to a size of 4, matching the dimensions of the signals in your feedback loop and ensuring that the initial condition aligns with your system's requirements. Then, try running the model again to see if the error has been resolved.
Hope it helps!

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by