  In this article we present a novel discrete-time design approach which
reduces the deteriorating effects of sampling on stability and performance in
digitally controlled nonlinear mechanical systems. The method is motivated by
recent results for linear systems, where feedback imposes closed-loop behavior
that exactly represents the symplectic discretization of a desired target
system. In the nonlinear case, both the second order accurate representation of
the sampling process and the definition of the target dynamics stem from the
application of the implicit midpoint rule. The implicit nature of the resulting
state feedback requires the numerical solution of an in general nonlinear
system of algebraic equations in every sampling interval. For an implementation
with pure position feedback, the velocities/momenta have to be approximated in
the sampling instants, which gives a clear interpretation of our approach in
terms of the St\"ormer-Verlet integration scheme on a staggered grid. We
present discrete-time versions of impedance or energy shaping plus damping
injection control as well as computed torque tracking control. Both the
Hamiltonian and the Lagrangian perspective are adopted. Besides a linear
example to introduce the concept, the simulations with a planar two link robot
model illustrate the performance and stability gain compared to the discrete
implementations of continuous-time control laws. A short analysis of
computation times shows the real-time capability of our method.
