A rapid prototyping algorithm verification platform and method

By configuring the interface and model building module, configuration files and model codes that comply with the AUTOSAR standard are generated, solving the problems of low code reuse and long time consumption in existing technologies, and realizing the automated integration and consistency verification of the rapid prototype algorithm verification platform.

CN119536717BActive Publication Date: 2025-10-03BEIJING JINGWEI HIRAIN TECH CO INC
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the existing technology, the algorithm verification code generated by Matlab and EB software does not comply with the AUTOSAR standard, resulting in low code reuse rate, high manual participation, long time consumption, inability to verify in time, and inability to maintain consistency with the product development process.

Method used

Provides a rapid prototyping algorithm verification platform, receives user configuration parameters through the configuration interface, generates configuration files that comply with the AUTOSAR standard, builds algorithm models using model building modules, compiles and links them in the underlying project, generates hex files, and automatically integrates AUTOSAR standard functional modules.

Benefits of technology

It improves code reuse rate, saves manpower, shortens algorithm verification time, and achieves consistency with product development process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119536717B_ABST
    Figure CN119536717B_ABST
Patent Text Reader

Abstract

The present invention provides a rapid prototyping algorithm verification platform and method. This platform receives user-entered configuration parameters through a configuration interface, generates a configuration file based on the configuration parameters and a script written in accordance with the AUTOSAR standard, builds an algorithm model based on user-selected AUTOSAR-compliant functional modules, generates model code corresponding to the algorithm model, and compiles and links the configuration file and model code in the underlying engineering process to produce a hex file. In this solution, a script written in accordance with the AUTOSAR standard is used, along with various functional modules obtained by encapsulating the AUTOSAR standard's ECU abstraction layer interface. AUTOSAR-compliant configuration files and model code are then automatically integrated into the underlying engineering process for compilation and linking. This approach improves code reuse while reducing labor and ultimately shortens algorithm verification time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Rapid prototyping-based algorithm verification combines rapid prototyping with algorithm verification. It aims to quickly create algorithm prototypes and then verify and test them in real-world application scenarios to evaluate the algorithm's effectiveness and applicability. Both the model code corresponding to the algorithm model and the configuration code generated based on the algorithm model's configuration parameters must comply with the AUTOSAR (Automotive Open System Architecture) standard. The AUTOSAR standard is a software architecture standard for automotive electronic systems designed to ensure reliability, reusability, and scalability.

[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, technical personnel from different fields put the application layer algorithm code generated by Matlab, the configuration code generated by EB, and the driver code of MCAL into the same BSW (Basic Software) underlying driver project in the compiler for compilation and linking to generate executable code for algorithm verification, which consumes a lot of manpower and material resources. Another way is to generate an executable file using 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 both methods, the model code and the configuration code do not comply with 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 carried out in a timely manner, which cannot be consistent 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 while saving manpower, thereby achieving the purpose of shortening algorithm verification time.

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

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

[0007] The configuration interface is configured to receive multiple configuration parameters input by a user for 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; the functional module is obtained by encapsulating the ECU abstraction layer interface in the AUTOSAR standard; and the configuration file includes 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 modules 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 further used to:

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

[0012] Preferably, the model building module is further used to:

[0013] 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; the TASK module includes multiple preset millisecond-level tasks.

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

[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] Storing the configuration file, the model code and the header file corresponding to the model code 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 underlying engineering module is also used to:

[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 the embodiment of the present invention. The method includes:

[0024] Receive 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 modules selected by the user from the Simulink model library, the method further includes:

[0029] For each of the functional modules in the algorithm model, the target configuration parameters selected by the user from the multiple configuration parameters corresponding to the functional module are determined, and the configuration function corresponding to the functional module is called to configure the functional module to 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 modules 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 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; the TASK module includes multiple 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 to obtain 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] Storing the configuration file, the model code and the header file corresponding to the model code 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] Receive the calibration amount input by the 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 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 model code corresponding to the algorithm model; the configuration file and the model code are compiled and linked in an underlying engineering pre-established based on a compiler to obtain a hex file for verifying the algorithm to be verified. In this solution, scripts written based on the AUTOSAR standard and various functional modules obtained by encapsulating the ECU abstraction layer interface in the AUTOSAR standard are used 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 code reuse while saving manpower and 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 following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0043] Figure 1 This is an architectural 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 clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. 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 making creative efforts 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 encompass non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0047] like Figure 1 , which 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 for 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 includes 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 code generation rule 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 location 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 can enter multiple configuration parameters corresponding to this functional module 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 the 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-Side / Low-Side Driver Module, and TASK module: Task Scheduler Module.

[0058] In one embodiment, the model building module 2 is further configured to:

[0059] For each functional module in the algorithm model, the target configuration parameters selected by the user from multiple configuration parameters corresponding to the functional module are 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 function of parameter configuration and modification.

[0061] It's important to note that each functional module in the Simulink model library has a corresponding Mask interface. The Mask interface generally refers to the interface for editing module parameters in Simulink. In a Simulink model, each functional module has a set of parameters that users can customize and configure 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 them independently.

[0063] Among them, displaying all the configuration parameters for the functional module entered by the user in the configuration interface is realized through the model workspace in Matlab, that is, the configuration parameters for each functional module entered 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 select.

[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 on 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 underlying 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 underlying engineering pre-established based on the compiler to obtain a hex file for verifying the algorithm to be verified.

[0066] Bottom-level 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 the configuration file and model code in the underlying project to obtain a 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. 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] TLC files are used by the Embedded Coder to generate model code corresponding to the algorithm model. TLC files are typically used by developers of S-function modules in Simulink to customize specific behaviors or functions during code generation.

[0071] Verify the algorithm using a hex file. For example, you can load the generated hex file onto the target hardware using a suitable method, run the loaded hex file on the target hardware, and verify the algorithm using appropriate input data. You can also verify the correctness and performance of the algorithm by monitoring the target hardware output or other means.

[0072] In one embodiment, the model building module 2 is further configured 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 it 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 on the target hardware.

[0077] For example, the result of the 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, it is achieved by configuring the CAN module through the configuration parameters selected by the user in the Mask interface.

[0078] In the specific implementation, the algorithm model is placed in the Function-Call Subsystem associated with the TASK module, thereby associating 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 commonly used to implement task scheduling, allowing different tasks to be executed at different time intervals or when events occur. This task scheduling approach is typically based on fixed time intervals, such as millisecond-level tasks. The TASK module makes it easy to define and manage different tasks in the system, specifying 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 through 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 quantitative data in the underlying project to obtain the A2L file; the A2L file is used to identify and modify the variables represented by the quantitative data in the algorithm to be verified.

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

[0087] It should be noted that calibration quantities are entered by the user in Configuration Interface 1. Calibration quantities refer to variables whose values ​​can be modified directly using the calibration tool without modifying the model code. All calibration quantities require an A2L file to identify them when modified using the calibration tool. Users can place algorithm values ​​that require continuous optimization and adjustment in the A2L file. During subsequent testing, they can directly adjust the calibration quantities to observe and optimize the performance of the current algorithm.

[0088] Based on the above-mentioned embodiment of the present invention, a rapid prototyping algorithm verification platform is disclosed. A configuration interface receives multiple configuration parameters corresponding to each functional module in a Simulink model library input by a user, and generates a configuration file based on the configuration parameters and a script pre-written according to the AUTOSAR standard. The functional modules are 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 builds an algorithm model of the algorithm to be verified based on the functional modules selected by the user from the Simulink model library. The underlying engineering module generates model code corresponding to the algorithm model. The configuration file and model code are compiled and linked in a pre-built underlying engineering based on a compiler to obtain a hex file for verifying the algorithm to be verified. In this solution, a script written according to the AUTOSAR standard is used to encapsulate the various functional modules obtained by encapsulating the ECU abstraction layer interface in the AUTOSAR standard. Configuration files and model code that comply with the AUTOSAR standard are generated and automatically integrated into the underlying engineering for compilation and linking, thereby improving code reuse while saving manpower and thus shortening 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 of the rapid prototyping algorithm verification platforms disclosed in the above embodiments 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 corresponding configuration parameter input interface is jumped to receive the configuration parameters corresponding to the functional model entered 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 code that complies with the AUTOSAR standard.

[0095] It should be noted that when the script is written in advance according to the AUTOSAR standard, a code generation rule 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 location 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 embodiments of the present invention and will not be repeated here.

[0099] In step S203 , a function module may be selected from the Simulink model library according to a dragging operation of the user, and the algorithm model of the algorithm to be verified may be constructed 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 parameters selected by the user from multiple configuration parameters corresponding to the functional module are 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 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, 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, the 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 quantitatively in the underlying project to obtain the A2L file.

[0112] Among them, the A2L file is used to identify and modify the variables for 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 relevant explanations can be referred to each other.

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

[0115] Use APP Designer under Matlab to design the configuration interface, which contains the parameter configuration entry 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 code that complies with the AUTOSAR standard. The script is used to generate a configuration file containing configuration code that complies with the AUTOSAR standard based on configuration parameters.

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

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

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

[0122] Write a code addition 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 the above-mentioned embodiment of the present invention, a rapid prototyping algorithm verification method is disclosed. A configuration interface receives multiple configuration parameters corresponding to each functional module in a Simulink model library input by a user, and generates a configuration file based on the configuration parameters and a script pre-written according to the AUTOSAR standard. The functional modules are 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 builds an algorithm model of the algorithm to be verified based on the functional modules selected by the user from the Simulink model library. The underlying engineering module generates model code corresponding to the algorithm model. The configuration file and model code are compiled and linked in an underlying engineering pre-built based on a compiler to obtain a hex file for verifying the algorithm to be verified. In this solution, a script written according to the AUTOSAR standard is used to encapsulate the functional modules obtained by encapsulating the ECU abstraction layer interface in the AUTOSAR standard. Configuration files and model code that comply with the AUTOSAR standard are generated and automatically integrated into the underlying engineering for compilation and linking, thereby improving code reuse while saving manpower and thus shortening algorithm verification time.

[0126] Each embodiment in this specification is described in a progressive manner. The same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple. For relevant parts, 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 can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without expending 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 above description has generally described the components and steps of each example according to their functions. 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 beyond the scope of the present invention.

[0128] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily 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 is not limited to the embodiments shown herein but is intended to conform 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 configured to receive multiple configuration parameters input by a user for 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; the functional module is obtained by encapsulating the ECU abstraction layer interface in the AUTOSAR standard; and the configuration file includes 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 modules 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 to: For each of the functional modules in the algorithm model, the target configuration parameters selected by the user from the multiple configuration parameters corresponding to the functional module are determined, and the configuration function corresponding to the functional module is called to configure the functional module to 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 to: 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; the TASK module includes multiple 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; Storing the configuration file, the model code and the header file corresponding to the model code 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 underlying engineering module is also used to: 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: Receive 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 an algorithm model of the algorithm to be verified based on the functional modules selected by the user from the Simulink model library, the method further includes: For each of the functional modules in the algorithm model, the target configuration parameters selected by the user from the multiple configuration parameters corresponding to the functional module are determined, and the configuration function corresponding to the functional module is called to configure the functional module to 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 an algorithm model of the algorithm to be verified based on the functional modules 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 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; the TASK module includes multiple 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; Storing the configuration file, the model code and the header file corresponding to the model code 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: Receive the calibration amount input by the 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