Multi-mode automatic switching control system and method for electro-tricycle

By designing detection, data processing and logic control modules on the electric tricycle, and using a combination of FPGA and MCU chips, a multi-mode automatic switching control system is realized, which solves the problem of low data processing efficiency in the existing technology and improves response speed and System flexibility.

CN118769927AActive Publication Date: 2024-10-15SICHUAN HONGZUN MOTORCYCLE MFG CO LTD

Patent Information

Application Number
CN202411216695.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-02
Publication Date
2024-10-15
Estimated Expiration
2044-09-02

AI Technical Summary

Technical Problem

The existing electric tricycle control system cannot achieve flexible multi-mode automatic switching, and lacks dynamic adjustment of sensor data usage methods and FIFO cache optimization, resulting in low data processing efficiency and inability to adapt to complex driving scenarios.

Method used

A multi-mode automatic switching control system for electric tricycles including a detection module, data processing module and logic control module is designed. The FPGA chip is used to process real-time data and connect the sensor and MCU chip through the SPI bus to achieve efficient data processing and logic control. Dynamically adjust FIFO depth to optimize data storage and processing efficiency.

Benefits of technology

It improves the automatic switching response speed and processing efficiency of electric tricycles, realizes efficient, flexible and low-cost system design, adapts to multi-mode automatic switching control requirements, simplifies peripheral circuits and reduces production costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118769927A_ABST
    Figure CN118769927A_ABST
Patent Text Reader

Abstract

The invention discloses an electric tricycle multi-mode automatic switching control system and method, and belongs to the field of electric vehicle power switchover, the electric tricycle multi-mode automatic switching control system comprises a detection module, a data processing module and a logic control module, the detection module is composed of sensors arranged on an electric tricycle, and collected data is sent to the data processing module; the data processing module is connected with the sensor module and is configured to recognize a current driving mode according to the real-time state data and send a processing result to the logic control module; and the logic control module is connected with the data processing module and is configured to receive the data processed by the data processing module, identify the current driving mode and automatically switch tricycle control logic according to an identification result. The data processing module is adopted to process real-time data collected by the sensor, multiple data streams can be processed at the same time, and the response speed of automatic switching of the electro-tricycle is increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electric vehicle power switching, and in particular to a multi-mode automatic switching control system and method for an electric tricycle. Background Art

[0002] With the development of new energy technology, electric tricycles, as an important member of new energy transportation tools, have been widely used around the world in recent years. Electric tricycles have a simple structure and light weight, and are suitable for short-distance commuting in cities and daily shopping. At the same time, in the development of electric tricycles, new requirements have been put forward for the operation and multi-mode control of electric tricycles. The existing oil vehicle mode control system can no longer be applied to the characteristics of electric tricycles. In order to save battery energy and improve endurance, and to achieve intelligence and multi-function, the control system of electric tricycles needs to be fully upgraded. In the prior art, MCU chips are usually used as the core of the control system, but tricycles cannot use high-performance MCU chips due to cost issues, and ordinary MUC chips are limited by their weak performance and cannot adapt to the processing of large-scale real-time data. At present, electric tricycles must use a large number of sensors to collect driving information in order to achieve automatic control. At the same time, the prior art lacks a method for dynamically adjusting the use of sensor data based on driving scenarios, and the prior art also lacks a method for dynamically adjusting the FIFO cache through scenarios, thereby detecting the flow, change frequency and peak value of real-time data of monitoring sensors to build a historical database, and deeply optimizing data storage and improving processing efficiency through the data in the historical database. Therefore, there is an urgent need to provide an economical mode switching method for an electric tricycle on the market. Summary of the invention

[0003] One of the purposes of the present invention is to provide a multi-mode automatic switching control system for an electric tricycle, and to solve the problem in the prior art that the electric tricycle lacks flexible multi-mode automatic switching control.

[0004] The present invention is implemented through the following technical scheme: an electric tricycle multi-mode automatic switching control system, including a detection module, a data processing module and a logic control module.

[0005] Among them, the detection module is composed of sensors arranged on the electric tricycle, which is used to collect real-time status data of the vehicle and send the collected data to the data processing module; the data processing module is connected to the sensor module and is configured to identify the current driving mode according to the real-time status data and send the processing result to the logic control module; the logic control module is connected to the data processing module and is configured to receive the data processed by the data processing module, identify the current driving mode, and automatically switch the tricycle control logic according to the identification result.

[0006] Furthermore, the control system may also include a motor control module, which is connected to the logic control module and is configured to adjust the power output and speed of the hub motor according to different tricycle control logics; when a>athreshold and v>vmin, the motor control module adjusts the motor to an acceleration mode; when |a|≤ When a<-athreshold and v>vmin, the motor control module controls the motor to a uniform speed mode; when a<-athreshold and v>vmin, the motor control module controls the motor to a deceleration mode; when v≤vmin, the motor control module controls the motor to a parking mode; where a is acceleration, athreshold is the acceleration threshold, v is the speed, and vmin is the minimum speed. is a fixed constant used to determine whether the acceleration is close to zero.

[0007] Furthermore, the data processing module may also include a data cache submodule, a data collection submodule and a decision submodule.

[0008] Among them, the data cache submodule is configured to receive the real-time status data of the vehicle collected by the sensor module, and store the real-time status data of the vehicle into the FIFO cache area after classification, and normalize the data in the FIFO cache area; the data collection submodule is connected to the data cache submodule, and is configured to collect the normalized data and convert it into a normalized data set, wherein the normalized data set is x=[vk,ak,Vk,Ik], wherein vk is the normalized speed data, ak is the normalized acceleration data, Vk is the normalized voltage data, and Ik is the normalized current data; the decision submodule is connected to the data collection submodule, and is configured to process the normalized data set through the objective function and constraint conditions, wherein the objective function is, , used to classify the normalized data; where, w is the normal vector of the hyperplane; is the weight vector, w The square of the L2 norm is used to indicate the size of the weight to prevent overfitting; ξ i is a slack variable, indicating the allowable misclassification; C is a penalty parameter, balancing the interval maximization and the weight of misclassification; N is the classified data set; the constraints are, , ξ i ≥0, i=1, used to filter out abnormal data or noise data to improve the accuracy of automatic switching control; where, yi For the iThe label of a sample, usually with a value of +1 or -1, indicating the category of the sample; is the weight vector w With the sample feature vector xi The dot product of is used to represent the sample xi Projection onto the decision boundary; b is The bias term is used to adjust the position of the decision boundary. By solving the objective function and the constraints, the decision function f(x)=w·x+b is obtained, and the decision result is obtained by calculating the decision function.

[0009] Furthermore, the FIFO buffer area also includes, by monitoring the flow, change frequency and peak value of real-time sensor data, identifying data characteristics under different driving scenarios, and recording the data characteristics as a historical database; determining the priority of different types of sensor data through the data in the historical database; and dynamically adjusting the FIFO depth according to the obtained priority to optimize the efficiency of data storage and processing.

[0010] Furthermore, the FIFO depth is dynamically adjusted by setting the upper and lower limits of the FIFO depth, including setting the minimum depth of the FIFO to 100 data items and the maximum depth to 1000 data items; when the data flow rate is continuously higher than 80% occupancy, the FIFO depth is increased; when the data flow rate is continuously lower than 20% occupancy, the FIFO depth is reduced to release system resources.

[0011] Furthermore, the sensors in the measuring module include a speed sensor, a current sensor, a voltage sensor and an acceleration sensor, and the sensors and the data processing module are connected by an SPI bus.

[0012] Furthermore, the data processing module is an FPGA chip, and the logic control module is an MCU chip, wherein the model of the FPGA chip may be XC6SLX9, and the model of the MCU chip may be STM32F407.

[0013] It should be noted that the reason why the SPI bus is used to connect sensors, FPGA chips and MCU chips is that the SPI bus has the advantage of low cost. At the same time, the SPI bus can support high-speed data transmission and can reach speeds of tens of megahertz, which is very beneficial for sensor data collection and processing. The use of the SPI bus can reduce costs while improving the processing speed of the entire system and prevent the situation where the logic control is not responded in time due to bus data transmission.

[0014] On the other hand, the present invention provides a multi-mode automatic switching control method for an electric tricycle, comprising: S100, a sensor collects real-time status data of the vehicle and sends it to a data processing module for processing; S200, the data processing module identifies the current driving mode according to the real-time status data, and sends the processing result to a logic control module; S300, the logic control module identifies the current driving mode according to the processing result of the data processing module, identifies the current driving mode, and automatically switches the tricycle control logic according to the identification result.

[0015] Further, the sensor may include a speed sensor, a current sensor, a voltage sensor, and an acceleration sensor.

[0016] Furthermore, the data processing module may use an FPGA chip, the logic control module may use an MCU chip, and the sensor and the data processing module may be connected by an SPI bus. The model of the FPGA chip may be XC6SLX9, and the model of the MCU chip may be STM32F407.

[0017] Further, step S200 also includes the following sub-steps: S210, classifying the real-time status data of the vehicle and storing it in the FIFO buffer area, and normalizing the data in the buffer area; S220, aggregating the normalized data and converting it into a normalized data set, wherein the normalized data set is x=[vk,ak,Vk,Ik], wherein vk is the normalized speed data, ak is the normalized acceleration data, Vk is the normalized voltage data, and Ik is the normalized current data; S230, processing the normalized data set through the objective function and constraint conditions, wherein the objective function is, , used to classify the normalized data; where, w is the normal vector of the hyperplane; is the weight vector, w The square of the L2 norm is used to indicate the size of the weight to prevent overfitting; ξ i is a slack variable, indicating the allowed misclassification; C is a penalty parameter, balancing the interval maximization and the weight of misclassification; N is the classified data set; the constraints are, , ξ i ≥0, i=1, used to filter out abnormal data or noise data to improve the accuracy of automatic switching control; where, yi For the i The label of a sample, usually with a value of +1 or -1, indicating the category of the sample; is the weight vectorw With the sample feature vector xi The dot product of is used to represent the sample xi Projection onto the decision boundary; b is The bias term is used to adjust the position of the decision boundary. By solving the objective function and the constraints, the decision function f(x)=w·x+b is obtained, and the decision result is obtained by calculating the decision function.

[0018] Furthermore, the normalization process may include performing normalization process on the data in the buffer area using Z-score normalization, and the Z-score normalization process includes:

[0019] ,

[0020] ,

[0021] ;

[0022] Among them, Z is the data output after standardization, q is the data in the FIFO buffer, μ is the mean of the data in all FIFO buffers, σ is the standard deviation of the data, M is the total number of data set samples in the FIFO buffer, and qi is the data value of the i-th sample in the FIFO buffer.

[0023] Furthermore, automatically switching the tricycle control logic according to the recognition result includes adjusting the power output and speed of the hub motor through different tricycle control logics; when a>athreshold and v>vmin, the motor control module controls the motor to the acceleration mode; when |a|≤ When a<-athreshold and v>vmin, the motor control module controls the motor to a uniform speed mode; when a<-athreshold and v>vmin, the motor control module controls the motor to a deceleration mode; when v≤vmin, the motor control module controls the motor to a parking mode; where a is acceleration, athreshold is the acceleration threshold, v is the speed, and vmin is the minimum speed. is a fixed constant used to determine whether the acceleration is close to zero.

[0024] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0025] 1. The present invention processes the real-time data collected by the sensor by using an FPGA module. FPGA has a high degree of parallel processing capability and can process multiple data streams at the same time, thereby improving the speed and efficiency of sensor data processing and improving the response speed of automatic switching of the electric tricycle.

[0026] 2. The present invention adopts FPGA for data processing and MCU for logic processing, which can fully utilize the high-performance data processing capabilities of FPGA and the flexible logic control capabilities of MCU to achieve efficient, flexible and low-cost system design. This combination adapts to the real-time data processing and complex logic control requirements of the multi-mode automatic switching control requirements of the electric tricycle, simplifies the peripheral circuit, improves the development efficiency and saves production costs.

[0027] 3. The present invention uniquely designs the processing flow inside the FPGA, distinguishes the data of different sensors, sets a FIFO buffer area inside the FPGA, stores the data collected by the sensor in real time, and normalizes the data, thereby reducing the difficulty of data processing and improving the processing speed and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, constitute a part of this application, and do not constitute a limitation of the embodiments of the present invention. In the drawings:

[0029] Figure 1 This is a system structure diagram provided for Example 1 of the present invention.

[0030] Figure 2 This is a flow chart of the method provided in Example 2 of the present invention.

[0031] Explanation of reference numerals: 100 - detection module, 200 - data processing module. DETAILED DESCRIPTION

[0032] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0033] Example 1

[0034] Figure 1 The system structure diagram of this embodiment is shown. This embodiment provides a multi-mode automatic switching control system for an electric tricycle.

[0035] from Figure 1 It can be seen that the present embodiment includes a detection module, a data processing module, a logic control module and a motor control module.

[0036] Among them, the detection module is composed of sensors arranged on the electric tricycle, which is used to collect real-time status data of the vehicle and send the collected data to the data processing module.

[0037] Specifically, in this embodiment, the sensors in the detection module may include a speed sensor, a current sensor, a voltage sensor, and an acceleration sensor, and the sensors and the data processing module are connected using an SPI bus.

[0038] The data processing module is connected to the sensor module and is configured to identify the current driving mode according to the real-time status data and send the processing result to the logic control module.

[0039] Specifically, the data processing module may include the following submodules:

[0040] Data cache submodule, data collection submodule and decision submodule.

[0041] The data cache submodule is configured to receive the real-time status data of the vehicle collected by the sensor module, and store the real-time status data of the vehicle into the FIFO cache area after classification, and normalize the data in the FIFO cache area.

[0042] The data collection submodule is connected to the data cache submodule, and is configured to collect the normalized data and convert it into a normalized data set, wherein the normalized data set is x=[vk,ak,Vk,Ik], wherein vk is the normalized velocity data, ak is the normalized acceleration data, Vk is the normalized voltage data, and Ik is the normalized current data.

[0043] Specifically, Z-score standardization can be used to standardize the data in the buffer area. Z-score standardization includes:

[0044] ,

[0045] ,

[0046] ;

[0047] Among them, Z is the output data after standardization, q is the data in the FIFO buffer, μ is the mean of the data in all FIFO buffers, σ is the standard deviation of the data, M is the total number of data set samples in the FIFO buffer, and qi is the data value of the i-th sample in the FIFO buffer.

[0048] The decision submodule is connected to the data set submodule and is configured to process the normalized data set through the objective function and the constraint conditions.

[0049] The objective function is, , used to classify the normalized data.

[0050] in, w is the normal vector of the hyperplane; is the weight vector, w The square of the L2 norm is used to indicate the size of the weight to prevent overfitting; ξ i is a slack variable, indicating the allowed misclassification; C is a penalty parameter, balancing the interval maximization and the weight of misclassification; N is the classified data set.

[0051] The constraints are, , ξi≥0, i=1, is used to filter out abnormal data or noise data and improve the accuracy of automatic switching control.

[0052] in, yi For the i The label of a sample, usually with a value of +1 or -1, indicating the category of the sample; is the weight vector w With the sample feature vector xi The dot product of is used to represent the sample xi Projection onto the decision boundary; b is The bias term is used to adjust the position of the decision boundary; ξi is This is a slack variable used to allow a certain degree of classification error. It is introduced to handle inseparable data.

[0053] In this embodiment, the objective function is used to process high-dimensional data quickly and effectively. In particular, when the number of input features is large, the objective function can be used to quickly find an optimal classification hyperplane, which can perform well when processing complex and multi-sensor data. At the same time, by maximizing the inter-class interval of the objective function to build a classifier, the overfitting phenomenon can be effectively reduced. At the same time, since the objective function is to build a model through support vectors (i.e., the points closest to the decision boundary), this means that in actual sensor data, even if there are a small number of abnormal data points, the objective function can still be classified stably.

[0054] The role of the constraint is to ensure that the data is correctly classified and allow for a certain amount of misclassification. The constraint set in this embodiment can clarify the classification criteria for different sensor data, ensure that the data is classified according to predetermined rules, and thus improve the accuracy of data processing. In this embodiment, by classifying and processing according to different thresholds of the speed sensor, acceleration sensor, current, and voltage sensor, it is possible to effectively avoid misoperation or wrong decision caused by data confusion. This improves the accuracy of automatic switching control and ensures the effect of MCU in making logical judgments.

[0055] By solving the objective function and constraints, the decision function f(x)=w·x+b is obtained, and the result is obtained by calculating the decision function.

[0056] The logic control module is connected to the data processing module and is configured such that the logic control module receives the data processed by the data processing module, identifies the current driving mode, and automatically switches the tricycle control logic according to the identification result.

[0057] The motor control module is connected to the logic control module and is configured to adjust the power output and speed of the hub motor according to different tricycle control logics.

[0058] Specifically, in this embodiment, the control logic of the tricycle is:

[0059] When a>athreshold and v>vmin, the motor control module regulates the motor to acceleration mode.

[0060] When |a|≤ When v>vmin, the motor control module controls the motor to a constant speed mode.

[0061] When a<-athreshold and v>vmin, the motor control module controls the motor to deceleration mode.

[0062] When v≤vmin, the motor control module controls the motor to the parking mode.

[0063] Among them, a is acceleration, athreshold is the acceleration threshold, v is speed, and vmin is the minimum speed. is a fixed constant used to determine whether the acceleration is close to zero.

[0064] Example 2

[0065] This embodiment provides a multi-mode automatic switching control method for an electric tricycle. Figure 2 The method flow chart of this embodiment is shown. The multi-mode automatic switching control method of the electric tricycle in this embodiment specifically includes the following steps:

[0066] Step 1: The sensor collects the real-time status data of the vehicle and sends it to the data processing module for processing.

[0067] Specifically, the sensor may include a speed sensor, a current sensor, a voltage sensor, and an acceleration sensor.

[0068] It should be noted that, since electric tricycles are limited by cost requirements, installing sensors on the vehicle will increase costs. Therefore, this embodiment selects the four types of sensors that have the greatest impact on automatic switching control. However, this does not mean that more other sensors cannot be installed. These four sensors are selected only because they have the highest priority impact on the operation of logical control.

[0069] Step 2: The data processing module identifies the current driving mode based on the real-time status data and sends the processing result to the logic control module.

[0070] Specifically, step 2 may also include the following sub-steps:

[0071] 1) Classify the real-time status data of the vehicle and store it in the FIFO buffer, and normalize the data in the buffer.

[0072] It should be noted that, in this embodiment, the purpose of setting a FIFO buffer in the data processing module is to achieve filtering and noise reduction processing of sensor data. Through the hardware-level FIFO buffer, data can be effectively buffered to ensure the sequentiality and real-time nature of the vehicle's real-time status data. The FIFO buffer can be used to perform preliminary processing on the data collected by the sensor, and the preliminary processing includes analog-to-digital conversion, filtering, noise reduction and normalization processing of the sensor data.

[0073] Among them, normalization processing is particularly important for subsequent data prediction. The normalization processing method selected in this embodiment is Z-score standardization.

[0074] Specifically, the Z-score standardization process includes:

[0075] ,

[0076] ,

[0077] ;

[0078] Among them, Z is the output data after standardization, q is the data in the FIFO buffer, μ is the mean of the data in all FIFO buffers, σ is the standard deviation of the data, M is the total number of data set samples in the FIFO buffer, and qi is the data value of the i-th sample in the FIFO buffer.

[0079] Specifically, in this embodiment, the FIFO buffer area may also include detecting the flow, change frequency and peak value of the real-time data of the monitoring sensor to build a historical database, and deeply optimize data storage and improve processing efficiency through the data in the historical database.

[0080] Specifically, it includes the following contents: by monitoring the flow, change frequency and peak value of real-time sensor data, identifying the data characteristics under different driving scenarios, and recording the data characteristics as a historical database.

[0081] Determine the priority of different types of sensor data through the data in the historical database.

[0082] Dynamically adjust the FIFO depth based on the obtained priority to optimize the efficiency of data storage and processing.

[0083] In addition, the FIFO depth can be dynamically adjusted by setting the upper and lower limits of the FIFO depth.

[0084] Specifically, the minimum depth of the FIFO is set to 100 data items and the maximum depth is set to 1000 data items.

[0085] When the data traffic is continuously higher than 80% occupancy, the FIFO depth is increased; when the data traffic is continuously lower than 20% occupancy, the FIFO depth is reduced to release system resources.

[0086] By taking advantage of the parallel processing of FPGA, after storing a large amount of data in the FIFO buffer, the Z-score standardization processing is performed in parallel through the hardware accelerator, which can greatly improve the speed and efficiency of data processing, and can quickly complete the standardization of data, which is helpful for the real-time monitoring and control of the electric tricycle and ensure the response speed of the system.

[0087] 2) The normalized data are collected and converted into a normalized data set, wherein the normalized data set is x=[vk,ak,Vk,Ik], wherein vk is the normalized velocity data, ak is the normalized acceleration data, Vk is the normalized voltage data, and Ik is the normalized current data.

[0088] 3) Process the normalized data set through objective functions and constraints.

[0089] Among them, the objective function is, , used to classify the normalized data.

[0090] in, w is the normal vector of the hyperplane; is the weight vector, w The square of the L2 norm (L2 norm) is used to indicate the size of the weight to prevent overfitting; ξi is a slack variable, indicating the allowed misclassification; C is a penalty parameter, balancing the interval maximization and the weight of misclassification; N is the classified data set.

[0091] The constraints are, , ξi≥0, i=1, is used to filter out abnormal data or noise data and improve the accuracy of automatic switching control.

[0092] It should be noted that when the sample xi When correctly classified, yi ( w·xi + b ) should be greater than or equal to 1. xi When misclassified, the slack variable ξi The right side is allowed to be less than 1, thus providing a fault tolerance mechanism. ξi ≥ 0: The slack variable must be non-negative, which means that the classifier cannot arbitrarily misclassify examples.

[0093] In the formula, yi For the i The label of a sample, usually with a value of +1 or -1, indicating the category of the sample; is the weight vector w With the sample feature vector xi The dot product of is used to represent the sample xi Projection onto the decision boundary; b is The bias term is used to adjust the position of the decision boundary. By solving the objective function and the constraints, the decision function f(x)=w·x+b is obtained, and the decision result is obtained by calculating the decision function.

[0094] By solving the objective function and constraints, the decision function f(x)=w·x+b is obtained, and the result is obtained by calculating the decision function.

[0095] It should be noted that the purpose of setting the objective function in this sub-step is that the objective function has high precision and stability in the classification task, and can significantly improve the accuracy of switching in the mode switching decision. For example, by calculating the sensor data through the objective function, the logical control judgment can more accurately identify different driving states and switch to the appropriate mode. At the same time, through the real-time and response speed of the objective function, FPAG can be used to quickly process sensor data and make real-time decisions, which is particularly important for systems that require rapid response, ensuring that the entire system can adjust the driving mode in a timely manner.

[0096] The purpose of setting constraints is to filter out abnormal data or noise data while improving the accuracy of automatic switching control and ensuring the effect of MCU's logical judgment. Although the data in the FIFO buffer area can be processed in the above steps to achieve data unification and ensure data accuracy, some sudden abnormal values ​​or noise data may appear in the sensor data processing, and these data may affect the normal operation of the system. By setting constraints, these abnormal data can be identified and filtered out, thereby improving the reliability of the entire method and ensuring the accuracy of the final logical judgment. In addition, in the multi-mode automatic switching process of the electric tricycle, timely and accurate processing of sensor data is crucial for the smooth operation of the vehicle. By classifying sensor data and setting constraints, the data processing speed can be accelerated, the complexity of data processing can be effectively reduced, the response speed of the entire control method can be improved, and real-time performance can be ensured.

[0097] Step 3: The logic control module identifies the current driving mode according to the processing result of the data processing module, and automatically switches the tricycle control logic according to the identification result.

[0098] Specifically, automatically switching the tricycle control logic according to the recognition result includes adjusting the power output and speed of the hub motor through different tricycle control logics.

[0099] When a>athreshold and v>vmin, the motor control module regulates the motor to acceleration mode.

[0100] When |a|≤ When v>vmin, the motor control module controls the motor to a constant speed mode.

[0101] When a<-athreshold and v>vmin, the motor control module controls the motor to deceleration mode.

[0102] When v≤vmin, the motor control module controls the motor to the parking mode.

[0103] Among them, a is acceleration, athreshold is the acceleration threshold, v is speed, and vmin is the minimum speed. is a fixed constant used to determine whether the acceleration is close to zero.

[0104] In order to better understand the present invention, the present invention is further explained below in conjunction with the embodiments, but the present invention is not limited to the following embodiments.

[0105] Example 3

[0106] In this embodiment,

[0107] The detection module includes four sensors: speed sensor, current sensor, voltage sensor and acceleration sensor. The data processing module uses the FPGA chip model XC6SLX9. The logic control module uses the MCU chip model STM32F407.

[0108] The four sensors in the detection module are connected to the FPGA chip through the SPI bus respectively. After receiving the data from the sensor, the FPGA chip performs calculations and sends the calculation results to the MCU chip through the SPI bus. The MCU performs logical processing on the calculation results and controls the motor control module through the SPI bus to achieve automatic switching of multiple modes.

[0109] Specifically, it can include the following:

[0110] The detection module consists of a speed sensor, a current sensor, a voltage sensor and an acceleration sensor arranged on the electric tricycle. It is used to collect real-time status data of the vehicle and send the collected data to the XC6SLX9 through the SPI bus.

[0111] In order to process the collected data, a FIFO buffer is provided in the XC6SLX9 in this embodiment.

[0112] The data collected by the sensor is sent to the XC6SLX9 via the SPI bus and is first stored in the FIFO buffer. Specifically, the data collected by the sensor is first converted into a digital signal through analog-to-digital conversion, and then the data of different sensors are stored in different FIFO buffers (that is, the data collected by the speed sensor, current sensor, voltage sensor and acceleration sensor correspond to different FIFO buffers respectively). Then, the data in the FIFO buffer is denoised to filter out abnormal data or noise data. Finally, the data in the buffer is normalized. Through normalization, the offset and scale differences in the data can be eliminated, the impact of abnormal values ​​and noise on system performance can be reduced, and the consistency of data processing can be improved.

[0113] Specifically, in this embodiment, the FIFO buffer area may also include detecting the flow, change frequency and peak value of the real-time data of the monitoring sensor to build a historical database, and deeply optimize data storage and improve processing efficiency through the data in the historical database.

[0114] Specifically, it includes the following contents: by monitoring the flow, change frequency and peak value of real-time sensor data, identifying the data characteristics under different driving scenarios, and recording the data characteristics as a historical database.

[0115] Determine the priority of different types of sensor data through the data in the historical database.

[0116] Dynamically adjust the FIFO depth based on the obtained priority to optimize the efficiency of data storage and processing.

[0117] In addition, the FIFO depth can be dynamically adjusted by setting the upper and lower limits of the FIFO depth.

[0118] When the data flow reaches the high flow threshold (for example, the FIFO depth exceeds 800 entries), the FIFO depth is increased by 50 entries each time until the maximum depth is reached.

[0119] If the data flow rate drops below the low flow threshold (for example, the FIFO depth is less than 200 entries), the FIFO depth is reduced by 50 entries at a time until the minimum depth is reached.

[0120] You can also monitor data traffic, buffer occupancy, and system response time in real time to provide timely feedback on adjustment needs and set regular inspection time intervals to adjust the FIFO depth in a timely manner when data changes.

[0121] For example, the data flow on urban roads may be relatively stable, while instantaneous peaks may occur on open roads. By recording and detecting the flow, change frequency and peak value of the real-time sensor data in the FIFO buffer area, the data characteristics under different driving scenarios can be identified, and then the priority of various sensor data in different situations can be determined. In the case where the data flow on urban roads may be relatively stable, the vehicle's speed and acceleration sensor data may require a higher priority; while on open roads, where instantaneous peaks are likely to occur, the vehicle's current and voltage sensor data may require a higher priority, thereby facilitating the regulation of the battery's output current and making the entire system more adaptable.

[0122] There are many common normalization processing methods. After comparison, in this embodiment, Z-score normalization is finally selected to perform normalization processing on the data in the buffer area.

[0123] This is because Z-score standardization has the characteristic of unifying different sensor data to the same scale, which can process data from different types of sensors well and eliminate the impact of differences in the magnitude of different sensor data, making subsequent processing and analysis more consistent and reliable. The data processed by Z-score standardization can improve the convergence speed and accuracy of decision processing. Especially in the data analysis and decision-making model of electric tricycles, standardized data can improve the accuracy of classification and regression calculations and enhance the stability and generalization ability of the entire system.

[0124] At the same time, by first storing data in the FIFO buffer area and then performing standardized processing, the stability of the data processing process can be ensured, and the impact of sudden data flow fluctuations on the system can be avoided. This design can modularize data storage and processing, simplify the design and maintenance of the entire system, and can flexibly respond to different sensors and data processing requirements. It is easy to expand and upgrade, and improves the flexibility and maintainability of the system.

[0125] Specifically, the Z-score standardization process includes:

[0126] ,

[0127] ,

[0128] ;

[0129] Among them, Z is the output data after standardization, q is the data in the FIFO buffer, μ is the mean of the data in all FIFO buffers, σ is the standard deviation of the data, M is the total number of data set samples in the FIFO buffer, and qi is the data value of the i-th sample in the FIFO buffer.

[0130] The data after Z-score standardization are collected and converted into a normalized data set, wherein the normalized data set is x=[vk,ak,Vk,Ik], wherein vk is the normalized velocity data, ak is the normalized acceleration data, Vk is the normalized voltage data, and Ik is the normalized current data.

[0131] Finally, the normalized data set is processed by the objective function and constraints. By solving the objective function and constraints, the decision function f(x)=w·x+b is obtained, and the result is calculated by the decision function.

[0132] Specifically, the objective function is, , used to classify the normalized data.

[0133] In the formula,w is the normal vector of the hyperplane; ∥ w ∥ 2 is the weight vector w The square of the L2 norm (L2 norm) indicates the size of the weight. Minimizing this term helps find a simple model and prevent overfitting. ξi It is a slack variable used to deal with inseparable situations. This item allows some samples to be misclassified, making the entire model more flexible.

[0134] ξi is a slack variable, which indicates the allowed misclassification; C is a penalty parameter (also a regularization parameter) used to balance the complexity of the model (by minimizing ∥ w ∥ 2 ) and the penalty for misclassification (by minimizing ), the larger C Larger values ​​focus the model more on classification accuracy, while smaller values ​​focus the model more on simplification.

[0135] is the penalty parameter, thus balancing the weight of margin maximization and misclassification. is the sum of all slack variables, which is used to indicate the number of errors allowed by the model in classification. min mark: indicates that a minimization optimization problem is being performed, and the goal is to find the expression that minimizes this expression. w and ξi . N is the classified data set.

[0136] The constraints are, , ξi ≥ 0, i = 1. The constraint condition is used to filter out abnormal data or noise data, thereby improving the accuracy of automatic switching control.

[0137] When the sample xi When correctly classified, yi ( w ⋅ xi + b ) should be greater than or equal to 1. xi When misclassified, the slack variable ξi The right side is allowed to be less than 1, thus providing a fault tolerance mechanism. ξi ≥ 0: The slack variable must be non-negative, which means that the classifier cannot arbitrarily misclassify examples.

[0138] In the formula, yi For the i The label of a sample, usually with a value of +1 or -1, indicating the category of the sample; is the weight vector w With the sample feature vector xi The dot product of is used to represent the samplexi Projection onto the decision boundary; b is The bias term is used to adjust the position of the decision boundary. By solving the objective function and the constraints, the decision function f(x)=w·x+b is obtained, and the decision result is obtained by calculating the decision function.

[0139] By solving the objective function and constraints, the decision function f(x)=w·x+b is obtained, and the result is obtained by calculating the decision function.

[0140] It should be noted that

[0141] The purpose of setting the objective function is to classify the normalized data. Through the good generalization ability of the objective function, it can achieve fast calculation and maintain high classification accuracy in new sensor data (that is, when the vehicle is driving in a new environment or condition), ensuring that the system continues to operate effectively. It can reduce the dependence on all data points, thereby reducing the complexity of data processing. This is especially beneficial for systems with limited resources, allowing the system to operate efficiently. And as sensor data continues to increase or change, only a small number of support vectors need to be updated to adapt to new data, which ensures the long-term stability and maintainability of the classifier. It enables the electric tricycle to respond to different driving conditions more accurately and quickly, thereby optimizing the overall driving experience and system performance.

[0142] The purpose of setting the constraint conditions in this embodiment is to improve the accuracy of automatic switching control, ensure the effect of MCU in performing logical judgment, and filter out abnormal data or noise data. By classifying the sensor data and setting the constraint conditions, the complex processing logic can be decomposed into several simple processing steps, which can effectively reduce the complexity of data processing and improve the response speed of the system. At the same time, the constraint conditions can improve the safety of the system to a certain extent. For example, for the data of the current and voltage sensors, a minimum current / voltage threshold can be set. When the power is lower than this threshold, the safety mode will be automatically triggered, the vehicle speed will be reduced or other safety measures will be taken to avoid sudden dangers caused by battery exhaustion. In summary, in the sensor data processing process of the electric tricycle, setting appropriate constraint conditions is important for improving the accuracy of data classification, filtering abnormal data, simplifying data processing logic, improving system response speed and ensuring system safety. Through reasonable constraint conditions, the validity and reliability of sensor data can be ensured, thereby improving the overall performance and safety of the electric tricycle system.

[0143] After the FPGA completes data processing, it sends the processed data to the MCU chip through the SPI bus. The MCU receives the data processed by the data processing module, identifies the current driving mode, and sends instructions to the motor control module based on the identification results to automatically switch the tricycle control logic.

[0144] Specifically, the control logic of the tricycle can be:

[0145] When a>athreshold and v>vmin, the motor control module regulates the motor to acceleration mode.

[0146] When |a|≤ When v>vmin, the motor control module controls the motor to a constant speed mode.

[0147] When a<-athreshold and v>vmin, the motor control module controls the motor to deceleration mode.

[0148] When v≤vmin, the motor control module controls the motor to the parking mode.

[0149] Among them, a is acceleration, athreshold is the acceleration threshold, v is speed, and vmin is the minimum speed. is a fixed constant used to determine whether the acceleration is close to zero.

[0150] In summary, in this embodiment, the data processing task is assigned to the FPGA, the logic processing task is assigned to the MCU, and the entire switching control is completed through the collaboration of the two. By having the FPGA and MCU handle different tasks respectively, the entire system has good modular characteristics, which is convenient for the design, maintenance and upgrade of the system. At the same time, the task allocation of the FPGA and MCU can be flexibly adjusted according to needs, thereby improving the flexibility of the system. By adopting the solution in this embodiment, the mode control of the electric tricycle can be achieved at a low cost, and it has high system flexibility and accuracy.

[0151] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A multi-mode automatic switching control system for an electric tricycle, characterized in that: The control system comprises: Detection module, data processing module and logic control module, wherein: The detection module is composed of sensors arranged on the electric tricycle, which is used to collect real-time status data of the vehicle and send the collected data to the data processing module; The data processing module is connected to the sensor module and is configured to identify the current driving mode according to the real-time status data and send the processing result to the logic control module; The logic control module is connected to the data processing module and is configured such that the logic control module receives the data processed by the data processing module, identifies the current driving mode, and automatically switches the tricycle control logic according to the identification result.

2. The electric tricycle multi-mode automatic switching control system according to claim 1, characterized in that: The control system further includes a motor control module, the motor control module being connected to the logic control module and configured to adjust the power output and speed of the hub motor according to different tricycle control logics; When a>athreshold and v>v min When the motor control module adjusts the motor to the acceleration mode; When |a|≤ and v> v min When the motor speed is 0, the motor control module adjusts the motor to a uniform speed mode; When a<-athreshold and v>v min When the motor control module adjusts the motor to the deceleration mode; When v≤v min When the motor is in parking mode, the motor control module adjusts the motor to parking mode; Where a is acceleration, athreshold is the acceleration threshold, v is the velocity, and v min is the minimum value of speed, is a fixed constant used to determine whether the acceleration is close to zero.

3. The multi-mode automatic switching control system for an electric tricycle according to claim 1, characterized in that: The data processing module includes a data cache submodule, a data collection submodule and a decision submodule, wherein: The data cache submodule is configured to receive the real-time status data of the vehicle collected by the sensor module, and store the real-time status data of the vehicle into the FIFO cache area after classification, and normalize the data in the FIFO cache area; The data collection submodule is connected to the data cache submodule and is configured to collect the normalized data and convert it into a normalized data set. The normalized data set is x=[v k ,a k ,V k ,I k ], where v k is the normalized speed data, a k is the normalized acceleration data, V k is the voltage data after normalization, I k is the current data after normalization; The decision submodule is connected to the data set submodule and is configured to process the normalized data set through the objective function and constraint conditions, wherein: The objective function is, , used to classify the normalized data; in, w is the normal vector of the hyperplane; is the weight vector, w The square of the L2 norm is used to indicate the size of the weight to prevent overfitting; ξ i is a slack variable, indicating the allowed misclassification; C is a penalty parameter, balancing the interval maximization and the weight of misclassification; N is the classified data set; The constraints are, , ξ i ≥0, i=1, Used to filter out abnormal data or noise data to improve the accuracy of automatic switching control; in, yi For the i The label of a sample, with a value of +1 or -1, indicates the category of the sample; is the weight vector w With the sample feature vector xi The dot product of is used to represent the sample xi Projection onto the decision boundary; b is The bias term is used to adjust the position of the decision boundary; By solving the objective function and constraints, the decision function f(x)=w·x+b is obtained, and the decision result is obtained by calculating the decision function.

4. The multi-mode automatic switching control system for an electric tricycle according to claim 1, characterized in that: The sensors in the detection module include a speed sensor, a current sensor, a voltage sensor and an acceleration sensor, and the sensors and the data processing module are connected using an SPI bus.

5. A multi-mode automatic switching control method for an electric tricycle, characterized in that: The control method comprises: S100, the sensor collects real-time status data of the vehicle and sends it to the data processing module for processing; S200, the data processing module identifies the current driving mode according to the real-time status data, and sends the processing result to the logic control module; S300, the logic control module identifies the current driving mode according to the processing result of the data processing module, identifies the current driving mode, and automatically switches the control logic of the tricycle according to the identification result.

6. The multi-mode automatic switching control method for an electric tricycle according to claim 5, characterized in that: The sensors include a speed sensor, a current sensor, a voltage sensor and an acceleration sensor.

7. The multi-mode automatic switching control method for an electric tricycle according to claim 5, characterized in that: The data processing module adopts FPAG chip, the logic control module adopts MCU chip, and the sensor and the data processing module are connected by SPI bus.

8. The multi-mode automatic switching control method for an electric tricycle according to claim 5, characterized in that: The step S200 further includes the following sub-steps: S210, classifying the real-time status data of the vehicle and storing it in a FIFO buffer area, and normalizing the data in the buffer area; S220, the normalized data are collected and converted into a normalized data set, where the normalized data set is x=[v k ,a k ,V k ,I k ], where v k is the normalized speed data, a k is the normalized acceleration data, V k is the voltage data after normalization, I k is the current data after normalization; S230, processing the normalized data set through the objective function and constraint conditions, wherein: The objective function is, , used to classify the normalized data; in, w is the normal vector of the hyperplane; is the weight vector, w The square of the L2 norm is used to indicate the size of the weight to prevent overfitting; ξ i is a slack variable, indicating the allowable misclassification; C is a penalty parameter, balancing the interval maximization and the weight of misclassification; N is the classified data set; The constraints are, , ξ i ≥0, i=1, Used to filter out abnormal data or noise data to improve the accuracy of automatic switching control; in, yi For the i The label of a sample, usually with a value of +1 or -1, indicating the category of the sample; is the weight vector w With the sample feature vector xi The dot product of is used to represent the sample xi Projection onto the decision boundary; b is The bias term is used to adjust the position of the decision boundary; By solving the objective function and constraints, the decision function f(x)=w·x+b is obtained, and the decision result is obtained by calculating the decision function.

9. The multi-mode automatic switching control method for an electric tricycle according to claim 8, characterized in that: The normalization process includes: using Z-score normalization to normalize the data in the buffer area, and the Z-score normalization process includes: , , ; Where Z is the output data after standardization, q is the data in the FIFO buffer, μ is the mean of the data in all FIFO buffers, σ is the standard deviation of the data, M is the total number of data set samples in the FIFO buffer, and q is the i is the data value of the i-th sample in the FIFO buffer.

10. The multi-mode automatic switching control method for an electric tricycle according to claim 5, characterized in that: The automatic switching of the tricycle control logic according to the recognition result includes adjusting the power output and speed of the hub motor through different tricycle control logics; When a>athreshold and v>v min When the motor control module adjusts the motor to the acceleration mode; When |a|≤ and v> v min When the motor speed is 0, the motor control module adjusts the motor to a uniform speed mode; When a<-athreshold and v>v min When the motor control module adjusts the motor to the deceleration mode; When v≤v min When the motor is in parking mode, the motor control module adjusts the motor to parking mode; Where a is acceleration, athreshold is the acceleration threshold, v is the velocity, and v min is the minimum value of speed, is a fixed constant used to determine whether the acceleration is close to zero.

Citation Information

Patent Citations

  • Scooter and motion control method and system of scooter

    CN106080879A

  • Motor control method and device, electronic equipment and storage medium

    CN113135095A

  • Electric automobile, mode switching method and device thereof and storage medium

    CN113954657A

  • Vehicle driving motor control method and system based on rotating speed control mode

    CN117485140A

  • Driving mode switching method and device based on road surface recognition, equipment and medium

    CN118144576A

Cited By

  • Electric scooter remote monitoring method and system based on Internet of Things

    CN119821156A

  • Method and System for Remote Monitoring of Electric Scooters Based on the Internet of Things

    CN119821156B