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.
ADAS// Lane change
1 次查看(过去 30 天)
显示 更早的评论
Hello evryone,
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 !!
error :
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 model
![Capture.PNG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/249477/Capture.png)
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
0 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 General Applications 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!