For an example of how to implement integral control in the state space setting, see the example.
These long-forgotten films are funny, highly entertaining, and simply beautiful to watch.
You may recall that the addition of integral control may also be used to eliminate steady-state error, even in the presence of model uncertainty and step disturbances.