A Quadratic Programming Technique for Real Time Controller Design