The switched reluctance motor (SRM) has garnered considerable attention in both scholarly and industrial spheres due to its notable advantages such as the absence of rare earth materials and low manufacturing costs. However, the complexity of controlling SRMs, resulting from their nonlinear magnetization characteristics, remains a significant drawback. This paper presents a dual-pronged contribution. Firstly, it introduces a highly accurate and reliable model designed to evaluate the operational efficiency of a 4 kW 8/6 SRM. The magnetization characteristics have been optimized using the FEMM4.2 program in tandem with AutoCAD, which facilitates the selection of an optimal number of points for motor dimensions based on the finite element method. Secondly, the design of a proportional-integral-derivative (PID) controller for a nonlinear SRM is a complex task. Therefore, we have employed bacterial foraging optimization (BFO) to ascertain the optimal PID coefficients for controlling the speed of an SRM. Owing to its simplicity, ease of implementation, and high effectiveness, BFO is capable of delivering high-quality solutions, leading to a marked improvement in both transient and steady-state performances. The simulation results demonstrate that the control system approach utilizing PID-BFO exhibits the most desirable dynamic response characteristics.