Rapid prototype algorithm verification platform and method

Through the rapid prototype algorithm verification platform, configuration interface, model building modules and underlying engineering modules are used to generate configuration files and model codes that comply with the AUTOSAR standard, which achieves efficient and timely algorithm verification, and solves the problems of time-consuming and low code reuse in the existing technology.

CN119536717AActive Publication Date: 2025-02-28BEIJING JINGWEI HIRAIN TECH CO INC

Patent Information

Application Number
CN202411604581.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2025-02-28
Estimated Expiration
2044-11-11

Smart Images

  • Figure CN119536717A_ABST
    Figure CN119536717A_ABST
Patent Text Reader

Abstract

The invention provides a rapid prototyping algorithm verification platform and method, and the method comprises the steps: receiving a configuration parameter inputted by a user through a configuration interface, and generating a configuration file based on the configuration parameter and a script written according to an AUTOSAR standard; building an algorithm model based on a function module which is selected by a user and meets the AUTOSAR standard; generating a model code corresponding to the algorithm model; and compiling and linking the configuration file and the model code in the underlying project to obtain a hex file. In the scheme, the configuration file and the model code conforming to the AUTOSAR standard are obtained by using the script written based on the AUTOSAR standard and each functional module obtained by packaging the ECU abstraction layer interface in the AUTOSAR standard, and are automatically integrated to the underlying project for compiling and linking, so that the code reuse rate is improved, the manpower is saved, and the efficiency is improved. And the purpose of shortening algorithm verification time is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of automotive electronic technology, and in particular to a rapid prototype algorithm verification platform and method. Background Art

[0002] Algorithm verification based on rapid prototyping is a method that combines rapid prototyping development methods with algorithm verification. It aims to quickly create a prototype of the algorithm and verify and test it in actual application scenarios to evaluate the effectiveness and applicability of the algorithm. The model code corresponding to the algorithm model and the configuration code generated based on the configuration parameters of the algorithm model must comply with the AUTOSAR (Automotive Open System Architecture) standard. The AUTOSAR standard is a software architecture standard based on automotive electronic systems, which aims to ensure the reliability, reusability and scalability of automotive electronic systems.

[0003] In the prior art, Matlab is used to develop the application layer algorithm of the product, and EB (Elektrobit) software is used to generate the configuration code. Then, in the compiler, the application layer algorithm code generated by Matlab, the configuration code generated by EB, and the driver code of MCAL are placed under the same BSW (Basic Software) underlying driver project by technicians in different fields for compilation and linking to generate executable code, thereby performing algorithm verification, which consumes a lot of manpower and material resources. Another way is to generate an executable file through the model code generated by the Simulink model and the configuration code required by the user to verify the algorithm in a specific real-time hardware. In these two ways, the model code and the configuration code do not meet the AUTOSAR standard, resulting in a low code reuse rate. The low code reuse rate and excessive manual participation make the algorithm verification time-consuming, and there is a situation where verification cannot be done in time, and it is impossible to maintain consistency with the product development process that requires testing at every step. Summary of the invention

[0004] In view of this, an embodiment of the present invention provides a rapid prototyping algorithm verification platform and method to improve code reuse rate while saving manpower, thereby achieving the purpose of shortening the time consumption of algorithm verification.

[0005] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:

[0006] The first aspect of the embodiment of the present invention discloses a rapid prototyping algorithm verification platform, the rapid prototyping algorithm verification platform includes: a configuration interface, a model building module and an underlying engineering module;

[0007] The configuration interface is used to receive multiple configuration parameters corresponding to each functional module in the Simulink model library input by the user, and generate a configuration file based on the configuration parameters and a script pre-written according to the AUTOSAR standard; the functional module is obtained by encapsulating the ECU abstraction layer interface in the AUTOSAR standard; the configuration file contains configuration code that complies with the AUTOSAR standard;

[0008] The model building module is used to build an algorithm model of the algorithm to be verified based on the functional module selected by the user from the Simulink model library;

[0009] The underlying engineering module is used to generate the model code corresponding to the algorithm model; the configuration file and the model code are compiled and linked in the underlying engineering pre-established based on the compiler to obtain a hex file for verifying the algorithm to be verified.

[0010] Preferably, the model building module is also used for:

[0011] For each of the functional modules in the algorithm model, determine the target configuration parameters selected by the user from the multiple configuration parameters corresponding to the functional module, call the configuration function corresponding to the functional module to configure the functional module, and obtain the configured algorithm model; the configuration function is pre-written for each of the functional modules.

[0012] Preferably, the model building module is also used for:

[0013] If the functional modules constituting the algorithm model include a TASK module, then in response to a millisecond-level task specified by the user in the TASK module, the algorithm model is associated with the millisecond-level task specified by the user; the TASK module includes a plurality of preset millisecond-level tasks.

[0014] Preferably, the bottom engineering module is specifically used for:

[0015] Receive the storage path input by the user;

[0016] Calling an embedded encoder to generate a model code corresponding to the algorithm model;

[0017] The configuration file, the model code and the header file corresponding to the model code are stored in the underlying project; the header file contains the declaration and definition of the model code;

[0018] Compile and link the configuration file and the model code in the underlying project to obtain a hex file;

[0019] Copy the hex file to the storage path.

[0020] Preferably, the configuration interface is further used to: receive a calibration quantity input by a user;

[0021] Accordingly, the bottom engineering module is also used for:

[0022] The calibration quantity is compiled in the underlying project to obtain an A2L file; the A2L file is used to identify and modify the variables represented by the calibration quantity in the algorithm to be verified.

[0023] A second aspect of an embodiment of the present invention discloses a rapid prototyping algorithm verification method, which is applied to any of the rapid prototyping algorithm verification platforms disclosed in the first aspect of an embodiment of the present invention, and includes:

[0024] Receiving multiple configuration parameters corresponding to each functional module in the Simulink model library input by the user; the functional module is obtained by encapsulating the ECU abstraction layer interface in the AUTOSAR standard;

[0025] Generate a configuration file based on the configuration parameters and a script pre-written according to the AUTOSAR standard; the configuration file includes a configuration code that complies with the AUTOSAR standard;

[0026] Building an algorithm model of the algorithm to be verified based on the functional modules selected by the user from the Simulink model library;

[0027] Generate a model code corresponding to the algorithm model, compile and link the configuration file and the model code in an underlying project pre-established based on a compiler, and obtain a hex file for verifying the algorithm to be verified.

[0028] Preferably, after building the algorithm model of the algorithm to be verified based on the functional module selected by the user from the Simulink model library, the method further includes:

[0029] For each of the functional modules in the algorithm model, determine the target configuration parameters selected by the user from the multiple configuration parameters corresponding to the functional module, call the configuration function corresponding to the functional module to configure the functional module, and obtain the configured algorithm model; the configuration function is pre-written for each of the functional modules.

[0030] Preferably, after building the algorithm model of the algorithm to be verified based on the functional module selected by the user from the Simulink model library, the method further includes:

[0031] If the functional modules constituting the algorithm model include a TASK module, then in response to a millisecond-level task specified by the user in the TASK module, the algorithm model is associated with the millisecond-level task specified by the user; the TASK module includes a plurality of preset millisecond-level tasks.

[0032] Preferably, the generating of the model code corresponding to the algorithm model, compiling and linking the configuration file and the model code in an underlying project pre-established based on a compiler, and obtaining a hex file for verifying the algorithm to be verified, includes:

[0033] Receive the storage path input by the user;

[0034] Calling an embedded encoder to generate a model code corresponding to the algorithm model;

[0035] The configuration file, the model code and the header file corresponding to the model code are stored in the underlying project; the header file contains the declaration and definition of the model code;

[0036] Compile and link the configuration file and the model code in the underlying project to obtain a hex file;

[0037] Copy the hex file to the storage path.

[0038] Preferably, the method further comprises:

[0039] Receiving a calibration amount input by a user;

[0040] The calibration quantity is compiled in the underlying project to obtain an A2L file; the A2L file is used to identify and modify the variables represented by the calibration quantity in the algorithm to be verified.

[0041] Based on the above-mentioned embodiment of the present invention, a rapid prototyping algorithm verification platform and method are provided, the rapid prototyping algorithm verification platform includes: a configuration interface, a model building module and an underlying engineering module; the configuration interface is used to receive multiple configuration parameters corresponding to each functional module in the Simulink model library input by the user, and generate a configuration file based on the configuration parameters and a script pre-written according to the AUTOSAR standard; the functional module is obtained by encapsulating the ECU abstract layer interface in the AUTOSAR standard; the configuration file contains configuration code that complies with the AUTOSAR standard; the model building module is used to build an algorithm model of the algorithm to be verified based on the functional module selected by the user from the Simulink model library; the underlying engineering module is used to generate a model code corresponding to the algorithm model; the configuration file and the model code are compiled and linked in the underlying engineering pre-established based on the compiler to obtain a hex file for verifying the algorithm to be verified. In this solution, we use scripts written based on the AUTOSAR standard and encapsulate the various functional modules obtained by the ECU abstract layer interface in the AUTOSAR standard to obtain configuration files and model codes that comply with the AUTOSAR standard. These are automatically integrated into the underlying project for compilation and linking, thereby improving the code reuse rate while saving manpower, thereby achieving the goal of shortening the time required for algorithm verification. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0043] Figure 1 An architecture diagram of a rapid prototyping algorithm verification platform disclosed in an embodiment of the present invention;

[0044] Figure 2 The present invention discloses a flowchart of a rapid prototyping algorithm verification method. DETAILED DESCRIPTION

[0045] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0046] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.

[0047] like Figure 1 As shown, it is an architecture diagram of a rapid prototyping algorithm verification platform disclosed in an embodiment of the present invention. The rapid prototyping algorithm verification platform includes: a configuration interface 1, a model building module 2 and an underlying engineering module 3.

[0048] Configuration interface 1 is used to receive multiple configuration parameters input by the user corresponding to each functional module in the Simulink model library, and generate a configuration file based on the configuration parameters and a script pre-written according to the AUTOSAR standard.

[0049] Among them, the Simulink model library is an integrated development environment provided by Simulink, which provides a variety of predefined functional modules to help users quickly build complex models.

[0050] In the embodiment of the present invention, the functional module is obtained by encapsulating the ECU abstraction layer interface in the AUTOSAR standard, and the configuration file contains configuration codes that comply with the AUTOSAR standard.

[0051] It should be noted that when the script is written in advance according to the AUTOSAR standard, a rule for generating code is designed in the script so that the configuration code in the configuration file generated by the script complies with the AUTOSAR standard.

[0052] In one embodiment, after generating the configuration file, the script may also automatically place the configuration file in a corresponding position in the underlying project pre-established based on the compiler.

[0053] Specifically, configuration interface 1 is a visual interface designed by using APP Designer under Matlab, which can display the entry for configuration parameter input of each functional module in the Simulink model library. The user can select any functional module entry to enter the configuration parameter input interface, and multiple configuration parameters corresponding to this functional module can be entered in the configuration parameter input interface.

[0054] For example, after the customer's algorithm calculation is completed, the calculation result needs to be sent out through a CAN message with ID 0x01. At this time, you can enter the configuration parameter input interface of the CAN module through configuration interface 1 and enter the configuration parameter with ID 0x01. You can also enter multiple different IDs, that is, different configuration parameters, which can be selected and used later.

[0055] The model building module 2 is used to build an algorithm model of the algorithm to be verified based on the functional modules selected by the user from the Simulink model library.

[0056] For example, a Simulink model library can contain the following functional modules:

[0057] ADC module: Analog-to-Digital Converter Module, CAN module: Controller Area Network Module, LIN module: Local Interconnect Network Module, SENT module: Single Edge Nibble Transmission Module, H-Bridge: H-Bridge Driver Module, High-Low Drive Module: High-Side / Low-Side Driver Module and TASK module: Task Scheduler Module.

[0058] In one embodiment, the model building module 2 is further used for:

[0059] For each functional module in the algorithm model, the target configuration parameter selected by the user from multiple configuration parameters corresponding to the functional module is determined, and the configuration function corresponding to the functional module is called to configure the functional module to obtain a configured algorithm model.

[0060] Among them, the configuration function is pre-written for each functional module to realize the functions of parameter configuration and modification.

[0061] It should be noted that each functional module in the Simulink model library has a corresponding Mask interface, which usually refers to the interface for editing module parameters in Simulink. In the Simulink model, each functional module has a set of parameters, and users can customize and configure them through the module's Mask interface.

[0062] The Mask interface of each functional module displays all the configuration parameters for the functional module entered by the user in the configuration interface, and the user can choose to configure it independently.

[0063] Among them, displaying all the configuration parameters for the functional module input by the user in the configuration interface is realized through the model workspace in Matlab, that is, the configuration parameters for each functional module input by the user in the configuration interface 1 are stored in the model workspace in Matlab. When the Mask interface of any functional module is opened, the configuration parameters corresponding to the functional module are obtained from the model workspace in Matlab and displayed for the user to choose.

[0064] For example, for a CAN module, the user enters the IDs corresponding to ten messages in the configuration interface. The IDs corresponding to all ten messages will be displayed in the Mask interface of the CAN module. The user selects one of them as the target ID and uses the target ID to configure the CAN module.

[0065] The bottom-level engineering module 3 is used to generate the model code corresponding to the algorithm model; the configuration file and the model code are compiled and linked in the bottom-level engineering pre-established based on the compiler to obtain a hex file for verifying the algorithm to be verified.

[0066] The bottom engineering module 3 is specifically used for:

[0067] Receive the storage path input by the user; call the embedded coder in Matlab to generate the model code corresponding to the algorithm model; store the configuration file, model code and the header file corresponding to the model code in the underlying project; compile and link in the underlying project based on the configuration file and model code to obtain the hex file; copy the hex file to the storage path.

[0068] More specifically, a compile button is provided in the configuration interface 1. When the user clicks this compile button, the embedded coder in Matlab is called to generate the model code corresponding to the algorithm model according to the TLC file, and the script is added through the pre-written code to add the configuration file, model code and the header file corresponding to the model code to the underlying project, and the compilation and linking are controlled to obtain the hex file, and the hex file is copied to the storage path.

[0069] It should be noted that the header file refers to the file that contains the declaration and definition of the model code. Although the model code has been stored in the corresponding location of the underlying project, in order to correctly reference and use the model code in the underlying project, it is usually necessary to include the header file of the model code.

[0070] Among them, TLC files are used to support the embedded coder to generate model code corresponding to the algorithm model. TLC files are usually used by developers of S-function modules in Simulink to customize specific behaviors or functions in the code generation process.

[0071] The algorithm verification process is completed through the hex file. For example, the generated hex file is loaded into the target hardware in an appropriate way, the loaded hex file is run on the target hardware, and the algorithm is verified through appropriate input data. The correctness and performance of the algorithm can be verified by monitoring the output of the target hardware or other means.

[0072] In one embodiment, the model building module 2 is further used to:

[0073] If the functional modules constituting the algorithm model include a TASK module, then in response to the millisecond-level task specified by the user in the TASK module, the algorithm model is associated with the millisecond-level task specified by the user.

[0074] Accordingly, the bottom engineering module 3 is also used for:

[0075] Generate model code corresponding to the algorithm model associated with the millisecond-level task; compile and link in the underlying project pre-established based on the compiler to obtain the hex file associated with the millisecond-level task.

[0076] The hex file associated with the millisecond-level task is used to verify the algorithm to be verified by executing the millisecond-level task in the target hardware.

[0077] For example, the result of algorithm calculation is sent out through the CAN message with ID 0x01 at a period of 10ms. Sending the calculation result at a period of 10ms is a millisecond-level task, which needs to be sent through the CAN message with ID 0x01. That is, the configuration parameters selected by the user in the Mask interface are implemented by configuring the CAN module.

[0078] In the specific implementation, the algorithm model is placed in the Function-Call Subsystem associated with the TASK module, so as to associate the algorithm model with the millisecond-level task selected by the user.

[0079] Among them, users can choose from multiple preset millisecond-level tasks displayed in the TASK module.

[0080] The TASK module is usually used to implement task scheduling, allowing different tasks to be executed at different time intervals or when events occur. This task scheduling method is usually based on fixed time intervals, such as millisecond-level tasks. Through the TASK module, you can easily define and manage different tasks in the system and specify their execution frequency and priority.

[0081] Function-Call Subsystem is a function in Simulink that allows a group of functions to be encapsulated as a subsystem and executed by function calls.

[0082] By placing the algorithm model into the Function-Call Subsystem, it can be regarded as an integral unit. When scheduling tasks in the TASK module, the function modules in this subsystem (i.e., the algorithm model) can be conveniently called.

[0083] In one embodiment, the configuration interface 1 is further used to: receive a calibration amount input by a user;

[0084] Accordingly, the bottom engineering module 3 is also used for:

[0085] Compile the calibration quantity in the underlying project to obtain the A2L file; the A2L file is used to identify and modify the variables represented by the calibration quantity in the algorithm to be verified.

[0086] Among them, the A2L file is used to identify and modify the variables of quantitative characterization in the algorithm to be verified.

[0087] It should be noted that the calibration quantity is obtained by the user input in the configuration interface 1. The calibration quantity refers to the variable whose value can be directly modified by the calibration tool without modifying the model code in the future. All calibration quantities need to be identified by the A2L file when modified by the calibration tool. The user can put the values ​​that need to be continuously optimized and adjusted in the algorithm into the A2L file, and in subsequent tests, the performance of the current algorithm can be observed and optimized by directly adjusting the value of the calibration quantity.

[0088] Based on the above-mentioned embodiment of the present invention, a rapid prototype algorithm verification platform is disclosed. A configuration interface receives multiple configuration parameters corresponding to each functional module in the Simulink model library input by the user, and a configuration file is generated based on the configuration parameters and a script pre-written according to the AUTOSAR standard; the functional module is obtained by encapsulating the ECU abstract layer interface in the AUTOSAR standard; the configuration file contains configuration code that conforms to the AUTOSAR standard; the algorithm model of the algorithm to be verified is built based on the functional module selected by the user from the Simulink model library through the model building module; the model code corresponding to the algorithm model is generated through the underlying engineering module; the configuration file and the model code are compiled and linked in the underlying engineering pre-established based on the compiler to obtain a hex file for verifying the algorithm to be verified. In this solution, a script written based on the AUTOSAR standard and each functional module obtained by encapsulating the ECU abstract layer interface in the AUTOSAR standard are used to obtain a configuration file and a model code that conforms to the AUTOSAR standard, and are automatically integrated into the underlying engineering for compilation and linking, thereby saving manpower while improving the code reuse rate, thereby achieving the purpose of shortening the algorithm verification time.

[0089] like Figure 2 FIG. 1 is a flowchart of a rapid prototyping algorithm verification method disclosed in an embodiment of the present invention. The method is applied to any rapid prototyping algorithm verification platform disclosed in the above-mentioned embodiment of the present invention, and mainly includes the following steps:

[0090] Step S201: receiving a plurality of configuration parameters corresponding to each functional module in the Simulink model library input by the user.

[0091] In step S201 , the functional module is obtained by encapsulating the ECU abstraction layer interface in the AUTOSAR standard.

[0092] In the specific implementation process of step S201, the configuration parameter input entry of each functional module in the Simulink model library is displayed. For the configuration parameter input entry selected by the user, the interface for inputting the corresponding configuration parameter is jumped to receive the configuration parameters corresponding to the functional model input by the user in the configuration parameter input interface.

[0093] Step S202: Generate a configuration file based on the configuration parameters and a script pre-written according to the AUTOSAR standard.

[0094] In step S202 , the configuration file includes configuration codes that comply with the AUTOSAR standard.

[0095] It should be noted that when the script is written in advance according to the AUTOSAR standard, a rule for generating code is designed in the script so that the configuration code in the configuration file generated by the script complies with the AUTOSAR standard.

[0096] In one embodiment, after generating the configuration file, the script places the configuration file in a corresponding position in the underlying project pre-established based on the compiler.

[0097] Step S203: Building an algorithm model of the algorithm to be verified based on the functional modules selected by the user from the Simulink model library.

[0098] Among them, examples of functional modules included in the Simulink model library have been mentioned in the above-mentioned embodiments of the present invention and will not be repeated here.

[0099] In step S203, a function module can be selected from the Simulink model library according to the dragging operation of the user, and the algorithm model of the algorithm to be verified can be built through the Simulink editor.

[0100] In one embodiment, after step S203 is executed, the method further includes:

[0101] For each functional module in the algorithm model, the target configuration parameter selected by the user from multiple configuration parameters corresponding to the functional module is determined, and the configuration function corresponding to the functional module is called to configure the functional module to obtain the configured algorithm model.

[0102] Among them, the configuration function is pre-written for each functional module.

[0103] In one embodiment, after step S203 is executed, the method further includes:

[0104] If the functional modules constituting the algorithm model include a TASK module, then in response to the millisecond-level task specified by the user in the TASK module, the algorithm model is associated with the millisecond-level task specified by the user.

[0105] Among them, the TASK module contains multiple preset millisecond-level tasks.

[0106] Step S204: Generate a model code corresponding to the algorithm model, compile and link the configuration file and the model code in a bottom-level project pre-established based on a compiler, and obtain a hex file for verifying the algorithm to be verified.

[0107] In the specific implementation process of step S204, the storage path input by the user is received; the embedded encoder in Matlab is called to generate the model code corresponding to the algorithm model; the configuration file, the model code and the header file corresponding to the model code are stored in the underlying project; the header file contains the declaration and definition of the model code; based on the configuration file and the model code, it is compiled and linked in the underlying project to obtain a hex file; and the hex file is copied to the storage path.

[0108] It should be noted that the embedded coder in Matlab is called to generate the model code corresponding to the algorithm model according to the TLC file.

[0109] By adding scripts written in advance, configuration files, model codes, and header files corresponding to the model codes are added to the underlying project, and the compilation and linking are controlled to obtain the hex file.

[0110] In one embodiment, receiving a calibration amount input by a user;

[0111] Compile the calibration quantity in the underlying project to obtain the A2L file.

[0112] Among them, the A2L file is used to identify and modify the variables of quantitative characterization in the algorithm to be verified.

[0113] It should be noted that the embodiments of the present invention are Figure 1 The corresponding embodiments of the present invention correspond to each other, and related explanations can be referred to each other.

[0114] It should be noted that the development process of the rapid prototyping algorithm verification platform based on Matlab is as follows:

[0115] Use APP Designer under Matlab to design the configuration interface, which contains the parameter configuration entries of each functional module in the Simulink module library.

[0116] Among them, the Simulink module library is obtained by encapsulating the ECU abstraction layer interface in the AUTOSAR standard.

[0117] Write corresponding configuration functions for each functional module, and the configuration functions are used to implement parameter configuration and modification functions.

[0118] Write a script for generating AUTOSAR-compliant code. The script is used to generate a configuration file containing AUTOSAR-compliant configuration code based on configuration parameters.

[0119] Write a module that supports the TLC file that Embedded Coder generates code for.

[0120] Based on the compiler, a low-level project including low-level driver core code and scheduler is established.

[0121] Specifically, the core code of the underlying driver is provided by the hardware manufacturer, and the function code and the scheduler code are written, and the corresponding link files are made based on different compilers, thus realizing a complete engineering software.

[0122] Write a code adding script, which is used to automatically add the model code generated by the encoder to the underlying project, control the compiler to compile and link, and generate hex files and A2L files.

[0123] The relevant files are packaged into a Matlab APP installation package. After installation, a rapid prototyping algorithm verification platform based on Matlab is obtained.

[0124] Among them, the relevant files are the codes used in the development process, the pictures used in the configuration interface design, the linked instruction documents, etc.

[0125] Based on a rapid prototype algorithm verification method disclosed in the above embodiment of the present invention, a configuration interface receives multiple configuration parameters corresponding to each functional module in the Simulink model library input by the user, and generates a configuration file based on the configuration parameters and a script pre-written according to the AUTOSAR standard; the functional module is obtained by encapsulating the ECU abstract layer interface in the AUTOSAR standard; the configuration file contains configuration code that conforms to the AUTOSAR standard; the algorithm model of the algorithm to be verified is built based on the functional module selected by the user from the Simulink model library through the model building module; the model code corresponding to the algorithm model is generated through the underlying engineering module; the configuration file and the model code are compiled and linked in the underlying engineering pre-established based on the compiler to obtain a hex file for verifying the algorithm to be verified. In this solution, a script written based on the AUTOSAR standard and each functional module obtained by encapsulating the ECU abstract layer interface in the AUTOSAR standard are used to obtain a configuration file and model code that conforms to the AUTOSAR standard, and are automatically integrated into the underlying engineering for compilation and linking, thereby saving manpower while improving the code reuse rate, thereby achieving the purpose of shortening the algorithm verification time.

[0126] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.

[0127] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0128] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A rapid prototyping algorithm verification platform, characterized in that: The rapid prototyping algorithm verification platform includes: a configuration interface, a model building module and an underlying engineering module; The configuration interface is used to receive multiple configuration parameters corresponding to each functional module in the Simulink model library input by the user, and generate a configuration file based on the configuration parameters and a script pre-written according to the AUTOSAR standard; the functional module is obtained by encapsulating the ECU abstraction layer interface in the AUTOSAR standard; the configuration file contains configuration code that complies with the AUTOSAR standard; The model building module is used to build an algorithm model of the algorithm to be verified based on the functional module selected by the user from the Simulink model library; The underlying engineering module is used to generate the model code corresponding to the algorithm model; the configuration file and the model code are compiled and linked in the underlying engineering pre-established based on the compiler to obtain a hex file for verifying the algorithm to be verified.

2. The rapid prototyping algorithm verification platform according to claim 1, characterized in that: The model building module is also used for: For each of the functional modules in the algorithm model, determine the target configuration parameters selected by the user from the multiple configuration parameters corresponding to the functional module, call the configuration function corresponding to the functional module to configure the functional module, and obtain the configured algorithm model; the configuration function is pre-written for each of the functional modules.

3. The rapid prototyping algorithm verification platform according to claim 1, characterized in that: The model building module is also used for: If the functional modules constituting the algorithm model include a TASK module, then in response to a millisecond-level task specified by the user in the TASK module, the algorithm model is associated with the millisecond-level task specified by the user; the TASK module includes a plurality of preset millisecond-level tasks.

4. The rapid prototyping algorithm verification platform according to claim 1, characterized in that: The bottom engineering module is specifically used for: Receive the storage path input by the user; Calling an embedded encoder to generate a model code corresponding to the algorithm model; The configuration file, the model code and the header file corresponding to the model code are stored in the underlying project; the header file contains the declaration and definition of the model code; Compile and link the configuration file and the model code in the underlying project to obtain a hex file; Copy the hex file to the storage path.

5. The rapid prototyping algorithm verification platform according to any one of claims 1 to 4, characterized in that: The configuration interface is further used to: receive a calibration quantity input by a user; Accordingly, the bottom engineering module is also used for: The calibration quantity is compiled in the underlying project to obtain an A2L file; the A2L file is used to identify and modify the variables represented by the calibration quantity in the algorithm to be verified.

6. A rapid prototyping algorithm verification method, characterized in that: The method is applied to the rapid prototyping algorithm verification platform according to any one of claims 1 to 5, and the method comprises: Receiving multiple configuration parameters corresponding to each functional module in the Simulink model library input by the user; the functional module is obtained by encapsulating the ECU abstraction layer interface in the AUTOSAR standard; Generate a configuration file based on the configuration parameters and a script pre-written according to the AUTOSAR standard; the configuration file includes a configuration code that complies with the AUTOSAR standard; Building an algorithm model of the algorithm to be verified based on the functional modules selected by the user from the Simulink model library; Generate a model code corresponding to the algorithm model, compile and link the configuration file and the model code in an underlying project pre-established based on a compiler, and obtain a hex file for verifying the algorithm to be verified.

7. The rapid prototyping algorithm verification method according to claim 6, characterized in that: After building the algorithm model of the algorithm to be verified based on the functional module selected by the user from the Simulink model library, the method further includes: For each of the functional modules in the algorithm model, determine the target configuration parameters selected by the user from the multiple configuration parameters corresponding to the functional module, call the configuration function corresponding to the functional module to configure the functional module, and obtain the configured algorithm model; the configuration function is pre-written for each of the functional modules.

8. The rapid prototyping algorithm verification method according to claim 6, characterized in that: After building the algorithm model of the algorithm to be verified based on the functional module selected by the user from the Simulink model library, the method further includes: If the functional modules constituting the algorithm model include a TASK module, then in response to a millisecond-level task specified by the user in the TASK module, the algorithm model is associated with the millisecond-level task specified by the user; the TASK module includes a plurality of preset millisecond-level tasks.

9. The rapid prototyping algorithm verification method according to claim 6, characterized in that: The generating of the model code corresponding to the algorithm model, compiling and linking the configuration file and the model code in a bottom-level project pre-established based on a compiler, and obtaining a hex file for verifying the algorithm to be verified, includes: Receive the storage path input by the user; Calling an embedded encoder to generate a model code corresponding to the algorithm model; The configuration file, the model code and the header file corresponding to the model code are stored in the underlying project; the header file contains the declaration and definition of the model code; Compile and link the configuration file and the model code in the underlying project to obtain a hex file; Copy the hex file to the storage path.

10. The rapid prototyping algorithm verification method according to any one of claims 6 to 9, characterized in that: The method further comprises: Receiving a calibration amount input by a user; The calibration quantity is compiled in the underlying project to obtain an A2L file; the A2L file is used to identify and modify the variables represented by the calibration quantity in the algorithm to be verified.

Citation Information

Patent Citations

  • General car code conversion method

    CN102622470A

  • Controller rapid prototype development method based on MATLAB platform

    CN112748904A

  • Shifting module AUTOSAR software component development method, device and equipment based on Simulink

    CN114879935A

  • Model development method based on Autosar architecture

    CN116737117A

  • ECU model code generation method and device, equipment, medium and product

    CN118860408A

Cited By

  • Performance analysis method and device for source address verification, equipment and storage medium

    CN121644210A