Electromechanical management computer visual logic simulation and fault injection test method and system

By building a computer logic model for electromechanical management through a graphical simulation environment, the problems of high cost, long cycle and low degree of logic visualization in traditional testing methods are solved, realizing visualization and efficient testing of logic simulation and fault injection.

CN123178181APending Publication Date: 2026-11-27SHAANXI QIANSHAN AVIONICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611414126.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-11
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Traditional electromechanical management computer testing relies on physical prototypes, which is costly, time-consuming, has low logic visualization, and is inconvenient for fault injection. It cannot use existing simulation tools for logic verification and fault injection testing.

Method used

A computer logic model for electromechanical management is built using a graphical simulation environment. Through bus data decomposition, logic discrimination and operation, fault word generation and signal tracing, dynamic fault injection and visual testing are realized, and fault response analysis is supported.

Benefits of technology

It enables visualization of logic simulation and fault injection, reduces costs and time, improves testing efficiency and traceability, and ensures that simulation results represent the behavior of physical products.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123178181A_ABST
    Figure CN123178181A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of electromechanical management computer simulation and test, and provides a kind of electromechanical management computer visual logic simulation and fault injection test method and system, in graphical simulation environment, the following steps are executed: receiving bus data, decomposing and outputting valid data bits according to interface control file;Logical discrimination and operation are carried out on the valid data bits, the data flow and the numerical value are displayed in real time on the display interface of the graphical simulation environment, and the fault related data is output, and the fault word is generated and displayed in real time;Through external configuration file or reserved interface, fault data is injected without modifying the core logic code of the simulation model, keeping the model logic outside the injection point consistent with the normal operating state;Record the fault propagation path, and generate a closed-loop backtracking link in a graphical manner.The application can complete logic verification and fault injection test without physical prototype, and can be widely applied in the field of aviation electromechanical management computer research and development test.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer simulation and testing technology for electromechanical management, and relates to a computer visualization logic simulation and fault injection testing method and system for electromechanical management based on a graphical simulation environment. Background Technology

[0002] The electromechanical management computer is the core control component of the aircraft electromechanical management system. It is responsible for the unified management and scheduling of electromechanical systems such as fuel, hydraulics, power supply, and environmental control. Its logical correctness and reliability directly affect flight safety.

[0003] Traditional electromechanical management computer testing primarily relies on physical prototype testing, that is, functional verification and fault testing are conducted through physical connections after the hardware product has been manufactured. However, this testing method has the following prominent problems: 1. High cost and long production cycle of physical prototypes: The design, manufacturing and debugging cycle of physical prototypes is long, and frequent changes in logic during the R&D stage will lead to repeated hardware board production, which will significantly increase costs.

[0004] 2. Low level of logic visualization: Traditional methods can usually only view the final input and output data through bus monitoring tools, and cannot intuitively view the flow of data inside the logic, intermediate calculation results, and output status after logic execution, making it difficult to locate logic errors.

[0005] 3. Inconvenient fault injection: Existing fault injection methods usually require code insertion in the product software or rely on dedicated hardware fault injection equipment, which is complicated to operate and may affect the original state of the product.

[0006] While existing graphical simulation tools (such as MATLAB / Simulink) are widely used in industrial control for algorithm development and functional verification, they are primarily used for conventional model building and numerical simulation. They cannot directly perform bitwise decomposition and effective data extraction of data from dedicated bus protocols for aerospace electromechanical management computers (such as ARINC429), nor can they perform logic discrimination, fault word generation, and signal link reverse tracing based on the unique interface control files and fault classification lists of electromechanical management computers. Therefore, when facing the testing needs of electromechanical management computers, those skilled in the art still need to rely on physical prototypes or write extensive test code, and cannot directly complete logic verification and fault injection testing using the aforementioned simulation tools.

[0007] Therefore, there is an urgent need for a method that can perform logic simulation and fault injection testing before the physical product is produced, and can intuitively display the logic execution process and fault response results. Summary of the Invention

[0008] To address the technical problems in existing electromechanical management computer testing, such as strong reliance on physical objects, inconvenience in fault injection, and low degree of logic visualization, this invention provides a method and system for visual logic simulation and fault injection testing of electromechanical management computers based on a graphical simulation environment.

[0009] This invention builds a logical model of an electromechanical management computer through a graphical simulation environment. During the simulation process, it supports dynamic fault injection to simulate the normal operation state of the electromechanical management computer, verify the correctness of the logic interface control file, and perform visual testing and analysis of the logic response of the electromechanical management computer after fault injection.

[0010] Specifically, the technical solution for achieving the objective of this invention is as follows: In a first aspect, the present invention provides a computer-visualized logic simulation and fault injection testing method for electromechanical management, wherein the method performs the following steps in a graphical simulation environment: S1: Obtain external bus data, decompose the bus data into multiple data bits according to the bus interface control file, and extract valid data bits from the multiple data bits; S2: Perform logical judgment and operation on the valid data bits, generate logical processing results, display the data flow direction and value change of the valid data bits in real time during the logical judgment and operation process, and output fault-related data generated during the logical processing process; S3: Generate a fault word based on the fault-related data and display the fault word in real time; S4: Inject fault data through a reserved interface, wherein the fault injection does not modify the core logic code of the simulation model, and the logic of the simulation model outside the injection point remains consistent with the normal operating state; S5: Utilize the signal tracing function of the graphical simulation environment to trace back from the fault word to the source signal link that generated the fault data.

[0011] In an optional embodiment, the graphical simulation environment is a software platform with graphical modeling, simulation execution, and result display functions, selected from any one of the MATLAB / Simulink environment, LabVIEW environment, and SCADE Suite environment.

[0012] In an optional embodiment, the bus data is decomposed into multiple data bits according to the bus interface control file, including: S11: Determine the bit mapping relationship between the input bus data and the decomposed data bits according to the bus protocol type; S12: Decompose a received packet of external bus data into individual data bits or data fields; S13: Identify the valid data bits from the decomposed data bits according to the bus interface control file, and output the valid data bits.

[0013] In an optional embodiment, logical discrimination and operation are performed on the valid data bits to generate logical processing results, and the data flow and numerical changes of the valid data bits during the logical discrimination and operation process are displayed in real time, including: S21: Compare the valid data bits with a preset threshold parameter to generate a comparison result; S22: Take multiple valid data bits or the comparison result as input, perform a preset logical operation, and generate an intermediate operation result; S23: Generate logical processing results based on the intermediate calculation results; S24: Add a visualization measurement component to the graphical simulation environment to display the numerical changes of data in the process of logical judgment and operation in real time; S25: Set a logic judgment unit at the output port of the logic processing result, and trigger a visual alarm indication when the actual output is inconsistent with the expected result.

[0014] In an optional embodiment, generating a fault word based on the fault-related data and displaying the fault word in real time includes: S31: Based on the fault word conditions in the preset fault classification list, perform condition judgment on the fault-related data, and generate the corresponding fault word when the fault conditions are met; S32: Using the signal tracing function of the graphical simulation environment, trace back from the fault word to the source signal link that generated the fault data.

[0015] In an optional embodiment, injecting fault data via a reserved interface includes: S41: Inject malformed data packets into the bus data processing path to simulate a fault at the bus protocol level; S42: Inject erroneous logical data into the data processing path of logical judgment and operation to simulate logical level failure.

[0016] In an optional embodiment, the erroneous data packet is at least one of the following: parity check error data word, excessively long data packet, illegal label value, illegal source / destination identifier, and symbol / state matrix error; the erroneous logical data is at least one of the following: data value outside the normal range, inverted logical state, and erroneous data type.

[0017] This invention also provides a computer-visualized logic simulation and fault injection testing system for electromechanical management, deployed in a graphical simulation environment, including a bus function module, a logic function module, a self-test function module, a fault injection interface module, and a signal tracing unit.

[0018] The bus function module receives bus data at its input terminal and decomposes the bus data into multiple data bits according to the bus interface control file, and extracts and outputs valid data bits from the multiple data bits. The input terminal of the logic function module is connected to the output terminal of the bus function module, and is used to perform logical judgment and processing on the received valid data bits, display the data flow direction and value in real time, and output fault-related data generated during the logical processing. The input terminal of the self-test function module is connected to the fault data output terminal of the logic function module, and is used to generate fault words based on the received fault-related data and display them in real time. The fault injection interface module is set on the data flow path of the bus function module and / or logic function module in the form of a reserved interface or external configuration file access. It is used to inject fault data without modifying the core logic code of the simulation model, and the logic of the simulation model outside the injection point remains consistent with the normal operation state. The signal tracing unit is connected to the self-test function module and is used to trace the source signal link that generated the fault data from the fault word in reverse using the signal tracing function of the graphical simulation environment.

[0019] In an optional embodiment, the output terminal of the logic function module is provided with a logic judgment unit, which is used to trigger a visual alarm indication when the actual output is inconsistent with the expected result; The fault injection interface module includes a bus protocol layer fault injection interface and a logic layer fault injection interface. The bus protocol layer fault injection interface is used to inject malformed data packets to simulate faults at the bus protocol layer, and the logic layer fault injection interface is used to inject erroneous logical data to simulate faults at the logic layer.

[0020] In an optional embodiment, the system further includes a test report generation unit, which records the changes in fault words before and after fault injection, and automatically generates a test report containing fault injection type, propagation path and fault word comparison results.

[0021] Compared with the prior art, the beneficial effects that at least one technical solution adopted in the embodiments of this specification can achieve include at least: 1. High degree of visualization and strong interactivity: This invention uses a graphical simulation environment (such as MATLAB / Simulink) to build a computer logic model for electromechanical management, enabling real-time viewing of bus data input, intermediate processes of logical judgment and operation, and the complete data flow of logical processing results. Unlike traditional logic interface control files or abstract logic code, the visualized model file and real-time numerical display components can more intuitively present the entire process of data generation, flow, and output, facilitating quick understanding of logical functions by testing and verification personnel, significantly reducing the difficulty of locating logical errors, and improving testing efficiency. Through interactive tracing operations on fault words, users can directly locate the source signal link, greatly shortening fault diagnosis time.

[0022] 2. Convenient and non-intrusive fault injection: This invention can quickly inject various faults (including bus protocol layer faults and logic layer faults) without modifying the core logic code of the simulation model through a reserved fault injection interface or external configuration file. It does not rely on dedicated hardware fault injection equipment, nor does it require code insertion in the product software. This achieves the separation of the simulation model's "test state" and "normal product state" and avoids the impact of fault injection on the original logic of the model.

[0023] 3. High degree of automation: After the simulation model and data configuration scheme are encapsulated, the test results can be automatically verified, reducing the workload of manual judgment; at the same time, it supports the automatic generation of test reports containing fault injection type, fault propagation path and fault word comparison results, which greatly improves test efficiency and traceability.

[0024] 4. Low cost and short cycle: This invention can complete most of the functional verification and fault injection testing in the logic design stage without the need for a physical prototype, which significantly reduces hardware investment costs, shortens the product development cycle, and realizes the forward movement of testing work. Sufficient logic verification and fault injection testing can be carried out before the physical product is produced.

[0025] 5. Guaranteed simulation credibility: This invention establishes an equivalence relationship between the simulation environment and the physical product by comparing and verifying the output of the simulation model with historical test data of the physical product. This ensures that the simulation test results can effectively represent the behavior of the physical product, and provides technical support for the verification environment equivalence demonstration in the airworthiness certification of airborne software (DO-178B / C). Attached Figure Description

[0026] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 This is a flowchart of the electromechanical management computer visualization logic simulation and fault injection testing method of the present invention; Figure 2 This is an architecture diagram of the electromechanical management computer visualization logic simulation and fault injection testing system of the present invention. Detailed Implementation

[0028] The embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0029] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. This application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be noted that, in the absence of conflict, the following embodiments and features of the embodiments can be combined with each other. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0030] In this invention, a "graphical simulation environment" refers to a software platform that supports building simulation models, running simulations, and viewing results through a graphical interface (rather than pure code), including but not limited to MATLAB / Simulink, LabVIEW, SCADESuite, AMESim, Dymola, etc. The following embodiments use the MATLAB / Simulink environment as an example for detailed explanation, but this invention is obviously not limited thereto.

[0031] As defined in this invention, the "fault word" refers to an n-bit binary status word, with each bit corresponding to a fault type, used to centrally characterize the occurrence status of various faults during the operation of the electromechanical management computer; the "valid data bit" refers to the data field extracted from the external bus data according to the interface control file that actually participates in logical judgment and operation.

[0032] like Figure 1 As shown, this invention provides a computer-visualized logic simulation and fault injection testing method for electromechanical management. The method performs the following steps in a graphical simulation environment: S1: Obtain external bus data, decompose the bus data into multiple data bits according to the bus interface control file, and extract valid data bits from the multiple data bits; S2: Perform logical judgment and operation on the valid data bits, generate logical processing results, display the data flow direction and value change of the valid data bits in real time during the logical judgment and operation process, and output fault-related data generated during the logical processing process; S3: Generate a fault word based on the fault-related data and display the fault word in real time; S4: Inject fault data through a reserved interface, wherein the fault injection does not modify the core logic code of the simulation model, and the logic of the simulation model outside the injection point remains consistent with the normal operating state; S5: Utilize the signal tracing function of the graphical simulation environment to trace back from the fault word to the source signal link that generated the fault data.

[0033] In an optional embodiment, the graphical simulation environment is a software platform with graphical modeling, simulation execution, and result display functions, selected from any one of the MATLAB / Simulink environment, LabVIEW environment, and SCADE Suite environment.

[0034] In an optional embodiment, the bus data is decomposed into multiple data bits according to the bus interface control file, including: S11: Determine the bit mapping relationship between the input bus data and the decomposed data bits according to the bus protocol type; S12: Decompose a received packet of external bus data into individual data bits or data fields; S13: Identify the valid data bits from the decomposed data bits according to the bus interface control file, and output the valid data bits.

[0035] Taking the ARINC429 bus protocol as an example, each data word contains 32 bits. Bits 1-8 are label bits (LABEL), bits 9-10 are source / destination identifier (SDI), bits 11-29 are data bits (DATA), bits 30-31 are symbol / status matrix bits (SSM), and bit 32 is parity bit (PARITY). In the Simulink environment, the 32-bit data is decomposed bit by bit using the "Byte Unpack" module or a custom bit decomposition module. Then, the type of the current data word (such as fuel quantity, hydraulic pressure, etc.) is determined based on the LABEL bits, and the corresponding DATA bits are extracted as valid data.

[0036] For the 1553B bus protocol, the bus data word contains 20 bits, including three types: command word, status word, and data word. These need to be identified based on the synchronization header and parity bit before being decomposed according to the corresponding format. For the CAN bus protocol and RS422 bus protocol, the corresponding bit decomposition and valid data extraction are performed according to the data frame format of their respective protocols.

[0037] In an optional embodiment, logical discrimination and operation are performed on the valid data bits to generate logical processing results, and the data flow and numerical changes of the valid data bits during the logical discrimination and operation process are displayed in real time, including: S21: Compare the valid data bits with a preset threshold parameter to generate a comparison result; S22: Take multiple valid data bits or the comparison result as input, perform a preset logical operation, and generate an intermediate operation result; S23: Generate logical processing results based on the intermediate calculation results; S24: Add a visualization measurement component to the graphical simulation environment to display the numerical changes of data in the process of logical judgment and operation in real time; S25: Set a logic judgment unit at the output port of the logic processing result, and trigger a visual alarm indication when the actual output is inconsistent with the expected result.

[0038] In practical implementation, the logic function module is responsible for judging and processing the valid data output by the bus module according to the logic interface control file. Taking low fuel level detection in the fuel system as an example: it receives the valid fuel level data bits (such as a 12-bit binary number, corresponding to 0-4095, representing 0%-100% fuel level) output by the bus function module, compares the fuel level value with a preset threshold parameter (such as 5%), and when the fuel level is lower than 5%, the comparator outputs "1" (true); it performs a logical AND operation with the "fuel sensor valid" flag to generate a "low fuel warning" status signal; it adds a "Display" module to the model to display the current fuel level value and the comparator output value in real time, and adds a "Scope" module to display the fuel level change curve over time; it sets a Switch judgment unit at the output port, and when the "low fuel warning" status is "1" but the actual expected output is "0", it triggers the LED module to light up a red alarm.

[0039] To comprehensively demonstrate the data flow during logical operations, a "Probe" or "Display" module can be added to the output of each stage of the model, allowing users to view the complete data chain from valid data input to the final logical processing result output. Simultaneously, Simulink's "Signal Logging" feature can be used to save intermediate results from each stage of the operation to the MATLAB workspace for subsequent offline analysis and comparative verification.

[0040] In an optional embodiment, generating a fault word based on the fault-related data and displaying the fault word in real time includes: S31: Based on the fault word conditions in the preset fault classification list, perform condition judgment on the fault-related data, and generate the corresponding fault word when the fault conditions are met; S32: Using the signal tracing function of the graphical simulation environment, trace back from the fault word to the source signal link that generated the fault data.

[0041] In practical implementation, taking the self-testing function module as an example: Based on the fault classification list, establish fault judgment logic in the model. For example, define fault word BIT0 as "fuel sensor fault," triggered by a fuel quantity signal remaining at 0 for more than 2 seconds; BIT1 as "communication loss fault," triggered by a bus data interruption exceeding 100ms. Receive fault-related data (such as fuel quantity signal and bus status signal) output by the logic function module and compare it with the fault word conditions for judgment. When the fuel quantity signal remains at 0 for more than 2 seconds, generate fault word 0x0001 (BIT0=1). Add a "Display" module to the model to directly display the hexadecimal value of the fault word, and add a "To Workspace" module to save the fault word to the MATLAB workspace. Use MATLAB's "Simulink.SimulationData.Dataset" to obtain the complete handle of the fault word signal line, call the signal tracing function to trace back from the fault word to the source signal (such as the ARINC429 bus input port), and highlight the entire signal link in the model.

[0042] In an optional embodiment, injecting fault data via a reserved interface includes: S41: Inject malformed data packets into the bus data processing path to simulate a fault at the bus protocol level; In this step, "incorrectly formatted data packets" include, but are not limited to, at least one of the following: data words with parity errors, excessively long data packets, illegal label values, illegal source / destination identifiers, and symbol / state matrix errors. Specifically, a blank input interface is connected in parallel to the data input terminal of the bus function module. During normal operation, this interface is left floating. During fault injection, a 32-bit ARINC429 data word with a parity error is written to this interface. This faulty data will replace normal data and enter the subsequent processing flow through priority switching logic.

[0043] S42: Inject erroneous logical data into the data processing path of logical judgment and operation to simulate logical level failure.

[0044] In this step, "error logic data" includes, but is not limited to, at least one of the following: data values ​​outside the normal range, inverted logic states, and incorrect data types. In specific implementation, a multiplexer switch (such as Simulink's "Manual Switch" module) is set on the data processing path of the logic function module. Each input port of the switch is connected to a "Constant" module, and different error data values ​​are set for each (such as fuel quantity error values ​​of 0%, 200%, -5%, etc.). During normal operation, the switch is in the normal data path; during fault injection, the switch is manually or via script to switch to a specific error data path.

[0045] In a preferred embodiment, the erroneous data packet is at least one of the following: parity check error data word, excessively long data packet, illegal label value, illegal source / destination identifier, and symbol / state matrix error; the erroneous logical data is at least one of the following: data value outside the normal range, inverted logical state, and erroneous data type.

[0046] To facilitate understanding of the complete technical solution of this invention, a complete simulation operation data stream example is given below, using "low fuel quantity fault injection and signal tracing in the fuel system" as an example: 1) Initial state: The simulation model is running normally, the bus input fuel quantity signal is 50% (normal range), the logic function module does not trigger any warnings, and the self-test function module outputs fault word 0x0000 (no fault).

[0047] 2) Fault injection: When the simulation reaches the 5th second, the fuel quantity signal is switched from 50% to 0% (error logic data) through the fault injection interface module. The injection point is set in the data input path of the logic function module, and the core logic code of the model is not modified in any way.

[0048] 3) Logic Response: When the logic function module detects that the fuel level is below the 5% threshold, it generates a "low fuel warning" status of "1" and maintains this status. At the same time, the module outputs fault-related data (fuel level 0%, comparator output "1", low fuel warning status "1") to the self-test function module.

[0049] 4) Fault word generation: The self-test function module determines that if the fuel level is 0 for more than 2 seconds, it will generate fault word 0x0001 (BIT0="fuel sensor fault") based on the fault classification list and display the fault word in real time on the display interface.

[0050] 5) Signal Tracing: Users can use MATLAB's signal tracing function to select the fault word 0x0001 signal line and execute the "Trace to Source" operation. The system automatically traces the fault source signal link in reverse: Fault word 0x0001 ← Self-test function module (fault judgment logic) ← Logic function module (low fuel warning status) ← Logic function module (comparator output) ← Bus function module (fuel quantity DATA bit) ← Bus input port (ARINC429 data word). This link is highlighted in the model, allowing users to intuitively locate the root cause of the fault.

[0051] Although the above embodiments have been described in detail using the ARINC429 bus as an example, the present invention is not limited thereto. The implementation principle is exactly the same for other bus protocols (such as 1553B, CAN, RS422, etc.), only the specific configuration of bit decomposition and valid data identification needs to be adjusted according to the data format of the specific protocol.

[0052] In a preferred embodiment, to ensure the validity of the simulation test results, the present invention also provides a simulation credibility verification mechanism: before performing logic verification and fault injection testing, the output of the simulation model under multiple typical operating conditions (such as normal changes in fuel quantity, hydraulic system pressure fluctuations, power switching, etc.) is compared item by item with historical test data of the physical product. When the deviation between the simulation output under all operating conditions and the historical test data does not exceed a preset range (e.g., ±2%), it is confirmed that the current simulation environment has the verification capability equivalent to the physical product, and a credibility verification report is generated. This mechanism provides technical support for the verification environment equivalence demonstration in the airworthiness certification of airborne software (DO-178B / C).

[0053] Based on the same inventive concept, this invention also provides a computer-visualized logic simulation and fault injection testing system for electromechanical management, as described in the following embodiments. Since the principle by which the testing system solves the problem is similar to the computer-visualized logic simulation and fault injection testing method for electromechanical management disclosed in the above embodiments, the implementation of the testing system can refer to the implementation of the testing method, and repeated details will not be elaborated further. As used below, the terms "unit" or "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0054] The following is combined Figure 2 The system of the present invention will be described in detail below. For example... Figure 2 As shown, the test system is deployed in a graphical simulation environment and includes a bus function module, a logic function module, a self-test function module, and a fault injection interface module.

[0055] The bus function module executes step S1 above. Its input receives external bus data, decomposes the bus data into multiple data bits according to the bus interface control file, and extracts and outputs valid data bits from these data bits. This module builds the bus module according to the bus ICD protocol. For example, when the bus protocol is 429, it sets the corresponding module input interface according to each bit of the 429 communication protocol, decomposes an incoming data packet bit by bit and connects it to the reserved interface of the bus module, identifies the valid data bits according to the bus ICD, and outputs them to the logic function module. Simultaneously, it reserves interfaces for some fault injection, such as reserving some blank interfaces to simulate data packet length errors in fault injection.

[0056] The logic function module executes step S2 above. Its input is connected to the output of the bus function module. It performs logical judgment and processing on the received valid data bits, displays the data flow and values ​​in real time, and outputs fault-related data generated during the logical processing. Based on the data bits output from the bus module, this module judges according to the logic interface control file, builds the logic module, and adds components such as a multimeter to display the real-time data flow through actual values. During module operation, the running logic and logic combinations involving single or multiple data points can be viewed using MATLAB's built-in data monitoring tools. A judgment switch is added to the output of the logic function module; when the running logic does not match the expected result of the logic interface control file, an indicator light is activated. Simultaneously, reserved interfaces are provided for some faults, such as interfaces for some single-pole multi-throw switches. By opening switches in different directions, faults with incorrect data are injected into the model. The output of the logic function module is equipped with a logic judgment unit to trigger a visual alarm indication when the actual output does not match the expected result.

[0057] The self-test module executes step S3 above. Its input is connected to the fault data output of the logic module. It generates fault words based on the received fault-related data and displays them in real time. This module judges faults based on the fault words in the fault classification list. When the fault conditions are met, a fault is output. A fault monitoring function is added to this module. The output of the fault words is visualized using an oscilloscope and other display components. The source of the fault data can be located using the signal tracing function in MATLAB.

[0058] The fault injection interface module is used to perform step S4 above. It is configured as a reserved interface on the data flow path of the bus function module and / or logic function module to inject fault data without modifying the core logic code of the simulation model. The logic of the simulation model outside the injection point remains consistent with its normal operating state. This module reserves corresponding interfaces according to the type of fault to be injected. For example, a blank input interface is reserved for simulation packet length errors; for faults involving erroneous simulation data, interfaces for some single-pole multi-throw switches are reserved. Different types of fault data are injected by opening switches in different directions. The fault injection interface module includes a bus protocol layer fault injection interface and a logic layer fault injection interface. The bus protocol layer fault injection interface is used to inject erroneous data packets to simulate faults at the bus protocol level, and the logic layer fault injection interface is used to inject erroneous logic data to simulate faults at the logic level.

[0059] The signal tracing unit is used to execute step S5 above. It is connected to the self-test function module and uses the signal tracing function of the graphical simulation environment to trace the source signal link that generated the fault data from the fault word in reverse. In specific implementation, after the self-test function module generates the fault word, the complete handle of the fault word signal line is obtained through the signal tracing function built into the graphical simulation environment. Taking the MATLAB / Simulink environment as an example, the complete handle of the fault word signal line is obtained using "Simulink.SimulationData.Dataset", and "Simulink.findBlocksOfType" is called to find the source module of the signal line. The process is recursively traversed upwards until the input port or constant module is found, forming a complete signal link from the fault word to the source signal. This link is then displayed in the model interface in a highlighted manner (such as a red highlighted line), allowing the user to intuitively locate the root cause of the fault. In a preferred embodiment, the user can trigger signal tracing interactively: when the user clicks on the fault word on the display interface, the signal tracing unit automatically traces back from the fault word to the source signal and highlights the complete signal link in the model interface of the graphical simulation environment, while simultaneously displaying the real-time values ​​of each node on the link.

[0060] In a preferred embodiment, the user can trigger signal tracing interactively: when the user clicks on the fault word on the display interface, the signal tracing unit automatically traces back from the fault word to the source signal and highlights the complete signal link in the model interface of the graphical simulation environment, while simultaneously displaying the real-time values ​​of each node on the link.

[0061] It should be noted that the specific MATLAB functions mentioned above are merely examples. Those skilled in the art can choose the appropriate function implementation method according to the specific graphical simulation environment used. This invention is not limited to the specific function calls mentioned above.

[0062] It should also be noted that although the above embodiments are all illustrated using the ARINC429 bus as an example, the present invention is obviously not limited to this. For other bus protocols (such as 1553B, CAN, RS422, etc.), the implementation principle is exactly the same; only the specific configuration of bit decomposition and valid data identification needs to be adjusted according to the data format of the specific protocol. For example, for the 1553B protocol, the bus data word is 20 bits, which includes three types: command word, status word, and data word, and needs to be identified based on the synchronization header and parity bit. Those skilled in the art, after reading Embodiment 1 of the present invention, are fully capable of adapting it to other bus protocols.

[0063] The embodiments of the present invention achieve the following technical effects: 1. High degree of visualization: This invention uses a graphical simulation environment (such as MATLAB / Simulink) to build a computer logic model for electromechanical management, enabling real-time viewing of the input of bus data, the intermediate processes of logical judgment and operation, and the complete data flow of logical processing results. Unlike traditional logic interface control files or abstract logic code, the visualized model file and real-time numerical display components can more intuitively present the entire process of data generation, flow, and output, facilitating quick understanding of the logical functions by testing and verification personnel, significantly reducing the difficulty of locating logical errors, and improving testing efficiency.

[0064] 2. Convenient and non-intrusive fault injection: This invention can quickly inject various faults (including bus protocol layer faults and logic layer faults) without modifying the core logic code of the simulation model through a reserved fault injection interface or external configuration file. It does not rely on dedicated hardware fault injection equipment, nor does it require code insertion in the product software. This achieves the separation of the simulation model's "test state" and "normal product state" and avoids the impact of fault injection on the original logic of the model.

[0065] 3. High degree of automation: After the simulation model and data configuration scheme are encapsulated, the test results can be automatically verified, reducing the workload of manual judgment; at the same time, it supports the automatic generation of test reports containing fault injection type, fault propagation path and fault word comparison results, which greatly improves test efficiency and traceability.

[0066] 4. Low cost and short cycle: This invention can complete most of the functional verification and fault injection testing in the logic design stage without the need for a physical prototype, which significantly reduces hardware investment costs, shortens the product development cycle, and realizes the forward movement of testing work. Sufficient logic verification and fault injection testing can be carried out before the physical product is produced.

[0067] 5. Guaranteed simulation credibility: This invention establishes an equivalence relationship between the simulation environment and the physical product by comparing and verifying the output of the simulation model with historical test data of the physical product. This ensures that the simulation test results can effectively represent the behavior of the physical product, and provides technical support for the verification environment equivalence demonstration in the airworthiness certification of airborne software (DO-178B / C).

[0068] In this embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements any of the above-mentioned electromechanical management computer visualization logic simulation and fault injection testing methods.

[0069] Specifically, the computer device can be a computer terminal, a server, or a similar computing device.

[0070] In this embodiment, a computer-readable storage medium is provided, which stores a computer program that executes any of the above-described electromechanical management computer visualization logic simulation and fault injection testing methods.

[0071] Specifically, computer-readable storage media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer-readable storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable storage media does not include transient media, such as modulated data signals and carrier waves.

[0072] Obviously, those skilled in the art should understand that the modules or steps of the above-described embodiments of the present invention can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the embodiments of the present invention are not limited to any particular hardware and software combination.

[0073] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, various modifications and variations can be made to the embodiments of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A computer-visualized logic simulation and fault injection testing method for electromechanical management, characterized in that, The method performs the following steps in a graphical simulation environment: Acquire external bus data, decompose the bus data into multiple data bits according to the bus interface control file, and extract valid data bits from the multiple data bits; The valid data bits are logically judged and operated to generate logical processing results. The data flow and value changes of the valid data bits during the logical judgment and operation process are displayed in real time, and fault-related data generated during the logical processing are output. The fault word is generated based on the fault-related data and displayed in real time. Fault data is injected through a reserved interface. The fault injection does not modify the core logic code of the simulation model, and the logic of the simulation model outside the injection point remains consistent with the normal operation state. By utilizing the signal tracing function of the graphical simulation environment, the source signal link that generated the fault data can be traced back from the fault word.

2. The electromechanical management computer visualization logic simulation and fault injection testing method according to claim 1, characterized in that, The graphical simulation environment is a software platform with graphical modeling, simulation operation, and result display functions, and can be selected from any one of the MATLAB / Simulink environment, LabVIEW environment, and SCADE Suite environment.

3. The electromechanical management computer visualization logic simulation and fault injection testing method according to claim 1, characterized in that, The bus data is decomposed into multiple data bits according to the bus interface control file, including: Determine the bit mapping relationship between the input bus data and the decomposed data bits based on the bus protocol type; The received packet of external bus data is broken down bit by bit into individual data bits or data fields; The valid data bits are identified from the decomposed data bits according to the bus interface control file, and the valid data bits are output.

4. The electromechanical management computer visualization logic simulation and fault injection testing method according to claim 1, characterized in that, The valid data bits are logically judged and processed to generate logical processing results. The data flow and numerical changes of the valid data bits during the logical judgment and processing are displayed in real time, including: The valid data bits are compared with a preset threshold parameter to generate a comparison result; Take multiple valid data bits or the comparison result as input, perform a preset logical operation, and generate an intermediate operation result; Logical processing results are generated based on the intermediate calculation results; Add a visualization measurement component to the graphical simulation environment to display the numerical changes of data in real time during logical judgment and calculation processes; A logic judgment unit is set at the output port of the logic processing result. When the actual output is inconsistent with the expected result, a visual alarm indication is triggered.

5. The electromechanical management computer visualization logic simulation and fault injection testing method according to claim 1, characterized in that, Generating fault words based on the fault-related data and displaying the fault words in real time includes: Based on the fault word conditions in the preset fault classification list, the fault-related data are judged according to the conditions, and the corresponding fault word is generated when the fault conditions are met. By utilizing the signal tracing function of the graphical simulation environment, the source signal link that generated the fault data can be traced back from the fault word.

6. The electromechanical management computer visualization logic simulation and fault injection testing method according to claim 1, characterized in that, Inject fault data through reserved interfaces, including: Injecting malformed data packets into the bus data processing path to simulate a fault at the bus protocol level; Injecting erroneous logical data into the data processing path of logical judgment and operation to simulate logical-level failures.

7. The electromechanical management computer visualization logic simulation and fault injection testing method according to claim 6, characterized in that, The erroneous data packet is at least one of the following: parity check error data word, excessively long data packet, illegal label value, illegal source / destination identifier, or symbol / state matrix error; the erroneous logical data is at least one of the following: data value outside the normal range, inverted logical state, or erroneous data type.

8. A computer-visualized logic simulation and fault injection testing system for electromechanical management, characterized in that, The system is deployed in a graphical simulation environment and includes: The bus function module receives bus data at its input terminal and is used to decompose the bus data into multiple data bits according to the bus interface control file, and extract and output valid data bits from the multiple data bits. The logic function module, whose input end is connected to the output end of the bus function module, is used to perform logical judgment and processing on the received valid data bits, display the data flow direction and value in real time, and output fault-related data generated during the logical processing. The self-test function module has its input end connected to the fault data output end of the logic function module, and is used to generate fault words based on the received fault-related data and display them in real time. The fault injection interface module is set on the data flow path of the bus function module and / or logic function module in the form of a reserved interface or external configuration file access. It is used to inject fault data without modifying the core logic code of the simulation model, and the logic of the simulation model outside the injection point remains consistent with the normal operation state. The signal tracing unit is connected to the self-test function module and is used to trace the source signal link that generated the fault data from the fault word in reverse using the signal tracing function of the graphical simulation environment.

9. The electromechanical management computer visualization logic simulation and fault injection testing system according to claim 8, characterized in that, The output of the logic function module is equipped with a logic judgment unit, which is used to trigger a visual alarm indication when the actual output is inconsistent with the expected result. The fault injection interface module includes a bus protocol layer fault injection interface and a logic layer fault injection interface. The bus protocol layer fault injection interface is used to inject malformed data packets to simulate faults at the bus protocol layer, and the logic layer fault injection interface is used to inject erroneous logical data to simulate faults at the logic layer.

10. The electromechanical management computer visualization logic simulation and fault injection testing system according to claim 8, characterized in that, Also includes: The test report generation unit is used to record the changes in fault words before and after fault injection, and automatically generate a test report that includes the fault injection type, propagation path and fault word comparison results.