Feedforward control method, device and electronic equipment for vehicle
By acquiring the vehicle's lane curvature and state, and using a converter model to predict the steering wheel angle, the problem of vehicle stability and safety caused by improper parameter tuning in existing technologies is solved, achieving a more efficient vehicle control effect.
Patent Information
- Application Number
- CN202411369550.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2044-09-27
AI Technical Summary
In existing vehicle feedforward control methods, improper parameter tuning may lead to poor control performance, affecting vehicle stability and safety.
By acquiring the lane curvature, reference trajectory, and vehicle state of the target vehicle, forward propagation is performed using a converter model to predict the target steering wheel angle, and the steering wheel is controlled based on this angle, avoiding the tedious parameter adjustment process.
It improves the stability and safety of vehicle driving, saves additional R&D costs and time caused by parameter tuning, and improves control performance.
Smart Images

Figure CN119142353B_ABST
Abstract
Description
Technical Field
[0001] This application relates to vehicle technology, and more particularly to a feedforward control method, apparatus, electronic device, computer-readable storage medium, and computer program product for a vehicle. Background Technology
[0002] In vehicle lateral control, the controller typically consists of a feedback controller and a feedforward controller. Feedback control measures the vehicle's actual driving parameters (such as yaw rate, acceleration, and vehicle position) and calculates control parameters accordingly to correct the deviation between the actual and desired driving parameters. Feedforward control, on the other hand, is a more forward-looking control strategy that predicts the vehicle's future driving conditions and calculates the corresponding control parameters in advance.
[0003] In the feedforward control schemes provided by related technologies, specific control algorithms such as the Linear-Quadratic Regulator (LQR) algorithm from the vehicle dynamics model are usually used to implement feedforward control. This control algorithm needs to adjust the parameters according to the actual vehicle characteristics and control requirements. If the parameters are not properly adjusted, it may lead to poor control effect and even affect the stability and safety of the vehicle. Summary of the Invention
[0004] This application provides a feedforward control method, device, electronic device, computer-readable storage medium, and computer program product for a vehicle, which can improve the feedforward control effect and thus improve the stability and safety of vehicle driving.
[0005] The technical solution of this application is implemented as follows:
[0006] This application provides a feedforward control method for a vehicle, including:
[0007] During the driving process of the target vehicle, target input data is acquired; wherein, the target input data includes the lane curvature of the lane where the target vehicle is located, the reference trajectory obtained by trajectory planning of the target vehicle, and the vehicle status of the target vehicle;
[0008] The target input data is forward-propagated using a converter model to obtain the target steering wheel angle.
[0009] The steering wheel of the target vehicle is controlled according to the target steering wheel angle.
[0010] This application provides a feedforward control device for a vehicle, comprising:
[0011] The first acquisition module is configured to acquire target input data in a driving process of the target vehicle, wherein the target input data comprises a lane curvature of a lane where the target vehicle is located, a reference trajectory obtained by trajectory planning on the target vehicle, and a vehicle state of the target vehicle.
[0012] The model inference module is configured to perform forward propagation on the target input data through a converter model to obtain a target steering wheel angle.
[0013] The control module is configured to control a steering wheel of the target vehicle according to the target steering wheel angle.
[0014] The present application provides an electronic device, comprising:
[0015] The memory is configured to store executable instructions.
[0016] The processor is configured to execute the executable instructions stored in the memory to implement the feedforward control method of the vehicle provided by the present application.
[0017] The present application provides a computer-readable storage medium storing executable instructions for causing a processor to execute the feedforward control method of the vehicle provided by the present application.
[0018] The present application provides a computer program product comprising executable instructions for causing a processor to execute the feedforward control method of the vehicle provided by the present application.
[0019] The present application has the following beneficial effects:
[0020] The present application acquires target input data in a driving process of the target vehicle, wherein the target input data comprises a lane curvature of a lane where the target vehicle is located, a reference trajectory obtained by trajectory planning on the target vehicle, and a vehicle state of the target vehicle; performs forward propagation on the target input data through a converter model to obtain a target steering wheel angle; and controls a steering wheel of the target vehicle according to the target steering wheel angle. The present application predicts the target steering wheel angle through the converter model, which can save additional research and development costs and time caused by parameter tuning, and also can improve the control effect of controlling according to the target steering wheel angle, thereby improving the stability and safety of vehicle driving. BRIEF DESCRIPTION OF DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0022] Figure 1 is a schematic diagram of an architecture of a feedforward control system of a vehicle provided by an embodiment of the present application;
[0023] Figure 2 is a schematic diagram of a structure of a vehicle-mounted device provided by an embodiment of the present application;
[0024] Figure 3A is a first flowchart of a feedforward control method of a vehicle provided by an embodiment of the present application;
[0025] Figure 3B is a second flowchart of a feedforward control method of a vehicle provided by an embodiment of the present application;
[0026] Figure 3C is a third flowchart of a feedforward control method of a vehicle provided by an embodiment of the present application;
[0027] Figure 3D is a fourth flowchart of a feedforward control method of a vehicle provided by an embodiment of the present application;
[0028] Figure 4 is a flowchart of a model training stage provided by an embodiment of the present application;
[0029] Figure 5 is a flowchart of a model inference stage provided by an embodiment of the present application. DETAILED DESCRIPTION
[0030] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings, and the described embodiments should not be regarded as limiting the present application, and all other embodiments obtained by those of ordinary skill in the art without making creative efforts fall within the scope of protection of the present application.
[0031] In the following description, "some embodiments" are described, which describe a subset of all possible embodiments, but it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict. In the following description, the term "a plurality of" refers to at least two.
[0032] In the following description, the term "first\second\third" is only to distinguish similar objects, and does not represent a specific order of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence as allowed, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0033] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to be limiting of this application.
[0034] Embodiments of the present application provide a feedforward control method and device for a vehicle, an electronic device, a computer readable storage medium and a computer program product, which can improve the feedforward control effect and thus improve the stability and safety of vehicle driving. The following describes an exemplary application of the electronic device provided by the embodiments of the present application. The electronic device provided by the embodiments of the present application can be implemented as a vehicle-mounted device or a server.
[0035] Referring to Figure 1 , Figure 1 FIG. 1 is a schematic diagram of an architecture of a feedforward control system 100 for a vehicle provided by an embodiment of the present application. A vehicle-mounted device 400 is connected to a server 200 through a network 300. The network 300 can be a wide area network or a local area network, or a combination of the two.
[0036] In some embodiments, taking the electronic device as a vehicle-mounted device for example, the feedforward control method for a vehicle provided by the embodiments of the present application can be implemented by the vehicle-mounted device. For example, the vehicle-mounted device 400 obtains target input data in the driving process of a target vehicle, where the target vehicle refers to a vehicle to which the vehicle-mounted device 400 is deployed. The target input data is forward propagated through a converter model to obtain a target steering wheel angle, where the converter model is deployed locally on the vehicle-mounted device 400. The steering wheel of the target vehicle is controlled according to the target steering wheel angle. In the above manner, the vehicle-mounted device 400 implements the whole-process feedforward control locally, without the need to transmit data to a remote server for processing, which can greatly reduce the time and delay of data transmission, thus improving the real-time performance of processing and the response speed. At the same time, it is not limited by network conditions, which is particularly important for scenarios where the network environment is unstable or cannot be connected to the network, such as a scenario where the vehicle drives in a remote mountain area without network.
[0037] In some embodiments, the feedforward control method of the vehicle provided by the embodiments of the present application can be implemented by the vehicle-mounted device and the server. For example, the vehicle-mounted device 400 obtains the target input data in the driving process of the target vehicle, and sends the target input data to the server 200; the server 200 performs forward propagation on the target input data through the converter model to obtain the target steering wheel angle; the server 200 sends the target steering wheel angle to the vehicle-mounted device 400, so that the vehicle-mounted device 400 controls the steering wheel of the target vehicle according to the target steering wheel angle. In the above manner, the server 200 usually has powerful computing capability and storage resources, and can efficiently implement forward propagation; the vehicle-mounted device 400 is mainly responsible for data acquisition, data transmission and control work, and does not need to undertake complex calculation tasks, nor to deploy the converter model, so that the pressure of the vehicle-mounted device 400 locally can be reduced.
[0038] The electronic device provided by the embodiments of the present application is taken as an example to illustrate. Referring to Figure 2 , Figure 2 FIG. 4 is a structural schematic diagram of the vehicle-mounted device 400 provided by the embodiments of the present application, Figure 2 The vehicle-mounted device 400 shown in FIG. 4 includes at least one processor 410, a memory 450, at least one network interface 420 and a user interface 430. The various components in the vehicle-mounted device 400 are coupled together by a bus system 440. It can be understood that the bus system 440 is used to realize the connection and communication between the components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus and a status signal bus. However, in order to clearly illustrate, all kinds of buses are marked as the bus system 440 in the Figure 2
[0039] The processor 410 can be an integrated circuit chip with signal processing capability, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, etc., wherein the general-purpose processor can be a microprocessor or any conventional processor.
[0040] The user interface 430 includes one or more output devices 431 that enable presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as microphones, touch screens, cameras, other input buttons and controls.
[0041] The memory 450 can be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard drives, optical disc drives, etc. The memory 450 optionally includes one or more storage devices remotely located from the processor(s) 410.
[0042] The memory 450 includes volatile memory or nonvolatile memory, and can also include both volatile and nonvolatile memory. Nonvolatile memory can be read only memory (ROM), volatile memory can be random access memory (RAM). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.
[0043] In some embodiments, the memory 450 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or a subset or superset thereof, which are described below.
[0044] The operating system 451 includes system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;
[0045] The network communication module 452 is used to communicate with other electronic devices via one or more (wired or wireless) network interfaces 420, examples of which include Bluetooth, wireless compatibility certification (WiFi), and universal serial bus (USB), etc.
[0046] The presentation module 453 is used to enable the presentation of information via one or more output devices 431 associated with the user interface 430 (e.g., display screen, speaker, etc.), such as a user interface for operating peripheral devices and displaying content and information.
[0047] The input processing module 454 is used to detect and interpret one or more user inputs or interactions from one or more input devices 432.
[0048] In some embodiments, the feedforward control device of the vehicle provided by the embodiments of the present application can be implemented in a software manner, Figure 2A feedforward control device 455 of the vehicle stored in the memory 450 is shown, which can be software in the form of programs and plug-ins, etc., including the following software modules: a first acquisition module 4551, a model inference module 4552, and a control module 4553, which are logical, so any combination or further splitting can be made according to the implemented functions. The functions of the respective modules will be described below.
[0049] The exemplary application and implementation of the electronic device provided by the embodiments of the present application will be described in conjunction with the feedforward control method of the vehicle provided by the embodiments of the present application.
[0050] Referring to Figure 3A , Figure 3A is a flowchart of the feedforward control method of the vehicle provided by the embodiments of the present application, which will be described in conjunction with the steps shown in Figure 3A .
[0051] In step 101, target input data is acquired in the driving process of the target vehicle; wherein the target input data includes lane curvature of a lane where the target vehicle is located, a reference trajectory obtained by trajectory planning for the target vehicle, and a vehicle state of the target vehicle.
[0052] For example, in the driving process of the target vehicle, the current target input data is acquired, which includes the lane curvature of the lane where the target vehicle is located, the reference trajectory obtained by trajectory planning for the target vehicle, and the vehicle state of the target vehicle.
[0053] It is worth noting that the embodiments of the present application do not limit the way of obtaining the lane curvature of the lane where the target vehicle is located. For example, the position information of the target vehicle can be obtained by positioning processing of the target vehicle, and the lane curvature of the lane where the target vehicle is located can be determined in the electronic map according to the position information of the target vehicle, wherein the geometric shape information of a plurality of lanes is recorded in the electronic map, and the lane curvature of each lane can be calculated accordingly; or the road image can be collected by the vehicle-mounted camera of the target vehicle, and the lane can be extracted from the road image by using image processing technology, and then the lane curvature of the extracted lane can be calculated.
[0054] It is worth noting that the reference trajectory refers to the trajectory (or path) that the target vehicle is expected to travel, and the planning algorithm used for trajectory planning is not limited in the embodiments of the present application.
[0055] It is worth noting that the vehicle state of the target vehicle is used to describe the driving situation of the target vehicle, for example, the vehicle state of the target vehicle can include at least one of the position information, the speed, and the heading of the target vehicle.
[0056] In step 102, the target input data is forward propagated by a converter model to obtain a target steering wheel angle.
[0057] Here, the target input data is used as the input to the converter model. That is, the target input data is propagated forward through the converter model to obtain the target steering wheel angle.
[0058] The converter model, or Transformer model, has significant advantages in processing sequential data and feature fusion. Therefore, using it in this application embodiment can output a more accurate target steering wheel angle and adapt to different vehicles and working conditions, avoiding the additional R&D costs and time caused by parameter tuning for different vehicles and working conditions.
[0059] In step 103, the steering wheel of the target vehicle is controlled according to the target steering wheel angle.
[0060] Here, the target steering wheel angle is used as the control parameter required for feedforward control. That is, the steering wheel of the target vehicle is controlled according to the target steering wheel angle, so as to achieve stable and safe lateral control for the target vehicle.
[0061] In some embodiments, steps 101 to 103 described above can be performed periodically during the driving of the target vehicle, thereby ensuring the continuity and availability of feedforward control.
[0062] like Figure 3A As shown, this embodiment of the application acquires target input data during the driving process of the target vehicle. The target input data includes the lane curvature of the lane where the target vehicle is located, a reference trajectory obtained by trajectory planning of the target vehicle, and the vehicle state of the target vehicle. The target input data is forward-propagated through a converter model to obtain the target steering wheel angle. The steering wheel of the target vehicle is then controlled based on the target steering wheel angle. This embodiment of the application predicts the target steering wheel angle using a converter model, which saves the additional R&D costs and time incurred due to parameter tuning. It also improves the control effect based on the target steering wheel angle, thereby enhancing the stability and safety of vehicle driving.
[0063] In some embodiments, see Figure 3B , Figure 3B This is a flowchart illustrating a vehicle feedforward control method provided in an embodiment of this application, based on... Figure 3A Before step 102 ( Figure 3B (Taking step 101 as an example), steps 201 to 202 can also be executed.
[0064] In step 201, a plurality of sample input data is acquired, and sample steering wheel angles corresponding to the plurality of sample input data respectively are determined; each sample input data includes a lane curvature of a lane where a sample vehicle is located, a reference trajectory obtained by trajectory planning on the sample vehicle, and a vehicle state of the sample vehicle.
[0065] Step 102 describes a model inference stage of the converter model. Before the model inference stage, the converter model can be trained in a model training stage, i.e., learning the mapping relationship between the input and the output.
[0066] In the model training stage, a plurality of sample input data is first acquired, and sample steering wheel angles corresponding to the plurality of sample input data respectively are determined (for use as labels). The sample input data is similar in data format to the target input data, i.e., the sample input data includes a lane curvature of a lane where a sample vehicle is located, a reference trajectory obtained by trajectory planning on the sample vehicle, and a vehicle state of the sample vehicle. It is worth noting that the plurality of sample input data can be acquired in the driving process of the same sample vehicle, or the sample input data can be acquired respectively in the driving process of different sample vehicles (the number of sample input data acquired in the driving process of each sample vehicle can be one or more), and no limitation is made thereto.
[0067] In some embodiments, the sample vehicle and the target vehicle can be the same vehicle, or can be different vehicles, and no limitation is made thereto.
[0068] In some embodiments, the determination of the sample steering wheel angles corresponding to the plurality of sample input data can be achieved in the following manner: for any sample input data, any one of the following processing is performed: an actual steering wheel angle at a time corresponding to the sample input data is acquired as the sample steering wheel angle corresponding to the sample input data; a minimum steering wheel angle for passing through the lane is calculated according to the lane curvature in the sample input data as the sample steering wheel angle corresponding to the sample input data.
[0069] Here, taking any sample input data in the plurality of sample input data as an example, two ways of determining the sample steering wheel angle are described:
[0070] 1) An actual steering wheel angle at a time corresponding to the sample input data is acquired as the sample steering wheel angle corresponding to the sample input data. The actual steering wheel angle refers to a steering wheel angle formed by manual control of the sample vehicle by the driver. The sample steering wheel angle obtained by this way is more reasonable and accurate, i.e., it can accurately reflect the driving habits of the driver, and is helpful to improve the model training effect.
[0071] 2) According to the lane curvature in the sample input data, the minimum steering wheel angle for passing through the lane (i.e., safely passing through the lane) is calculated as the sample steering wheel angle corresponding to the sample input data. This way, the minimum steering wheel angle is calculated theoretically, without the need to obtain the actual steering wheel angle at additional cost, thereby reducing the implementation cost.
[0072] In some embodiments, after obtaining the plurality of sample input data and determining the sample steering wheel angles corresponding to the plurality of sample input data respectively, the feedforward control method of the vehicle further comprises: performing data cleaning on the plurality of sample input data and the sample steering wheel angles corresponding to the plurality of sample input data respectively.
[0073] Here, the data cleaning on the plurality of sample input data and the sample steering wheel angles corresponding to the plurality of sample input data respectively can include at least one of the following processes: processing missing values (e.g., deleting missing values or estimating missing values by statistical methods such as interpolation), deleting duplicates, processing outliers (e.g., deleting outliers), and data normalization. Through data cleaning, errors, inconsistencies, and noise in the data can be removed or corrected, reducing bias and errors in the data, thereby improving the accuracy and reliability of the data and helping to reduce the model training time while improving the model training effect.
[0074] In step 202, the converter model is trained according to the training set; wherein the training set includes a first sample input data in the plurality of sample input data and a sample steering wheel angle corresponding to the first sample input data.
[0075] Here, the converter model is trained according to the training set, i.e., the model parameters of the converter model are updated, wherein the training set includes a first sample input data in the plurality of sample input data and a sample steering wheel angle corresponding to the first sample input data, and the first sample input data refers to at least part of the plurality of sample input data.
[0076] In some embodiments, the above-mentioned training of the converter model according to the training set can be implemented in the following way: the first sample input data is forward propagated through the converter model to obtain a steering wheel angle to be compared; a loss value is calculated according to the steering wheel angle to be compared and the sample steering wheel angle corresponding to the first sample input data; and the loss value is back propagated in the converter model to update the model parameters of the converter model.
[0077] Here, the model training process is exemplarily illustrated. First, the first sample input data is forward propagated through the converter model to obtain a steering wheel angle (for the sake of distinction, the steering wheel angle here is referred to as a steering wheel angle to be compared); then, a loss value is calculated according to the steering wheel angle to be compared and a sample steering wheel angle corresponding to the first sample input data, where the type of the loss function is not limited, for example, it can be a cross-entropy loss function; finally, the loss value is back propagated in the converter model to update the model parameters of the converter model. In the above manner, the relationship between the first sample input data and the sample steering wheel angle corresponding to the first sample input data is learned through back propagation, and effective training of the converter model is achieved.
[0078] In Figure 3B , Figure 3A The step 102 shown can be updated to step 203. In step 203, the target input data is forward propagated through the trained converter model to obtain a target steering wheel angle.
[0079] After the model training phase is completed, the model inference phase is entered, that is, the target input data is forward propagated through the trained converter model to obtain a target steering wheel angle. Since the relationship between the input data and the steering wheel angle has been sufficiently learned in the model training phase, the accuracy of the target steering wheel angle output in the model inference phase can be improved.
[0080] As Figure 3B shown, the embodiments of the present application can make the converter model sufficiently learn the relationship between the input data and the steering wheel angle in the model training process by constructing a training set and training the converter model according to the training set, so that the trained converter model can predict a suitable target steering wheel angle according to the target input data.
[0081] In some embodiments, referring to Figure 3C , Figure 3C is a flowchart of a feedforward control method of a vehicle provided by the embodiments of the present application, based on Figure 3B , after step 202, step 301 can also be performed. In step 301, the trained converter model is model evaluated according to a verification set, and whether the trained converter model needs to be continuously model trained is determined according to the model evaluation result; where the verification set includes a second sample input data in the plurality of sample input data and a sample steering wheel angle corresponding to the second sample input data.
[0082] In addition to constructing the training set, a validation set can also be constructed in the embodiments of the present application, where the validation set includes second sample input data in the plurality of sample input data and sample steering wheel angles corresponding to the second sample input data. It is worth noting that the second sample input data in the validation set is different from the first sample input data in the training set, that is, the training set and the validation set respectively include different data, which can help the converter model to learn the general rule of the data, rather than just remember the specific samples in the training set, which helps to improve the generalization ability of the converter model and makes it better to process new and unknown data.
[0083] After model training of the converter model according to the training set, the trained converter model is model evaluated according to the validation set, and whether the trained converter model needs to continue model training is determined according to the model evaluation result. If the trained converter model needs to continue model training, return to step 202; if the trained converter model does not need to continue model training, execute step 203.
[0084] It is worth noting that the model evaluation result here reflects the model performance of the trained converter model on the validation set, for example, the model evaluation result can be a loss value, or performance indicators such as accuracy, recall rate, and F1 score. When the model evaluation result reaches a stable state (for example, the fluctuation rate between the model evaluation results of the last N training rounds is less than a fluctuation rate threshold) or an expected level (for example, greater than or less than a preset threshold), it is proved that the trained converter model has reached the best performance, at which point the training can be stopped (i.e., the trained converter model does not need to continue model training), thereby avoiding overfitting.
[0085] In some embodiments, the validation set can be used to select the optimal hyperparameters, such as learning rate, batch size, etc. For example, a plurality of converter models can be prepared in advance, and the plurality of converter models respectively adopt different hyperparameters. Then, the plurality of converter models are respectively model trained according to the training set, the plurality of trained converter models are respectively model evaluated according to the validation set, and the converter model with the best model performance is selected according to the model evaluation results of the plurality of trained converter models respectively, and the hyperparameters adopted by the converter model with the best model performance are determined as the optimal hyperparameters. In this way, only the converter model with the optimal hyperparameters can be considered in the model training stage, which helps to further improve the model training effect. Similarly to selecting the optimal hyperparameters, the validation set can also be used to select the optimal model structure.
[0086] As Figure 3CAs shown, after the model training of the converter model according to the training set, the application embodiment judges whether the trained converter model needs to continue the model training according to the model evaluation result. The application embodiment verifies whether the trained converter model reaches the best performance according to the validation set, and stops the training when the trained converter model reaches the best performance, which can effectively avoid underfitting and overfitting.
[0087] In some embodiments, referring to Figure 3D , Figure 3D is a flowchart of a feedforward control method of a vehicle provided by the application embodiment, Figure 3B The step 202 shown can be updated to step 401, in which the plurality of converter models are respectively subjected to model training according to the training set; wherein the training set includes the first sample input data in the plurality of sample input data, and the sample steering wheel angle corresponding to the first sample input data.
[0088] Here, a plurality of converter models are prepared in advance, and the plurality of converter models respectively adopt different hyperparameters and / or respectively adopt different model structures. Then, the plurality of converter models are respectively subjected to model training according to the training set.
[0089] In Figure 3D , step 401 can be followed by step 402. In step 402, the trained plurality of converter models are respectively subjected to model evaluation according to the test set, and the trained plurality of converter models are subjected to screening processing according to the model evaluation results respectively corresponding to the trained plurality of converter models, to obtain the converter model used for forward propagation of the target input data; wherein the test set includes the third sample input data in the plurality of sample input data, and the sample steering wheel angle corresponding to the third sample input data.
[0090] In addition to constructing the training set, the test set can also be constructed in the application embodiment, wherein the test set includes the third sample input data in the plurality of sample input data, and the sample steering wheel angle corresponding to the third sample input data. It is worth noting that the third sample input data in the test set is different from the first sample input data in the training set, that is, the test set and the training set respectively include different data, which can accurately test the model performance of the trained converter model on unknown data.
[0091] On the basis of having constructed the test set, the trained plurality of converter models are respectively subjected to model evaluation according to the test set, and the trained plurality of converter models are respectively subjected to screening processing according to the respective model evaluation results of the trained plurality of converter models, that is, the converter model with the optimal model performance is screened out to serve as the converter model used for forward propagation of the target input data (that is, the converter model used for performing step 203).
[0092] In some embodiments, the training set, the validation set and the test set can also be used in combination. For example, the plurality of converter models are respectively subjected to model training according to the training set; the trained each converter model is subjected to model evaluation according to the validation set, and whether the trained each converter model needs to continue to be subjected to model training is determined according to the respective model evaluation results of the trained each converter model; the trained plurality of converter models are respectively subjected to model evaluation according to the test set, and the trained plurality of converter models are subjected to screening processing according to the respective model evaluation results of the trained plurality of converter models, to obtain the converter model used for forward propagation of the target input data.
[0093] In some embodiments, the test set can also be used to evaluate whether the trained converter model meets the requirements. For example, the trained converter model is subjected to model evaluation according to the test set, and when the model evaluation result reaches the expected level, it is determined that the trained converter model meets the requirements and can be used in the model inference stage.
[0094] As shown in Figure 3D , the embodiments of the present application respectively subject the plurality of converter models to model training according to the training set, respectively subject the trained plurality of converter models to model evaluation according to the test set, and respectively subject the trained plurality of converter models to screening processing according to the respective model evaluation results of the trained plurality of converter models, to obtain the converter model used for forward propagation of the target input data. In this way, the model performance of the trained converter model on unknown data is accurately tested by the test set, and then the converter model with the optimal model performance is screened out to be used in the model inference stage.
[0095] In the following, an exemplary application of the embodiments of the present application in an actual application scenario will be described. The embodiments of the present application include two stages of model training stage and model inference stage, and first the model training stage will be described. As shown in Figure 4 , the model training stage can include the following steps:
[0096] 1) Data preparation. The collected data should have high integrity, accuracy and representativeness, and be able to fully reflect the dynamic characteristics and control requirements of the vehicle. In the embodiment of the present application, two types of data are collected: actual input data (corresponding to the sample input data described above) and actual control data, wherein the actual input data includes lane curvature, reference trajectory and vehicle state, and the actual control data includes steering wheel angle. After data cleaning (including deleting outliers, data normalization, etc.) of the collected data set, the data set is divided into training set, validation set and test set according to a certain proportion, for example, the training set accounts for 70%, the validation set accounts for 15%, and the test set accounts for 15%.
[0097] 2) Define loss function. Ensure that the loss function can accurately measure the difference between the output data of the Transformer model and the actual control data.
[0098] 3) Set optimizer. The selection of the optimizer, the setting of the learning rate, the momentum and other hyperparameters should be adjusted according to the characteristics of the model and the training data, in order to speed up the training process and avoid overfitting.
[0099] 4) Train the model. Train the Transformer model according to the training set, for example, calculate the loss value by forward propagation, and then update the model parameters by back propagation. After model training, evaluate the trained Transformer model according to the validation set, so as to timely discover and solve the problems of overfitting or underfitting.
[0100] 5) Evaluate the model: the selection of evaluation indicators (i.e. model evaluation results) should be determined according to the task requirements, which can fully and objectively reflect the performance of the Transformer model on unseen data. For example, the evaluation indicators can be accuracy, recall rate, F1 score, etc.
[0101] 6) Adjust the model: when adjusting the model according to the model evaluation results, certain strategies should be followed, which can first try simple adjustments (such as increasing the number of training rounds, adjusting the learning rate), and then consider more complex adjustments (such as changing the model structure, adding regularization terms, etc.).
[0102] After the model training phase is completed, the model inference phase can be entered. As shown in Figure 5 , the trained Transformer model can be integrated into the actual vehicle control system (i.e. application deployment) to perform forward propagation on the obtained target input data to obtain the target steering wheel angle, thereby realizing feedforward control.
[0103] The embodiments of the present application do not depend on a specific control algorithm in the vehicle dynamics model, do not require a tedious parameter tuning process, can capture the long-term mapping relationship between the input and the output by using the powerful sequence modeling capability of the Transformer model, and learn the inherent rules and characteristics of the system through a large amount of data training, so that it can have higher accuracy when processing complex and dynamic systems.
[0104] The following continues to illustrate an exemplary structure of the vehicle feedforward control device 455 implemented as a software module provided by the embodiments of the present application. In some embodiments, as shown in Figure 2 The software module stored in the vehicle feedforward control device 455 of the memory 450 can include: a first acquisition module 4551 configured to acquire target input data during driving of a target vehicle; wherein the target input data includes a lane curvature of a lane where the target vehicle is located, a reference trajectory obtained by trajectory planning on the target vehicle, and a vehicle state of the target vehicle; a model inference module 4552 configured to perform forward propagation on the target input data by a transformer model to obtain a target steering wheel angle; and a control module 4553 configured to control a steering wheel of the target vehicle according to the target steering wheel angle.
[0105] In some embodiments, the vehicle feedforward control device 455 further includes a second acquisition module configured to: acquire a plurality of sample input data, and determine a sample steering wheel angle corresponding to each of the plurality of sample input data; wherein each sample input data includes a lane curvature of a lane where a sample vehicle is located, a reference trajectory obtained by trajectory planning on the sample vehicle, and a vehicle state of the sample vehicle; and the vehicle feedforward control device 455 further includes a model training module configured to: perform model training on the transformer model according to a training set; wherein the training set includes a first sample input data in the plurality of sample input data, and a sample steering wheel angle corresponding to the first sample input data.
[0106] In some embodiments, the second acquisition module is further configured to: for any sample input data, perform any one of the following processing: acquire an actual steering wheel angle at a time corresponding to the any sample input data as the sample steering wheel angle corresponding to the any sample input data; and calculate a minimum steering wheel angle through the lane according to the lane curvature in the any sample input data as the sample steering wheel angle corresponding to the any sample input data.
[0107] In some embodiments, the model training module is further configured to: perform forward propagation on the first sample input data by the transformer model to obtain a steering wheel angle to be compared; calculate a loss value according to the steering wheel angle to be compared and the sample steering wheel angle corresponding to the first sample input data; and perform back propagation on the loss value in the transformer model to update model parameters of the transformer model.
[0108] In some embodiments, the model training module is further configured to perform model evaluation on the trained converter model according to a verification set, and determine whether the trained converter model needs to be further trained according to a model evaluation result; the verification set includes second sample input data in the plurality of sample input data and a sample steering wheel angle corresponding to the second sample input data.
[0109] In some embodiments, the number of converter models includes a plurality; the model training module is further configured to perform model training on the plurality of converter models respectively according to the training set; perform model evaluation on the plurality of trained converter models respectively according to a test set, and perform screening processing on the plurality of trained converter models according to the model evaluation results corresponding to the plurality of trained converter models respectively, to obtain a converter model used for forward propagation of the target input data; the test set includes third sample input data in the plurality of sample input data and a sample steering wheel angle corresponding to the third sample input data.
[0110] In some embodiments, the second obtaining module is further configured to perform data cleaning on the plurality of sample input data and the sample steering wheel angles corresponding to the plurality of sample input data respectively.
[0111] Embodiments of the present application provide a computer program product or a computer program, which includes executable instructions stored in a computer readable storage medium. A processor of an electronic device reads the executable instructions from the computer readable storage medium, and the processor executes the executable instructions, so that the electronic device implements the vehicle feedforward control method provided in the embodiments of the present application.
[0112] Embodiments of the present application provide a computer readable storage medium storing executable instructions, wherein the executable instructions, when executed by a processor, cause the processor to implement the vehicle feedforward control method provided in the embodiments of the present application.
[0113] In some embodiments, the computer readable storage medium can be FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disc, or CD-ROM, etc. memory; or can be various devices including one or any combination of the above memories.
[0114] In some embodiments, the executable instructions can be in the form of programs, software, software modules, scripts or codes, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and can be deployed in any form, including being deployed as independent programs or being deployed as modules, components, subroutines or other units suitable for use in a computing environment.
[0115] By way of example, executable instructions can correspond to a file in a file system, but are not necessarily limited thereto. The executable instructions can be stored in a portion of a file that holds other programs or data, for example, one or more scripts stored in a markup language, e.g., Hypertext Markup Language (HTML), documents, in a single file dedicated to the program in question, or in multiple coordinated files, e.g., files that store one or more modules, subprograms, or code portions.
[0116] By way of example, the executable instructions can be deployed to be executed on one electronic device, or on multiple electronic devices that are located at one site, or that are distributed across multiple sites and that are interconnected by a communication network.
[0117] The above merely provides an example of the embodiments of the present application, but is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, and improvement made within the spirit and scope of the present application shall be included in the protection scope of the present application.
Claims
1. A feedforward control method of a vehicle, characterized by, The method comprises the following steps: acquiring target input data during driving of a target vehicle; wherein the target input data comprises lane curvature of a lane where the target vehicle is located, a reference trajectory obtained by trajectory planning of the target vehicle, and vehicle state of the target vehicle; acquiring a plurality of sample input data and determining sample steering wheel angles corresponding to the plurality of sample input data; for any sample input data, performing any one of the following processes: acquiring an actual steering wheel angle at a time corresponding to the any sample input data as a sample steering wheel angle corresponding to the any sample input data; calculating a minimum steering wheel angle through a lane according to lane curvature in the any sample input data as a sample steering wheel angle corresponding to the any sample input data, wherein each sample input data comprises lane curvature of a lane where a sample vehicle is located, a reference trajectory obtained by trajectory planning of the sample vehicle, and vehicle state of the sample vehicle; model training of a converter model according to a training set; wherein the training set comprises first sample input data in the plurality of sample input data and a sample steering wheel angle corresponding to the first sample input data; forward propagation of the target input data through the converter model to obtain a target steering wheel angle; control of a steering wheel of the target vehicle according to the target steering wheel angle.
2. The method of claim 1, wherein, The model training of the converter model according to the training set comprises: forward propagation of the first sample input data through the converter model to obtain a steering wheel angle to be compared; calculation of a loss value according to the steering wheel angle to be compared and the sample steering wheel angle corresponding to the first sample input data; backward propagation of the loss value in the converter model to update model parameters of the converter model.
3. The method of claim 1, wherein, After the model training of the converter model according to the training set, the method further comprises: model evaluation of the trained converter model according to a verification set, and judgment of whether the trained converter model needs to be continuously model trained according to a model evaluation result; wherein the verification set comprises second sample input data in the plurality of sample input data and a sample steering wheel angle corresponding to the second sample input data.
4. The method of claim 1, wherein, The number of converter models comprises a plurality; the model training of the converter model according to the training set comprises: model training of a plurality of converter models according to a training set, respectively; The method further comprises: model evaluation of the trained plurality of converter models according to a test set, respectively, and screening processing of the trained plurality of converter models according to model evaluation results corresponding to the trained plurality of converter models, respectively, to obtain a converter model used for forward propagation of the target input data; wherein the test set comprises third sample input data in the plurality of sample input data and a sample steering wheel angle corresponding to the third sample input data.
5. The method of claim 1, wherein, After the acquiring the plurality of sample input data and determining the sample steering wheel angles corresponding to the plurality of sample input data respectively, the method further comprises: performing data cleaning on the plurality of sample input data and the sample steering wheel angles corresponding to the plurality of sample input data respectively.
6. A feedforward control device of a vehicle characterized by comprising: The method comprises: a first acquiring module, configured to acquire target input data in a driving process of a target vehicle, wherein the target input data comprises a lane curvature of a lane where the target vehicle is located, a reference trajectory obtained by performing trajectory planning on the target vehicle, and a vehicle state of the target vehicle; a second acquiring module, configured to acquire a plurality of sample input data and determine sample steering wheel angles corresponding to the plurality of sample input data respectively; for any sample input data, any one of the following processing is performed: acquiring an actual steering wheel angle at a time corresponding to the any sample input data as the sample steering wheel angle corresponding to the any sample input data; calculating a minimum steering wheel angle through a lane according to a lane curvature in the any sample input data as the sample steering wheel angle corresponding to the any sample input data, wherein each sample input data comprises a lane curvature of a lane where a sample vehicle is located, a reference trajectory obtained by performing trajectory planning on the sample vehicle, and a vehicle state of the sample vehicle; a model training module, configured to perform model training on a converter model according to a training set; wherein the training set comprises a first sample input data in the plurality of sample input data and a sample steering wheel angle corresponding to the first sample input data; a model inference module, configured to perform forward propagation on the target input data through the converter model to obtain a target steering wheel angle; a control module, configured to control a steering wheel of the target vehicle according to the target steering wheel angle.
7. An electronic device, comprising: The method comprises: a memory, configured to store executable instructions; a processor, configured to execute the executable instructions stored in the memory, and implement the method in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, executable instructions are stored, and when executed by a processor, implement the method in any one of claims 1 to 5.
Citation Information
Patent Citations
Trajectory tracking for vehicle lateral control using neural network
CN110155031A