An optical system is described for scanning optical record carriers of different types. The optical system includes a compensator having a number of optical elements (NPS1, NPS2). The optical elements (NPS1, NPS2) are non-periodic phase structures (NPS) having annular areas separated by steps, forming a non-periodic pattern of optical paths of different lengths. By including these multiple optical elements (NPS 1, NPS2) having NPS surfaces in the lens system of an optical system, it is possible to compensate for the effect of variation of a parameters such as temperature, angle of incidence, polarisation of radiation incident on the system and wavelength of radiation, without causing sensitivity to variation of another such parameter.