A spectral detector comprising: a grating panel comprising: a light incident surface for receiving incident light comprising: a first grating pattern having a first period; and a second grating pattern having a second period that is different from the first period; a light exit surface through which light exits the grating panel; an optical measurement panel arranged to face the light exit surface of the grating panel, and configured to measure a change in intensity of first light passing through the first grating pattern according to a propagation distance of the first light between the grating panel and the optical measurement panel, and to measure a change in intensity of second light passing through the second grating pattern according to a propagation distance of the second light between the grating panel and the optical measurement panel; and a processor configured to obtain at least one wavelength spectrum of light incident on the grating panel based on the change in intensity of the first light according to the propagation distance of the first light and the change in intensity of the second light according to the propagation distance of the second light; wherein the processor is configured to obtain a first wavelength spectrum based on the change in intensity of the first light according to the propagation distance of the first light, and a second wavelength spectrum based on the change in intensity of the second light according to the propagation distance of the second light, and to determine whether a difference between the first wavelength spectrum and the second wavelength spectrum is greater than or equal to a reference value. a grating panel comprising: a light incident surface for receiving incident light comprising: a first grating pattern having a first period; and a second grating pattern having a second period that is different from the first period; a light exit surface through which light exits the grating panel; a light incident surface for receiving incident light comprising: a first grating pattern having a first period; and a second grating pattern having a second period that is different from the first period; a first grating pattern having a first period; and a second grating pattern having a second period that is different from the first period; a light exit surface through which light exits the grating panel; an optical measurement panel arranged to face the light exit surface of the grating panel, and configured to measure a change in intensity of first light passing through the first grating pattern according to a propagation distance of the first light between the grating panel and the optical measurement panel, and to measure a change in intensity of second light passing through the second grating pattern according to a propagation distance of the second light between the grating panel and the optical measurement panel; and a processor configured to obtain at least one wavelength spectrum of light incident on the grating panel based on the change in intensity of the first light according to the propagation distance of the first light and the change in intensity of the second light according to the propagation distance of the second light; wherein the processor is configured to obtain a first wavelength spectrum based on the change in intensity of the first light according to the propagation distance of the first light, and a second wavelength spectrum based on the change in intensity of the second light according to the propagation distance of the second light, and to determine whether a difference between the first wavelength spectrum and the second wavelength spectrum is greater than or equal to a reference value.