Intelligent Motor Efficiency Optimization Method and Device for Electric Scooters

Through real-time operating condition identification and classification, mathematical modeling and dynamic power distribution, combined with Markov decision-making process and Lyapunov stability theory, the problems of insufficient power response and low energy efficiency of electric scooters under complex road conditions are solved, and efficient and stable motor control is achieved.

CN119795943BActive Publication Date: 2025-05-27SHENZHEN LEQI INTELLIGENT TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510253196.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-05
Publication Date
2025-05-27
Estimated Expiration
2045-03-05

AI Technical Summary

Technical Problem

Traditional electric scooters have problems of insufficient power response and low energy utilization efficiency under complex road conditions and diversified driving requirements, and the existing motor control methods lack adaptability to dynamic working conditions.

Method used

By collecting the driving parameters of the electric scooter in real time, performing working conditions classification processing, establishing mathematical modeling of the dual motor system, dynamically allocating motor power, optimizing power distribution strategies using Markov decision-making process and approximate dynamic programming, and performing system stability analysis and online parameter correction through Lyapunov function.

Benefits of technology

It realizes dynamic optimization of motor parameters while ensuring control stability, improves the system's energy utilization efficiency and dynamic response performance, and enhances the adaptability to different driving scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119795943B_ABST
    Figure CN119795943B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of motor efficiency optimization, and discloses an intelligent motor efficiency optimization method and device for an electric scooter. The method includes: collecting the driving parameters of the electric scooter in real time, and performing working condition classification processing on the driving parameters to obtain constant speed cruise working condition data and dynamic acceleration working condition data; performing mathematical modeling on the dual-motor system to establish an electromagnetic model, a mechanical transmission model, and a thermal model to obtain system efficiency constraint conditions; performing dynamic distribution calculation on the motor power to obtain S-shaped power distribution function parameters; inputting into a Markov decision process model, performing optimization calculation on the state space and the action space to obtain an optimal power distribution strategy; performing proximal policy optimization calculation on the control parameters to obtain real-time control parameters; and performing correction using a Lyapunov function to obtain a target motor control strategy. The present invention realizes the dynamic optimization of parameters while ensuring the control stability of the electric scooter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of motor efficiency optimization, and particularly to an intelligent motor efficiency optimization method and device for an electric scooter. Background Art

[0002] Traditional electric scooters usually adopt a single-motor drive mode. When facing complex road conditions and diverse driving requirements, there are often problems such as insufficient power response and low energy utilization efficiency, making it difficult to meet users' requirements for driving experience.

[0003] To solve these problems, a dual-motor drive system has gradually been applied to electric scooters. However, the dual-motor system faces more complex control problems during actual operation. Due to the non-linearity of motor operating characteristics, the dynamic changes in driving conditions, and the uncertainty of system parameters, how to optimize energy utilization efficiency while ensuring power performance has become a technical problem to be solved urgently. In addition, most of the existing motor control methods are mainly static optimization, lacking the ability to adapt to dynamic conditions and being difficult to make timely and effective power adjustments for different driving scenarios. Summary of the Invention

[0004] The present invention provides an intelligent motor efficiency optimization method and device for an electric scooter. While ensuring the control stability of the electric scooter, the present invention realizes the dynamic optimization of parameters.

[0005] In a first aspect, the present invention provides an intelligent motor efficiency optimization method for an electric scooter. The intelligent motor efficiency optimization method for the electric scooter includes:

[0006] Collect the driving parameters of the electric scooter in real time, and perform working condition classification processing on the driving parameters to obtain constant-speed cruise working condition data and dynamic acceleration working condition data;

[0007] Based on the constant-speed cruise working condition data and the dynamic acceleration working condition data, perform mathematical modeling on the dual-motor system, establish an electromagnetic model, a mechanical transmission model, and a thermal model to obtain system efficiency constraint conditions;

[0008] According to the system efficiency constraint conditions, perform dynamic distribution calculation on the motor power to obtain S-shaped power distribution function parameters;

[0009] Input the S-shaped power distribution function parameters into the Markov decision process model, and perform optimization calculation on the state space and action space through approximate dynamic programming to obtain the optimal power distribution strategy;

[0010] According to the optimal power distribution strategy, perform proximal policy optimization calculation on the control parameters to obtain real-time control parameters;

[0011] Based on the real-time control parameters, the Lyapunov function is used for system stability analysis and online parameter correction to obtain the target motor control strategy.

[0012] In a second aspect, the present invention provides an intelligent motor efficiency optimization system for an electric scooter, and the intelligent motor efficiency optimization system for the electric scooter includes:

[0013] An acquisition module, configured to collect the driving parameters of the electric scooter in real time, and perform working condition classification processing on the driving parameters to obtain constant-speed cruise working condition data and dynamic acceleration working condition data;

[0014] A modeling module, configured to perform mathematical modeling on the dual-motor system based on the constant-speed cruise working condition data and the dynamic acceleration working condition data, establish an electromagnetic model, a mechanical transmission model, and a thermal model, and obtain system efficiency constraint conditions;

[0015] An allocation module, configured to perform dynamic allocation calculation on the motor power according to the system efficiency constraint conditions to obtain S-shaped power allocation function parameters;

[0016] A calculation module, configured to input the S-shaped power allocation function parameters into a Markov decision process model, and perform optimization calculation on the state space and the action space through approximate dynamic programming to obtain an optimal power allocation strategy;

[0017] An optimization module, configured to perform proximal policy optimization calculation on the control parameters according to the optimal power allocation strategy to obtain real-time control parameters;

[0018] A correction module, configured to perform system stability analysis and online parameter correction by using the Lyapunov function based on the real-time control parameters to obtain a target motor control strategy.

[0019] In a third aspect of the present invention, there is provided a computer device, including: a memory and at least one processor, wherein instructions are stored in the memory; the at least one processor invokes the instructions in the memory so that the computer device executes the above-mentioned intelligent motor efficiency optimization method for the electric scooter.

[0020] In a fourth aspect of the present invention, there is provided a computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium, and when the instructions are run on a computer, the computer is made to execute the above-mentioned intelligent motor efficiency optimization method for the electric scooter.

[0021] In the technical solution provided by the present invention, through real-time working condition recognition and classification technology, combined with deep learning methods, the driving state is accurately divided, effectively improving the recognition accuracy of the system for different driving conditions and providing an accurate data basis for subsequent control strategy optimization; by adopting an S-shaped power distribution function, smooth power switching of the dual-motor system is achieved, avoiding impacts during the working condition switching process. At the same time, by dynamically adjusting the function parameters, optimal power distribution under different working conditions is ensured; the Markov decision process and approximate dynamic programming methods are introduced, enabling the system to have predictive control capabilities, being able to predict the optimal control strategy based on historical data and the current state, and enhancing the dynamic response performance of the system; based on the proximal policy optimization algorithm, the control parameters are adjusted in real time. By setting reasonable objective functions and constraint conditions, dynamic optimization of the parameters is achieved while ensuring control stability; the Lyapunov stability theory is used for system analysis and correction. Through an online parameter adjustment mechanism, stable operation of the system under various working conditions is ensured, and the robustness of the control algorithm is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0023] Figure 1 It is a schematic diagram of the steps of the intelligent motor efficiency optimization method for an electric scooter in an embodiment of the present invention;

[0024] Figure 2 It is a schematic diagram of the structure of the intelligent motor efficiency optimization system for an electric scooter in an embodiment of the present invention;

[0025] Figure 3 It is a schematic block diagram of the structure of a computer device in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0026] An embodiment of the present invention provides an intelligent motor efficiency optimization method and device for an electric scooter. Terms such as "first", "second", "third", "fourth", etc. (if any) in the specification, claims and the above-mentioned drawings of the present invention are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances so that the embodiments described here can be implemented in an order other than that illustrated or described here. In addition, the term "comprising" or "having" and any variation thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0027] For ease of understanding, the specific process of the embodiment of the present invention will be described below. Please refer to Figure 1 , an embodiment of the intelligent motor efficiency optimization method for an electric scooter in the embodiment of the present invention includes:

[0028] Step S1, collect the driving parameters of the electric scooter in real time, and perform working condition classification processing on the driving parameters to obtain constant speed cruise working condition data and dynamic acceleration working condition data;

[0029] It can be understood that the execution subject of the present invention can be an intelligent motor efficiency optimization system of an electric scooter, or a terminal or a server, and specific limitations are not made here. The embodiment of the present invention takes the server as the execution subject as an example for illustration.

[0030] Specifically, the operation data of the electric scooter within the sampling period is collected to obtain vehicle speed data, acceleration data, motor speed data, current data, and temperature data. The time-domain characteristics of the vehicle speed data and acceleration data are calculated. By calculating the speed change rate and acceleration change rate, the change in the motion state of the scooter at different time periods can be effectively reflected. Based on the speed change rate and acceleration change rate, a threshold judgment is made on the driving state. By comparing the changes in speed and acceleration with a preset standard, different driving states are distinguished. If the speed change rate and acceleration change rate are lower than a specific threshold, it is considered that the scooter is in a stable constant-speed cruise state; if the speed change rate or acceleration change rate exceeds this threshold, it is considered that the scooter is performing a dynamic acceleration operation. Through the threshold judgment, a specific working condition discrimination result is obtained. Based on the working condition discrimination result, the motor speed data and current data are segmented to obtain power demand data. The data under different working conditions are processed separately to more accurately analyze the change in power demand. For example, in the constant-speed cruise working condition, the power demand of the motor is usually relatively stable, while in the dynamic acceleration working condition, the motor power demand will increase rapidly. Through this step, the energy demand of the electric scooter in different states is obtained. According to the power demand data and temperature data, the energy loss value per unit time is calculated to obtain energy consumption characteristic data. The energy consumption characteristic data is processed for working condition characteristic matching. The data with a speed change rate less than the preset threshold is classified as the constant-speed cruise working condition, and the data with a speed change rate greater than or equal to the preset threshold is classified as the dynamic acceleration working condition. The constant-speed cruise working condition and the dynamic acceleration working condition are respectively associated with the corresponding energy consumption characteristic data to obtain a working condition-energy consumption mapping relationship. Based on this mapping relationship, the working conditions of the scooter are classified in real time during the real-time operation to obtain constant-speed cruise working condition data and dynamic acceleration working condition data.

[0031] Step S2: Based on the constant-speed cruise working condition data and dynamic acceleration working condition data, a mathematical model of the dual-motor system is established, including an electromagnetic model, a mechanical transmission model, and a thermal model, to obtain the system efficiency constraint conditions;

[0032] Specifically, a mathematical model of the dual-motor system is established based on constant-speed cruise condition data and dynamic acceleration condition data. To establish the electromagnetic model, mechanical transmission model, and thermal model of the system, key parameters such as voltage, current, and rotational speed are extracted from the acquisition period to form a condition characteristic parameter matrix, which describes the operating state of the electric scooter under different conditions. Correlation operations are performed on the voltage and current data in the condition characteristic parameter matrix to describe the electromagnetic characteristics inside the motor. Through the operations, the flux linkage equation of the motor is obtained, which can reflect the interaction between the internal magnetic field of the motor and the voltage and current. The flux linkage equation is linearized to obtain the electromagnetic model. According to the rotational speed parameter and tire radius parameter in the condition characteristic parameter matrix, the torque output data and transmission loss data of the dual-motor system are calculated. The combination of the rotational speed parameter and the tire radius can describe the motion state of the scooter on the ground, thereby deriving the output torque generated by the motor. On this basis, combined with the friction and other loss factors generated during the mechanical transmission process, the mechanical transmission loss data of the system are obtained. These data are summarized to form a mechanical transmission model, which describes the energy conversion process from the motor to the wheels and the energy losses therein. The temperature data in the constant-speed cruise condition data and dynamic acceleration condition data are substituted into the heat balance calculation formula to calculate the copper loss and iron loss inside the motor. Copper loss is the heat generated by the motor current passing through the winding resistance, while iron loss is the loss caused by the change of the motor magnetic field. By comprehensively considering these two losses, the thermal characteristics of the dual-motor system under different operating states are obtained to form a thermal model. Correlation analysis is performed on the output data of the electromagnetic model, the output data of the mechanical transmission model, and the output data of the thermal model to obtain the system operating state characteristic data, which reflect the overall performance of the motor system under different conditions, including aspects such as energy conversion efficiency, loss characteristics, and heat generation. Based on the system operating state characteristic data, the operating efficiency curve of the dual-motor system under different conditions is calculated to obtain the efficiency distribution map of the system, which shows the efficiency changes of the motor system in various states, helping the system to find the optimal operating area of the system and the existing efficiency bottlenecks. Based on the efficiency distribution map, upper limit constraint thresholds for the motor rotational speed, torque, and temperature are set to ensure that the motor system operates within a safe and reliable range. The upper limits of the motor rotational speed, torque, and temperature are determined according to the boundary conditions of the higher-efficiency area in the efficiency distribution map. These constraint thresholds help protect the motor from overload and overheating damage and ensure that the system operates in the high-efficiency area. The system operating boundary parameters are normalized and matched with the condition characteristic parameter matrix, and finally the efficiency constraint conditions of the system are obtained.

[0033] Step S3: According to the system efficiency constraint conditions, perform dynamic allocation calculation on the motor power to obtain the S-shaped power allocation function parameters;

[0034] Specifically, data normalization is performed on the upper limit of rotational speed, the upper limit of torque, and the upper limit of temperature in the system efficiency constraint conditions, converting these different physical quantities into quantities with the same dimension under the same standard, and obtaining the maximum power limit parameter P of the motor. max , P max is an important parameter for the maximum power output that the motor can withstand under various constraint conditions, providing boundary conditions for subsequent power distribution. According to the formula , an S-shaped distribution function is established, where P(x) is the distributed power value of a single motor, k is the curve adjustment coefficient, and x 0 is the power distribution critical point, x is the load demand ratio, and the initial model of the S-shaped function is obtained. Through this formula, the power distribution curve of the motor under different load demands is described. The S-shaped curve helps to achieve smooth power distribution between low loads and high loads, thus avoiding the impact on the motor and the overall system caused by sudden changes. Interval statistical processing is performed on the constant-speed cruise condition data to adjust the parameters of the S-shaped function. For the constant-speed cruise condition, since the system operates at a stable speed, a relatively gentle power distribution curve is required to ensure that the energy output of the system can be slowly adjusted according to the load demand. The adjustment coefficient k value is set to 0.5, obtaining a relatively smooth power distribution curve and enabling the motor to reduce power fluctuations in the stable state and maintain efficient operation. Through this process, the power distribution parameter group under the constant-speed condition is obtained, which is used to describe the power distribution characteristics of the motor in the constant-speed cruise state. Corresponding processing is performed on the dynamic acceleration condition. Under the dynamic acceleration condition, the power demand of the motor usually changes rapidly, so a power distribution curve with a large slope is required to be able to quickly respond to the changing demand of the load. The adjustment coefficient k value is set to 2.0, obtaining a steep power distribution curve, enabling the motor to quickly increase power output under dynamic conditions to meet the instantaneous acceleration demand. Through this step, the power distribution parameter group under the dynamic condition is obtained, and these parameters help to ensure that the motor can quickly respond to load changes during the acceleration process, thereby improving the dynamic performance of the scooter. Based on the power distribution parameter group under the constant-speed condition, calculate the optimal solution of x 0 in the range of 0.3 to 0.4, and obtain the critical point parameter under the constant-speed condition. This critical point parameter is used to ensure that the motor can gradually and smoothly enter the power output state under low load conditions. For the dynamic condition, by calculating x in the range of 0.6 to 0.7 0The optimal solution is obtained to get the critical point parameters of the dynamic working condition, ensuring that the motor can quickly enter the high-power output state when the load demand is large and achieve timely response to load changes. To achieve effective switching between working conditions, a working condition switching rule is established based on the critical point parameters of the constant-speed working condition and the dynamic working condition, and a working condition response function is obtained. The function of the working condition response function is that when the running state of the scooter switches from a stable constant-speed state to a dynamic state that requires acceleration, it can quickly adjust the power distribution strategy to ensure that the motor can distribute power in the optimal way under different working conditions, improving the overall efficiency and dynamic response performance of the system. Combine the working condition response function with the maximum power limit parameter P of the motor max to obtain the S-shaped power distribution function parameters. The S-shaped power distribution function parameters can automatically adjust the power output of the motor according to the real-time running state of the scooter, ensuring stable power distribution during constant-speed cruising and rapid power increase during acceleration, and maximizing the system efficiency. At the same time, this power distribution function can also effectively avoid problems such as overload or overheating of the motor during operation, ensuring good stability and safety of the entire system while operating efficiently.

[0035] Step S4: Input the S-shaped power distribution function parameters into the Markov decision process model, and perform optimization calculations on the state space and action space through approximate dynamic programming to obtain the optimal power distribution strategy;

[0036] Specifically, combine the working condition response function with the S-shaped power distribution function parameters to construct a motor control state vector, which includes the working condition type, vehicle speed, motor efficiency, and the S-shaped power distribution function parameters k and x 0 , forming Markov state space data, where each state point completely describes the running characteristics of the electric scooter at a certain moment. Construct the action space based on the Markov state space data. In the action space, set the adjustment ranges of the S-shaped power distribution function parameters k and x 0 , where the adjustment range of the k value is ±0.2, and x 0The adjustment range is ±0.1. This enables fine-tuning of the motor power output in the power distribution strategy to meet the requirements of different working conditions and obtain the action space parameters. To optimize the power distribution strategy, a reward function R(s,a) is constructed to evaluate the advantages and disadvantages of different strategies. According to the rotational speed limit, torque limit, and temperature limit in the system efficiency constraint conditions, the reward function is set as a weighted calculation of system efficiency, energy loss, and dynamic response. The weight of system efficiency is set to 0.4, the weight of energy loss is set to 0.3, and the weight of dynamic response is set to 0.3. This weighting method ensures that the electric scooter can balance efficiency, energy consumption, and dynamic response under different working conditions to achieve optimal control objectives. Through this reward calculation function, the effects of each state-action combination are effectively evaluated, thereby guiding the optimization direction of Markov decision-making. Calculate the state transition probability for the Markov state space data. In the Markov decision-making process, the state transition probability describes the likelihood of the system transitioning from one state to another. To accurately describe the characteristics of this state transition, a Gaussian distribution is used to model the state transition probability. The variance of the Gaussian distribution is set to 0.1, which ensures the randomness of state transitions while not deviating too far from the current state, thus maintaining the stability of the system. On this basis, a state transition matrix is obtained, which is used to describe the possible transition results of each state under the influence of actions. Based on the state transition matrix and the reward calculation function, a three-layer neural network structure is constructed for approximate calculation of the value function. This neural network includes an input layer, a hidden layer, and an output layer. The number of nodes in the input layer is the dimension of the state, while the number of nodes in the hidden layer is twice the dimension of the state to enhance the network's expressive ability. The number of nodes in the output layer is 1, which is used to output the value of each state. This value function approximation network is used to evaluate the long-term rewards of each state. By continuously learning and adjusting the network parameters, it can gradually approach the optimal value function. To enable the value function approximation network to effectively describe the value of the system, it is iteratively optimized. During the optimization process, the learning rate is set to 0.01 to ensure that the step size during each parameter update is not too large, maintaining the gradual adjustment of the network. At the same time, the discount factor is set to 0.9 to balance the relationship between short-term and long-term rewards. The temporal difference algorithm is used to update the network parameters. This algorithm updates the network weights by using the difference between the current state and the next state, which can effectively accelerate the learning process and converge to the optimal value function faster. Set the ε-greedy strategy according to the optimal value function to balance exploration and exploitation. The initial exploration rate of the ε-greedy strategy is set to 0.3, which means that there is a 30% probability of random exploration in the initial stage to find possible better strategies. The exploration rate is gradually reduced at a decay rate of 0.995. As the training process progresses, the system gradually reduces randomness and relies more on existing knowledge for power distribution, thereby improving efficiency and stability.In this way, the exploration strategy parameters are obtained to ensure that the system can effectively explore the state space in the initial stage of training and gradually stabilize at the optimal strategy in the later stage of training. The exploration strategy parameters are applied to the sampling process of the state transition matrix, and through policy iteration calculation, the optimal power allocation strategy is gradually approximated. This optimal power allocation strategy can achieve the optimal motor power output under different working conditions, thereby effectively improving the energy utilization efficiency of the system and ensuring sufficient power response during dynamic acceleration. During constant-speed cruising, the system can maintain efficient power output and reduce energy waste. At the same time, by dynamically adjusting the power allocation of the motor, it can adapt to various complex operating environments and ensure that the electric scooter achieves the optimal performance under safe and stable conditions. This optimization method enables the system to achieve adaptive adjustment in a dynamically changing environment through the modeling of the Markov decision process and the approximate calculation of the neural network, thereby improving the overall energy efficiency and performance.

[0037] Step S5: According to the optimal power allocation strategy, perform proximal policy optimization calculation on the control parameters to obtain real-time control parameters;

[0038] Specifically, perform state parameter analysis on the optimal power allocation strategy to extract the S-shaped power allocation function parameters k and x under the current working condition 0 , and obtain the strategy parameters for initial optimization. Through the objective function for optimization construction, where J(θ) is the optimization objective function, θ is the set of strategy parameters to be optimized, E[·] represents the expected value calculation symbol, R t is the cumulative reward value at time t, α is the penalty factor, is the relative entropy between the old and new policy distributions, which is used to measure the degree of change in policy update, and represent the policy distributions before and after optimization respectively. Through this optimization objective function, while keeping the policy distributions as close as possible, maximize the cumulative reward value to achieve the goal of balancing exploration and stability. To calculate the cumulative reward value R t, set the time step to 0.1 seconds and adopt a sliding time window with a window size of 10 time steps. Within this sliding window, calculate using the method of weighted accumulation of reward values, where the weight coefficient gradually decays over time, and the decay coefficient is set to 0.9. Through the reward calculation sequence, describe the running effect of the scooter in a short period of time, highlighting the reward at the current moment, and at the same time considering the reward accumulation over a past period of time, which helps to improve the effectiveness and robustness of the strategy. Calculate the KL divergence value of the old and new policy distributions based on the initial parameters of the policy to measure the degree of policy change during the optimization process. Set the penalty factor α to 0.01, and calculate the relative entropy based on the mean and variance of the policy distribution to obtain the policy update constraint, thereby avoiding drastic changes in the policy during the optimization process and maintaining the stability of the system. Calculate the gradient of the objective function according to the reward calculation sequence and the policy update constraint, and use the Adam optimizer for parameter update. The Adam optimizer is a gradient optimization method that achieves efficient parameter update by combining the estimates of the first and second moments. In the use of the Adam optimizer, the first moment estimation coefficient β 1 is set to 0.9, and the second moment estimation coefficient β 2 is set to 0.999, and the learning rate is 0.001. Through these settings, the pace of parameter update can be effectively controlled to ensure that each iteration can gradually approach the optimal value and obtain the optimized control parameters. To ensure that the optimized control parameters are within a reasonable range, limit their range. Limit the value of the curve adjustment coefficient k within the interval [0.3, 2.5] to avoid the power distribution being too flat or too steep, which affects the response ability of the system. At the same time, set the power distribution critical point x 0The value is restricted within the interval of [0.2, 0.8] to ensure that the critical point of power distribution does not deviate from the normal operating range, making the power output of the motor more reasonable. After the correction process, the corrected control parameters are obtained for subsequent control processes. Based on the corrected control parameters, a state feedback model of the controller is constructed to ensure that the motor of the electric scooter can effectively adjust the power output during real-time operation. The state variables in the state feedback model include the motor speed deviation, torque deviation, and temperature deviation, and through these variables, the key deviation information during motor operation is reflected. To achieve high-precision control, the sampling period of the controller is set to 0.02 seconds, so as to ensure the update and feedback of the system state within a short time and achieve the goal of real-time control. In this way, the model parameters of the controller are established. The controller model parameters are substituted into the PID control structure to achieve precise control of the motor. In the PID controller, the proportional coefficient is set to 2, the integral coefficient is set to 0.1, and the differential coefficient is set to 0.05 for the motor speed deviation. The proportional coefficient is used to control the response speed of the system to ensure that the motor can quickly make adjustments when deviating from the target speed; the integral coefficient is used to eliminate the steady-state error and reduce the deviation accumulation of the system by accumulating past deviations; the differential coefficient is used to suppress overshoot, and by controlling the change speed of the deviation, the overshoot phenomenon during system adjustment can be reduced. Through the PID control structure, combined with the corrected control parameters, efficient and stable control of the electric scooter motor is achieved, and real-time control parameters are obtained to ensure that the motor can maintain high-efficiency operation under various operating conditions, improving the overall energy efficiency and performance.

[0039] Step S6: Based on the real-time control parameters, use the Lyapunov function for system stability analysis and online parameter correction to obtain the target motor control strategy.

[0040] Specifically, construct the Lyapunov function according to the real-time control parameters , where V(m) is the system energy function, m is the system state vector including motor speed deviation, torque deviation, and temperature deviation, T represents the transpose of the system state vector, P is a symmetric positive definite matrix used to measure the weight of state deviation, τ is the time variable, s(τ) is the output value of the actual S-shaped function at time τ, s*(τ) is the output value of the desired S-shaped function at time τ, ∫(s(τ) - s*(τ)) 2$d\tau$ represents the integral term of the S-shaped function output error. By constructing a Lyapunov function, the energy change of the system under different states is described, and the stability of the system is judged by the value of the function. The time derivative operation is performed on the Lyapunov function to obtain $dV(m) / dt$, that is, the rate of change of the system energy with time. After substituting the real-time control parameters into the calculation, the instantaneous energy change of the system is obtained. When $dV(m) / dt \lt 0$, it means that the system energy is gradually decreasing and the system tends to be stable. Through this step, a stability discriminant of the system is constructed, so as to judge the stability of the electric scooter motor system under different control parameter conditions. Based on the system stability discriminant, a stability constraint condition matrix is constructed, and the stability threshold is set as $dV(m) / dt \lt -0.01$, which means that it is necessary to ensure that the system energy drops fast enough to ensure the stability of the system. Through this setting, the boundary conditions for online correction are obtained, which are used to limit the change range of the system state deviation, so that the system is always in a stable operating state. To improve the reliability of the system, a parameter sensitivity analysis is carried out on the boundary conditions for online correction. By calculating the ratio of the parameter change amount to the change amount of the system stability discriminant, the influence degree of each parameter on the system stability is measured. In the parameter sensitivity analysis, the nominal value of the parameter with a change amount of 1% is taken. Through this small perturbation, a parameter sensitivity matrix is obtained, and each item in the matrix represents the influence of a specific parameter change on the system stability. Through analysis, the parameter with the greatest influence on the system stability is found, providing a direction for subsequent correction. Based on the parameter sensitivity matrix, the importance of the real-time control parameters is sorted, and the parameters with sensitivity values greater than 0.5 are selected as the correction objects to obtain the set of parameters to be corrected. The parameters to be corrected are the parts that have the most significant influence on the system stability. By precisely adjusting them, the stability and response performance of the system are significantly improved. An online parameter correction model is constructed based on the set of parameters to be corrected, and the gradient descent method is used to iteratively optimize these parameters. To ensure that the optimization process can effectively reduce the system energy change rate, the loss function is set as the negative value of the time derivative $dV(m) / dt$ of the Lyapunov function. The optimization goal is to make the system energy decrease as fast as possible, thereby enhancing the stability of the system. In the optimization process, the maximum number of iterations is set to 100 times, and the learning rate is set to 0.005 to ensure that the parameters can be gradually adjusted to approach the optimal value, and the corrected parameter values are obtained. The stability of the corrected parameter values is verified to ensure that the optimized parameters can meet the requirements of system stability. The updated parameters are substituted into the Lyapunov function for calculation to obtain the stability index of the system. In this process, it is checked whether $dV(m) / dt$ is less than 0 at all sampling points to ensure that the system is stable in each operating state. To find the optimal parameter combination, the parameter combination with $dV(m) / dt$ being negative and the minimum mean value at all sampling points is selected as the final control strategy. Through the above steps, the target motor control strategy is finally obtained.This strategy can dynamically adjust control parameters according to the state deviation of the system during real-time operation, ensuring that the motor maintains optimal efficiency and stability under different working conditions.

[0041] In the embodiments of the present invention, through real-time working condition identification and classification technology, combined with deep learning methods, the driving state is accurately divided, effectively improving the recognition accuracy of the system for different driving conditions and providing an accurate data basis for subsequent control strategy optimization; an S-shaped power distribution function is adopted to achieve smooth power switching of the dual-motor system, avoiding impacts during the working condition switching process. At the same time, by dynamically adjusting the function parameters, optimal power distribution under different working conditions is ensured; the Markov decision process and approximate dynamic programming methods are introduced, enabling the system to have predictive control capabilities, being able to predict the optimal control strategy based on historical data and the current state, and improving the dynamic response performance of the system; based on the proximal policy optimization algorithm, the control parameters are adjusted in real time. By setting reasonable objective functions and constraint conditions, dynamic optimization of the parameters is achieved while ensuring control stability; the Lyapunov stability theory is used for system analysis and correction. Through the online parameter adjustment mechanism, stable operation of the system under various working conditions is ensured, and the robustness of the control algorithm is improved.

[0042] In a specific embodiment, the process of executing step S1 may specifically include the following steps:

[0043] Collect the operation data of the electric scooter within the sampling period to obtain vehicle speed data, acceleration data, motor speed data, current data, and temperature data;

[0044] Calculate the time-domain characteristics of the vehicle speed data and acceleration data to obtain the speed change rate and acceleration change rate, and perform threshold judgment on the driving state based on the speed change rate and acceleration change rate to obtain the working condition discrimination result;

[0045] Based on the working condition discrimination result, segment the motor speed data and current data to obtain power demand data, and calculate the energy loss value per unit time based on the power demand data and temperature data to obtain energy consumption characteristic data;

[0046] Match the energy consumption characteristic data with the working condition characteristics. Classify the data with a speed change rate less than the preset threshold as the constant speed cruise working condition, and classify the data with a speed change rate greater than or equal to the preset threshold as the dynamic acceleration working condition;

[0047] Associate the constant speed cruise working condition and the dynamic acceleration working condition with the corresponding energy consumption characteristic data respectively to obtain the working condition-energy consumption mapping relationship, and perform real-time classification based on the working condition-energy consumption mapping relationship to obtain the constant speed cruise working condition data and the dynamic acceleration working condition data.

[0048] Specifically, multiple important data generated during the operation of the scooter are collected, including vehicle speed data, acceleration data, motor speed data, current data, and temperature data. For example, the vehicle speed is obtained through a speed sensor, the acceleration is measured by an acceleration sensor, the motor speed is measured by a tachometer built into the motor, the current data is obtained through a Hall effect sensor, and the temperatures of the motor and control system are measured by temperature sensors. The sampling period is the frequency of data collection. Time-domain feature calculations are performed on the vehicle speed data and acceleration data to obtain the rate of change of speed and the rate of change of acceleration. The rate of change of speed is defined as:

[0049] ;

[0050] where, represents the rate of change of speed at time , represents the vehicle speed at the current moment, is the vehicle speed at the previous sampling moment, is the sampling time interval. Similarly, the rate of change of acceleration is calculated by a similar formula:

[0051] ;

[0052] where, represents the rate of change of acceleration, represents the acceleration at the current moment, is the acceleration value at the previous moment, is the sampling interval. By calculating the time-domain features of the vehicle speed and acceleration, the motion state of the scooter is reflected. Based on the rate of change of speed and the rate of change of acceleration, a threshold judgment is made on the driving state of the scooter to obtain the discrimination result of the working condition. A preset threshold of the rate of change of speed is set. If the rate of change of speed is less than this threshold, it is considered that the scooter is in the constant-speed cruise working condition state; otherwise, it is considered to be in the dynamic acceleration working condition. The threshold judgment enables the system to quickly distinguish different working condition states. After obtaining the discrimination result of the working condition, the motor speed data and current data are segmented to obtain the power demand data of the scooter under different working conditions. The power demand is calculated by the following formula:

[0053] ;

[0054] where, represents the power demand at time , is the motor voltage, is the current. Through segmentation processing, the power demands under the constant-speed cruise and dynamic acceleration working conditions are calculated respectively, and the energy loss per unit time is calculated in combination with the temperature data. The energy loss is expressed as:

[0055] ;

[0056] Wherein, is the energy loss per unit time, is the time interval, is the temperature loss coefficient, is the temperature at the current moment, is the ambient temperature. This formula shows that the energy loss is not only related to the power demand but also to the temperature, because the efficiency of the motor decreases at high temperatures, resulting in more energy loss. Match the operating condition characteristics of the energy consumption characteristic data, classify the data with a speed change rate less than the preset threshold as the constant speed cruise operating condition, and classify the data with a speed change rate greater than or equal to the preset threshold as the dynamic acceleration operating condition. Through the matching process, a large amount of collected data can be accurately classified for subsequent analysis and optimization. Associate the constant speed cruise operating condition and the dynamic acceleration operating condition with the corresponding energy consumption characteristic data respectively to obtain the operating condition - energy consumption mapping relationship, which reflects the energy consumption of the scooter under different operating conditions. For example, the energy consumption is lower during constant speed cruise and higher during dynamic acceleration. Based on the established operating condition - energy consumption mapping relationship, the operating state of the electric scooter is classified in real time to obtain the constant speed cruise operating condition data and the dynamic acceleration operating condition data.

[0057] In a specific embodiment, the process of executing step S2 may specifically include the following steps:

[0058] Based on the constant speed cruise operating condition data and the dynamic acceleration operating condition data, extract the voltage, current, and rotational speed parameters within the acquisition period to obtain the operating condition characteristic parameter matrix;

[0059] Perform a correlation operation on the voltage and current data in the operating condition characteristic parameter matrix to obtain the magnetic flux equation of the motor, and linearize the magnetic flux equation to obtain the electromagnetic model;

[0060] According to the rotational speed parameter and the tire radius parameter in the operating condition characteristic parameter matrix, calculate the torque output data and the transmission loss data of the dual - motor system to obtain the mechanical transmission model;

[0061] Substitute the temperature data in the constant speed cruise operating condition data and the dynamic acceleration operating condition data into the heat balance calculation formula to calculate the copper loss and iron loss data to obtain the thermal model;

[0062] Perform a correlation analysis on the output data of the electromagnetic model, the output data of the mechanical transmission model, and the output data of the thermal model to obtain the system operating state characteristic data, and calculate the operating efficiency curve of the dual - motor system under different operating conditions based on the system operating state characteristic data to obtain the efficiency distribution diagram;

[0063] Set the constraint thresholds for the upper limits of motor speed, torque, and temperature based on the efficiency distribution diagram, obtain the system operation boundary parameters, normalize the system operation boundary parameters, perform a matching operation with the working condition characteristic parameter matrix, and obtain the system efficiency constraint conditions.

[0064] Specifically, based on the constant-speed cruise working condition data and dynamic acceleration working condition data, extract the voltage, current, and speed parameters within the acquisition period to obtain the working condition characteristic parameter matrix. The working condition characteristic parameter matrix contains the key electrical characteristics of the system under different operating states and is expressed as:

[0065] ;

[0066] Among them, represents the voltage data sampled for the th time at time , represents the current data sampled for the th time, represents the motor speed sampled for the th time. These data reflect the changes in electrical parameters of the electric scooter during operation. Perform a correlation operation on the voltage and current data in the working condition characteristic parameter matrix to obtain the magnetic flux equation of the motor. Magnetic flux is an important parameter describing the electromagnetic characteristics of the motor and is calculated by the following formula:

[0067] ;

[0068] Among them, represents the magnetic flux at time , is the self-inductance coefficient of the motor, is the current data, is the voltage data, is the sampling time interval. Linearize the magnetic flux equation to simplify the calculation, enabling the complex non-linear magnetic flux characteristics to be described by a linear equation, which is convenient for subsequent modeling and control implementation. After linearization, the obtained electromagnetic model is represented as a linear equation, and its form is:

[0069] ;

[0070] Among them, is the resistance of the motor winding, is the self-inductance coefficient, represents the time derivative of the current. This linearized electromagnetic model reflects the electromagnetic response of the motor under different operating states. According to the speed parameters and tire radius parameters in the working condition characteristic parameter matrix, calculate the torque output data and transmission loss data of the dual-motor system and establish a mechanical transmission model. Torque is calculated by the following formula:

[0071] ;

[0072] wherein, represents the torque at time moment, is the torque constant of the motor, is the current data. Consider the losses caused by friction and other factors during the mechanical transmission process. The transmission loss is calculated by the following formula:

[0073] ;

[0074] wherein, is the transmission loss at time moment, is the motor speed, is the mechanical transmission efficiency. By calculating the torque and transmission loss, a mechanical transmission model is obtained, which describes the relationship between the motor output torque and the energy loss during the transmission process. Substitute the temperature data in the constant-speed cruise condition data and dynamic acceleration condition data into the heat balance calculation formula to calculate the copper loss and iron loss data, and obtain the thermal model. The copper loss is calculated by the following formula:

[0075] ;

[0076] wherein, is the copper loss power, is the current, is the motor winding resistance. The iron loss is calculated by the following formula:

[0077] ;

[0078] wherein, is the iron loss power, is the iron loss coefficient, is the magnetic flux density, is the frequency of the motor. By calculating the copper loss and iron loss, a thermal model is obtained, which describes the thermal loss characteristics of the motor under different working conditions. Conduct a correlation analysis on the output data of the electromagnetic model, mechanical transmission model, and thermal model to obtain the characteristic data of the system operating state. According to these characteristic data, calculate the operating efficiency curve of the dual-motor system under different working conditions and draw the efficiency distribution map of the system. The operating efficiency is calculated by the following formula:

[0079] ;

[0080] wherein, is the system efficiency at time moment, is the motor output power, is the input power. By calculating the efficiency under different working conditions, an efficiency distribution map is plotted, showing the efficiency changes of the motor under different speed, torque, and temperature conditions. Based on the efficiency distribution map, the upper limits of the motor speed, torque, and temperature are set to ensure that the system operates within a stable and efficient range, protecting the motor from overload and overheating damage, thereby extending the service life of the equipment. The system operation boundary parameters are normalized to facilitate unified comparison at different scales. For example, the speed, torque, and temperature are respectively normalized to the range of [0, 1], enabling the optimization analysis of physical quantities with different dimensions in the same framework. The normalized operation boundary parameters are matched with the working condition characteristic parameter matrix to obtain the efficiency constraint conditions of the system. The efficiency constraint conditions describe the efficiency limits of the motor system under different operating conditions, enabling the control system to achieve optimal control while meeting the constraint conditions. Through the above steps, the modeling based on the electric scooter operation data, efficiency calculation, and setting of optimization constraint conditions are finally realized.

[0081] In a specific embodiment, the process of executing step S3 may specifically include the following steps:

[0082] Perform data normalization on the upper limits of speed, torque, and temperature in the system efficiency constraint conditions to obtain the maximum power limit parameter P of the motor max ;

[0083] According to the formula Establish an S-shaped distribution function, where P(x) is the distribution power value of a single motor, k is the curve adjustment coefficient, x 0 is the power distribution critical point, x is the load demand ratio, and the initial model of the S-shaped function is obtained;

[0084] Perform interval statistics on the constant-speed cruise working condition data, set the k value to 0.5 to obtain a smooth power distribution curve, obtain the power distribution parameter group under the constant-speed working condition, and perform interval statistics on the dynamic acceleration working condition data, set the k value to 2.0 to obtain a steep power distribution curve, and obtain the power distribution parameter group under the dynamic working condition;

[0085] Calculate the optimal solution of the x 0 value in the range of 0.3 to 0.4 based on the power distribution parameter group under the constant-speed working condition to obtain the critical point parameter under the constant-speed working condition, and calculate the optimal solution of the x 0 value in the range of 0.6 to 0.7 based on the power distribution parameter group under the dynamic working condition to obtain the critical point parameter under the dynamic working condition;

[0086] Establish a working condition switching rule according to the critical point parameter under the constant-speed working condition and the critical point parameter under the dynamic working condition to obtain a working condition response function, and combine the working condition response function with the maximum power limit parameter P of the motor maxCombine to obtain the parameters of the S-shaped power distribution function.

[0087] Specifically, perform data normalization on the upper limits of speed, torque, and temperature in the system efficiency constraint conditions to obtain the maximum power limit parameter of the motor . Nondimensionalize different physical quantities (such as speed, torque, and temperature) so that they can be operated on a unified scale. Let the upper limit of the system speed be , the upper limit of torque be , and the upper limit of temperature be . The normalization process is carried out through the following formula:

[0088] ;

[0089] where , and represent the normalized speed, torque, and temperature respectively. The values of the normalization parameters are between [0,1], which is convenient for uniformly representing physical quantities with different dimensions. Based on the normalized values, the maximum power limit parameter of the motor is calculated through the following formula:

[0090] ;

[0091] where , and are weighting coefficients used to represent the weights of speed, torque, and temperature in power limitation. These weights are set according to the design requirements of the system. Through this formula, the maximum power limit parameter of the motor is obtained, providing boundary conditions for subsequent power distribution. Based on , establish an S-shaped distribution function to describe the power output of the motor under different load demands. The S-shaped distribution function is expressed by the following formula:

[0092] ;

[0093] where is the allocated power value of a single motor, is the curve adjustment coefficient, is the critical point of power distribution, is the load demand ratio (the value range is [0,1]). The curve adjustment coefficient determines the steepness of the S-shaped curve, determines the critical point at which the power distribution in the curve begins to change significantly. By adjusting and , control the power distribution characteristics of the motor so that the power can be adjusted smoothly and quickly when the load changes. Conduct interval statistics on the constant-speed cruise condition data to optimize the parameters of power distribution. For the constant-speed cruise condition, the power distribution should be relatively gentle to ensure the stability of energy output. Set the curve adjustment coefficient to make the S-shaped distribution curve smoother and obtain the power distribution parameter group under the constant-speed condition. In the constant-speed cruise state, the load demand is usually relatively stable and the power output does not need to change frequently. Then it is required that the power distribution function maintains a gentle transition when the load demand changes slightly, avoiding frequent power regulation caused by small load changes. For the dynamic acceleration condition data, since rapid power response needs to be achieved to meet the vehicle's acceleration requirements, when conducting interval statistics on the dynamic acceleration condition data, set the curve adjustment coefficient to obtain a steep power distribution curve. For the dynamic acceleration condition, the power of the motor needs to rise rapidly to meet the acceleration requirements. It is required that the S-shaped distribution function rapidly increases the output power when the load changes to ensure the dynamic response performance of the vehicle. After obtaining the power distribution parameter groups under the constant-speed cruise condition and the dynamic acceleration condition, determine the critical point parameters of the S-shaped distribution function. For the constant-speed cruise condition, the power distribution curve should start to gradually distribute power when the load demand is low. Set the value of within the interval [0.3, 0.4], and find the optimal power distribution critical point through optimization calculation. The determination of this critical point is to enable the system to start power distribution earlier when the load demand is low, thereby effectively improving energy efficiency. For the dynamic condition, since it is necessary to rapidly increase the power output under a higher load demand, set the value of within the interval [0.6, 0.7], and determine the optimal power distribution critical point through calculation. Thus, it is ensured that when the load demand is high, the motor can respond quickly and enter the high-power output state to meet the acceleration requirements of the scooter. Establish a condition switching rule based on the critical point parameters of the constant-speed condition and the dynamic condition to obtain the condition response function. The condition response function is used to describe the power distribution strategy when the scooter switches between different conditions. For example, when switching from the constant-speed cruise state to the dynamic acceleration state, how to adjust the power distribution curve. The condition response function ensures smooth power switching of the system under different conditions and avoids negative impacts on the system stability caused by sudden power changes. Combine the condition response function with the motor maximum power limit parameter to obtain the final S-shaped power distribution function parameters. These parameters guide how the motor distributes power under different load demands to ensure optimal power output of the system under various conditions. For example, during constant-speed cruise, the motor output power gradually increases according to a gentle S-shaped curve, thereby saving energy, while during the acceleration state, the motor output power rapidly increases according to a steep S-shaped curve to ensure sufficient acceleration ability.

[0094] In a specific embodiment, the process of executing step S4 may specifically include the following steps:

[0095] Construct the operating condition response function and the parameters of the S-shaped power distribution function into a motor control state vector, where the state vector includes the type of operating condition, vehicle speed, motor efficiency, and the parameters k and x of the S-shaped power distribution function 0 , and obtain the Markov state space data;

[0096] Construct the action space for the Markov state space data, set the adjustment range of the k value to ±0.2, and the x 0 value adjustment range to ±0.1 to obtain the action space parameters;

[0097] Construct the reward function R(s,a) according to the rotational speed upper limit, torque upper limit, and temperature upper limit in the system efficiency constraint conditions, assign a weight of 0.4 to the system efficiency, a weight of 0.3 to the energy loss, and a weight of 0.3 to the dynamic response to obtain the reward calculation function;

[0098] Calculate the state transition probability for the Markov state space data, model the transition probability using a Gaussian distribution, and set the transition probability variance to 0.1 to obtain the state transition matrix;

[0099] Based on the state transition matrix and the reward calculation function, construct a three-layer neural network structure, with the number of input layer nodes being the state dimension, the number of hidden layer nodes being twice the state dimension, and the number of output layer nodes being 1 to obtain the value function approximation network;

[0100] Iteratively optimize the value function approximation network, set the learning rate to 0.01, the discount factor to 0.9, and use the temporal difference algorithm to update the network parameters to obtain the optimal value function;

[0101] Set the ε-greedy strategy according to the optimal value function, set the initial exploration rate to 0.3, and gradually reduce the exploration rate at a decay rate of 0.995 to obtain the exploration strategy parameters, and apply the exploration strategy parameters to the sampling process of the state transition matrix for policy iteration calculation to obtain the optimal power distribution strategy.

[0102] Specifically, combine the operating condition response function and the parameters of the S-shaped power distribution function to construct a motor control state vector. This state vector is a complete description of the current state of the system, including the type of operating condition, vehicle speed, motor efficiency, and the parameters and in the S-shaped power distribution function. The state vector is expressed as:

[0103]

[0104] Among them, is the operating condition type (such as constant speed cruise or dynamic acceleration), is the current vehicle speed, is the motor efficiency, and are the curve adjustment coefficient and the critical point of power distribution in the S-shaped power distribution function respectively. By constructing a state vector, the state of the electric scooter during operation is described. Each element in the state vector helps the control system understand the current operating conditions and provides support for subsequent decision-making. Construct an action space for the Markov state space data. The action space represents the control behaviors that the system may take in each state. The construction of the action space mainly involves the adjustment of and . Set the adjustment range of the value to be , while the adjustment range of the value is . If the current value is 0.5, then the adjustment range of in the action space is [0.3, 0.7]. Similarly, assuming that the current value is 0.5, then the range of in the action space is [0.4, 0.6]. The construction of the action space enables the motor to appropriately adjust the power distribution function in each state to adapt to the current operating requirements. Construct a reward function R(s,a) according to the rotational speed upper limit, torque upper limit, and temperature upper limit in the system efficiency constraint conditions to evaluate the advantages and disadvantages of different states and actions. The reward function is based on the rotational speed upper limit, torque upper limit, and temperature upper limit in the system efficiency constraint conditions, considering the weights of system efficiency, energy loss, and dynamic response. The reward function is expressed as:

[0105] ;

[0106] where, represents the efficiency of the system, represents the energy loss, represents the dynamic response, , are the weights of system efficiency, energy loss, and dynamic response respectively. By assigning a weight of 0.4 to the system efficiency, ensure that the system operates under the condition of maximum efficiency as much as possible. Based on the Markov state space data, model the change of the system state, that is, calculate the state transition probability. Use a Gaussian distribution to model the transition probability, and set the transition probability variance to 0.1, which means that the system has a certain randomness in the state transition, but mainly concentrates near the current state. The state transition matrix describes the system's transition from the current state to a new state when taking a certain action Probability. The use of Gaussian distribution makes the state transition smoother and more continuous, simulating the real system behavior. Based on the state transition matrix and the reward calculation function, a three-layer neural network structure is constructed for the approximation of the value function. The value function represents the cumulative reward that the system may obtain in the future under a certain state, and is used to evaluate the long-term value of each state. The number of nodes in the input layer of the neural network is equal to the dimension of the state, the number of nodes in the hidden layer is set to twice the dimension of the state, and the number of nodes in the output layer is 1. The input layer passes the state vector into the network, the hidden layer enhances the expression ability of the network by increasing the number of nodes, enabling the network to capture the complex relationship between the state and the reward, and the output layer gives the estimated value of the current state. Iteratively optimize the value function approximation network. Use the temporal difference algorithm to update the parameters of the network. The learning rate is set to 0.01 to ensure that the step size is appropriate during each parameter update, and it can gradually approach the optimal value. At the same time, the discount factor is set to 0.9, which is used to balance short-term and long-term rewards, ensuring that the system not only pays attention to immediate benefits but also does not ignore long-term cumulative benefits. Through the temporal difference algorithm, use the difference between the current state and the next state to update the network parameters, accelerating the learning process and enabling the network to converge to the optimal value function faster. After obtaining the optimal value function, set -greedy policy to achieve a balance between exploration and exploitation. The -greedy policy is a commonly used method for controlling the exploration behavior of the system during the learning process. The initial exploration rate is set to 0.3, indicating that the system has a 30% probability of choosing a random action to explore new possibilities and a 70% probability of choosing the current optimal action to exploit existing knowledge. As the learning process progresses, the exploration rate gradually decreases at a decay rate of 0.995, enabling the system to gradually reduce randomness and rely more on the learned optimal strategy. In this way, the exploration strategy parameters are obtained to ensure that the system can fully explore in the initial stage of learning and then gradually stabilize on the optimal strategy in the later stage. Apply the exploration strategy parameters to the sampling process of the state transition matrix, and through policy iteration calculation, obtain the optimal power allocation strategy. In policy iteration, the system starts from the initial state, selects actions according to the current policy, then updates the value function according to the reward function and the state transition matrix, and gradually optimizes the policy. This process is repeated continuously until the policy converges to obtain the optimal power allocation strategy.

[0107] In a specific embodiment, the process of executing step S5 may specifically include the following steps:

[0108] Perform state parameter analysis on the optimal power allocation strategy, and extract the S-shaped power allocation function parameters k and x under the current working condition 0 , to obtain the initial policy parameters;

[0109] According to the objective function perform optimization construction, where J(θ) is the optimization objective function, θ is the set of policy parameters to be optimized, E[·] is the expected calculation symbol, and R t is the cumulative reward value at time t, α is the penalty factor, is the relative entropy of the old and new policy distributions, is the policy distribution before optimization, is the policy distribution after optimization, to obtain the optimization objective function;

[0110] Calculate the cumulative reward value R in the optimization objective function t Set the time step to 0.1 second, the sliding time window to 10 time steps, and use the weighted accumulation method of the reward value, with the weight coefficient decaying with time and the decay coefficient being 0.9, to obtain the reward calculation sequence;

[0111] Calculate the KL divergence value of the old and new policy distributions based on the initial policy parameters, set the penalty factor α to 0.01, and calculate the relative entropy through the mean and variance of the policy distribution to obtain the policy update constraint;

[0112] Calculate the gradient of the objective function according to the reward calculation sequence and the policy update constraint, and use the Adam optimizer to update the parameters, where the first moment estimation coefficient β 1 is 0.9, the second moment estimation coefficient β 2 is 0.999, and the learning rate is 0.001, to obtain the optimized control parameters;

[0113] Limit the range of the optimized control parameters, limit the value of the curve adjustment coefficient k within the interval [0.3, 2.5], and limit the value of the power distribution critical point x 0 within the interval [0.2, 0.8], to obtain the corrected control parameters;

[0114] Construct a controller state feedback model based on the corrected control parameters. The state variables include the motor speed deviation, torque deviation, and temperature deviation. Set the controller sampling period to 0.02 second to obtain the controller model parameters;

[0115] Substitute the controller model parameters into the PID control structure. Set the proportional coefficient for the motor speed deviation to 2, the integral coefficient to 0.1, and the differential coefficient to 0.05. The proportional coefficient is used to control the response speed, the integral coefficient is used to eliminate the steady-state error, and the differential coefficient is used to suppress overshoot, to obtain the real-time control parameters.

[0116] Specifically, perform state parameter analysis on the optimal power distribution strategy, and extract the S-shaped power distribution function parameters and under the current working conditions to obtain the initial policy parameters. represents the curve adjustment coefficient of the S-shaped distribution function, controlling the variation range of power with the load demand, while represents the critical point of power distribution, determining the starting point of the power output surge. By extracting these parameters, initial values are provided for subsequent optimization, thereby enhancing the power distribution effect. According to the objective function for optimization construction, where is the optimization objective function, is the set of policy parameters to be optimized, represents the expected calculation, is the cumulative reward value at time is the penalty factor, is the relative entropy between the new and old policy distributions, and represent the policy distributions before and after optimization respectively. The relative entropy (i.e., KL divergence) is used to measure the difference between the new policy and the old policy. The penalty factor controls the amplitude of the policy change, ensuring that the policy does not change drastically during the optimization process and maintaining the stability of the system. By constructing this optimization objective function, on the basis of balancing the maximization of rewards and the smoothness of the policy, the optimal policy parameters are gradually found. To optimize the optimization objective function, calculate the cumulative reward value . Set the time step to 0.1 seconds and adopt the method of a sliding time window with a window size of 10 time steps. This means that in each calculation cycle, the cumulative reward value is statistically calculated based on the performance in the past 1 second. The weighted accumulation method of the reward value is adopted, and the weight coefficient decays with time, with the decay coefficient set to 0.9. The calculation formula of the cumulative reward value is expressed as:

[0117] ;

[0118] where is the time decay coefficient, represents the immediate reward value at time . Through this step, more attention is paid to the current performance, and at the same time, the past rewards are considered to form a comprehensive evaluation. Based on the initial policy parameters and , calculate the KL divergence value of the new and old policy distributions to measure the policy difference before and after optimization. The calculation of the KL divergence is based on the mean and variance of the policy distribution and is obtained through the following formula:

[0119] ;

[0120] where and represent the probability distributions of the old policy and the new policy respectively, is a random variable related to power distribution. The larger the KL divergence, the greater the difference between the new and old policies. To maintain the stability of the system, a penalty factor is set to limit the amplitude of policy updates. Through policy update constraints, the change amplitude of the policy is effectively controlled during the optimization process, thus avoiding a drastic impact on the control system. According to the reward calculation sequence and policy update constraints, the gradient of the objective function is calculated. The Adam optimizer is used to update the parameters. The Adam optimizer is an adaptive learning rate optimization method that combines first-order and second-order moment estimates and can effectively adjust the step size of each gradient descent. In the Adam optimizer, the first-order moment estimation coefficient is set to 0.9, the second-order moment estimation coefficient is set to 0.999, and the learning rate is 0.001. The parameter update formula of the Adam optimizer is:

[0121] ;

[0122] ;

[0123] ;

[0124] ;

[0125] where and are the first-order and second-order moment estimates of the gradient respectively, is the learning rate, is a small value to prevent the denominator from being zero, is the set of parameters to be optimized, is the gradient of the objective function with respect to the parameters. Through this series of parameter update processes, the optimal policy parameters are gradually approximated to obtain the optimized control parameters. For the optimized control parameters, range limits are imposed to ensure that the parameters are within a reasonable range. The curve adjustment coefficient value is restricted to the interval [0.3, 2.5], and the power distribution critical point The value is restricted within the interval of [0.2, 0.8]. Avoid the power distribution curve being too steep or too gentle, and avoid the starting point of power distribution being too early or too late to ensure the performance and stability of the system. Through the range limitation, the corrected control parameters are obtained. Based on the corrected control parameters, a controller state feedback model is constructed. The state feedback model is used to describe the relationship between the current state of the system and feedback control, including the motor speed deviation, torque deviation, and temperature deviation. Set the sampling period of the controller to 0.02 seconds to ensure that it can quickly respond to the state changes of the electric scooter during operation. These state variables are used to describe the gap between the system and the target state, so as to provide a feedback basis for subsequent control and ensure that the motor can be dynamically adjusted according to the actual situation during operation. Substitute the controller model parameters into the PID control structure to construct a PID controller for actual control. In the PID controller, set the proportional coefficient to 2, the integral coefficient to 0.1, and the differential coefficient to 0.05 for the motor speed deviation. The proportional coefficient is used to control the response speed of the system to ensure that the system can respond quickly when the speed deviation is detected; the integral coefficient is used to eliminate the steady-state error and reduce the deviation accumulation of the system by accumulating past deviations; the differential coefficient is used to suppress overshoot by controlling the rate of change of the deviation and reducing the overshoot phenomenon of the system during the response process. Through this PID control structure, the corrected control parameters are applied to real-time control, so as to achieve efficient and stable control of the motor and finally obtain the real-time control parameters.

[0126] In a specific embodiment, the process of executing step S6 may specifically include the following steps:

[0127] Construct a Lyapunov function according to the real-time control parameters , where V(m) is the system energy function, m is the system state vector including the motor speed deviation, torque deviation, and temperature deviation, T represents the transpose of the system state vector, P is a symmetric positive definite matrix used to measure the weight of the state deviation, τ is the time variable, s(τ) is the output value of the actual S-shaped function at time τ, s*(τ) is the output value of the desired S-shaped function at time τ, ∫(s(τ) - s*(τ)) 2 dτ represents the integral term of the S-shaped function output error, and the system stability analysis function is obtained;

[0128] Perform the time differential operation dV(m) / dt on the Lyapunov function, substitute the real-time control parameters for calculation, where dV(m) / dt represents the rate of change of the system energy with time. When dV(m) / dt < 0, the system is stable, and t represents time, and the system stability discriminant is obtained;

[0129] Based on the system stability discriminant, construct a stability constraint condition matrix, set the stability threshold dV(m) / dt < -0.01, and obtain the online correction boundary condition;

[0130] Perform a parameter sensitivity analysis on the online calibration boundary conditions. By calculating the ratio of the parameter change amount to the change amount of the system stability discriminant, where the change amount takes 1% of the parameter nominal value, obtain the parameter sensitivity matrix;

[0131] Rank the importance of the real-time control parameters according to the parameter sensitivity matrix, select the parameters with sensitivity values greater than 0.5 as the calibration objects, and obtain the set of parameters to be calibrated;

[0132] Construct an online parameter calibration model based on the set of parameters to be calibrated, and use the gradient descent method to iteratively optimize the parameters. The loss function is the negative value of dV(m) / dt, the maximum number of iterations is 100 times, and the learning rate is set to 0.005 to obtain the calibrated parameter values;

[0133] Verify the stability of the calibrated parameter values. Substitute the updated parameters into the Lyapunov function for calculation to obtain the system stability index, and screen the calibrated parameter values according to the system stability index. Check whether dV(m) / dt < 0 holds at all sampling points, and select the parameter combination that satisfies the condition and has the minimum average value of dV(m) / dt to obtain the target motor control strategy.

[0134] Specifically, construct a Lyapunov function based on the real-time control parameters to evaluate the energy state of the system and ensure the stability of the system. The Lyapunov function is expressed as:

[0135] ;

[0136] where is the system energy function, is the system state vector including the motor speed deviation, torque deviation, and temperature deviation, represents the transpose of the state vector, is a symmetric positive definite matrix used to measure the weight of the state deviation, is the time variable, is the output value of the actual S-shaped function at time , while is the output value of the desired S-shaped function at time . The integral term represents the error energy accumulation between the actual and desired outputs, and this term is used to describe the accuracy of power distribution. By constructing this Lyapunov function, the change of the system energy over time is effectively described, and an important index for measuring the system stability is provided. Perform a time differential operation on the Lyapunov function to obtain the rate of change of the system energy over time. The time differential of the Lyapunov function is expressed as:

[0137] ;

[0138] Among them, represents the rate of change of the state deviation term with respect to time, while represents the rate of change of the S-shaped output error with respect to time. To calculate these rates of change, the real-time control parameters are substituted into the Lyapunov function and differentiated. If , it means that the energy of the system is decreasing, indicating that the system is tending towards a stable state. Through this process, the stability discriminant of the system is obtained. On this basis, a stability constraint condition matrix is constructed, and the stability threshold is set to , indicating that the rate of change of the system energy should be less than -0.01 to ensure that the system can quickly dissipate energy during operation and thus maintain a stable state. Through this setting, a reasonable stability boundary can be provided for the system to ensure that there is no energy accumulation during the control adjustment process and to maintain the normal operation of the system. Perform a parameter sensitivity analysis on the boundary conditions of the online correction to determine the degree of influence of each control parameter on the system stability. The sensitivity is measured by calculating the ratio of the change in each parameter to the change in the system stability discriminant. The change in the parameter is taken as 1% of its nominal value, that is, assuming the nominal value of a certain parameter in the current operating state is , then its change is . By calculating the influence of these changes on the stability discriminant , the parameter sensitivity matrix is obtained:

[0139] ;

[0140] Among them, represents the sensitivity of the -th parameter to the system stability, represents the change in the -th parameter, represents the change in the rate of change of energy caused by . The larger the value of the parameter sensitivity matrix, the greater the influence of the parameter on the system stability. According to the results of the parameter sensitivity matrix, rank the real-time control parameters according to their importance, select the parameters with sensitivity values greater than 0.5 as the correction objects, and obtain the set of parameters to be corrected. A sensitivity value greater than 0.5 indicates that the parameter has a greater influence on the system stability. Therefore, using it as the correction object can significantly improve the system stability. Based on the set of parameters to be corrected, construct an online parameter correction model and use the gradient descent method to iteratively optimize these parameters. The loss function is set to the negative value of the time derivative of the Lyapunov function to ensure that the system energy continuously decreases during the optimization process and the system tends to be stable. The optimization process of gradient descent is expressed as:

[0141] ;

[0142] wherein, is the parameter at the th iteration, is the learning rate, set to 0.005 to ensure that the change amplitude during each parameter update will not be too large to cause system instability. The maximum number of iterations is set to 100 times to find parameter values close to the optimal within a limited time. Through this step, the optimized calibration parameter values are obtained. The stability of the calibration parameter values is verified. The updated parameters are substituted into the Lyapunov function for calculation to obtain the system stability index. For each sampling point, the time derivative of the Lyapunov function is calculated and it is checked whether it satisfies . Only when this condition is satisfied at all sampling points can it be ensured that the system is stable throughout the operation. In addition, the parameter combination with the minimum mean value of at all sampling points is selected as the final control parameter to ensure the best stability of the system in the optimized operating state. The goal of this process is to find a set of parameters that can minimize the system energy, thereby obtaining the target motor control strategy.

[0143] The intelligent motor efficiency optimization method for an electric scooter in the embodiments of the present invention is described above. Next, the intelligent motor efficiency optimization system for an electric scooter in the embodiments of the present invention will be described. Please refer to Figure 2 One embodiment of the intelligent motor efficiency optimization system for an electric scooter in the embodiments of the present invention includes:

[0144] An acquisition module, configured to collect the driving parameters of the electric scooter in real time and perform working condition classification processing on the driving parameters to obtain constant speed cruise working condition data and dynamic acceleration working condition data;

[0145] A modeling module, configured to perform mathematical modeling on the dual-motor system based on the constant speed cruise working condition data and the dynamic acceleration working condition data, establish an electromagnetic model, a mechanical transmission model, and a thermal model, and obtain system efficiency constraint conditions;

[0146] An allocation module, configured to perform dynamic allocation calculation on the motor power according to the system efficiency constraint conditions to obtain S-shaped power allocation function parameters;

[0147] A calculation module, configured to input the S-shaped power allocation function parameters into the Markov decision process model, and perform optimization calculation on the state space and the action space through approximate dynamic programming to obtain the optimal power allocation strategy;

[0148] An optimization module, configured to perform proximal policy optimization calculation on control parameters according to an optimal power distribution strategy to obtain real-time control parameters;

[0149] A calibration module, configured to perform system stability analysis and online parameter calibration by using a Lyapunov function based on the real-time control parameters to obtain a target motor control strategy.

[0150] Through the collaborative cooperation of the above-mentioned various components, through real-time working condition recognition and classification technologies, combined with deep learning methods to accurately divide the driving state, the recognition accuracy of the system for different driving conditions is effectively improved, providing an accurate data basis for subsequent control strategy optimization; by using an S-shaped power distribution function, smooth power switching of the dual-motor system is achieved, avoiding impacts during the working condition switching process, and at the same time, by dynamically adjusting the function parameters, optimal power distribution under different working conditions is ensured; the introduction of the Markov decision process and approximate dynamic programming methods enables the system to have predictive control capabilities, and can predict the optimal control strategy according to historical data and the current state, improving the dynamic response performance of the system; based on the proximal policy optimization algorithm, the control parameters are adjusted in real time, and by setting reasonable objective functions and constraint conditions, dynamic optimization of the parameters is achieved while ensuring control stability; the Lyapunov stability theory is used for system analysis and calibration, and through the online parameter adjustment mechanism, stable operation of the system under various working conditions is ensured, and the robustness of the control algorithm is improved.

[0151] Referring to Figure 3 In this embodiment of the present invention, a computer device is further provided. The computer device may be a server, and its internal structure may be as Figure 3 shown. The computer device includes a processor, a memory, a display screen, an input device, a network interface, and a database connected through a system bus. Among them, the processor of the computer design is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the corresponding data in this embodiment. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the above method is implemented.

[0152] Those skilled in the art can understand that Figure 3 the structure shown in

[0153] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the above method is implemented. It can be understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.

[0154] Those of ordinary skill in the art can understand that all or part of the processes in the above-described method embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above-described method embodiments. Among them, any reference to a memory, storage, database, or other medium provided by the present invention and used in the embodiments can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM, etc.

[0155] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described systems and units can refer to the corresponding processes in the foregoing method embodiments and will not be described herein again.

[0156] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.

[0157] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A method for optimizing the efficiency of an intelligent motor of an electric scooter, characterized in that: The method comprises: The driving parameters of the electric scooter are collected in real time, and the driving parameters are classified and processed under working conditions to obtain constant speed cruising working condition data and dynamic acceleration working condition data; specifically, the method includes: collecting the running data of the electric scooter within a sampling period to obtain vehicle speed data, acceleration data, motor speed data, current data and temperature data; performing time domain feature calculation on the vehicle speed data and the acceleration data to obtain the speed change rate and the acceleration change rate, and performing threshold judgment on the driving state according to the speed change rate and the acceleration change rate to obtain the working condition judgment result; and performing threshold judgment on the motor speed data and the current data based on the working condition judgment result. The data are processed in sections to obtain power demand data, and the energy loss value per unit time is calculated according to the power demand data and the temperature data to obtain energy consumption characteristic data; the energy consumption characteristic data are matched with working condition characteristics, and data with a speed change rate less than a preset threshold value is classified as a constant speed cruising working condition, and data with a speed change rate greater than or equal to the preset threshold value is classified as a dynamic acceleration working condition; the constant speed cruising working condition and the dynamic acceleration working condition are respectively associated with the corresponding energy consumption characteristic data to obtain a working condition-energy consumption mapping relationship, and real-time classification is performed based on the working condition-energy consumption mapping relationship to obtain constant speed cruising working condition data and dynamic acceleration working condition data; Based on the constant speed cruising condition data and the dynamic acceleration condition data, mathematical modeling is performed on the dual motor system, an electromagnetic model, a mechanical transmission model and a thermal model are established, and system efficiency constraints are obtained; According to the system efficiency constraint condition, the motor power is dynamically allocated and calculated to obtain the S-shaped power allocation function parameters; The parameters of the S-shaped power allocation function are input into a Markov decision process model, and the state space and the action space are optimized and calculated by approximate dynamic programming to obtain an optimal power allocation strategy; According to the optimal power allocation strategy, a proximal strategy optimization calculation is performed on the control parameters to obtain real-time control parameters; Based on the real-time control parameters, the Lyapunov function is used to perform system stability analysis and online parameter correction to obtain the target motor control strategy.

2. The intelligent motor efficiency optimization method for an electric scooter according to claim 1, characterized in that: Based on the constant speed cruising condition data and the dynamic acceleration condition data, a mathematical model is performed on the dual motor system to establish an electromagnetic model, a mechanical transmission model and a thermal model to obtain system efficiency constraints, including: Based on the constant speed cruising operating condition data and the dynamic acceleration operating condition data, extracting voltage, current and speed parameters within a collection period to obtain an operating condition characteristic parameter matrix; Performing correlation calculation on the voltage and current data in the operating condition characteristic parameter matrix to obtain the flux equation of the motor, and performing linearization processing on the flux equation to obtain an electromagnetic model; According to the speed parameters and tire radius parameters in the operating condition characteristic parameter matrix, the torque output data and transmission loss data of the dual-motor system are calculated to obtain a mechanical transmission model; Substituting the temperature data in the constant speed cruising condition data and the dynamic acceleration condition data into a heat balance calculation formula, calculating the copper loss and iron loss data, and obtaining a thermal model; Performing correlation analysis on the output data of the electromagnetic model, the output data of the mechanical transmission model, and the output data of the thermal model to obtain system operation state characteristic data, and calculating the operation efficiency curve of the dual-motor system under different working conditions according to the system operation state characteristic data to obtain an efficiency distribution diagram; Based on the efficiency distribution diagram, the constraint thresholds of the motor speed upper limit, torque upper limit and temperature upper limit are set to obtain the system operation boundary parameters, and the system operation boundary parameters are normalized and matched with the operating condition characteristic parameter matrix to obtain the system efficiency constraint conditions.

3. The intelligent motor efficiency optimization method for an electric scooter according to claim 2, characterized in that: The method of dynamically allocating and calculating the motor power according to the system efficiency constraint condition to obtain S-shaped power allocation function parameters includes: The speed upper limit, torque upper limit and temperature upper limit in the system efficiency constraint conditions are normalized to obtain the motor maximum power limit parameter P max ; According to the formula An S-shaped allocation function is established, where P(x) is the allocated power value of a single motor, k is the curve adjustment coefficient, x0 is the critical point of power allocation, and x is the load demand ratio, and the initial model of the S-shaped function is obtained; Performing interval statistics on the constant speed cruising condition data, setting the k value to 0.5 to obtain a gentle power distribution curve, and obtaining a power distribution parameter group under the constant speed condition; performing interval statistics on the dynamic acceleration condition data, setting the k value to 2.0 to obtain a steep power distribution curve, and obtaining a power distribution parameter group under the dynamic condition; Based on the power allocation parameter group under the constant speed condition, the optimal solution of the x0 value in the range of 0.3 to 0.4 is calculated to obtain the critical point parameter of the constant speed condition, and based on the power allocation parameter group under the dynamic condition, the optimal solution of the x0 value in the range of 0.6 to 0.7 is calculated to obtain the critical point parameter of the dynamic condition; According to the constant speed working condition critical point parameter and the dynamic working condition critical point parameter, a working condition switching rule is established to obtain a working condition response function, and the working condition response function is combined with the motor maximum power limit parameter P max The S-shaped power allocation function parameters are obtained.

4. The intelligent motor efficiency optimization method for an electric scooter according to claim 3, characterized in that: The S-shaped power allocation function parameters are input into the Markov decision process model, and the state space and the action space are optimized and calculated by approximate dynamic programming to obtain the optimal power allocation strategy, including: The operating condition response function and the S-shaped power distribution function parameters are constructed into a motor control state vector, wherein the state vector includes the operating condition type, vehicle speed, motor efficiency, and S-shaped power distribution function parameters k and x0, to obtain Markov state space data; Constructing an action space for the Markov state space data, setting the adjustment range of the k value to ±0.2, the adjustment range of the x0 value to ±0.1, and obtaining action space parameters; According to the upper speed limit, the upper torque limit and the upper temperature limit in the system efficiency constraint conditions, a reward function R(s,a) is constructed, a weight of 0.4 is assigned to the system efficiency, a weight of 0.3 is assigned to the energy loss, and a weight of 0.3 is assigned to the power response, and a reward calculation function is obtained; The state transition probability is calculated for the Markov state space data, the transition probability is modeled using Gaussian distribution, the transition probability variance is set to 0.1, and a state transition matrix is ​​obtained; A three-layer neural network structure is constructed based on the state transfer matrix and the reward calculation function, where the number of input layer nodes is the state dimension, the number of hidden layer nodes is twice the state dimension, and the number of output layer nodes is 1, to obtain a value function approximation network; Iteratively optimize the value function approximation network, set the learning rate to 0.01, the discount factor to 0.9, and use the temporal difference algorithm to update the network parameters to obtain the optimal value function; An ε-greedy strategy is set according to the optimal value function, an initial exploration rate is set to 0.3, and the exploration rate is gradually reduced at a decay rate of 0.995 to obtain exploration strategy parameters, and the exploration strategy parameters are applied to the sampling process of the state transfer matrix to perform strategy iterative calculation to obtain the optimal power allocation strategy.

5. The intelligent motor efficiency optimization method for an electric scooter according to claim 4, characterized in that: The method of performing proximal strategy optimization calculation on the control parameters according to the optimal power allocation strategy to obtain real-time control parameters includes: Performing state parameter analysis on the optimal power allocation strategy, extracting S-shaped power allocation function parameters k and x0 under the current working condition, and obtaining initial parameters of the strategy; According to the objective function Optimization construction is performed, where J(θ) is the optimization objective function, θ is the set of strategy parameters to be optimized, E[·] is the expected calculation symbol, and R t is the cumulative reward value at time t, α is the penalty factor, is the relative entropy of the distribution of new and old strategies, is the strategy distribution before optimization, is the optimized strategy distribution, and the optimization objective function is obtained; The cumulative reward value R in the optimization objective function t Perform calculations, set the time step to 0.1 seconds, the sliding time window to 10 time steps, use the weighted accumulation method for reward values, and let the weight coefficient decay over time. The decay coefficient is 0.9, and get the reward calculation sequence. The KL divergence value of the new and old strategy distributions is calculated based on the initial parameters of the strategy, the penalty factor α is set to 0.01, and the relative entropy is calculated by the mean and variance of the strategy distribution to obtain the strategy update constraint; The objective function is gradient-calculated according to the reward calculation sequence and the strategy update constraint, and the parameters are updated using the Adam optimizer, where the first-order moment estimation coefficient β1 is 0.9, the second-order moment estimation coefficient β2 is 0.999, and the learning rate is 0.001, to obtain the optimized control parameters; The optimized control parameters are range-limited, the curve adjustment coefficient k value is limited to the interval [0.3, 2.5], and the power distribution critical point x0 value is limited to the interval [0.2, 0.8], so as to obtain the modified control parameters; A controller state feedback model is constructed based on the modified control parameters, the state variables include motor speed deviation, torque deviation and temperature deviation, the controller sampling period is set to 0.02 seconds, and the controller model parameters are obtained; The controller model parameters are substituted into the PID control structure, and the proportional coefficient of the motor speed deviation is set to 2, the integral coefficient is set to 0.1, and the differential coefficient is set to 0.05, where the proportional coefficient is used to control the response speed, the integral coefficient is used to eliminate the steady-state error, and the differential coefficient is used to suppress overshoot, so as to obtain real-time control parameters.

6. The intelligent motor efficiency optimization method for an electric scooter according to claim 5, characterized in that: Based on the real-time control parameters, the Lyapunov function is used to perform system stability analysis and online parameter correction to obtain a target motor control strategy, including: Construct a Lyapunov function based on the real-time control parameters , where V(m) is the system energy function, m is the system state vector containing motor speed deviation, torque deviation and temperature deviation, T represents the transpose of the system state vector, P is a symmetric positive definite matrix used to measure the weight of the state deviation, τ is the time variable, s(τ) is the output value of the actual S-shaped function at time τ, s*(τ) is the output value of the expected S-shaped function at time τ, ∫(s(τ)-s*(τ)) 2 dτ represents the integral term of the output error of the S-shaped function, and the system stability analysis function is obtained; Performing a time differential operation dV(m) / dt on the Lyapunov function, substituting the real-time control parameter into the calculation, wherein dV(m) / dt represents the rate of change of system energy over time, when dV(m) / dt<0, the system is stable, t represents time, and obtaining a system stability discriminant; Based on the system stability discriminant, a stability constraint matrix is ​​constructed, and a stability threshold dV(m) / dt<-0.01 is set to obtain an online correction boundary condition; Performing parameter sensitivity analysis on the online correction boundary conditions, by calculating the ratio of the parameter change to the system stability discriminant change, wherein the change takes 1% of the parameter nominal value, to obtain a parameter sensitivity matrix; The real-time control parameters are ranked in importance according to the parameter sensitivity matrix, and parameters with sensitivity values ​​greater than 0.5 are selected as correction objects to obtain a set of parameters to be corrected; An online parameter correction model is constructed based on the parameter set to be corrected, and the parameters are iteratively optimized using the gradient descent method, wherein the loss function is the negative value of dV(m) / dt, the maximum number of iterations is 100, and the learning rate is set to 0.005 to obtain the correction parameter value; The correction parameter value is verified for stability, the updated parameter is substituted into the Lyapunov function for calculation to obtain a system stability index, and the correction parameter value is screened according to the system stability index, and it is checked at all sampling points whether dV(m) / dt<0 holds, and a parameter combination that meets the conditions and has the smallest dV(m) / dt mean is selected to obtain a target motor control strategy.

7. An intelligent motor efficiency optimization system for an electric scooter, characterized in that: A method for optimizing the efficiency of an intelligent motor of an electric scooter according to any one of claims 1 to 6, the system comprising: The acquisition module is used to collect the driving parameters of the electric scooter in real time, and classify the driving parameters to obtain constant speed cruising condition data and dynamic acceleration condition data; A modeling module, for mathematically modeling the dual-motor system based on the constant speed cruising condition data and the dynamic acceleration condition data, establishing an electromagnetic model, a mechanical transmission model and a thermal model, and obtaining system efficiency constraint conditions; An allocation module, used to dynamically allocate and calculate the motor power according to the system efficiency constraint conditions to obtain S-shaped power allocation function parameters; A calculation module, used for inputting the parameters of the S-shaped power allocation function into a Markov decision process model, optimizing the state space and the action space through approximate dynamic programming, and obtaining an optimal power allocation strategy; An optimization module, used to perform proximal strategy optimization calculation on control parameters according to the optimal power allocation strategy to obtain real-time control parameters; The correction module is used to perform system stability analysis and online parameter correction based on the real-time control parameters using a Lyapunov function to obtain a target motor control strategy.

8. A computer device, characterized in that: The invention comprises a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and is characterized in that when the processor executes the computer program, the intelligent motor efficiency optimization method for the electric scooter according to any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the processor is enabled to execute the intelligent motor efficiency optimization method for an electric scooter according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Robot simulation learning method based on dynamic system model

    CN109702744A

  • Four-wheel hub motor vehicle system power matching method

    CN110203075A

  • Wind power distribution method, device and system and readable storage medium

    CN113036794A

  • Security service migration method and system in mobile edge computing scene

    CN117750436A