Northeastern-Electric-Racing / Cerberus

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

[Torque] - PID Controller implementation #131

Closed nwdepatie closed 3 months ago

nwdepatie commented 6 months ago

Description

There are multiple places in the codebase that could benefit from a PI or PID controller, and torque limiting and control will probably utilize them. We should figure out how best to do this in an RTOS environment and make it as generalized as possible.

Acceptance Criteria

Working and validated PID controller that can be used in different places within the application

Proposed Solution

Not entirely sure, might require a certain task or implementing timers. Probably best to create a struct that contains things like state and previous data points and then pass in that struct to functions like how we are doing the other interfaces