Smart way to limit motions in Simulink model
Show older comments
For a Simulink model of a vehicle moving back and forth along a track in response to environmental and motor forces, the motor force obeys a control algorithm that implements some mission objectives. But when the vehicle approaches/exceeds the position limit, the motor applies an additional force to push the vehicle back towards a neutral position (collision avoidance). In my model, this is implemented as (1) a Matlab function block using if/then to check if limits are exceeded and (2) a switch to apply a large opposing force if the position limits are exceeded. The unintended result is that the vehicle 'flutters' around the limit, eventually returning to the acceptable zone. The goal of the model is to track the applied motor force; however it may be ping-ponging between the mission and collision avoidance directives.
Is there a smarter way to implement collision avoidance in Simulink that might produce smoother behavior? This is a very simple model (ideal motor and vehicle).
Accepted Answer
More Answers (0)
Categories
Find more on General Applications in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!