Feed-forward control method and device of vehicle and electronic equipment
By obtaining lane curvature, reference trajectory and vehicle status data in the vehicle, and using the converter model to predict the steering wheel angle, the problem of poor control effect caused by improper parameter adjustment in the prior art is solved, and the stability and safety of the vehicle are improved .
Patent Information
- Application Number
- CN202411369550.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-09-27
AI Technical Summary
The existing feedforward control technology has improper parameter adjustment in vehicle lateral control, resulting in poor control effect, affecting vehicle stability and safety.
By obtaining lane curvature, reference trajectory and vehicle status data, use the converter model to propagate forward, predict and control the steering wheel angle, avoiding the cumbersome parameter adjustment process.
Improve the feedforward control effect, save additional costs and time caused by parameter adjustment, and improve the stability and safety of vehicle driving.
Smart Images

Figure CN119142353A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to vehicle technology, and in particular to a feedforward control method, device, electronic device, computer-readable storage medium and computer program product for a vehicle. Background Art
[0002] In vehicle lateral control, the controller is generally composed of a feedback controller and a feedforward controller. Feedback control refers to measuring the actual driving parameters of the vehicle (such as yaw rate, acceleration, vehicle position, etc.) and calculating the control parameters based on them to correct the deviation between the actual driving parameters of the vehicle and the expected driving parameters; feedforward control is a more forward-looking control strategy, which predicts the future driving conditions of the vehicle and calculates the corresponding control parameters in advance.
[0003] In the feedforward control scheme provided by the relevant technology, a specific control algorithm in the vehicle dynamics model, such as the Linear-Quadratic Regulator (LQR) algorithm, is usually used to implement feedforward control. This control algorithm requires parameters to be adjusted according to the actual vehicle characteristics and control requirements. If the parameters are not adjusted properly, it may lead to poor control effects and even affect the stability and safety of the vehicle. Summary of the invention
[0004] The present 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 thereby improve the stability and safety of vehicle driving.
[0005] The technical solution of this application is implemented as follows:
[0006] The present application provides a feedforward control method for a vehicle, comprising:
[0007] Acquiring target input data during the driving process of the 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 for the target vehicle, and a vehicle state of the target vehicle;
[0008] Performing forward propagation on the target input data through a converter model to obtain a target steering wheel angle;
[0009] The steering wheel of the target vehicle is controlled according to the target steering wheel angle.
[0010] The present application provides a feedforward control device for a vehicle, comprising:
[0011] A first acquisition module is used to acquire target input data during the driving process of the target vehicle; 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 for the target vehicle, and the vehicle state of the target vehicle;
[0012] A model inference module, used for forward propagating the target input data through a converter model to obtain a target steering wheel angle;
[0013] A control module is used to control the steering wheel of the target vehicle according to the target steering wheel angle.
[0014] The present application provides an electronic device, including:
[0015] A memory for storing executable instructions;
[0016] The processor is used to implement the vehicle feedforward control method provided in the present application when executing the executable instructions stored in the memory.
[0017] The present application provides a computer-readable storage medium storing executable instructions for causing a processor to execute and implement the vehicle feedforward control method provided by the present application.
[0018] The present application provides a computer program product, which includes executable instructions for causing a processor to execute and implement the vehicle feedforward control method provided by the present application.
[0019] This application has the following beneficial effects:
[0020] The present application obtains target input data during the driving process of the target vehicle; 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 for the target vehicle, and the vehicle state of the target vehicle; the target input data is forward-propagated through a converter model to obtain a target steering wheel angle; and the steering wheel of the target vehicle is controlled according to the target steering wheel angle. The present application predicts the target steering wheel angle through a converter model, which can save additional R&D costs and time caused by parameter adjustment, and can also 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 THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 is a schematic diagram of the architecture of a feedforward control system of a vehicle provided in an embodiment of the present application;
[0023] Figure 2 is a structural schematic diagram of a vehicle-mounted device provided in an embodiment of the present application;
[0024] Figure 3A is a first flow chart of a feedforward control method for a vehicle provided in an embodiment of the present application;
[0025] Figure 3B is a second flow chart of the feedforward control method for a vehicle provided in an embodiment of the present application;
[0026] Figure 3C is a third flow chart of the feedforward control method for a vehicle provided in an embodiment of the present application;
[0027] Figure 3D is a fourth flow chart of the feedforward control method for a vehicle provided in an embodiment of the present application;
[0028] Figure 4 It is a flow chart of the model training phase provided in the embodiment of the present application;
[0029] Figure 5 It is a flow chart of the model reasoning stage provided in an embodiment of the present application. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0031] In the following description, reference is made to "some embodiments", which describes a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict. In the following description, reference is made to the term "multiple" to mean at least two.
[0032] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, 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 those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0034] The embodiments of the present application provide a vehicle feedforward control method, device, electronic device, computer-readable storage medium, and computer program product, which can improve the feedforward control effect, thereby improving 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 as a server.
[0035] See also Figure 1 , Figure 1 It is a schematic diagram of the architecture of the feedforward control system 100 of the vehicle provided in an embodiment of the present application, wherein the vehicle-mounted device 400 is connected to the server 200 via the network 300, wherein the network 300 may 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 an on-board device as an example, the feedforward control method for the vehicle provided in the embodiments of the present application can be implemented by the on-board device. For example, the on-board device 400 obtains target input data during the driving process of the target vehicle, wherein the target vehicle refers to the vehicle deployed by the on-board device 400; the target input data is forward-propagated through the converter model to obtain the target steering wheel angle, wherein the converter model is deployed locally on the on-board device 400; the steering wheel of the target vehicle is controlled according to the target steering wheel angle. In the above manner, the on-board device 400 implements full-process feedforward control locally without transmitting data to a remote server for processing, which can greatly reduce the time and delay of data transmission, thereby improving the real-time processing and improving 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 the network cannot be connected, such as scenarios where the vehicle is traveling in a remote mountainous area without a network.
[0037] In some embodiments, the feedforward control method for a vehicle provided in an embodiment of the present application can be implemented collaboratively by an on-board device and a server. For example, the on-board device 400 obtains target input data during the driving process of the target vehicle, and sends the target input data to the server 200; the server 200 forward-propagates 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 on-board device 400, so that the on-board 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 power and storage resources, and can efficiently implement forward propagation; the on-board device 400 is mainly responsible for data acquisition, data transmission and control, without having to undertake complex computing tasks, and without having to deploy converter models, which can reduce the local pressure of the on-board device 400.
[0038] Take the electronic device provided in the embodiment of the present application as an example, which is a vehicle-mounted device. Figure 2 , Figure 2 is a structural diagram of a vehicle-mounted device 400 provided in an embodiment of the present application, Figure 2 The vehicle-mounted device 400 shown 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 via a bus system 440. It is understood that the bus system 440 is used to achieve connection and communication between these 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, for the sake of clarity, the bus system 440 is not described in detail. Figure 2 Various buses are labeled as bus system 440 .
[0039] Processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[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 screen displays, cameras, other input buttons and controls.
[0041] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices that are physically remote from the processor 410.
[0042] The memory 450 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a 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, memory 450 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.
[0044] Operating system 451, including 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] A network communication module 452, used to reach other electronic devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 include: Bluetooth, Wireless Compatibility Authentication (WiFi), and Universal Serial Bus (USB), etc.;
[0046] a presentation module 453 for enabling presentation of information via one or more output devices 431 (e.g., display screen, speaker, etc.) associated with the user interface 430 (e.g., a user interface for operating peripherals and displaying content and information);
[0047] The input processing module 454 is used to detect one or more user inputs or interactions from one of the one or more input devices 432 and translate the detected inputs or interactions.
[0048] In some embodiments, the feedforward control device for a vehicle provided in the embodiments of the present application may be implemented in software. Figure 2The feedforward control device 455 of the vehicle stored in the memory 450 is shown, which can be software in the form of a program and a plug-in, etc., including the following software modules: a first acquisition module 4551, a model reasoning module 4552 and a control module 4553. These modules are logical, so they can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be explained below.
[0049] The feedforward control method for a vehicle provided in an embodiment of the present application will be described in conjunction with an exemplary application and implementation of an electronic device provided in an embodiment of the present application.
[0050] See also Figure 3A , Figure 3A is a flow chart of a feedforward control method for a vehicle provided in an embodiment of the present application, which will be combined with Figure 3A The steps shown are explained.
[0051] In step 101, target input data is acquired during the driving process of the target vehicle; 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 for the target vehicle, and the vehicle state of the target vehicle.
[0052] For example, during the driving process of the target vehicle, current target input data is obtained, and the target input data 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 embodiment of the present application does not limit the method for obtaining the lane curvature of the lane where the target vehicle is located. For example, the target vehicle can be positioned to obtain the position information of the target vehicle, and the lane curvature of the lane where the target vehicle is located can be determined in the electronic map based on the position information of the target vehicle, wherein the electronic map records the geometric shape information of multiple lanes, based on which the lane curvature of each lane can be calculated; or the target vehicle's on-board camera can be used to collect road images, and the lanes can be extracted from the road images using image processing technology, and then the lane curvature of the extracted lanes 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 embodiment of the present application does not limit the planning algorithm used for trajectory planning.
[0055] It is worth noting that the vehicle state of the target vehicle is used to describe the driving condition of the target vehicle. For example, the vehicle state of the target vehicle may include at least one of the location information, vehicle speed, and heading of the target vehicle.
[0056] In step 102, the target input data is forward propagated through the converter model to obtain the target steering wheel angle.
[0057] Here, the target input data is used as the input of the converter model, that is, the target input data is forward propagated through the converter model to obtain the target steering wheel angle.
[0058] Among them, the converter model or Transformer model has great advantages in processing sequence data and feature fusion. Therefore, it is used in the embodiment of the present application to output a more accurate target steering wheel angle, and at the same time can adapt to different vehicles and working conditions, avoiding the additional R&D cost and time brought about by parameter adjustment 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 a 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, the above steps 101 to 103 may be performed periodically during the driving process of the target vehicle, thereby ensuring the continuity and availability of the feedforward control.
[0062] like Figure 3A As shown, the embodiment of the present application obtains target input data during the driving process of the target vehicle; 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 for the target vehicle, and the vehicle state of the target vehicle; the target input data is forward propagated through the converter model to obtain the target steering wheel angle; and the steering wheel of the target vehicle is controlled according to the target steering wheel angle. The embodiment of the present application predicts the target steering wheel angle through the converter model, which can save the additional R&D cost and time caused by parameter adjustment, and can also improve the control effect of controlling according to the target steering wheel angle, thereby improving the stability and safety of vehicle driving.
[0063] In some embodiments, see Figure 3B , Figure 3B is a flow chart of a feedforward control method for a vehicle provided in an embodiment of the present application, based on Figure 3A , before step 102 ( Figure 3B (taking the period before step 101 as an example), steps 201 to 202 may also be performed.
[0064] In step 201, a plurality of sample input data are obtained, and sample steering wheel angles respectively corresponding to the plurality of sample input data are determined; 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 for the sample vehicle, and a vehicle state of the sample vehicle.
[0065] Step 102 describes the model inference phase of the converter model. Before the model inference phase, the converter model may be trained in the model training phase, that is, the mapping relationship between input and output is learned.
[0066] In the model training phase, a plurality of sample input data are first obtained, and the sample steering wheel angles (used as labels) corresponding to the plurality of sample input data are determined. The sample input data is similar to the target input data in data format, that is, the sample input data includes the lane curvature of the lane where the sample vehicle is located, the reference trajectory obtained by trajectory planning for the sample vehicle, and the vehicle state of the sample vehicle. It is worth noting that a plurality of sample input data can be obtained during the driving process of the same sample vehicle, or the sample input data can be obtained during the driving process of different sample vehicles (the number of sample input data obtained during the driving process of each sample vehicle can be one or more), and there is no limitation on this.
[0067] In some embodiments, the sample vehicle and the target vehicle may be the same vehicle or different vehicles, without limitation.
[0068] In some embodiments, the above-mentioned determination of sample steering wheel angles corresponding to multiple sample input data can be achieved in the following manner: for any sample input data, perform any of the following processing: obtain the actual steering wheel angle at the moment corresponding to any sample input data, as the sample steering wheel angle corresponding to any sample input data; calculate the minimum steering wheel angle passing through the lane according to the lane curvature in any sample input data, as the sample steering wheel angle corresponding to any sample input data.
[0069] Here, taking any sample input data among multiple sample input data as an example, two methods of determining the sample steering wheel angle are described:
[0070] 1) Obtain the actual steering wheel angle at the time corresponding to any sample input data as the sample steering wheel angle corresponding to any sample input data. The actual steering wheel angle refers to the steering wheel angle formed by the driver manually controlling the sample vehicle. The sample steering wheel angle obtained in this way is more reasonable and accurate, that is, it can accurately reflect the driver's driving habits, which helps to improve the model training effect.
[0071] 2) Calculate the minimum steering wheel angle for passing the lane (meaning being able to safely pass the lane) according to the lane curvature in any sample input data, as the sample steering wheel angle corresponding to any sample input data. This method calculates the theoretical minimum steering wheel angle, and does not require additional cost to obtain the actual steering wheel angle, which can reduce implementation costs.
[0072] In some embodiments, after acquiring multiple sample input data and determining sample steering wheel angles corresponding to the multiple sample input data, the vehicle feedforward control method also includes: performing data cleaning on the multiple sample input data and the sample steering wheel angles corresponding to the multiple sample input data.
[0073] Here, data cleaning can be performed on multiple sample input data and sample steering wheel angles corresponding to the multiple sample input data, wherein data cleaning includes at least one of the following processing: processing missing values (e.g., deleting missing values, or estimating missing values through 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, and deviations and errors in the data can be reduced, thereby improving the accuracy and reliability of the data, which helps to improve the model training effect while reducing the model training time.
[0074] In step 202, model training is performed on the converter model according to the training set; wherein the training set includes first sample input data among a 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, that is, the model parameters of the converter model are updated, wherein the training set includes the first sample input data among multiple sample input data, and the sample steering wheel angle corresponding to the first sample input data, and the first sample input data refers to at least part of the sample input data among the multiple sample input data.
[0076] In some embodiments, the above-mentioned model training of the converter model based on the training set can be achieved in the following manner: forward propagating the first sample input data through the converter model to obtain the steering wheel angle to be compared; calculating the loss value based on the steering wheel angle to be compared and the sample steering wheel angle corresponding to the first sample input data; and backpropagating the loss value in the converter model to update the model parameters of the converter model.
[0077] Here, the model training process is illustrated by example. First, the first sample input data is forward propagated through the converter model to obtain the steering wheel angle (for the sake of distinction, the steering wheel angle here is called the steering wheel angle to be compared); then, the loss value is calculated based on the steering wheel angle to be compared and the sample steering wheel angle corresponding to the first sample input data, wherein the type of 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 method, 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, thereby achieving effective training of the converter model.
[0078] exist Figure 3B middle, Figure 3A The illustrated step 102 may 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 completing the model training phase, we can enter the model inference phase, that is, forward propagating the target input data through the trained converter model to obtain the target steering wheel angle. Since the relationship between the input data and the steering wheel angle has been fully learned in the model training phase, the accuracy of the target steering wheel angle output in the model inference phase can be improved.
[0080] like Figure 3B As shown, the embodiment of the present application constructs a training set and trains the converter model according to the training set, so that the converter model can fully learn the relationship between the input data and the steering wheel angle during the model training process. In this way, the trained converter model can predict the appropriate target steering wheel angle based on the target input data.
[0081] In some embodiments, see Figure 3C , Figure 3C is a flow chart of a feedforward control method for a vehicle provided in an embodiment of the present application, based on Figure 3B After step 202, step 301 may be further performed. In step 301, a model evaluation is performed on the trained converter model according to the validation set, and it is determined whether the trained converter model needs to continue model training according to the model evaluation result; wherein the validation set includes the second sample input data among the plurality of sample input data, and the sample steering wheel angle corresponding to the second sample input data.
[0082] In addition to constructing a training set, a validation set can also be constructed in an embodiment of the present application, wherein the validation set includes the second sample input data among the multiple sample input data, and the sample steering wheel angle 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 validation set and the training set include different data, which can prompt the converter model to learn the general rules of the data instead of just remembering the specific samples in the training set, which helps to improve the generalization ability of the converter model and enable it to better handle new and unknown data.
[0083] After the converter model is trained according to the training set, the trained converter model is evaluated according to the validation set, and it is determined whether the trained converter model needs to be further trained according to the model evaluation result. If the trained converter model needs to be further trained, the process returns to step 202; if the trained converter model does not need to be further trained, step 203 is executed.
[0084] It is worth noting that the model evaluation results here reflect the model performance of the trained converter model on the validation set. For example, the model evaluation results can be loss values, or performance indicators such as accuracy, recall, and F1 score. When the model evaluation results reach a stable state (for example, the volatility between the model evaluation results obtained in the last N rounds of training is less than the volatility threshold) or the expected level (for example, greater than or less than the preset threshold), it proves that the trained converter model has achieved the best performance. At this time, training can be stopped (that is, there is no need to continue model training for the trained converter model) to avoid overfitting.
[0085] In some embodiments, the validation set can be used to select optimal hyperparameters, such as learning rate, batch size, etc. For example, multiple converter models can be prepared in advance, and the multiple converter models respectively use different hyperparameters. Then, the multiple converter models are trained according to the training set, and the multiple converter models after training are evaluated according to the validation set. The converter model with the best model performance is screened out according to the model evaluation results corresponding to the multiple converter models after training, and the hyperparameters used 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. Similar to selecting the optimal hyperparameters, the validation set can also be used to select the optimal model structure.
[0086] like Figure 3CAs shown, after the converter model is trained according to the training set, the embodiment of the present application performs model evaluation on the trained converter model according to the validation set, and determines whether the trained converter model needs to be further trained according to the model evaluation result. The embodiment of the present application verifies whether the trained converter model has achieved the best performance according to the validation set, and stops training when the trained converter model has achieved the best performance, which can effectively avoid underfitting and overfitting.
[0087] In some embodiments, see Figure 3D , Figure 3D is a flow chart of a feedforward control method for a vehicle provided in an embodiment of the present application, Figure 3B The illustrated step 202 may be updated to step 401, in which model training is performed on multiple converter models respectively according to a training set; wherein the training set includes first sample input data among multiple sample input data, and a 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 use different hyperparameters and / or respectively use different model structures. Then, model training is performed on the plurality of converter models respectively according to the training set.
[0089] exist Figure 3D In the embodiment, step 402 may be performed after step 401. In step 402, model evaluation is performed on the trained multiple converter models according to the test set, and the trained multiple converter models are screened according to the model evaluation results corresponding to the trained multiple converter models, so as to obtain a converter model for forward propagation of the target input data; wherein the test set includes the third sample input data among the multiple sample input data, and the sample steering wheel angle corresponding to the third sample input data.
[0090] In addition to constructing a training set, a test set can also be constructed in an embodiment of the present application, wherein the test set includes the third sample input data among the multiple 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 include different data, so that the model performance of the trained converter model on unknown data can be accurately tested.
[0091] Based on the constructed test set, model evaluation is performed on the multiple converter models after training respectively according to the test set, and the multiple converter models after training are screened according to the model evaluation results corresponding to the multiple converter models after training, that is, the converter model with the best model performance is screened out to serve as the converter model for forward propagation of the target input data (that is, the converter model for executing step 203).
[0092] In some embodiments, the training set, the validation set, and the test set may also be used in combination. For example, multiple converter models are trained separately according to the training set; each converter model after training is evaluated according to the validation set, and it is determined whether it is necessary to continue to train each converter model after training according to the model evaluation results corresponding to each converter model after training; multiple converter models after training are evaluated separately according to the test set, and multiple converter models after training are screened according to the model evaluation results corresponding to each converter model after training, so as to obtain a converter model for forward propagation of 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 evaluated based on 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] like Figure 3D As shown, the embodiment of the present application performs model training on multiple converter models according to the training set, performs model evaluation on the trained multiple converter models according to the test set, and screens the trained multiple converter models according to the model evaluation results corresponding to the trained multiple converter models to obtain a converter model for forward propagation of target input data. In this way, the model performance of the trained converter model on unknown data is accurately tested through the test set, so as to facilitate the screening of the converter model with the best model performance for the model inference stage.
[0095] The following will describe an exemplary application of the embodiment of the present application in a practical application scenario. The embodiment of the present application includes two stages: a model training stage and a model reasoning stage. First, the model training stage is described. Figure 4 As shown, the model training phase may include the following steps:
[0096] 1) Data preparation. The collected data should be highly complete, accurate and representative, 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 above) and actual control data. The actual input data includes lane curvature, reference trajectory and vehicle status, and the actual control data includes steering wheel angle. After the collected data set is cleaned (including deleting outliers, normalizing data, etc.), it is divided into training set, validation set and test set according to a certain ratio, for example, the training set accounts for 70%, the validation set accounts for 15%, and the test set accounts for 15%.
[0097] 2) Define the loss function. Make sure 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 the optimizer. The choice of optimizer, the setting of hyperparameters such as learning rate and momentum should be adjusted according to the model characteristics and training data to speed up the training process and avoid overfitting.
[0099] 4) Model training. The Transformer model is trained based on the training set, for example, by calculating the loss value through forward propagation and then updating the model parameters through back propagation. After model training, the trained Transformer model is evaluated based on the validation set to promptly detect and resolve problems such as overfitting or underfitting.
[0100] 5) Evaluation model: The selection of evaluation indicators (i.e., model evaluation results) should be determined according to the task requirements and be able to comprehensively and objectively reflect the performance of the Transformer model on unseen data. For example, evaluation indicators can be accuracy, recall, F1 score, etc.
[0101] 6) Adjust the model: When adjusting the model based on the model evaluation results, a certain strategy should be followed. You can try simple adjustments first (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 begin. Figure 5 As shown, the trained Transformer model can be integrated into the actual vehicle control system (i.e., application deployment) to forward propagate the acquired target input data to obtain the target steering wheel angle, thereby realizing feedforward control.
[0103] The embodiments of the present application do not rely on specific control algorithms in the vehicle dynamics model and do not require cumbersome parameter adjustment processes. The powerful sequence modeling capabilities of the Transformer model can capture the long-term mapping relationship between input and output, and learn the inherent laws and characteristics of the system through training with a large amount of data, so that it can have higher accuracy when processing complex and dynamically changing systems.
[0104] The following continues to describe an exemplary structure of the vehicle feedforward control device 455 provided in the embodiment of the present application implemented as a software module. In some embodiments, such as Figure 2 As shown, the software modules in the feedforward control device 455 of the vehicle stored in the memory 450 may include: a first acquisition module 4551, used to acquire target input data during the driving process of the target vehicle; 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 for the target vehicle, and the vehicle state of the target vehicle; a model inference module 4552, used to forward propagate the target input data through a converter model to obtain a target steering wheel angle; and a control module 4553, used to control the steering wheel of the target vehicle according to the target steering wheel angle.
[0105] In some embodiments, the vehicle's feedforward control device 455 also includes a second acquisition module, which is used to: acquire multiple sample input data, and determine the sample steering wheel angles corresponding to the multiple sample input data respectively; wherein each sample input data includes the lane curvature of the lane where the sample vehicle is located, the reference trajectory obtained by trajectory planning for the sample vehicle, and the vehicle state of the sample vehicle; the vehicle's feedforward control device 455 also includes a model training module, which is used to: perform model training on the converter model according to the training set; wherein the training set includes the first sample input data among the multiple sample input data, and the sample steering wheel angle corresponding to the first sample input data.
[0106] In some embodiments, the second acquisition module is also used to: perform any of the following processing for any sample input data: obtain the actual steering wheel angle at the corresponding moment of any sample input data, as the sample steering wheel angle corresponding to any sample input data; calculate the minimum steering wheel angle passing through the lane according to the lane curvature in any sample input data, as the sample steering wheel angle corresponding to any sample input data.
[0107] In some embodiments, the model training module is also used to: forward propagate the first sample input data through the converter model to obtain the steering wheel angle to be compared; calculate the loss value based on the steering wheel angle to be compared and the sample steering wheel angle corresponding to the first sample input data; and backpropagate the loss value in the converter model to update the model parameters of the converter model.
[0108] In some embodiments, the model training module is also used to: perform model evaluation on the trained converter model based on a validation set, and determine whether it is necessary to continue model training on the trained converter model based on the model evaluation results; wherein the validation set includes second sample input data among multiple 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 multiple; the model training module is also used to: perform model training on multiple converter models according to the training set; perform model evaluation on the trained multiple converter models according to the test set, and screen the trained multiple converter models according to the model evaluation results corresponding to the trained multiple converter models, so as to obtain a converter model for forward propagation of the target input data; wherein the test set includes the third sample input data among the multiple sample input data, and the sample steering wheel angle corresponding to the third sample input data.
[0110] In some embodiments, the second acquisition module is further used to: perform data cleaning on the multiple sample input data and the sample steering wheel angles respectively corresponding to the multiple sample input data.
[0111] The embodiment of the present application provides a computer program product or a computer program, which includes executable instructions stored in a computer-readable storage medium. The processor of the 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 feedforward control method of the vehicle described in the embodiment of the present application.
[0112] An embodiment of the present application provides a computer-readable storage medium storing executable instructions, wherein executable instructions are stored. When the executable instructions are executed by a processor, the processor will implement the feedforward control method of the vehicle provided in the embodiment of the present application.
[0113] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or it may be various devices including one or any combination of the above memories.
[0114] In some embodiments, executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0115] As an example, executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0116] As an example, the executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed at multiple sites and interconnected by a communication network.
[0117] The above are only embodiments of the present application and are not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.
Claims
1. A feedforward control method for a vehicle, It is characterized in that include: Acquiring target input data during the driving process of the 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 for the target vehicle, and a vehicle state of the target vehicle; Performing forward propagation on the target input data through a converter model to obtain a target steering wheel angle; The steering wheel of the target vehicle is controlled according to the target steering wheel angle.
2. The method according to claim 1, It is characterized in that Before forward propagating the target input data through the converter model, the method further includes: Acquire multiple sample input data, and determine sample steering wheel angles corresponding to the multiple sample input data respectively; 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 for the sample vehicle, and a vehicle state of the sample vehicle; The converter model is trained according to a training set, wherein the training set includes first sample input data among the plurality of sample input data, and a sample steering wheel angle corresponding to the first sample input data.
3. The method according to claim 2, It is characterized in that The determining of the sample steering wheel angles respectively corresponding to the plurality of sample input data comprises: For any sample input data, perform any of the following processing: Obtaining an actual steering wheel angle at a moment corresponding to any one of the sample input data as a sample steering wheel angle corresponding to any one of the sample input data; A minimum steering wheel angle for passing through the lane is calculated according to the lane curvature in any of the sample input data to serve as a sample steering wheel angle corresponding to the any of the sample input data.
4. The method according to claim 2, It is characterized in that The performing model training on the converter model according to the training set includes: Performing forward propagation on the first sample input data through the converter model to obtain a steering wheel angle to be compared; Calculating a loss value according to the steering wheel angle to be compared and a sample steering wheel angle corresponding to the first sample input data; The loss value is back-propagated in the converter model to update model parameters of the converter model.
5. The method according to claim 2, It is characterized in that After performing model training on the converter model according to the training set, the method further includes: The trained converter model is evaluated according to a validation set, and it is determined whether it is necessary to continue model training of the trained converter model according to the model evaluation result; wherein the validation set includes second sample input data among the multiple sample input data, and a sample steering wheel angle corresponding to the second sample input data.
6. The method according to claim 2, It is characterized in that The number of the converter models includes a plurality; and the performing model training on the converter model according to the training set includes: Perform model training on multiple converter models respectively according to the training set; The method further comprises: Model evaluation is performed on the multiple converter models after training respectively according to the test set, and the multiple converter models after training are screened according to the model evaluation results respectively corresponding to the multiple converter models after training, so as to obtain a converter model for forward propagation of the target input data; wherein the test set includes the third sample input data among the multiple sample input data, and the sample steering wheel angle corresponding to the third sample input data.
7. The method according to claim 2, It is characterized in that After obtaining a plurality of sample input data and determining sample steering wheel angles respectively corresponding to the plurality of sample input data, the method further includes: Data cleaning is performed on the plurality of sample input data and the sample steering wheel angles respectively corresponding to the plurality of sample input data.
8. A feedforward control device for a vehicle, It is characterized in that include: A first acquisition module is used to acquire target input data during the driving process of the target vehicle; 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 for the target vehicle, and the vehicle state of the target vehicle; A model inference module, used for forward propagating the target input data through a converter model to obtain a target steering wheel angle; A control module is used to control the steering wheel of the target vehicle according to the target steering wheel angle.
9. An electronic device, It is characterized in that include: A memory for storing executable instructions; A processor, configured to implement the method according to any one of claims 1 to 7 when executing the executable instructions stored in the memory.
10. A computer-readable storage medium, It is characterized in that Executable instructions are stored, and when executed by a processor, the method described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Trajectory tracking for vehicle lateral control using neural network
CN110155031A
Vehicle transverse control method, device and equipment and storage medium
CN116279802A
Methods and Systems for Lateral Control of a Vehicle
US20230242110A1
