The concave diffraction grating is both the dispersive and the focusing element at the same time. It can be the only optical unit of monochromator or polychromator. Using the concave diffraction gratings with nonequidistant and curved grooves gives the possibility for correction of the aberrations in the useful region of spectrum and provides the devices with determined focal surfaces. To increase the height of the entrance slit of the spectroscopic device we have to eliminate the first and the second-order astigmatism aberrations. Consideration of this type of aberration is very important now in view of the new types of spectral devices using fiber optics and multielement detectors being developed. These new elements allow us to register the spectrum of extended objects or a number of spectrums simultaneously. For the case of the double monochromator we noticed, that the second-order astigmatism can be completely eliminated if the second part of the double monochromator is equivalent to its first part, but the ray tracing is inverse. The experiment on the mathematical model of the double monochromator confirms this idea. For the case of polychromator or CCD spectrometer we can compensate that aberrations using the illumination system, consists of the spherical mirror. The angle of incidence of the light to the mirror is calculated such a way, that the astigmatism of the grating is compensated by the astigmatism of the mirror.