We formulate a model of hysteresis of Madelung type, and we study an optima
l control problem associated with dynamical systems that include this type
of hysteresis. We obtain and analyse a variant of dynamic programming equat
ions for the solution of this optimal control problem.