Northeastern-Electric-Racing / Cerberus

Our FreeRTOS-based vehicle control application
1 stars 0 forks source link

[Controls] - Speed Limiting in Pit Mode and Reverse Mode #170

Open nwdepatie opened 1 month ago

nwdepatie commented 1 month ago

Current Features

Currently we have the different drive states enumerated in the switch statement in torque.c. We can just modify the function that converts pedal percentage pressed to torque

Desired Additional Features

We want to use the DTI's measure of motor speed to limit our top speed in these modes. This is essentially just implementing a PI controller. I think we actually have a PID controller implementation in Embedded_Base that someone made a while ago, but it is kinda unverified https://github.com/Northeastern-Electric-Racing/Embedded-Base/blob/main/middleware/src/pid.c

Screenshots (as needed)

No response

nwdepatie commented 1 month ago

Check here for last year's implementation https://github.com/Northeastern-Electric-Racing/Embedded_Code/blob/main/MPU/src/pedals.cpp