Since you are attempting to slow down a car when the road gets too bumpy, a PID controller is not what you want. Or rather, the bumpiness of the road will determine the desired speed that goes into the PID, instead of being part of the PID's sensor feedback loop.
You may want to look at additive increase, multiplicative decrease as a function to control your desired speed. The basic idea would be:
good = 1
bad = 1
while (true):
if (bumpy_level_detected() > bumpy_level_allowed):
bad = bad + 1
else:
good = good + 1
desired_speed = (good_speed_constant * good) / (bad_speed_constant ** bad)
In more mathematical notation:
$$speed_{desired} = \frac{k_{good} * g}{({k_{bad}})^b} $$
Where $g$ represents the number of iterations where the bump sensor was within limits, $b$ represents the number of iterations where the bump sensor was over the limit, $k_{good}$ controls how quickly the car ramps up its speed when the road is smooth, and $k_{bad}$ controls how quickly the car slows down when the road is bumpy.
(The above is just for explanatory purposes; in practice, rather than keeping $g$ and $b$ in memory and causing an overflow as they increase, you'd just apply the $k_{good}$ > 0 and $k_{bad} > 1$ constants to the running total as appropriate.)