CN116756047B - Software development method and system of vehicle controller based on GPT - Google Patents

Software development method and system of vehicle controller based on GPT Download PDF

Info

Publication number
CN116756047B
CN116756047B CN202311028548.2A CN202311028548A CN116756047B CN 116756047 B CN116756047 B CN 116756047B CN 202311028548 A CN202311028548 A CN 202311028548A CN 116756047 B CN116756047 B CN 116756047B
Authority
CN
China
Prior art keywords
model
loss
initial
code
gpt
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311028548.2A
Other languages
Chinese (zh)
Other versions
CN116756047A (en
Inventor
龚循飞
邓建明
罗锋
于勤
张俊
熊慧慧
张萍
樊华春
廖程亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangxi Isuzu Motors Co Ltd
Original Assignee
Jiangxi Isuzu Motors Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangxi Isuzu Motors Co Ltd filed Critical Jiangxi Isuzu Motors Co Ltd
Priority to CN202311028548.2A priority Critical patent/CN116756047B/en
Publication of CN116756047A publication Critical patent/CN116756047A/en
Application granted granted Critical
Publication of CN116756047B publication Critical patent/CN116756047B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3696Methods or tools to render software testable
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Software Systems (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a software development method and a system of a vehicle controller based on GPT, which relate to the technical field of vehicles, and the method comprises the following steps: receiving an instruction input by a user, and generating a simulation model by using a GPT technology; modifying the simulation model through a simulation tool to form an initial model, leading out the initial model, and carrying out model-in-loop testing on the initial model until a testing result meeting preset requirements is obtained to form a final model; analyzing the final model through an auxiliary tool, generating a program code and a machine code, and burning the machine code into a controller; the invention can solve the technical problems that the model design in the prior art is complex and difficult and the bidirectional mapping and synchronization with the codes can not be realized.

Description

Software development method and system of vehicle controller based on GPT
Technical Field
The invention relates to the technical field of vehicles, in particular to a software development method and system of a vehicle controller based on GPT.
Background
The definition (Model Based Definition, MBD for short) based on the model is a project development method for expanding around the model, and is aimed at accurately modeling an object or a project product, and the core idea is to integrate detailed information such as product size, geometric tolerance, reference, surface roughness and the like related to a three-dimensional solid model into the three-dimensional solid model uniformly, and use the integrated three-dimensional solid model to completely express definition information of the product, and use the integrated three-dimensional solid model as the sole basis in the product manufacturing process, so that the mode of expressing the solid model by using a two-dimensional CAD drawing in the traditional structural design process is completely abandoned, and the data uniqueness in the whole product life cycle is ensured. Disambiguation generated in the data transmission process is eliminated, and the efficiency of product design is greatly improved.
The MBD is applied to the automotive field, and requires a user to master various tools, such as three-dimensional CAD software modeling, use of simulation tools, and construction and analysis of models, otherwise, effective or optimized codes cannot be generated, the process implementation is complex and difficult, and the modification of the models is time-consuming and laborious.
Disclosure of Invention
Aiming at the defects of the prior art, the invention aims to provide a software development method of a vehicle controller based on GPT, which aims to solve the technical problems of complex and difficult model design in the prior art.
An aspect of the present invention is to provide a software development method of a GPT-based vehicle controller, the method including:
receiving an instruction input by a user, and generating a simulation model by using a GPT technology;
modifying the simulation model by a simulation tool to form an initial model, leading out the initial model, carrying out model-in-loop test on the initial model until a test result meeting the preset requirement is obtained to form a final model,
calculating model losses of the simulation model and the final model,
wherein y is i For the final model of the ith position, x i For the simulation model of the ith position, loss M For model loss, i=1,..n,
it is determined whether the model loss exceeds a threshold,
if not, not updating the simulation model,
if yes, updating the simulation model, calculating the maximum loss value of the area in the model loss,
wherein Z is the regional maximum loss value,
generating an additional position signal for the GPT technology according to the position of the maximum loss value of the region and the instruction;
analyzing the final model through an auxiliary tool, generating a program code and a machine code, and burning the machine code into a controller;
and performing software on-loop test and verification on the program code, and performing hardware on-loop test and verification on the controller to obtain the created software.
Compared with the prior art, the invention has the beneficial effects that: the software development method of the vehicle controller based on the GPT simplifies the model design flow, specifically, receives the instruction input by the user, and utilizes the GPT technology to enable the instruction to generate the simulation model, so that the model design flow can be effectively simplified, the simulation model can be obtained only by inputting the instruction, autonomous three-dimensional modeling is not needed, and the development efficiency is improved; modifying the simulation model through a simulation tool to form an initial model, leading out the initial model, and carrying out model-in-loop testing on the initial model until a testing result meeting preset requirements is obtained, forming a final model, and testing the model to improve development quality and accuracy; analyzing the final model through an auxiliary tool, generating a program code and a machine code, and burning the machine code into a controller; the invention connects the design, test and verification of software in series through GPT technology, realizes the bidirectional mapping and synchronization between input text and model design, code generation, test and verification, etc., greatly improves the development efficiency and quality, reduces the development cost and risk, improves the interactive experience of users, and solves the technical problems of complex and difficult model design in the prior art.
According to an aspect of the foregoing technical solution, the instruction includes text in natural language and an initial simulation model.
According to an aspect of the above technical solution, the step of receiving an instruction input by a user and generating a simulation model by using a GPT technology includes:
receiving a text of natural language input by a user, and converting the text into an input signal and an initial condition by using a GPT technology;
and constructing a simulation model according to the input signals and the initial conditions.
According to an aspect of the foregoing technical solution, the method further includes:
receiving a text and an initial simulation model of natural language input by a user, and converting the text into an input signal and initial conditions by using a GPT technology;
and modifying the initial simulation model according to the input signal and the initial condition to form a simulation model.
According to one aspect of the above technical solution, modifying the simulation model by a simulation tool to form an initial model, deriving the initial model, and performing model-in-loop testing on the initial model until a test result meeting a preset requirement is obtained, thereby forming a final model, including the steps of:
modifying the simulation model through a simulation tool to form an initial model, and leading out the initial model;
performing model ring test on the initial model to obtain a test result, and judging whether the test result meets preset requirements;
if yes, forming a final model;
if not, screening out test items which do not meet the preset requirements, redefining initial conditions according to the test items, substituting the initial model into the initial simulation model, modifying the initial simulation model to form a simulation model, and continuing to repeat the steps.
According to an aspect of the above technical solution, error checking and repairing are performed on the program code and the machine code by a debugger, so as to form code loss, wherein the code loss comprises code grammar loss, code logic loss and code efficiency loss;
obtaining initial code loss according to the code grammar loss and the code logic loss, and judging whether the initial code loss is lower than a preset code loss threshold value or not;
if yes, repairing the code efficiency loss;
if not, repairing the code grammar loss and the code logic loss.
According to an aspect of the foregoing technical solution, the calculation formula of the initial code loss is:
;
wherein L is 1 L for the code syntax loss 2 For the code logic loss, W 1 ,W 2 The weights of the code syntax loss and the code logic loss, respectively.
Another aspect of the present invention provides a software development system for a GPT-based vehicle controller, for implementing the software development method for a GPT-based vehicle controller, where the system includes:
the instruction input module is used for receiving an instruction input by a user and generating a simulation model by utilizing a GPT technology;
the model acquisition module is used for modifying the simulation model through a simulation tool to form an initial model, deriving the initial model, carrying out model-in-loop test on the initial model until a test result meeting the preset requirement is obtained to form a final model,
calculating model losses of the simulation model and the final model,
wherein y is i For the final model of the ith position, x i For the simulation model of the ith position, loss M For model loss, i=1,..n,
it is determined whether the model loss exceeds a threshold,
if not, not updating the simulation model,
if yes, updating the simulation model, calculating the maximum loss value of the area in the model loss,
wherein Z is the regional maximum loss value,
generating an additional position signal for the GPT technology according to the position of the maximum loss value of the region and the instruction;
the model analysis module is used for analyzing the final model through an auxiliary tool, generating a program code and a machine code, and burning the machine code into the controller;
and the software testing module is used for carrying out software on-loop testing and verification on the program codes and carrying out hardware on-loop testing and verification on the controller to obtain the created software.
Drawings
The foregoing and/or additional aspects and advantages of the invention will become apparent and may be better understood from the following description of embodiments taken in conjunction with the accompanying drawings in which:
fig. 1 is a flowchart of a software development method of a GPT-based vehicle controller according to a first embodiment of the present invention;
FIG. 2 is a block diagram of a software development system of a GPT based vehicle controller in a second embodiment of the invention;
description of the drawings element symbols:
the system comprises an instruction input module 100, a model acquisition module 200, a model analysis module 300 and a software test module 400.
Detailed Description
In order to make the objects, features and advantages of the present invention more comprehensible, embodiments accompanied with figures are described in detail below. Several embodiments of the invention are presented in the figures. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
It will be understood that when an element is referred to as being "mounted" on another element, it can be directly on the other element or intervening elements may also be present. When an element is referred to as being "connected" to another element, it can be directly connected to the other element or intervening elements may also be present. The terms "vertical," "horizontal," "left," "right," "upper," "lower," and the like are used herein for descriptive purposes only and not to indicate or imply that the apparatus or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore should not be construed as limiting the invention.
In the present invention, unless explicitly stated and limited otherwise, the terms "mounted," "connected," "secured," and the like are to be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communication between two elements. The specific meaning of the above terms in the present invention can be understood by those of ordinary skill in the art according to the specific circumstances. The term "and/or" as used herein includes any and all combinations of one or more of the associated listed items.
Example 1
Referring to fig. 1, a software development method of a GPT-based vehicle controller according to a first embodiment of the present invention is shown, and the method includes steps S10-S13:
step S10, receiving an instruction input by a user, and generating a simulation model by using a GPT technology;
wherein the instructions comprise text in natural language and an initial simulation model.
Receiving a text of natural language input by a user, and converting the text into an input signal and an initial condition by using a GPT technology;
and constructing a simulation model according to the input signals and the initial conditions.
The simulation model is a Simulink model, and the Simulink is a modular graph environment and is used for multi-domain simulation and model-based design. It supports system design, simulation, automatic code generation, and continuous testing and verification of embedded systems. Simulink provides a graphic editor, a customizable library of modules, and a solver, enabling dynamic system modeling and simulation.
For example, the user: the VCU whole vehicle controller software is developed, the power system, the braking system, the steering system and the auxiliary system of the new energy automobile CAN be controlled, certain safety, reliability and efficiency are met, and a communication protocol based on a CAN bus and a compiler based on C are used.
The GPT technology is utilized to convert the input signals into a simulation model which comprises modules of each system, a sensor, a controller, an actuator and the like of the new energy automobile, and the initial conditions are safety, reliability and efficiency.
And constructing a simulation model according to the input signals and the initial conditions.
Specifically, the GPT technology constructs a simulation model which is a deep transducer network and consists of a plurality of encoder layers, wherein each encoder layer comprises a self-attention mechanism and a feedforward neural network, and the simulation model is constructed through word embedding matrixes, position embedding matrixes, multi-head self-attention mechanisms, the feedforward neural network, residual connection, layer normalization and linear transformation.
Wherein a word embedding matrix is used for converting the input signal and the initial condition into a vector representation;
a position embedding matrix for adding position information to the input signal and the initial condition;
a multi-headed self-attention mechanism in the encoder layer for calculating correlations between the input signal and different positions in the initial condition;
a feedforward neural network in the encoder layer for non-linearly transforming the output of the self-attention mechanism;
residual connection between encoder layers for retaining low-level characteristic information;
layer normalization between encoder layers for stabilizing the training process of the model;
a linear transformation in the output layer for converting the final output of the encoder layer into a probability distribution for each word in the vocabulary.
Or receiving a text and an initial simulation model of natural language input by a user, and converting the text into an input signal and initial conditions by using a GPT technology;
and modifying the initial simulation model according to the input signal and the initial condition to form a simulation model.
For example, the user: the VCU whole vehicle controller software is developed, the power system, the braking system, the steering system and the auxiliary system of the new energy automobile CAN be controlled, certain safety, reliability and efficiency are met, and a communication protocol based on a CAN bus and a compiler based on C are used.
The user: an off-the-shelf initial simulation model is provided.
The GPT technology is utilized to convert the input signals into a simulation model which comprises modules of each system, a sensor, a controller, an actuator and the like of the new energy automobile, and the initial conditions are safety, reliability and efficiency.
And modifying the initial simulation model according to the input signal and the initial condition to form a simulation model.
Furthermore, before the step of receiving an instruction input by a user, causing the instruction to generate a simulation model using GPT technology, the method includes:
and acquiring a text input by a historical user of the vehicle and a corresponding historical simulation model, and learning and pre-training the GPT technology to form a mapping relation between the text input by the user and the simulation model.
Specifically, the GPT technology is learned and pre-trained on a text input by a historical user and a corresponding historical simulation model in an unsupervised or semi-supervised mode. The pre-training enables the GPT technology to learn the mapping relation between the text input by the history user and the corresponding history simulation model according to the text input by the history user, so that the universality and the adaptability of the GPT technology are improved. The goal of the pre-training is to fine tune the GPT technique to meet the accuracy and stability requirements of automatically generating and modifying the simulation model. Accuracy means that the generated or modified simulation model can conform to the intent and goal of the user input instruction. Stabilization means that the generated or modified simulation model can keep the original functions and performances unaffected.
Among them, unsupervised and semi-supervised are two methods of machine learning. Unsupervised learning refers to letting the GPT technique learn algorithms discover hidden structures or rules in the data themselves without labeling the data (i.e., without giving a correct answer or expecting an output). For example, clustering, dimension reduction, anomaly detection, etc. tasks are unsupervised learning. Semi-supervised learning refers to improving the performance of a GPT technology learning algorithm by utilizing the relevance between a small amount of marked data and a large amount of unmarked data. For example, semi-supervised learning may be used for tasks such as image classification, text classification, speech recognition, etc.
Step S11, modifying the simulation model through a simulation tool to form an initial model, leading out the initial model, carrying out model-in-loop test on the initial model until a test result meeting the preset requirement is obtained to form a final model,
calculating model losses of the simulation model and the final model,
wherein y is i For the final model of the ith position, x i For the simulation model of the ith position, loss M For model loss, i=1,..n,
it is determined whether the model loss exceeds a threshold,
if not, not updating the simulation model,
if yes, updating the simulation model, calculating the maximum loss value of the area in the model loss,
wherein Z is the regional maximum loss value,
generating an additional position signal for the GPT technology according to the position of the maximum loss value of the region and the instruction;
specifically, modifying the simulation model through a simulation tool to form an initial model, and leading out the initial model;
the simulation tool is a Simulink tool. A user can view, edit and modify a simulation model generated by the GPT technology through a simulation tool so as to form an initial model meeting the user requirements, and the experience of the user is improved.
Performing model ring test on the initial model to obtain a test result, and judging whether the test result meets preset requirements;
if yes, forming a final model;
if not, screening out test items which do not meet the preset requirements, redefining initial conditions according to the test items, substituting the initial model into the initial simulation model, modifying the initial simulation model to form a simulation model, and continuing to repeat the steps.
The preset requirements are that different test results meeting the requirements of different users are formulated according to different users.
When the test result does not meet the preset requirement, substituting the initial model into the initial simulation model, screening out test items which do not meet the preset requirement, redefining initial conditions according to the test items, and further modifying the initial model until the test result meets the preset requirement, and forming a final model.
In addition, the model ring test, abbreviated as MIL test, refers to that the initial model is used as a tested object and is interacted with other simulation environments to verify the functions and performances of the initial model.
Furthermore, the method comprises the following steps:
and according to the text input by the real-time user and the corresponding final model, performing zero-time learning, one-time learning and less-time learning on the GPT to obtain an updated simulation model.
The step can reduce the dependence on the labeling data, and reduce the cost and difficulty of data acquisition and labeling. Specifically, the strong text generation and understanding capability of the GPT technology is utilized to realize the adaptation to the development requirements of controller software in different fields and tasks. Zero-order learning refers to directly generating a simulation model from instructions input by a user without any example or prior knowledge. One-time learning refers to generating a simulation model according to instructions input by a user and an initial simulation model under the condition of one example or priori knowledge. The less learning refers to generating a simulation model according to instructions input by a user and an initial simulation model under the condition of a small amount of examples or priori knowledge.
In addition, the simulation model is updated in real time so as to finely adjust the simulation model, and accuracy and stability are improved.
Specifically, model losses of the simulation model and the final model are calculated, namely
Wherein y is i For the final model of the ith position, x i For the simulation model of the ith position, loss M For model loss, i=1.
Judging whether the model loss exceeds a threshold value or not;
if not, the simulation model is not updated.
If yes, updating the simulation model, generating an additional position signal for the GPT technology, and improving the accuracy and stability of the simulation model.
Further, the step of generating an additional position signal for the GPT technique specifically includes:
the area maximum loss value in the model loss, that is,
wherein Z is the regional maximum loss value.
And generating an additional position signal for the GPT technology according to the position of the maximum loss value of the region, the input signal and the initial condition, so that the additional position signal can be effectively extracted when the GPT technology converts the text, and the accuracy and the stability of the simulation model are improved.
Step S12, analyzing the final model through an auxiliary tool, generating a program code and a machine code, and burning the machine code into a controller;
wherein the auxiliary tool comprises a compiler, a debugger and a hardware interface.
Specifically, a compiler analyzes the final model to generate a program code and a machine code;
performing error checking and repairing on the program code and the machine code through a debugger;
the machine code is burned into the controller through the hardware interface.
In addition, the program code and the machine code are subjected to error checking and repairing by a debugger, and the code loss of the program code and the machine code comprises code grammar loss, code logic loss and code efficiency loss.
Wherein the code syntax loss L 1 The generated code does not accord with grammar rules or has the condition of error;
wherein F is whether the code meets the grammar rule, for example, meets the grammar rule f=1, and does not meet the grammar rule f=0; c is the number of code syntax errors present and A is the total number of codes.
Code logic loss L 2 The generated code is inconsistent with the simulation model or is incorrectly executed; for example, code logic loss L 2 May be expressed in terms of percentages, i.e., inconsistent occupancy rates.
Loss of code efficiency L 3 The generated code has too slow running speed or takes too much resources.
Loss of L according to code syntax 1 Sum code logic loss L 2 Obtaining initial code loss, and judging whether the initial code loss is lower than a preset code loss threshold value or not;
if yes, repairing the code efficiency loss.
If not, repairing code grammar loss L 1 Sum code logic loss L 2
Wherein the initial code loss is;W 1 ,W 2 Loss of code syntax L 1 Sum code logic loss L 2 Is a weight of (2).
And step S13, performing software on-loop test and verification on the program code, and performing hardware on-loop test and verification on the controller to obtain the created software.
The software ring test is abbreviated as SIL test, which refers to that generated program codes are used as tested objects and interact with other simulation environments to verify functions and performances of the program codes.
The hardware-in-loop test is abbreviated as HIL test, which refers to that generated executable machine codes are used as tested objects to interact with a real or simulated hardware environment so as to verify functions and performances of software and hardware.
Compared with the prior art, the software development method of the vehicle controller based on the GPT in the embodiment has the beneficial effects that: the software development method of the vehicle controller based on the GPT simplifies the model design flow, specifically, receives the instruction input by the user, generates the simulation model by utilizing the GPT technology, can effectively simplify the model design flow by the GPT technology, can obtain the simulation model by inputting the instruction, does not need autonomous three-dimensional modeling, and improves the development efficiency; modifying the simulation model through a simulation tool to form an initial model, leading out the initial model, and carrying out model-in-loop testing on the initial model until a testing result meeting preset requirements is obtained, forming a final model, and testing the model to improve development quality and accuracy; analyzing the final model through an auxiliary tool, generating a program code and a machine code, and burning the machine code into a controller; the invention connects the design, test and verification of software in series through GPT technology, realizes the bidirectional mapping and synchronization between input text and model design, code generation, test and verification, etc., greatly improves the development efficiency and quality, reduces the development cost and risk, improves the interactive experience of users, and solves the technical problems of complex and difficult model design in the prior art.
Example two
Referring to fig. 2, a software development system of a GPT-based vehicle controller according to a second embodiment of the present invention is shown, where the system includes:
the instruction input module 100 is configured to receive an instruction input by a user, and generate a simulation model using a GPT technique;
wherein the instructions comprise text in natural language and an initial simulation model.
On one hand, receiving a text of a natural language input by a user, and converting the text into an input signal and an initial condition by using a GPT technology;
and constructing a simulation model according to the input signals and the initial conditions.
On the other hand, receiving a text and an initial simulation model of natural language input by a user, and converting the text into an input signal and initial conditions by using a GPT technology;
and modifying the initial simulation model according to the input signal and the initial condition to form a simulation model.
Further, the simulation model can be built by itself through the GPT technology, and also can be built through an initial simulation model provided for a user.
Furthermore, before the step of receiving an instruction input by a user, causing the instruction to generate a simulation model using GPT technology, the method includes:
and acquiring a text input by a historical user of the vehicle and a corresponding historical simulation model, and learning and pre-training the GPT technology to form a mapping relation between the text input by the user and the simulation model.
Further, the GPT technology is constructed and modified to form a simulation model, and the mapping relation between the text input by the user and the simulation model is formed according to a large amount of learning and pre-training, so that the GPT technology can be effectively constructed and modified to form the simulation model.
The model acquisition module 200 is configured to modify the simulation model through a simulation tool to form an initial model, derive the initial model, perform model-in-loop testing on the initial model until a test result meeting a preset requirement is obtained, form a final model,
calculating model losses of the simulation model and the final model,
wherein y is i For the final model of the ith position, x i For the simulation model of the ith position, loss M For model loss, i=1,..n,
it is determined whether the model loss exceeds a threshold,
if not, not updating the simulation model,
if yes, updating the simulation model, calculating the maximum loss value of the area in the model loss,
wherein Z is the regional maximum loss value,
generating an additional position signal for the GPT technology according to the position of the maximum loss value of the region and the instruction;
modifying the simulation model through a simulation tool to form an initial model, and leading out the initial model;
further, a user can view, edit and modify the simulation model generated by the GPT technology through a simulation tool to form an initial model meeting the requirements of the user.
Performing model ring test on the initial model to obtain a test result, and judging whether the test result meets preset requirements;
if yes, forming a final model;
if not, screening out test items which do not meet the preset requirements, redefining initial conditions according to the test items, substituting the initial model into the initial simulation model, modifying the initial simulation model to form a simulation model, and continuing to repeat the steps.
The preset requirements are that different test results meeting the requirements of different users are formulated according to different users.
In addition, the model ring test, abbreviated as MIL test, refers to that the initial model is used as a tested object and is interacted with other simulation environments to verify the functions and performances of the initial model.
Furthermore, the method comprises the following steps:
and according to the text input by the real-time user and the corresponding final model, performing zero-time learning, one-time learning and less-time learning on the GPT to obtain an updated simulation model.
The simulation model is updated in real time to carry out fine adjustment on the simulation model, and accuracy and stability are improved.
The model analysis module 300 is configured to analyze the final model through an auxiliary tool, generate a program code and a machine code, and burn the machine code into a controller;
wherein the auxiliary tool comprises a compiler, a debugger and a hardware interface.
Specifically, the compiler analyzes the final model to generate a program code and a machine code;
performing error checking and repairing on the program code and the machine code through a debugger;
and burning the machine code into a controller through the hardware interface.
And the software testing module 400 is used for performing software on-loop testing and verification on the program codes and performing hardware on-loop testing and verification on the controller to obtain the created software.
The software ring test is abbreviated as SIL test, which refers to that generated program codes are used as tested objects and interact with other simulation environments to verify functions and performances of the program codes.
The hardware-in-loop test is abbreviated as HIL test, which refers to that generated executable machine codes are used as tested objects to interact with a real or simulated hardware environment so as to verify functions and performances of software and hardware.
Compared with the prior art, the software development system of the GPT-based vehicle controller shown in the embodiment has the beneficial effects that: the software development system of the vehicle controller based on the GPT provided by the invention simplifies the model design flow, specifically, the GPT technology can effectively simplify the model design flow, and a simulation model can be obtained only by inputting instructions, so that autonomous three-dimensional modeling is not required, and the development efficiency is improved; testing the model through a model acquisition module to improve the development quality and accuracy; the invention connects the design, test and verification of the software in series through the GPT technology, realizes the bidirectional mapping and synchronization between the input text and the design, code generation, test and verification of the model, etc., greatly improves the development efficiency and quality, reduces the development cost and risk, improves the interactive experience of users, and solves the technical problem of complex and difficult model design in the prior art.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The foregoing examples illustrate only a few embodiments of the invention and are described in detail herein without thereby limiting the scope of the invention. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the invention, which are all within the scope of the invention. Accordingly, the scope of protection of the present invention is to be determined by the appended claims.

Claims (8)

1. A method for software development of a GPT-based vehicle controller, the method comprising:
receiving an instruction input by a user, and generating a simulation model by using a GPT technology;
modifying the simulation model by a simulation tool to form an initial model, leading out the initial model, carrying out model-in-loop test on the initial model until a test result meeting the preset requirement is obtained to form a final model,
calculating model losses of the simulation model and the final model,
wherein y is i For the final model of the ith position, x i For the simulation model of the ith position, loss M For model loss, i=1,..n,
it is determined whether the model loss exceeds a threshold,
if not, not updating the simulation model,
if yes, updating the simulation model, calculating the maximum loss value of the area in the model loss,
wherein Z is the regional maximum loss value,
generating an additional position signal for the GPT technology according to the position of the maximum loss value of the region and the instruction;
analyzing the final model through an auxiliary tool, generating a program code and a machine code, and burning the machine code into a controller;
and performing software on-loop test and verification on the program code, and performing hardware on-loop test and verification on the controller to obtain the created software.
2. The method of claim 1, wherein the instructions comprise text in natural language and an initial simulation model.
3. The method for developing software for a GPT-based vehicle controller according to claim 2, wherein the step of receiving an instruction input by a user, and using a GPT technique to cause the instruction to generate a simulation model, comprises:
receiving a text of natural language input by a user, and converting the text into an input signal and an initial condition by using a GPT technology;
and constructing a simulation model according to the input signals and the initial conditions.
4. The GPT-based vehicle controller software development method of claim 3, further comprising:
receiving a text and an initial simulation model of natural language input by a user, and converting the text into an input signal and initial conditions by using a GPT technology;
and modifying the initial simulation model according to the input signal and the initial condition to form a simulation model.
5. The method for developing software for a GPT-based vehicle controller according to claim 4, wherein the step of modifying the simulation model by a simulation tool to form an initial model, deriving the initial model, and performing a model-in-loop test on the initial model until a test result meeting a preset requirement is obtained, and forming a final model, comprises the steps of:
modifying the simulation model through a simulation tool to form an initial model, and leading out the initial model;
performing model ring test on the initial model to obtain a test result, and judging whether the test result meets preset requirements;
if yes, forming a final model;
if not, screening out test items which do not meet the preset requirements, redefining initial conditions according to the test items, substituting the initial model into the initial simulation model, modifying the initial simulation model to form a simulation model, and continuing to repeat the steps.
6. The GPT-based vehicle controller software development method of claim 1, wherein the method
Performing error checking and repairing on the program code and the machine code through a debugger to form code loss, wherein the code loss comprises code grammar loss, code logic loss and code efficiency loss;
obtaining initial code loss according to the code grammar loss and the code logic loss, and judging whether the initial code loss is lower than a preset code loss threshold value or not;
if yes, repairing the code efficiency loss;
if not, repairing the code grammar loss and the code logic loss.
7. The GPT-based vehicle controller software development method of claim 6, wherein the initial code loss calculation formula is:
;
wherein L is 1 L for the code syntax loss 2 For the code logic loss, W 1 ,W 2 The weights of the code syntax loss and the code logic loss, respectively.
8. A software development system for a GPT-based vehicle controller, characterized by implementing a software development method for a GPT-based vehicle controller according to any one of claims 1 to 7, the system comprising:
the instruction input module is used for receiving an instruction input by a user and generating a simulation model by utilizing a GPT technology;
the model acquisition module is used for modifying the simulation model through a simulation tool to form an initial model, deriving the initial model, carrying out model-in-loop test on the initial model until a test result meeting the preset requirement is obtained to form a final model,
calculating model losses of the simulation model and the final model,
wherein y is i For the final model of the ith position, x i For the simulation model of the ith position, loss M For model loss, i=1,..n,
it is determined whether the model loss exceeds a threshold,
if not, not updating the simulation model,
if yes, updating the simulation model, calculating the maximum loss value of the area in the model loss,
wherein Z is the regional maximum loss value,
generating an additional position signal for the GPT technology according to the position of the maximum loss value of the region and the instruction; the model analysis module is used for analyzing the final model through an auxiliary tool, generating a program code and a machine code, and burning the machine code into the controller;
and the software testing module is used for carrying out software on-loop testing and verification on the program codes and carrying out hardware on-loop testing and verification on the controller to obtain the created software.
CN202311028548.2A 2023-08-16 2023-08-16 Software development method and system of vehicle controller based on GPT Active CN116756047B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311028548.2A CN116756047B (en) 2023-08-16 2023-08-16 Software development method and system of vehicle controller based on GPT

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311028548.2A CN116756047B (en) 2023-08-16 2023-08-16 Software development method and system of vehicle controller based on GPT

Publications (2)

Publication Number Publication Date
CN116756047A CN116756047A (en) 2023-09-15
CN116756047B true CN116756047B (en) 2023-12-29

Family

ID=87959412

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311028548.2A Active CN116756047B (en) 2023-08-16 2023-08-16 Software development method and system of vehicle controller based on GPT

Country Status (1)

Country Link
CN (1) CN116756047B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6862565B1 (en) * 2000-04-13 2005-03-01 Hewlett-Packard Development Company, L.P. Method and apparatus for validating cross-architecture ISA emulation
CN110619393A (en) * 2019-09-27 2019-12-27 上海交通大学 Traffic simulation software parameter calibration method, system and medium based on learning algorithm
WO2021217772A1 (en) * 2020-04-26 2021-11-04 平安科技(深圳)有限公司 Ai-based interview corpus classification method and apparatus, computer device and medium
CN116400670A (en) * 2023-04-19 2023-07-07 天地上海采掘装备科技有限公司 Simulation test method and system for coal mining machine control system
CN116415154A (en) * 2023-06-12 2023-07-11 江西五十铃汽车有限公司 GPT-based vehicle fault solution generation method and device
CN116450100A (en) * 2023-05-03 2023-07-18 北京易智联科技有限公司 Equipment development method and system based on generation type artificial intelligent model

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8694712B2 (en) * 2006-12-05 2014-04-08 Microsoft Corporation Reduction of operational costs of virtual TLBs

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6862565B1 (en) * 2000-04-13 2005-03-01 Hewlett-Packard Development Company, L.P. Method and apparatus for validating cross-architecture ISA emulation
CN110619393A (en) * 2019-09-27 2019-12-27 上海交通大学 Traffic simulation software parameter calibration method, system and medium based on learning algorithm
WO2021217772A1 (en) * 2020-04-26 2021-11-04 平安科技(深圳)有限公司 Ai-based interview corpus classification method and apparatus, computer device and medium
CN116400670A (en) * 2023-04-19 2023-07-07 天地上海采掘装备科技有限公司 Simulation test method and system for coal mining machine control system
CN116450100A (en) * 2023-05-03 2023-07-18 北京易智联科技有限公司 Equipment development method and system based on generation type artificial intelligent model
CN116415154A (en) * 2023-06-12 2023-07-11 江西五十铃汽车有限公司 GPT-based vehicle fault solution generation method and device

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Matlab/SIMULINK仿真的集成;邹剑锋;宋华振;张俊;吴瑶;;自动化与仪器仪表(04);全文 *
SLGPT: Using Transfer Learning to Directly Generate Simulink Model Files and Find Bugs in the Simulink Toolchain;Sohil Lal Shrestha , Christoph Csallner;arXiv;全文 *
基于软件组件库的柴油机ECU软件设计与实现;李欢;黄英;张付军;赵宇;葛彦悟;;汽车工程(12);全文 *
直升机人机耦合诱发振荡分析及研究;徐鹏辉;鞠艳秋;齐驰;;直升机技术(04);全文 *

Also Published As

Publication number Publication date
CN116756047A (en) 2023-09-15

Similar Documents

Publication Publication Date Title
CN112149316B (en) Aero-engine residual life prediction method based on improved CNN model
JP2022063240A (en) Method of and apparatus for simulating machine work on machine tool using self learning system
EP3846034B1 (en) Systems and methods for automated testing using artificial intelligence techniques
CN113168564A (en) Method and system for generating artificial intelligence model
CN112764738A (en) Code automatic generation method and system based on multi-view program characteristics
US6947870B2 (en) Neural network model for electric submersible pump system
CN113641819A (en) Multi-task sparse sharing learning-based argument mining system and method
CN114757286A (en) Multi-class fault data generation method based on conditional countermeasure generation network
CN113741886A (en) Statement level program repairing method and system based on graph
CN116756047B (en) Software development method and system of vehicle controller based on GPT
CN111267097B (en) Industrial robot auxiliary programming method based on natural language
CN116477375A (en) Material piling and taking control system and method based on artificial intelligence
CN107730002B (en) Intelligent fuzzy comparison method for remote control parameters of communication gateway machine
US20220108172A1 (en) Generating a simplified model for xil systems
CN116302088A (en) Code clone detection method, storage medium and equipment
Xu et al. Conv-Reluplex: A Verification Framework For Convolution Neural Networks (S).
CN113971032A (en) Full-process automatic deployment method and system of machine learning model for code generation
CN112734016A (en) Training method of neural network for detecting smoothness of surface of steel bar
CN112699722A (en) Method for fault diagnosis based on rotating machinery
KR102591312B1 (en) Apparatus and Method for Converting Neural Network
CN116958752B (en) Power grid infrastructure archiving method, device and equipment based on IPKCNN-SVM
CN117349186B (en) Program language defect positioning method, system and medium based on semantic flowsheet
CN117010459B (en) Method for automatically generating neural network based on modularization and serialization
KR102278284B1 (en) Apparatus and method for producing deep learning model using nested editable block
CN113553667B (en) Aircraft structural member design method based on deep learning

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant