The Numerical Solution of Singular Systems Arising in Control Problems