The disturbance decoupling problem for systems over a ring