2556
Programmer tries to explain binary search to the police
(startrek.website)
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
The final project in my instrumentation class was to tune a PID controller for a hot/cold mixing valve. I (CS/ENG) was paired up with an engineering student and a lot of it was throwing parameters in, seeing if weird shit happened, and then turning down or up based on the result. I had a programming final and something else I was supposed to be studying for, so I just started doing a binary search with the knobs. We got the thing tuned relatively fast and my partner acted like I was a wizard.
How do you do a binary search for an open-end scale (are PID params open-end?) and three knobs at the same time when they interdepend in their influence? I need to know since i have a PID tuning on my personal projects plate
It's been ages, but we'd done rough calculations for the three controls so we roughly knew what we needed. Our teacher was big on manually tuning instead of just using formulas since he thought just running numbers "lacked artfulness."
So we grabbed a point and started searching around manually. I think we were just tuning the derivative portion at that point, trying to get a fast response without the system without it going chaotic and noisy.