This paper presents the theoretical background and experimental results of temperature control of a guard heater used in an electrochemical model cell for Mg production. A proportional-integral controller was used for the temperature control system. The gains of the controller were set to be constant and were tuned using a fuzzy logic technique due to inherent uncertainties in the system. The feedback loop was implemented using a real-time hardware. Experimental results were in agreement with the simulation data.