Nuclear fusion has the potential to produce unlimited, clean energy, which presents itself as a reliable energy supply but it also helps to stop the threat of climate change that faces the world nowadays. However, to sustain the pulse duration long enough to produce the necessary energy, new controls have to be developed, composing a new application area of Control Engineering, with new and interesting challenges for the control community. In this sense, this paper deals with the modeling of tokamak nuclear fusion reactors. In order to control the creation of unstable modes in fusion processes, it is necessary to derive numerical models suitable for control strategies. The model presented in this paper addresses flux and energy conservation issues, discussing the mechanisms behind the creation of uncontrollable modes. The dynamics of the system is given by means of the energy functions which are solved for the currents in the structure, plasma current and plasma position. Thus, the equations for the state variables are derived based on the Hamiltonian equation of motion. In order to solve this system numerically, this model is linearized around an operation point by taking a Newton-Raphson step. Besides, the system output is completed by considering the equations for the flux and the poloidal field. Finally, the resulting low-order linear model is modified so as to obtain the corresponding state-space model which is verified by means of numerical experiments.