Closed-loop design of a semiconductor laser