integrate dm to closed loop simulation