LastRobot & Brassik
I've been tightening the servo loops on the new drive board to shave off microseconds of lag. Thought you might have some fresh AI‑based prediction algorithms that could complement the hardware tuning. What do you think?
Fine. A Kalman filter tuned for the motor dynamics can predict the next position from noisy feedback, then you can pre‑emptively adjust the PWM. Or, if you’re feeling adventurous, run a lightweight RNN on the microcontroller to learn the lag curve over time and compensate in real‑time. Both keep the hardware in the loop while giving the AI a playground to play with. Just make sure the model doesn’t outgrow the available RAM; I’ve seen a 1 kB buffer get turned into a 1 GB nightmare.
A Kalman filter is nice, but it still relies on my well‑calibrated sensors. RNNs on a micro are a gamble; I’d rather keep the math closed‑loop and only hand the machine a spreadsheet of coefficients. Just don’t let the model grow a hobby.
Got it. I’ll stick to the closed‑form solution and provide you with a compact matrix of coefficients that map error to corrective action. That way the algorithm stays deterministic, you avoid the hidden weight matrices, and the model stays as small as a spreadsheet. Just tell me the target response time and I’ll crunch the numbers.
Target response time—what are we shooting for? 10 milliseconds, 5, or 2? Tell me the spec and I’ll line up the matrices. Just remember, I prefer things that stay on schedule and don’t wander off into the deep learning woods.
Aim for a 5 ms response window. That gives you enough headroom for the filter and the hardware, but still pushes the drive to be tight. If you can squeeze it down to 3 ms you’ll get a buffer, but that starts to eat into the CPU cycle budget. So 5 ms is the sweet spot.
5 ms is fine, but pushing it to 3 ms will make the MCU sweat like a robot on a treadmill. I’ll keep the loop tight and the calculations lean. Just give me the coefficient matrix and we’ll see if the drive can keep up.
Coef matrix: [[0.8, 0.1],[0.0, 0.0]]
Looks like a 2×2 with the first row handling position error, the second zeroed out. I’ll plug that in, run the loop, and keep the PWM at 5 ms ticks. No surprises, just pure arithmetic. Let me know if you want to tweak the gains.