In the context of renewable energy, dynamic control is crucial for large-scale alkaline water electrolysis systems. Under traditional Proportional-Integral-Derivative (PID) control, the system's temperature and impurity levels may exceed safe limits during sudden load changes, compromising system safety. Therefore, this study proposes a control strategy based on mathematical models of system temperature and impurities, including Model Predictive Control (MPC) for temperature and Optimal Curve Tracking (OCT) for impurities. The MPC controller offsets the disturbances in temperature caused by current fluctuations through state prediction, while the OCT controller ensures that impurity levels remain within safe limits. Real-time application of these control strategies is achieved through MATLAB-PLC communication, validating controller performance. Experimental results show that the MPC controller exhibits excellent dynamic response and stability in controlling the stack temperature, with a maximum temperature peak deviation of only 2.9 K and a temperature fluctuation range of 5.9 K. This represents a reduction of 1.6 K in peak deviation compared to traditional PID controllers and significantly decreases the temperature fluctuation range. The OCT controller also demonstrates good safety and stability in controlling hydrogen to oxygen (HTO) impurity levels, consistently maintaining the HTO content at the set upper limit of 1.5%, thereby expanding the safe operational range of the system and reducing the need for frequent adjustments to the system setpoints.