Velocity feedback from vehicle body is coming out to be negative
10 visualizzazioni (ultimi 30 giorni)
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.
Steve Miller il 9 Mag 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".