A control problem in phase transition modeling