Intelligent motor efficiency optimization method and equipment for electric scooter

Through the intelligent motor efficiency optimization method, the driving parameters of the electric scooter are collected and classified in real time, the motor power is dynamically allocated, and the Markov decision-making process and Lyapunov function optimization control strategy are used to solve the problems of insufficient power response and low energy efficiency of traditional electric scooters, achieving more efficient and stable motor control.

CN119795943AActive Publication Date: 2025-04-11SHENZHEN LEQI INTELLIGENT TECH CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

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

Method used

The intelligent motor efficiency optimization method is adopted, and the driving parameters are collected in real time, the working condition classification process is carried out, the mathematical modeling of the dual motor system is established, the motor power is dynamically allocated, the power distribution strategy is optimized using the Markov decision-making process and approximate dynamic programming, and the system stability analysis and online parameter correction are performed through the Lyapunov function.

Benefits of technology

It realizes dynamic power distribution of electric scooters under different working conditions, improves the system's energy utilization efficiency and dynamic response performance, and ensures the stable operation of the motor under various working conditions and the robustness of the control algorithm.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119795943A_ABST
    Figure CN119795943A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of motor efficiency optimization, and discloses an intelligent motor efficiency optimization method and equipment for an electric scooter, and the method comprises the steps: collecting the driving parameters of the electric scooter in real time, and carrying out the working condition classification processing of the driving parameters, and obtaining constant-speed cruise working condition data and dynamic acceleration working condition data; mathematical modeling is carried out on the dual-motor system, an electromagnetic model, a mechanical transmission model and a thermal model are established, and system efficiency constraint conditions are obtained; performing dynamic distribution calculation on the motor power to obtain an S-shaped power distribution function parameter; inputting a Markov decision process model, and performing optimization calculation on a state space and an action space to obtain an optimal power distribution strategy; performing near-end strategy optimization calculation on the control parameters to obtain real-time control parameters; and a Lyapunov function is adopted for correction, a target motor control strategy is obtained, and dynamic optimization of parameters is realized while the control stability of the electric scooter is ensured.
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 in particular to an intelligent motor efficiency optimization method and device for an electric scooter. Background Art

[0002] Traditional electric scooters usually use a single-motor drive mode. When faced with complex road conditions and diverse driving needs, they often have 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, dual-motor drive systems are gradually being used in electric scooters. However, the dual-motor system faces more complex control challenges during actual operation. Due to the nonlinearity of the motor's operating characteristics, the dynamic changes in driving conditions, and the uncertainty of system parameters, how to optimize energy efficiency while ensuring power performance has become a technical problem that needs to be solved urgently. In addition, the existing motor control methods are mostly based on static optimization, lack the ability to adapt to dynamic conditions, and are 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, which realizes dynamic optimization of parameters while ensuring the control stability of the electric scooter.

[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 an electric scooter comprising: 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; 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.

[0006] In a second aspect, the present invention provides an intelligent motor efficiency optimization system for an electric scooter, the intelligent motor efficiency optimization system for an electric scooter 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.

[0007] A third aspect of the present invention provides a computer device, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the computer device executes the above-mentioned intelligent motor efficiency optimization method for the electric scooter.

[0008] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the above-mentioned intelligent motor efficiency optimization method for an electric scooter.

[0009] In the technical solution provided by the present invention, the driving state is accurately divided through real-time working condition recognition and classification technology combined with a deep learning method, which effectively improves the system's recognition accuracy of different driving conditions and provides 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 the impact during the working condition switching process, and at the same time, by dynamically adjusting the function parameters, the optimal power distribution under different working conditions is guaranteed; the Markov decision process and the approximate dynamic programming method are introduced to enable the system to have predictive control capabilities, and can predict the optimal control strategy based on historical data and current status, thereby improving the dynamic response performance of the system; the control parameters are adjusted in real time based on the proximal strategy optimization algorithm, and by setting reasonable objective functions and constraints, dynamic optimization of parameters is achieved while ensuring control stability; the Lyapunov stability theory is used for system analysis and correction, and the online parameter adjustment mechanism is used to ensure the stable operation of the system under various working conditions, thereby improving the robustness of the control algorithm. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0011] Figure 1 A schematic diagram of the steps of a method for optimizing the efficiency of an intelligent motor of an electric scooter according to an embodiment of the present invention; Figure 2 It is a structural schematic diagram of an intelligent motor efficiency optimization system for an electric scooter in an embodiment of the present invention; Figure 3 It is a schematic block diagram of the structure of a computer device in an embodiment of the present invention. DETAILED DESCRIPTION

[0012] Embodiments of the present invention provide a method and device for optimizing the efficiency of an intelligent motor of an electric scooter. The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0013] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 , an embodiment of the intelligent motor efficiency optimization method of the electric scooter in the embodiment of the present invention includes: Step S1, collecting the driving parameters of the electric scooter in real time, and classifying the driving parameters under working conditions to obtain constant speed cruising working condition data and dynamic acceleration working condition data; It is understandable that the execution subject of the present invention may be an intelligent motor efficiency optimization system for an electric scooter, or a terminal or a server, which is not specifically limited here. The embodiment of the present invention is described by taking a server as an execution subject as an example.

[0014] Specifically, the running 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, and the speed change rate and acceleration change rate are calculated to effectively reflect the changes in the motion state of the scooter in different time periods. According to the speed change rate and acceleration change rate, the driving state is judged by threshold. Different driving states are distinguished by comparing the changes in speed and acceleration with the preset standards. If the speed change rate and acceleration change rate are lower than a certain threshold, the scooter is considered to be in a stable constant speed cruising state; if the speed change rate or acceleration change rate exceeds the threshold, the scooter is considered to be in a dynamic acceleration operation. Through 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 changes in power demand. For example, under constant speed cruising conditions, the power demand of the motor is usually relatively stable, while under dynamic acceleration conditions, the power demand of the motor increases rapidly. Through this step, the energy demand of the electric scooter in different states is obtained. According to the power demand data and the temperature data, the energy loss value per unit time is calculated to obtain the energy consumption characteristic data. The energy consumption characteristic data is processed by operating condition characteristic matching, and the data with a speed change rate less than the preset threshold is classified as a constant speed cruising condition, and the data with a speed change rate greater than or equal to the preset threshold is classified as a dynamic acceleration condition. The constant speed cruising condition and the dynamic acceleration condition are respectively associated with the corresponding energy consumption characteristic data to obtain the operating condition-energy consumption mapping relationship. Based on this mapping relationship, the operating condition of the scooter is classified in real time during real-time operation to obtain the constant speed cruising condition data and the dynamic acceleration condition data.

[0015] Step S2: Based on the constant speed cruising condition data and the dynamic acceleration condition data, mathematical modeling 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; Specifically, mathematical modeling of the dual-motor system is carried out based on the constant speed cruising condition data and the dynamic acceleration condition data. In order to establish the electromagnetic model, mechanical transmission model and thermal model of the system, key parameters such as voltage, current and speed are extracted from the acquisition cycle to form a condition characteristic parameter matrix to describe the operating state of the electric scooter under different working conditions. The voltage and current data in the condition characteristic parameter matrix are correlated to describe the electromagnetic characteristics inside the motor. Through the calculation, the flux equation of the motor is obtained, which can reflect the interaction between the magnetic field and voltage and current inside the motor. The flux equation is linearized to obtain the electromagnetic model. According to the 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 speed parameter and 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 in the mechanical transmission process, the mechanical transmission loss data of the system is obtained. These data are summarized to form a mechanical transmission model to describe the energy conversion process from the motor to the wheel and the energy loss therein. Substitute the temperature data in the constant speed cruise condition data and the dynamic acceleration condition data 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 conditions are obtained to form a thermal model. The output data of the electromagnetic model, the output data of the mechanical transmission model and the output data of the thermal model are correlated and analyzed to obtain the system operation state characteristic data, which reflects the overall performance of the motor system under different working conditions, including energy conversion efficiency, loss characteristics and heat generation. Based on the system operation state characteristic data, the operating efficiency curve of the dual motor system under different working conditions is calculated to obtain the system efficiency distribution diagram, which shows the efficiency changes of the motor system under various states and helps the system find the optimal area of ​​system operation and the efficiency bottlenecks that exist. Based on the efficiency distribution diagram, the upper limit constraint thresholds of the motor speed, torque and temperature are set to ensure that the motor system operates within a safe and reliable range. The upper speed limit, torque limit and temperature limit of the motor are determined according to the boundary conditions of the high efficiency area in the efficiency distribution diagram. These constraint thresholds help protect the motor from damage caused by overload and overheating and ensure that the system operates in the high efficiency area. The system operation boundary parameters are normalized and matched with the operating condition characteristic parameter matrix to finally obtain the efficiency constraint conditions of the system.

[0016] Step S3, according to the system efficiency constraint condition, dynamically distribute and calculate the motor power to obtain the S-shaped power distribution function parameters; Specifically, the speed upper limit, torque upper limit and temperature upper limit in the system efficiency constraint conditions are normalized, and these different physical quantities are converted into dimensions under the same standard to obtain the maximum power limit parameter P of the motor. max , P max It is an important parameter of the maximum power output that the motor can withstand under various constraints, and provides boundary conditions for subsequent power distribution. According to the formula Establish an S-shaped allocation function, where P(x) is the allocated power value of a single motor, k is the curve adjustment coefficient, and x 0 is the critical point of power distribution, 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 load and high load, thereby avoiding the impact of sudden changes on the motor and the overall system. The constant speed cruise condition data is processed by interval statistics to adjust the parameters of the S-shaped function. For the constant speed cruise condition, since the system runs at a stable speed, the power distribution curve needs to be relatively flat to ensure that the energy output of the system can be slowly adjusted with the load demand. The adjustment coefficient k value is set to 0.5 to obtain a relatively smooth power distribution curve, which can reduce power fluctuations in the motor under a 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 under the constant speed cruise state. The dynamic acceleration condition is processed accordingly. Under the dynamic acceleration condition, the power demand of the motor usually changes rapidly, so the power distribution curve needs to have a large slope so that it can respond quickly to the changing load demand. The adjustment coefficient k is set to 2.0 to obtain a steep power distribution curve, which enables the motor to quickly increase power output under dynamic conditions to meet the instantaneous acceleration requirements. Through this step, the power distribution parameter group under dynamic conditions is obtained. These parameters help ensure that the motor can quickly respond to load changes during acceleration, thereby improving the dynamic performance of the scooter. Calculate x based on the power distribution parameter group under constant speed conditions 0 The optimal solution for the value of x in the range of 0.3 to 0.4 is obtained to obtain the critical point parameter for constant speed operation. 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 dynamic conditions, by calculating x in the range of 0.6 to 0.7 0The optimal solution of the dynamic working condition is obtained to obtain 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 realize timely response to load changes. In order to achieve effective switching between working conditions, the working condition switching rules are established according to the critical point parameters of the constant speed working condition and the dynamic working condition, and the working condition response function is obtained. The function of the working condition response function is to quickly adjust the power allocation strategy when the operating state of the scooter switches from a stable constant speed state to a dynamic state that requires acceleration, ensuring that the motor can allocate power in the optimal way under different working conditions, and improving the overall efficiency and dynamic response performance of the system. The working condition response function is combined with the maximum power limit parameter P of the motor. max The S-shaped power distribution function parameters are combined to obtain the parameters of the S-shaped power distribution function. The S-shaped power distribution function parameters can automatically adjust the power output of the motor according to the real-time operating status of the scooter, ensure smooth power distribution during constant speed cruising, and rapidly increase power during acceleration, thereby maximizing system efficiency. At the same time, the power distribution function can also effectively avoid problems such as overload or overheating of the motor during operation, ensuring that the entire system has good stability and safety while operating efficiently.

[0017] Step S4, inputting the parameters of the S-shaped power allocation function into the Markov decision process model, optimizing the state space and action space through approximate dynamic programming, and obtaining the optimal power allocation strategy; Specifically, the operating condition response function is combined with the parameters of the S-shaped power allocation function to construct a motor control state vector, which contains the operating condition type, vehicle speed, motor efficiency, and the S-shaped power allocation function parameters k and x. 0 , forming Markov state space data, where each state point fully describes the operating characteristics of the electric scooter at a certain moment. The action space is constructed based on the Markov state space data. In the action space, the S-shaped power allocation function parameters k and x are set. 0 The adjustment range of k is ±0.2, and x 0The adjustment range is ±0.1. In the power allocation strategy, the motor power output can be fine-tuned to meet the needs of different working conditions and obtain the action space parameters. In order to optimize the power allocation strategy, a reward function R(s,a) is constructed to evaluate the pros and cons of different strategies. According to the upper speed limit, upper torque limit and upper temperature limit in the system efficiency constraints, the reward function is set as a weighted calculation of system efficiency, energy loss and power 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 power response is set to 0.3. This weighting method ensures that under different working conditions, the electric scooter can take into account efficiency, energy consumption and power response, and achieve balanced operation to achieve the optimal control goal. Through this reward calculation function, the effect of each state and action combination is effectively evaluated, thereby guiding the optimization direction of Markov decision making. The state transition probability of Markov state space data is calculated. In the Markov decision process, the state transition probability describes the possibility of the system transitioning from one state to another. In order to accurately describe the characteristics of this state transition, the state transition probability is modeled using Gaussian distribution. The variance of the Gaussian distribution is set to 0.1. This setting ensures the randomness of state transitions while not deviating too much from the current state, thereby maintaining the stability of the system. On this basis, the state transfer matrix is ​​obtained, which is used to describe the possible transfer results of each state under the influence of the action. Based on the state transfer matrix and the reward calculation function, a three-layer neural network structure is constructed for the approximate calculation of the value function. The neural network contains 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 power. 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 return of each state. By continuously learning and adjusting network parameters, it can gradually approach the optimal value function. In order 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 of each parameter update is not too large and to maintain 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 network parameters are updated using a temporal difference algorithm, which uses the difference between the current state and the next state to update the network weights, effectively accelerating the learning process and converging to the optimal value function more quickly. The ε-greedy strategy is set according to the optimal value function to strike a balance between exploration and utilization. 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 in order to find a possible better strategy, and 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 allocation, 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 early 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 transfer matrix, and the optimal power allocation strategy is gradually approached through strategy iteration calculation. The 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. When cruising at a constant speed, the system can maintain efficient power output and reduce energy waste. At the same time, by dynamically adjusting the power distribution of the motor, it can adapt to various complex operating environments and ensure that the electric scooter achieves the best 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.

[0018] Step S5: According to the optimal power allocation strategy, the control parameters are optimized by proximal strategy calculation to obtain real-time control parameters; Specifically, the state parameters of the optimal power allocation strategy are analyzed to extract the S-shaped power allocation function parameters k and x under the current working conditions. 0 , and obtain the strategy parameters for initial optimization. Optimization construction is performed, where J(θ) is the optimization objective function, θ is the set of strategy parameters to be optimized, E[·] represents the expected value calculation symbol, and R t is the cumulative reward value at time t, α is the penalty factor, is the relative entropy between the new and old strategy distributions, which is used to measure the degree of change in strategy updates. and Represent the strategy distribution before and after optimization respectively. Through this optimization objective function, while keeping the strategy distribution as close as possible, the cumulative reward value is maximized to achieve the goal of balancing exploration and stability. In order to calculate the cumulative reward value R t, set the time step to 0.1 seconds, and use a sliding time window with a window size of 10 time steps. Within the sliding window, the reward value is calculated by weighted accumulation. The weight coefficient gradually decays over time, and the decay coefficient is set to 0.9. The reward calculation sequence is used to describe the operation effect of the scooter in a short period of time, highlighting the reward at the current moment, while taking into account the accumulation of rewards over the past period of time, which helps to improve the effectiveness and robustness of the strategy. The KL divergence value of the new and old strategy distributions is calculated based on the initial parameters of the strategy to measure the degree of strategy 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 strategy distribution to obtain the strategy update constraint, so as to avoid drastic changes in the strategy during the optimization process and maintain the stability of the system. The objective function is gradient calculated according to the reward calculation sequence and the strategy update constraint, and the Adam optimizer is used to update the parameters. The Adam optimizer is a gradient optimization method that achieves efficient parameter update by combining the estimation of the first-order and second-order moments. In the use of the Adam optimizer, the first-order moment estimation coefficient β 1 Set to 0.9, the second-order moment estimation coefficient β 2 Set to 0.999 and the learning rate to 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. In order to ensure that the optimized control parameters are within a reasonable range, the range is limited. The curve adjustment coefficient k value is limited to the interval of [0.3,2.5] to avoid the power distribution being too flat or too steep, which affects the responsiveness of the system. At the same time, the power distribution critical point x 0The value of is limited to 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 correction processing, the corrected control parameters are obtained for subsequent control processes. The state feedback model of the controller is constructed based on the corrected control parameters 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 motor speed deviation, torque deviation and temperature deviation. Through these variables, the key deviation information in the operation of the motor is reflected. In order to achieve high-precision control, the sampling period of the controller is set to 0.02 seconds, so as to ensure that the system state is updated and fed back in a short time to 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 adjust when it deviates from the target speed; the integral coefficient is used to eliminate steady-state errors and reduce the system's deviation accumulation by accumulating past deviations; the differential coefficient is used to suppress overshoot and control the speed of change of the deviation to reduce the overshoot phenomenon of the system during the adjustment process. 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 efficient operation under various operating conditions and improve overall energy efficiency and performance.

[0019] Step S6: 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.

[0020] Specifically, the Lyapunov function is constructed according to 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*(τ)) 2dτ represents the integral term of the output error of the S-shaped function. By constructing the 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 Lyapunov function is differentiated in time to obtain dV(m) / dt, which is the rate of change of the system energy over time. After substituting the real-time control parameters into the calculation, the instantaneous energy change of the system is obtained. When dV(m) / dt<0, it means that the system energy is gradually decreasing and the system tends to be stable. Through this step, the stability discriminant of the system is constructed to judge the stability of the electric scooter motor system under different control parameter conditions. Based on the system stability discriminant, the stability constraint condition matrix is ​​constructed, and the stability threshold is set to dV(m) / dt<-0.01, which means that it is necessary to ensure that the system energy decreases fast enough to ensure the stability of the system. Through this setting, the boundary conditions of online correction are obtained, which are used to limit the range of changes in the system state deviation so that the system is always in a stable operating state. In order to improve the reliability of the system, the parameter sensitivity analysis of the boundary conditions of online correction is carried out. The influence of each parameter on the system stability is measured by calculating the ratio of the parameter change to the system stability discriminant change. In the parameter sensitivity analysis, the nominal value of the parameter with a change of 1% is taken. Through this small disturbance, the parameter sensitivity matrix is ​​obtained. Each item in the matrix represents the influence of a specific parameter change on the system stability. Through analysis, the parameters with the greatest influence on the system stability are found to provide direction for subsequent correction. Based on the parameter sensitivity matrix, the real-time control parameters are ranked in importance, and the parameters with sensitivity values ​​greater than 0.5 are selected as the correction objects to obtain the parameter set to be corrected. The parameters to be corrected are the most significant part of the system stability. By accurately adjusting them, the stability and response performance of the system are significantly improved. An online parameter correction model is constructed based on the parameter set to be corrected, and the gradient descent method is used to iteratively optimize these parameters. In order to ensure that the optimization process can effectively reduce the system energy change rate, the loss function is set to the negative value of the Lyapunov function time differential dV(m) / dt. The optimization goal is to reduce the system energy as quickly as possible, thereby enhancing the stability of the system. During the optimization process, the maximum number of iterations is set to 100 times and the learning rate is 0.005 to ensure that the parameters can be gradually adjusted to approach the optimal value and obtain the corrected parameter value. The stability of the corrected parameter value 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 at all sampling points whether dV(m) / dt is less than 0 to ensure that the system is stable in each operating state. In order to find the optimal parameter combination, the parameter combination with negative dV(m) / dt and the smallest mean 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 system state deviation in real-time operation to ensure that the motor maintains optimal efficiency and stability under different operating conditions.

[0021] In the embodiment of the present invention, the real-time working condition recognition and classification technology is combined with the deep learning method to accurately divide the driving state, which effectively improves the system's recognition accuracy of different driving conditions and provides an accurate data basis for subsequent control strategy optimization; the S-shaped power distribution function is adopted to achieve smooth power switching of the dual-motor system, avoiding the impact during the working condition switching process, and at the same time, by dynamically adjusting the function parameters, the optimal power distribution under different working conditions is guaranteed; the Markov decision process and the approximate dynamic programming method are introduced to enable the system to have predictive control capabilities, and can predict the optimal control strategy based on historical data and current status, thereby improving the dynamic response performance of the system; the control parameters are adjusted in real time based on the proximal strategy optimization algorithm, and by setting reasonable objective functions and constraints, the dynamic optimization of parameters is achieved while ensuring control stability; the Lyapunov stability theory is used for system analysis and correction, and the online parameter adjustment mechanism is used to ensure the stable operation of the system under various working conditions, thereby improving the robustness of the control algorithm.

[0022] In a specific embodiment, the process of executing step S1 may specifically include the following steps: Collect the running data of the electric scooter within the sampling period to obtain vehicle speed data, acceleration data, motor speed data, current data and temperature data; Calculate the time domain characteristics of the vehicle speed data and acceleration data to obtain the speed change rate and acceleration change rate, and make a threshold judgment on the driving state based on the speed change rate and acceleration change rate to obtain the working condition judgment result; Based on the working condition identification result, the motor speed data and current data are processed in sections to obtain the power demand data, and the energy loss value per unit time is calculated according to the power demand data and temperature data to obtain the energy consumption characteristic data; Performing working condition feature matching on the energy consumption characteristic data, classifying the data with a speed change rate less than a preset threshold as a constant speed cruising condition, and classifying the data with a speed change rate greater than or equal to the preset threshold as a dynamic acceleration condition; The constant speed cruising condition and the dynamic acceleration condition are respectively associated with the corresponding energy consumption characteristic data to obtain the condition-energy consumption mapping relationship, and real-time classification is performed based on the condition-energy consumption mapping relationship to obtain the constant speed cruising condition data and the dynamic acceleration condition data.

[0023] Specifically, multiple important data generated by the scooter during operation 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 through an acceleration sensor, the motor speed is measured through a tachometer built into the motor, the current data is obtained through a Hall effect sensor, and the temperature of the motor and control system is measured through a temperature sensor. The sampling period is the frequency of data collection. The time domain characteristics of the vehicle speed data and acceleration data are calculated to obtain the speed change rate and acceleration change rate. The speed change rate is defined as: ; in, Indicates at time The speed change rate at a moment, Indicates the current speed of the vehicle. is the vehicle speed at the previous sampling moment, is the sampling time interval. Similarly, the acceleration rate of change is calculated by a similar formula: ; in, is 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. The motion state of the scooter is reflected by calculating the time domain characteristics of the vehicle speed and acceleration. Based on the speed change rate and the acceleration change rate, the threshold judgment is made on the driving state of the scooter to obtain the discrimination result of the working condition. A preset speed change rate threshold is set. If the speed change rate is less than this threshold, the scooter is considered to be in a constant speed cruising condition, otherwise it is considered to be a dynamic acceleration condition. Threshold judgment enables the system to quickly distinguish different working conditions. After obtaining the working condition discrimination result, 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: ; in, Indicates at time The power demand at the moment, is the motor voltage, is the current. Through segmented processing, the power requirements under constant speed cruising and dynamic acceleration are calculated respectively, and the energy loss per unit time is calculated in combination with the temperature data. The energy loss is expressed as: ; in, 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 energy loss is not only related to power demand, but also to temperature, because the efficiency of the motor will decrease at high temperatures, resulting in more energy loss. The energy consumption characteristic data is matched with the working condition characteristics, and the data with a speed change rate less than the preset threshold is classified as a constant speed cruising condition, and the data with a speed change rate greater than or equal to the preset threshold is classified as a dynamic acceleration condition. Through the matching process, a large amount of collected data is accurately classified for subsequent analysis and optimization. The constant speed cruising condition and the dynamic acceleration condition are respectively associated with the corresponding energy consumption characteristic data to obtain a working condition-energy consumption mapping relationship, which reflects the energy consumption of the scooter under different working conditions. For example, the energy consumption is lower during constant speed cruising, while the energy consumption is higher during dynamic acceleration. Based on the established working condition-energy consumption mapping relationship, the operating status of the electric scooter is classified in real time to obtain constant speed cruising condition data and dynamic acceleration condition data.

[0024] In a specific embodiment, the process of executing step S2 may specifically include the following steps: Based on the constant speed cruising condition data and dynamic acceleration condition data, the voltage, current and speed parameters within the acquisition period are extracted to obtain the condition characteristic parameter matrix; Perform correlation calculation on the voltage and current data in the working condition characteristic parameter matrix to obtain the flux equation of the motor, and perform linearization on the flux equation to obtain the electromagnetic model; According to the speed parameters and tire radius parameters in the working 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; Substitute the temperature data in the constant speed cruising condition data and the dynamic acceleration condition data into the heat balance calculation formula, calculate the copper loss and iron loss data, and obtain the 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 characteristic data of the system operation status, and the operating efficiency curve of the dual-motor system under different working conditions is calculated based on the characteristic data of the system operation status 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. The system operation boundary parameters are normalized and matched with the operating condition characteristic parameter matrix to obtain the system efficiency constraint conditions.

[0025] Specifically, based on the constant speed cruise condition data and dynamic acceleration condition data, the voltage, current and speed parameters within the acquisition period are extracted to obtain the condition characteristic parameter matrix. The condition characteristic parameter matrix contains the key electrical characteristics of the system under different operating conditions, which is expressed as: ; in, Indicates at time Moment The voltage data of the subsamples, Indicates The current data sampled by Indicates The motor speed is sampled at times. These data reflect the changes in the electrical parameters of the electric scooter during operation. The voltage and current data in the operating condition characteristic parameter matrix are correlated to obtain the motor flux equation. The flux is an important parameter that describes the electromagnetic characteristics of the motor and is calculated using the following formula: ; in, Indicates at time The magnetic link of time, is the self-inductance coefficient of the motor, is the current data, is the voltage data, is the sampling time interval. The flux equation is linearized to simplify the calculation so that the complex nonlinear flux characteristics can be described by linear equations, which is convenient for the subsequent modeling and control. After linearization, the electromagnetic model is expressed as a linear equation in the form of: ; in, is the resistance of the motor winding, is the self-inductance coefficient, Represents the time derivative of the current. The linearized electromagnetic model reflects the electromagnetic response of the motor under different operating conditions. 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 establish a mechanical transmission model. The torque is calculated by the following formula: ; in, Indicates at time The torque at the moment, is the torque constant of the motor, is the current data. Consider the loss caused by friction and other factors in the mechanical transmission process. The transmission loss is calculated by the following formula: ; in, For time Transmission loss at the time, is the motor speed, is the mechanical transmission efficiency. By calculating the torque and transmission loss, the mechanical transmission model is obtained, which describes the relationship between the motor output torque and the energy loss in the transmission process. Substitute the temperature data in the constant speed cruise condition data and the dynamic acceleration condition data into the heat balance calculation formula, calculate the copper loss and iron loss data, and obtain the thermal model. The copper loss is calculated by the following formula: ; in, is the copper loss power, is the current, is the motor winding resistance. The iron loss is calculated by the following formula: ; in, 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, the thermal model is obtained to describe the heat loss characteristics of the motor under different working conditions. The output data of the electromagnetic model, mechanical transmission model and thermal model are correlated and analyzed to obtain the characteristic data of the system operation status. Based on these characteristic data, the operating efficiency curve of the dual-motor system under different working conditions is calculated, and the efficiency distribution diagram of the system is drawn. The operating efficiency is calculated by the following formula: ; in, For time System efficiency at all times, is the motor output power, is the input power. By calculating the efficiency under different working conditions, an efficiency distribution diagram is drawn to show the efficiency change of the motor under different speed, torque and temperature conditions. Based on the efficiency distribution diagram, the upper speed limit, torque upper limit and temperature upper limit of the motor are set to ensure that the system operates within a stable and efficient range, protect the motor from damage by overload and overheating, and thus extend the service life of the equipment. The system operation boundary parameters are normalized so that they can be uniformly compared at different scales. For example, the speed, torque and temperature are normalized to the range of [0,1] respectively, so that physical quantities of different dimensions can be optimized and analyzed under the same framework. The normalized operation boundary parameters are matched with the operating condition characteristic parameter matrix to obtain the efficiency constraint conditions of the system. The efficiency constraint conditions describe the efficiency limit of the motor system under different operating conditions, so that the control system can achieve optimal control while satisfying the constraint conditions. Through the above steps, the modeling, efficiency calculation and optimization constraint conditions based on the operation data of the electric scooter are finally realized.

[0026] In a specific embodiment, the process of executing step S3 may specifically include the following steps: 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 Establish an S-shaped allocation function, where P(x) is the allocated power value of a single motor, k is the curve adjustment coefficient, and x 0 is the critical point of power allocation, x is the load demand ratio, and the initial model of the S-shaped function is obtained; Interval statistics are performed on the constant speed cruising condition data, and the k value is set to 0.5 to obtain a gentle power distribution curve, and the power distribution parameter group under the constant speed condition is obtained. Interval statistics are performed on the dynamic acceleration condition data, and the k value is set to 2.0 to obtain a steep power distribution curve, and the power distribution parameter group under the dynamic condition is obtained. Calculate x based on the power distribution parameter group under constant speed condition 0 The optimal solution with a value between 0.3 and 0.4 is obtained to obtain the critical point parameters of the constant speed condition, and x is calculated based on the power distribution parameter group under the dynamic condition. 0 The optimal solution with a value in the range of 0.6 to 0.7 is obtained, and the critical point parameters of the dynamic working condition are obtained; According to the critical point parameters of the constant speed working condition and the critical point parameters of the dynamic working condition, the working condition switching rule is established to obtain the working condition response function, and the working condition response function is compared with the motor maximum power limit parameter P max The S-shaped power allocation function parameters are obtained.

[0027] Specifically, the speed upper limit, torque upper limit and temperature upper limit in the system efficiency constraint conditions are normalized to obtain the maximum power limit parameters of the motor. . Different physical quantities (such as speed, torque and temperature) are dimensionless so that they can be operated on a unified scale. Assume that the upper limit of the system speed is , the upper torque limit is , the upper temperature limit is . Normalization is performed using the following formula: ; in, , and Represent the normalized speed, torque and temperature respectively. The value of the normalized parameter is between [0,1], which is convenient for uniformly representing physical quantities of different dimensions. Based on the normalized value, the maximum power limit parameter of the motor Calculated by the following formula: ; in, , and is the weighting factor used to represent the weight 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 limitation parameter of the motor is obtained , providing boundary conditions for subsequent power allocation. An S-shaped allocation function is established to describe the power output of the motor under different load requirements. The S-shaped allocation function is expressed by the following formula: ; in, The allocated power value for 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]). Curve adjustment coefficient Determines the steepness of the S-curve. Determines the critical point in the curve where the power distribution begins to change significantly. and , control the power distribution characteristics of the motor so that the power can be adjusted smoothly and quickly when the load changes. Perform interval statistics on the constant speed cruise condition data to optimize the power distribution parameters. For constant speed cruise conditions, the power distribution should be relatively smooth to ensure the stability of energy output. Set the curve adjustment coefficient , making the S-shaped distribution curve smoother, and obtaining the power distribution parameter group under constant speed conditions. Under constant speed cruising, the load demand is usually relatively stable, and the power output does not need to change frequently. Therefore, the power distribution function is required to maintain a smooth transition when the load demand changes slightly, to avoid frequent power adjustments caused by small load changes. For dynamic acceleration condition data, since it is necessary to achieve a fast power response to meet the acceleration requirements of the vehicle, when performing interval statistics on the dynamic acceleration condition data, the curve adjustment coefficient is set , to obtain a steep power distribution curve. For dynamic acceleration conditions, the power of the motor needs to rise rapidly to meet the acceleration requirements, requiring the S-shaped distribution function to quickly increase the output power when the load changes to ensure the dynamic response performance of the vehicle. After obtaining the power distribution parameter group under constant speed cruising conditions and dynamic acceleration conditions, determine the critical point parameters of the S-shaped distribution function For constant speed cruising conditions, the power distribution curve should start to distribute power gradually when the load demand is low. The value of is set in the range of [0.3,0.4], and the optimal power distribution critical point is found through optimization calculation. The critical point is determined so that the system can start power distribution earlier when the load demand is low, thereby effectively improving energy efficiency. For dynamic conditions, since it is necessary to quickly increase power output under higher load demand, The value of is set in the range of [0.6,0.7], and the optimal power distribution critical point is determined by calculation. This ensures that when the load demand is high, the motor can respond quickly and enter a high-power output state to meet the acceleration needs of the scooter. According to the constant speed critical point parameters and the dynamic critical point parameters, the operating condition switching rules are established to obtain the operating condition response function. The operating condition response function is used to describe the power distribution strategy of the scooter when switching between different operating conditions, such as how to adjust the power distribution curve when switching from a constant speed cruising state to a dynamic acceleration state. The operating condition response function ensures that the system performs smooth power switching under different operating conditions to avoid negative impacts on the stability of the system due to sudden changes in power. The operating condition response function is combined with the motor maximum power limit parameter The final S-shaped power allocation function parameters are obtained by combining them. These parameters guide how the motor allocates power under different load requirements to ensure that the system achieves optimal power output under various working conditions. For example, when cruising at a constant speed, the motor output power gradually increases according to a gentle S-shaped curve to save energy, while in the acceleration state, the motor output power increases rapidly according to a steep S-shaped curve to ensure sufficient acceleration capability.

[0028] In a specific embodiment, the process of executing step S4 may specifically include the following steps: The operating condition response function and the S-shaped power distribution function parameters are constructed into a motor control state vector, where the state vector contains the operating condition type, vehicle speed, motor efficiency, and the S-shaped power distribution function parameters k and x 0 , get the Markov state space data; The action space is constructed for the Markov state space data, and the adjustment range of k value is set to ±0.2, x 0 The value is adjusted within the range of ±0.1 to obtain the action space parameters; According to the upper speed limit, upper torque limit and upper temperature limit in the system efficiency constraint conditions, a reward function R(s,a) is constructed, and 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 of the Markov state space data is calculated, and the transition probability is modeled using Gaussian distribution. The variance of the transition probability is set to 0.1, and the state transfer matrix is ​​obtained. A three-layer neural network structure is constructed based on the state transfer matrix and reward calculation function. The number of nodes in the input layer is the state dimension, the number of nodes in the hidden layer is twice the state dimension, and the number of nodes in the output layer is 1, thus obtaining a value function approximation network. The value function approximation network is iteratively optimized, the learning rate is set to 0.01, the discount factor is set to 0.9, and the network parameters are updated using the temporal difference algorithm to obtain the optimal value function; According to the optimal value function, the ε-greedy strategy is set, the initial exploration rate is set to 0.3, and the exploration rate is gradually reduced at a decay rate of 0.995 to obtain the exploration strategy parameters. The exploration strategy parameters are applied to the sampling process of the state transfer matrix, and the strategy iterative calculation is performed to obtain the optimal power allocation strategy.

[0029] Specifically, the operating condition response function and the parameters of the S-shaped power allocation function are combined to construct a motor control state vector. The state vector is a complete description of the current state of the system, including the operating condition type, vehicle speed, motor efficiency, and the parameters in the S-shaped power allocation function. and The state vector is expressed as: in, is the operating condition type (such as constant speed cruising or dynamic acceleration), is the current vehicle speed, is the motor efficiency, and They are the curve adjustment coefficient and the critical point of power distribution in the S-shaped power distribution function. By constructing a state vector, the state of the electric scooter in operation is described. Each element in the state vector helps the control system understand the current operating conditions and provide support for subsequent decisions. The action space is constructed for the Markov state space data. The action space represents the control actions that the system may take in each state. The construction of the action space is mainly and Adjustment, setting The value can be adjusted within the range of ,and The value can be adjusted within the range of If the current The value of is 0.5, then the action space The adjustment range of is [0.3,0.7]. Similarly, assuming that the current The value of is 0.5, then the action space The range is [0.4,0.6]. The construction of the action space enables the motor to adjust the power allocation function appropriately in each state to adapt to the current operating requirements. The reward function R(s,a) is constructed according to the speed upper limit, torque upper limit and temperature upper limit in the system efficiency constraints to evaluate the pros and cons of different states and actions. The reward function is based on the speed upper limit, torque upper limit and temperature upper limit in the system efficiency constraints, and takes into account the weights of system efficiency, energy loss and power response. The reward function is expressed as: ; in, represents the efficiency of the system, represents 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 system efficiency, we ensure that the system operates as efficiently as possible. Based on Markov state space data, we model the changes in system states, that is, we calculate the state transition probability. We use Gaussian distribution to model the transition probability, and the variance of the transition probability is set to 0.1, which means that the system has a certain degree of randomness in the transition between states, but it is mainly concentrated near the current state. State transition matrix Describes the system taking an action From the current state Transition to a new state 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 reward calculation function, a three-layer neural network structure is constructed to approximate the value function. Value function It represents the cumulative rewards 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 transmits the state vector into the network. The hidden layer enhances the network's expressive power by increasing the number of nodes, so that the network can capture the complex relationship between the state and the reward. The output layer gives an estimate of the current state. The value function approximation network is iteratively optimized. The time difference algorithm is used to update the parameters of the network. The learning rate is set to 0.01 to ensure that the pace of each parameter update is moderate and can gradually approach the optimal value. At the same time, the discount factor Set to 0.9 to balance short-term and long-term rewards, ensuring that the system focuses on immediate benefits while not ignoring long-term accumulated benefits. Through the temporal difference algorithm, the difference between the current state and the next state is used to update the network parameters, accelerate the learning process, and make the network converge to the optimal value function faster. After the optimal value function is obtained, set it according to the value function. - Greedy strategy to strike a balance between exploration and exploitation. -The greedy strategy is a common method used to control the exploration behavior of the system during the learning process. Initial exploration rate Set to 0.3, it means that the system has a 30% probability of selecting a random action to explore new possibilities, and a 70% probability of selecting the current optimal action to utilize existing knowledge. As the learning process proceeds, the exploration rate is gradually reduced at a decay rate of 0.995, so that the system gradually reduces randomness and relies more on the optimal strategy that has been learned. In this way, the exploration strategy parameters are obtained to ensure that the system can fully explore in the early stage of learning, and gradually stabilize on the optimal strategy in the later stage. The exploration strategy parameters are applied to the sampling process of the state transfer matrix, and the optimal power allocation strategy is obtained through policy iteration calculation. In the policy iteration, the system starts from the initial state, selects actions according to the current strategy, and then updates the value function according to the reward function and the state transfer matrix, and gradually optimizes the strategy. This process is repeated until the strategy converges and the optimal power allocation strategy is obtained.

[0030] In a specific embodiment, the process of executing step S5 may specifically include the following steps: The optimal power allocation strategy is analyzed for state parameters, and the S-shaped power allocation function parameters k and x under the current working conditions are extracted. 0 , get the 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 policy parameters, the penalty factor α is set to 0.01, and the relative entropy is calculated by the mean and variance of the policy distribution to obtain the policy update constraint; The objective function is gradient-calculated according to the reward calculation sequence and the policy update constraints, and the Adam optimizer is used to update the parameters, where the first-order moment estimation coefficient β 1 is 0.9, and the second-order moment estimation coefficient β 2is 0.999, the learning rate is 0.001, and the optimized control parameters are obtained; The optimized control parameters are limited to the range, the curve adjustment coefficient k is limited to the interval [0.3, 2.5], and the power distribution critical point x is 0 The value is limited to the interval [0.2, 0.8] to obtain the corrected control parameters; The 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 to obtain the controller model parameters. Substitute the controller model parameters into the PID control structure, set the proportional coefficient of 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, so as to obtain the real-time control parameters.

[0031] Specifically, the state parameters of the optimal power allocation strategy are analyzed to extract the S-shaped power allocation function parameters under the current working conditions. and , and get the initial strategy parameters. represents the curve adjustment coefficient of the S-shaped allocation function, which controls the power variation with load demand, and Indicates the critical point of power distribution and determines the starting point of the surge in power output. By extracting these parameters, initial values ​​are provided for subsequent optimization, thereby improving the effect of power distribution. Perform an optimized build, where To optimize the objective function, is the set of strategy parameters to be optimized, represents the expected calculation, for The cumulative reward value at the moment, is the penalty factor, is the relative entropy between the new and old strategy distributions, and Respectively represent the strategy distribution before and after optimization. Relative entropy (i.e. KL divergence) is used to measure the difference between the new strategy and the old strategy. The penalty factor Control the magnitude of the strategy change to ensure that the strategy does not change drastically during the optimization process and maintain the stability of the system. By constructing the optimization objective function, the optimal strategy parameters are gradually found on the basis of balancing the maximization of rewards and the smoothness of the strategy. In order to optimize the optimization objective function, the cumulative reward value is calculated. . Set the time step to 0.1 seconds, and use a sliding time window with a window size of 10 time steps. This means that in each calculation cycle, the cumulative reward value is calculated based on the performance in the past 1 second. The reward value is weighted and accumulated, and the weight coefficient decays over time. The decay coefficient is set to 0.9. The calculation formula for the cumulative reward value is expressed as: ; in, is the time attenuation coefficient, Indicates at time The instantaneous reward value at the moment. Through this step, more attention is paid to the performance at the current moment, while taking into account the past rewards to form a comprehensive evaluation. Based on the initial parameters of the strategy and , calculate the KL divergence value of the new and old strategy distributions to measure the strategy difference before and after optimization. The calculation of KL divergence is based on the mean and variance of the strategy distribution, and is obtained by the following formula: ; in, and denote the probability distribution of the old strategy and the new strategy respectively, is a random variable related to power allocation. The larger the KL divergence, the greater the difference between the new and old strategies. In order to maintain the stability of the system, a penalty factor is set. , to limit the range of policy updates. Through policy update constraints, the range of policy changes can be effectively controlled during the optimization process, thereby avoiding drastic effects 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 to effectively adjust the step size of each gradient descent. In the Adam optimizer, the first-order moment estimation coefficient Set to 0.9, the second-order moment estimation coefficient Set to 0.999 and the learning rate to 0.001. The parameter update formula of the Adam optimizer is: ; ; ; ; in, and are the first-order and second-order moment estimates of the gradient, is the learning rate, To prevent decimal values ​​with a denominator of zero, is the set of parameters to be optimized, is the gradient of the objective function to the parameter. Through this series of parameter update processes, the optimal strategy parameters are gradually approached to obtain the optimized control parameters. For the optimized control parameters, the range is limited to ensure that the parameters are within a reasonable range. The value is limited to the interval [0.3,2.5], and the power distribution critical point The value is limited to the interval of [0.2,0.8]. Avoid the power distribution curve being too steep or too flat, and avoid the power distribution starting point being too early or too late to ensure the performance and stability of the system. Through range limitation, the corrected control parameters are obtained. The controller state feedback model is constructed based on the corrected control parameters. The state feedback model is used to describe the relationship between the current state of the system and the feedback control, including motor speed deviation, torque deviation and temperature deviation. The sampling period of the controller is set 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, thereby providing feedback basis for subsequent control and ensuring 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, 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. The proportional coefficient is used to control the response speed of the system, ensuring that the system can respond quickly when a speed deviation is detected; the integral coefficient is used to eliminate steady-state errors, reducing the system's deviation accumulation by accumulating past deviations; the differential coefficient is used to suppress overshoot, by controlling the rate of change of the deviation to reduce 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, thereby achieving efficient and stable control of the motor, and finally obtaining real-time control parameters.

[0032] In a specific embodiment, the process of executing step S6 may specifically include the following steps: Construct Lyapunov function based on 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; Perform time differentiation operation dV(m) / dt on the Lyapunov function, and substitute the real-time control parameters into the calculation, where dV(m) / dt represents the rate of change of system energy over time. When dV(m) / dt<0, the system is stable, and t represents time. The system stability discriminant is obtained. Based on the system stability discriminant, a stability constraint matrix is ​​constructed, and the stability threshold dV(m) / dt<-0.01 is set to obtain the online correction boundary condition; The parameter sensitivity analysis of the online correction boundary conditions is carried out. The parameter sensitivity matrix is ​​obtained by calculating the ratio of the parameter change to the change of the system stability discriminant, where the change takes 1% of the parameter nominal value. The real-time control parameters are ranked according to the parameter sensitivity matrix, and the 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, where 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 stability of the correction parameter value is verified, and the updated parameters are substituted into the Lyapunov function for calculation to obtain the system stability index. The correction parameter value is screened according to the system stability index, and dV(m) / dt<0 is checked at all sampling points. The parameter combination that meets the conditions and has the smallest dV(m) / dt mean is selected to obtain the target motor control strategy.

[0033] Specifically, the Lyapunov function is constructed based on the real-time control parameters , which is used to evaluate the energy state of the system and ensure the stability of the system. The Lyapunov function is expressed as: ; in, is the system energy function, is the system state vector including 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 state deviation, is the time variable, is the actual S-shaped function in time The output value when is the expected S-shaped function at time The output value at the time. Integral term Represents the error energy accumulation between the actual and expected outputs. This term is used to describe the accuracy of power distribution. By constructing this Lyapunov function, the change of system energy over time is effectively described, and an important indicator for measuring system stability is provided. The Lyapunov function is time differentiated to obtain the rate of change of system energy over time. The time differential of the Lyapunov function It is expressed as: ; in, represents the rate of change of the state deviation term over time, and represents the rate of change of the S-shaped output error over time. To calculate these rates of change, the real-time control parameters are substituted into the Lyapunov function and the derivative is taken. , which means that the energy of the system is decreasing, indicating that the system is tending to a stable state. Through this process, the stability discriminant of the system is obtained. On this basis, the stability constraint matrix is ​​constructed and the stability threshold is set as , indicating that the system energy change rate should be less than -0.01 to ensure that the system can quickly dissipate energy during operation and maintain a stable state. This setting can provide a reasonable stability boundary for the system to ensure that energy accumulation does not occur during the control adjustment process and maintain the normal operation of the system. Parameter sensitivity analysis is performed on the boundary conditions of online correction to determine the degree of influence of each control parameter on system stability. The sensitivity of each parameter is measured by calculating the ratio of the change in the amount of each parameter to the change in the system stability discriminant. The parameter change is taken as 1% of its nominal value, that is, assuming that the nominal value of a parameter in the current operating state is , then its change is By calculating these changes, the stability discriminant The influence of , the parameter sensitivity matrix is ​​obtained: ; in, Indicates The sensitivity of the parameters to the system stability, Indicates The change in the parameter, Indicates that due to The change in the rate of energy change caused by the parameter sensitivity matrix. 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, 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 parameter set to be corrected. A sensitivity value greater than 0.5 indicates that the parameter has a greater influence on the stability of the system, so taking it as the correction object can significantly improve the stability of the system. Based on the parameter set to be corrected, an online parameter correction model is constructed, and the gradient descent method is used to iteratively optimize these parameters. The loss function is set as the time differential of the Lyapunov function The negative value of ensures that the system energy continues to decrease during the optimization process, making the system stable. The optimization process of gradient descent is expressed as: ; in, For the The parameters for the iteration, is the learning rate, set to 0.005 to ensure that the change amplitude of each parameter update will not be too large to cause system instability. The maximum number of iterations is set to 100 times so that the parameter value close to the optimal value can be found within a limited time. Through this step, the optimized correction parameter value is obtained. The stability of the correction parameter value is verified. The updated parameters are substituted into the Lyapunov function for calculation to obtain the stability index of the system. For each sampling point, the time differential of the Lyapunov function is calculated. , and check whether it satisfies Only when this condition is met at all sampling points can the system be guaranteed to be stable during the entire operation. The parameter combination with the smallest mean is used as the final control parameter to ensure that the system achieves the best stability under the optimized operating state. The goal of this process is to find a set of parameters that can minimize the system energy and thus obtain the target motor control strategy.

[0034] The above describes the intelligent motor efficiency optimization method of the electric scooter in the embodiment of the present invention. The following describes the intelligent motor efficiency optimization system of the electric scooter in the embodiment of the present invention. Figure 2 , an embodiment of the intelligent motor efficiency optimization system for an electric scooter in an embodiment of the present invention includes: The acquisition module is used to collect the driving parameters of the electric scooter in real time, and classify the driving parameters according to the working conditions to obtain the constant speed cruising working condition data and the dynamic acceleration working condition data; Modeling module, used to mathematically model the dual-motor system based on constant speed cruise condition data and dynamic acceleration condition data, establish electromagnetic model, mechanical transmission model and thermal model, and obtain system efficiency constraint conditions; The allocation module is used to dynamically allocate and calculate the motor power according to the system efficiency constraint conditions to obtain the S-shaped power allocation function parameters; A calculation module is used to input the parameters of the S-shaped power allocation function into the Markov decision process model, optimize the state space and action space through approximate dynamic programming, and obtain the optimal power allocation strategy; An optimization module is 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 real-time control parameters using Lyapunov function to obtain the target motor control strategy.

[0035] Through the coordinated cooperation of the above-mentioned components, real-time working condition recognition and classification technology is used, combined with deep learning methods to accurately divide the driving state, effectively improving the system's recognition accuracy of different driving conditions, and providing an accurate data basis for subsequent control strategy optimization; the S-shaped power distribution function is adopted to achieve smooth power switching of the dual-motor system, avoiding the impact during the working condition switching process, and at the same time, by dynamically adjusting the function parameters, the optimal power distribution under different working conditions is guaranteed; the introduction of Markov decision process and approximate dynamic programming method enables the system to have predictive control capabilities, and can predict the optimal control strategy based on historical data and current status, thereby improving the dynamic response performance of the system; the control parameters are adjusted in real time based on the proximal strategy optimization algorithm, and by setting reasonable objective functions and constraints, dynamic optimization of parameters is achieved while ensuring control stability; the Lyapunov stability theory is used for system analysis and correction, and the online parameter adjustment mechanism is used to ensure the stable operation of the system under various working conditions and improve the robustness of the control algorithm.

[0036] Reference Figure 3 In an embodiment of the present invention, a computer device is also provided. The computer device may be a server, and its internal structure may be as follows: Figure 3 As 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 designed by the computer 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.

[0037] Those skilled in the art will understand that Figure 3 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied.

[0038] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored, and 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.

[0039] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and 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 embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided by the present invention and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-speed data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM.

[0040] 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, systems and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0041] If 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 this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the whole 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, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0042] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the 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; 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: The real-time collection of the driving parameters of the electric scooter and the operating condition classification processing of the driving parameters to obtain constant speed cruising operating condition data and dynamic acceleration operating condition data include: Collect the running data of the electric scooter within the 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 a speed change rate and an acceleration change rate, and performing threshold judgment on the driving state according to the speed change rate and the acceleration change rate to obtain a working condition judgment result; Based on the working condition discrimination result, the motor speed data and the current 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; Performing operating condition feature matching on the energy consumption characteristic data, classifying data with a speed change rate less than a preset threshold as a constant speed cruising condition, and classifying data with a speed change rate greater than or equal to the preset threshold as a dynamic acceleration condition; The constant speed cruising condition and the dynamic acceleration condition are respectively associated with the corresponding energy consumption characteristic data to obtain a condition-energy consumption mapping relationship, and real-time classification is performed based on the condition-energy consumption mapping relationship to obtain constant speed cruising condition data and dynamic acceleration condition data.

3. The intelligent motor efficiency optimization method for an electric scooter according to claim 2, 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.

4. The intelligent motor efficiency optimization method for an electric scooter according to claim 3, 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.

5. The intelligent motor efficiency optimization method for an electric scooter according to claim 4, 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 speed upper limit, torque upper limit and temperature upper 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.

6. The intelligent motor efficiency optimization method for an electric scooter according to claim 5, 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.

7. The intelligent motor efficiency optimization method for an electric scooter according to claim 6, 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.

8. 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 7, 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.

9. 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 7 is implemented.

10. 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 7.

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

  • Intelligent energy management method for electric vehicle

    CN118107410A

Cited By

  • Motor dynamic efficiency optimization regulation and control system

    CN121055846A