The minimum value of the safety factor profile is related to the magnetohydrodynamic (MHD) stability of the plasma confined in a tokamak. Therefore, active control of the minimum safety factor may mitigate MHD instabilities that can degrade or even terminate plasma confinement. Typically, in most tokamak scenarios, the minimum safety factor evolves spatially with time, i.e., the location at which the safety factor achieves the minimum value changes with time. In addition to the inherent nonlinearities in the minimum safety factor evolution, its spatial variation makes the control design challenging. In particular, complexity in control design may arise from the need for time-dependent nonlinear models that account for spatial variation of the minimum safety factor. Furthermore, the minimum safety factor may drift to locations where the actuator authority is low. The problem of minimum safety factor control with target location tracking and moving electron cyclotron current drive (ECCD) is addressed in this work. A nonlinear time-dependent model that incorporates the spatial variation of the minimum safety factor is presented. A nonlinear controller based on optimal feedback linearization is developed to track a target minimum safety factor. The proposed controller treats the ECCD position as a controllable variable. In other words, the controller prescribes the ECCD position (in addition to the non-inductive powers) in real time based on an optimal criterion that is defined a priori. This work also presents the steps necessary to integrate the minimum safety factor controller with a total energy controller to achieve multiple control objectives simultaneously. The proposed integrated control algorithm is tested using nonlinear simulations in the Control Oriented Transport SIMulator (COTSIM) for a DIII-D tokamak scenario.