![Switch.PNG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/230340/Switch.png)
Controlling a generic engine block
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Im having a engine and a motor connected in parallel to a vehicle body. I do not want the engine to run until the vehicle has reached a specific velocity. The specific velocity is reached due to the motor. Once the vehicle reaches that velocity the vehicle should run on an engine and stop the motor. How can I do this?
Thank you
0 commentaires
Réponses (1)
David K.
le 18 Juil 2019
It sounds like you want a very binary controller. If a velocity is larger than a threshold do one thing, if not do another. If that is right, check out the switch block
![Switch.PNG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/230340/Switch.png)
This block outputs the top input when the middle input satisfies a constraint. Otherwise it passes the bottom input. With velocity as your middle input you can use the other two to turn on and off your other blocks.
0 commentaires
Voir également
Catégories
En savoir plus sur Powertrain Blockset dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!