How to integrate varying-size signals in simulink?

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 Comments

Are you saying that the signal has a varying time dimension? If possible, could you sketch some diagrams to make it easier to visualize your problem from the pure math perspective?
Okay, so I am modelling tether dynamics using lumped mass approach and for that I have n nodes. so in matlab function I have created for loop like:
for i = 1:n
acceleration of i th node = -Damping (ith element)*velocity(ith node) - tension (ith node) / mass matrix of ith node
end
so when I run my model it is showing error that my matlab function output is varying-size signal and second integrator block does not support that. So, my question is how to integrate that?
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
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".

Sign in to comment.

 Accepted Answer

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.

More Answers (0)

Categories

Find more on General Applications in Help Center and File Exchange

Products

Release

R2023a

Asked:

on 30 Jul 2023

Answered:

on 1 Aug 2023

Community Treasure Hunt

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

Start Hunting!