Airborne single-chip microcomputer fault diagnosis method

By writing the fault equation model in XML format as a binary file and writing it to Flash, the problem that traditional fault equation systems are difficult to deploy on the on-board microcontroller is solved, and the fault equation system is deployed on the microcontroller with limited storage space is reduced.

CN119829315AActive Publication Date: 2025-04-15XIAN AVIATION COMPUTING TECH RES INST OF AVIATION IND CORP OF CHINA
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411810152.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2025-04-15
Estimated Expiration
2044-12-10

AI Technical Summary

Technical Problem

Traditional fault equation systems are difficult to deploy on airborne microcontrollers. They are mainly due to the lack of operating systems and file systems, limited storage space and computing power, and cannot run database management software. The fault equations are strictly distinguished from fault variables, and recursion is prohibited.

Method used

By defining the fault equation model file of the on-board microcontroller and writing it into Flash in XML format, the fault model binary file is executed using a preset program to achieve fault diagnosis. This method separates the static and dynamic parts of the fault equation system, and introduces large arrays to simulate memory allocation, reducing memory space requirements.

Benefits of technology

It realizes the deployment of fault equation system on an on-board microcontroller without operating system and file system, reduces the memory space requirement, is suitable for on-board microcontrollers with limited storage space, and realizes the cascade of fault equations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829315A_ABST
    Figure CN119829315A_ABST
Patent Text Reader

Abstract

The invention provides an airborne single-chip microcomputer fault diagnosis method, which relates to the field of airborne computer software, and comprises the following steps: defining a fault equation model file of an airborne single-chip microcomputer; writing the fault equation model file in an XML (Extensible Markup Language) format, storing the model file in the XML format as a binary file, generating a fault model binary file, and programming the fault model binary file to Flash of the single chip microcomputer; and executing the fault model binary file through a preset program in the single-chip microcomputer to obtain an airborne single-chip microcomputer fault diagnosis result. According to the method, a static part and a dynamic part of the fault equation system are separated, and a method for simulating memory allocation in a large array is introduced, so that the memory space required by the fault equation system is greatly reduced, and the method is suitable for an airborne single-chip microcomputer which has a limited storage space and does not have an operating system and a file system; and fault variables and fault equations in a traditional fault equation system are unified into fault equations, so that cascading of the fault equations is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of airborne computer software, and in particular to an airborne single-chip computer fault diagnosis method. Background Art

[0002] Aircraft fault diagnosis and health management (PHM) technology is a major component of onboard computer maintenance. Fault equations are an important part of PHM, which can calculate simple fault judgment results according to predetermined logic to obtain higher-level and more complex logical judgment results to support the PHM system to execute more complex response logic.

[0003] Traditional fault equations often store the model file of the fault equation in the file system in the form of SQL database, etc., and load the model file into the memory at startup. However, this method is difficult to apply to airborne microcontrollers for the following three reasons:

[0004] First, the onboard single-chip computer does not have an operating system or a file system, and the fault equation model cannot be stored in the file system in the form of a file;

[0005] Second, the storage space and computing power of the onboard MCU are extremely limited, and it is impossible to run database management software such as SQLite, so it is impossible to use the database on the onboard MCU;

[0006] Third, the memory space of the onboard microcontroller is also extremely limited. If the fault equation model file is loaded into the memory, it will cause a heavy burden on the memory.

[0007] In addition, the traditional fault equation model has the following two disadvantages:

[0008] First, the fault equation and the fault variable are strictly distinguished. The value of the fault variable comes from the outside world, and the value of the fault equation only comes from the logical operation between the fault variables, and cannot be the result obtained by the logical operation of other fault equations.

[0009] Second, embedded development prohibits recursion, but a change in a fault variable in a fault equation will cause all fault equations associated with it to change, and its logic is in a recursive form. Summary of the invention

[0010] In view of this, an embodiment of the present application provides an airborne single-chip microcomputer fault diagnosis method to solve the technical problem in the prior art that the fault equation system is difficult to deploy on the airborne single-chip microcomputer.

[0011] The embodiment of the present application provides the following technical solution: a method for diagnosing faults of an onboard single-chip microcomputer, comprising:

[0012] Define the fault equation model file of the onboard microcontroller;

[0013] Writing the fault equation model file in XML format, saving the model file in XML format as a binary file, generating a fault model binary file, and burning the fault model binary file into the Flash of the onboard single-chip computer;

[0014] The fault model binary file is executed by a preset program in the single-chip microcomputer to obtain the fault diagnosis result of the onboard single-chip microcomputer.

[0015] According to an embodiment of the present application, the fault diagnosis model file includes a fault equation model logic structure, and the fault equation model logic structure includes a data source equation association list, a fault equation number, and a fault equation information array;

[0016] The data source equation association list includes: the equation IDs of all fault equations under each data source, and the fault equation information array includes the equation name, equation ID, data source, position in the data source, equation length, equation expression and associated equation list of each fault equation.

[0017] According to one embodiment of the present application, the fault diagnosis model file also includes a fault equation model storage structure, and the fault equation model storage structure includes: a data source information list, a number of equations, a fault equation information list address, a data pool, a data source associated equation list, and a fault equation information list.

[0018] According to an embodiment of the present application, the fault model binary file is executed by a preset program in the single-chip microcomputer to obtain the fault diagnosis result of the onboard single-chip microcomputer, including:

[0019] Reading the fault model binary file from the Flash, constructing a complete fault equation model, and completing the initialization of the fault equation model;

[0020] Obtaining corresponding values ​​of a specified fault equation from the outside according to a data source and a position in the data source;

[0021] Analyze the fault equation expression and calculate it to obtain the value of the fault equation.

[0022] According to an embodiment of the present application, executing the fault model binary file through a preset program in the single-chip microcomputer to obtain the fault diagnosis result of the onboard single-chip microcomputer also includes:

[0023] After the value of the fault equation is obtained, the value of the current fault equation is updated according to the equation ID of the fault equation, and the values ​​of all other fault equations related to the fault equation are updated recursively by queue simulation.

[0024] According to one embodiment of the present application, the fault model binary file is executed by a preset program in the single-chip microcomputer to obtain the fault diagnosis result of the airborne single-chip microcomputer, which also includes: according to the data source number of the fault equation, reading the associated equation list of the data source from the fault equation model file, traversing all associated fault equations, and updating the values ​​of all associated fault equations under the data source.

[0025] Compared with the prior art, the beneficial effects that can be achieved by at least one of the above-mentioned technical solutions adopted in the embodiments of this specification include at least the following: the embodiments of the present invention propose a fault equation system for an airborne single-chip microcomputer without an operating system and a file system, separate the static part and the dynamic part of the fault equation system, and introduce a method for simulating memory allocation in a large array, which greatly reduces the memory space required for the fault equation system, making it suitable for airborne single-chip microcomputers with limited storage space and without an operating system and a file system, and unifies the fault variables and fault equations in the traditional fault equation system into a fault equation, thereby realizing the cascading of fault equations. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0027] Figure 1 It is a schematic diagram of the flow of the method for diagnosing faults of an onboard single-chip computer according to an embodiment of the present invention;

[0028] Figure 2 is a logical structure diagram of a fault equation model provided by an embodiment of the present invention;

[0029] Figure 3 It is a storage structure diagram of a fault equation model provided by an embodiment of the present invention;

[0030] Figure 4 is a flow chart of a fault equation model file generation program provided by an embodiment of the present invention;

[0031] Figure 5 It is a flow chart of a fault equation system expression operation program provided by an embodiment of the present invention;

[0032] Figure 6 is a flow chart of a fault equation system data update program provided by an embodiment of the present invention; DETAILED DESCRIPTION

[0033] The embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0034] The following describes the implementation methods of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The present application can also be implemented or applied through other different specific implementation methods, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that, in the absence of conflict, the following embodiments and the features in the embodiments can be combined with each other. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work belong to the scope of protection of the present application.

[0035] like Figure 1 As shown, an embodiment of the present invention provides an onboard single-chip computer fault diagnosis method, comprising the following steps:

[0036] S1, define the fault equation model file of the onboard microcontroller;

[0037] S2, writing the fault equation model file in XML format, saving the model file in XML format as a binary file, generating a fault model binary file, and burning the fault model binary file into the Flash of the onboard single chip microcomputer;

[0038] S3. Execute the fault model binary file through a preset program in the single-chip microcomputer to obtain the fault diagnosis result of the onboard single-chip microcomputer.

[0039] In this embodiment, the fault diagnosis model file includes a fault equation model logic structure and a fault equation model storage structure.

[0040] Among them, the fault equation model logical structure defines the content of the fault equation model, including the associated equation list of the data source, the number of fault equations, and the fault equation information array. Each element of the fault equation information array is the static information of a fault equation, including the fault equation name, fault equation ID, data source, position in the data source, equation length, equation expression, and associated equation list.

[0041] The fault equation model storage structure defines the structure in which the fault equation model is stored in the file. The storage structure includes a data source information list, including the number of associated equations for each data source, and the position of the associated equation list for each data source in the data pool;

[0042] The number of equations, i.e. the total number of fault equations;

[0043] The address of the fault equation information list, that is, the location of the fault equation information list in the data pool;

[0044] The data pool simulates memory allocation in the form of a large array, providing storage space for data such as the data source association equation list and the fault equation information list;

[0045] The fault equation information list is stored in the data pool and includes a fault equation information structure for each equation. The fault equation information structure includes an equation name, an equation ID, a data source, a position in a data source, an equation length, an equation expression address, a number of associated equations, and an associated equation list address. The equation expression and the associated equation list are stored independently in the data pool, and their positions are recorded in the fault equation information structure.

[0046] The data source associated equation list is stored in the data pool and contains the IDs of all fault equations under the data source.

[0047] The system architecture for implementing the method includes a fault equation model logic structure, a fault equation model storage structure, a fault equation model file generation program, and an airborne single-chip microcomputer fault equation system program. The airborne single-chip microcomputer fault equation system program includes a fault equation system initialization program, a fault equation system data source reading program, a fault equation system expression operation program, a fault equation system data update program, and a fault equation system designated data source data update program.

[0048] Among them, the fault equation model logic structure unifies the fault variables and fault equations in the traditional fault equation system into a fault equation, and has the function of fault equation cascading;

[0049] The fault equation model storage structure significantly reduces the model's storage and memory requirements by separating the static and dynamic parts and introducing a large array simulation memory allocation method;

[0050] A fault equation model file generation program generates a fault equation model file that conforms to a fault equation model storage structure according to a fault equation model description file in XML format;

[0051] The airborne single-chip microcomputer fault equation system program can build a complete fault equation model according to the fault equation model file and run the fault equation system on the airborne single-chip microcomputer.

[0052] Furthermore, the onboard single-chip microcomputer fault equation system program includes:

[0053] The fault equation system initialization program reads the fault equation model file from the Flash, builds a complete fault equation model, and completes the initialization of the fault equation model;

[0054] The fault equation system data source reading program obtains the value of the specified fault equation from the outside according to the data source and the position in the data source;

[0055] Fault equation system expression calculation program, analyzes the fault equation expression and calculates its value;

[0056] The fault equation system data update program updates the value of the current fault equation according to the input fault equation ID, and recursively updates the values ​​of all fault equations that are related to the equation through queue simulation;

[0057] The fault equation system specifies a data source data update program, which updates the values ​​of the fault equations of all data sources for the data source according to the input data source number.

[0058] The embodiment of the present invention is further described below with reference to the accompanying drawings. An onboard single-chip computer fault equation system of the present invention is implemented in the following steps:

[0059] Step 1: Define the logical structure of the fault equation. Figure 2 As shown in the figure, the logical structure of the fault equation should contain all the static information of the fault equation, including: equation name, equation ID, data source, position in the data source, equation length, equation expression, and associated equation list. The equation name is a string, which is the name of the fault equation. The equation ID is the unique identifier of the fault equation, which represents the fault equation number in the fault equation model. The data source has two functions. One is to indicate whether the value of the fault equation comes from an external data source or from the operation between other fault equations. The other is to indicate which data source the data of the equation comes from when the equation value comes from an external data source. The position in the data source is used to indicate the data number of the data source from which the data of the equation comes. It is only valid when the value comes from an external data source. The equation length is only valid for equations whose values ​​come from the operation between other fault equations. It is the length of the expression of the fault equation. The equation expression is only valid for equations whose values ​​come from the operation between other fault equations. It is an array, which indicates how the value of the equation is obtained through the logical operation of other equations in the form of a suffix expression. The associated equation list is an array, in which the elements are "the IDs of other equations whose equation expressions include this equation".

[0060] The fault equation model file is the static data of the fault equation model burned into the Flash, and should contain all the initialization information of the fault equation model, such as Figure 2As shown. The fault equation model file includes three parts: data source information list, fault equation number, and fault equation list. The data source information list is a list, in which each element is a structure representing a data source, and its content is the number of fault equations under the data source and the list of IDs of these fault equations. The number of fault equations is how many fault equations there are in this fault equation model. The fault equation list is the core of the fault equation model file. Each element represents a fault equation and contains all the information of the fault equation.

[0061] Step 2: define the storage structure of the fault equation model file. The storage structure of the fault equation model file is as follows: Figure 3 As shown. In order to save limited memory space, the fault equation model structure is directly saved as a binary file so that the onboard single-chip microcomputer can directly use the fault equation model in the built-in Flash, eliminating the step of "reading the model from Flash to memory". Since the number of fault equations is uncertain, the length is uncertain, and the number of associated equations is uncertain, it is not appropriate to use a fixed-size array to store the equations. In general, a dynamic memory allocation method should be used to allocate space for the array after the array size is determined, and only the pointer of the first element of the array is stored inside the model structure. However, the location of the fault equation model file burned into the Flash is not fixed, and the address of the fault equation model in the Flash cannot be determined in advance, and the pointer cannot be used directly. Therefore, the fault equation model uses a large array to simulate memory allocation. A large array is defined in the fault equation model structure, which is called a "data pool". In the process of generating the fault equation model file, when storage space needs to be allocated, a piece of space that has not been allocated is found in the data pool, and its position in the data pool is returned to the program that needs storage space. In the fault equation model, the associated equation list of each data source, the fault equation information list, the fault equation associated equation list, and the fault equation expression are all stored in the form of a data pool. The data directly stored in the fault equation model structure includes the data source information list, the number of equations, and the address of the fault equation information list. Each element of the data source information list is the complete information of a data source, including the number of data source equations and the address of the data source equation list. The address of the data source equation list is the location of the data source equation list in the data pool. The data source equation list is a list of equation IDs of all fault equations associated with the specified data source. The address of the fault equation information list is the location of the fault equation information list in the data pool. Each element of the fault equation information list is the complete information of a fault equation, including equation ID, equation name, equation length, data source, location in the data source, expression address, number of associated equations, and address of the associated equation list. The expression address is the location of the fault equation expression in the data pool, and the address of the associated equation list is the location of the associated equation list in the data pool.

[0062] Step 3: Write the information of the fault equation model to be established into an XML file. The logical structure of the XML file is a tree structure, with the root node being the fault equation model, and each fault equation being a child node of the root node. The information of each fault equation includes: equation name, equation ID, data source, location in the data source, and equation expression. The equation length and the list of associated equations do not need to be written here.

[0063] Step 4: Write a fault equation model file generation program to generate a binary file from the model's XML file. Figure 4 As shown, the program reads the fault equation model information in XML file format and generates the fault equation model file of the storage structure described in step 3 based on it. First, parse the XML and parse it into an XML tree; then traverse all fault equations, calculate the total number of fault equations, the total number of data sources, and the fault equations under each data source, and write this information into the fault equation model structure, and record the length of each equation and the associated equations of each equation; then traverse all fault equations again, and write the equation name, equation ID, data source, position in the data source, and equation expression of each equation. The equation length and the list of associated equations are written into the fault equation model structure. Finally, save the fault equation model structure as a bin file.

[0064] Step 5: Burn the generated fault equation model bin file into the Flash of the onboard microcontroller.

[0065] Step 6, executing the fault model binary file through a preset program in the single-chip microcomputer to obtain the fault diagnosis result of the onboard single-chip microcomputer, specifically including:

[0066] (1) Write a fault equation system initialization program. The program reads the fault equation model file and completes the initialization of the fault equation model according to the fault equation model file. First, store a fault equation model structure pointer and let it point to the address of the fault equation model file in Flash. Then, read the fault equation model file to obtain information such as the number of equations. Then, allocate a space in the memory to store the dynamic part of the fault equation model. The dynamic part of the fault equation model only includes the values ​​of the fault equations. Therefore, it is only necessary to create an array based on the total number of fault equations. The i-th element of the array is the current value of the fault equation with ID i. Finally, initialize all equation values ​​to 0, where 0 represents no fault.

[0067] (2) Write a program to read the data source of the fault equation system. The program inputs a data source number and a position in the data source. The program determines where to get the data based on the data source number and determines the number of the data provided by the data source based on the position in the data source. The specific implementation of the program depends on the specific usage scenario and specific hardware.

[0068] (3) Write a program to calculate the expression of the fault equation system. Figure 5 As shown, the input of the program is an equation ID, and the output is the latest value of the equation after the operation. First, find the fault equation structure of the equation in the fault equation model, and determine whether the value of the equation comes from the logical operation of other equations based on its data source. If so, continue, otherwise exit with an error. Then create a new operation stack to complete the operation of the equation expression. Then read the elements in the equation expression of the equation in turn. If the read element is the equation ID, take the current value of the equation according to the equation ID and add it to the operation stack; if the read element is an operator, take several elements at the top of the operation stack, perform the corresponding operation according to the type of operator, and add the result to the operation stack. After the expression is read, the value of the top element of the stack is the result of the expression operation, which is returned.

[0069] (4) Write a fault equation system data update program. Figure 6 As shown, the input of the program is the fault equation ID. The program will update the value of the fault equation corresponding to the equation ID, and update the values ​​of all fault equations whose values ​​are related to the fault equation. First, establish a queue for storing equation IDs, and add the ID of the current equation to it. Then enter the loop until the queue is empty: take the equation ID at the head of the queue, if its data source is an external data source, obtain its latest value through the data source reading program, if its data source is the logical operation of other equations, calculate its latest value through the expression operation program; then compare its latest value with the current value, if the value does not change, the loop ends, if the value changes, update the current value of the equation, and traverse the list of associated equations of the equation, and add all the IDs of the associated equations to the queue. This loop continues until the queue is empty.

[0070] (6) Write a data update program for specifying the data source of the fault equation system. The input of the program is the data source number, and the program will update the values ​​of all fault equations whose data source is the data source. First, read the list of associated equations of the data source from the fault equation model structure. Then, traverse all associated equations and update the values ​​of these equations through the data update program.

[0071] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A method for diagnosing faults of an onboard single-chip microcomputer, characterized in that: include: Define the fault equation model file of the onboard microcontroller; Writing the fault equation model file in XML format, saving the model file in XML format as a binary file, generating a fault model binary file, and burning the fault model binary file into the Flash of the onboard single-chip computer; The fault model binary file is executed by a preset program in the single-chip microcomputer to obtain the fault diagnosis result of the onboard single-chip microcomputer.

2. The method for diagnosing faults of an onboard single-chip microcomputer according to claim 1, characterized in that: The fault diagnosis model file includes a fault equation model logic structure, and the fault equation model logic structure includes a data source equation association list, a fault equation quantity, and a fault equation information array; The data source equation association list includes: the equation IDs of all fault equations under each data source, and the fault equation information array includes the equation name, equation ID, data source, position in the data source, equation length, equation expression and associated equation list of each fault equation.

3. The method for diagnosing faults of an onboard single-chip microcomputer according to claim 2, characterized in that: The fault diagnosis model file also includes a fault equation model storage structure, which includes: a data source information list, a number of equations, a fault equation information list address, a data pool, a data source associated equation list, and a fault equation information list.

4. The method for diagnosing faults of an onboard single-chip microcomputer according to claim 3, characterized in that: The fault model binary file is executed by a preset program in the single-chip microcomputer to obtain the fault diagnosis result of the onboard single-chip microcomputer, including: Reading the fault model binary file from the Flash, constructing a complete fault equation model, and completing the initialization of the fault equation model; Obtaining corresponding values ​​of a specified fault equation from the outside according to a data source and a position in the data source; Analyze the fault equation expression and calculate it to obtain the value of the fault equation.

5. The method for diagnosing faults of an onboard single-chip microcomputer according to claim 4, characterized in that: The fault model binary file is executed by a preset program in the single-chip microcomputer to obtain the fault diagnosis result of the onboard single-chip microcomputer, and further includes: After the value of the fault equation is obtained, the value of the current fault equation is updated according to the equation ID of the fault equation, and the values ​​of all other fault equations related to the fault equation are updated recursively by queue simulation.

6. The method for diagnosing faults of an onboard single-chip microcomputer according to claim 4, characterized in that: The fault model binary file is executed by a preset program in the single-chip microcomputer to obtain the fault diagnosis result of the onboard single-chip microcomputer, and also includes: according to the data source number of the fault equation, reading the associated equation list of the data source from the fault equation model file, traversing all associated fault equations, and updating the values ​​of all associated fault equations under the data source.

Citation Information

Patent Citations

  • On-line fault diagnosis device and on-line fault diagnosis method of simple-type environmental control system

    CN101697078A

  • Airborne power supply module in integrated modular avionics system

    CN109835493A

  • Single-chip microcomputer fault diagnosis board card and method

    CN112213980A

  • Simple OBD fault diagnosis device and method based on single-chip microcomputer

    CN115793618A

  • Failure diagnostic system and failure diagnostic program

    JP2008176703A