Theoretical study of the dual harmonic system and its application on the CSNS/RCS