Modulation classification for QAM by cosine moments of small signals