Velocity feedback from vehicle body is coming out to be negative
4 views (last 30 days)
Show older comments
I am trying to simulate a vehicle model using vehicle body block. I created the vehicle subsystem using some SIMULINK by connecting motor rotational output to tires(magic formula) and tires to vehicle body and the subsystem to motor, H-bridge and giving drive cycle to get the velocity output. But when I try to simulate model my velocity is going in negative Y axis. I tried changing the solver parameters but didn’t work. I've tried starting from scratch and rechecked my connections so many times but nothing. I've no idea why this keeps happening. I've even tried it on both online and downloaded versions.
Please Help!
6 Comments
Sam Chak
on 25 May 2022
I see. Then you probably have to go back to the fundamentals: the governing math of the system or algorithm of the control block. Almost everything can be explained once you identify culprit behind the math.
Answers (1)
Steve Miller
on 9 May 2023
Without looking at the model directly it is hard to be sure. Given the top speed is reached pretty quickly, I suspect your powertrain is turning the wheels in the wrong direction. The error increases, the powertrain drives the car as fast as it can until drag prevents it from accelerating any faster.
Solution: check the setting on your gear block. Setting "Output shaft rotates" is probably set to "In opposite direction to input shaft". Set it to "In same direction as input shaft".
--Steve
0 Comments
See Also
Categories
Find more on Engines & Motors 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!