WEBVTT

00:00:00.000 --> 00:00:05.100
You already know that tuning means changing
a parameter and checking the response.

00:00:05.100 --> 00:00:12.900
Let's make that a controlled experiment where we are not
just guessing, and we decide what to change next.

00:00:12.900 --> 00:00:17.460
Before touching a constant,
we need a good baseline.

00:00:17.460 --> 00:00:25.320
This sample run uses a 1,000-tick target,
kP of 0.0005, and kG of 0.08.

00:00:25.320 --> 00:00:28.920
It has an output limit of 0.5.

00:00:28.920 --> 00:00:39.000
Record the starting state, target,
voltage band, and output limit.

00:00:39.000 --> 00:00:47.280
Also record the rise, overshoot, settling behavior,
and the reason the test ended.

00:00:47.280 --> 00:00:53.880
A graph without its test conditions
is not a reusable baseline.

00:00:53.880 --> 00:00:59.820
In the code, this fixture keeps
the trial small on purpose.

00:00:59.820 --> 00:01:09.240
Baseline returns the original kP, kG, and output limit.
The one-variable trial changes only kP.

00:01:09.240 --> 00:01:18.480
kG and the limit stay fixed. The ambiguous trial changes
both kP and kG, making it an invalid comparison.

00:01:18.480 --> 00:01:25.020
In a real tuning tool, the live values may come
from Dashboard configuration fields.

00:01:25.020 --> 00:01:33.900
The rule stays the same: save the starting values
somewhere reviewable before changing them.

00:01:33.900 --> 00:01:44.340
Trial A changes kP from 0.0005 to 0.0007.

00:01:44.340 --> 00:01:53.040
kG, the target, output limit, start state,
and the other test conditions remain fixed.

00:01:53.040 --> 00:02:02.340
The lesson's tuning log rejects a comparison when
the battery readings differ by more than 0.2 volts.

00:02:02.340 --> 00:02:07.980
If those conditions match and the response changes,
we can reasonably connect that change to kP.
