Calculation Method for Vehicle Speed and Road Gradient of Electric Vehicle
By using the adaptive extended Kalman filtering algorithm model in electric vehicles, combining vehicle state data and dynamic equations, the problems of unreliability and poor real-time performance of road slope estimation in electric vehicles are solved, and the accuracy and real-time performance of the estimated value are improved.
Patent Information
- Application Number
- CN202210237002.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-11
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2042-03-11
AI Technical Summary
The existing electric vehicle road slope estimation methods have problems such as unreliable calculation results, large calculation volume and poor real-time performance.
By obtaining the vehicle state data of electric vehicles, establishing a relational model based on vehicle dynamic equations, constructing an extended Kalman filtering algorithm model, calculating the theoretical covariance of new information and the actual covariance of new information, determining the Kalman filtering coefficient, constructing an adaptive extended Kalman filtering algorithm model, and calculating the estimated values of vehicle speed and road slope.
The accuracy of the estimated value of electric vehicle speed and road slope under different driving conditions is improved, and the real-timeness of the estimated value is increased.
Smart Images

Figure CN114547782B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle intelligent control, and particularly to a method, device, electronic device and storage medium for calculating the vehicle speed and road slope of an electric vehicle. Background Art
[0002] Currently, the estimation of the slope of the road on which an electric vehicle travels has a great impact on vehicle safety and comfort.
[0003] Among the existing methods for estimating the slope of the road on which an electric vehicle travels, some are detection methods based on acceleration sensors; the other part adopts an online estimation algorithm to estimate the slope of the road on which an electric vehicle travels.
[0004] However, the calculation results of the slope estimation of the road based on the acceleration sensor detection method are unreliable; and when completely adopting the online estimation algorithm to estimate the slope of the road on which an electric vehicle travels, the calculation amount is large, and the real-time performance of the obtained slope estimation result of the road on which an electric vehicle travels is poor. Summary of the Invention
[0005] Embodiments of the present invention provide a method, device, electronic device and storage medium for calculating the vehicle speed and road slope of an electric vehicle, which improves the accuracy of estimating the vehicle speed and road slope of an electric vehicle under different driving conditions.
[0006] In a first aspect, embodiments of the present invention provide a method for calculating the vehicle speed and road slope of an electric vehicle, including:
[0007] Obtain the vehicle state data of the electric vehicle;
[0008] Based on the vehicle dynamics equation and the vehicle state data of the electric vehicle, establish a relationship model of the vehicle state data of the electric vehicle;
[0009] Based on the relationship model of the vehicle state data of the electric vehicle, construct an extended Kalman filter algorithm model;
[0010] Based on the extended Kalman filter algorithm model, calculate the theoretical covariance of innovation and the actual covariance of innovation, wherein the sliding time window of the extended Kalman filter algorithm model is determined according to the vehicle driving condition of the electric vehicle;
[0011] Determine the Kalman filter coefficient based on the theoretical covariance of innovation and the actual covariance of innovation;
[0012] Use the Kalman filter coefficient to construct an adaptive extended Kalman filter algorithm model;
[0013] Calculate the estimated values of the vehicle speed and road slope of the electric vehicle through the adaptive extended Kalman filter algorithm model.
[0014] In a second aspect, an embodiment of the present invention provides a vehicle speed and road slope calculation device for an electric vehicle, the device comprising:
[0015] A vehicle state data acquisition module, configured to acquire vehicle state data of the electric vehicle;
[0016] A relationship model construction module, configured to establish a relationship model of the vehicle state data of the electric vehicle based on the vehicle dynamics equation and the vehicle state data of the electric vehicle;
[0017] An extended Kalman filter algorithm model construction module, configured to construct an extended Kalman filter algorithm model based on the relationship model of the vehicle state data of the electric vehicle;
[0018] A covariance calculation module, configured to calculate an innovation theoretical covariance and an innovation actual covariance based on the extended Kalman filter algorithm model, wherein a sliding time window of the extended Kalman filter algorithm model is determined according to the vehicle driving condition of the electric vehicle;
[0019] A Kalman filter coefficient determination module, configured to determine a Kalman filter coefficient based on the innovation theoretical covariance and the innovation actual covariance;
[0020] An adaptive extended Kalman filter algorithm model construction module, configured to construct an adaptive extended Kalman filter algorithm model by using the Kalman filter coefficient;
[0021] A vehicle speed and road slope estimated value calculation module, configured to calculate estimated values of the vehicle speed and road slope of the electric vehicle through the adaptive extended Kalman filter algorithm model.
[0022] In a third aspect, an embodiment of the present invention further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the program, it implements the vehicle speed and road slope calculation method for an electric vehicle as described in any one of the embodiments of the present invention.
[0023] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the vehicle speed and road slope calculation method for an electric vehicle as described in any one of the embodiments of the present invention.
[0024] In an embodiment of the present invention, vehicle state data of an electric vehicle is acquired; a relationship model of the vehicle state data of the electric vehicle is established based on the vehicle dynamics equation and the vehicle state data of the electric vehicle; an extended Kalman filter algorithm model is constructed based on the relationship model of the vehicle state data of the electric vehicle; based on the extended Kalman filter algorithm model, the theoretical innovation covariance and the actual innovation covariance are calculated, wherein the sliding time window of the extended Kalman filter algorithm model is determined according to the vehicle driving conditions of the electric vehicle; the Kalman filter coefficient is determined based on the theoretical innovation covariance and the actual innovation covariance; an adaptive extended Kalman filter algorithm model is constructed using the Kalman filter coefficient; and the estimated values of the vehicle speed and the road slope of the electric vehicle are calculated through the adaptive extended Kalman filter algorithm model. That is, in the embodiment of the present invention, the theoretical innovation covariance is determined according to different vehicle driving conditions, and then the Kalman filter coefficient is determined through the theoretical innovation covariance and the actual innovation covariance, and further an adaptive extended Kalman filter algorithm model is constructed, solving the problem of the credibility of the covariance in the Kalman filter algorithm, achieving the purpose of adaptively adjusting the Kalman filter coefficient in the extended Kalman filter algorithm model, thereby improving the accuracy of calculating the estimated values of the vehicle speed and the road slope of the electric vehicle under different driving conditions and increasing the real-time performance of the estimated values of the vehicle speed and the road slope of the electric vehicle under different driving conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0026] Figure 1 FIG. is a flowchart of a method for calculating the vehicle speed and the road slope of an electric vehicle provided by an embodiment of the present invention;
[0027] Figure 2 FIG. is a schematic diagram of calculating the estimated values of the vehicle speed and the road slope of an electric vehicle using the constructed adaptive extended Kalman filter model provided by an embodiment of the present invention;
[0028] Figure 3 FIG. is a schematic diagram of a ratio fuzzy rule of the theoretical innovation covariance and the actual innovation covariance provided by an embodiment of the present invention;
[0029] Figure 4 FIG. is a schematic diagram of an acceleration pedal change rate fuzzy rule provided by an embodiment of the present invention;
[0030] Figure 5 FIG. is a schematic diagram of a vehicle speed fuzzy rule provided by an embodiment of the present invention;
[0031] Figure 6 It is a schematic diagram of the output variable fuzzy rules provided by an embodiment of the present invention;
[0032] Figure 7 It is a structural diagram of the vehicle speed and road gradient calculation device of an electric vehicle provided by an embodiment of the present invention;
[0033] Figure 8 It is a schematic structural diagram of an electronic device provided by an embodiment of the present invention. Detailed implementation manners
[0034] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the present invention, rather than limiting the present invention. In addition, it should be noted that, for the sake of convenience of description, only parts related to the present invention rather than all structures are shown in the drawings.
[0035] The vehicle speed and road gradient calculation method of an electric vehicle provided by an embodiment of the present invention will be introduced below. Figure 1 It is a schematic flowchart of the vehicle speed and road gradient calculation method of an electric vehicle provided by an embodiment of the present invention. This method can be executed by the vehicle speed and road gradient calculation device of the electric vehicle provided by this embodiment, and this device can be implemented in a software and / or hardware manner. In a specific embodiment, this device can be integrated in an electronic device, and the electronic device can be, for example, a computer or a server. The following embodiments will be described by taking this device integrated in an electronic device as an example. Refer to Figure 1 , and the method can specifically include the following steps:
[0036] Step 101, obtain the vehicle state data of the electric vehicle.
[0037] Among them, the vehicle state data can be understood as vehicle driving data and vehicle inherent parameter data; for example, the vehicle driving data can include the vehicle driving speed, wheel rolling resistance, etc. during vehicle driving, and the vehicle inherent parameters can include the wheel rolling radius of the vehicle or the vehicle mass, etc. Since the vehicle state data of the electric vehicle includes motor torque, it is necessary to obtain the vehicle state data of the electric vehicle and establish a relationship model of the vehicle state data of the electric vehicle based on the (motor torque) in the vehicle state data of the electric vehicle.
[0038] Specifically, the vehicle state data can be obtained by a vehicle driving on a gradient road.
[0039] Exemplarily, the vehicle driving data (vehicle driving speed, wheel rolling resistance or motor torque) and vehicle inherent parameter data (wheel rolling radius of the vehicle or vehicle mass) can be obtained by an electric vehicle driving at a low speed on a gradient road.
[0040] Step 102: Establish a relationship model of the vehicle state data of the electric vehicle based on the vehicle dynamics equation and the vehicle state data of the electric vehicle.
[0041] Among them, the vehicle dynamics equation refers to the equation of the relationship between vehicle parameters that satisfies the dynamics principle and is applicable to the relationship between the vehicle and the road surface; the relationship model of the vehicle state data of the electric vehicle can be understood as a relationship model constructed based on the vehicle dynamics equation and the vehicle state data of the electric vehicle. Among them, the vehicle state data of the electric vehicle can include the vehicle mass, vehicle driving speed, wheel rolling radius, wheel rolling resistance, road gradient, and motor torque.
[0042] Specifically, the vehicle state data of the electric vehicle can be substituted into the vehicle dynamics equation to establish a relationship model of the vehicle state data of the electric vehicle.
[0043] Exemplarily, the vehicle state data of the electric vehicle (for example, vehicle driving speed, wheel rolling resistance) and the vehicle inherent parameter data (wheel rolling radius or vehicle mass of the vehicle) obtained in the above steps can be substituted into the vehicle dynamics equation to obtain the established relationship model of the vehicle state data of the electric vehicle.
[0044] Step 103: Construct an extended Kalman filter algorithm model based on the relationship model of the vehicle state data of the electric vehicle.
[0045] Among them, Kalman filtering is an algorithm that uses a linear system state equation to optimally estimate the system state through the system input-output observation data, and can be understood as estimating the current state through a linear stochastic difference equation; if the state estimation relationship and the measurement relationship are nonlinear, the extended Kalman filter algorithm can be used to solve the nonlinear problem.
[0046] Specifically, the relationship model of the vehicle state data of the electric vehicle can be transformed into a state space equation, and then the state space equation can be transformed into the standard form of the state space equation to obtain the extended Kalman filter algorithm model.
[0047] Step 104: Calculate the innovation theoretical covariance and the innovation actual covariance based on the extended Kalman filter algorithm model, where the sliding time window of the extended Kalman filter algorithm model is determined according to the vehicle driving conditions of the electric vehicle.
[0048] Among them, the innovation can be defined as the deviation between the actual output value and the estimated output value; the covariance can be understood as the overall error of two variables; the innovation theory covariance can be understood as the covariance of the deviation between the actual output value and the estimated output value under ideal conditions; the innovation actual covariance can be understood as the covariance of the deviation between the actual output value and the estimated output value under actual conditions.
[0049] Specifically, the sliding time window of the extended Kalman filter algorithm model is determined according to the vehicle driving conditions of the electric vehicle. This is because the vehicle driving conditions of the electric vehicle have a certain impact on the real-time performance of the innovation theory covariance. Therefore, it is necessary to define the vehicle data length period update rule of the electric vehicle according to the vehicle driving conditions of the electric vehicle. Through the vehicle data length period update rule of the electric vehicle, the sliding time window of the extended Kalman filter algorithm model is determined, achieving the purpose of dynamically adjusting the length of the sliding time window according to the intensity of the driving conditions, improving the real-time performance of the sliding time window, and further improving the real-time performance of the innovation theory covariance.
[0050] Furthermore, the vehicle data length period update rule of the electric vehicle can be defined according to the vehicle driving conditions of the electric vehicle. Through the vehicle data length period update rule of the electric vehicle, the sliding time window of the extended Kalman filter algorithm model is determined; then the innovation is calculated through the state equation in the extended Kalman filter algorithm model, and further the innovation theory covariance and the innovation actual covariance are calculated.
[0051] Exemplarily, the sliding time window in the innovation theory covariance can be determined according to the vehicle driving conditions of the electric vehicle, and then the innovation is obtained by calculating the deviation between the actual output value and the estimated output value. According to the calculation formulas of the innovation theory covariance and the innovation actual covariance, the innovation theory covariance and the innovation actual covariance are obtained.
[0052] Step 105, determine the Kalman filter coefficient based on the innovation theory covariance and the innovation actual covariance.
[0053] Among them, the Kalman filter coefficient can be understood as the coefficient of the Kalman filter system state equation.
[0054] Specifically, since the sliding time window in the innovation theory covariance is determined according to the vehicle driving conditions of the electric vehicle, the Kalman filter coefficient can be determined by comparing the magnitudes of the innovation theory covariance and the innovation actual covariance, making the determined Kalman filter coefficient have real-time performance.
[0055] Exemplarily, assume that the innovation theory covariance is The innovation actual covariance is S(k). If the innovation theory covariance is greater than or less than the innovation actual covariance, the Kalman filter coefficient can be determined by adjusting the coefficient magnitude of the error covariance matrix in the Kalman filter coefficient.
[0056] Step 106: Construct an adaptive extended Kalman filter algorithm model using the Kalman filter coefficients.
[0057] Among them, adaptive extended Kalman filtering can be understood as continuously judging whether the dynamics of the system have changed by the filtering itself while filtering using measurement data, estimating and correcting the model parameters and noise statistical characteristics through the Kalman filter coefficients to improve the filter design and reduce the actual error of the filter.
[0058] Specifically, since the sliding time window in the innovation theoretical covariance is determined according to the vehicle driving conditions of the electric vehicle when calculating the innovation theoretical covariance above, the Kalman filter coefficients determined based on the innovation theoretical covariance and the innovation actual covariance also have the characteristic of real-time. Therefore, the determined Kalman filter coefficients can be added to the extended Kalman filter algorithm model to construct an adaptive extended Kalman filter algorithm model. The constructed adaptive extended Kalman filter algorithm model can solve the credibility problem of the covariance in the Kalman filter algorithm because it considers the influence of the vehicle driving conditions of the electric vehicle on the Kalman filter coefficients.
[0059] Step 107: Calculate the estimated values of the vehicle speed and road slope of the electric vehicle through the adaptive extended Kalman filter algorithm model.
[0060] Specifically, based on the adaptive extended Kalman filter algorithm model constructed in the above steps, which solves the credibility problem of the covariance in the Kalman filter algorithm, the obtained vehicle state data of the electric vehicle can be substituted into the constructed adaptive extended Kalman filter algorithm model to calculate the estimated values of the vehicle speed and road slope of the electric vehicle. Solving the credibility problem of the covariance in the Kalman filter algorithm can increase the real-time of the estimated values of the vehicle speed and road slope of the electric vehicle and improve the accuracy of calculating the estimated values of the vehicle speed and road slope of the electric vehicle under different driving conditions.
[0061] Exemplarily, the vehicle driving data and vehicle inherent parameter data obtained in the above step 101 can be substituted into the constructed adaptive extended Kalman filter algorithm model to calculate the estimated values of the vehicle speed and road slope of the electric vehicle.
[0062] In the embodiments of the present invention, the innovation theory covariance is determined according to different vehicle driving conditions, and then the Kalman filter coefficient is determined by the innovation theory covariance and the innovation actual covariance, and further an adaptive extended Kalman filter algorithm model is constructed, which solves the credibility problem of the covariance in the Kalman filter algorithm, realizes the purpose of adaptively adjusting the Kalman filter coefficient in the extended Kalman filter algorithm model, thereby improving the accuracy of calculating the estimated values of the vehicle speed and road slope of the electric vehicle under different driving conditions and increasing the real-time performance of the estimated values of the vehicle speed and road slope of the electric vehicle under different driving conditions.
[0063] The following takes a specific example to further describe the method for calculating the vehicle speed and road slope of the electric vehicle provided by the embodiments of the present invention. Figure 2 It is a schematic diagram of calculating the estimated values of the vehicle speed and road slope of the electric vehicle by using the constructed adaptive extended Kalman filter model provided by the embodiments of the present invention. As Figure 2 shown, first, vehicle state data (such as acceleration, vehicle speed, accelerator pedal, brake pedal, etc.) is obtained. For example, the vehicle state data of the electric vehicle obtained from the electric vehicle driving on a sloped road is the vehicle mass, vehicle driving speed, wheel rolling radius, wheel rolling resistance, road slope, and motor torque. After obtaining the vehicle state data of the electric vehicle, the vehicle dynamics equation is determined, and a relationship model of the vehicle state data of the electric vehicle is established based on the vehicle dynamics equation and the vehicle state data of the electric vehicle:
[0064]
[0065] where m is the vehicle mass in the vehicle state data, v is the vehicle driving speed in the vehicle state data, F t is the driving force of the vehicle in the vehicle state data, r is the wheel rolling radius in the vehicle state data, F f is the wheel rolling resistance in the vehicle state data, F aero is the air resistance in the vehicle state data, F i is the slope resistance in the vehicle state data, θ is the road slope in the vehicle state data, M T,D is the motor torque in the vehicle state data, ρ is the air density, A is the frontal area, C D is the air resistance coefficient, and G is the acceleration due to gravity. Based on the relationship model of the vehicle state data of the electric vehicle, an extended Kalman filter algorithm model is constructed. Specifically, the above relationship model of the vehicle state data of the electric vehicle is transformed into a state space equation:
[0066]
[0067] where M T is the motor driving torque in the vehicle state data, fr is the coefficient of friction. Transforming the state - space equation into the standard form of the state - space equation gives:
[0068]
[0069] where \(x\in R\) n is the system state vector, \(u\in R\) is the system input, and \(y\in R\) m is the system output, \(A\in R\) n×n , \(B\in R\) n , \(C\in R\) m×n is the state matrix of the system; Based on the standard form of the state - space equation, the extended Kalman filter algorithm model is constructed as:
[0070]
[0071] where
[0072]
[0073]
[0074]
[0075]
[0076]
[0077] In the formula, \(\Delta t\) is the sampling time, assuming that the slope does not change suddenly; \(\omega(k)\) is the system process noise, and the corresponding noise covariance is \(Q(k)\); \(v(k)\) is the measurement noise, and the corresponding noise covariance is \(R(k)\); In the extended Kalman filter, it is assumed that both \(\omega(k)\) and \(v(k)\) are constant values and known;
[0078] where \(U(K)\) is the control quantity, \(A(k)\) is the vehicle acceleration, \(\theta(k)\) is the road slope, \(H(k)\) is the coefficient matrix in the state equation, and \(B\) is the coefficient matrix in the state equation.
[0079] After constructing the extended Kalman filter algorithm model based on the relationship model of the vehicle state data of the electric vehicle, the vehicle data length - period update rule of the electric vehicle can be defined according to the vehicle driving conditions of the electric vehicle.
[0080] Among them, the vehicle driving conditions can include five driving conditions: starting, constant speed, sudden throttle / gentle throttle, coasting, and braking. However, the vehicle driving conditions are not limited to the above five driving conditions and are not defined here.
[0081] Specifically, the corresponding data length - period update rules can be defined according to different vehicle driving conditions.
[0082] Table 1 is the vehicle data length period update rule table of the electric vehicle defined according to the vehicle driving conditions provided by the embodiments of the present invention.
[0083] As can be seen from Table 1, the data length periods T corresponding to starting, constant speed, hard throttle / slow throttle, coasting, and braking in the vehicle driving conditions are 10 ms, 100 ms, 10 ms, 100 ms, and 10 ms respectively.
[0084] Table 1 Vehicle Data Length Period Update Rule
[0085] Vehicle driving conditions T Start 10 ms Constant speed 100 ms Suddenly step on the accelerator / Slowly step on the accelerator 10 ms Coast 100 ms Brake 10 ms
[0086] Specifically, by querying the vehicle data length period update rule table of the electric vehicle, the data length periods corresponding to different vehicle driving conditions can be determined, and then the sliding time window of the extended Kalman filter algorithm model under different vehicle driving conditions can be determined.
[0087] If the vehicle driving condition is hard throttle / slow throttle and its corresponding data length period is 10 ms, it can be determined that the data length period (10 ms) is also the sliding time window of the extended Kalman filter algorithm model under this vehicle driving condition, which is 10 ms.
[0088] In the embodiments of the present invention, the vehicle data length period update rule of the electric vehicle is defined according to the vehicle driving conditions, and the sliding time window of the extended Kalman filter algorithm model is determined through the vehicle data length period update rule of the electric vehicle, achieving the purpose of dynamically adjusting the length of the sliding time window according to the intensity of the driving condition and improving the real-time performance of the sliding time window.
[0089] Based on the constructed extended Kalman filter algorithm model, the innovation theoretical covariance and the innovation actual covariance can be calculated, and the innovation can be calculated according to the following formula:
[0090]
[0091] where Z(k) is the actual output value, is the estimated output value.
[0092] Then, the innovation theoretical covariance can be calculated according to the following formula:
[0093]
[0094] where N is the sliding time window of the innovation, and e(i) is the deviation between the actual output value and the estimated output value.
[0095] Specifically, the sliding time window (10 ms) determined according to the vehicle driving condition above can be determined as the sliding time window N (10 ms) of the innovation, and then the theoretical covariance of the innovation is calculated.
[0096] Furthermore, the actual covariance of the innovation can be calculated. First, the one-step prediction is calculated according to the following formula:
[0097]
[0098] Then, the mean square error of the one-step prediction is calculated:
[0099]
[0100] The filtering gain is updated:
[0101]
[0102] The variable is updated:
[0103]
[0104] The error covariance matrix at the next moment is calculated:
[0105]
[0106] The actual covariance of the innovation is calculated:
[0107] S(k) = R(k) + H(k)P(k)H(k) T 。
[0108] Based on the extended Kalman filter algorithm model, after calculating the theoretical covariance and the actual covariance of the innovation, it is necessary to determine whether the theoretical covariance of the innovation is greater than or less than the actual covariance of the innovation; if the theoretical covariance of the innovation is equal to the actual covariance of the innovation, it is determined that the Kalman filter coefficient remains unchanged; if the theoretical covariance of the innovation is greater than or less than the actual covariance of the innovation, it is necessary to obtain the ratio value of the theoretical covariance and the actual covariance of the innovation, the acceleration pedal opening change rate of the electric vehicle, the vehicle speed, the fuzzy subset and the fuzzy system input variable parameters.
[0109] Specifically, the ratio value of the theoretical covariance and the actual covariance of the innovation can be determined by obtaining the determined theoretical covariance and the actual covariance of the innovation. Taking the above-determined theoretical covariance and the actual covariance (S(k)) of the innovation as an example, the ratio value of the theoretical covariance and the actual covariance of the innovation is and the acceleration pedal opening change rate, the vehicle speed, the fuzzy subset and the fuzzy system input variable parameters in the vehicle state data of the electric vehicle are obtained.
[0110] Figure 3It is a schematic diagram of the ratio fuzzy rule of the innovation theoretical covariance and the innovation actual covariance provided by an embodiment of the present invention. It can be seen from Figure 3 that when the ratio of the innovation theoretical covariance to the innovation actual covariance is extremely small (S), the corresponding parameters are [0, 0.5, 1]; when the ratio of the innovation theoretical covariance to the innovation actual covariance is extremely large (M), the corresponding parameters are [0.5, 1, 2]. Figure 4 It is a schematic diagram of the acceleration pedal change rate fuzzy rule provided by an embodiment of the present invention. It can be seen from Figure 4 that when the acceleration pedal change rate is stable (S), the corresponding parameters are [0, 200, 300, 400]; when the acceleration pedal change rate is drastic (M), the corresponding parameters are [200, 400, 600, 800]. Figure 5 It is a schematic diagram of the vehicle speed fuzzy rule provided by an embodiment of the present invention. It can be seen from Figure 5 that when the vehicle speed is low (S), the corresponding parameters are [0, 30]; when the acceleration pedal change rate is high (M), the corresponding parameters are [20, 40, 60, 80, 160]. According to Figure 3 、 Figure 4 and Figure 5 the fuzzy system input variable parameter table can be obtained. Table 2 is the fuzzy system input variable parameter table provided by an embodiment of the present invention.
[0111] Among them, it can be seen from Table 2 that the innovation covariance ratio (x1) in Table 2 is the ratio value S(k) / (S^(k)) of the innovation theoretical covariance and the innovation actual covariance. The fuzzy subsets can include extremely small (S), extremely large (M), stable (S), drastic (M), low speed (S), and high speed (M).
[0112] Table 2 Fuzzy System Input Variable Parameter Table
[0113]
[0114] After determining that the ratio value of the innovation theoretical covariance and the innovation actual covariance is and obtaining the acceleration pedal opening change rate, vehicle speed, fuzzy subsets, and fuzzy system input variable parameters in the vehicle state data of the electric vehicle, based on the ratio value of the innovation theoretical covariance and the innovation actual covariance in the Kalman filter, the acceleration pedal opening change rate, vehicle speed, fuzzy subsets, and fuzzy system input variable parameters of the electric vehicle, the fuzzy logic rule can be queried to determine the Kalman filter coefficient adjustment factor.
[0115] Among them, the fuzzy logic rule can be understood as the logic rule formulated by using the fuzzy control method to determine the Kalman filter coefficient adjustment factor.
[0116] Specifically, the output variable of the fuzzy system is the adjustment factor of the Kalman filter coefficient. Assume the adjustment factor of the Kalman filter coefficient is α, and perform fuzzy definition on it. Figure 6 is a schematic diagram of the fuzzy rules for the output variable provided by an embodiment of the present invention. It can be seen from Figure 6 that when the fuzzy subset is super small (ST), the corresponding parameters are [0, 0.1, 0.3]; when the fuzzy subset is small (S), the corresponding parameters are [0.2, 0.3, 0.5]; when the fuzzy subset is medium (M), the corresponding parameters are [0.4, 0.5, 0.7]; when the fuzzy subset is large (L), the corresponding parameters are [0.6, 0.7, 0.8]; when the fuzzy subset is extra large (LT), the corresponding parameters are [0.7, 0.8, 1]. The parameter table of the output variable of the fuzzy system can be obtained according to Figure 6 and Table 3 is the parameter table of the output variable of the fuzzy system provided by an embodiment of the present invention.
[0117] Table 3 Parameter Table of Output Variable of Fuzzy System
[0118]
[0119] By obtaining the innovation covariance ratio, the acceleration pedal change rate, and the vehicle speed, query the fuzzy logic rules formulated in the embodiment of the present invention to determine the Kalman filter coefficient adjustment factor α.
[0120] Among them, the fuzzy logic rules formulated in the embodiment of the present invention can be as follows:
[0121] R1: IF x 1 is S AND x 2 is S AND x 3 is S, THEN y is LT;
[0122] R2: IF x 1 is S AND x 2 is S AND x 3 is M, THEN y is L;
[0123] R3: IF x 1 is S AND x 2 is M AND x 3 is S, THEN y is L;
[0124] R4: IF x 1 is S AND x 2 is M AND x 3 is M, THEN y is M;
[0125] R5: IF x 1 is M AND x 2 is S AND x 3 is S, THEN y is M;
[0126] R6: IF x 1 is M AND x 2 is S AND x 3 is M, THEN y is S;
[0127] R7: IF x 1 is M AND x 2 is M AND x 3 is S, THEN y is S;
[0128] R8: IF x 1 is M AND x 2 is M AND x 3 is M, THEN y is ST.
[0129] Among them, the fuzzy logic rules formulated in the embodiments of the present invention determine the value of the output variable α(y) according to the obtained innovation covariance ratio (the ratio of the innovation theoretical covariance to the innovation actual covariance), the acceleration pedal change rate, and the vehicle speed.
[0130] Assume that the innovation covariance ratio is S, the acceleration pedal change rate is S, and the vehicle speed is M. By querying the above fuzzy logic rules and the fuzzy system output variable parameter table, it can be determined that the output variable α(y) is L, and the parameters corresponding to L are [0.6, 0.7, 0.8]. Furthermore, it can be determined that the Kalman filter coefficient adjustment factor α can be any value within the range of [0.6, 0.7, 0.8].
[0131] In the embodiments of the present invention, by querying the fuzzy logic rules based on the ratio of the innovation theoretical covariance to the innovation actual covariance in the Kalman filter, the acceleration pedal opening change rate of the electric vehicle, the vehicle speed, the fuzzy subset, and the fuzzy system input variable parameters, and determining the Kalman filter coefficient adjustment factor, the purpose of calculating the corresponding innovation theoretical covariance according to different vehicle driving conditions can be achieved. Determining the Kalman filter coefficient adjustment factor according to the fuzzy logic control rules can improve the determination speed of the Kalman filter coefficient adjustment factor.
[0132] Furthermore, after determining the Kalman filter coefficient adjustment factor α, the determined Kalman filter coefficient adjustment factor α can be substituted into the following formula:
[0133]
[0134] Calculate the Kalman filter coefficient K k 。
[0135] In the embodiment of the present invention, the Kalman filter coefficient is determined through the Kalman filter coefficient adjustment factor, achieving the purpose that the Kalman filter coefficient can be adaptively adjusted according to the innovation theory covariance and the actual innovation covariance, and improving the real-time performance and accuracy of the Kalman filter coefficient.
[0136] Construct an adaptive extended Kalman filter algorithm model, and the determined Kalman filter coefficient K k can be added to the extended Kalman filter algorithm model to construct an adaptive extended Kalman filter algorithm model. Finally, the obtained vehicle state data of the electric vehicle can be substituted into the constructed adaptive extended Kalman filter algorithm model to calculate the estimated values of the vehicle speed and road slope of the electric vehicle, solve the problem of the credibility of the covariance in the Kalman filter algorithm, increase the real-time performance of the estimated values of the vehicle speed and road slope of the electric vehicle, and improve the accuracy of calculating the estimated values of the vehicle speed and road slope of the electric vehicle under different driving conditions.
[0137] In the embodiment of the present invention, by querying the fuzzy logic rules based on the ratio of the innovation theory covariance and the actual innovation covariance in the Kalman filter, the acceleration pedal opening change rate, vehicle speed, fuzzy subset, and fuzzy system input variable parameters of the electric vehicle, the Kalman filter coefficient adjustment factor is determined. Through the Kalman filter coefficient adjustment factor, the Kalman filter coefficient is determined. An adaptive extended Kalman filter algorithm model is constructed using the Kalman filter coefficient, and the estimated values of the vehicle speed and road slope of the electric vehicle are calculated through the adaptive extended Kalman filter algorithm model. The problem of the credibility of the covariance in the Kalman filter algorithm is solved, and the sliding time window is selected according to the vehicle driving conditions, and then the innovation theory covariance is determined, improving the accuracy of calculating the estimated values of the vehicle speed and road slope of the electric vehicle under different driving conditions.
[0138] Figure 7 is a structural diagram of a device for calculating the vehicle speed and road slope of an electric vehicle provided by an embodiment of the present invention. This device is applicable to execute the method for calculating the vehicle speed and road slope of an electric vehicle provided by an embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method. As Figure 7 shown, the device may specifically include:
[0139] A vehicle state data acquisition module 701, configured to acquire vehicle state data of an electric vehicle;
[0140] A relationship model construction module 702, configured to establish a relationship model of the vehicle state data of the electric vehicle based on the vehicle dynamics equation and the vehicle state data of the electric vehicle;
[0141] The Extended Kalman Filter algorithm model construction module 703 is used to construct an Extended Kalman Filter algorithm model based on the relationship model of the vehicle state data of the electric vehicle;
[0142] The covariance calculation module 704 is used to calculate the innovation theoretical covariance and the innovation actual covariance based on the Extended Kalman Filter algorithm model, wherein the sliding time window of the Extended Kalman Filter algorithm model is determined according to the vehicle driving conditions of the electric vehicle;
[0143] The Kalman filter coefficient determination module 705 is used to determine the Kalman filter coefficient based on the innovation theoretical covariance and the innovation actual covariance;
[0144] The adaptive Extended Kalman Filter algorithm model construction module 706 is used to construct an adaptive Extended Kalman Filter algorithm model by using the Kalman filter coefficient;
[0145] The estimated value calculation module 707 of the vehicle speed and road slope is used to calculate the estimated values of the vehicle speed and road slope of the electric vehicle through the adaptive Extended Kalman Filter algorithm model.
[0146] Optionally, the vehicle state data of the electric vehicle includes the vehicle mass, vehicle driving speed, wheel rolling radius, wheel rolling resistance, road slope, and motor torque;
[0147] The construction module 702 is specifically used for:
[0148] Use the following formula to establish a relationship model of the vehicle state data of the electric vehicle:
[0149]
[0150] where m is the vehicle mass, v is the vehicle driving speed, F t is the driving force of the vehicle, r is the wheel rolling radius, F f is the wheel rolling resistance, F aero is the air resistance, F i is the slope resistance, where θ is the road slope, M T,D is the motor torque, ρ is the air density, A is the frontal area, C D is the air resistance coefficient, and G is the acceleration due to gravity.
[0151] Optionally, the Extended Kalman Filter algorithm model construction module 703 is specifically used for:
[0152] Convert the relationship model into a state space equation:
[0153]
[0154] Among them, M T is the driving torque of the motor, and f r is the friction coefficient;
[0155] Transform the state - space equation into the standard form of the state - space equation:
[0156]
[0157] Among them, x ∈ R n is the system state vector, u ∈ R is the system input, and y ∈ R m is the system output, A ∈ R n×n , B ∈ R n , C ∈ R m×n are the state matrices of the system;
[0158]
[0159] Among them,
[0160]
[0161]
[0162]
[0163]
[0164]
[0165] In the formula, Δt is the sampling time, assuming that the slope does not change suddenly; ω(k) is the system process noise, and the corresponding noise covariance is Q(k); v(k) is the measurement noise, and the corresponding noise covariance is R(k); ω(k) and v(k) are assumed to be constant and known in the extended Kalman filter;
[0166] Among them, U(K) is the control quantity, A(k) is the vehicle acceleration, θ(k) is the road slope, and H(k) is the coefficient matrix in the state equation; B is the coefficient matrix in the state equation.
[0167] Optionally, the covariance calculation module 704 is specifically used for:
[0168] Calculate the innovation using the following formula:
[0169]
[0170] Among them, Z(k) is the actual output value, is the estimated output value;
[0171] Calculate the theoretical covariance of the innovation using the following formula:
[0172]
[0173] Where N is the sliding time window of the innovation, and e(i) is the deviation between the actual output value and the estimated output value.
[0174] Furthermore, the device further includes a sliding time window determination module for:
[0175] Defining a vehicle data length period update rule for the electric vehicle according to the vehicle driving condition of the electric vehicle;
[0176] Determining the sliding time window of the extended Kalman filter algorithm model through the vehicle data length period update rule of the electric vehicle.
[0177] Optionally, the covariance calculation module 704 is specifically used for:
[0178] Calculating a one-step prediction:
[0179]
[0180] Calculating the one-step prediction mean square error:
[0181]
[0182] Updating the filter gain:
[0183]
[0184] Updating variables:
[0185]
[0186] The error covariance matrix at the next moment:
[0187]
[0188] Optionally, the covariance calculation module 704 is specifically used for:
[0189] Calculating the actual covariance of the innovation using the following formula:
[0190] S(k) = R(k) + H(k)P(k)H(k) T .
[0191] Optionally, the Kalman filter coefficient determination module 705 is specifically used for:
[0192] If the theoretical covariance of the innovation is greater than or less than the actual covariance of the innovation, then obtaining the proportional value of the theoretical covariance of the innovation and the actual covariance of the innovation, the acceleration pedal opening change rate of the vehicle of the electric vehicle, the vehicle speed, the fuzzy subset, and the fuzzy system input variable parameters;
[0193] Based on the ratio value of the innovation theory covariance and the actual innovation covariance in the Kalman filter, the acceleration pedal opening change rate of the vehicle of the electric vehicle, the vehicle speed, the fuzzy subset, and the fuzzy system input variable parameters, query the fuzzy logic rules to determine the Kalman filter coefficient adjustment factor;
[0194] Through the Kalman filter coefficient adjustment factor, determine the Kalman filter coefficient according to the following formula:
[0195]
[0196] where α is the Kalman filter coefficient adjustment factor.
[0197] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the above division of each functional module is used as an example. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the above-described functional modules can refer to the corresponding process in the foregoing method embodiments and will not be elaborated herein.
[0198] An embodiment of the present invention further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the method for calculating the vehicle speed and road slope of an electric vehicle provided in any one of the foregoing embodiments.
[0199] An embodiment of the present invention further provides a computer-readable medium, on which a computer program is stored. When the program is executed by a processor, it implements the method for calculating the vehicle speed and road slope of an electric vehicle provided in any one of the foregoing embodiments.
[0200] Next, refer to Figure 8 , which shows a schematic structural diagram of an electronic device 800 suitable for implementing an embodiment of the present invention. The electronic device in the embodiment of the present invention may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), PMPs (Portable Multimedia Players), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 8 The electronic device shown is only an example and should not impose any limitation on the functions and usage scope of the embodiments of the present invention.
[0201] As Figure 8As shown, the electronic device 800 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 801, which may perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 are also stored. The processing device 801, the ROM 802, and the RAM 803 are connected to each other through a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0202] Generally, the following devices may be connected to the I / O interface 805: an input device 806 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 808 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 809. The communication device 809 may allow the electronic device 800 to communicate with other devices wirelessly or wiredly to exchange data. Although Figure 8 the electronic device 800 with various devices is shown, it should be understood that it is not required to implement or have all the shown devices. Instead, more or fewer devices may be implemented or had.
[0203] In particular, according to an embodiment of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 809, or installed from the storage device 808, or installed from the ROM 802. When the computer program is executed by the processing device 801, the above-mentioned functions defined in the methods of the embodiments of the present invention are executed. It should be noted that the computer-readable medium shown in the present invention can be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, the computer-readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, apparatus, or device. In the present invention, the computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries the computer-readable program code. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, and the computer-readable medium can send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted by any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0204] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a part of code that contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, as well as combinations of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0205] The modules and / or units involved in the embodiments of the present invention can be implemented in software or in hardware. The described modules and / or units can also be provided in a processor. For example, it can be described as: a processor includes a vehicle state data acquisition module, a relationship model construction module, an extended Kalman filter algorithm model construction module, a covariance calculation module, a Kalman filter coefficient determination module, an adaptive extended Kalman filter algorithm model construction module, and an estimated value calculation module for vehicle speed and road grade. Among them, the names of these modules do not constitute a limitation to the modules themselves in some cases.
[0206] As another aspect, the present invention also provides a computer-readable medium, which can be included in the device described in the above embodiments; or can exist separately without being assembled into the device. The above computer-readable medium carries one or more programs. When the one or more programs are executed by the device, the device is caused to include: acquiring vehicle state data of an electric vehicle; establishing a relationship model of the vehicle state data of the electric vehicle based on the vehicle dynamics equation; constructing an extended Kalman filter algorithm model based on the relationship model of the vehicle state data of the electric vehicle; calculating the innovation theoretical covariance and the innovation actual covariance based on the extended Kalman filter algorithm model, wherein the sliding time window of the extended Kalman filter algorithm model is determined according to the driving conditions of the electric vehicle; determining the Kalman filter coefficient based on the innovation theoretical covariance and the innovation actual covariance; constructing an adaptive extended Kalman filter algorithm model using the Kalman filter coefficient; and calculating the estimated values of the vehicle speed and the road grade of the electric vehicle through the adaptive extended Kalman filter algorithm model.
[0207] According to the technical solution of the embodiment of the present invention, the innovation theory covariance is determined according to different vehicle driving conditions, and then the Kalman filter coefficient is determined through the innovation theory covariance and the innovation actual covariance, and further an adaptive extended Kalman filter algorithm model is constructed, which solves the problem of the credibility of the covariance in the Kalman filter algorithm, realizes the purpose of adaptively adjusting the Kalman filter coefficient in the adaptive extended Kalman filter algorithm model, thereby improving the accuracy of calculating the estimated values of the vehicle speed and road slope of the electric vehicle under different driving conditions, and increasing the real-time performance of the estimated values of the vehicle speed and road slope of the electric vehicle under different driving conditions.
[0208] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A method for calculating the vehicle speed and road slope of an electric vehicle, characterized in that, it includes: Obtain the vehicle state data of the electric vehicle; Based on the vehicle dynamics equation and the vehicle state data of the electric vehicle, establish a relationship model of the vehicle state data of the electric vehicle; Based on the relationship model of the vehicle state data of the electric vehicle, construct an extended Kalman filter algorithm model; Based on the extended Kalman filter algorithm model, calculate the innovation theoretical covariance and the innovation actual covariance, wherein the sliding time window of the extended Kalman filter algorithm model is determined according to the vehicle driving conditions of the electric vehicle; Determine the Kalman filter coefficient based on the innovation theoretical covariance and the innovation actual covariance; Use the Kalman filter coefficient to construct an adaptive extended Kalman filter algorithm model; Calculate the estimated values of the vehicle speed and road slope of the electric vehicle through the adaptive extended Kalman filter algorithm model; Wherein, the determining the Kalman filter coefficient based on the innovation theoretical covariance and the innovation actual covariance includes: If the innovation theoretical covariance is greater than or less than the innovation actual covariance, then obtain the proportional value of the innovation theoretical covariance and the innovation actual covariance, the acceleration pedal opening change rate of the electric vehicle, the vehicle speed, the fuzzy subset and the fuzzy system input variable parameters; Based on the proportional value of the innovation theoretical covariance and the innovation actual covariance in the Kalman filter, the acceleration pedal opening change rate of the electric vehicle, the vehicle speed, the fuzzy subset and the fuzzy system input variable parameters, query the fuzzy logic rules to determine the Kalman filter coefficient adjustment factor; wherein, the fuzzy logic rules are the logic rules formulated by using the fuzzy control method to determine the Kalman filter coefficient adjustment factor; Determine the Kalman filter coefficient through the Kalman filter coefficient adjustment factor.
2. The method according to claim 1, characterized in that, The vehicle state data of the electric vehicle includes the vehicle mass, vehicle driving speed, wheel rolling radius, wheel rolling resistance, road slope and motor torque. The establishing a relationship model of the vehicle state data of the electric vehicle based on the vehicle dynamics equation of the electric vehicle includes: Use the following formula to establish a relationship model of the vehicle state data of the electric vehicle: Among them, m is the vehicle mass, v is the vehicle driving speed, F t is the driving force of the vehicle, r is the wheel rolling radius, F f is the wheel rolling resistance, F aero is the air resistance, F i is the gradient resistance, where θ is the road gradient, M T,D is the motor torque, ρ is the air density, A is the frontal area, C D is the air resistance coefficient, and G is the acceleration due to gravity.
3. The method according to claim 2, characterized in that, The constructing an extended Kalman filter algorithm model based on the relationship model of the vehicle state data of the electric vehicle includes: Convert the relationship model into a state space equation: Among them, M T is the driving torque of the motor, and f r is the friction coefficient; Convert the state space equation into the standard form of the state space equation: where \(x\in R\) n is the system state vector, \(u\in R\) is the system input, \(y\in R\) m is the system output, \(A\in R\) n×n , \(B\in R\) n , \(C\in R\) m ×n are the state matrices of the system; Wherein, In the formula, Δt is the sampling time, assuming that the slope does not change suddenly; ω(k) is the system process noise, and the corresponding noise covariance is Q(k); v(k) is the measurement noise, and the corresponding noise covariance is R(k); ω(k) and v(k) are assumed to be constant and known in the extended Kalman filter; Wherein, U(K) is the control quantity, A(k) is the vehicle acceleration, θ(k) is the road slope, and H(k) is the coefficient matrix in the state equation; B is the coefficient matrix in the state equation.
4. The method according to claim 3, characterized in that calculating the innovation theoretical covariance based on the extended Kalman filter algorithm model includes: calculating the innovation using the following formula: Among them, Z(k) is the actual output value, is the estimated output value; calculating the innovation theoretical covariance using the following formula: where N is the sliding time window of the innovation, and e(i) is the deviation between the actual output value and the estimated output value.
5. The method according to claim 3, characterized in that before calculating the innovation theoretical covariance based on the extended Kalman filter algorithm model, it includes: defining a vehicle data length period update rule for the electric vehicle according to the vehicle driving conditions of the electric vehicle; determining the sliding time window of the extended Kalman filter algorithm model through the vehicle data length period update rule of the electric vehicle.
6. The method according to claim 3, characterized in that calculating the innovation actual covariance based on the extended Kalman filter algorithm model includes: calculating a one-step prediction: calculating the one-step prediction mean square error: updating the filter gain: updating the variables: the error covariance matrix at the next moment:
7. The method according to claim 6, characterized in that calculating the innovation actual covariance based on the extended Kalman filter algorithm model further includes: calculating the innovation actual covariance using the following formula: S(k) = R(k) + H(k)P(k)H(k) T 。 8. A device for calculating the vehicle speed and road slope of an electric vehicle, characterized in that it includes: a vehicle state data acquisition module for acquiring the vehicle state data of the electric vehicle; a relationship model construction module for establishing a relationship model of the vehicle state data of the electric vehicle based on the vehicle dynamics equation and the vehicle state data of the electric vehicle; an extended Kalman filter algorithm model construction module for constructing an extended Kalman filter algorithm model based on the relationship model of the vehicle state data of the electric vehicle; a covariance calculation module for calculating the innovation theoretical covariance and the innovation actual covariance based on the extended Kalman filter algorithm model, wherein the sliding time window of the extended Kalman filter algorithm model is determined according to the vehicle driving conditions of the electric vehicle; a Kalman filter coefficient determination module for determining the Kalman filter coefficient based on the innovation theoretical covariance and the innovation actual covariance; an adaptive extended Kalman filter algorithm model construction module for constructing an adaptive extended Kalman filter algorithm model using the Kalman filter coefficient; a calculation module for estimating the vehicle speed and road slope for calculating the estimated values of the vehicle speed and road slope of the electric vehicle through the adaptive extended Kalman filter algorithm model; Among them, the Kalman filter coefficient determination module is specifically configured to, if the innovation theoretical covariance is greater than or less than the innovation actual covariance, obtain the proportional value of the innovation theoretical covariance and the innovation actual covariance, the acceleration pedal opening change rate of the electric vehicle, the vehicle speed, the fuzzy subset, and the fuzzy system input variable parameters; based on the proportional value of the innovation theoretical covariance and the innovation actual covariance in the Kalman filter, the acceleration pedal opening change rate of the electric vehicle, the vehicle speed, the fuzzy subset, and the fuzzy system input variable parameters, query the fuzzy logic rules to determine the Kalman filter coefficient adjustment factor; wherein, the fuzzy logic rules are the logic rules formulated by using the fuzzy control method to determine the Kalman filter coefficient adjustment factor; and determine the Kalman filter coefficient through the Kalman filter coefficient adjustment factor.
9. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, when the processor executes the program, it implements the electric vehicle speed and road slope calculation method according to any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, characterized in that, when the program is executed by the processor, it implements the electric vehicle speed and road slope calculation method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Adaptive extended kalman filtering-based road slope estimation method
CN106840097A