Open DFriend01 opened 1 year ago
This issue remains unfinished for the simulator implementation. Please refer to the PID Controller Jupyter Notebook in the notebooks/boat_simulator repository for testing and documentation of different PID implementations. Currently proceeding with using Raye's old controller for a temporary controller solution in the simulator.
Let's keep this issue open for the future when we want to revisit
Sounds good haha sorry I wasn't too sure whether to close it or not after leaving the comment.
Purpose
We want to simulate the PID mechanism of the rudder controller. In the simulator, we use a software PID to achieve this.
Description
What to change
A class template is provided in
boat_controller/nodes/low_level_control/control.py
. You will need to implement the classesPID
andRudderPID
in this file.What value are we using for error
We would be using the current heading and desired heading to compute the error $e(t)$. This Stackoverflow post tells you how to compute the signed delta angle between two angles. This would be implemented in
RudderPID
when we compute the error.What tuning constants should we use
The ELEC team gave us some very early numbers:
You can use these as default values if you would like, but when you test, be sure to use different parameters other than these ones.
Plant Process
The plant process is essentially the physics engine node. You pass the current rudder angle to it and we will observe a change in the current heading. This is $y(t)$, and the desired heading is $r(t)$.
Resources