PI permanent magnet synchronous motor vector control method and system based on improved BP neural network

CN122764048APending Publication Date: 2026-09-15JIANGSU UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611018338.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-09
Publication Date
2026-09-15

Smart Images

  • Figure CN122764048A_ABST
    Figure CN122764048A_ABST
Patent Text Reader

Abstract

The application discloses a PI permanent magnet synchronous motor vector control method and system based on an improved BP neural network, relates to the technical field of motor control, and collects a target rotating speed, an actual rotating speed, three-phase stator currents and a rotor position angle, calculates a speed error, inputs the target rotating speed, the speed error and the actual rotating speed into a BP neural network after normalization and amplitude limiting, and outputs a proportional coefficient and an integral coefficient of a speed loop PI controller online; then generates a q-axis current given value based on an incremental PI control law, and limits the amplitude and the change rate of the PI parameters and the q-axis current given value; meanwhile, the learning rate is adaptively adjusted according to the speed error, and a weight value update enabling signal is generated according to a speed error dead zone, a q-axis current amplitude limiting state and a q-axis current change rate constraint state; when the update is allowed, the sensitivity direction factor of the controlled object obtained by using the division product judgment number is smoothed and processed to correct the back propagation direction. The application can improve the stability of online setting of the speed loop PI parameters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of motor control technology, specifically to a vector control method and system for PI permanent magnet synchronous motors based on an improved BP neural network. Background Technology

[0002] Current vector control of permanent magnet synchronous motors employs speed loop control, which typically uses a fixed-parameter PI controller. While this type of controller is simple in structure and easy to implement, its control performance depends heavily on the tuning of the proportional and integral coefficients. When the permanent magnet synchronous motor experiences sudden changes in target speed, load torque disturbances, system inertia variations, or changes in motor parameters, the fixed-parameter PI controller struggles to adjust control parameters in real time according to the operating conditions, easily leading to problems such as slow response, speed overshoot, increased steady-state error, current surges, or torque fluctuations.

[0003] To address the shortcomings of fixed-parameter PI controllers, existing solutions employ BP neural networks, fuzzy control, parameter identification, or optimization algorithms to tune the PI controller parameters, enabling them to adjust according to changes in motor operating conditions. However, existing PI control methods based on ordinary BP neural networks have certain limitations. Due to the influence of input dimension variations and the fixed learning rate of the BP neural network, coupled with the susceptibility of sensitivity direction estimation to noise, control stability is relatively poor.

[0004] Furthermore, existing publicly available solutions for speed control of AC servo systems for permanent magnet synchronous motors typically achieve speed regulation through speed feedback, speed controllers, and current closed loops, with the focus on completing the servo system speed control. However, issues such as the influence of input dimensions during the online tuning of speed loop PI parameters, the mismatch in update intensity caused by the fixed learning rate, the influence of sampling noise on sensitivity direction estimation, and the risk of sudden changes in the q-axis current setpoint still require further improvement. Summary of the Invention

[0005] To address the shortcomings mentioned in the background section, the present invention aims to provide a vector control method and system for PI permanent magnet synchronous motors based on an improved BP neural network.

[0006] Firstly, the objective of this invention can be achieved through the following technical solution: a vector control method for a PI permanent magnet synchronous motor based on an improved BP neural network, the method comprising the following steps: The target speed, actual speed, three-phase stator current, rotor position angle, speed error of the previous sampling period, and q-axis current setpoint of the previous sampling period are obtained. The speed error of the current sampling period is determined based on the target speed and actual speed. The target speed, speed error of the current sampling period, and actual speed are normalized and limited to obtain the input vector. The input vector is fed into a pre-established improved BP neural network model, and the output is the proportional coefficient and integral coefficient of the speed loop PI controller. Based on the preset incremental PI control law, the proportional coefficient, integral coefficient, speed error of the current sampling period, speed error of the previous sampling period, and the final q-axis current setpoint of the previous sampling period are processed to obtain the q-axis current setpoint of the current sampling period. Coordinate transformation is performed on the three-phase stator current and rotor position angle to obtain d-axis current feedback values ​​and q-axis current feedback values. A preset zero current is used as the d-axis current setpoint. Based on the d-axis current setpoint, the q-axis current setpoint of the current sampling period, the d-axis current feedback values, the q-axis current feedback values, and the rotor position angle, current closed-loop regulation, voltage conversion, and space vector pulse width modulation are performed to generate a three-phase inverter switching signal. The permanent magnet synchronous motor is driven to run based on the three-phase inverter switching signal.

[0007] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the process of normalizing and limiting the target rotational speed, the speed error of the current sampling period, and the actual rotational speed, comprising: The target speed, the current speed error, and the actual speed are normalized according to the preset speed reference value to obtain the normalized value of the target speed, the normalized value of the speed error, and the normalized value of the actual speed. The target rotational speed normalized value, the speed error normalized value, and the actual rotational speed normalized value are each limited to a preset input range; The input vector of the BP neural network is constructed based on the normalized target speed after amplitude limiting, the normalized speed error, and the normalized actual speed.

[0008] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the proportional coefficient and the integral coefficient are respectively obtained by mapping based on the output value of the BP neural network; wherein, the output value of the first output neuron is mapped to a preset lower limit of the proportional coefficient and a preset upper limit of the proportional coefficient to obtain the proportional coefficient; the output value of the second output neuron is mapped to a preset lower limit of the integral coefficient and a preset upper limit of the integral coefficient to obtain the integral coefficient; The proportional coefficient, the integral coefficient, and the q-axis current setpoint are subjected to amplitude limiting, and the rate of change of the q-axis current setpoint is constrained, including: The scaling factor is limited to a preset lower limit and a preset upper limit; The integral coefficient is restricted to a preset lower limit and a preset upper limit; The given value of the q-axis current is limited to between a preset lower limit and a preset upper limit of the q-axis current; The change in the q-axis current setpoint of the current sampling period relative to the q-axis current setpoint of the previous sampling period is limited to a preset rate of change constraint.

[0009] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the weight update process of the improved BP neural network model, comprising: The adaptive learning rate of the BP neural network is determined based on the speed error of the current sampling period, and the BP neural network weight update enable signal is generated based on the speed error of the current sampling period, the amplitude limiting state of the q-axis current setpoint, and the rate of change constraint state of the q-axis current setpoint. Specifically, when the speed error of the current sampling period exceeds the preset speed error dead zone, and the q-axis current setpoint does not trigger amplitude limiting or rate of change constraint, the BP neural network is allowed to update its weights according to the adaptive learning rate. When the speed error of the current sampling period is within the preset speed error dead zone, or the q-axis current setpoint triggers amplitude limiting, or the q-axis current setpoint triggers rate of change constraint, the BP neural network weight update is paused. Based on the actual speed change in the current sampling period and the final q-axis current setpoint change in the actual input q-axis current loop in the current sampling period, the sensitivity direction estimate of the controlled object is determined by a product sign determination method without division, and the sensitivity direction estimate of the controlled object is smoothed by first-order smoothing to obtain the smoothed sensitivity direction factor. When the BP neural network weight update enable signal is in the allowable update state, the smoothed sensitivity direction factor, the partial derivative correlation terms of the incremental PI control law with respect to the proportional and integral channels, and the adaptive learning rate are jointly introduced into the BP neural network backpropagation process to correct the weight update direction of the proportional coefficient and the integral coefficient.

[0010] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the improved BP neural network model includes an input layer, a hidden layer, and an output layer; The inputs to the input layer include the target rotational speed, the speed error of the current sampling period, and the normalization value corresponding to the actual rotational speed. The hidden layer comprises multiple hidden layer neurons, and the hidden layer neurons use the hyperbolic tangent function as the activation function; The output layer includes two output neurons, which are used to generate the proportional coefficient and the integral coefficient, respectively. The hidden layer comprises seven hidden layer neurons, and the output layer uses the Sigmoid function as the activation function.

[0011] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: introducing the smoothed sensitivity direction factor, the partial derivative correlation terms of the incremental PI control law with respect to the proportional and integral channels, and the adaptive learning rate into the backpropagation process of the BP neural network, including: Based on the current sampling period velocity error e(k) and the previous sampling period velocity error e(k-1), determine the partial derivative related terms of the incremental PI control law with respect to the output of the output layer neurons; Among them, the partial derivative related term corresponding to the proportional channel is H1(k)=e(k)-e(k-1), and the partial derivative related term corresponding to the integral channel is H2(k)=e(k); The error signal of the output layer neuron is determined based on the normalized value of the velocity error, the smoothed sensitivity direction factor, the partial derivative correlation term, the PI parameter mapping gain, and the derivative of the output layer activation function. The weights of the BP neural network are then updated based on the error signal of the output layer neuron and the adaptive learning rate.

[0012] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: determining the adaptive learning rate of the BP neural network based on the speed error of the current sampling period, specifically including: The learning rate of the BP neural network is determined based on the magnitude of the absolute value or normalized value of the velocity error in the current sampling period. The smaller the amplitude, the closer the learning rate is to the preset lower limit of the learning rate; the magnitude of the learning rate is positively correlated with the magnitude of the amplitude. The learning rate is then limited to a preset lower learning rate limit and a preset upper learning rate limit. The online updating of the weights of the BP neural network based on the learning rate includes: Determine whether the absolute value of the speed error in the current sampling period is greater than the preset speed error dead zone threshold, and determine whether the given value of the q-axis current triggers amplitude limiting and rate of change constraint; When the absolute value of the speed error of the current sampling period is greater than the preset speed error dead zone threshold, and the given value of the q-axis current does not trigger amplitude limiting and rate of change constraint, the weights of the BP neural network are updated using the adaptive learning rate. When the absolute value of the velocity error of the current sampling period is less than or equal to the preset velocity error dead zone threshold, or when the q-axis current setpoint triggers amplitude limiting, or when the q-axis current setpoint triggers rate of change constraint, the weights of the BP neural network remain unchanged.

[0013] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the process of determining the controlled object's sensitivity direction estimate using a product sign determination method without division, and performing first-order smoothing on the controlled object's sensitivity direction estimate, comprising: The product sign method is used to determine the sign estimate of the controlled object's sensitivity in the current sampling period. The calculation formula is as follows: S(k) = sgn[(ω(k) - ω(k-1))(i qref (k)-i qref (k-1))] In the formula, ω(k) is the actual rotational speed in the current sampling period, ω(k-1) is the actual rotational speed in the previous sampling period, and i qref (k) represents the final q-axis current setpoint actually applied to the q-axis current loop during the current sampling period, i qref (k-1) represents the final q-axis current setpoint actually applied to the q-axis current loop in the previous sampling period; a first-order low-pass filter algorithm is used to smooth S(k) to obtain the smoothed sensitivity direction factor: S f (k)=λS f (k-1)+(1-λ)S(k) In the formula, S f (k-1) is the sensitivity direction factor after smoothing in the previous sampling period, and λ is the preset smoothing coefficient that satisfies 0<λ<1; When the actual change in rotational speed or the change in the final q-axis current is less than a preset small threshold, the smoothed sensitivity direction factor of the previous sampling period remains unchanged.

[0014] Secondly, in order to achieve the above objectives, this invention discloses a vector control system for a PI permanent magnet synchronous motor based on an improved BP neural network, comprising: The data acquisition module is used to acquire the target speed, actual speed, three-phase stator current, rotor position angle, speed error of the previous sampling period, and q-axis current setpoint of the previous sampling period. Based on the target speed and actual speed, the speed error of the current sampling period is determined. The target speed, speed error of the current sampling period, and actual speed are normalized and limited to obtain the input vector. The data processing module is used to input the input vector into the pre-established improved BP neural network model and output the proportional coefficient and integral coefficient of the speed loop PI controller. Based on the preset incremental PI control law, the proportional coefficient, integral coefficient, speed error of the current sampling period, speed error of the previous sampling period, and the final q-axis current setpoint of the previous sampling period are processed to obtain the q-axis current setpoint of the current sampling period. The control output module is used to perform coordinate transformation on the three-phase stator current and rotor position angle to obtain d-axis current feedback value and q-axis current feedback value. With a preset zero current as the d-axis current setpoint, the module performs current closed-loop regulation, voltage conversion, and space vector pulse width modulation based on the d-axis current setpoint, the q-axis current setpoint of the current sampling period, the d-axis current feedback value, the q-axis current feedback value, and the rotor position angle to generate a three-phase inverter switching signal. The module then drives the permanent magnet synchronous motor to run based on the three-phase inverter switching signal.

[0015] The beneficial effects of this invention are: (1) The present invention reduces the influence of the input dimensions on the online learning of the neural network by normalizing and limiting the target speed, current speed error and actual speed before inputting them into the BP neural network, avoiding the neurons from entering the saturation region due to excessive input, and improving the stability of the online tuning of the BP neural network.

[0016] (2) The present invention adaptively adjusts the learning rate of the BP neural network according to the current speed error, increases the weight update speed when the error is large, and reduces the weight adjustment intensity when the error is small, thereby taking into account both the dynamic response performance and steady-state stability of the permanent magnet synchronous motor.

[0017] (3) By setting a speed error dead zone and combining the amplitude limiting state and the rate of change constraint state of the q-axis current setpoint to form a weight update enable mechanism, the BP neural network weight update is paused when the steady-state small error, the amplitude of the q-axis current is saturated or the rate of change of the q-axis current is limited. This can suppress the drift of the proportional coefficient and integral coefficient and reduce the risk of mislearning under the constraint state of the actuator.

[0018] (4) Based on the actual change in rotational speed and the actual change in the final q-axis current given value applied to the q-axis current loop, the present invention uses a division-free product sign method to estimate the sensitivity direction of the controlled object and smooths the sensitivity direction. This can reduce the influence of sampling noise, small changes in control output and singular division sign on the back propagation direction of the BP neural network, and improve the reliability of the weight update direction.

[0019] (5) The present invention limits the proportional coefficient, integral coefficient and q-axis current setpoint of the output of the BP neural network, and constrains the rate of change of the q-axis current setpoint, which can reduce the risk of q-axis current impact, electromagnetic torque impact and current loop saturation, and improve the operational safety of the system during startup, speed regulation and nonlinear dynamic time-varying disturbance regulation.

[0020] (6) The present invention applies the improved BP neural network PI controller to the speed loop of the vector control system of permanent magnet synchronous motor, so that the PI parameters of the speed loop can be adjusted online according to the motor operating status, thereby improving the speed response speed, anti-disturbance performance and control stability of permanent magnet synchronous motor.

[0021] (7) The present invention reduces the risk of PI parameter drift in steady state, mislearning under the condition of actuator limitation and sudden change of q-axis current setpoint by combining input normalization, adaptive learning rate, speed error dead zone, pause learning when q-axis current amplitude and rate of change are limited, sensitivity direction smooth estimation and control output protection, thereby improving the stability of the online speed loop tuning process. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Figure 1 This is a schematic diagram of the method flow of the present invention; Figure 2 This is a schematic diagram of the overall structure of the present invention; Figure 3 This is a schematic diagram of the improved BP neural network PI controller structure provided in an embodiment of the present invention; Figure 4 This is a schematic flowchart of a vector control method for a permanent magnet synchronous motor based on an improved BP neural network PI provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of the Simulink simulation model of the permanent magnet synchronous motor vector control system provided in this embodiment of the invention; Figure 6 This is a schematic diagram showing the performance comparison curves of the present invention and traditional PI control during the speed regulation and start-up phase. Figure 7 This is a schematic diagram of the system structure of the present invention. Detailed Implementation

[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0024] Example 1: like Figure 1 As shown, a vector control method for a PI permanent magnet synchronous motor based on an improved BP neural network is presented. The method includes the following steps: S101: Obtain the target speed, actual speed, three-phase stator current, rotor position angle, speed error of the previous sampling period, and q-axis current setpoint of the previous sampling period. Determine the speed error of the current sampling period based on the target speed and actual speed. Normalize and limit the target speed, speed error of the current sampling period, and actual speed to obtain the input vector. In this embodiment, the permanent magnet synchronous motor adopts i d Vector control with a setpoint of 0 (i.e., the d-axis current setpoint is set to zero). By keeping the d-axis current setpoint zero and outputting the q-axis current setpoint from the speed loop, relatively simple torque control can be achieved in surface-mounted or circular rotor permanent magnet synchronous motor control.

[0025] In this embodiment, the traditional fixed-parameter speed loop PI controller is replaced by an improved BP neural network PI control module. This module combines input normalization, adaptive learning rate, weight update enable, sensitivity direction smoothing estimation, and amplitude limiting protection to improve the adaptability and stability of the speed loop controller under different speed commands and load disturbances.

[0026] The process of normalizing and limiting the target rotational speed, the speed error of the current sampling period, and the actual rotational speed includes: The target speed, the current speed error, and the actual speed are normalized according to the preset speed reference value to obtain the normalized value of the target speed, the normalized value of the speed error, and the normalized value of the actual speed. The target rotational speed normalized value, the speed error normalized value, and the actual rotational speed normalized value are each limited to a preset input range; The input vector of the BP neural network is constructed based on the normalized target speed after amplitude limiting, the normalized speed error, and the normalized actual speed.

[0027] S102: Input the input vector into the pre-established improved BP neural network model, and output the proportional coefficient and integral coefficient of the speed loop PI controller. Based on the preset incremental PI control law, process the proportional coefficient, integral coefficient, speed error of the current sampling period, speed error of the previous sampling period, and the final q-axis current setpoint of the previous sampling period to obtain the q-axis current setpoint of the current sampling period. The weight update process of the improved BP neural network model includes: The adaptive learning rate of the BP neural network is determined based on the speed error of the current sampling period, and the BP neural network weight update enable signal is generated based on the speed error of the current sampling period, the amplitude limiting state of the q-axis current setpoint, and the rate of change constraint state of the q-axis current setpoint. Specifically, when the speed error of the current sampling period exceeds the preset speed error dead zone, and the q-axis current setpoint does not trigger amplitude limiting or rate of change constraint, the BP neural network is allowed to update its weights according to the adaptive learning rate. When the speed error of the current sampling period is within the preset speed error dead zone, or the q-axis current setpoint triggers amplitude limiting, or the q-axis current setpoint triggers rate of change constraint, the BP neural network weight update is paused. Based on the actual speed change in the current sampling period and the final q-axis current setpoint change in the actual input q-axis current loop in the current sampling period, the sensitivity direction estimate of the controlled object is determined by a product sign determination method without division, and the sensitivity direction estimate of the controlled object is smoothed by first-order smoothing to obtain the smoothed sensitivity direction factor. When the BP neural network weight update enable signal is in the allowable update state, the smoothed sensitivity direction factor, the partial derivative correlation terms of the incremental PI control law with respect to the proportional and integral channels, and the adaptive learning rate are jointly introduced into the BP neural network backpropagation process to correct the weight update direction of the proportional coefficient and the integral coefficient.

[0028] Among them, such as Figure 3 As shown, the improved BP neural network PI controller in this embodiment of the invention serves as the speed loop controller of the permanent magnet synchronous motor vector control system. Its BP neural network inputs include the target speed, the current speed error, and the normalized value corresponding to the actual speed. Its controller state variables include the speed error of the previous sampling period, the actual speed of the previous sampling period, and the final q-axis current setpoint applied to the q-axis current loop in the previous sampling period. The controller output includes the final q-axis current setpoint for the current sampling period, the proportional coefficient, and the integral coefficient.

[0029] Let the target rotational speed be The actual rotational speed is The current speed error is The current speed error is: To reduce the impact of input dimensions on the online learning of the BP neural network, the improved BP neural network PI controller normalizes and limits the target speed, current speed error, and actual speed. Preferably, it uses a preset speed reference value ω. b Constructing the input vector for the BP neural network: x(k)=[sat(ω ref (k) / ω b ,-1,1), sat(e(k) / ω b ,-1,1), sat(ω(k) / ω b ,-1,1)] T Where x(k) is the input vector of the BP neural network, ω b A preset rotational speed reference value is used, and `sat(·)` is a limiting function. Each element in the input vector `x(k)` is limited to a preset input range. Preferably, the preset input range is [-1, 1]. Through normalization and limiting, excessively large target rotational speed, speed errors, and actual rotational speed values ​​can prevent the neuron activation function from entering the saturation region, thus improving the stability of the online tuning of the BP neural network.

[0030] The proportional coefficient and the integral coefficient are respectively obtained by mapping the output value of the BP neural network; wherein, the output value of the first output neuron is mapped to a preset lower limit of the proportional coefficient and a preset upper limit of the proportional coefficient to obtain the proportional coefficient; the output value of the second output neuron is mapped to a preset lower limit of the integral coefficient and a preset upper limit of the integral coefficient to obtain the integral coefficient. The proportional coefficient, the integral coefficient, and the q-axis current setpoint are subjected to amplitude limiting, and the rate of change of the q-axis current setpoint is constrained, including: The scaling factor is limited to a preset lower limit and a preset upper limit; The integral coefficient is restricted to a preset lower limit and a preset upper limit; The given value of the q-axis current is limited to between a preset lower limit and a preset upper limit of the q-axis current; The change in the q-axis current setpoint of the current sampling period relative to the q-axis current setpoint of the previous sampling period is limited to a preset rate of change constraint.

[0031] The improved BP neural network model includes an input layer, hidden layers, and an output layer; The inputs to the input layer include the target rotational speed, the speed error of the current sampling period, and the normalization value corresponding to the actual rotational speed. The hidden layer comprises multiple hidden layer neurons, and the hidden layer neurons use the hyperbolic tangent function as the activation function; The output layer includes two output neurons, which are used to generate the proportional coefficient and the integral coefficient, respectively. The hidden layer comprises seven hidden layer neurons, and the hidden layer uses the hyperbolic tangent activation function. The output layer uses the sigmoid function as the activation function.

[0032] A BP neural network consists of an input layer, hidden layers, and an output layer. The input layer receives the normalized input vector x(k); the hidden layer contains multiple hidden layer neurons, preferably seven; and the output layer contains two output neurons, which are used to generate the proportional coefficient K of the velocity loop PI controller. p (k) and integral coefficient K i (k). In one implementation, the hidden layer uses the hyperbolic tangent activation function, and the output layer uses the sigmoid activation function.

[0033] After obtaining the scaling factor K of the current sampling period p (k) and integral coefficient K i After (k), the improved BP neural network PI controller first uses an incremental PI control law to generate an unlimited control output u0(k): u0(k)=i qref (k-1)+K p (k)[e(k)-e(k-1)]+K i (k)e(k) Subsequently, amplitude limiting is applied to u0(k) to obtain i qlim (k): i qlim (k)=sat(u0(k),i qmin i qmax ) Then for i qlim (k) Apply rate of change constraints to obtain the final q-axis current setpoint i. qref (k): i qref (k)=i qref (k-1)+sat(i qlim (k)-i qref (k-1),-Δiqmax ,Δi qmax ) The above processing can avoid q-axis current surges, current loop saturation, or torque fluctuations caused by excessive proportional coefficients, integral coefficients, or control outputs during the initial online tuning of the BP neural network.

[0034] To balance dynamic response and steady-state stability, the improved BP neural network PI controller adaptively adjusts the BP neural network learning rate based on the current velocity error. Preferably, the learning rate is determined based on the normalized value of the velocity error. η(k)=η min +(η max -η min )|e n (k)| Where η(k) is the learning rate for the current sampling period, η min η is the lower bound of the learning rate. max e is the upper limit of the learning rate. n (k) is the normalized value of the velocity error; the calculated learning rate is limited to [η]. min ,η max Within the range, when the speed error is large, the learning rate is increased accordingly to improve the weight update speed of the BP neural network; when the speed error is small, the learning rate is decreased accordingly to reduce the intensity of weight adjustment in the steady-state stage and suppress fluctuations in the proportional coefficient and integral coefficient.

[0035] Furthermore, the improved BP neural network PI controller is equipped with a speed error dead zone and generates a weight update enable signal by combining the amplitude limiting state and rate of change constraint state of the q-axis current setpoint. Let the speed error dead zone threshold be e0. When the absolute value of the current speed error is less than or equal to e0, the BP neural network weight update is paused; when the absolute value of the current speed error is greater than e0, and the q-axis current setpoint has not triggered amplitude limiting or rate of change constraint, the BP neural network is allowed to update the weights. This avoids the BP neural network continuously updating weights when the permanent magnet synchronous motor is near steady-state operation and prevents mislearning under actuator constraints.

[0036] Preferably, to avoid the risks of near-zero denominators and sign misjudgment that may arise from using division for sign determination when the system is in steady-state operation, experiencing minor changes in control output, or when control output is saturated, this embodiment employs a division-free product-based sign determination method. The current estimated value S(k) of the controlled object's sensitivity direction is expressed in the following product form: S(k) = sgn[(ω(k) - ω(k-1))(i qref (k)-i qref (k-1))] in, This is the estimated sensitivity direction value of the controlled object in the current sampling period. To reduce the impact of sampling noise and transient disturbances on the sensitivity direction determination, the estimated sensitivity direction value of the controlled object is smoothed: S f (k)=λS f (k-1)+(1-λ)S(k) Where S(k) is the estimated value of the controlled object's sensitivity direction in the current sampling period, S f (k) is the sensitivity direction factor after smoothing for the current sampling period, S f (k-1) is the smoothed sensitivity direction factor from the previous sampling period, ω(k) and ω(k-1) are the actual rotational speeds in the current and previous sampling periods, respectively, i qref (k) and i qref (k-1) represents the final q-axis current setpoint of the actual input q-axis current loop in the current sampling period and the previous sampling period, respectively, and λ is the smoothing coefficient that satisfies 0<λ<1.

[0037] The smoothed sensitivity direction factor, the partial derivatives of the incremental PI control law with respect to the proportional and integral channels, and the adaptive learning rate are all introduced into the backpropagation process of the BP neural network, including: First, define the output signals of each layer of neurons in the BP neural network: the output of the input layer neurons is x. i (k), where i = 1, 2, 3; the output of the hidden layer neurons is h. j (k), where j=1,2,...,J; the output of the output layer neuron is , where m=1,2.

[0038] Backpropagation is performed using gradient descent, and the error signal δ of the output layer neurons is calculated. mo (k) The calculation formula is: δ mo (k)=e n (k)S f (k)H m (k)M m y m (k)[1-y m (k)] In the formula, e n (k) represents the normalized value of the velocity error; S f (k) is the controlled object sensitivity direction factor after smoothing in the current sampling period; H m(k) represents the partial derivative of the incremental PI control law with respect to the output of the output layer neurons; M m is the mapping gain constant of the output layer neuron, which is determined according to the preset upper and lower limits of the parameters, specifically satisfying: when m=1, it corresponds to the proportional coefficient mapping gain; when m=2, it corresponds to the integral coefficient mapping gain.

[0039] The partial derivative of the incremental PI control law with respect to the output of the output layer neurons is a related term, which is dynamically adjusted according to the motor's operating state, and is specifically defined as follows: When m=1, the expression for the proportional channel of the controller is: H1(k) = e(k) - e(k-1) When m=2, the expression for the integral channel of the corresponding controller is: H2(k)=e(k) Furthermore, the weights Δw from the hidden layer to the output layer jm The update formula for (k) is: Δw jm (k)=η(k)δ mo (k)h j (k)+αΔw jm (k-1) In the formula, The preset inertia factor, This is the adaptive learning rate for the current sampling period.

[0040] Subsequently, the error signal δ of the hidden layer neurons is calculated. jh (k), its calculation formula is: δ jh (k)=[1-h j (k) 2 ]∑ m=1 2 δ mo (k)w jm (k) This leads to the weights Δv from the input layer to the hidden layer. ij The update formula for (k) is: Δv ij (k)=η(k)δ jh (k)x i (k)+αΔv ij (k-1) After completing the weight iterations at each level, the updated weight matrices W and V are subjected to amplitude limiting protection: W=sat(W,-W max W max V=sat(V,-W)max W max ) In the formula, W max The default absolute value boundary for weight limiting is defined by W and V, which represent the weight matrix from the hidden layer to the output layer and the weight matrix from the input layer to the hidden layer, respectively.

[0041] The learning rate of the BP neural network is determined based on the magnitude of the absolute value or normalized value of the velocity error in the current sampling period. The smaller the amplitude, the closer the learning rate is to the preset lower limit of the learning rate; the magnitude of the learning rate is positively correlated with the magnitude of the amplitude. The learning rate is then limited to a preset lower learning rate limit and a preset upper learning rate limit. The online updating of the weights of the BP neural network based on the learning rate includes: Determine whether the absolute value of the speed error in the current sampling period is greater than the preset speed error dead zone threshold, and determine whether the given value of the q-axis current triggers amplitude limiting and rate of change constraint; When the absolute value of the speed error of the current sampling period is greater than the preset speed error dead zone threshold, and the given value of the q-axis current does not trigger amplitude limiting and rate of change constraint, the weights of the BP neural network are updated using the adaptive learning rate. When the absolute value of the velocity error of the current sampling period is less than or equal to the preset velocity error dead zone threshold, or when the q-axis current setpoint triggers amplitude limiting, or when the q-axis current setpoint triggers rate of change constraint, the weights of the BP neural network remain unchanged.

[0042] The process of determining the sensitivity direction estimate of the controlled object using a product-based sign determination method without division, and then performing first-order smoothing on the sensitivity direction estimate of the controlled object, includes: The product sign method is used to determine the sign estimate of the controlled object's sensitivity in the current sampling period. The calculation formula is as follows: S(k) = sgn[(ω(k) - ω(k-1))(i qref (k)-i qref (k-1))] In the formula, ω(k) is the actual rotational speed in the current sampling period, ω(k-1) is the actual rotational speed in the previous sampling period, and i qref (k) represents the final q-axis current setpoint actually applied to the q-axis current loop during the current sampling period, i qref(k-1) represents the final q-axis current setpoint actually applied to the q-axis current loop in the previous sampling period; a first-order low-pass filter algorithm is used to smooth S(k) to obtain the smoothed sensitivity direction factor: S f (k)=λS f (k-1)+(1-λ)S(k) In the formula, S f (k-1) is the sensitivity direction factor after smoothing in the previous sampling period, and λ is the preset smoothing coefficient that satisfies 0<λ<1; When the actual change in rotational speed or the change in the final q-axis current is less than a preset small threshold, the smoothed sensitivity direction factor of the previous sampling period remains unchanged.

[0043] Improve the training process of the BP neural network model, including: In this embodiment, the improved BP neural network model adopts a combination of offline initialization training and online weight update. The training samples consist of target speed, actual speed, three-phase stator current, rotor position angle, q-axis current setpoint, and corresponding speed response data collected during the operation or simulation of the permanent magnet synchronous motor vector control. Among them, the target speed, the speed error of the current sampling period, and the actual speed are normalized and limited as network inputs, and the proportional coefficient and integral coefficient of the speed loop PI controller are used as network outputs.

[0044] During training, the input layer has 3 nodes, the hidden layer has 7 nodes, and the output layer has 2 nodes. The hidden layer uses the hyperbolic tangent activation function, and the output layer uses the sigmoid activation function. The learning rate is adaptively adjusted between a preset lower limit and a preset upper limit based on the velocity error. In one embodiment, the lower limit of the learning rate is set to 0.01, the upper limit of the learning rate is set to 0.08, the inertia factor is set to 0.10, the weight limiting range is set to ±5, the velocity error dead zone threshold is set to 2, the upper limit of the q-axis current setpoint is set to 20, the lower limit of the q-axis current setpoint is set to -20, and the constraint value of the rate of change of the q-axis current setpoint is set to 2.

[0045] The training process is set to a preset number of training rounds N, where N is determined based on the number of training samples, the sampling period, and the convergence status of the loss function. During the online update phase, single-step iterations are performed in units of the sampling period, and the weight update enable signal controls whether to execute the weight update for the current sampling period. When the current velocity error exceeds the preset velocity error dead zone and the q-axis current setpoint does not trigger amplitude limiting or rate of change constraints, backpropagation update for the current sampling period is executed. When the current velocity error is within the preset velocity error dead zone, or the q-axis current setpoint triggers amplitude limiting or rate of change constraints, the weight update for the current sampling period is paused.

[0046] The loss function used in training is based on the square of the normalized value of the speed error, combined with the proportional coefficient, integral coefficient, and constraint terms for the change of the q-axis current setpoint. It is used to constrain the speed tracking error, PI parameter drift, and q-axis current impact. When the preset training round N is reached, or the change in the loss function of adjacent training rounds is less than the preset convergence threshold, the offline initialization training ends.

[0047] Through the above training process, the improved BP neural network enables the speed loop PI parameters to adaptively adjust according to the operating state of the permanent magnet synchronous motor, and suppresses invalid learning under steady-state small error or actuator-limited conditions, thereby reducing the risk of proportional coefficient and integral coefficient drift and sudden change in q-axis current setpoint, and improving speed response and steady-state control stability.

[0048] S103: Perform coordinate transformation on the three-phase stator current and rotor position angle to obtain d-axis current feedback value and q-axis current feedback value. Use the preset zero current as the d-axis current setpoint. Based on the d-axis current setpoint, the q-axis current setpoint of the current sampling period, the d-axis current feedback value, the q-axis current feedback value, and the rotor position angle, perform current closed-loop regulation, voltage conversion, and space vector pulse width modulation to generate a three-phase inverter switching signal. Drive the permanent magnet synchronous motor to run based on the three-phase inverter switching signal.

[0049] The controller generates a BP neural network weight update enable signal based on whether the current speed error is within a preset speed error dead zone, whether the q-axis current setpoint reaches a preset q-axis current limit boundary, and whether the change in the q-axis current setpoint reaches a preset rate of change constraint value. Let the weight update enable signal be... ,but: γ(k)=1, if |e(k)|>e0 and F lim (k)=0 and F rate (k)=0; γ(k)=0, otherwise in: Flim (k)=1 iff i qlim (k)≠u0(k), F rate (k)=1 iff i qref (k)≠i qlim (k) when When =1, it indicates that the current speed error exceeds the preset speed error dead zone, and the q-axis current setpoint has neither triggered amplitude limiting nor rate of change constraint. In this case, the BP neural network is allowed to update its weights. When = 0, it indicates that the system is in the speed error dead zone, q-axis current amplitude saturation, or q-axis current change rate saturation state. At this time, the BP neural network weight update is paused to avoid weight erroneous updates under steady-state small error or actuator nonlinear constraint state.

[0050] When the weight update enable signal is in the update-allowed state, the controller allows the BP neural network to update the weights. Specifically, the controller determines the output layer error signal based on the current normalized velocity error value, the smoothed controlled object sensitivity direction factor, the derivative of the output layer activation function, the partial derivative correlation terms of the incremental PI control law with respect to the proportional and integral channels, and the PI parameter mapping relationship. Based on the output layer error signal, the controller updates the weights from the hidden layer to the output layer using the adaptive learning rate and the inertia factor. Further, based on the output layer error signal and the weights from the hidden layer to the output layer before the update, the controller determines the hidden layer error signal and updates the weights from the input layer to the hidden layer using the hidden layer error signal, the adaptive learning rate, and the inertia factor. After the update, the weights from the input layer to the hidden layer and the weights from the hidden layer to the output layer are subjected to amplitude limiting.

[0051] when When the value is 0, the controller keeps the weights of the BP neural network unchanged. Therefore, when the permanent magnet synchronous motor is operating close to steady state, the drift of the proportional and integral coefficients caused by continuous updates of the BP neural network can be avoided; and when the q-axis current setpoint reaches the limit boundary or rate of change constraint boundary, mislearning based on speed error can be avoided under actuator-constrained conditions.

[0052] Furthermore, the controller estimates and smooths the sensitivity direction of the controlled object based on the difference between the actual rotational speed in the current sampling period and the actual rotational speed in the previous sampling period, as well as the difference between the final q-axis current setpoint applied to the q-axis current loop in the current sampling period and the final q-axis current setpoint in the previous sampling period. The smoothed sensitivity direction factor is used to determine the weight correction direction during the backpropagation process of the BP neural network, so as to reduce the impact of sampling noise and instantaneous disturbances on the weight update direction.

[0053] Specifically, such as Figure 5 As shown, in one embodiment, a vector control model of a permanent magnet synchronous motor is established based on a simulation platform to illustrate the specific implementation of the vector control method for a permanent magnet synchronous motor based on an improved BP neural network PI according to the present invention. The simulation model includes a target speed input module, an improved BP neural network PI control module, a d-axis current loop control module, a q-axis current loop control module, a coordinate transformation module, a space vector pulse width modulation module, a three-phase inverter module, a permanent magnet synchronous motor module, and a parameter acquisition and feedback module.

[0054] In this embodiment, the target speed is set to 1000 rpm, and the load torque T L The entire simulation was set to 0 N·m, and the total simulation time was set to 0.1 s. This embodiment evaluates the dynamic tracking performance of the system under no-load, wide-range speed regulation start-up conditions, illustrating the speed response performance and steady-state regulation performance of the control method described in this invention when the target speed is given by a step. Since the load torque T in this embodiment... L The viscous damping coefficient and static friction torque are set to 0 N·m, 0 N·m·s, and 0 N·m, respectively. Therefore, this embodiment is mainly used to illustrate the dynamic response effect during no-load start-up speed regulation and is not intended to limit the invention to no-load conditions. Furthermore, the DC bus voltage of the three-phase inverter is set to 311 V, the simulation model uses discrete simulation, and the sampling time is set to 1×10⁻⁶. -6 The discrete solution method adopts the Tustin / Backward Euler approach.

[0055] The permanent magnet synchronous motor adopts a three-phase sinusoidal back EMF circular rotor model, with the mechanical input being the load torque input terminal. The stator phase resistance of the permanent magnet synchronous motor is set to 2.875 Ω, and the armature inductance is set to 8.5 × 10⁻⁶ Ω. -3 H, the permanent magnet flux linkage is set to 0.175 Wb, and the moment of inertia is set to 0.001 kg·m. 2 The viscous damping coefficient is set to 0 N·m·s, the number of pole pairs is set to 4, and the static friction torque is set to 0 N·m. It should be noted that during the entire dynamic adjustment cycle from a stationary start-up with wide-range speed regulation to 1000 rpm, with the nonlinear evolution of speed and current, there are time-varying factors inside the motor, such as changes in back electromotive force, dq-axis coupling, and transient torque response caused by rotational inertia. These factors constitute the typical internal disturbance conditions that the outer loop of the vector control system needs to adapt to.

[0056] In the three-phase inverter module, the inverter adopts an IGBT / Diode universal bridge structure, with 3 bridge arms and an on-resistance of 1×10⁻⁶.-3 Ω, absorption resistor set to 1×10 5 The absorption capacitor is set to infinity (Ω). The three-phase inverter converts the DC bus voltage into a three-phase AC voltage based on the switching signal output from the space vector pulse width modulation module, and outputs it to the stator windings of the permanent magnet synchronous motor.

[0057] In the current loop control module, the d-axis current setpoint is set to 0. Both the d-axis and q-axis current loops use fixed-parameter PI controllers. Specifically, the proportional gain of the d-axis current loop PI controller is set to 17, and the integral gain to 287.5; the proportional gain of the q-axis current loop PI controller is set to 21.31, and the integral gain to 287.5. The output limits for both the d-axis and q-axis current loops are set to ±250, the initial output value is set to 0, and the sampling time is set to 1×10⁻⁶. -6 s.

[0058] In the improved BP neural network PI control module, the preset speed reference value ω is used. b Set to 1500, lower bound of learning rate η min Set to 0.01, upper limit of learning rate η max Set to 0.08, and the speed error dead zone threshold e0 is set to 2. The lower limit of the proportional coefficient K... pmin Set to 0.05, upper limit of scaling factor K pmax Set to 2, lower limit of integral coefficient K imin Set to 0.001, upper limit of integral coefficient K imax Set to 0.4. The upper limit of the q-axis current setpoint is set to 20, the lower limit to -20, and the constraint value for the rate of change of the q-axis current setpoint is set to 2. The sensitivity sign smoothing coefficient λ is set to 0.85, the inertia factor α is set to 0.10, and the weight limit range is set to ±5.

[0059] During the simulation, the target speed input module outputs a fixed target speed. The simulation performance comparison results of the traditional fixed-parameter PI controller and the improved BP neural network PI controller of this invention are as follows: Figure 6 As shown.

[0060] Depend on Figure 6 It can be seen that, in to approximately In the initial acceleration phase, both the traditional fixed-parameter PI control method and the method of this invention can rapidly bring the actual rotational speed close to the target rotational speed. to During the stabilization transition phase, the actual speed corresponding to the traditional fixed-parameter PI control method exhibits certain fluctuations, with the lowest speed value being approximately... The actual rotational speed fluctuation range corresponding to the method of the present invention is relatively small, and its minimum rotational speed is approximately [missing value]. .

[0061] The simulation results above demonstrate that, under the no-load start-up condition set in this embodiment, the method of the present invention can reduce speed fluctuations during the stabilization phase while maintaining a relatively fast speed response. This is because, when the speed error is large, the adaptive learning rate increases the weight update intensity of the BP neural network, making the proportional coefficient K... p (k) and integral coefficient K i (k) It can be adjusted according to the operating state; when the actual speed is close to the target speed and the speed error enters the preset speed error dead zone, the weight update enable signal becomes invalid, and the BP neural network suspends weight update, thereby reducing the risk of speed and q-axis current setpoint fluctuation caused by the continued change of PI parameters in the steady state stage.

[0062] In this simulation embodiment, the improved BP neural network PI control module reduces the influence of dimensions by input normalization, balances dynamic response and steady-state stability by adaptive learning rate, suppresses mislearning by pausing weight updates under the speed error dead zone and q-axis current-limited state, and reduces the risk of backpropagation direction misjudgment and output impact by sensitivity direction smoothing estimation and control output protection.

[0063] Furthermore, to verify the actual control effect of the control method of the present invention, this embodiment uses the traditional fixed parameter PI control method as a control and conducts comparative simulation verification under the same target speed input, the same permanent magnet synchronous motor parameters, the same inverter parameters, the same current loop PI parameters, and the same sampling time.

[0064] During the verification process, the actual speed curves, q-axis current setpoint curves, proportional coefficient variation curves, and integral coefficient variation curves for both the traditional fixed-parameter PI control method and the method of this invention were collected; among them, Figure 6 This is used to compare the actual speed response of the two control methods during the speed regulation and start-up phase.

[0065] The evaluation metrics for the verification data include speed rise time, maximum overshoot, stabilization time, steady-state speed fluctuation range, q-axis current peak value, q-axis current steady-state fluctuation range, and PI parameter steady-state drift. These evaluation metrics can be used to verify the control effectiveness of the present invention's control method from four aspects: speed response, steady-state fluctuation, current inrush, and parameter drift.

[0066] Depend on Figure 6The corresponding curve data shows that, under the same simulation conditions, the method of the present invention can reduce speed fluctuations during the stabilization phase while maintaining the ability to track speed quickly, and suppress sudden changes in the q-axis current setpoint and continuous drift of the PI parameter. This indicates that there is a synergistic effect between input normalization, adaptive learning rate, weight update enablement, sensitivity direction smoothing estimation, and control output protection.

[0067] It should be noted that the above-described motor parameters, inverter parameters, current loop PI parameters, BP neural network PI control parameters, and simulation settings are merely one embodiment used to illustrate the feasibility of the technical solution of this invention and do not constitute a limitation on the scope of protection. Those skilled in the art can make corresponding adjustments according to the motor specifications, inverter capacity, sampling period, and control performance requirements.

[0068] Example 2: To achieve the above objective, such as Figure 7 As shown, based on Embodiment 1, this invention discloses a vector control system for a PI permanent magnet synchronous motor based on an improved BP neural network, comprising: The data acquisition module 11 is used to acquire the target speed, actual speed, three-phase stator current, rotor position angle, speed error of the previous sampling period and q-axis current setpoint of the previous sampling period, determine the speed error of the current sampling period based on the target speed and actual speed, and perform normalization and amplitude limiting processing on the target speed, speed error of the current sampling period and actual speed to obtain the input vector. The data processing module 12 is used to input the input vector into the pre-established improved BP neural network model, and output the proportional coefficient and integral coefficient of the speed loop PI controller. Based on the preset incremental PI control law, the proportional coefficient, integral coefficient, speed error of the current sampling period, speed error of the previous sampling period, and the final q-axis current setpoint of the previous sampling period are processed to obtain the q-axis current setpoint of the current sampling period. The control output module 13 is used to perform coordinate transformation on the three-phase stator current and rotor position angle to obtain the d-axis current feedback value and the q-axis current feedback value. With the preset zero current as the d-axis current setpoint, the current closed-loop regulation, voltage conversion and space vector pulse width modulation are performed based on the d-axis current setpoint, the q-axis current setpoint of the current sampling period, the d-axis current feedback value and the q-axis current feedback value and the rotor position angle to generate a three-phase inverter switching signal. The permanent magnet synchronous motor is driven to run based on the three-phase inverter switching signal.

[0069] Based on the same inventive concept, this invention also provides a computer device, comprising: one or more processors, and a memory for storing one or more computer programs; the programs include program instructions, and the processor executes the program instructions stored in the memory. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, used to implement one or more instructions, specifically for loading and executing one or more instructions stored in a computer storage medium to implement the above-described method.

[0070] It should be further explained that, based on the same inventive concept, the present invention also provides a computer storage medium storing a computer program, which, when executed by a processor, performs the above-described method. This storage medium can be any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In the present invention, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0071] In the description of this specification, references to terms such as "an embodiment," "example," "specific example," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0072] The foregoing has shown and described the basic principles, main features, and advantages of this disclosure. Those skilled in the art should understand that this disclosure is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of this disclosure. Various changes and modifications can be made to this disclosure without departing from its spirit and scope, and all such changes and modifications fall within the scope of this disclosure as claimed.

Claims

1. A PI permanent magnet synchronous motor vector control method based on an improved BP neural network, characterized in that, The method includes the following steps: The target speed, actual speed, three-phase stator current, rotor position angle, speed error of the previous sampling period, and q-axis current setpoint of the previous sampling period are obtained. The speed error of the current sampling period is determined based on the target speed and actual speed. The target speed, speed error of the current sampling period, and actual speed are normalized and limited to obtain the input vector. The input vector is fed into a pre-established improved BP neural network model, and the output is the proportional coefficient and integral coefficient of the speed loop PI controller. Based on the preset incremental PI control law, the proportional coefficient, integral coefficient, speed error of the current sampling period, speed error of the previous sampling period, and the final q-axis current setpoint of the previous sampling period are processed to obtain the q-axis current setpoint of the current sampling period. Coordinate transformation is performed on the three-phase stator current and rotor position angle to obtain d-axis current feedback values ​​and q-axis current feedback values. A preset zero current is used as the d-axis current setpoint. Based on the d-axis current setpoint, the q-axis current setpoint of the current sampling period, the d-axis current feedback values, the q-axis current feedback values, and the rotor position angle, current closed-loop regulation, voltage conversion, and space vector pulse width modulation are performed to generate a three-phase inverter switching signal. The permanent magnet synchronous motor is driven to run based on the three-phase inverter switching signal.

2. The improved BP neural network-based PI permanent magnet synchronous motor vector control method according to claim 1, characterized in that, The process of normalizing and limiting the target rotational speed, the speed error of the current sampling period, and the actual rotational speed includes: The target speed, the current speed error, and the actual speed are normalized according to the preset speed reference value to obtain the normalized value of the target speed, the normalized value of the speed error, and the normalized value of the actual speed. The target rotational speed normalized value, the speed error normalized value, and the actual rotational speed normalized value are each limited to a preset input range; The input vector of the BP neural network is constructed based on the normalized target speed after amplitude limiting, the normalized speed error, and the normalized actual speed. 3.The PI permanent magnet synchronous motor vector control method based on the improved BP neural network of claim 1, wherein, The proportional coefficient and the integral coefficient are respectively obtained by mapping the output value of the BP neural network; wherein, the output value of the first output neuron is mapped to a preset lower limit of the proportional coefficient and a preset upper limit of the proportional coefficient to obtain the proportional coefficient; the output value of the second output neuron is mapped to a preset lower limit of the integral coefficient and a preset upper limit of the integral coefficient to obtain the integral coefficient. The proportional coefficient, the integral coefficient, and the q-axis current setpoint are subjected to amplitude limiting, and the rate of change of the q-axis current setpoint is constrained, including: The scaling factor is limited to a preset lower limit and a preset upper limit; The integral coefficient is restricted to a preset lower limit and a preset upper limit; The given value of the q-axis current is limited to between a preset lower limit and a preset upper limit of the q-axis current; The change in the q-axis current setpoint of the current sampling period relative to the q-axis current setpoint of the previous sampling period is limited to a preset rate of change constraint.

4. The improved BP neural network-based PI permanent magnet synchronous motor vector control method according to claim 1, characterized in that, The weight update process of the improved BP neural network model includes: The adaptive learning rate of the BP neural network is determined based on the speed error of the current sampling period, and the BP neural network weight update enable signal is generated based on the speed error of the current sampling period, the amplitude limiting state of the q-axis current setpoint, and the rate of change constraint state of the q-axis current setpoint. Specifically, when the speed error of the current sampling period exceeds the preset speed error dead zone, and the given value of the q-axis current does not trigger amplitude limiting or rate of change constraint, the BP neural network is allowed to update its weights according to the adaptive learning rate. When the speed error of the current sampling period is within the preset speed error dead zone, or the given value of the q-axis current triggers amplitude limiting, or the given value of the q-axis current triggers rate of change constraint, the BP neural network weight update is paused. Based on the actual speed change in the current sampling period and the final q-axis current setpoint change in the actual input q-axis current loop in the current sampling period, the sensitivity direction estimate of the controlled object is determined by a product sign determination method without division, and the sensitivity direction estimate of the controlled object is smoothed by first-order smoothing to obtain the smoothed sensitivity direction factor. When the BP neural network weight update enable signal is in the allowable update state, the smoothed sensitivity direction factor, the partial derivative correlation terms of the incremental PI control law with respect to the proportional and integral channels, and the adaptive learning rate are jointly introduced into the BP neural network backpropagation process to correct the weight update direction of the proportional coefficient and the integral coefficient.

5. The improved BP neural network-based PI permanent magnet synchronous motor vector control method according to claim 4, characterized in that, The improved BP neural network model includes an input layer, hidden layers, and an output layer; The inputs to the input layer include the target rotational speed, the speed error of the current sampling period, and the normalization value corresponding to the actual rotational speed. The hidden layer comprises multiple hidden layer neurons, and the hidden layer neurons use the hyperbolic tangent function as the activation function; The output layer includes two output neurons, which are used to generate the proportional coefficient and the integral coefficient, respectively. The hidden layer comprises seven hidden layer neurons, and the output layer uses the Sigmoid function as the activation function.

6. The improved BP neural network-based PI permanent magnet synchronous motor vector control method according to claim 5, characterized in that, The step of introducing the smoothed sensitivity direction factor, the partial derivatives of the incremental PI control law with respect to the proportional and integral channels, and the adaptive learning rate into the backpropagation process of the BP neural network includes: Based on the current sampling period velocity error e(k) and the previous sampling period velocity error e(k-1), determine the partial derivative correlation term of the incremental PI control law with respect to the output of the output layer neuron; Among them, the partial derivative related term corresponding to the proportional channel is H1(k)=e(k)-e(k-1), and the partial derivative related term corresponding to the integral channel is H2(k)=e(k); The error signal of the output layer neuron is determined based on the normalized value of the velocity error, the smoothed sensitivity direction factor, the partial derivative correlation term, the PI parameter mapping gain, and the derivative of the output layer activation function. The weights of the BP neural network are then updated based on the error signal of the output layer neuron and the adaptive learning rate.

7. The improved BP neural network-based PI permanent magnet synchronous motor vector control method according to claim 6, characterized in that, The step of determining the adaptive learning rate of the BP neural network based on the speed error of the current sampling period specifically includes: The learning rate of the BP neural network is determined based on the magnitude of the absolute value or normalized value of the velocity error in the current sampling period. The smaller the amplitude, the closer the learning rate is to the preset lower limit of the learning rate; the magnitude of the learning rate is positively correlated with the magnitude of the amplitude. The learning rate is then limited to a preset lower learning rate limit and a preset upper learning rate limit. The online updating of the weights of the BP neural network based on the learning rate includes: Determine whether the absolute value of the speed error in the current sampling period is greater than the preset speed error dead zone threshold, and determine whether the given value of the q-axis current triggers amplitude limiting and rate of change constraint; When the absolute value of the speed error of the current sampling period is greater than the preset speed error dead zone threshold, and the given value of the q-axis current does not trigger amplitude limiting and rate of change constraint, the weights of the BP neural network are updated using the adaptive learning rate. When the absolute value of the velocity error of the current sampling period is less than or equal to the preset velocity error dead zone threshold, or when the q-axis current setpoint triggers amplitude limiting, or when the q-axis current setpoint triggers rate of change constraint, the weights of the BP neural network remain unchanged.

8. The vector control method for a PI permanent magnet synchronous motor based on an improved BP neural network according to claim 7, characterized in that, The process of determining the sensitivity direction estimate of the controlled object using a product sign determination method without division, and then performing first-order smoothing on the sensitivity direction estimate of the controlled object, includes: The product sign method is used to determine the sign estimate of the controlled object's sensitivity in the current sampling period. The calculation formula is as follows: S(k) = sgn[(ω(k) - ω(k-1))(i qref (k) - i qref (k-1))] In the formula, ω(k) is the actual speed in the current sampling period, ω(k-1) is the actual speed in the previous sampling period, i qref (k) is the final q-axis current given value actually applied to the q-axis current loop in the current sampling period, i qref (k-1) is the final q-axis current given value actually applied to the q-axis current loop in the previous sampling period; a first-order low-pass filtering algorithm is adopted to smooth S(k) to obtain the smoothed sensitivity direction factor: S f (k)=λS f (k-1)+(1-λ)S(k) In the formula, S f (k-1) is the sensitivity direction factor smoothed in the last sampling period, and λ is a preset smoothing coefficient and satisfies 0<λ<1. When the actual change in rotational speed or the change in the final q-axis current is less than a preset small threshold, the smoothed sensitivity direction factor of the previous sampling period remains unchanged.

9. A vector control system for a permanent magnet synchronous motor based on an improved BP neural network PI, characterized in that, include: The data acquisition module is used to acquire the target speed, actual speed, three-phase stator current, rotor position angle, speed error of the previous sampling period, and q-axis current setpoint of the previous sampling period. Based on the target speed and actual speed, the speed error of the current sampling period is determined. The target speed, speed error of the current sampling period, and actual speed are normalized and limited to obtain the input vector. The data processing module is used to input the input vector into the pre-established improved BP neural network model and output the proportional coefficient and integral coefficient of the speed loop PI controller. Based on the preset incremental PI control law, the proportional coefficient, integral coefficient, speed error of the current sampling period, speed error of the previous sampling period, and the final q-axis current setpoint of the previous sampling period are processed to obtain the q-axis current setpoint of the current sampling period. The control output module is used to perform coordinate transformation on the three-phase stator current and rotor position angle to obtain d-axis current feedback value and q-axis current feedback value. With a preset zero current as the d-axis current setpoint, the module performs current closed-loop regulation, voltage conversion, and space vector pulse width modulation based on the d-axis current setpoint, the q-axis current setpoint of the current sampling period, the d-axis current feedback value, the q-axis current feedback value, and the rotor position angle to generate a three-phase inverter switching signal. The module then drives the permanent magnet synchronous motor to run based on the three-phase inverter switching signal.

10. A terminal device, comprising a memory and a processor, characterized in that, The memory stores a computer program, and when the processor loads and executes the computer program, it implements the vector control method for a PI permanent magnet synchronous motor based on an improved BP neural network, as described in any one of claims 1 to 8.