The analytical study of the undulator radiation (UR), accounting for major sources of the spectral line broadening is presented. Analytical expressions for the UR spectrum and intensity are obtained. They demonstrate possibilities of the compensation of the divergency by the constant magnetic component. Some examples of single and double frequency undulators are considered. Generation of harmonics is studied with account for homogeneous and inhomogeneous broadening in real devices. The obtained results with account for all broadening sources are applied for evaluation of free electron laser (FEL) performance and compared with those, obtained with the ideal undulator.