In discrete-time digital models of contact of vibrating objects stability and therefore control over system energy is an important issue. While numerical approximation is problematic in this context digital algorithms may meat this challenge when based on exact mathematical solution of the underlying equation. The latter may generally be possible under certain conditions of linearity. While a system of contacting solid objects is non-linear by definition, piece-wise linear models may be used. Here however the aspect of “switching” between different linear phases is crucial. An approach is presented for exact preservation of system energy when passing between different phases of contact. One basic principle used may be pictured as inserting appropriate ideal, massless and perfectly stiff, “connection rods” at discrete moments of phase switching. Theoretic foundations are introduced and the general technique is explained and tested at two simple examples.