Test method and device for embedded control algorithm
An embedded control and test method technology, applied in the test field, can solve the problems of late intervention in test work, increase the cost of repairing problems, and restrict the correctness and accuracy of control algorithms, so as to improve test efficiency, reduce repair costs, and reduce work volume effect
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0023] figure 1 It is a flow chart of an embedded control algorithm testing method provided by Embodiment 1 of the present invention. The method can be executed by an embedded control algorithm testing device, and the device can be realized by software that can run on the MATLAB platform. see figure 1 The testing method of the embedded control algorithm provided by the present embodiment specifically includes the following steps:
[0024] Step 110, create a system test project to load the embedded system model, obtain at least one test case corresponding to the embedded system model, test judgment criteria and preset test data items to be saved.
[0025] Simulink, one of the most important components of MATLAB, is a multi-domain simulation and model-based design tool for dynamic and embedded systems. The system model created in Simulink can be composed of many different modules connected together in a set connection mode, and the module can be used as the basic unit of the s...
Embodiment 2
[0035] figure 2 It is a flow chart of an embedded control algorithm testing method provided by Embodiment 2 of the present invention. On the basis of the above-mentioned embodiments, this embodiment further adds the steps of test result analysis and regression testing. see figure 2 The testing method of the embedded control algorithm provided by the present embodiment specifically includes the following steps:
[0036] Step 210, create a system test project to load the embedded system model, obtain at least one test case corresponding to the embedded system model, test judgment criteria and preset test data items that need to be saved; wherein, the embedded system model is The model corresponding to the embedded system composed of user-defined S-function modules and standard modules created in Simulink, a visual simulation tool of MATLAB; the user-defined S-function module includes the system function S-function in MATLAB, which will The S-Function control module encapsula...
Embodiment 3
[0051] image 3 It is a schematic flowchart of a testing method for an embedded control algorithm provided by Embodiment 3 of the present invention. This embodiment can provide a preferred example based on the foregoing embodiments. see image 3 , the testing method of the embedded control algorithm that the present embodiment provides comprises the following steps:
[0052] Step 310, using the C MEXS file template included in the S-Function in MATLAB to call the embedded control algorithm used to store the controller in the embedded system to generate a target C MEXS file corresponding to the embedded control algorithm , the file includes the source file of the embedded control algorithm, the settings of the input, output, the relationship between the output and the input, the initial state and the global variable, and is stored under the setting folder with the extension name .c.
[0053] In this embodiment, in the C MEX S file template, #include "xxxx.c" is used to decla...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


