SummaryIn this paper, we propose a simple method for generating short‐length rate‐compatible codes that are robust to noncoherent detection forM‐PSK constellations. For any given constellation set, first we use a greedy algorithm to construct a family of rotationally invariant codes. Then, by properly modifying such codes, we obtain a new family of codes that are robust to noncoherent detection. We briefly discuss the optimality of the constructed codes for special cases of BPSK and QPSK constellations. Our method provides an upper bound for the length of optimal codes with a given desired noncoherent distance. We also derive a simple asymptotic upper bound on the frame error rate (FER) of such codes and provide some simulations. Finally, the problem of designing binary codes that are robust to noncoherent detection for QPSK constellation is briefly discussed.