Several proposals to measure a possible small electric dipole moment (EDM) of charged particles aligned with the spin and the well-known magnetic dipole moment (MDM) are based on the concept to circulate bunches with an initial polarization in the horizontal plane and to observe the buildup of a vertical spin component caused by the EDM. Most proposals aim at operating the ring with ``frozen spin,'' such that, with an MDM only, the spin remains aligned with the trajectory. The signature of a finite EDM is the buildup of a vertical spin component. Machine imperfections may lead as well to a vertical spin buildup, which can be misinterpreted as an EDM and thus limit the sensitivity of the experiment. For that reason, a good understanding of spin dynamics is mandatory to estimate and limit such systematic errors in the measurement. In this paper, a coordinate system attached to the trajectory is introduced to expand the spin. This is of particular interest for fully electric EDM rings operated at the ``magic energy'' to satisfy the frozen spin condition. The procedure is used for a straightforward analysis of geometric phase and other second order effects, which limit the possible sensitivity, i.e., the smallest EDM which can be detected in presence of systematic effects.