We have improved our distance matrix and eigen-subspace projection function (EPF) [X.-T. Li et al., J. Chem. Phys. 146, 154108 (2017)] to describe the atomic structure for periodic systems. Depicting the local structure of an atom, the EPF turns out to be invariant with respect to the choices of the unit cell and coordinate frame, leading to an intrinsic representation of the crystal with a set of EPFs of the nontrivial atoms. The difference of EPFs reveals the difference of atoms in local structure, while the accumulated difference between two sets of EPFs can be taken as the distance between configurations. Exemplified with the cases of carbon allotropes and boron sheets, our EPF approach shows exceptional rationality and efficiency to distinguish the atomic structures, which is crucial in structure recognition, comparison, and analysis.