Fuzzy PID Control Design of Mining Electric Locomotive Based on Permanent Magnet Synchronous Motor

: Achieving precise stopping of electric locomotives is crucial for the realization of intelligent and unmanned auxiliary transportation systems. Presently, human drivers play a central role in ensuring accurate stopping, presenting obstacles to automation and cargo location precision, especially within the coal mining sector. This article centers on achieving the precise stopping of electric locomotives under various conditions through the utilization of permanent magnet synchronous motor-driven locomotives. This approach introduces a novel stopping control method that integrates a fuzzy proportional–integral–derivative (F-PID) controller with a vector control model for permanent magnet synchronous motors (PMSM). Subsequently, we develop the F-PID controller using the PMSM technique, incorporating new fuzzy rules for each subsystem to enhance control accuracy and efficiency. Finally, extensive simulations and real-world experiments are conducted on an electric locomotive stopping test bed to validate the effectiveness of the proposed control method. The results show that the method consistently achieves precise stopping under diverse working conditions, with an error of less than 0.3 m, confirming its robustness and reliability.


Introduction
Coal is a key energy source and a major fuel of global economic growth.Efficient coal production relies heavily on the implementation of effective transportation systems.Achieving the criteria of efficient and safe transportation is a significant challenge for traditional mining transportation vehicles [1,2].The importance of developing intelligent transportation technology cannot be overstated when it comes to enhancing the efficiency of coal transportation.In June 2021, the National Energy Administration and the National Mine Safety Supervision Bureau collaborated to release the "Guidelines for the Intelligent Construction of Coal Mines".These guidelines aim to facilitate the systematic and organized implementation of intelligent construction practices across the coal mining industry [3].The auxiliary transportation vehicles usually employed in underground coal mines are regarded as one of the most frequently utilized means of transportation [4].Electric motor-based transportation plays an essential role not only as an integral component of the auxiliary transportation system in coal mines but also as a significant facilitator in supporting the regular operation of mining equipment and enhancing overall production efficiency [5,6].In this regard, it is necessary to develop new tools to investigate the transportation system in coal mines further.
The complex task of navigating and parking an automobile within limited places is a considerable obstacle, even for highly skilled individuals operating the vehicle.Although driverless cars have shown competence in traversing highways, the ability to park in tight areas continues to pose a significant challenge [7][8][9].The act of perpendicular parking requires the ego vehicle to reverse its direction of motion and perform precise maneuvers to align with the parking spot [10,11].In the middle of the century, Ishikawa introduced the concept of an optimum control model to determine the speed profile.This method is applied to both urban rail transit and railway systems.In their work, the authors of Ref. [12] investigated balancing energy consumption and comfort while solving the mixed-integer linear programming problem using pseudo-spectral methods.Moreover, the study referenced as [13] examined a train timetable problem to minimize both the overall journey time and energy consumption.In a study referenced in [14], energy consumption was quantified using an integral representation.In the existing literature, mostly electric locomotives mainly rely on the driver's driving experience to stop at the target position and minimize the cost energy, and when the driver operates improperly, the actual stopping position will have a large deviation from the predetermined position, which seriously affects the efficiency of automated transport in underground coal mines and is not conducive to the realization of intelligent and unmanned auxiliary transport in coal mines.The control and dispatch of electric locomotives within a transportation system directly impact transport efficiency and costs [15][16][17].In addition, the working conditions in underground coal mines are complicated, and different speeds, slopes, loads, and distances will affect the actual braking force of the motor vehicle and the driver's stopping operation, which increases the difficulty of stopping [18].Therefore, the study of a locomotive parking control method that can effectively and autonomously control the locomotive to accurately stop at the target position within the allowable range of error is of great significance to the realization of intelligent and unmanned auxiliary transportation systems in underground coal mines and is also the development trend of the future intelligent coal mines [19].Developing a locomotive parking control method is crucial in automating auxiliary transportation vehicles [20].With profound implications, this research aims to achieve precise parking for tracked vehicles.Firstly, precise parking is a prerequisite for intelligent and unmanned underground coal mine transportation, enhancing efficiency and enabling automated production.Secondly, it is vital for the safety of coal mine transportation systems.Locomotives must execute precise parking functions to prevent accidents and optimize safety.There is room for further investigation, which will be addressed carefully in this research.
Conventional motor trucks rely on DC and three-phase asynchronous motors, which have drawbacks, like electric sparks and low efficiency.PMSM (permanent magnet synchronous motor) electrical actuators are widely used in many applications owing to their exceptional performance characteristics.These include a higher steady-state torque than induction machines, a more straightforward controller design for the PM motor, a better power density, and improved efficiency resulting from decreased rotor losses.In contrast, PMSMs offer a compelling solution: smaller, more reliable, and efficient, with high power density and low noise.Their adoption promises increased safety and energy savings, representing the future of mining locomotives [21][22][23][24].This research focuses on developing a parking control method for underground coal mine electric locomotives using PMSMs.The objective is to enable precise parking under diverse conditions, aligning with the direction of intelligent and unmanned auxiliary transportation systems in coal mines.By addressing the challenges and harnessing PMSMs' advantages, this research contributes to safer and more efficient electric locomotive operations, which is crucial for the future of coal mining.This paper proposes a positive solution to address the challenges posed by excellent control performance with a wide speed control range based on the inductance of PMSMs at low speeds.
Researchers have explored various advanced control algorithms to address the complexities of autonomous parking.Backstepping (BSC), sliding mode (SMC), feedback linearization (FBL), passivity-based (PBC), and H1 control, along with optimal control techniques like model predictive (MPC), LQR (linear quadratic regulator), LQI (linear quadratic integral), and LQG (linear quadratic Gaussian), have been proposed to tackle the challenges of autonomous parking.Adaptive controllers, including direct or indirect MRAC, parameter variation control (PVC), extended method (EMC), observation and estimation approaches, and intelligent control techniques, such as fuzzy logic control (FLC), ANFIS (adaptive neuro-fuzzy inference system), and other variants, have also been investigated.FBL is a control technique that simplifies the design of controllers by transforming the nonlinear system dynamics into a linear system.This approach ensures global stability and facilitates the development of more effective control strategies.Vector-based control techniques based on feedback linearization have emerged as innovative and promising solutions for complex control problems [23,[25][26][27][28]. Backstepping control offers an alternative design methodology for the feedback control of uncertain nonlinear systems.Backstepping control facilitates the design of effective controllers by identifying the state variables, inputs, and outputs of the nonlinear model.Additionally, it utilizes a Lyapunov candidate function (CLF) to analyze the system's stabilization rigorously.A recent study has compared the robustness of H1 robust control and sliding mode control (SMC) for PMSM applications.Similarly, research has explored the intelligent control of PMSM using a fuzzy-based multi-variable optimization approach [29][30][31][32].However, a comparative analysis of nonlinear vector-based controllers for PMSM remains lacking.This research focuses on the PMSM, recognizing it as the critical dynamic component within the actuation system that demands meticulous design consideration.To address this gap, we introduce a novel F-PID controller, a promising candidate for expanding the horizons of the power sector.The application of F-PID controllers in PMSM has been extensively researched to tackle the challenges of nonlinearity, time-varying parameters, and disturbances inherent in PMSM control systems.Incorporating fuzzy logic into the traditional PID control structure, these controllers enhance adaptability, optimal control, stability, tracking ability, anti-disturbance capabilities, and overall system dynamics.This research is supported by various studies, demonstrating their effectiveness in improving control accuracy, response speed, reducing overshoot, and enhancing robustness [33,34].Specifically, a study introduces a ship-borne PMSM speed control system employing a two-dimensional fuzzy PID controller, which markedly enhances stability, tracking, and anti-disturbance performance under diverse load conditions compared to traditional PID controllers [35,36].
This paper is organized into four main sections: Introduction (Section 1), Mathematical Model (Section 2), Simulation and Experiment (Section 3), and Conclusions (Section 4).Section 1 provides an overview of mine transport and its automation, setting the stage for the subsequent sections.Section 2 describes the theoretical framework that underpins our research, while Section 3 presents practical applications and tests the validity of our novel approach.Finally, Section 4 summarizes the key findings and implications of our study.In this research, the authors focus on developing a parking control method for underground coal mine electric locomotives using PMSMs.Firstly, the main objective is to enable precise parking under diverse conditions, aligning with the direction of intelligent and unmanned auxiliary transportation systems in coal mines.Secondly, to tackle the challenges and issues, a new PMSM control method has been introduced to obtain an optimized performance, as this research contributes to safer and more efficient electric locomotive operations, which is necessary for the future of coal mining.Lastly, an experiment is presented to show the effectiveness of our proposed algorithm.The novelty of this work is primarily rooted in its pioneering approach to applying advanced control systems for PMSMs in the context of underground mine locomotives, an area where such research has not been previously conducted.This study introduces innovative control methodologies that utilize various controllers to optimize the performance and efficiency of PMSMs under the unique and challenging conditions of underground mines.By focusing on this specific application, our research not only addresses a significant gap in the existing literature but also marks a substantial advancement in the field of mine transportation technology.The introduction of these varied controllers for PMSMs enhances the adaptability and robustness of mine locomotives, contributing to the development of more intelligent and automated systems for underground mining operations.This represents a key step forward in improving both the safety and operational efficiency of these critical transport systems, pushing the boundaries of what is currently achievable in underground mine automation.

Mathematical Model
When the locomotive is stationary, it is essential to regulate the PMSM to provide the appropriate braking torque based on its present speed, distance, slope, and load.Hence, to enhance parking precision, this section examines the mathematical model of the PMSM, simplifies its control model, and derives the locomotive's control strategy.
An inaccurate or slow response of the brake torque will harm the precision of parking the locomotive.Therefore, it is necessary to develop an appropriate control strategy for the PMSM to enhance the accuracy and stability of parking the locomotive.This section primarily presents the double closed-loop vector control method and F-PID control algorithm for the PMSM.It utilizes the double closed-loop vector control method based on F-PID to regulate the PMSM.
As shown in Figure 1b, the three-phase stationary coordinate system can be converted to two-phase stationary coordinate system by Clark transformation, and the two-phase stationary coordinate system can be converted to two-phase rotating coordinate system by Park transformation.When studying the PMSM, the first step is to establish a mathematical model under the three-phase stationary coordinate system of the motor and stator, and the three coordinate axes ABC take the direction of the magnetic field generated by the three-phase stator windings of the PMSM as the reference line as shown in Figure 1a.
Electronics 2024, 13, x FOR PEER REVIEW 4 of 19 forward in improving both the safety and operational efficiency of these critical transport systems, pushing the boundaries of what is currently achievable in underground mine automation.

Mathematical Model
When the locomotive is stationary, it is essential to regulate the PMSM to provide the appropriate braking torque based on its present speed, distance, slope, and load.Hence, to enhance parking precision, this section examines the mathematical model of the PMSM, simplifies its control model, and derives the locomotive's control strategy.
An inaccurate or slow response of the brake torque will harm the precision of parking the locomotive.Therefore, it is necessary to develop an appropriate control strategy for the PMSM to enhance the accuracy and stability of parking the locomotive.This section primarily presents the double closed-loop vector control method and F-PID control algorithm for the PMSM.It utilizes the double closed-loop vector control method based on F-PID to regulate the PMSM.
As shown in Figure 1b, the three-phase stationary coordinate system can be converted to two-phase stationary coordinate system by Clark transformation, and the twophase stationary coordinate system can be converted to two-phase rotating coordinate system by Park transformation.When studying the PMSM, the first step is to establish a mathematical model under the three-phase stationary coordinate system of the motor and stator, and the three coordinate axes ABC take the direction of the magnetic field generated by the three-phase stator windings of the PMSM as the reference line as shown in Figure 1a.In the three-phase stationary coordinate system, the stator voltage equation of the PMSM is: where:  -current phase A;  -current phase B;  -current phase C;  -winding resistance;  -phase A stator magnetic chain;  -phase B stator magnetic chain; phase C stator magnetic chain.
The electromagnetic torque of the motor is: In the three-phase stationary coordinate system, the stator voltage equation of the PMSM is: where: i A -current phase A; i B -current phase B; i C -current phase C; R s -winding resistance; ψ A -phase A stator magnetic chain; ψ B -phase B stator magnetic chain; ψ c -phase C stator magnetic chain.The electromagnetic torque of the motor is: where: p n -differential operator; e a , e b , e c -motor's induced electromotive force on axes A, B, and C; L S2 -three-phase stator self-inductance harmonic mean value; ω e -angular velocity of the motor.Figure 1b depicts the connection between the ABC coordinate system and the α-β coordinate system, with the Clark transformation facilitating the conversion from ABC to α-β coordinates.Utilizing the depicted relationship in Figure 1b, the transformation formula between the two coordinate systems can be derived as follows: The chain-voltage relationship of the PMSM in the α-β coordinate system can be expressed as: where: ψ α -phase α stator magnetic chain; ψ β -phase β stator magnetic chain.Therefore, the torque of the PMSM in the α-β coordinate system is: The process of transforming an α-β stationary coordinate system into a d-q rotating coordinate system, as shown in Figure 1b, is called the Park transformation.
According to the interrelationship between the two coordinate systems shown in Figure 1b, the following equation can be obtained: where i d and i q are the currents on the d and q axis.In the d-q coordinate system, the voltage of a PMSM can be expressed as: where: ψ d -d-axis magnetic chain; ψ q -q-axis magnetic chain in the d-q coordinate system.
Therefore, the electromagnetic torque of the PMSM is:

SVPWM Technology
The core principle of space vector pulse width modulation (SVPWM) involves managing the inverter's output of three sinusoidal voltage signals by employing distinct combinations and sequences of activation and deactivation.These actions directly influence the stator windings of the PMSM.The resultant vector voltage, denoted as U out , undergoes rotation along a predetermined path in accordance with the three-phase voltage signals.This rotational control effectively governs the PMSM in the locomotive, ensuring precise control over the motor to produce the desired torque output.
In Figure 2, the synthesis of voltage vectors is depicted.The resultant output voltage (U out ) is composed by combining non-zero vector voltages U 4 (1 1 0) and U 6 (1 0 1) with the zero vector U 0 (1 0 0) from two neighboring regions, accounting for their respective durations of influence.
nals.This rotational control effectively governs the PMSM in the locomotive, ensuring precise control over the motor to produce the desired torque output.
In Figure 2, the synthesis of voltage vectors is depicted.The resultant output voltage ( out ) is composed by combining non-zero vector voltages  (1 1 0) and  (1 0 1) with the zero vector  (1 0 0) from two neighboring regions, accounting for their respective durations of influence.In summary: where:  -modulation time;  -action time of  ;  -action time of  ;  -action time of  ;  -output voltage;  -DC bus side voltage;  -RMS value of phase voltage;  -the angle between the principal vector and the synthesized vector.

Vector Control of PMSM
The control strategy of PMSM is investigated as it is controlled to generate braking torque and control the locomotive parking by the vector control method during locomotive parking.(10) where:  -torque of motor;  -ratio of locomotive transmission;  -main reduction gear ratio of locomotive;  -mechanical efficiency;  -air resistance coefficient; Afront projection area;  -traveling speed.G-gravity force on the locomotive (including self-weight and load); α-inclination angle; f-rolling resistance coefficient of the track; r-radius of the locomotive wheels; δ-rotating mass conversion factor of the locomotive; m-mass of the locomotive x-distance from target; v-different speeds.
The q-axis current of the motor: In summary: where: T s -modulation time; T 4 -action time of U 4 ; T 6 -action time of U 6 ; T 0 -action time of U 0 ; U out -output voltage; U DC -DC bus side voltage; U m -RMS value of phase voltage; θ i -the angle between the principal vector and the synthesized vector.

Vector Control of PMSM
The control strategy of PMSM is investigated as it is controlled to generate braking torque and control the locomotive parking by the vector control method during locomotive parking.
where: T tq -torque of motor; i g -ratio of locomotive transmission; i 0 -main reduction gear ratio of locomotive; η T -mechanical efficiency; C D -air resistance coefficient; Afront projection area; v a -traveling speed.G-gravity force on the locomotive (including self-weight and load); α-inclination angle; f -rolling resistance coefficient of the track; r-radius of the locomotive wheels; δ-rotating mass conversion factor of the locomotive; m-mass of the locomotive x-distance from target; v-different speeds.
The q-axis current of the motor: As can be seen from Equation (10), the braking torque output from the PMSM can be controlled by controlling the q-axis current of the motor, which, combined with the parking control method, realizes the parking of the locomotive under different initial speeds, distances, slopes, and loads in the underground of the coal mine.

F-PID Vector Control of PMSM
The PID control methodology finds application in the locomotive parking process, showcasing its widespread utility in the realm of motor control.When overseeing the operation of the PMSM for locomotive propulsion, the initial step involves establishing the target torque value (T * e ) and target q-axis and d-axis current (i * q and i * d ) for the PMSM within the PID control system.Subsequently, the actual torque (T e ) output of the motor is periodically measured and compared against the designated torque value (T * e ) as shown in Figure 3.The resulting deviation between the set and actual torque values is then input into the PID controller, which has been fine-tuned with proportional, integral, and derivative coefficients.This input enables the PID controller to generate the necessary output, thereby completing the control of the entire system.

F-PID Vector Control of PMSM
The PID control methodology finds application in the locomotive parking proce showcasing its widespread utility in the realm of motor control.When overseeing the o eration of the PMSM for locomotive propulsion, the initial step involves establishing t target torque value ( * ) and target q-axis and d-axis current ( *   * )for the PMS within the PID control system.Subsequently, the actual torque ( ) output of the motor periodically measured and compared against the designated torque value ( * ) as show in Figure 3.The resulting deviation between the set and actual torque values is then inp into the PID controller, which has been fine-tuned with proportional, integral, and der ative coefficients.This input enables the PID controller to generate the necessary outp thereby completing the control of the entire system.The transfer function of the PID is: where  ,  , and  are proportional, integral, and differential time constants, respe tively.
The differential regulator can be likened to incorporating a damper into the syste effectively mitigating overshooting and enhancing system stability.A substantial diffe ential time constant contributes to slowing down the system's response.Hence, it becom imperative to judiciously determine the values of the three parameters  ,  , and  accordance with specific situations, as found in Tables 1-3.
In the control system, fuzzy rules are primarily based on the deviation (e) betwe the given torque ( * ) and the actual output torque ( ) of the permanent magnet synchr nous motor.For significant errors (large e), increasing  speeds up system convergen while reducing  mitigates overshooting.Moderate errors (medium e) call for an inte mediate value of  to prevent substantial overshooting during system stops.Small e rors prompt a focus on control system stability, suggesting a smaller  value.Fuz control defines subsets for torque deviation (e) and deviation rate (ec).Torque deviati (e) is the difference between the desired torque and the actual torque produced by t The transfer function of the PID is: where K p , K i , and K d are proportional, integral, and differential time constants, respectively.The differential regulator can be likened to incorporating a damper into the system, effectively mitigating overshooting and enhancing system stability.A substantial differential time constant contributes to slowing down the system's response.Hence, it becomes imperative to judiciously determine the values of the three parameters K p , K i , and K d in accordance with specific situations, as found in Tables 1-3.In the control system, fuzzy rules are primarily based on the deviation (e) between the given torque (T * e ) and the actual output torque (T e ) of the permanent magnet synchronous motor.For significant errors (large e), increasing K p speeds up system convergence, while reducing K d mitigates overshooting.Moderate errors (medium e) call for an intermediate value of K i to prevent substantial overshooting during system stops.Small errors prompt a focus on control system stability, suggesting a smaller K p value.Fuzzy control defines subsets for torque deviation (e) and deviation rate (ec).Torque deviation (e) is the difference between the desired torque and the actual torque produced by the PMSM.The deviation rate (ec) is the rate of change of the torque deviation, effectively the derivative of the torque deviation with respect to time.These are categorized as {NB, NM, NS, ZO, PS, PM, PB}, corresponding to {negatively big, negatively medium, negatively small, zero, positively small, positively medium, and positively big}.Post-processing maps these subsets to adjust the PID's three-time constants within the range [-6, 6].
Finally, three surface models with time constants varying with e and ec are obtained, as shown in Figure 4. Three surface models with time constants that vary based on torque deviation and deviation rate play a vital role in advanced fuzzy control systems.They enable a more flexible, responsive, and efficient control mechanism, which are critical for complex and dynamic applications like those involving PMSMs.

F-PID Vector Controller in Parking System
This section employs F-PID double closed-loop vector control to govern the PMSM.The system dynamically adjusts PID parameters based on current working conditions, showcasing excellent adaptability.Utilizing the fuzzy control system, the PMSM swiftly and accurately produces braking torque under varied working conditions, enhancing locomotive stopping precision.Figure 5a illustrates the established F-PID control system in this study.

F-PID Vector Controller in Parking System
This section employs F-PID double closed-loop vector control to govern the PMSM.The system dynamically adjusts PID parameters based on current working conditions, showcasing excellent adaptability.Utilizing the fuzzy control system, the PMSM swiftly and accurately produces braking torque under varied working conditions, enhancing locomotive stopping precision.Figure 5a illustrates the established F-PID control system in this study.
In electric locomotive deceleration, a double closed-loop vector control system manages the torque and current rings to enhance control precision and minimize stopping errors in the PMSM.Introducing a F-PID controller to the outer torque ring facilitates the fuzzy control of the torque.The parking process involves the underground coal mine locomotive parking system calculating the target torque (T * e ) based on factors like speed, distance, gradient, and load.After comparing the designated torque (T * e ) with the actual torque (T e ), the torque deviation (e) and deviation rate (ec) are input into the F-PID controller.This controller processes the q-axis current (i q ) to simultaneously regulate the d-axis current (i d = 0) and the motor's d-axis deviation rate (ec).The transformed d-axis and q-axis currents, driven by the PWM signal from SVPWM, achieve precise parking control.

F-PID Vector Controller in Parking System
This section employs F-PID double closed-loop vector control to govern the PMSM The system dynamically adjusts PID parameters based on current working condition showcasing excellent adaptability.Utilizing the fuzzy control system, the PMSM swift and accurately produces braking torque under varied working conditions, enhancing l comotive stopping precision.Figure 5a  In electric locomotive deceleration, a double closed-loop vector control system ma ages the torque and current rings to enhance control precision and minimize stoppin errors in the PMSM.Introducing a F-PID controller to the outer torque ring facilitates t fuzzy control of the torque.The parking process involves the underground coal mine l comotive parking system calculating the target torque ( * ) based on factors like spee distance, gradient, and load.After comparing the designated torque ( * ) with the actu torque ( ), the torque deviation (e) and deviation rate (ec) are input into the F-PID co troller.This controller processes the q-axis current ( ) to simultaneously regulate the axis current ( = 0) and the motor's d-axis deviation rate (ec).The transformed d-axis an q-axis currents, driven by the PWM signal from SVPWM, achieve precise parking contro In the parking process, as illustrated in Figure 5b, the locomotive's current spee distance, slope, and load are analyzed using the parking control method.This analys determines the appropriate braking torque, which is then supplied to the motor's F-PI double closed-loop vector control system.This control system effectively manages t In the parking process, as illustrated in Figure 5b, the locomotive's current speed, distance, slope, and load are analyzed using the parking control method.This analysis determines the appropriate braking torque, which is then supplied to the motor's F-PID double closed-loop vector control system.This control system effectively manages the PMSM to generate the designated braking torque, ensuring the precise parking of the locomotive.

Simulation and Experiment
In this section, a simulation model of a PMSM employing an F-PID with a double closed-loop controller is presented.An extensive simulation study has been conducted.

Simulation
This study utilizes the previous dynamic analysis and examination of the principles controlling the fuzzy PID double closed-loop vector control for PMSM as a foundation.It outlines a simulation model developed for locomotive parking using Simulink (MATLAB R2018b).The model presented in this study has three distinct components: the motor control simulation model, the locomotive dynamics simulation model, and the driver simulation model.The suggested parking control mechanism for locomotives is thoroughly examined through the utilization of this simulation model.

F-PID Control: Simulation for Electric Locomotives
Drawing upon the established principles of permanent magnet synchronous motor vector control theory and F-PID control theory, a meticulous simulation model of permanent magnet synchronous motor F-PID double closed-loop vector control was constructed as shown in Figure 6.This comprehensive model meticulously captures the intricacies of the motor's operation under the influence of F-PID double closed-loop vector control.
In this study, we present a comprehensive Simulink model of a mine electric locomotive that achieves precise control through a novel F-PID double closed-loop vector control and SVPWM strategy.The model delves into the locomotive's dynamics and encompasses three crucial components: motor control, locomotive dynamics, and driver simulation.The F-PID controller, empowered by a fuzzy logic system, adaptively adjusts PID gains to guarantee optimal performance across diverse load and speed scenarios, ensuring precise motor speed and torque control even under challenging operating conditions.

F-PID Control: Simulation for Electric Locomotives
Drawing upon the established principles of permanent magnet synchronous motor vector control theory and F-PID control theory, a meticulous simulation model of permanent magnet synchronous motor F-PID double closed-loop vector control was constructed as shown in Figure 6.This comprehensive model meticulously captures the intricacies of the motor's operation under the influence of F-PID double closed-loop vector control.In this study, we present a comprehensive Simulink model of a mine electric locomotive that achieves precise control through a novel F-PID double closed-loop vector control and SVPWM strategy.The model delves into the locomotive's dynamics and encompasses three crucial components: motor control, locomotive dynamics, and driver simulation.The F-PID controller, empowered by a fuzzy logic system, adaptively adjusts PID gains to guarantee optimal performance across diverse load and speed scenarios, ensuring precise motor speed and torque control even under challenging operating conditions.

Modeling Electric Locomotive Dynamics with Simulink
Simulink dynamic model of an electric locomotive is a comprehensive simulation tool that can be used to model the locomotive's electrical, mechanical, and control systems as illustrated in Figure 7.The model is divided into three main subsystems: the motor control subsystem, the locomotive dynamics subsystem, and the driver subsystem.The motor control subsystem implements a F-PID double closed-loop vector control strategy.This control strategy is designed to provide precise control of the motor's speed and torque, even under demanding operating conditions.F-PID controller uses a fuzzy logic

Modeling Electric Locomotive Dynamics with Simulink
Simulink dynamic model of an electric locomotive is a comprehensive simulation tool that can be used to model the locomotive's electrical, mechanical, and control systems as illustrated in Figure 7.The model is divided into three main subsystems: the motor control subsystem, the locomotive dynamics subsystem, and the driver subsystem.The motor control subsystem implements a F-PID double closed-loop vector control strategy.This control strategy is designed to provide precise control of the motor's speed and torque, even under demanding operating conditions.F-PID controller uses a fuzzy logic system to adaptively tune the PID gains, ensuring optimal performance under varying load and speed conditions.The locomotive dynamics subsystem captures the mechanical and electrical dynamics of the locomotive.The model includes components such as the motor, gearbox, wheels, and track.The model also takes into account factors such as aerodynamic drag and rolling resistance.The driver subsystem represents the human driver of the locomotive.The model takes into account the driver's inputs, such as the throttle position and brake pedal position, and generates the corresponding control signals for the motor controller.The The locomotive dynamics subsystem captures the mechanical and electrical dynamics of the locomotive.The model includes components such as the motor, gearbox, wheels, and track.The model also takes into account factors such as aerodynamic drag and rolling resistance.The driver subsystem represents the human driver of the locomotive.The model takes into account the driver's inputs, such as the throttle position and brake pedal position, and generates the corresponding control signals for the motor controller.The Simulink model can be used to simulate a wide range of operating conditions, including starting, stopping, running at constant speed, and climbing and descending gradients.The model can also be used to evaluate the performance of different control strategies and to optimize the locomotive's design parameters.

Validation of Three-Phase Stator Current Control
The image shows the simulated results in Simulink for the three-term stator current of the PMSM. Figure 8 represents the current flowing in each of the three stator phases (A, B, and C).The time axis is in seconds, and the current axis is in amps.The graphs show that the stator current is sinusoidal and well-balanced, indicating that the PMSM is operating properly.The current amplitude is also relatively low, which is desirable for efficiency reasons.The three-term stator current is a key variable in the control of a PMSM.It is used to control the speed and torque of the motor.The simulated results in the image show that the fuzzy PID double closed-loop vector control strategy is able to achieve precise control of the stator current, even under demanding operating conditions.Specific Observations: • The three stator currents are sinusoidal and well-balanced, indicating that the PMSM is operating properly.• The current amplitude is relatively low, which is desirable for efficiency reasons.
• The stator current is well-regulated, even under demanding operating conditions.
The simulated results in the image show that the F-PID double closed-loop vector control strategy can achieve the precise control of the three-term stator current of a PMSM, even under demanding operating conditions.This is important for ensuring the efficient and reliable operation of the motor.

Electromagnetic Torque in Locomotive Stopping
This is shown in the image (Figure 9), where the electromagnetic torque curve (a) is positive during 0-5 s, indicating that the motor is producing driving torque.After 5 s, the electromagnetic torque becomes negative, indicating that the motor is producing brake torque.The acceleration curve (b) shows that the locomotive reaches its set speed of 0 v after 5 s.The speed curve (c) shows that the locomotive maintains its set speed of 0 v after 5 s.

Analyzing Stopping Control Error under Diverse Working Conditions
The graph illustrated in Figure 10 shows the simulation results of the error of the stopping control method under different working conditions.Each color represents a different working condition, with red representing the average error of the stopping control method, blue representing the average error of the stopping control method under different load conditions, green representing the average error of the stopping control method under different speed conditions, and yellow representing the average error of the stopping control method under different gradient conditions.The results show that the error of the stopping control method is generally small under all working conditions.However, the error is slightly higher under high-load conditions and high-speed conditions.The error is also slightly higher on gradients.Overall, the stopping control method is effective in controlling the stopping of the locomotive un-

Analyzing Stopping Control Error under Diverse Working Conditions
The graph illustrated in Figure 10 shows the simulation results of the error of the stopping control method under different working conditions.Each color represents a different working condition, with red representing the average error of the stopping control method, blue representing the average error of the stopping control method under different load conditions, green representing the average error of the stopping control method under different speed conditions, and yellow representing the average error of the stopping control method under different gradient conditions.

Analyzing Stopping Control Error under Diverse Working Conditions
The graph illustrated in Figure 10 shows the simulation results of the error of the stopping control method under different working conditions.Each color represents a different working condition, with red representing the average error of the stopping control method, blue representing the average error of the stopping control method under different load conditions, green representing the average error of the stopping control method under different speed conditions, and yellow representing the average error of the stopping control method under different gradient conditions.The results show that the error of the stopping control method is generally small under all working conditions.However, the error is slightly higher under high-load conditions and high-speed conditions.The error is also slightly higher on gradients.Overall, the stopping control method is effective in controlling the stopping of the locomotive under a variety of working conditions.However, the error of the stopping control method The results show that the error of the stopping control method is generally small under all working conditions.However, the error is slightly higher under high-load conditions and high-speed conditions.The error is also slightly higher on gradients.Overall, the stopping control method is effective in controlling the stopping of the locomotive under a variety of working conditions.However, the error of the stopping control method should be considered when designing and operating locomotives.In the next section, the authors will discuss the experimental setup.

Experiment
While building a locomotive parking test bench to simulate the forces on the locomotive under different speeds, distances, gradients, and loads, it is necessary to choose suitable hardware to simulate the various forces on the locomotive during its traveling process, and to detect the driving state of the locomotive.
The introduction of the principle of the experimental bench, the selection of the hardware of the experimental bench, the design of the controller and the design of the software, etc.Finally, the group carries out the parking experiments on the locomotives under different speeds, distances, slopes, and loads, and then analyzes the results of the experiments and verifies the parking control method.

Principle and Selection of Test Bench
The experimental setup is depicted in Figure 11, whereas the corresponding process is illustrated in Figure 12.Before initiating the experiment, a thorough assessment of the site conditions was conducted and power was supplied to the experimental bench.Subsequently, the host computer was activated, and the locomotive's parameters were meticulously defined, as shown in Table 4. Thereafter, the locomotive's parking parameters, including parking speed, distance, gradient, and load, were carefully established.

Experiment
While building a locomotive parking test bench to simulate the forces on the locomotive under different speeds, distances, gradients, and loads, it is necessary to choose suitable hardware to simulate the various forces on the locomotive during its traveling process, and to detect the driving state of the locomotive.
The introduction of the principle of the experimental bench, the selection of the hardware of the experimental bench, the design of the controller and the design of the software, etc.Finally, the group carries out the parking experiments on the locomotives under different speeds, distances, slopes, and loads, and then analyzes the results of the experiments and verifies the parking control method.

Principle and Selection of Test Bench
The experimental setup is depicted in Figure 11, whereas the corresponding process is illustrated in Figure 12.Before initiating the experiment, a thorough assessment of the site conditions was conducted and power was supplied to the experimental bench.Subsequently, the host computer was activated, and the locomotive's parameters were meticulously defined, as shown in Table 4. Thereafter, the locomotive's parking parameters, including parking speed, distance, gradient, and load, were carefully established.In the controller, the host computer interfaces with the controller via a serial port, exchanging various operational parameters and commands.The controller is equipped with drivers operating on the FreeRTOS (real-time operating system) system, including RS485 (serial communication), USART (universal synchronous/asynchronous receiver/transmitter), GPIO (general purpose input/output driver), DAC (digital-to-analog converter), and ADC (analog-to-digital converter).These drivers manage peripheral functions based on commands from the host computer.Specifically, the DAC driver modulates the torque of the PMSM and the magnetic powder brake.The RS485 driver collects and relays speed and torque feedback to the host computer.The ADC driver manages the magnetic powder brake's control voltage to ensure precise torque control and minimize errors.Additionally, the GPIO handles power management and torque direction adjustments for the test bench and the synchronous motor.Following this, the magnetic powder brake generates the corresponding resistive torque to emulate the locomotive's resistive forces.Moreover, the motor propels the flywheel, replicating the locomotive's inertia torque.The controller simulates the locomotive's resistance torque based on the rotational speed and torque measurements.Following computation, the host computer governs the PMSM to mimic the driving torque during acceleration and the braking torque during deceleration.Additionally, it controls the magnetic powder brake to produce the corresponding torque, replicating the locomotive's resistive torque.Furthermore, the host computer drives the flywheel to simulate the locomotive's inertial torque.

Comparative Result Analysis
The subsequent stage involves the selection of specific hardware for the experimental bench and the construction of the experimental setup for locomotive parking under varying speeds, distances, gradients, and loads.This is followed by the validation of the proposed parking control method through a series of rigorous experiments.
This academic article investigates the performance of a stopping control method under diverse conditions, specifically examining varying initial stopping speeds, track inclinations, and load weights, as illustrated in Figure 13.The experiments were conducted on an experimental bench, following parameters detailed in Table 5.The method's effectiveness was evaluated by systematically analyzing experimental results.For initial stopping speed conditions, the test bench simulated normal locomotive traveling speed, accelerating to 1.7 m/s within 8.8 s.The stopping control method, executed at one-second intervals, gradually decreased the locomotive's speed and the slope of the displacement curve during the parking process from 9.7 to 49.8 s.In the assessment of track inclinations, an experimental platform underwent an acceleration phase, reaching 1.8 m/s at 6.2 s, replicating an electric locomotive's initial speed.The subsequent stopping process, from 6.2 to 34.9 s, involved uniformly decelerated linear movements, with the method effectively decreasing speed and displacement curve slope.The stopping control approach was further evaluated under different load weights, with the test platform accelerating to 1.8 m/s at 8.6 s and subsequently experiencing a gradual decrease in speed from 8.6 to 36.4 s.This study demonstrates the effectiveness of the stopping control method for electric locomotives under diverse operating conditions.The method's ability to adapt to different initial speeds, track inclinations, and load weights makes it a valuable tool for ensuring safe and efficient locomotive operation.

Error and Validation
Table 6 summarizes the stopping errors of an electric mine locomotive under different working conditions.The error is defined as the difference between the actual stopping distance and the target stopping distance.The results show that the stopping error is generally small, within ±0.3 m, under all working conditions.However, the error tends to increase with increasing initial stopping speed, distance, and track gradient.Overall, the  In the assessment of track inclinations, an experimental platform underwent an acceleration phase, reaching 1.8 m/s at 6.2 s, replicating an electric locomotive's initial speed.The subsequent stopping process, from 6.2 to 34.9 s, involved uniformly decelerated linear movements, with the method effectively decreasing speed and displacement curve slope.The stopping control approach was further evaluated under different load weights, with the test platform accelerating to 1.8 m/s at 8.6 s and subsequently experiencing a gradual decrease in speed from 8.6 to 36.4 s.This study demonstrates the effectiveness of the stopping control method for electric locomotives under diverse operating conditions.The method's ability to adapt to different initial speeds, track inclinations, and load weights makes it a valuable tool for ensuring safe and efficient locomotive operation.

Error and Validation
Table 6 summarizes the stopping errors of an electric mine locomotive under different working conditions.The error is defined as the difference between the actual stopping distance and the target stopping distance.The results show that the stopping error is generally small, within ±0.3 m, under all working conditions.However, the error tends to increase with increasing initial stopping speed, distance, and track gradient.Overall, the results suggest that the electric mine locomotive is capable of accurate parking under a variety of working conditions.Table 6 shows the error of an electric mine locomotive in different working conditions, including initial stopping speed, distance, load, and track gradient.The error is defined as the difference between the actual stopping distance and the target stopping distance.
Figure 14 shows that the error of the electric mine locomotive is generally small, within ±0.3 m, under all working conditions.However, the error tends to increase with increasing initial stopping speed, distance, and track gradient.For example, at a distance of 20 m and a track gradient of 0 degrees, the error is around 0.2 m for an initial stopping speed of 1.8 m/s.However, the error increases to around 0.3 m for an initial stopping speed of 3 m/s.Similarly, at an initial stopping speed of 1.8 m/s and a track gradient of 0 degrees, the error is around 0.2 m for a distance of 20 m.However, the error increases to around 0.3 m for a distance of 30 m. results suggest that the electric mine locomotive is capable of accurate parking under a variety of working conditions.6 shows the error of an electric mine locomotive in different working conditions, including initial stopping speed, distance, load, and track gradient.The error is defined as the difference between the actual stopping distance and the target stopping distance.
Figure 14 shows that the error of the electric mine locomotive is generally small, within ±0.3 m, under all working conditions.However, the error tends to increase with increasing initial stopping speed, distance, and track gradient.For example, at a distance of 20 m and a track gradient of 0 degrees, the error is around 0.2 m for an initial stopping speed of 1.8 m/s.However, the error increases to around 0.3 m for an initial stopping speed of 3 m/s.Similarly, at an initial stopping speed of 1.8 m/s and a track gradient of 0 degrees, the error is around 0.2 m for a distance of 20 m.However, the error increases to around 0.3 m for a distance of 30 m.
Figure 14 suggests that the electric mine locomotive is capable of accurate parking under a variety of working conditions.However, it is important to note that the error of the parking control system tends to increase with increasing initial stopping speed, distance, and track gradient.

Conclusions
This research delves into the realm of double closed-loop vector control of PMSM with the primary objective of enhancing electric locomotive stopping precision and smoothness under diverse operating scenarios by controlling errors within 0.3 m.The authors commenced with a thorough investigation of PMSM coordinate transformation theory, meticulously analyzing both Park and Clark transformations.Subsequently, they delved into the principles and implementation of SVPWM, meticulously crafting an F-PID controller renowned for its stability and rapid dynamic response.Figure 14 suggests that the electric mine locomotive is capable of accurate parking under a variety of working conditions.However, it is important to note that the error of the parking control system tends to increase with increasing initial stopping speed, distance, and track gradient.

Conclusions
This research delves into the realm of double closed-loop vector control of PMSM with the primary objective of enhancing electric locomotive stopping precision and smoothness under diverse operating scenarios by controlling errors within 0.3 m.The authors commenced with a thorough investigation of PMSM coordinate transformation theory, meticulously analyzing both Park and Clark transformations.Subsequently, they delved into the principles and implementation of SVPWM, meticulously crafting an F-PID controller renowned for its stability and rapid dynamic response.
Next, the authors seamlessly integrated F-PID control with PMSM vector control, concluding in the development of a groundbreaking F-PID-based double closed-loop vector control model for PMSMs.This innovative model heralds a paradigm shift in electric locomotive stopping precision and smoothness under diverse operating scenarios.To validate the efficacy of the proposed control strategy, the authors meticulously designed parking experiments of locomotives under different initial speeds, loads, slopes, and distances.They precisely classified several groups of experiments, methodically recorded the experimental data, and analyzed the experimental results.The experimental results reveal that the error of locomotive parking under different working conditions is consistently maintained within ±0.3 m, unequivocally demonstrating that the proposed locomotive parking control method under different working conditions can effectively realize the accurate parking of mining locomotives.This research holds immense promise for revolutionizing the field of electric locomotive control and paving the way for enhanced efficiency and reliability.Funding: This research was funded by the National Natural Science Foundation of China (grant no: 51975569).

TsFigure 2 .
Figure 2. Linear combination of the voltage space vector figure.

Figure 2 .
Figure 2. Linear combination of the voltage space vector figure.

Figure 3 .
Figure 3. Schematic diagram of double closedloop vector control of PMSM.

Figure 3 .
Figure 3. Schematic diagram of double closedloop vector control of PMSM.

Figure 4 .
Figure 4. (a) K p fuzzy regular surface model; (b) K i fuzzy regular surface model; (c) K d fuzzy regular surface model.

Figure 5 .
Figure 5. (a) F-PID control system; (b) fuzzy PID vector control system in stopping control.

Figure 5 .
Figure 5. (a) F-PID control system; (b) fuzzy PID vector control system in stopping control.

Figure 7 .
Figure 7. (a) Schematic diagram of gradient resistance of electric locomotive; (b) schematic diagram of simulation flow in Simulink.

Figure 7 .
Figure 7. (a) Schematic diagram of gradient resistance of electric locomotive; (b) schematic diagram of simulation flow in Simulink.

Figure 10 .
Figure 10.Impact of working conditions on stopping control performance.

Figure 10 .
Figure 10.Impact of working conditions on stopping control performance.

Figure 10 .
Figure 10.Impact of working conditions on stopping control performance.

Figure 13 .
Figure 13.(a) Velocity graph at different initial speeds; (b) velocity graph under different stopping distances; (c) velocity graph under different track gradients; (d) velocity graph under different loads.

Figure 13 .
Figure 13.(a) Velocity graph at different initial speeds; (b) velocity graph under different stopping distances; (c) velocity graph under different track gradients; (d) velocity graph under different loads.

Figure 14 .
Figure 14.Exploring error variations in simulated working conditions.

Figure 14 .
Figure 14.Exploring error variations in simulated working conditions.

Table 1 .
K p fuzzy rules.

Table 2 .
K i fuzzy rules.

Table 3 .
K d fuzzy rules.

Table 4 .
Parameters of electric locomotive.Figure 11.Experimental test bench.Figure 12. Experimental flow chart of test bench.

Table 5 .
Experimental parameters of electric locomotive under different conditions.

Table 5 .
Experimental parameters of electric locomotive under different conditions.

Table 6 .
Summary of stopping errors in experimental trials.

Table 6 .
Summary of stopping errors in experimental trials.