ADAS// Lane change
6 views (last 30 days)
i am working on generating a reference signal for an autonomous vehicule lane change, unfortunattely i could not solve this this problem since days, changed solver settings, data type...but still getting problem of propagating variable-size signal to a integrator input which support fized-size ?! there is no way to change the integrator input data type
PS: class mate has same model but it works fine !!
Simulink cannot propagate the variable-size mode from the output port 1 of 'polynomial/Add1' to the input port 1 of 'polynomial/Integrator'. This input port expects a fixed-size mode. The variable-size mode originates from 'polynomial/MATLAB Function'. Examine the configurations of 'polynomial/Integrator' for one of the following scenarios: 1) the block does not support variable-size signals; 2) the block supports variable-size signals but needs to be configured for them.
Simulink Function :
function ref = fcn(v0,vf,a_max)
%% script for calculating coeffcient for lane change %%
tf = (-3 *(v0 - vf)) / ( 2 * a_max ) ; % final time in seconds
c1 = -12 * (vf - v0)/ tf^3; % Coefficient C1
c2 = -6 * (vf - v0) / tf^2 ; % Coefficient C2
ref = ( 0.1667 * c1 * t.^3 ) - 0.5 * c2 * t.^2 + v0
Sourav Bairagya on 8 Jan 2020
As the error suggests that it is possible that the block supports variable size signals but needs to be configured for them, you can right-click on the matlab function block and choose explore. Then, set its output to a "variable size" with upper and lower bounds on its dimension. Hope this will help.