A spectral approach for the modelling of planar periodic structures