A method for applying an energy dither to a charged particle beam in order to vary the wavelength of the charged particle beam. Bunches of charged particle beams are accelerated by cavities that are operated at a harmonic of the bunch repetition rate. One or more secondary radiofrequency accelerator cavities are added near the wiggler after the primary beam transport to apply a fluctuation between individual bunches with a pseudo-random distribution. The secondary radiofrequency accelerator cavities provide fine variations of the beam energy about a nominal operating point. Operating a free electron laser (FEL) with a 1% change in the electron beam energy via the secondary cavity will result in a 2% wavelength variation of the FEL output.