Ken, I really don't know much about control math either. I tend to think of things as instant. So at some point This whole thing may very well go over my head. FWIW, I am thinking about your sensors as if they were a gyro on an R/C copter. The gyros watch for any movement not commanded by the Rx. when this happens, they instantly modify the signal to the servo to correct and bring the controlled axis (usually the tail) back to where it was. The more movement the harder it tries to bring it back. Now if we think about this in terms of a little older equipment, this can only happen every 20 msec. but that is plenty fast enough to keep the tail looking rock steady.
With your car, I look at it like this: if you want to maintain a distance, say 12 inches from the right wall, every command to the steering will have some adjustment in it to keep it there. Sensor takes a distance-wall is 11.9" away, turn left a little. next loop, wall is still 11.9 turn more. next loop, wall is 12.02", turn back.
Same with the front wall, except for the amount to turn will need to be more because the wall is approaching. the side sensor will also need to know it should expect to move away from the wall and not fight the front sensor.
Bookmarks