Use a sampled proportional-derivative (PD) controller to keep the position of a moving mass constant.
Try Buy Mathematica is available on Windows, macOS, Linux & cloud »
Questions? Comments? Contact a Wolfram expert »