The passband frequency response of an arrayed waveguide grating (AWG) is improved for better performance in wavelength-division multiplexing applications. Using the lengths of array arms as optimization variables, an optimization method is employed to obtain an ideal flat-top. Controlling the dispersion of arrayed waveguide gratings (AWGs) will be essential in 40 Gigabit per second (Gbps) transmission systems and in spectrally efficient 10 Gbps systems (50 GHz spacing). Having the ability to design the dispersion characteristics in an AWG offers significant advantages.