The USODA (U-tube Steam Generator Controller Design Analysis) code was developed to simulate the transient behavior of a vertical natural circulation U-tube steam generator in pressurized water reactors and to design the optimal level controller. The steam generator was represented by sixth order linear differential equations through matrix reduction. The momentum equation for the recirculation flow models the effects of the separators, U-bend regions, and spatial acceleration. To assure stability, the Lyapunov theorem was adopted. The optimal gains were obtained by minimizing the quadratic performance index and by using both Newton-Raphson and successive overrelaxation methods, which guarantee fast convergence. Sample calculations for Korea Nuclear Unit 2 showed that a control system consisting of standard proportional integral differential controls can be successfully employed for the control of water level. The optimization procedure led to a stable system with good controlled response.