This paper studies the control of a DC machine in a Matlab/Simulink environment, more specifically the shunt machine. We first highlight the modeling of a shunt machine and then control it by acting on each parameter, first in open loop, then in closed loop, while studying the system’s performance. Finally, introduce the appropriate correction to improve system performance. The second part consisted in simulating the operation of the shunt-excited DC machine in a Matlab/Simulink environment. The more the electric motors are loaded, the lower the rotational speed. In order to bring the motor speed back to its nominal value, two types of control were proposed in this work: control by variation of the armature voltage U_a and control by variation of the excitation current I_e. Simulation of these two types of control, in our case using Matlab/Simulink software, showed the strengths and weaknesses of each type of control, depending on whether a PI corrector is integrated or not.