필터 지우기
필터 지우기

How to integrate varying-size signals in simulink?

조회 수: 4 (최근 30일)
Dhruvit
Dhruvit 2023년 7월 30일
답변: Sam Chak 2023년 8월 1일
I have a varying-size signal whose dimension changes based on input and integrator block does not accept variable-size signal. So, in that case which block shall I use or how to perform integration of varying-size signal?
  댓글 수: 4
Sam Chak
Sam Chak 2023년 7월 30일
If it is okay with you, could you please provide the system states and the ODEs for the nth-node flexible tether, so that the dynamics can be tested in MATLAB? If everything works well, then you can consider migrating the MATLAB code of the ODE part to Simulink (MATLAB Function block).
for i = 1:n
acceleration of i th node = -Damping (ith element)*velocity(ith node) - tension (ith node) / mass matrix of ith node
end
Dhruvit
Dhruvit 2023년 8월 1일
편집: Dhruvit 2023년 8월 1일
So, my code is working fine in MATLAB but while implementing it in simulink when acceleration term of tether which is 3xn matrix (n = no of nodes) is integrated using second order integrator block to get the velocity and position it is showing this error "Simulink can not propogate the varisble-size mode to integrator block".

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

채택된 답변

Sam Chak
Sam Chak 2023년 8월 1일
The error seems to indicate that there is a problem with the dimensions of your acceleration term (3xn matrix) when using the second-order integrator block. Try ensuring that the size of the acceleration term (3xn matrix) is consistent and defined properly. In Simulink, the inputs to blocks need to have fixed dimensions. Check if there is any inconsistency in the size of the matrix, and make sure that the number of columns (n) is defined and constant.

추가 답변 (0개)

카테고리

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

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by