You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ Black Ice (by FTC Team #18535, Frozen Code) is a **reactive + predictive path fo
10
10
11
11
It drives at **high speeds** and then brakes up to **5× faster** than other libraries.
12
12
13
-
Black Ice achieves this by using [**quadratic-damped PIDs**](https://github.com/TeamFrozenCodeFTC/Black-Ice-Path-Follower/blob/main/TeamCode/src/main/java/org/firstinspires/ftc/blackice/docs/quadratic-damping-pid.md#our-key-innovation-the-quadratic-damped-pid), which model nonlinear friction and resistance. This lets it accurately predict stopping behavior at any speed, preventing the overshoot and undershoot common with aggressive PIDs that don't account for friction while braking. This allows much **faster**, more **accurate**, and more **responsive** control by braking to a stop rather than coasting to a stop like other libraries such as Roadrunner or Pedro Path.
13
+
Black Ice achieves this by using [**quadratic-damped PIDs**](https://teamfrozencodeftc.github.io/Black-Ice-Path-Follower/quadratic-damped-pid.html), which model nonlinear friction and resistance. This lets it accurately predict stopping behavior at any speed, preventing the overshoot and undershoot common with aggressive PIDs that don't account for friction while braking. This allows much **faster**, more **accurate**, and more **responsive** control by braking to a stop rather than coasting to a stop like other libraries such as Roadrunner or Pedro Path.
14
14
15
15
## How much difference does the Quadratic Damping make?
16
16
Other libraries (e.g. Roadrunner, Pedro Path) rely on gentle PID + coasting:
Copy file name to clipboardExpand all lines: docs/path-follower-evolution.md
+2-4Lines changed: 2 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,13 +43,11 @@ Initially, the robot overshot because braking occurred only after reaching the t
43
43
44
44
We commonly found our coefficients to be around `a=0.001` and `b=0.07`.
45
45
46
-
- The `a` term accounts for friction and momentum when braking. This makes it much more accurate at high velocities when friction is more dominant than the wheels' braking force.
46
+
- The `a` term accounts for the non-linear affects of friction when braking. This makes it much more accurate at high velocities when friction is more dominant than the wheels' braking force. Learn more about [why the braking distance is non-linear here.](https://teamfrozencodeftc.github.io/Black-Ice-Path-Follower/quadratic-damped-pid.html#why-is-the-braking-non-linear)
47
47
- the `b` term is basically the robot's braking force from the wheels. Later on, we would realize that this term was just a more empirical version of the derivative term in PIDs.
48
48
49
49
In this prototype version, it would just turn on zero power brake mode if the distance was greater than the distance remaining to the target point. This worked okay, but it could not correct while it was braking. In next prototype version we would fix this issue by turning it into a simple proportional controller.
50
50
51
-
[Why is the Braking Distance Non-Linear?](https://github.com/TeamFrozenCodeFTC/Black-Ice-Path-Follower/blob/main/TeamCode/src/main/java/org/firstinspires/ftc/blackice/docs/quadratic-damping-pid.md#why-is-the-braking-non-linear)
52
-
53
51
## v3.0 - Corrective Braking Using a Quadratic-Damped PID
54
52
###### Final version used in the 2024–2025 season, first called Black-Ice at our second competition, and also used at our state championship.
55
53
{: .no_toc}
@@ -64,7 +62,7 @@ predictedPositionAfterBraking = current + predictedBrakingDisplacement
64
62
error = target - predictedPositionAfterBraking
65
63
power = error * proportionalConstant
66
64
```
67
-
We later would realize that this is just a more empirical version of a [PID controller with quadratic damping](https://github.com/TeamFrozenCodeFTC/Black-Ice-Path-Follower/edit/main/TeamCode/src/main/java/org/firstinspires/ftc/blackice/docs/path-follower-evolution.md#predictivebrakingcontroller--empirical-pid-controller-with-quadratic-damping). The `b` is just the derivative term, and the `a` is the quadratic damping.
65
+
We later would realize that this is just a more empirical version of a [PID controller with quadratic damping](https://teamfrozencodeftc.github.io/Black-Ice-Path-Follower/path-follower-evolution.html#predictivebrakingcontroller--empirical-pid-controller-with-quadratic-damping). The `b` is just the derivative term, and the `a` is the quadratic damping.
68
66
69
67
**Fun Fact:** We originally thought our algorithm was falling apart here because it would be quite a few inches off from the target, so we tried adding Integral terms but eventually we figured out that one of our odometry pods was just defective.
Copy file name to clipboardExpand all lines: docs/quadratic-damped-pid.md
+13-5Lines changed: 13 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ nav_order: 3
7
7
# Our Key Innovation, the Quadratic-Damped PID
8
8
9
9
Our key innovation about our follower is our quadratic-damped PID. We include this quadratic damping term in our translational PID, allowing it to be nearly **5x faster** at decelerating, more aggressive, and accurate while minimizing premature deceleration for faster deceleration.
10
-
You can learn about how we came up with this idea with [our first empirical approach](https://github.com/TeamFrozenCodeFTC/Black-Ice-Path-Follower/blob/main/TeamCode/src/main/java/org/firstinspires/ftc/blackice/docs/path-follower-evolution.md#v30---corrective-braking-using-a-quadratic-damped-pid)
10
+
You can learn about how we came up with this idea with [our first empirical approach](https://teamfrozencodeftc.github.io/Black-Ice-Path-Follower/path-follower-evolution.html#v30---corrective-braking-using-a-quadratic-damped-pid)
11
11
12
12
Pseudo code of PD controller with quadratic damping
13
13
```
@@ -50,19 +50,27 @@ With quadratic damping + back-EMF braking:
0 commit comments