A brushless direct current motor control parameter optimization method and optimization system

By establishing mathematical models of the hydraulic pump and the permanent magnet brushless DC motor, an improved PID controller was constructed and combined with a current loop, solving the problem of difficult parameter adjustment in traditional PID control. This enabled optimized control of the brushless DC motor during load changes and rapid start-stop processes, improving the system's anti-disturbance capability and dynamic response performance.

CN122371753APending Publication Date: 2026-07-10XIDIAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XIDIAN UNIV
Filing Date
2026-03-30
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Traditional PID control is difficult to adjust and optimize parameters in brushless DC motors, making it hard to achieve optimal control performance. In particular, it lacks the ability to resist disturbances during load changes and rapid start-stop processes, and it lacks system parameter calculation methods, which makes debugging and optimization difficult in engineering applications.

Method used

An equivalent mathematical model of a hydraulic pump and a permanent magnet brushless DC motor is established. The back electromotive force coefficient, torque coefficient, and moment of inertia are obtained through parameter identification. An improved PID controller is constructed and combined with a current loop to form a dual PID control loop. The control parameters are back-derived using the pole placement method, and the optimal combination of control parameters is verified by global optimization using the particle swarm optimization algorithm.

Benefits of technology

It achieves optimized control of brushless DC motors during load changes and rapid start-stop processes, improves the system's anti-disturbance capability and dynamic response performance, and ensures that the combination of control parameters has theoretical optimization and engineering applicability in actual working conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122371753A_ABST
    Figure CN122371753A_ABST
Patent Text Reader

Abstract

This invention relates to the field of brushless DC motor technology, specifically to a method and system for optimizing control parameters of a brushless DC motor. The method includes establishing an equivalent mathematical model of the hydraulic pump and the motor, constructing an open-loop simulation model of the motor, identifying the back electromotive force coefficient, torque coefficient, and moment of inertia through simulation, introducing a first-order inertial low-pass filter to construct an improved PID controller, establishing a time-domain mathematical model based on the identified parameters, deriving the closed-loop transfer function, determining the desired system response order based on this function, configuring the closed-loop poles, back-calculating the unknown control parameters using the pole placement method, substituting the back-calculated parameters into the improved PID controller to construct a dual-PID control loop, and performing particle swarm optimization to obtain the optimal combination of control parameters. This invention provides theoretical initial values ​​through the pole placement method and achieves adaptive tuning of the dual-PID control loop parameters through particle swarm optimization, solving the problems of difficult manual adjustment, poor disturbance rejection, and lack of engineering calculation methods.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of brushless DC motor technology, and in particular to a method and system for optimizing control parameters of a brushless DC motor. Background Technology

[0002] Brushless DC motors are widely used in electric pump control systems, industrial automation, and automotive electronics due to their high efficiency, high reliability, and excellent speed regulation performance. Electric pump control systems typically require motors to achieve rapid response and precise control under various operating conditions, especially during dynamic processes such as load changes and rapid start-stop, where the system's steady-state accuracy and dynamic response performance are crucial. Traditional motor control methods mainly rely on PID (Proportional-Integral-Derivative) control algorithms. PID control is widely used in industrial control due to its simple structure and ease of implementation. However, traditional PID control has certain limitations when facing complex operating conditions. For example, during load changes or rapid start-stop, the parameters of the PID controller often need to be manually adjusted, making it difficult to achieve optimal control results. Furthermore, traditional PID control is highly dependent on the system model; when system parameters change, control performance may significantly degrade.

[0003] To overcome the limitations of traditional PID control, the application of intelligent algorithms in motor control parameter optimization has been explored in recent years. Intelligent algorithms such as particle swarm optimization, reinforcement learning, and genetic algorithms can automatically search for optimal control parameters by simulating natural evolution or learning processes, thereby improving the system's dynamic response and disturbance rejection capability. These algorithms perform well in multi-objective optimization problems, simultaneously optimizing multiple performance indicators such as response speed, steady-state accuracy, and anti-interference capability, providing new ideas for the design of motor control systems. Especially in brushless DC motor control systems, dual-loop PID control is a common control strategy. Dual-loop control typically includes a current loop and a speed loop, where the current loop controls the motor torque and the speed loop regulates the motor speed. This control strategy can improve the dynamic response and steady-state accuracy of the system to a certain extent, but it still faces the following problems in practical applications: (1) Traditional dual-loop PID control involves multiple parameters such as proportional coefficient, integral time, and derivative time. Manually adjusting these parameters is not only time-consuming, but also difficult to ensure the optimality of the parameters, resulting in limited system performance; (2) Traditional PID control is not good at resisting disturbances and has limited dynamic response performance when the load changes and the operating conditions change, making it difficult to meet the requirements of fast start-stop and load change; (3) When traditional PID control algorithms are implemented in actual engineering, there is often a lack of system parameter calculation methods and implementation examples, which makes debugging and optimization difficult in engineering applications. Summary of the Invention

[0004] The technical problem to be solved by the embodiments of the present invention is to provide a method and system for optimizing control parameters of a brushless DC motor, so as to solve the problem of difficulty in adjusting and optimizing control parameters of brushless DC motors in the prior art.

[0005] This invention discloses a method for optimizing control parameters of a brushless DC motor, comprising: Establish an equivalent mathematical model of the hydraulic pump and an equivalent mathematical model of the permanent magnet brushless DC motor, and construct an open-loop simulation model of the motor based on the equivalent mathematical model of the motor. Run the open-loop simulation model of the motor to obtain simulation data under different operating conditions, and perform parameter identification on the simulation data based on the equivalent mathematical model of the motor to obtain the back electromotive force coefficient, torque coefficient and moment of inertia respectively. An improved PID controller is constructed by introducing a first-order inertial low-pass filter. A time-domain mathematical model of a permanent magnet brushless DC motor is established by combining the identified back electromotive force coefficient, torque coefficient and moment of inertia. A closed-loop transfer function containing unknown control parameters is derived from the time-domain mathematical model. Based on the preset control performance target, the expected order of the system response based on the closed-loop transfer function is determined, and the corresponding closed-loop poles are configured according to the determined expected order of the system response. The unknown control parameters are then inferred by using the pole placement method. The unknown control parameters obtained by reverse calculation are substituted into the improved PID controller, and a dual PID control loop is constructed by combining it with the current loop controller; Using the unknown control parameters obtained by reverse calculation as the initial population, a fitness function is constructed using the dynamic performance index of the motor speed response. Global optimization is performed on all control parameters of the dual PID control loop to obtain the optimal combination of control parameters. The optimized combination of control parameters is sequentially substituted into the dual PID control loop and the simulation system coupled with the equivalent mathematical model of the liquid pump and the open-loop simulation model of the motor. The optimal combination of control parameters is obtained after verification by simulating load mutation and rapid start-stop conditions.

[0006] Optionally, the method for establishing an equivalent mathematical model of the liquid pump includes: By analyzing the flow continuity of the hydraulic pump, the input flow equation and output flow equation of the hydraulic pump are established. The inlet and outlet fluid volumes of the hydraulic pump in the input and output flow equations are then unified into the fluid volume of the pipeline, resulting in a simplified flow continuity equation. The functional expression of the simplified flow continuity equation is as follows:

[0007] In the formula, This indicates the flow rate of the hydraulic pump. Indicates the input speed of the hydraulic pump. This indicates the displacement of the hydraulic pump. This indicates the internal leakage flow rate of the hydraulic pump. This refers to unifying the inlet and outlet fluid volumes of the hydraulic pump into the equivalent fluid volume after pipeline connection. This indicates the outlet pressure of the hydraulic pump. Indicates time, This indicates the rate of change of the hydraulic pump outlet pressure; By analyzing the internal leakage force balance relationship of the hydraulic pump, the outlet pressure equation of the hydraulic pump is established. The functional expression of the outlet pressure equation is as follows:

[0008] In the formula, Indicates liquid resistance. Indicates liquid sensation. This indicates the pressure difference between the inlet and outlet of the hydraulic pump. This indicates the rate of change of the pressure difference between the inlet and outlet; Performing a Laplace transform on the simplified flow continuity equation and the outlet pressure equation yields the first transfer function between the hydraulic pump outlet pressure and flow rate. The expression for the first transfer function is as follows:

[0009] In the formula, This represents the transfer function of hydraulic pump outlet pressure to flow rate. Represents the Laplace operator. This indicates the pressure difference between the inlet and outlet of the hydraulic pump. This indicates the rate of change of the pressure difference between the inlet and outlet; By analyzing the relationship between the input torque of the hydraulic pump and various types of torque, a torque equation for the hydraulic pump is established. The functional expression of the torque equation is as follows:

[0010] In the formula, This indicates the input torque of the hydraulic pump. This represents constant torque loss independent of motor speed. Indicates the viscosity damping coefficient of the oil. This represents the torque loss coefficient due to oil movement and turbulent leakage. Represents pi (π). This represents the torque loss coefficient related to the sealing surface of the hydraulic pump. Indicates the motor speed. This represents the square of the motor speed; Based on the flow continuity equation, the outlet pressure equation, the transfer function, and the torque equation, a mathematical model of the hydraulic pump, including flow characteristics and torque characteristics, is established.

[0011] Optionally, the method for establishing the equivalent mathematical model of the motor includes: Establish a set of fundamental equations for permanent magnet brushless DC motors, including electromotive force balance equation, back electromotive force equation, torque balance equation, and electromagnetic torque equation. Based on the established set of fundamental equations, substituting the zero back electromotive force into the electromotive force balance equation yields the starting current equation, the functional expression of which is:

[0012] In the formula, This indicates the starting current of the motor. Indicates the power supply voltage. This represents the saturation voltage drop of a power transistor. This represents the average resistance of the armature winding; Based on the starting current equation and the analysis of the influence of the change in the angle between the rotor magnetic field and the armature magnetic field on the electromagnetic torque, the starting characteristics of the starting torque fluctuating with the change in rotor position are determined. Based on the established set of fundamental equations, the variation of armature current with output torque during stable operation is analyzed, and the motor efficiency equation is obtained by combining the relationship between input power and output power. The functional expression of the motor efficiency equation is as follows:

[0013] In the formula, Indicates the efficiency of the motor. This indicates the input power of the motor. Indicates the output power of the motor. This indicates the total losses of the motor; Based on the analysis of the motor efficiency equation, the operating characteristic of the motor efficiency first increasing and then decreasing with the output torque is determined. Based on the established set of fundamental equations, the relationship between the motor's speed and electromagnetic torque under constant applied power supply voltage is analyzed to obtain the mechanical characteristic equation. The functional expression of the mechanical characteristic equation is as follows:

[0014] In the formula, Indicates electromagnetic torque. Indicates the torque coefficient. Represents the average armature current. This represents the equivalent average resistance of the armature winding. Indicates the motor speed. Indicates the back electromotive force coefficient; Based on the analysis of the mechanical characteristic equation and the law of shift in the mechanical characteristic curve when the power supply voltage is changed, the speed regulation characteristic of achieving smooth speed regulation by changing the power supply voltage is determined. Based on the starting current equation and the starting characteristics, the motor efficiency equation and the operating characteristics, as well as the mechanical characteristic equation and the speed regulation characteristics, a mathematical model of the permanent magnet brushless DC motor is established.

[0015] Optionally, the step of running the open-loop simulation model of the motor to obtain simulation data under different operating conditions, and identifying parameters of the simulation data based on the equivalent mathematical model of the motor, includes: Run the open-loop simulation model of the motor to obtain the steady-state speed and corresponding power supply voltage under no-load steady-state conditions, as well as the armature current and corresponding stator resistance under load conditions. Based on the obtained no-load steady-state speed value and the power supply voltage value, the relationship between steady-state speed and back electromotive force coefficient is established using the final value theorem, and the preliminary identification value of back electromotive force coefficient is calculated. Based on the established back electromotive force equation and the electromotive force balance equation, and combined with the obtained armature current value and stator resistance value, the initial identification value of the back electromotive force coefficient is corrected to obtain the corrected back electromotive force coefficient. The functional expression of the corrected back electromotive force coefficient is as follows:

[0016] In the formula, This represents the corrected back electromotive force coefficient. Indicates armature current, Indicates steady-state speed. Indicates the stator line resistance; Run the open-loop simulation model of the motor to obtain the armature current value and the corresponding load torque value under steady-state load conditions. Substitute the obtained armature current value and the load torque value into the established electromagnetic torque equation to calculate the torque coefficient. The functional expression for calculating the torque coefficient is as follows:

[0017] In the formula, The torque coefficient indicating identification. Indicates electromagnetic torque. Indicates load torque; Run the open-loop simulation model of the motor to obtain the speed response data during the motor acceleration process, as well as the corresponding electromagnetic torque value and load torque value; The acquired speed response data is processed using the finite difference method to obtain the speed change rate. The speed change rate, the acquired electromagnetic torque value, and the load torque value are then substituted into the established torque balance equation to calculate the preliminary identification value of the moment of inertia. The functional expression for calculating the moment of inertia is as follows:

[0018] In the formula, The moment of inertia representing the identification. Indicates the rate of change of rotational speed; Substitute the acquired speed response data into the established torque balance equation, and use the differential calculation method to analyze the relationship between the speed change rate and the electromagnetic torque to calculate the identification value of the moment of inertia. The open-loop simulation model of the motor is run using sawtooth wave voltage as input to lengthen the acceleration process and obtain the speed response data of multiple acceleration steps, as well as the corresponding electromagnetic torque value and load torque value. Based on the rotational speed response data of multiple acceleration steps, and the corresponding electromagnetic torque value and load torque value, the torque balance equation is used to recalculate and average the values ​​to obtain the final moment of inertia.

[0019] Optionally, the method includes constructing the improved PID controller, establishing the time-domain mathematical model, and deriving the closed-loop transfer function, comprising: The improved PID controller is constructed by connecting a first-order inertial low-pass filter in parallel with the derivative or output channel of the original PID controller. The transfer function expression of the improved PID controller is as follows:

[0020]

[0021] In the formula, This represents the Laplace transform of the controller output signal based on the improved differential channel. This represents the Laplace transform of the controller output signal based on the improved output channel. Represents the Laplace operator. This represents the proportional gain of the improved PID controller. Represents the integration time constant. Represents the differential time constant. This represents the time constant of the first-order inertial low-pass filter. The Laplace transform of the error signal between the desired speed and the actual speed; Based on the improved PID controller, and combined with the identified back electromotive force coefficient, torque coefficient, and moment of inertia, a time-domain mathematical model of the permanent magnet brushless DC motor under uncontrolled conditions is constructed. The functional expression of the time-domain mathematical model is as follows:

[0022] In the formula, This represents the back electromotive force of the armature winding. Represents the back electromotive force coefficient. Indicates the motor speed. Indicates electromagnetic torque. Indicates the torque coefficient. Indicates armature current, This represents the derivative of the armature current with respect to time. This represents the electromagnetic time constant of the armature circuit. Indicates the armature circuit amplification factor. Indicates the power supply voltage. This represents the saturation voltage drop of a power transistor. Represents the moment of inertia. This represents the derivative of the motor speed with respect to time. Indicates load torque; Define a generalized control quantity, and obtain a second transfer function from the generalized control quantity to the electromagnetic torque, and a third transfer function from the electromagnetic torque to the rotational speed from the time-domain mathematical model. The functional expressions of the second transfer function and the third transfer function are as follows:

[0023]

[0024] In the formula, This represents the second transfer function. Indicates the third transfer function; A desired speed is set, and an error speed is defined based on the difference between the set desired speed and the actual speed. The fourth transfer function of the improved PID controller in the feedback loop is then obtained based on the defined error speed. The function expression of the fourth transfer function is as follows:

[0025] In the formula, This represents the fourth transfer function. This represents the derivative coefficient of the improved PID controller. This represents the integral coefficient of the improved PID controller; Based on the second, third, and fourth transfer functions, and in conjunction with the set desired speed and the load torque in the time-domain mathematical model, the fifth transfer function of the error speed in the complex frequency domain is derived. The functional expression of the fifth transfer function is as follows:

[0026] In the formula, This represents the Laplace transform of the rotational speed with defined error. The Laplace transform of the load torque, Represents the Laplace transform of the desired rotational speed; Based on the fifth transfer function, a first response transfer function of the error speed with respect to the load torque and a second response transfer function of the error speed with respect to the desired speed are established. Then, based on the first and second response transfer functions, a closed-loop transfer function containing unknown differential coefficients, unknown integral coefficients, and unknown proportional coefficients is constructed. The functional expression of the closed-loop transfer function is as follows:

[0027] In the formula, This represents the closed-loop transfer function.

[0028] Optionally, the method includes determining the desired response order of the system, configuring the closed-loop poles, and inversely calculating the unknown control parameters, comprising: If suppressing overshoot and oscillation is the priority control objective, the expected response order of the system is determined to be dominated by the first-order system. Alternatively, if improving response speed is the primary control objective, the expected response order of the system is determined to be dominated by a second-order system. When it is determined that the first-order system is dominant, a closed-loop control system consisting of four first-order systems connected in parallel is configured, and the corresponding closed-loop pole parameters are configured to obtain the first desired transfer function. The function expression of the first desired transfer function is:

[0029] In the formula, Denotes the first expected transfer function. , , , These represent the gain coefficients of each first-order system. , , , The pole parameters of each first-order system; When the system is determined to be a second-order system, a closed-loop control system consisting of one second-order system and two first-order systems connected in parallel is configured, and the corresponding closed-loop pole parameters are configured to obtain the second desired transfer function. The expression of the second desired transfer function is as follows:

[0030] In the formula, Denotes the second expected transfer function. Denotes the coefficients of the first-order term in a second-order system. Denotes the coefficients of the constant term in a second-order system. , , These represent the gain coefficients of each system. , The pole parameters of the two first-order systems respectively; The expected characteristic polynomial is obtained by finding a common denominator for the first or second expected transfer function. The coefficient correspondence between the expected characteristic polynomial and the closed-loop transfer function is established, and the unknown differential coefficients, integral coefficients and proportional coefficients are obtained by solving the equation.

[0031] Optionally, the global optimization of all control parameters of the dual PID control loop includes: All the differential coefficients, integral coefficients and proportional coefficients obtained by solving are used as the initial population, and the number of particles, the maximum number of iterations, the initial velocity and position of the particles are set. A fitness function is constructed using the convergence time, overshoot, and steady-state error of the motor speed response as dynamic performance indicators, and the fitness value is calculated for each particle in the initial population. Based on the calculated fitness values, update the individual optimal position of each particle and the global optimal position of the entire population, and update the particle's velocity and position based on the update results. The inertial weights and learning factors during the particle velocity and position update process are dynamically adjusted, while the particle velocity is limited until the maximum number of iterations is reached, and the combination of control parameters corresponding to the global optimal position is output.

[0032] This invention also discloses an optimization system that employs the above-mentioned brushless DC motor control parameter optimization method. The optimization system includes: The model building module is used to build the equivalent mathematical model of the hydraulic pump and the equivalent mathematical model of the permanent magnet brushless DC motor, and to construct the open-loop simulation model of the motor based on the equivalent mathematical model of the motor. The parameter identification module is used to run the open-loop simulation model of the motor to obtain simulation data under different working conditions, and to perform parameter identification on the simulation data based on the equivalent mathematical model of the motor to obtain the back electromotive force coefficient, torque coefficient and moment of inertia respectively. The closed-loop function establishment module introduces a first-order inertial low-pass filter to construct an improved PID controller. Combining the identified back electromotive force coefficient, torque coefficient and moment of inertia, a time-domain mathematical model of the permanent magnet brushless DC motor is established, and a closed-loop transfer function containing unknown control parameters is derived from the time-domain mathematical model. The control configuration module is used to determine the desired system response order of the closed-loop control system based on the derived closed-loop transfer function, configure the corresponding closed-loop poles according to the determined desired system response order, and back-calculate the unknown control parameters using the pole placement method. The control loop establishment module is used to substitute the unknown control parameters obtained by back-reasoning into the improved PID controller and construct a dual PID control loop in combination with the current loop controller. The parameter optimization module is used to use the unknown control parameters obtained by back-reasoning as the initial population, construct a fitness function with the dynamic performance index of the motor speed response, and perform global optimization on all control parameters of the dual PID control loop to obtain the optimal combination of control parameters. The parameter verification module is used to sequentially substitute the optimized control parameter combination into the dual PID control loop and the simulation system coupled by the equivalent mathematical model of the liquid pump and the open-loop simulation model of the motor, and obtain the verified optimal control parameter combination by simulating load sudden change and rapid start-stop conditions.

[0033] The present invention also discloses an electronic device, including a memory and a processor, wherein the memory stores a computer program, characterized in that the processor executes the computer program to implement the steps of the above-described method for optimizing control parameters of a brushless DC motor.

[0034] The present invention also discloses a storage medium storing a computer program thereon, characterized in that the computer program, when executed by a processor, implements the steps of the above-described method for optimizing control parameters of a brushless DC motor.

[0035] Compared with the prior art, the brushless DC motor control parameter optimization method and optimization system provided in this embodiment of the invention have the following advantages: By establishing equivalent mathematical models of the hydraulic pump and the permanent magnet brushless DC motor, and constructing an open-loop simulation model of the motor, accurate data sources are provided for parameter identification. Based on this model, the back electromotive force coefficient, torque coefficient, and moment of inertia are identified, enabling the controller design to match the characteristics of the controlled object. An improved PID controller is constructed by introducing a first-order inertial low-pass filter. A time-domain mathematical model is established in conjunction with the identified parameters, and the closed-loop transfer function is derived. The unknown control parameters are back-calculated using the pole placement method to obtain initial values ​​of the controller parameters that match the dynamic requirements of the system, overcoming the blindness of manual trial and error. The back-calculated parameters are substituted into the improved PID controller and combined with a current loop controller to construct a dual PID control loop, forming a dual closed-loop collaborative control structure of speed and current. The back-calculated parameters are used as the initial population of the particle swarm optimization algorithm. A fitness function is constructed using the dynamic performance index of the motor speed response for global optimization, allowing the algorithm to start searching in the region close to the optimal solution, avoiding slow convergence or local optima problems caused by random initialization. The optimal control parameter combination is substituted into a dual PID control loop and coupled simulation system. The effectiveness of the parameters is verified by simulating load changes and rapid start-stop conditions. Finally, a control parameter combination that combines theoretical optimality and engineering practicality is obtained. Attached Figure Description

[0036] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. In the accompanying drawings: Figure 1 A schematic block diagram illustrating the steps of the brushless DC motor control parameter optimization method provided in this embodiment of the invention; Figure 2 A simplified diagram of an existing pump hydraulic system; Figure 3 The curves showing the changes in armature current and rotational speed during no-load start-up are provided for embodiments of the present invention. Figure 4 A graph showing the relationship between motor efficiency and output torque provided for an embodiment of the present invention; Figure 5 Mechanical characteristic curves of the motor provided for embodiments of the present invention; Figure 6 A model diagram of the equivalent mathematical model of the motor provided in the embodiments of the present invention; Figure 7 A schematic diagram of the control structure of the improved PID controller provided in an embodiment of the present invention; Figure 8 This is a distribution diagram of poles configured when the first-order system is dominant, provided in an embodiment of the present invention. Figure 9 A motor speed curve provided for simulation using control parameters derived from a first-order system as the dominant factor in an embodiment of the present invention; Figure 10The error curve between the simulated motor speed and the actual motor speed is provided for an embodiment of the present invention, which uses control parameters derived from the first-order system as the dominant factor. Figure 11 This is a distribution diagram of poles configured when the second-order system is dominant, provided for an embodiment of the present invention. Detailed Implementation

[0037] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. The preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0038] This invention discloses a method for optimizing control parameters of a brushless DC motor, such as... Figure 1 As shown, it includes: S1. Establish the equivalent mathematical model of the hydraulic pump and the equivalent mathematical model of the permanent magnet brushless DC motor, and construct the open-loop simulation model of the motor based on the equivalent mathematical model of the motor. S2. Run the open-loop simulation model of the motor to obtain simulation data under different working conditions, and identify the parameters of the simulation data based on the equivalent mathematical model of the motor to obtain the back electromotive force coefficient, torque coefficient and moment of inertia respectively. S3. An improved PID controller is constructed by introducing a first-order inertial low-pass filter. The time-domain mathematical model of the permanent magnet brushless DC motor is established by combining the identified back EMF coefficient, torque coefficient and moment of inertia. The closed-loop transfer function containing unknown control parameters is derived from the time-domain mathematical model. S4. Based on the preset control performance target, determine the expected order of the system response based on the closed-loop transfer function, and configure the corresponding closed-loop poles according to the determined expected order of the system response. Then, use the pole placement method to back-calculate the unknown control parameters. S5. Substitute the unknown control parameters obtained by reverse calculation into the improved PID controller, and combine it with the current loop controller to construct a dual PID control loop; S6. Using the unknown control parameters obtained by reverse calculation as the initial population, construct a fitness function with the dynamic performance index of motor speed response, and perform global optimization on all control parameters of the dual PID control loop to obtain the optimal combination of control parameters. S7. Substitute the optimized control parameter combination into the dual PID control loop and the simulation system coupled with the equivalent mathematical model of the liquid pump and the open-loop simulation model of the motor in sequence. Obtain the verified optimal control parameter combination by simulating load change and rapid start-stop conditions.

[0039] Through the implementation of the above-described brushless DC motor control parameter optimization method, firstly, equivalent mathematical models of the hydraulic pump and the permanent magnet brushless DC motor, as well as an open-loop simulation model of the motor, are established, achieving an accurate description of the dynamic characteristics of the motor-pump system at the physical level. Specifically, the equivalent mathematical model of the hydraulic pump accurately reflects the response law of the load end to motor speed fluctuations and torque changes, while the equivalent mathematical model of the motor can fully characterize the electro-magnetic-mechanical coupling relationship of the motor body under operating conditions such as starting, speed regulation, and load disturbances. As for the open-loop simulation model of the motor, it provides a high-fidelity digital simulation environment for subsequent parameter identification. This environment can simulate the operating state of the actual motor under different PWM duty cycles and different load conditions, thereby overcoming the shortcomings of traditional methods that rely on physical prototype debugging, such as time costs and insufficient operating condition coverage.

[0040] The back electromotive force coefficient, torque coefficient, and moment of inertia are obtained through parameter identification. This step, by combining simulation data with a mathematical model, achieves accurate inversion of key physical parameters of the motor. An improved PID controller is constructed by introducing a first-order inertial low-pass filter, which effectively suppresses high-frequency interference introduced by the differential signal and avoids the problem of drastic fluctuations in control quantity caused by measurement noise in the feedback loop of traditional PID controllers. Based on the time-domain mathematical model established by the accurately identified motor parameters, a closed-loop transfer function containing unknown control parameters is derived through Laplace transform. This transfer function establishes a direct algebraic relationship between the controller parameters and the physical characteristics of the controlled object, laying a rigorous mathematical foundation for subsequent theoretical parameter design.

[0041] By determining the desired system response order, configuring the corresponding closed-loop poles, and then inversely deriving the unknown control parameters, the desired dynamic response pattern of the system can be determined based on the preset control performance target. By configuring the desired closed-loop poles and using the pole placement method to accurately derive the theoretical values ​​of the unknown control parameters, the improved PID controller possesses initial performance matching the system's physical characteristics before entering the intelligent optimization stage. This avoids the limitations of traditional methods that rely entirely on trial and error and lack theoretical guidance.

[0042] The unknown control parameters obtained through backpropagation are substituted into the improved PID controller, and combined with the current loop controller to construct a dual PID control loop, forming a dual closed-loop control structure in which the speed loop and current loop work together. The speed loop is responsible for adjusting the motor speed according to the deviation between the desired and actual speed, and its output serves as the input to the current loop. The current loop is responsible for precisely controlling the armature current to achieve a rapid response to electromagnetic torque. This dual-loop parallel structure allows the current loop to respond to disturbances before the speed loop when the load changes abruptly, effectively suppressing the impact of load disturbances on the speed and significantly improving the system's anti-disturbance capability and dynamic response performance.

[0043] Using the theoretical parameter values ​​obtained by the pole placement method as the initial population of the particle swarm optimization algorithm allows the algorithm to begin searching in the near-optimal region of the solution space, significantly reducing the number of iterations and avoiding the problem of getting trapped in local optima that may be caused by random initialization. A fitness function constructed from convergence time, overshoot, and steady-state error is employed to comprehensively evaluate the dynamic performance of the controller from multiple dimensions, ensuring that the optimization process balances response speed, stability, and steady-state accuracy. During the optimization process, the inertia weight and learning factor are dynamically adjusted, and the particle velocity range is limited, effectively balancing global exploration and local exploitation capabilities while suppressing oscillations during the search. The optimized parameters are then double-verified by substituting them into a dual-PID control loop and a coupled simulation system, ensuring that the final control parameter combination satisfies the constraints of the controller's own structure and can pass rigorous operating condition tests in a simulation environment that closely matches the actual load characteristics. This guarantees a complete closed loop from theoretical calculation to engineering application, and the final control parameter combination possesses both theoretical optimality and operating condition adaptability.

[0044] Furthermore, the brushless DC motor control parameter optimization method includes the step of establishing an equivalent mathematical model of the liquid pump, including: By analyzing the flow continuity of the hydraulic pump, the input flow equation and output flow equation of the hydraulic pump are established. The inlet and outlet fluid volumes of the hydraulic pump in the input and output flow equations are then unified into the fluid volume of the pipeline, resulting in a simplified flow continuity equation. The functional expression of the simplified flow continuity equation is as follows:

[0045] In the formula, This indicates the flow rate of the hydraulic pump. Indicates the input speed of the hydraulic pump. This indicates the displacement of the hydraulic pump. This indicates the internal leakage flow rate of the hydraulic pump. This refers to unifying the inlet and outlet fluid volumes of the hydraulic pump into the equivalent fluid volume after pipeline connection. This indicates the outlet pressure of the hydraulic pump. Indicates time, This indicates the rate of change of the hydraulic pump outlet pressure; By analyzing the internal leakage force balance relationship of the hydraulic pump, the outlet pressure equation of the hydraulic pump is established. The functional expression of the outlet pressure equation is as follows:

[0046] In the formula, Indicates liquid resistance. Indicates liquid sensation. This indicates the pressure difference between the inlet and outlet of the hydraulic pump. This indicates the rate of change of the pressure difference between the inlet and outlet; Performing a Laplace transform on the simplified flow continuity equation and outlet pressure equation yields the first transfer function between the hydraulic pump outlet pressure and flow rate. The expression for the first transfer function is as follows:

[0047] In the formula, This represents the transfer function of hydraulic pump outlet pressure to flow rate. Represents the Laplace operator. This indicates the pressure difference between the inlet and outlet of the hydraulic pump. This indicates the rate of change of the pressure difference between the inlet and outlet; By analyzing the relationship between the input torque of the hydraulic pump and various types of torque, the torque equation of the hydraulic pump is established. The functional expression of the torque equation is as follows:

[0048] In the formula, This indicates the input torque of the hydraulic pump. This represents constant torque loss independent of motor speed. Indicates the viscosity damping coefficient of the oil. This represents the torque loss coefficient due to oil movement and turbulent leakage. Represents pi (π). This represents the torque loss coefficient related to the sealing surface of the hydraulic pump. Indicates the motor speed. This represents the square of the motor speed; Based on the flow continuity equation, outlet pressure equation, transfer function, and torque equation, a mathematical model of a hydraulic pump that includes flow characteristics and torque characteristics is established.

[0049] Through the implementation of the above-described brushless DC motor control parameter optimization method embodiment, firstly, the hydraulic pump is an important component of the motor pump, forming the motor pump function together with the motor. The motor drives the hydraulic pump to move, converting electrical energy into hydraulic energy, thereby providing power to the entire hydraulic system. This embodiment of the invention will utilize the working characteristics of the hydraulic pump to establish a mathematical model of the hydraulic pump, thereby analyzing the requirements of the motor pump on the multiphase motor speed control system.

[0050] Common hydraulic pumps are classified into gear pumps, vane pumps, and piston pumps. This paper selects the more efficient and compact piston pump as the research object. The hydraulic system of the pump can be simplified as follows: Figure 2 As shown, motor M drives a hydraulic pump to deliver pressurized oil to the hydraulic actuator through a multi-way valve, and the maximum system pressure is limited by a relief valve. The inlet pressure of the hydraulic pump is [value missing]. Since the inlet of the hydraulic pump is connected to the oil tank, it can be considered [value missing]. ; This refers to the outlet pressure of the hydraulic pump. This refers to the input torque of the hydraulic pump. This represents the motor speed.

[0051] The working characteristics of a hydraulic pump are divided into flow characteristics and torque characteristics. Starting from the flow continuity equation and torque equation of the hydraulic pump, the flow and torque characteristics of the hydraulic pump are analyzed.

[0052] According to the flow continuity equation of a hydraulic pump, we can obtain:

[0053]

[0054] In the formula, This indicates the input flow rate of the hydraulic pump. Indicates the input speed of the hydraulic pump. This indicates the displacement of the hydraulic pump. This represents the laminar leakage coefficient (used to describe laminar leakage flow rate that is proportional to the pressure difference). This represents the turbulent leakage coefficient (used to describe turbulent leakage flow that is proportional to the square root of the pressure difference). This indicates the pressure difference between the inlet and outlet of the hydraulic pump. This indicates the inlet pressure of the hydraulic pump. Indicates the capacity of the oil-absorbing liquid. This indicates the output flow rate of the hydraulic pump. This indicates the outlet pressure of the hydraulic pump. Indicates the volume of oil drained. This indicates the rate of change in import pressure. This indicates the rate of change in export pressure.

[0055] During the operation of a hydraulic pump, the pump's internal fluid volume is relatively small compared to the fluid volume of the pipeline components in the hydraulic system. Therefore, the fluid volumes at the pump's inlet and outlet can be unified into the pipeline fluid volume, resulting in a simplified flow continuity equation. This approach fully considers the physical characteristic that the internal fluid volume of the hydraulic pump is smaller than that of the pipeline fluid volume, effectively reducing the equation order while retaining the main dynamic characteristics of the model and avoiding the complexity expansion caused by redundant fluid volume parameters. Furthermore, the simplified flow continuity equation accurately describes the instantaneous relationship between the hydraulic pump's output flow rate and the dynamics of the drive speed and outlet pressure through displacement, speed, internal leakage flow rate, and fluid volume effect terms, providing a quantitative basis for subsequent analysis of the impact of motor speed fluctuations on the hydraulic pump's outlet flow rate.

[0056] The outlet pressure equation incorporates liquid resistance and liquid sensing parameters. The steady-state pressure loss caused by internal leakage and the dynamic pressure response caused by flow rate changes were expressed separately. The fluid-sensing term is directly related to the rate of change of motor speed, enabling the model to accurately reflect the influence mechanism of the motor's dynamic response on the hydraulic pump outlet pressure. This lays the load-side theoretical foundation for improving the anti-load disturbance capability in subsequent controller design. Calculation of fluid-sensing parameters. The function expression is:

[0057] In the formula, Indicates liquid sensation. This indicates the flow velocity at the outlet side of the hydraulic pump.

[0058] The simplified flow continuity equation and outlet pressure equation are subjected to Laplace transform to obtain the first transfer function. This step transforms the differential equation in the time domain into an algebraic relationship in the complex frequency domain, enabling the dynamic characteristics of the hydraulic pump's outlet pressure to be jointly analyzed with the motor control system in the form of a transfer function. This facilitates the examination of the influence of different control parameters on the fluctuation of the hydraulic pump's outlet pressure in the frequency domain.

[0059] Analysis of the first transfer function reveals that the transfer function between the outlet pressure and flow rate of the hydraulic pump is a second-order system. The damping ratio and natural frequency of the transfer function are as follows:

[0060]

[0061] In the formula, The damping ratio represents the dynamic characteristics of the hydraulic pump outlet pressure. Indicates the liquid capacity of the pipeline. The natural frequency representing the dynamic characteristics of the hydraulic pump outlet pressure. Indicates liquid resistance.

[0062] Calculate the liquid sensing parameters The functional expression shows that when the hydraulic pump displacement is constant, the hydraulic inductance is inversely proportional to the rate of change of the motor speed. That is, the faster the motor speed response, the smaller the hydraulic inductance. Combining this with the expression for calculating the natural frequency, we know that the natural frequency of the transfer function is directly proportional to the motor speed response. The higher the natural frequency, the smaller the impact of internal leakage in the hydraulic pump on the pump outlet pressure. Therefore, it is necessary to improve the motor's speed response and speed stability to reduce hydraulic pump outlet pressure fluctuations and maintain system stability.

[0063] By analyzing the relationship between the input torque of a hydraulic pump and various types of torque, the torque equation of the hydraulic pump can be obtained. The input torque can be decomposed into constant torque loss independent of rotational speed, losses related to oil viscosity, losses related to turbulence and motion, and load torque related to pressure difference. The loss term related to the square of rotational speed and the load torque term related to pressure difference provide a precise mathematical description of the impact of motor speed fluctuations and sudden load changes on the input torque of the hydraulic pump, enabling the model to simulate the load characteristics of the hydraulic pump under different operating conditions.

[0064] From the torque equation of the hydraulic pump, it can be seen that when the pump displacement, load, and pressure difference between the throttle valve are constant, the output torque of the hydraulic pump is affected by fluctuations in the motor speed. When the motor speed is... At this time, the hydraulic pump output torque is at its minimum, which can be expressed as:

[0065] In the formula, This indicates the minimum output torque of the hydraulic pump.

[0066] Since the response speed of the motor speed is faster than the pressure build-up speed of the hydraulic pump, the response speed of the hydraulic system mainly depends on the flow and pressure build-up speeds. According to the flow continuity equation and torque equation of the hydraulic pump, the robustness of the motor speed should be improved to reduce flow and output torque fluctuations in the hydraulic pump and improve its performance.

[0067] As described above, an equivalent mathematical model of the hydraulic pump, incorporating both flow and torque characteristics, is established based on the flow continuity equation, outlet pressure equation, transfer function, and torque equation. This organically integrates the flow dynamics, pressure dynamics, and torque dynamics of the hydraulic pump, forming a complete load model system. The flow characteristic component of this model can provide feedback to the motor control system on the relationship between load flow demand and outlet pressure fluctuations, while the torque characteristic component can provide feedback to the motor control system on the law of load torque variation with speed and pressure difference. This enables the subsequent simulation system, coupled with the equivalent mathematical model of the hydraulic pump and the open-loop simulation model of the motor, to realistically reflect the reaction force of the hydraulic load on the motor during simulated load abrupt changes and rapid start-stop conditions. This ensures that the control parameter combination verified in this coupled simulation system has high adaptability and control accuracy in actual motor-pump systems.

[0068] Furthermore, the method for establishing an equivalent mathematical model of the motor includes: Establish a set of fundamental equations for permanent magnet brushless DC motors, including electromotive force balance equation, back electromotive force equation, torque balance equation, and electromagnetic torque equation. Based on the established set of fundamental equations, substituting the zero back electromotive force into the electromotive force balance equation yields the starting current equation, whose functional expression is:

[0069] In the formula, This indicates the starting current of the motor. Indicates the power supply voltage. This represents the saturation voltage drop of a power transistor. This represents the average resistance of the armature winding; Based on the starting current equation and the analysis of the influence of the change in the angle between the rotor magnetic field and the armature magnetic field on the electromagnetic torque, the starting characteristics of the starting torque fluctuating with the change of rotor position are determined. Based on the established set of fundamental equations, the variation of armature current with output torque during stable operation is analyzed. Combined with the relationship between input power and output power, the motor efficiency equation is obtained. The functional expression of the motor efficiency equation is:

[0070] In the formula, Indicates the efficiency of the motor. This indicates the input power of the motor. Indicates the output power of the motor. This indicates the total losses of the motor; Based on the analysis of the motor efficiency equation, the operating characteristic of the motor efficiency first increasing and then decreasing with the output torque is determined. Based on the established set of fundamental equations, the relationship between the motor's speed and electromagnetic torque when the applied power supply voltage is constant is analyzed to obtain the mechanical characteristic equation. The functional expression of the mechanical characteristic equation is as follows:

[0071] In the formula, Indicates electromagnetic torque. Indicates the torque coefficient. Represents the average armature current. This represents the equivalent average resistance of the armature winding. Indicates the motor speed. Indicates the back electromotive force coefficient; Based on the analysis of the mechanical characteristic equation and the law of shift of the mechanical characteristic curve when the power supply voltage is changed, the speed regulation characteristic of achieving smooth speed regulation by changing the power supply voltage is determined. Based on the starting current equation and starting characteristics, motor efficiency equation and operating characteristics, as well as mechanical characteristic equation and speed regulation characteristics, a mathematical model of a permanent magnet brushless DC motor is established.

[0072] Through the implementation of the above-described brushless DC motor control parameter optimization method, a fundamental set of equations is established, including the electromotive force balance equation, back electromotive force equation, torque balance equation, and electromagnetic torque equation. This comprehensively describes the dynamic behavior of the permanent magnet brushless DC motor during startup, operation, and speed regulation from both electrical and mechanical dimensions. Specifically, the electromotive force balance equation establishes the instantaneous relationship between power supply voltage, back electromotive force, armature current, and armature resistance; the back electromotive force equation establishes the linear relationship between back electromotive force and speed; the torque balance equation establishes the balance relationship between electromagnetic torque, load torque, frictional torque, and moment of inertia; and the electromagnetic torque equation establishes the proportional relationship between electromagnetic torque and armature current. These four equations are coupled together to form a complete dynamic system description framework, providing a unified mathematical model foundation for subsequent analysis of the motor's characteristic changes under different operating conditions.

[0073] First, the operating characteristics of a permanent magnet brushless DC motor refer to the relationship between various measurable physical quantities outside the motor under conditions such as starting, normal operation, and speed regulation.

[0074] An electric motor is a prime mover that takes in electrical power and outputs mechanical power. Therefore, we are most concerned with its torque and speed, and how these parameters change with input voltage, current, and load. The operating characteristics of an electric motor can be divided into starting characteristics, operating characteristics, mechanical characteristics, and speed regulation characteristics.

[0075] For a permanent magnet brushless DC motor, its electromotive force balance equation is:

[0076] In the formula, Indicates the power supply voltage. This represents the back electromotive force of the armature winding. Represents the average armature current. This represents the equivalent average resistance of the armature winding. This represents the saturation voltage drop of a power transistor; a bridge commutation circuit is typically... .

[0077] Substituting zero back EMF into the electromotive force balance equation yields the starting current equation. The starting current equation directly shows the relationship between the armature current at the instant of starting and the power supply voltage, transistor saturation voltage drop, and armature winding resistance. The armature current at the instant of starting can be several to more than ten times the normal armature current, resulting in a large starting electromagnetic torque, allowing the motor to start quickly and directly under load. As the rotor accelerates, the back EMF E increases, and the electromagnetic torque decreases. During no-load starting, the changes in armature current and speed are as follows: Figure 3 As shown.

[0078] The starting torque of a permanent magnet brushless DC motor depends not only on the starting current but also on the rotor's position relative to the armature windings. The starting torque varies with the rotor's position. In fact, because the magnetic field generated by the armature windings is active, the angle between the rotor's magnetic field and the armature's magnetic field changes with the rotor's position, thus affecting the electromagnetic torque. This variation is much greater than the variation in starting torque caused by changes in brush contact voltage drop and the number of short-circuited elements in a brushed DC motor. Therefore, based on the starting current equation, further analysis of the influence of the changing angle between the rotor's magnetic field and the armature's magnetic field on the electromagnetic torque is needed to determine the starting torque's fluctuating characteristics as the rotor position changes. This analysis reveals a starting torque fluctuation phenomenon that traditional average value models cannot describe: because the relative angle between the rotor's magnetic field and the armature's magnetic field changes with the rotor's position, the electromagnetic torque is not a constant value during starting but exhibits periodic fluctuations. By incorporating this characteristic into the model, the subsequent control system design can anticipate the torque ripple problem that may occur during startup, thereby reserving sufficient adjustment margin in the controller design to avoid startup failure or current surge caused by startup torque fluctuations.

[0079] In permanent magnet brushless DC motors, the operating characteristics mainly include the following relationships: the relationship between armature current and motor efficiency and output torque.

[0080] (1) Relationship between armature current and output torque: Armature current increases with the increase of output torque; (2) The relationship between motor efficiency and output torque.

[0081] This invention embodiment only considers the relationship between the efficiency and output torque of the motor. Based on the established set of fundamental equations, the law governing the change of armature current with output torque during stable operation is analyzed, and the motor efficiency equation is obtained by combining the relationship between input power and output power. The motor efficiency equation expresses efficiency as the ratio of output power to input power, and further transforms it into a relationship between total loss and input power.

[0082] When output torque When there is no output torque, the motor's efficiency is zero. As the output torque increases, the motor's efficiency also increases. The motor's efficiency reaches its maximum when its variable losses equal its constant losses. Subsequently, the efficiency begins to decrease again, such as... Figure 4 As shown.

[0083] Analysis of the motor efficiency equation revealed that the motor's efficiency initially increases and then decreases with increasing output torque. Specifically, as the output torque increases from zero, the efficiency rises until the variable losses equal the constant losses, reaching its maximum value. Afterward, the efficiency decreases with further increases in output torque. This characteristic allows the control system to select the optimal operating point based on actual load conditions, ensuring that the output power meets requirements while operating within the highest efficiency range, thereby improving the overall energy efficiency of the system.

[0084] Mechanical characteristics refer to the relationship between motor speed and electromagnetic torque when the applied power supply voltage is constant.

[0085] Based on the established set of fundamental equations, the mechanical characteristic equation is obtained by analyzing the relationship between the motor speed and electromagnetic torque when the applied power supply voltage is constant. The mechanical characteristic equation, by simultaneously solving the electromotive force balance equation, the back electromotive force equation, and the electromagnetic torque equation, derives the linear relationship between the speed and the electromagnetic torque. The ideal no-load speed is determined by the power supply voltage and the back electromotive force coefficient, while the speed drop is jointly determined by the armature resistance, the torque coefficient, and the back electromotive force coefficient.

[0086] When the effects of changes in power supply voltage U and armature reaction are neglected Since it is a constant, the electromagnetic torque increases linearly as the rotational speed decreases.

[0087] Figure 5 shows the mechanical characteristic curves plotted from the mechanical characteristic equations of a permanent magnet brushless DC motor. From... Figure 5 It can be seen that under a certain DC power supply voltage Under these conditions, the speed naturally decreases as the load torque increases, exhibiting the characteristics of a DC motor. Changing the DC supply voltage can alter the ideal no-load speed point in terms of mechanical characteristics; therefore, voltage regulation is the primary speed control method for permanent magnet brushless DC motors. This can be achieved by adjusting the constant voltage source. This is achieved using PWM (Pulse Width Modulation).

[0088] When the rotational speed is zero, this is the starting electromagnetic torque. When and When the values ​​are equal, the electromagnetic torque is zero, and the speed at this point is the ideal no-load speed. In reality, due to the variable components of motor losses and the influence of armature reaction, the output torque will deviate from a linear change.

[0089] As shown by the mechanical characteristic equation, changing the power supply voltage at the same rotational speed can easily alter the output torque or the rotational speed under the same load. Therefore, permanent magnet brushless DC motors have excellent speed regulation performance and can achieve smooth speed regulation by changing the power supply voltage. However, the power supply voltage of the electronic commutation circuit and other control circuits should remain constant. In summary, the operating characteristics of permanent magnet brushless DC motors are very similar to those of brushed DC motors, exhibiting excellent servo control performance.

[0090] By analyzing the mechanical characteristic equation and understanding the shift in the mechanical characteristic curve when the power supply voltage is changed, a speed regulation characteristic that achieves smooth speed regulation by changing the power supply voltage was determined. That is, when the power supply voltage increases, the ideal no-load speed increases accordingly while the slope of the mechanical characteristic curve remains unchanged. This allows the motor to obtain different steady-state speeds at different voltage levels, and the speed regulation process is continuous and smooth, avoiding the speed shocks caused by abrupt changes in the speed regulation device in traditional speed regulation methods.

[0091] Based on the starting current equation and starting characteristics, the motor efficiency equation and operating characteristics, and the mechanical characteristic equation and speed regulation characteristics, an equivalent mathematical model of the motor is established, such as... Figure 6 As shown, this model provides a unified description of the torque fluctuation characteristics during startup, the efficiency characteristics during steady-state operation, and the speed regulation characteristics during speed regulation, enabling the model to cover the entire operating range of the motor from startup to speed regulation and then to steady-state operation. The startup characteristics provide the model with an accurate description of the electromagnetic dynamics at startup, allowing it to reflect the actual physical processes of startup current surges and startup torque fluctuations. The operating characteristics provide the model with an ability to describe the energy efficiency changes under varying load conditions, enabling it to accurately predict the motor loss distribution corresponding to different output torques. The speed regulation characteristics provide the model with an ability to describe the speed change patterns during voltage regulation and speed control, enabling it to accurately simulate the impact of power supply voltage changes on speed and torque.

[0092] An open-loop simulation model of the motor is constructed based on the equivalent mathematical model of the motor. This simulation model can accurately reflect the dynamic response of the motor under different operating conditions when it is used for parameter identification. This ensures that the back electromotive force coefficient, torque coefficient and moment of inertia obtained by identification have high physical accuracy and adaptability to operating conditions.

[0093] Furthermore, an open-loop simulation model of the motor is run to obtain simulation data under different operating conditions, and parameter identification is performed on the simulation data based on the equivalent mathematical model of the motor, including: Run the open-loop simulation model of the motor to obtain the steady-state speed and corresponding power supply voltage under no-load steady-state conditions, as well as the armature current and corresponding stator resistance under load conditions. Based on the obtained no-load steady-state speed and power supply voltage values, the relationship between steady-state speed and back EMF coefficient is established using the final value theorem, and the preliminary identification value of the back EMF coefficient is calculated. Based on the established back electromotive force equation and electromotive force balance equation, and combined with the obtained armature current and stator resistance values, the initial identification value of the back electromotive force coefficient is corrected to obtain the corrected back electromotive force coefficient. The functional expression of the corrected back electromotive force coefficient is as follows:

[0094] In the formula, This represents the corrected back electromotive force coefficient. Indicates armature current, Indicates steady-state speed. Indicates the stator line resistance; Run the open-loop simulation model of the motor to obtain the armature current value and the corresponding load torque value under steady-state load conditions. Substitute the obtained armature current value and load torque value into the established electromagnetic torque equation to calculate the torque coefficient. The functional expression for calculating the torque coefficient is as follows:

[0095] In the formula, The torque coefficient indicating identification. Indicates electromagnetic torque. Indicates load torque; Run the open-loop simulation model of the motor to obtain the speed response data during the motor acceleration process, as well as the corresponding electromagnetic torque value and load torque value; The acquired speed response data is processed using the finite difference method to obtain the speed change rate. Substituting the speed change rate, the acquired electromagnetic torque value, and the load torque value into the established torque balance equation, a preliminary identification value of the moment of inertia is calculated. The functional expression for calculating the moment of inertia is:

[0096] In the formula, The moment of inertia representing the identification. Indicates the rate of change of rotational speed; Substitute the acquired speed response data into the established torque balance equation, use the differential calculation method to analyze the relationship between the speed change rate and the electromagnetic torque, and calculate the identification value of the moment of inertia. A sawtooth wave voltage was used as the input to run the open-loop simulation model of the motor to lengthen the acceleration process and obtain speed response data for multiple acceleration steps, as well as the corresponding electromagnetic torque value and load torque value. Based on the rotational speed response data of multiple acceleration steps, as well as the corresponding electromagnetic torque and load torque values, the final moment of inertia is obtained by recalculating and averaging through the torque balance equation.

[0097] Based on the implementation of the above-described brushless DC motor control parameter optimization method, the comparison table of motor experimental data is as follows: Table 1. 28V No-load State

[0098] Table 2. 28V load = 0 N * m

[0099] Table 3. 28V load = 0.1N*m

[0100] Table 4. 28V load = 0.15N*m

[0101] (1) The open-loop simulation model of the motor is used to obtain the steady-state speed and corresponding power supply voltage under no-load steady-state conditions, as well as the armature current and corresponding stator resistance under load conditions. This data acquisition strategy first utilizes the characteristic that the armature current is zero or approximately zero under no-load conditions, so that the preliminary identification of the back EMF coefficient can avoid the interference of the armature resistance voltage drop and directly establish the algebraic relationship between the power supply voltage and the steady-state speed. The relationship between the steady-state speed and the back EMF coefficient is established by using the final value theorem, and the preliminary identification value of the back EMF coefficient is calculated. The application of the final value theorem cleverly transforms the steady-state response in the time domain into the limit calculation in the complex frequency domain, so that the identification process can directly use the steady-state final value without fitting the complete dynamic response curve, which simplifies the calculation complexity and improves the stability of the identification results.

[0102] In this process, the initial identified back EMF coefficient is corrected based on the established back EMF equation and EMF balance equation, combined with the obtained armature current and stator resistance values, to obtain the corrected back EMF coefficient. This correction step introduces the armature current and stator resistance terms from actual operation into the EMF balance equation, and re-incorporates the voltage drop across the resistance neglected under no-load conditions into the calculation. This ensures that the identification results accurately reflect the true back EMF characteristics of the motor under load conditions, avoids identification deviations caused by current differences between no-load and load conditions, and guarantees the reliable accuracy of the identified back EMF coefficient across different load ranges.

[0103] Comparing Table 1, the actual motor model and the simplified motor model are most similar; therefore, the theoretical derivation is based on the simplified model. When the load is 0, the motor model, according to the final value theorem, yields:

[0104] In the formula, The time-domain function representing the motor speed. The Laplace transform representing the motor speed, Represents the Laplace operator. Represents the moment of inertia. This represents the electromagnetic time constant of the armature circuit. Represents the back electromotive force coefficient. Indicates the torque coefficient. Represents the back electromotive force coefficient. Indicates the power supply voltage. This represents the saturation voltage drop of a power transistor.

[0105] Therefore, a simplified motor model is obtained:

[0106] This result matches the simulation settings, thus proving the correctness of the theory.

[0107] This leads to the derivation of the actual motor model.

[0108] However, in actual motor models, there are currents and stator line resistances. Therefore, according to the definition of back electromotive force, we get:

[0109] The back electromotive force obtained by this method The percentage error between the value provided by the motor manufacturer and the actual value is:

[0110] In the formula, Table of numerical error.

[0111] (2) The armature current and corresponding load torque under steady-state load conditions are obtained by running an open-loop simulation model of the motor. The obtained armature current and load torque values ​​are then substituted into the established electromagnetic torque equation to calculate the torque coefficient. This process utilizes the physical principle of electromagnetic torque and load torque balance under steady-state conditions, directly solving for the torque coefficient through the ratio of load torque to armature current. This avoids the complex sensor arrangement required for measuring electromagnetic torque itself, and only the easily measurable load torque and armature current are needed to complete the identification, significantly reducing the dependence of parameter identification on hardware measurement conditions. The method of using load torque to replace electromagnetic torque in the electromagnetic torque equation has strict physical equivalence under steady-state conditions, ensuring that the identification results maintain both theoretical rigor and engineering feasibility.

[0112] Verify the electromagnetic torque equation based on data from the open-loop simulation model of the motor:

[0113] Number of simulation parameter settings error:

[0114] Taking into account friction factors and static friction factors, the correctness of the electromagnetic torque equation can be proven.

[0115] Furthermore, the torque coefficient of the motor is obtained based on the actual data in Table 3.

[0116] The percentage error between the back electromotive force obtained by this method and the value provided by the motor manufacturer is:

[0117] (3) The open-loop simulation model of the motor is used to obtain the speed response data during the acceleration process, as well as the corresponding electromagnetic torque value and load torque value. This data acquisition strategy is designed to meet the dynamic characteristics requirements of moment of inertia identification and collects transient process data containing information on the rate of change of speed. The acquired speed response data is processed using the differential method to obtain the rate of change of speed. The rate of change of speed, the acquired electromagnetic torque value, and the load torque value are substituted into the established torque balance equation to calculate the preliminary identification value of the moment of inertia.

[0118] The finite difference method transforms the discretely sampled speed sequence into a speed change rate sequence, quantifying the inertial effect previously hidden in the speed change process and providing a direct numerical basis for calculating the moment of inertia. Substituting the acquired speed response data into the established torque balance equation, the relationship between the speed change rate and electromagnetic torque is analyzed using the finite difference method to calculate the identified value of the moment of inertia. This step further strengthens the physical connection between the dynamic response data and the inertial parameters, ensuring that the identification result directly derives from the inertial characteristics exhibited by the motor during acceleration, thus guaranteeing that the identified value accurately reflects the actual inertial effect of the rotating components during the dynamic process.

[0119] The correctness of the torque balance equation was verified based on simulation data from the open-loop simulation model of the motor.

[0120] Calculations are performed using the difference formula:

[0121] This result is consistent with the simulation parameter settings. The error is:

[0122] This result is consistent with the simulation settings (within the error range), thus proving the correctness of the torque balance equation.

[0123] Next, the moment of inertia of the actual motor will be calculated using experimental data. .

[0124] First, calculate the no-load state. Three sets of data were obtained.

[0125]

[0126]

[0127] Take the average value:

[0128] Next, we calculate the moment of inertia of the motor when it is under load but with zero load. :

[0129]

[0130]

[0131] Take the average value:

[0132] Next, calculate the moment of inertia of the motor when it is under load and the load is 0.1 N*m. :

[0133]

[0134]

[0135] Take the average value:

[0136] Next, calculate the moment of inertia of the motor when it is under load and the load is 0.15 N*m. :

[0137]

[0138]

[0139] Take the average value:

[0140] Next, calculate the moment of inertia with a motor load of 0.20 N*m. :

[0141]

[0142]

[0143] Take the average value:

[0144] Based on the above data, the parameter identification for back electromotive force and torque coefficient has been completed, and the actual error is relatively small. Since the motor reaches a steady state in approximately 10 steps, the available data is limited, leading to a larger calculation error. The moment of inertia under no-load conditions is smaller than the given motor parameters. The moment of inertia under load conditions does not change and is independent of the load magnitude.

[0145] As mentioned above, to address the issue of limited data volume, it is desirable to extend the motor's acceleration process to obtain more data. This would allow for the reduction of interference errors through mean filtering and the advantage of abundant data. Therefore, this embodiment of the invention also addresses the problem of rotational inertia calculation errors caused by the limited number of data sampling points during acceleration. It employs a sawtooth wave voltage as input to run the motor's open-loop simulation model to extend the acceleration process and acquire speed response data for multiple acceleration steps, along with the corresponding electromagnetic torque and load torque values. The use of sawtooth wave voltage, by replacing the traditional step voltage input with a gradually changing voltage input, extends the transition process from stationary to steady state of the motor from several steps to more than ten steps. This lengthens the acceleration interval on the time axis, thereby obtaining more speed response data for more steps under equal time interval sampling conditions. This effectively increases the number of data points used for differential calculation and significantly reduces differential errors caused by data sparsity.

[0146] Furthermore, based on the rotational speed response data from multiple acceleration steps, along with the corresponding electromagnetic torque and load torque values, the final moment of inertia is obtained by recalculating using the torque balance equation and averaging the results. This processing method utilizes multi-step data to perform multiple independent calculations on the same physical parameter, and eliminates the influence of random interference and discretization errors through mean filtering, making the final identified moment of inertia statistically closer to the true value, significantly improving the repeatability and stability of the identification results. The combined strategy of sawtooth wave voltage elongation acceleration process and multi-step mean calculation synergistically improves the accuracy of moment of inertia identification from both data acquisition density and data post-processing perspectives, providing a reliable inertial parameter basis for subsequent controller design.

[0147] Furthermore, methods for constructing improved PID controllers, establishing time-domain mathematical models, and deriving closed-loop transfer functions include: An improved PID controller is constructed by connecting a first-order inertial low-pass filter in parallel with the derivative or output channel of the original PID controller. The transfer function expression of the improved PID controller is as follows:

[0148]

[0149] In the formula, This represents the Laplace transform of the controller output signal based on the improved differential channel. This represents the Laplace transform of the controller output signal based on the improved output channel. Represents the Laplace operator. This represents the proportional gain of the improved PID controller. Represents the integration time constant. Represents the differential time constant. This represents the time constant of the first-order inertial low-pass filter. The Laplace transform of the error signal between the desired speed and the actual speed; Based on the improved PID controller, and combined with the identified back EMF coefficient, torque coefficient, and moment of inertia, a time-domain mathematical model of the permanent magnet brushless DC motor under uncontrolled conditions is constructed. The functional expression of the time-domain mathematical model is as follows:

[0150] In the formula, This represents the back electromotive force of the armature winding. Represents the back electromotive force coefficient. Indicates the motor speed. Indicates electromagnetic torque. Indicates the torque coefficient. Indicates armature current, This represents the derivative of the armature current with respect to time. This represents the electromagnetic time constant of the armature circuit. Indicates the armature circuit amplification factor. Indicates the power supply voltage. This represents the saturation voltage drop of a power transistor. Represents the moment of inertia. This represents the derivative of the motor speed with respect to time. Indicates load torque; Define a generalized control quantity, and obtain the second transfer function from the generalized control quantity to the electromagnetic torque, and the third transfer function from the electromagnetic torque to the rotational speed from the time-domain mathematical model. The functional expressions of the second and third transfer functions are as follows:

[0151]

[0152] In the formula, This represents the second transfer function. Indicates the third transfer function; Set the desired speed, define the error speed based on the difference between the set desired speed and the actual speed, and obtain the fourth transfer function of the improved PID controller in the feedback loop based on the defined error speed. The function expression of the fourth transfer function is as follows:

[0153] In the formula, This represents the fourth transfer function. This represents the derivative coefficient of the improved PID controller. This represents the integral coefficient of the improved PID controller; Based on the second, third, and fourth transfer functions, and combined with the set desired speed and the load torque in the time-domain mathematical model, the fifth transfer function of the error speed in the complex frequency domain is derived. The functional expression of the fifth transfer function is as follows:

[0154] In the formula, This represents the Laplace transform of the rotational speed with defined error. The Laplace transform of the load torque, Represents the Laplace transform of the desired rotational speed; Based on the fifth transfer function, a first response transfer function of the error speed with respect to the load torque and a second response transfer function of the error speed with respect to the desired speed are established. Then, based on the first and second response transfer functions, a closed-loop transfer function containing unknown differential coefficients, unknown integral coefficients, and unknown proportional coefficients is constructed. The expression of the closed-loop transfer function is as follows:

[0155] In the formula, This represents the closed-loop transfer function.

[0156] By implementing the above-described brushless DC motor control parameter optimization method, an improved PID controller is constructed by connecting a first-order inertial low-pass filter in parallel with the derivative channel or output channel of the traditional PID controller. This structural improvement is achieved by introducing a first-order inertial low-pass filter into the derivative channel or output terminal. This effectively attenuates high-frequency noise signals before they enter the differentiator or are output by the controller, avoiding the problem of high-frequency oscillation of control quantities caused by the excessive sensitivity of traditional PID controllers to measurement noise due to the derivative action.

[0157] The improved PID controller transfer function employs two optional structures, such as... Figure 7 Figures a) and b) are shown in the table. Figure 7 Figure a) shows that the structure based on the differential channel only filters the differential term, while retaining the fast response characteristics of the proportional and integral terms. Figure 7Figure b) shows a structure based on an improved output channel that filters the entire controller output, suppressing high-frequency interference while smoothing changes in the control output. Both structures can be optimized based on the noise spectrum characteristics and actuator response capabilities of the actual system, providing flexible design options for engineering applications.

[0158] Based on an improved PID controller, and combined with the identified back EMF coefficient, torque coefficient, and moment of inertia, a time-domain mathematical model of a permanent magnet brushless DC motor under uncontrolled conditions is constructed. This model comprehensively describes the dynamic coupling relationship between armature current, electromagnetic torque, and speed under voltage input through four equations: the back EMF equation, the electromagnetic torque equation, the armature circuit dynamic equation, and the torque balance equation. The armature circuit dynamic equation introduces the armature circuit electromagnetic time constant, reflecting the inertial effect of armature inductance on current changes; the torque balance equation introduces the moment of inertia, reflecting the inertial effect of the mechanical system on speed changes. The introduction of these two time constants enables the model to accurately describe the transient response characteristics of the motor during starting, speed regulation, and load disturbance processes, providing an accurate physical parameter basis for subsequent frequency domain analysis and pole placement.

[0159] Define generalized control quantity Furthermore, a second transfer function from the generalized control quantity to the electromagnetic torque and a third transfer function from the electromagnetic torque to the rotational speed are derived from the time-domain mathematical model. The second transfer function combines the armature circuit dynamic equations with the electromagnetic torque equations, unifying the electromagnetic inertia effect and torque coefficient of the armature circuit into a first-order inertial element form, allowing the response characteristics of the electromagnetic torque to the generalized control quantity to be described by a simple transfer function. The third transfer function performs a Laplace transform on the torque balance equations, expressing the integral effect of rotational inertia into an integral element form, allowing the response characteristics of the rotational speed to the electromagnetic torque to be described by a pure integral form. The establishment of these two transfer functions transforms the differential equations in the time domain into algebraic relations in the complex frequency domain, providing a concise mathematical model for subsequent closed-loop system analysis.

[0160] A desired speed is set, and an error speed is defined based on the difference between the set desired speed and the actual speed. The fourth transfer function of the improved PID controller in the feedback loop is then obtained based on this defined error speed. The fourth transfer function employs a parallel structure of proportional, integral, and derivative terms, and uses a negative sign to reflect the polarity relationship between the error speed and the controller output in the feedback loop, establishing a clear algebraic relationship between the controller output and the error speed. This expression is mathematically equivalent to the two transfer function structures of the improved PID controller, but is presented in the form of a feedback loop, facilitating parallel combination with the second and third transfer functions.

[0161] Based on the second, third, and fourth transfer functions, and combined with the set desired speed and the load torque in the time-domain mathematical model, the fifth transfer function of the error speed in the complex frequency domain is derived. The fifth transfer function expresses the error speed as a linear combination of the desired speed and the load torque, where the first term reflects the influence of the load torque on the error speed, and the second term reflects the influence of the desired speed on the error speed. This expression reveals the superposition characteristics of the system response under dual inputs, providing a theoretical basis for subsequent analysis of load disturbance suppression capability and command tracking capability.

[0162] A closed-loop transfer function is constructed, incorporating unknown differential coefficients, unknown integral coefficients, and unknown proportional coefficients. This closed-loop transfer function integrates the physical parameters from the second, third, and fourth transfer functions with the unknown controller parameters, forming a cubic characteristic polynomial with characteristic parameters including moment of inertia, armature loop electromagnetic time constant, armature loop gain, torque coefficient, and unknown controller coefficients. The establishment of this characteristic polynomial allows for direct design of the closed-loop system's dynamic characteristics in the frequency domain through pole placement. By configuring the roots of the characteristic polynomial, the system's natural frequency, damping ratio, and convergence time can be determined simultaneously, avoiding the tedious process of repeated trial and error in the time domain. The construction of the closed-loop transfer function closely integrates controller parameter design with the system's physical characteristics, enabling the pole placement method to perform accurate calculations based on precise physical parameters. This lays the theoretical foundation for obtaining initial controller parameter values ​​that match the system's dynamic requirements.

[0163] Furthermore, methods for determining the desired system response order, configuring closed-loop poles, and inversely calculating unknown control parameters include: If suppressing overshoot and oscillation is the priority control objective, the expected response order of the system is determined to be dominated by the first-order system. Alternatively, if improving response speed is the primary control objective, the expected response order of the system is determined to be dominated by a second-order system. When it is determined that the first-order system is dominant, a closed-loop control system consisting of four first-order systems connected in parallel is configured, and the corresponding closed-loop pole parameters are configured to obtain the first desired transfer function. The function expression of the first desired transfer function is:

[0164] In the formula, Denotes the first expected transfer function. , , , These represent the gain coefficients of each first-order system. , , , The pole parameters of each first-order system; When the system is determined to be a second-order system, a closed-loop control system consisting of one second-order system and two first-order systems connected in parallel is configured, and the corresponding closed-loop pole parameters are configured to obtain the second desired transfer function. The expression of the second desired transfer function is as follows:

[0165] In the formula, Denotes the second expected transfer function. Denotes the coefficients of the first-order term in a second-order system. Denotes the coefficients of the constant term in a second-order system. , , These represent the gain coefficients of each system. , The pole parameters of the two first-order systems respectively; After finding a common denominator for either the first or second expected transfer function, the corresponding expected characteristic polynomial is obtained. The coefficient correspondence between the expected characteristic polynomial and the closed-loop transfer function is established, and the unknown differential coefficients, integral coefficients, and proportional coefficients are obtained by solving the problem.

[0166] Through the implementation of the above-described brushless DC motor control parameter optimization method, firstly, the desired system response order is determined according to the preset control performance target: when there are strict limitations on the system overshoot, a smooth and oscillating response is required, and a relatively long settling time is acceptable, the desired system response order is determined to be first-order dominant; when a faster system response speed is desired and a certain amount of overshoot and slight oscillations are tolerable, the desired system response order is determined to be second-order dominant. This determination mechanism allows the dynamic response mode of the control system to be flexibly configured according to actual application requirements, avoiding the contradiction that a single response mode cannot simultaneously achieve both stability and speed under different operating conditions.

[0167] When the system is determined to be a first-order dominant system, the first expected transfer function is expressed as a superposition of four first-order components in parallel. The characteristic polynomial formed after finding a common denominator has four negative real poles, making the response of the closed-loop control system entirely determined by the position of the real poles. Under a step input, the system output exhibits a monotonically increasing characteristic with no overshoot. The gain coefficients of each parallel branch can be allocated according to the contribution of each pole to the output response. By arranging the poles in a multiplicative increasing sequence, the response shape can be further optimized. The convergence speed is dominated by the pole closest to the imaginary axis, ensuring the fastest possible response speed without overshoot. This parallel structure has strong zero-point configuration capability, allowing independent adjustment of the response weights of each mode without changing the pole positions, providing greater design freedom for optimizing the response speed without overshoot constraints.

[0168] When the system is determined to be dominated by a second-order system, the second expected transfer function is expressed as a superposition of a second-order element and two first-order elements in parallel. The characteristic polynomial formed after finding a common denominator contains a pair of conjugate complex poles and two negative real poles. The real part of the conjugate complex poles determines the oscillation frequency and damping ratio of the system response, while the imaginary part determines the natural frequency of the system response. By adjusting the ratio of the real to the imaginary parts, the trade-off between overshoot and response speed can be precisely controlled. The two negative real poles are used to further optimize the steady-state convergence speed, and their positions can be independently configured according to the adjustment time constraint. The parallel structure allows the response components of the second-order and first-order elements to be superimposed. The second-order element provides the main dynamic response characteristics, while the first-order element is used to compensate for steady-state errors and optimize the convergence process. This combination allows the system to achieve a faster rise time and settling time than a pure first-order system at the cost of controllable overshoot during the response process.

[0169] By finding a common denominator for either the first or second desired transfer function, the corresponding desired characteristic polynomial is obtained. A coefficient correspondence is established between the desired characteristic polynomial and the closed-loop transfer function. Solving this system yields the unknown differential, integral, and proportional coefficients. This process transforms the desired dynamic response index in the time domain into the location of the desired poles in the complex frequency domain. Then, through the strict algebraic relationship of equal coefficients in the characteristic polynomial, the theoretical values ​​of the controller parameters are deduced. This allows the improved PID controller to possess initial performance matching the system's physical characteristics before intelligent optimization. Essentially, the coefficient correspondence between the desired characteristic polynomial and the closed-loop transfer function involves establishing a system of equations between the coefficients of the characteristic equation determined by the desired pole placement and the coefficients of the characteristic polynomial, which includes physical parameters and unknown controller parameters. Solving this system of linear equations uniquely determines the differential, integral, and proportional coefficients.

[0170] As mentioned above: (1) When it is determined that the first-order system is dominant, in order to avoid overshoot and vibration caused by the second-order system, the control system can be designed to consist of four first-order systems. Therefore, the control system can be decomposed into:

[0171]

[0172] The resulting correspondence is as follows:

[0173] Based on the requirement that the first-order system is dominant, the pole distribution is configured as follows: Figure 8 As shown, to further consider the constraints of convergence time and the dominance of the first-order system in control, the pole parameter relationship should satisfy: After determining the location of the pole, work backwards. (Improving the proportional gain of the PID controller) (Improving the integral coefficient of the PID controller) (Improving the derivative coefficients of the PID controller) (Improve another coefficient related to integral or filtering in the PID controller).

[0174] The design pole parameters are as follows: Substituting into the above correspondence formula, we get:

[0175] Based on the control parameters derived above, they are substituted into the open-loop simulation model of the motor for verification, such as... Figure 9 and Figure 10 As shown. According to Figure 9 The actual rotational speed can be tracked by the desired rotational speed, with a convergence time of 23ms, overshoot of 0, and steady-state error of 100 r / min. Figure 10 It can be seen that the error curve satisfies the step response curve of a first-order system, which is consistent with the theoretical design.

[0176] (2) When it is determined that the second-order system is dominant, the control system can be designed to consist of one second-order system and two first-order systems. Therefore, the control system can be decomposed into:

[0177]

[0178] The resulting correspondence is as follows:

[0179] Based on the requirement of a second-order system as the primary system, the pole distribution is configured as follows: Figure 11 As shown, to further consider the convergence time constraint and the dominance of the second-order system in control, the pole parameter relationship should satisfy: After determining the location of the pole, the derivation can be done by working backwards. , , , Then calculate , , , .

[0180] The design pole parameters are as follows: ,get Substituting these values ​​into the above correspondence formula, we get:

[0181] In summary, a dual PID control loop can be constructed. This theoretical parameter calculation method based on pole placement avoids the blindness and experience dependence of traditional PID parameter manual trial and error from the outset, enabling the initial values ​​of the controller parameters to achieve a theoretically optimal balance between response speed and disturbance rejection capability. This provides a high-quality initial population for subsequent intelligent optimization, significantly improving the convergence speed of global optimization and the final control performance.

[0182] Furthermore, global optimization is performed on all control parameters of the dual PID control loop, including: Use all the differential coefficients, integral coefficients and proportional coefficients obtained from the solution as the initial population, and set the number of particles, the maximum number of iterations, the initial velocity of the particles and their positions; The convergence time, overshoot, and steady-state error of the motor speed response are used as dynamic performance indicators to construct a fitness function, and the fitness value is calculated for each particle in the initial population. Based on the calculated fitness values, update the individual optimal position of each particle and the global optimal position of the entire population, and update the particle's velocity and position based on the update results. The inertial weights and learning factors during the particle velocity and position update process are dynamically adjusted, while the particle velocity is limited until the maximum number of iterations is reached, and the combination of control parameters corresponding to the global optimal position is output.

[0183] By implementing the above embodiment of the brushless DC motor control parameter optimization method, all the solved differential coefficients, integral coefficients, and proportional coefficients are used as the initial population, and the number of particles, the maximum number of iterations, the initial velocity of the particles, and their positions are set. This initialization strategy allows the particle swarm optimization algorithm to begin searching in the near-optimal region of the solution space, avoiding blind exploration and invalid iterations caused by random initialization, significantly shortening the number of iterations required for the algorithm to converge to the global optimum. Furthermore, since the initial population itself already possesses excellent performance matching the physical characteristics of the system, even with a limited number of iterations, a combination of control parameters that meets engineering requirements can be obtained.

[0184] A fitness function is constructed using the convergence time, overshoot, and steady-state error of the motor speed response as dynamic performance indicators. The fitness value is calculated for each particle in the initial population. The fitness function comprehensively quantifies these three core dynamic performance indicators: convergence time reflects the system's response speed, overshoot reflects the system's relative stability, and steady-state error reflects the system's control accuracy. Together, these three constitute a complete evaluation system for the dynamic performance of the dual-PID control loop, enabling the optimization process to simultaneously consider response speed, stability, and accuracy. The individual optimal position of each particle and the global optimal position of the entire population are updated based on the calculated fitness values. The particle's velocity and position are also updated based on the updated results. This mechanism allows particles to simultaneously reference their own historical optimal experience and the optimal experience of the social group while flying in the solution space, guiding the population towards the global optimal solution through the synergy of individual and social cognition.

[0185] The inertia weight and learning factor are dynamically adjusted during particle velocity and position updates, while particle velocity is constrained. The dynamic adjustment of the inertia weight uses a larger value in the early stages of iteration to enhance global exploration capabilities, and gradually decreases the inertia weight as iterations progress to strengthen local exploration capabilities. The dynamic adjustment of the learning factor ensures an appropriate balance between individual and social learning factors during iteration, preventing particles from over-relying on their own experience or excessively following group experience, thus avoiding getting trapped in local optima. Velocity constraints prevent "explosive" jumps in the solution space by setting a velocity upper limit, keeping the search process stable.

[0186] The algorithm outputs the combination of control parameters corresponding to the globally optimal position when the maximum number of iterations is reached. This termination condition ensures that the algorithm completes optimization within limited computational resources, and the reasonable setting of the maximum number of iterations ensures that the optimization results converge sufficiently. Based on the combined strategy of initial population and dynamic parameter adjustment, the particle swarm optimization algorithm inherits the excellent initial solution provided by the pole placement method during the optimization process, and further explores the optimization potential of the parameter space through multi-objective fitness evaluation and dynamic parameter adjustment. The final combination of control parameters is superior to the initial theoretical parameters in terms of convergence time, overshoot, and steady-state error, achieving an organic integration of theoretical optimality and computationally intelligent optimization.

[0187] As mentioned above, when applying the Particle Swarm Optimization (PSO) algorithm to optimize motor control parameters, considering different optimization metric strategies is crucial. Specifically, this section considers optimizing the convergence time and oscillation amplitude of motor speed as the primary optimization metrics to improve optimization performance. The following section elaborates on how to adjust the PSO algorithm using different metric optimization strategies to better address the motor control parameter optimization problem.

[0188] The following is the basic update formula for the particle swarm optimization algorithm:

[0189]

[0190] in Let be the velocity of particle i at time t. Let be the position of particle i at time t. Let i be the optimal position for particle i. For the best position globally, , A random number belonging to the range [0,1]. , Individual learning factors and social learning factors, This is the inertial weight.

[0191] Among these, convergence time is used as the optimization metric. To achieve the goal of minimizing convergence time, the following strategies can be adopted: (1) Adjusting the inertia weight: Inertia weight In particle swarm optimization (PSO), controlling the velocity update of particles is a key factor affecting exploration and convergence capabilities. The magnitude of the inertia weight directly influences the behavior of the particle swarm.

[0192] When the particle swarm is initially established, a large inertia weight is used (e.g., This helps increase the search range of particles, thus avoiding getting trapped in local optima. Larger inertia weights make particles more inclined to explore the solution space, enhancing global search capabilities.

[0193] In the later stages, the inertia weight is gradually reduced: as the iteration progresses, the inertia weight is gradually reduced. T is the total number of iterations, and t is the current iteration step. (This refers to the inertia weight at termination). This reduces the particle velocity, causing particles to concentrate more near the current optimal solution, thereby accelerating the convergence process and avoiding overexpansion of the search.

[0194] (2) Selecting appropriate learning factors: learning factors ( , The weights of individual learning and social learning during particle updates are determined, directly affecting the efficiency and convergence speed of the search.

[0195] Individual learning factor ( ): This is usually set to a small value (e.g., 1.5) to encourage particles to self-adjust and avoid over-reliance on local information.

[0196] Social learning factor ( ): It is usually set to a large value (e.g., 2.0) to encourage particles to approach the global optimum and avoid getting trapped in local optima.

[0197] (3) Adaptive velocity constraint: The velocity constraint of particles is the key to controlling the range of particle motion. If the particle velocity is too high, it may lead to search instability or even "explosive growth", thus affecting convergence. In order to ensure that the particle velocity is always within a reasonable range, constraints can be dynamically applied when updating the velocity. For example, the velocity constraint can be adjusted according to the scale of the current solution space to keep the particles searching within a suitable range.

[0198]

[0199] in Limit the speed to Within the specified range, avoid excessive speed that could lead to search instability.

[0200] Secondly, using oscillation amplitude as an optimization indicator, the following strategies can be adopted: (1) Smooth fitness function: The fitness function is used to evaluate the quality of particles. In the problem of motor control parameter optimization, if the fitness function is too sensitive to small changes in controller parameters, it may cause the particles to "jump" frequently in the solution space, causing oscillations. A smooth fitness function can be used, such as by introducing a regularization term to reduce the sensitivity to excessive fluctuations in error, so as to avoid the algorithm overreacting to small parameter changes and reduce oscillations.

[0201]

[0202] in For regularization terms, For error terms, The weights control the impact of error. This regularization term helps smooth the fitness function and avoid overreaction caused by error.

[0203] (2) Dynamically adjusting the learning factor: the learning factor of the particle ( , The learning factor controls the ratio of individual to social learning. When the solution space is close to the optimal solution, an excessively high learning factor may cause particles to over-search, leading to oscillations. During the optimization process, as particles approach the optimal solution, the learning factor is gradually reduced. , This reduces particle oscillations in the solution space. Especially for particles close to the optimal solution, reducing the learning factor can limit over-searching and enhance solution stability.

[0204]

[0205]

[0206] in, It is the lower limit of the learning factor regulation. It is the total number of iterations. This is the current iteration step.

[0207] Preferably, to comprehensively evaluate the performance of the Particle Swarm Optimization (PSO) algorithm in motor control parameter optimization, the performance of the control system can be measured using several key performance indicators. These indicators include convergence time, steady-state error, overshoot, algorithm stability, and oscillation frequency, each describing the system's response characteristics from different perspectives. Each indicator is described in detail below, and how they reflect the performance of the motor control system is discussed. Evaluating these indicators provides a comprehensive understanding of the PSO algorithm's performance in motor control parameter optimization. Different optimization strategies can optimize convergence time, steady-state error, overshoot, and oscillation frequency by adjusting parameters such as inertia weights, learning factors, and speed limits. By comprehensively considering these indicators, the motor control system can achieve its objectives while maintaining good stability, response speed, and accuracy.

[0208] Therefore, in this embodiment of the invention, when applying the particle swarm optimization (PSO) algorithm to motor control parameter optimization, considering different optimization index strategies is crucial. Specifically, this embodiment considers optimizing the convergence time and oscillation amplitude of motor speed as the main optimization indexes to improve the optimization effect. The following details how to adjust the PSO algorithm using different index optimization strategies to better solve the motor control parameter optimization problem.

[0209] This invention also discloses an optimization system that employs the above-described brushless DC motor control parameter optimization method. The optimization system includes: The model building module is used to build the equivalent mathematical model of the hydraulic pump and the equivalent mathematical model of the permanent magnet brushless DC motor, and to build the open-loop simulation model of the motor based on the equivalent mathematical model of the motor. The parameter identification module is used to run the open-loop simulation model of the motor to obtain simulation data under different operating conditions, and to identify the parameters of the simulation data based on the equivalent mathematical model of the motor, thereby obtaining the back electromotive force coefficient, torque coefficient and moment of inertia respectively. The closed-loop function establishment module introduces a first-order inertial low-pass filter to construct an improved PID controller. Combining the identified back EMF coefficient, torque coefficient, and moment of inertia, a time-domain mathematical model of the permanent magnet brushless DC motor is established, and the closed-loop transfer function containing unknown control parameters is derived from the time-domain mathematical model. The control configuration module is used to determine the desired system response order of the closed-loop control system based on the derived closed-loop transfer function, and configure the corresponding closed-loop poles according to the determined desired system response order, and back-calculate the unknown control parameters through the pole placement method. The control loop establishment module is used to substitute the unknown control parameters obtained by back-reasoning into the improved PID controller and combine it with the current loop controller to construct a dual PID control loop. The parameter optimization module is used to use the unknown control parameters obtained by back-reasoning as the initial population, construct a fitness function with the dynamic performance index of motor speed response, and perform global optimization on all control parameters of the dual PID control loop to obtain the optimal combination of control parameters. The parameter verification module is used to sequentially substitute the optimized control parameter combination into the dual PID control loop and the simulation system coupled by the equivalent mathematical model of the liquid pump and the open-loop simulation model of the motor, and obtain the verified optimal control parameter combination by simulating load change and rapid start-stop conditions.

[0210] The present invention also discloses an electronic device, including a memory and a processor, wherein the memory stores a computer program, characterized in that the processor executes the computer program to implement the steps of the above-described method for optimizing control parameters of a brushless DC motor.

[0211] This invention is described based on flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to specific embodiments. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, generate instructions for implementing the flowcharts and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0212] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0213] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0214] It should be understood that the above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit them. Those skilled in the art can modify the technical solutions described in the above embodiments, or make equivalent substitutions for some of the technical features; and all such modifications and substitutions should fall within the protection scope of the present invention.

Claims

1. A method for optimizing control parameters of a brushless DC motor, characterized in that, The method for optimizing the control parameters of the brushless DC motor includes: Establish an equivalent mathematical model of the hydraulic pump and an equivalent mathematical model of the permanent magnet brushless DC motor, and construct an open-loop simulation model of the motor based on the equivalent mathematical model of the motor. Run the open-loop simulation model of the motor to obtain simulation data under different operating conditions, and perform parameter identification on the simulation data based on the equivalent mathematical model of the motor to obtain the back electromotive force coefficient, torque coefficient and moment of inertia respectively. An improved PID controller is constructed by introducing a first-order inertial low-pass filter. A time-domain mathematical model of a permanent magnet brushless DC motor is established by combining the identified back electromotive force coefficient, torque coefficient and moment of inertia. A closed-loop transfer function containing unknown control parameters is derived from the time-domain mathematical model. Based on the preset control performance target, the expected order of the system response based on the closed-loop transfer function is determined, and the corresponding closed-loop poles are configured according to the determined expected order of the system response. The unknown control parameters are then inferred by using the pole placement method. The unknown control parameters obtained by reverse calculation are substituted into the improved PID controller, and a dual PID control loop is constructed by combining it with the current loop controller; Using the unknown control parameters obtained by reverse calculation as the initial population, a fitness function is constructed using the dynamic performance index of the motor speed response. Global optimization is performed on all control parameters of the dual PID control loop to obtain the optimal combination of control parameters. The optimized combination of control parameters is sequentially substituted into the dual PID control loop and the simulation system coupled with the equivalent mathematical model of the liquid pump and the open-loop simulation model of the motor. The optimal combination of control parameters is obtained after verification by simulating load mutation and rapid start-stop conditions.

2. The method for optimizing control parameters of a brushless DC motor according to claim 1, characterized in that, The method for establishing the equivalent mathematical model of the liquid pump includes: By analyzing the flow continuity of the hydraulic pump, the input flow equation and output flow equation of the hydraulic pump are established. The inlet and outlet fluid volumes of the hydraulic pump in the input and output flow equations are then unified into the fluid volume of the pipeline, resulting in a simplified flow continuity equation. The functional expression of the simplified flow continuity equation is as follows: In the formula, This indicates the flow rate of the hydraulic pump. Indicates the input speed of the hydraulic pump. This indicates the displacement of the hydraulic pump. This indicates the internal leakage flow rate of the hydraulic pump. This refers to unifying the inlet and outlet fluid volumes of the hydraulic pump into the equivalent fluid volume after pipeline connection. This indicates the outlet pressure of the hydraulic pump. Indicates time, This indicates the rate of change of the hydraulic pump outlet pressure; By analyzing the internal leakage force balance relationship of the hydraulic pump, the outlet pressure equation of the hydraulic pump is established. The functional expression of the outlet pressure equation is as follows: In the formula, Indicates liquid resistance. Indicates liquid sensation. This indicates the pressure difference between the inlet and outlet of the hydraulic pump. This indicates the rate of change of the pressure difference between the inlet and outlet; Performing a Laplace transform on the simplified flow continuity equation and the outlet pressure equation yields the first transfer function between the hydraulic pump outlet pressure and flow rate. The expression for the first transfer function is as follows: In the formula, This represents the transfer function of hydraulic pump outlet pressure to flow rate. Represents the Laplace operator. This indicates the pressure difference between the inlet and outlet of the hydraulic pump. This indicates the rate of change of the pressure difference between the inlet and outlet; By analyzing the relationship between the input torque of the hydraulic pump and various types of torque, a torque equation for the hydraulic pump is established. The functional expression of the torque equation is as follows: In the formula, This indicates the input torque of the hydraulic pump. This represents constant torque loss independent of motor speed. Indicates the viscosity damping coefficient of the oil. This represents the torque loss coefficient due to oil movement and turbulent leakage. Represents pi (π). This represents the torque loss coefficient related to the sealing surface of the hydraulic pump. Indicates the motor speed. This represents the square of the motor speed; Based on the flow continuity equation, the outlet pressure equation, the transfer function, and the torque equation, a mathematical model of the hydraulic pump, including flow characteristics and torque characteristics, is established.

3. The method for optimizing control parameters of a brushless DC motor according to claim 1, characterized in that, The method for establishing the equivalent mathematical model of the motor includes: Establish a set of fundamental equations for permanent magnet brushless DC motors, including electromotive force balance equation, back electromotive force equation, torque balance equation, and electromagnetic torque equation. Based on the established set of fundamental equations, substituting the zero back electromotive force into the electromotive force balance equation yields the starting current equation, the functional expression of which is: In the formula, This indicates the starting current of the motor. Indicates the power supply voltage. This represents the saturation voltage drop of a power transistor. This represents the average resistance of the armature winding; Based on the starting current equation and the analysis of the influence of the change in the angle between the rotor magnetic field and the armature magnetic field on the electromagnetic torque, the starting characteristics of the starting torque fluctuating with the change in rotor position are determined. Based on the established set of fundamental equations, the variation of armature current with output torque during stable operation is analyzed, and the motor efficiency equation is obtained by combining the relationship between input power and output power. The functional expression of the motor efficiency equation is as follows: In the formula, Indicates the efficiency of the motor. This indicates the input power of the motor. Indicates the output power of the motor. This indicates the total losses of the motor; Based on the analysis of the motor efficiency equation, the operating characteristic of the motor efficiency first increasing and then decreasing with the output torque is determined. Based on the established set of fundamental equations, the relationship between the motor's speed and electromagnetic torque under constant applied power supply voltage is analyzed to obtain the mechanical characteristic equation. The functional expression of the mechanical characteristic equation is as follows: In the formula, Indicates electromagnetic torque. Indicates the torque coefficient. Represents the average armature current. This represents the equivalent average resistance of the armature winding. Indicates the motor speed. Indicates the back electromotive force coefficient; Based on the analysis of the mechanical characteristic equation and the law of shift in the mechanical characteristic curve when the power supply voltage is changed, the speed regulation characteristic of achieving smooth speed regulation by changing the power supply voltage is determined. Based on the starting current equation and the starting characteristics, the motor efficiency equation and the operating characteristics, as well as the mechanical characteristic equation and the speed regulation characteristics, a mathematical model of the permanent magnet brushless DC motor is established.

4. The method for optimizing control parameters of a brushless DC motor according to claim 3, characterized in that, The process of running the open-loop simulation model of the motor to obtain simulation data under different operating conditions, and identifying parameters of the simulation data based on the equivalent mathematical model of the motor, includes: Run the open-loop simulation model of the motor to obtain the steady-state speed and corresponding power supply voltage under no-load steady-state conditions, as well as the armature current and corresponding stator resistance under load conditions. Based on the obtained no-load steady-state speed value and the power supply voltage value, the relationship between steady-state speed and back electromotive force coefficient is established using the final value theorem, and the preliminary identification value of back electromotive force coefficient is calculated. Based on the established back electromotive force equation and the electromotive force balance equation, and combined with the obtained armature current value and stator resistance value, the initial identification value of the back electromotive force coefficient is corrected to obtain the corrected back electromotive force coefficient. The functional expression of the corrected back electromotive force coefficient is as follows: In the formula, This represents the corrected back electromotive force coefficient. Indicates armature current, Indicates steady-state speed. Indicates the stator line resistance; Run the open-loop simulation model of the motor to obtain the armature current value and the corresponding load torque value under steady-state load conditions. Substitute the obtained armature current value and the load torque value into the established electromagnetic torque equation to calculate the torque coefficient. The functional expression for calculating the torque coefficient is as follows: In the formula, The torque coefficient indicating identification. Indicates electromagnetic torque. Indicates load torque; Run the open-loop simulation model of the motor to obtain the speed response data during the motor acceleration process, as well as the corresponding electromagnetic torque value and load torque value; The acquired speed response data is processed using the finite difference method to obtain the speed change rate. The speed change rate, the acquired electromagnetic torque value, and the load torque value are then substituted into the established torque balance equation to calculate the preliminary identification value of the moment of inertia. The functional expression for calculating the moment of inertia is as follows: In the formula, The moment of inertia representing the identification. Indicates the rate of change of rotational speed; Substitute the acquired speed response data into the established torque balance equation, and use the differential calculation method to analyze the relationship between the speed change rate and the electromagnetic torque to calculate the identification value of the moment of inertia. The open-loop simulation model of the motor is run using sawtooth wave voltage as input to lengthen the acceleration process and obtain the speed response data of multiple acceleration steps, as well as the corresponding electromagnetic torque value and load torque value. Based on the rotational speed response data of multiple acceleration steps, and the corresponding electromagnetic torque value and load torque value, the torque balance equation is used to recalculate and average the values ​​to obtain the final moment of inertia.

5. The method for optimizing control parameters of a brushless DC motor according to claim 1, characterized in that, The method includes constructing the improved PID controller, establishing the time-domain mathematical model, and deriving the closed-loop transfer function, comprising: The improved PID controller is constructed by connecting a first-order inertial low-pass filter in parallel with the derivative or output channel of the original PID controller. The transfer function expression of the improved PID controller is as follows: In the formula, This represents the Laplace transform of the controller output signal based on the improved differential channel. This represents the Laplace transform of the controller output signal based on the improved output channel. Represents the Laplace operator. This represents the proportional gain of the improved PID controller. Represents the integration time constant. Represents the differential time constant. This represents the time constant of the first-order inertial low-pass filter. The Laplace transform of the error signal between the desired speed and the actual speed; Based on the improved PID controller, and combined with the identified back electromotive force coefficient, torque coefficient, and moment of inertia, a time-domain mathematical model of the permanent magnet brushless DC motor under uncontrolled conditions is constructed. The functional expression of the time-domain mathematical model is as follows: In the formula, This represents the back electromotive force of the armature winding. Represents the back electromotive force coefficient. Indicates the motor speed. Indicates electromagnetic torque. Indicates the torque coefficient. Indicates armature current, This represents the derivative of the armature current with respect to time. This represents the electromagnetic time constant of the armature circuit. Indicates the armature circuit amplification factor. Indicates the power supply voltage. This represents the saturation voltage drop of a power transistor. Indicates the moment of inertia. This represents the derivative of the motor speed with respect to time. Indicates load torque; Define a generalized control quantity, and obtain a second transfer function from the generalized control quantity to the electromagnetic torque, and a third transfer function from the electromagnetic torque to the rotational speed from the time-domain mathematical model. The functional expressions of the second transfer function and the third transfer function are as follows: In the formula, This represents the second transfer function. Indicates the third transfer function; A desired speed is set, and an error speed is defined based on the difference between the set desired speed and the actual speed. The fourth transfer function of the improved PID controller in the feedback loop is then obtained based on the defined error speed. The function expression of the fourth transfer function is as follows: In the formula, This represents the fourth transfer function. This represents the derivative coefficient of the improved PID controller. This represents the integral coefficient of the improved PID controller; Based on the second, third, and fourth transfer functions, and in conjunction with the set desired speed and the load torque in the time-domain mathematical model, the fifth transfer function of the error speed in the complex frequency domain is derived. The functional expression of the fifth transfer function is as follows: In the formula, This represents the Laplace transform of the rotational speed with defined error. The Laplace transform of the load torque, Represents the Laplace transform of the desired rotational speed; Based on the fifth transfer function, a first response transfer function of the error speed with respect to the load torque and a second response transfer function of the error speed with respect to the desired speed are established. Then, based on the first and second response transfer functions, a closed-loop transfer function containing unknown differential coefficients, unknown integral coefficients, and unknown proportional coefficients is constructed. The functional expression of the closed-loop transfer function is as follows: In the formula, This represents the closed-loop transfer function.

6. The method for optimizing control parameters of a brushless DC motor according to claim 5, characterized in that, The method includes determining the desired response order of the system, configuring the closed-loop poles, and inversely calculating the unknown control parameters, comprising: If suppressing overshoot and oscillation is the priority control objective, the expected response order of the system is determined to be dominated by the first-order system. Alternatively, if improving response speed is the primary control objective, the expected response order of the system is determined to be dominated by a second-order system. When it is determined that the first-order system is dominant, a closed-loop control system consisting of four first-order systems connected in parallel is configured, and the corresponding closed-loop pole parameters are configured to obtain the first desired transfer function. The function expression of the first desired transfer function is: In the formula, Denotes the first expected transfer function. , , , These represent the gain coefficients of each first-order system. , , , The pole parameters of each first-order system; When the system is determined to be a second-order system, a closed-loop control system consisting of one second-order system and two first-order systems connected in parallel is configured, and the corresponding closed-loop pole parameters are configured to obtain the second desired transfer function. The expression of the second desired transfer function is as follows: In the formula, Denotes the second expected transfer function. Denotes the coefficients of the first-order term in a second-order system. Denotes the coefficients of the constant term in a second-order system. , , These represent the gain coefficients of each system. , The pole parameters of the two first-order systems respectively; The expected characteristic polynomial is obtained by finding a common denominator for the first or second expected transfer function. The coefficient correspondence between the expected characteristic polynomial and the closed-loop transfer function is established, and the unknown differential coefficients, integral coefficients and proportional coefficients are obtained by solving the equation.

7. The method for optimizing control parameters of a brushless DC motor according to claim 6, characterized in that, The global optimization of all control parameters of the dual PID control loop includes: All the differential coefficients, integral coefficients and proportional coefficients obtained by solving are used as the initial population, and the number of particles, the maximum number of iterations, the initial velocity and position of the particles are set. A fitness function is constructed using the convergence time, overshoot, and steady-state error of the motor speed response as dynamic performance indicators, and the fitness value is calculated for each particle in the initial population. Based on the calculated fitness values, update the individual optimal position of each particle and the global optimal position of the entire population, and update the particle's velocity and position based on the update results. The inertial weights and learning factors during the particle velocity and position update process are dynamically adjusted, while the particle velocity is limited until the maximum number of iterations is reached, and the combination of control parameters corresponding to the global optimal position is output.

8. An optimization system, employing the brushless DC motor control parameter optimization method according to any one of claims 1-7, characterized in that, The optimization system includes: The model building module is used to build the equivalent mathematical model of the hydraulic pump and the equivalent mathematical model of the permanent magnet brushless DC motor, and to construct the open-loop simulation model of the motor based on the equivalent mathematical model of the motor. The parameter identification module is used to run the open-loop simulation model of the motor to obtain simulation data under different working conditions, and to perform parameter identification on the simulation data based on the equivalent mathematical model of the motor to obtain the back electromotive force coefficient, torque coefficient and moment of inertia respectively. The closed-loop function establishment module introduces a first-order inertial low-pass filter to construct an improved PID controller. Combining the identified back electromotive force coefficient, torque coefficient and moment of inertia, a time-domain mathematical model of the permanent magnet brushless DC motor is established, and a closed-loop transfer function containing unknown control parameters is derived from the time-domain mathematical model. The control configuration module is used to determine the desired system response order of the closed-loop control system based on the derived closed-loop transfer function, configure the corresponding closed-loop poles according to the determined desired system response order, and back-calculate the unknown control parameters using the pole placement method. The control loop establishment module is used to substitute the unknown control parameters obtained by back-reasoning into the improved PID controller and construct a dual PID control loop in combination with the current loop controller. The parameter optimization module is used to use the unknown control parameters obtained by back-reasoning as the initial population, construct a fitness function with the dynamic performance index of the motor speed response, and perform global optimization on all control parameters of the dual PID control loop to obtain the optimal combination of control parameters. The parameter verification module is used to sequentially substitute the optimized control parameter combination into the dual PID control loop and the simulation system coupled by the equivalent mathematical model of the liquid pump and the open-loop simulation model of the motor, and obtain the verified optimal control parameter combination by simulating load sudden change and rapid start-stop conditions.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the brushless DC motor control parameter optimization method according to any one of claims 1-7.

10. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the brushless DC motor control parameter optimization method according to any one of claims 1-7.