Getting variable step size error when connecting velocity profiler to longitudinal stanley controller. How do I convert Variable size into fixed step ?

2 次查看(过去 30 天)
Hi team,
when I try to connect velocity from velocity profiler to reference velocity of longitudinal stanley controller, it throws me this error:
Simulink cannot propagate the variable-size mode from the 'Output Port 1' of 'speed_algorithm/Longitudinal Controller Stanley/Verify Direction/RefVel' to the 'Input Port 1' of 'speed_algorithm/Longitudinal Controller Stanley/Verify Direction/Sign2'. This input port expects a fixed-size mode. The variable-size mode originates from 'speed_algorithm/Velocity Profiler'. Examine the configurations of 'speed_algorithm/Longitudinal Controller Stanley/Verify Direction/Sign2' 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.
How can I convert variable size into fixed step in simulink ? I tried every workaround but nothing really works :(

回答(1 个)

Sachin
Sachin 2023-4-11
Hi
I understand that you are getting errors while connecting the variable-size port with the fixed-size.
The signum block you are using in ‘Longitudinal Controller Stanley’ does not support variable-size signals. But the output of velocities is variable signals because your inputs are not fixed to the model.
A possible workaround would be you can replace the signum block with the MATLAB function block and can define the sign function there.
Kindly refer to the following documentation for Characteristics of Signum block and MATLAB function block -

类别

Help CenterFile Exchange 中查找有关 Simulink 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by