Vertical vibration control method of electric vehicle driven by wheel hub motor based on TD3 algorithm
Through the vertical vibration control method of the hub motor-driven electric vehicle based on the TD3 algorithm, a dynamic model and active suspension force prediction network model are established, and the vibration problem caused by the motor eccentricity of the hub motor-driven electric vehicle is solved, and the vertical direction of the vehicle is realized The suppression of longitudinal vibration improves driving smoothness and ride comfort.
Patent Information
- Application Number
- CN202411457120.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-18
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2044-10-18
AI Technical Summary
The torque fluctuates the permanent magnet synchronous motor due to the motor constant and rotor eccentricity, resulting in unbalanced magnetic tension, causing magnetic solid coupling vibration and noise problems, affecting the vehicle's handling stability and ride comfort.
The vertical vibration control method of electric vehicles driven by the hub motor based on the TD3 algorithm is adopted, and the output thrust of the linear motor is controlled through electrical signals, and the longitudinal driving dynamics model, permanent magnet synchronous motor model, vehicle vertical vibration dynamics model and random road excitation model are established. Active suspension force prediction network model, using reinforcement learning toolbox for simulation verification and iterative training, optimize the state space equation of the suspension system to suppress vertical and longitudinal vibration of the vehicle.
Effectively suppress vertical and longitudinal vibration of the vehicle, improve vehicle driving smoothness, reduce noise, and improve ride comfort.
Smart Images

Figure CN118966033B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of vehicle vibration control, and in particular to a vertical vibration control method of an electric vehicle driven by a hub motor based on a TD3 algorithm. Background Art
[0002] At present, the number of cars in use continues to rise, environmental pollution is getting worse, and electric vehicles are developing rapidly. In-wheel motor-driven electric vehicles have attracted widespread attention due to their compact structure and the convenience of independent control of individual wheels. In-wheel motor drive is to install the motor directly on the wheel and drive the wheel to move. On the one hand, the integration of the drive system into the wheel rim will lead to an increase in unsprung mass, which will reduce the vehicle's handling stability and ride comfort. On the other hand, the introduction of in-wheel motors causes electric vehicles to have coupled vertical vibration problems: under road excitation, it is easy to cause eccentricity between the motor stator and rotor, thereby causing torque fluctuations in the permanent magnet synchronous motor, making the motor air gap uneven and generating unbalanced magnetic pull. The unbalanced magnetic pull acts on the stator and rotor of the motor to further aggravate the eccentricity, and at the same time cause magnetic-solid coupling vibration and noise problems. Summary of the invention
[0003] The purpose of the present invention is to provide a vertical vibration control method for a hub motor driven electric vehicle based on the TD3 algorithm, which can control the thrust output of the linear motor through electrical signals, control the suspension system, suppress the vertical and longitudinal vibrations of the vehicle, and help improve the driving smoothness of the vehicle.
[0004] To achieve the above object, the present invention provides a method for controlling vertical vibration of an electric vehicle driven by a hub motor based on a TD3 algorithm, comprising the following steps:
[0005] S1. Analyze the driving conditions and determine the longitudinal driving dynamics model of the electric vehicle driven by the wheel hub motor;
[0006] S2. According to the actual working conditions and the influence of dynamic eccentricity on the unbalanced magnetic pull of the permanent magnet synchronous motor, the radial unbalanced magnetic pull of the permanent magnet synchronous motor is modeled and a permanent magnet synchronous motor model is established;
[0007] S3. Establish a vehicle vertical vibration dynamics model and determine the vertical vibration dynamics motion equation;
[0008] S4, using filtered white noise to establish a random road excitation model;
[0009] S5. The longitudinal driving dynamics model, permanent magnet synchronous motor model, vehicle vertical vibration dynamics model, and random road excitation model obtained in S1-S4 are coupled to form a 1 / 4 vehicle suspension system, and the state space equation of the 1 / 4 vehicle suspension system is calculated according to the dynamic motion equations of the longitudinal driving dynamics model, permanent magnet synchronous motor model, vehicle vertical vibration dynamics model, and random road excitation model in S1-S4;
[0010] S6. Build an active suspension force prediction network model based on the TD3 algorithm in the 1 / 4 vehicle suspension system, taking the vehicle body vertical acceleration, suspension deflection, road excitation and motor unbalanced magnetic pull as inputs, and output the active control force of the suspension;
[0011] S7, iteratively training the active suspension force prediction network model of S6;
[0012] S8. Use the reinforcement learning toolbox in the simulation software to establish a simulation model of the active suspension force prediction network model and complete the simulation verification.
[0013] Preferably, in S1, the longitudinal driving dynamics motion equation of the longitudinal driving dynamics model is as follows:
[0014] ;
[0015] in, is the vehicle mass, is the actual speed of the vehicle, is the equivalent longitudinal force, , are air resistance and rolling resistance, is the vertical load, is the wheel moment of inertia, is the wheel angular velocity, Indicates the acceleration / braking torque generated by the hub motor; is the air resistance coefficient, is the frontal area of the vehicle, is the rolling resistance coefficient, For the body mass, is the unsprung mass of the vehicle, is the acceleration due to gravity, is the equivalent stiffness of the tire spring connection, is the wheel radius, is the tire deflection.
[0016] Preferably, in S2, when the radial unbalanced magnetic pull is modeled, the permanent magnet synchronous motor is modeled by electromagnetic theory and dynamics theory in the simulation software, and the radial unbalanced magnetic pull expression generated by the motor during the vehicle driving process is established as follows:
[0017] The air gap of the eccentric rotor is approximately expressed as:
[0018] ;
[0019] in, is the average air gap length when the rotor is not eccentric, α is the angle between the air gap and the x-axis of the eccentric rotor. is the direction angle of the rotor geometric center relative to the x-axis, r is the rotor dynamic eccentricity;
[0020] Expand the air gap permeance into a series form:
[0021] ;
[0022] Among them, the relative eccentricity , is the air magnetic permeability coefficient, Fourier coefficient for:
[0023] ;
[0024] According to the principle of permanent magnet synchronous motor, the air gap fundamental wave magnetomotive force of the three-phase synchronous motor at no load is expressed as ,in, is the fundamental magnetomotive force of the rotor exciting current, is the number of motor pole pairs, is the electrical frequency, α is the angle between the air gap and the x-axis of the coordinate axis where the eccentric rotor is located;
[0025] The air gap magnetic flux distribution is: ;
[0026] Ignoring the osclinical component of the magnetic field, the normal stress is expressed as ;
[0027] By integrating circumferentially on the rotor surface, the analytical expression of the radial unbalanced magnetic pull of the permanent magnet synchronous motor with a pole pair number greater than 3 is obtained: ;
[0028] in, , , , They are , , The Fourier coefficient when .
[0029] Preferably, in S3, a vehicle vertical vibration dynamics model is established, with the wheel hub motor air gap as the interface, and the motor inner stator and outer rotor are separated. The vertical vibration dynamics motion equation is as follows:
[0030] ;
[0031] Among them, m b 、m s1 、m w 、m s 、m r They are the vehicle body mass, axle weight, tire mass, permanent magnet synchronous motor stator weight, and permanent magnet synchronous motor rotor weight respectively; k s , k sa , k t , k d2 , k b , k d1 is the equivalent spring stiffness of the connector; c s 、c d1 、c d2 is the equivalent damping structure; F d is the radial unbalanced magnetic pull of the permanent magnet synchronous motor; x b 、x s1 、x w 、x z 、x s 、x r They are the vertical displacements of the vehicle body, frame, tire, road, stator and rotor respectively.
[0032] Preferably, in S3, an active suspension controller is added to the vehicle vertical vibration dynamics model, and the active suspension control force generated by the active suspension controller is used to express.
[0033] Preferably, in S4, the calculation formula of the random road surface excitation model is:
[0034] ;
[0035] in, To fit the displacement PSD value, is the spatial reference frequency, is the actual speed of the vehicle, is a uniformly distributed white noise with a mean of 0, an intensity of 1, and a sampling frequency of 100 Hz. is the low cut-off frequency, and its value is usually obtained by the following formula: , is the spatial cutoff frequency of the road surface, which is generally taken as .
[0036] Preferably, in S5, the state space equation of the quarter vehicle suspension system is: ;
[0037] in, To control the model state,
[0038] x b 、x s1 、x w 、x z 、x s 、x r are the vertical displacements of the vehicle body, frame, tire, road, stator and rotor, is random noise, including road roughness excitation Unbalanced magnetic pull with permanent magnet synchronous motor , expressed as ; y is the output variable, with five variables as the evaluation index of suspension vibration, namely, the vertical acceleration of the vehicle body , Motor acceleration , suspension deflection , rotor eccentricity and the amount of tire bounce ,Right now ; A, B, C are the coefficient matrices of the state space equation.
[0039] Preferably, in S6, the active suspension force prediction network model introduces a dual structure objective function algorithm based on the objective function of the TD3 algorithm, and the calculation formula is:
[0040] ;
[0041] Among them, Q is the state action value function, is the target Q value, are the parameters of the two Actor networks, , are the parameters of the two Critic target networks, For instant rewards, is the discount factor, is the current system status;
[0042] By using to optimize a single Actor network to reduce computational cost, while using the same objective function for , the algorithm takes and The minimum value of is taken as the target value;
[0043] The algorithm network structure uses a four-layer Actor network and a four-layer Critic network;
[0044] The Actor network uses a four-layer neural network, with the input being the system state s and 7 nodes in the input layer. The activation function of the first hidden layer uses the ReLU function, with 300 nodes. The activation function of the second hidden layer also uses the ReLU function, with 200 nodes. The output layer is the action s', with 1 node, and the learning rate of the network is set to 0.001. At the same time, a delayed update strategy is adopted, that is, the Critic network is set to update the Actor's target network once after completing 6 update processes.
[0045] The Critic network also uses a four-layer neural network. The input is a set of system states s and actions a, so the input layer contains 8 nodes. The number of nodes in the two hidden layers is 200 and 100 respectively. The activation function of the hidden layer uses the ReLU function, and the learning rate of the network is set to 0.002.
[0046] Preferably, in S6, a reward and penalty function is set in the active suspension force prediction network model;
[0047] Reward Function , the calculation formula is as follows:
[0048] ;
[0049] In the formula, is the derivative of the vertical acceleration of the vehicle body, is the vertical displacement of the vehicle body, is the change in the vertical displacement of the vehicle body;
[0050] Set the energy penalty function , the calculation formula is as follows:
[0051] ;
[0052] In the formula, represents the input of the suspension force, Indicates the rate of change of the suspension's power input;
[0053] The calculation formula of reward and punishment function is: .
[0054] Preferably, in S7, the iterative training steps are as follows:
[0055] S71. Design and initialization, specifically:
[0056] Design Actor and Critic networks, including learning rate, decay coefficient, minimum batch size, maximum number of iterations, sample storage pool capacity, delay update frequency, and policy noise variance parameters;
[0057] Randomly initialize the Actor and Critic estimation networks;
[0058] Initialize the target Actor and Critic network, whose weight parameters are, , , ;
[0059] Initialize the experience storage pool D to store the experience data generated during the learning process;
[0060] S72, obtaining the initial state and noise, specifically:
[0061] Get the initial state of the 1 / 4 vehicle suspension system ;
[0062] in, is the vertical acceleration of the vehicle body, is the vertical displacement of the vehicle body, is the suspension deflection;
[0063] Initialize random noise ,in, For road roughness incentives, It is the radial unbalanced magnetic pull of the permanent magnet synchronous motor;
[0064] S73, based on the current state, obtain the action through the Actor network, specifically:
[0065] In Status In this case, the Actor network generates actions based on the current strategy. ;in Indicates the input of the suspension force;
[0066] Execute the action and get the new state and the reward and punishment function status ;
[0067] Storing experience data to the experience pool D, where , They are respectively represented as the state quantity at the current moment and the next moment, , They are the current execution action and reward and punishment functions respectively;
[0068] S74, sampling and calculating the target action and the target Q value, specifically:
[0069] Randomly sample a batch of samples from the experience pool D ;
[0070] Among them, the target action is calculated using the target Actor network ;
[0071] Calculate the target Q value using the target critic network ;
[0072] in, For instant rewards, is the discount factor, is the target Q network value, For immediate status, Parameters of the two Critic target networks;
[0073] S75. Update the Critic network, specifically:
[0074] Update the Critic network using gradient descent:
[0075] ;
[0076] Among them, s is the current state quantity, The parameters of the two Critic target networks, For the current action, is the target Q value ;
[0077] Update the Actor network parameters using gradient descent:
[0078] , is the descending gradient of the critic network;
[0079] Perform soft update to update the parameters of the target Q network and the target policy network so that the parameters of the target network slowly approach the parameters of the current network:
[0080] ,in, is the soft update coefficient;
[0081] Get the latest action based on the current state: ;
[0082] S76, repeat steps S71 to S75, after M rounds of training, the network is gradually optimized, and the control strategy is automatically learned through the reward value provided by the Reward function without the need for manual debugging of the main force. At this time, for a given state , the optimal action is directly calculated through the policy network .
[0083] Therefore, the present invention adopts the above-mentioned hub motor driven electric vehicle vertical vibration control method based on the TD3 algorithm, which can control the output thrust of the linear motor through electrical signals, control the suspension system, suppress the vertical and longitudinal vibrations of the vehicle, and is beneficial to improving the driving smoothness of the vehicle.
[0084] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0085] Figure 1 It is a step diagram of an embodiment of a method for controlling vertical vibration of an electric vehicle driven by a hub motor based on a TD3 algorithm of the present invention;
[0086] Figure 2 It is a 1 / 4 vehicle five-degree-of-freedom vehicle vertical vibration dynamics model diagram established in the embodiment of the vertical vibration control method of the hub motor driven electric vehicle based on the TD3 algorithm of the present invention;
[0087] Figure 3 It is a control logic diagram of the suspension system in an embodiment of the vertical vibration control method of an electric vehicle driven by a hub motor based on the TD3 algorithm of the present invention;
[0088] Figure 4 TD3 algorithm network structure diagram in an embodiment of a vertical vibration control method of an electric vehicle driven by a hub motor based on TD3 algorithm of the present invention;
[0089] Figure 5 It is an experimental comparison diagram in an embodiment of the vertical vibration control method of an electric vehicle driven by a hub motor based on the TD3 algorithm of the present invention. DETAILED DESCRIPTION
[0090] The technical solution of the present invention is further described below through the accompanying drawings and embodiments.
[0091] Embodiment 1
[0092] The present invention provides a method for controlling vertical vibration of an electric vehicle driven by a hub motor based on the TD3 algorithm. The overall technical solution is as follows: a compression rubber bushing is installed between the wheel axle and the hub motor stator in a suspended hub motor structure, wherein the rubber material has a vibration isolation function. Under this structure, the hub motor is equivalent to a dynamic vibration absorber, which can effectively share the vibration of the tire in the high-frequency resonance zone.
[0093] At the same time, a linear motor is installed between the sprung mass and the unsprung mass, and the linear motor and the traditional damper adopt a parallel structure. The linear motor is used as an actuator to output the actuating force, and the deep reinforcement learning TD3 algorithm is used to control the output actuating force to suppress the tire-shaped resonance peak of the system and prevent the system from deteriorating due to the increase of the unsprung mass and the electromagnetic-solid coupling.
[0094] In addition, since the system is equipped with traditional dampers, the suspension system can still work normally when the electromagnetic actuator has a circuit failure. This solution treats the wheel hub motor as an independent mass system and connects it to the wheel axle through a rubber bushing. Since the rubber bushing in the structure has damping and stiffness, it is equivalent to a spring-damper system and a 1 / 4 vehicle suspension system is established. The electromagnetic active suspension works in the form of a linear motor as an electric motor. The power supply in the vehicle provides electrical energy to the linear motor. The motor driver controls the output thrust of the linear motor through electrical signals, controls the suspension, and suppresses the vertical vibration of the vehicle.
[0095] like Figure 1 As shown, the vertical vibration control method of the electric vehicle driven by a hub motor based on the TD3 algorithm in this embodiment specifically includes the following steps:
[0096] S1. Analyze the driving conditions of the electric vehicle driven by the hub motor and determine the longitudinal driving dynamics model of the electric vehicle driven by the hub motor.
[0097] The longitudinal driving dynamics motion equation of the longitudinal driving dynamics model is as follows:
[0098] ;
[0099] in, is the vehicle mass, is the actual speed of the vehicle, is the equivalent longitudinal force, , are air resistance and rolling resistance, is the vertical load, is the wheel moment of inertia, is the wheel angular velocity, Indicates the acceleration / braking torque generated by the hub motor; is the air resistance coefficient, is the frontal area of the vehicle, is the rolling resistance coefficient, For the body mass, is the unsprung mass of the vehicle, is the acceleration due to gravity, is the equivalent stiffness of the tire spring connection, is the wheel radius, is the tire deflection.
[0100] S2. According to the actual working conditions and the influence of dynamic eccentricity on the unbalanced magnetic pull of the permanent magnet synchronous motor, the radial unbalanced magnetic pull of the surface-mounted three-phase outer rotor permanent magnet synchronous motor is modeled through electromagnetic theory and dynamics theory in Simulink to establish a permanent magnet synchronous motor model.
[0101] The expression of radial unbalanced magnetic pull generated by the motor during vehicle driving is established as follows:
[0102] The air gap of the eccentric rotor is approximately expressed as:
[0103] ;
[0104] in, is the average air gap length when the rotor is not eccentric, α is the angle between the air gap and the x-axis of the eccentric rotor. is the direction angle of the rotor geometric center relative to the x-axis, r is the dynamic eccentricity of the rotor.
[0105] Expand the air gap permeance into a series form:
[0106] ;
[0107] Among them, the relative eccentricity , is the air magnetic permeability coefficient, Fourier coefficient for:
[0108] ;
[0109] According to the principle of permanent magnet synchronous motor, the air gap fundamental wave magnetomotive force of the three-phase synchronous motor at no load can be expressed as ,in, is the fundamental magnetomotive force of the rotor exciting current, is the number of motor pole pairs, is the electrical frequency, α It is the angle between the air gap and the x-axis of the coordinate axis where the eccentric rotor is located.
[0110] The air gap magnetic flux distribution is: ;
[0111] Ignoring the osclinical component of the magnetic field, the normal stress is expressed as ;
[0112] By integrating circumferentially on the rotor surface, the analytical expression of the radial unbalanced magnetic pull of the permanent magnet synchronous motor with a pole pair number greater than 3 is obtained: ;
[0113] in, , , , They are , , The Fourier coefficient when .
[0114] S3. Establish a vehicle vertical vibration dynamics model and determine the vertical vibration dynamics motion equation.
[0115] Establish the vehicle vertical vibration dynamics model. Take the wheel hub motor air gap as the interface, separate the motor inner stator and outer rotor, and establish a 1 / 4 vehicle five-degree-of-freedom vehicle vertical vibration dynamics model in Simulink. Figure 2 shown.
[0116] According to the vehicle vertical vibration dynamics model, the vertical vibration dynamics motion equation is established as follows:
[0117] ;
[0118] Among them, m b 、m s1 、m w 、m s 、m r They are the vehicle body mass, axle weight, tire mass, permanent magnet synchronous motor stator weight, and permanent magnet synchronous motor rotor weight respectively; k s , k sa , k t , k d2 , k b , k d1 is the equivalent spring stiffness of the connector; c s 、c d1 、c d2 is the equivalent damping structure; F d is the radial unbalanced magnetic pull of the permanent magnet synchronous motor; x b 、x s1 、x w 、x z 、x s 、x r They are the vertical displacements of the vehicle body, frame, tire, road, stator and rotor respectively.
[0119] In the vehicle vertical vibration dynamics model, an active suspension controller is added, and the active suspension control force generated by it is used to express.
[0120] S4. Use filtered white noise to simulate random road surface excitation q and establish a random road surface excitation model.
[0121] The calculation formula of the random road excitation model is:
[0122] ;
[0123] in, To fit the displacement PSD value, is the spatial reference frequency, is the actual speed of the vehicle, is a uniformly distributed white noise with a mean of 0, an intensity of 1, and a sampling frequency of 100 Hz. is the low cut-off frequency, and its value is usually obtained by the following formula: , is the spatial cutoff frequency of the road surface, which is generally taken as .
[0124] S5. The longitudinal driving dynamics model, permanent magnet synchronous motor model, vehicle vertical vibration dynamics model, and random road excitation model obtained in S1-S4 are coupled to form a 1 / 4 vehicle suspension system, and the state space equation of the 1 / 4 vehicle suspension system is calculated according to the dynamic motion equations of the longitudinal driving dynamics model, permanent magnet synchronous motor model, vehicle vertical vibration dynamics model, and random road excitation model in S1-S4.
[0125] The final state space equation of the 1 / 4 vehicle suspension system is: ;
[0126] in, To control the model state, x b 、x s1 、x w 、x z 、x s 、x r are the vertical displacements of the vehicle body, frame, tire, road, stator and rotor, is random noise, including road roughness excitation Unbalanced magnetic pull excitation with permanent magnet synchronous motor , expressed as y is the output variable, and has five variables as the evaluation index of suspension vibration, namely, the vertical acceleration of the vehicle body , Motor acceleration , suspension deflection , rotor eccentricity and the amount of tire bounce ,Right now ; A, B, C are the coefficient matrices of the state space equation.
[0127] Matlab Simulink software is used to establish a driving condition model that combines the vertical vibration dynamics model and the longitudinal driving dynamics model. The driving condition model includes road roughness input, vehicle vertical vibration dynamics model, longitudinal driving dynamics model and permanent magnet synchronous motor model. The suspension system control logic is as follows: Figure 3 shown.
[0128] S6. Build an active suspension force prediction network model based on the TD3 algorithm in the 1 / 4 vehicle suspension system, taking the vehicle body vertical acceleration, suspension deflection, road excitation and motor unbalanced magnetic pull as input, and output the active control force of the suspension.
[0129] The active suspension force prediction network model introduces a dual-structure objective function algorithm based on the TD3 algorithm objective function. The calculation formula is:
[0130] ;
[0131] Among them, Q is the state action value function, is the target Q value, are the parameters of the two Actor networks, , are the parameters of the two Critic target networks, For instant rewards, is the discount factor.
[0132] The TD3 algorithm consists of an actor network and a critic network, where the actor network is used to output actions, and the critic network calculates and assists in training the output dynamics in the environment.
[0133] In this embodiment, the computational cost is reduced by optimizing a single Actor network using , while using the same objective function, i.e. , the algorithm takes and The minimum value of is taken as the target value.
[0134] The algorithm network structure uses a four-layer Actor network and a four-layer Critic network. The Actor network uses a four-layer neural network. The input is the system state s, and the input layer has 7 nodes. The activation function of the first hidden layer uses the ReLU function, and the number of nodes is 300. The activation function of the second hidden layer also uses the ReLU function, and the number of nodes is 200. The output layer is the action s', with 1 node, and the learning rate of the network is set to 0.001. At the same time, a delayed update strategy is adopted, that is, the Critic network is set to update the Actor's target network once after completing 6 update processes.
[0135] The Critic network also uses a four-layer neural network. The input is a set of system states s and actions a, so the input layer contains 8 nodes. The number of nodes in the two hidden layers is 200 and 100 respectively. The activation function of the hidden layer uses the ReLU function, and the learning rate of the network is set to 0.002.
[0136] For vehicle ride smoothness, the body vertical displacement and body vertical acceleration are the main control targets, so a reward and punishment function is set in the active suspension force prediction network model.
[0137] Reward Function , the calculation formula is as follows:
[0138] ;
[0139] In the formula, is the derivative of the vertical acceleration of the vehicle body, is the vertical displacement of the vehicle body, is the change in the vertical displacement of the vehicle body.
[0140] Set the energy penalty function , the calculation formula is as follows:
[0141] ;
[0142] In the formula, represents the input of the suspension force, Indicates the rate of change of suspension force input.
[0143] The calculation formula of reward and punishment function is: .
[0144] The network structure of the TD3 algorithm used in this embodiment is as follows Figure 4 As shown, the TD3 algorithm proposed in this embodiment effectively eliminates the bias and solves the problem of overestimation by adding a Critic network.
[0145] S7. Iteratively train the active suspension force prediction network model.
[0146] Iterative training includes the following steps:
[0147] S71. Design and initialization, specifically:
[0148] Design Actor and Critic networks, including learning rate, decay coefficient, minimum batch size, maximum number of iterations, sample storage pool capacity, delay update frequency, and policy noise variance parameters;
[0149] Randomly initialize the Actor and Critic estimation networks;
[0150] Initialize the target Actor and Critic network, whose weight parameters are, , , ;
[0151] The initialization experience storage pool D is used to store the experience data generated during the learning process.
[0152] S72, obtaining the initial state and noise, specifically:
[0153] Get the initial state of the suspension system ;
[0154] in, is the vertical acceleration of the vehicle body, is the vertical displacement of the vehicle body, is the suspension deflection. Initialize random noise ,in, For road roughness incentives, is the radial unbalanced magnetic pull of the permanent magnet synchronous motor.
[0155] S73, based on the current state, obtain the action through the Actor network, specifically:
[0156] In Status In this case, the Actor network generates actions based on the current strategy. ;in Indicates the input of the suspension force.
[0157] Execute the action and get the new state and the reward and punishment function status ;
[0158] Storing experience data to the experience pool D, where , They are respectively represented as the state quantity at the current moment and the next moment, , They are the current execution action and reward and punishment functions respectively.
[0159] S74, sampling and calculating the target action and the target Q value, specifically:
[0160] Randomly sample a batch of samples from the experience pool D ;
[0161] Among them, the target action is calculated using the target Actor network ;
[0162] Calculate the target Q value using the target critic network ;
[0163] in, For instant rewards, is the discount factor, is the target Q network value, For immediate status, Parameters of the two Critic target networks.
[0164] S75. Update the Critic network, specifically:
[0165] Update the Critic network using gradient descent:
[0166] ;
[0167] Among them, s is the current state quantity, The parameters of the two Critic target networks, For the current action, is the target Q value .
[0168] Update the Actor network parameters using gradient descent:
[0169] , is the descending gradient of the critic network.
[0170] Perform soft update to update the parameters of the target Q network and the target policy network so that the parameters of the target network slowly approach the parameters of the current network:
[0171] ,in, is the soft update coefficient;
[0172] Get the latest action based on the current state: .
[0173] S76, repeat steps S71 to S75, after M rounds of training, the network is gradually optimized, and the control strategy is automatically learned through the reward value provided by the Reward function without the need for manual debugging of the main force. At this time, for a given state , the optimal action is directly calculated through the policy network .
[0174] S8. Use the reinforcement learning toolbox in Matlab Simulink to establish a simulation model of the active suspension force prediction network model and complete the simulation verification.
[0175] The simulation was performed in Matlab Simulink. The comparison results of the body vertical acceleration output of the motor suspension type active suspension optimized by TD3 algorithm and the passive suspension output are shown as follows: Figure 5 shown.
[0176] Therefore, the present invention adopts the above-mentioned hub motor driven electric vehicle vertical vibration control method based on the TD3 algorithm, which can control the output thrust of the linear motor through electrical signals, control the suspension system, suppress the vertical and longitudinal vibrations of the vehicle, and is beneficial to improving the driving smoothness of the vehicle.
[0177] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solution of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solution to deviate from the spirit and scope of the technical solution of the present invention.
Claims
1. Vertical vibration control method of electric vehicle driven by wheel hub motor based on TD3 algorithm, It is characterized in that The following steps are involved: S1. Analyze the driving conditions and determine the longitudinal driving dynamics model of the electric vehicle driven by the wheel hub motor; S2. According to the actual working conditions and the influence of dynamic eccentricity on the unbalanced magnetic pull of the permanent magnet synchronous motor, the radial unbalanced magnetic pull of the permanent magnet synchronous motor is modeled and a permanent magnet synchronous motor model is established; S3. Establish a vehicle vertical vibration dynamics model and determine the vertical vibration dynamics motion equation; S4, using filtered white noise to establish a random road excitation model; S5. The longitudinal driving dynamics model, permanent magnet synchronous motor model, vehicle vertical vibration dynamics model, and random road excitation model obtained in S1-S4 are coupled to form a 1 / 4 vehicle suspension system, and the state space equation of the 1 / 4 vehicle suspension system is calculated according to the dynamic motion equations of the longitudinal driving dynamics model, permanent magnet synchronous motor model, vehicle vertical vibration dynamics model, and random road excitation model in S1-S4; S6. Build an active suspension force prediction network model based on the TD3 algorithm in the 1 / 4 vehicle suspension system, taking the vehicle body vertical acceleration, suspension deflection, road excitation and motor unbalanced magnetic pull as inputs, and output the active control force of the suspension; S7, iteratively training the active suspension force prediction network model of S6; S8. Use the reinforcement learning toolbox in the simulation software to establish a simulation model of the active suspension force prediction network model and complete the simulation verification.
2. The vertical vibration control method of an electric vehicle driven by a hub motor based on the TD3 algorithm according to claim 1, Features: In S1, the longitudinal driving dynamics motion equation of the longitudinal driving dynamics model is as follows: ; in, is the vehicle mass, is the actual speed of the vehicle, is the equivalent longitudinal force, , are air resistance and rolling resistance, is the vertical load, is the wheel moment of inertia, is the wheel angular velocity, Indicates the acceleration / braking torque generated by the hub motor; is the air resistance coefficient, is the frontal area of the vehicle, is the rolling resistance coefficient, For the body quality, is the unsprung mass of the vehicle, is the acceleration due to gravity, is the equivalent stiffness of the tire spring connection, is the wheel radius, is the tire deflection.
3. The vertical vibration control method of an electric vehicle driven by a hub motor based on the TD3 algorithm according to claim 1, Features: In S2, when modeling the radial unbalanced magnetic pull, the permanent magnet synchronous motor is modeled in the simulation software through electromagnetic theory and dynamic theory, and the expression of the radial unbalanced magnetic pull generated by the motor during vehicle driving is established as follows: The air gap of the eccentric rotor is approximately expressed as: ; in, is the average air gap length when the rotor is not eccentric, α is the angle between the air gap and the x-axis of the eccentric rotor. is the direction angle of the rotor geometric center relative to the x-axis, r is the rotor dynamic eccentricity; Expand the air gap permeance into a series form: ; Among them, the relative eccentricity , is the air magnetic permeability coefficient, Fourier coefficient for: ; According to the principle of permanent magnet synchronous motor, the air gap fundamental wave magnetomotive force of the three-phase synchronous motor at no load is expressed as ,in, is the fundamental magnetomotive force of the rotor exciting current, is the number of motor pole pairs, is the electrical frequency, α It is the angle between the air gap and the x-axis of the coordinate axis where the eccentric rotor is located; The air gap magnetic flux distribution is: ; Ignoring the osclinical component of the magnetic field, the normal stress is expressed as ; By integrating circumferentially on the rotor surface, the analytical expression of the radial unbalanced magnetic pull of the permanent magnet synchronous motor with a pole pair number greater than 3 is obtained: ; in, , , , They are , , The Fourier coefficient when .
4. The vertical vibration control method of an electric vehicle driven by a hub motor based on the TD3 algorithm according to claim 1, Features: In S3, the vehicle vertical vibration dynamics model is established with the wheel hub motor air gap as the interface, and the motor internal stator and external rotor are separated. The vertical vibration dynamics motion equation is as follows: ; Among them, m b 、m s1 、m w 、m s 、m r They are vehicle body mass, axle weight, tire mass, permanent magnet synchronous motor stator weight, and permanent magnet synchronous motor rotor weight; k s , k sa , k t , k d2 , k b , k d1 is the equivalent spring stiffness of the connecting part; c s 、c d1 、c d2 is the equivalent damping structure; F d is the radial unbalanced magnetic pull of the permanent magnet synchronous motor; x b 、x s1 、x w 、x z 、x s 、x r They are the vertical displacements of the vehicle body, frame, tire, road, stator and rotor respectively.
5. The vertical vibration control method of an electric vehicle driven by a hub motor based on the TD3 algorithm according to claim 1, Features: In S3, an active suspension controller is added to the vehicle vertical vibration dynamics model, and the active suspension control force generated by it is used express.
6. The vertical vibration control method of an electric vehicle driven by a hub motor based on the TD3 algorithm according to claim 1, Features: In S4, the calculation formula of the random road surface excitation model is: ; in, To fit the displacement PSD value, is the spatial reference frequency, is the actual speed of the vehicle, is a uniformly distributed white noise with a mean of 0, an intensity of 1, and a sampling frequency of 100 Hz. is the low cut-off frequency, and its value is usually obtained by the following formula: , is the spatial cutoff frequency of the road surface.
7. The vertical vibration control method of an electric vehicle driven by a hub motor based on the TD3 algorithm according to claim 1, Features: In S5, the state space equation of the quarter vehicle suspension system is ; in, To control the model state, x b 、x s1 、x w 、x z 、x s 、x r are the vertical displacements of the vehicle body, frame, tire, road, stator and rotor, is random noise, including road roughness excitation Unbalanced magnetic pull with permanent magnet synchronous motor , expressed as ; y is the output variable, with five variables as the evaluation index of suspension vibration, namely, the vertical acceleration of the vehicle body , Motor acceleration , suspension deflection , rotor eccentricity and the amount of tire bounce ,Right now ; A, B, C are the coefficient matrices of the state space equation.
8. The vertical vibration control method of an electric vehicle driven by a hub motor based on the TD3 algorithm according to claim 1, Features: In S6, the active suspension force prediction network model introduces a dual-structure objective function algorithm based on the objective function of the TD3 algorithm. The calculation formula is: ; Among them, Q is the state action value function, is the target Q value, are the parameters of the two Actor networks, , are the parameters of the two Critic target networks, For instant rewards, is the discount factor, is the current system status; By using to optimize a single Actor network to reduce computational cost, while using the same objective function for , the algorithm takes and The minimum value of is taken as the target value; The algorithm network structure uses a four-layer Actor network and a four-layer Critic network; The Actor network uses a four-layer neural network, with the input being the system state s and 7 nodes in the input layer. The activation function of the first hidden layer uses the ReLU function, with 300 nodes. The activation function of the second hidden layer also uses the ReLU function, with 200 nodes. The output layer is the action s', with 1 node, and the learning rate of the network is set to 0.
001. At the same time, a delayed update strategy is adopted, that is, the Critic network is set to update the Actor's target network once after completing 6 update processes. The Critic network also uses a four-layer neural network. The input is a set of system states s and actions a, so the input layer contains 8 nodes. The number of nodes in the two hidden layers is 200 and 100 respectively. The activation function of the hidden layer uses the ReLU function, and the learning rate of the network is set to 0.
002.
9. The vertical vibration control method of an electric vehicle driven by a hub motor based on the TD3 algorithm according to claim 1, Features: In S6, a reward and penalty function is set in the active suspension force prediction network model; Reward Function , the calculation formula is as follows: ; In the formula, is the derivative of the vertical acceleration of the vehicle body, is the vertical displacement of the vehicle body, is the change in the vertical displacement of the vehicle body; Set the energy penalty function , the calculation formula is as follows: ; In the formula, represents the input of the suspension force, Indicates the rate of change of the suspension's power input; The reward and punishment function calculation formula is: .
10. The vertical vibration control method of an electric vehicle driven by a hub motor based on the TD3 algorithm according to claim 1, It is characterized in that In S7, the iterative training steps are as follows: S71. Design and initialization, specifically: Design Actor and Critic networks, including learning rate, decay coefficient, minimum batch size, maximum number of iterations, sample storage pool capacity, delay update frequency, and policy noise variance parameters; Randomly initialize the Actor and Critic estimation networks; Initialize the target Actor and Critic network, whose weight parameters are, , , ; Initialize the experience storage pool D to store the experience data generated during the learning process; S72, obtaining the initial state and noise, specifically: Get the initial state of the 1 / 4 vehicle suspension system ; in, is the vertical acceleration of the vehicle body, is the vertical displacement of the vehicle body, is the suspension deflection; Initialize random noise ,in, For road roughness incentives, It is the radial unbalanced magnetic pull of the permanent magnet synchronous motor; S73, based on the current state, obtain the action through the Actor network, specifically: In Status In this case, the Actor network generates actions based on the current strategy. ;in Indicates the input of the suspension force; Execute the action and get the new state and the reward and punishment function status ; Storing experience data to the experience pool D, where , They are respectively represented as the state quantity at the current moment and the next moment, , They are the current execution action and reward and punishment functions respectively; S74, sampling and calculating the target action and the target Q value, specifically: Randomly sample a batch of samples from the experience pool D ; Among them, the target action is calculated using the target Actor network ; Calculate the target Q value using the target critic network ; in, For instant rewards, is the discount factor, is the target Q network value, For immediate status, Parameters of the two Critic target networks; S75. Update the Critic network, specifically: Update the Critic network using gradient descent: ; Among them, s is the current state quantity, The parameters of the two Critic target networks, For the current action, is the target Q value ; Update the Actor network parameters using gradient descent: , is the descending gradient of the critic network; Perform soft update to update the parameters of the target Q network and the target policy network so that the parameters of the target network slowly approach the parameters of the current network: ,in, is the soft update coefficient; Get the latest action based on the current state: ; S76, repeat steps S71 to S75, after M rounds of training, the network is gradually optimized, and the control strategy is automatically learned through the reward value provided by the Reward function without the need for manual debugging of the main force. At this time, for a given state , the optimal action is directly calculated through the policy network .
