Data recording unit and method suitable for aviation power distribution system

By combining the advantages of NVSRAM and FLASH in the aviation power distribution system, dual backup and flexible storage of fault data are achieved, solving the problems of insufficient capacity and poor real-time performance, ensuring the integrity and real-time performance of fault data, and improving the reliability and safety of aircraft operation.

CN121148044APending Publication Date: 2025-12-16SHAANXI AVIATION ELECTRICAL
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511206816.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-27
Publication Date
2025-12-16

AI Technical Summary

Technical Problem

In existing aviation power distribution systems, memory chips suffer from insufficient capacity, poor real-time performance, and poor cost-effectiveness when recording fault data. In particular, domestically produced EEPROMs have slow read and write speeds, FLASH requires writing before erasure, which affects the timely storage of fault data, and NVSRAM has high costs and small single-chip capacity.

Method used

The system uses NVSRAM chips to store critical operating data and important fault information, and FLASH chips to store detailed fault data. A fault data cache area is also allocated in the NVSRAM. When a fault occurs, detailed fault data is cached in the NVSRAM and transferred to the FLASH when the FLASH is idle. By combining the advantages of NVSRAM and FLASH, the system achieves dual backup and flexible storage of fault data.

Benefits of technology

It enables large-capacity, fast and reliable fault data storage, reduces the risk of data errors, ensures the integrity and real-time nature of fault data, and provides reliability and safety for aircraft operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121148044A_ABST
    Figure CN121148044A_ABST
Patent Text Reader

Abstract

The invention belongs to but not limited to the technical field of aviation power distribution systems, and particularly relates to a data recording unit and method suitable for an aviation power distribution system, and the data recording unit comprises a DSP module which is connected with a FLASH module and an NVSRAM through an address bus and a data bus; the FPGA module is respectively connected with the FLASH module and the NVSRAM module and outputs a control signal; the FLASH module is used for recording detailed fault data; the NVSRAM is divided into four regions; the A area is a key information storage area, and the storage content comprises software configuration information, version information, an NVSRAM important fault information record tail pointer, a data record tail pointer before fault occurrence, an NVSRAM fault data cache record tail pointer, an NVSRAM fault data cache record head pointer and a FLASH fault data record tail pointer; the area B is an important fault information storage area; the area C is a data cache area 500 ms before the fault; and the area D is a detailed fault data cache area.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to, but is not limited to, the technical field of aviation power distribution systems, and particularly relates to a data recording unit and method suitable for aviation power distribution systems. Background Technology

[0002] The aviation power distribution system is a crucial component of the aircraft's power supply system. Its primary function is to supply, control, convert, and monitor the 270V DC, 28V DC, and 115V AC power within the aircraft, providing power to high-power electrical equipment, primary electrical equipment, and remote secondary power distribution devices. The aviation power distribution system ensures the power supply to critical aircraft equipment, guaranteeing operational safety, and therefore holds a pivotal position. Currently, conventional power distribution systems mainly consist of power control and protection devices such as contactors, circuit breakers, and diodes, as well as contactor control units and power control units. With the increasing types and numbers of aircraft electrical equipment, and the growing trend towards more electric and all-electric aircraft, power distribution systems are becoming increasingly complex, with a growing number of devices within them. Therefore, it is necessary to utilize high-capacity storage chips to quickly and reliably store real-time analog and discrete quantities, as well as fault information, within the power distribution system. This facilitates subsequent maintenance by providing sufficient data support for fault diagnosis, fault location, and health management.

[0003] Generally, commonly used memory chips in the aviation field include FLASH, EEPROM, and NVSRAM. Among them, domestically produced EEPROM chips are not suitable for aviation power distribution systems due to their slow read / write speeds and limited capacity suitable only for small-scale storage scenarios. Domestically produced FLASH chips, with their large storage capacity and high read / write speeds (currently, the maximum single-chip storage capacity can reach several Gbit), are suitable for aviation power distribution systems. However, they require an erase operation before writing data, which has a certain impact on the timely storage of fault data in aviation power distribution systems. Domestically produced NVSRAM typically has higher read / write speeds and lower failure rates, offering superior performance in terms of access speed and storage reliability. However, its maximum single-chip storage capacity is only a few Mbit. Furthermore, according to a manufacturer's memory chip price quote, a single 256Mbit FLASH chip costs RMB 1300, while a single 1Mbit NVSRAM chip costs RMB 5600. The price of NVSRAM is approximately four times that of FLASH. Therefore, using multiple NVSRAM chips for capacity expansion not only increases the size requirement of the storage unit but also significantly impacts the cost of the data recording unit in terms of economics. For aviation power distribution systems, the data recording unit needs a large data storage capacity. In the event of a failure, it is necessary to quickly and reliably store operational data from before the failure to a certain period after the failure. Therefore, considering economic design, a combination of a single NVSRAM chip and a single or multiple FLASH chips is preferred.

[0004] The patent "A Data Storage Method for FLASH Memory" (patent number CN 108376121B) proposes a data storage method based on Flash memory, which is divided into a root storage area, a sub-storage area and a data storage area, to solve the problems of long program code and complex operation of FLASH memory.

[0005] The patent "A Storage Method and Device for a Flash Chip" (patent number CN 112860184 B) proposes a storage method and device based on a Flash chip, whose main function is to extend the lifespan of the Flash chip and to accurately perform block erasure.

[0006] The patent "A Storage Method Based on Flash Storage Device" (patent number CN 118939202 B) proposes a storage method based on Flash storage device, which mainly improves the performance and reliability of flash storage. Through index optimization and empty packet checking, invalid operations are reduced and storage efficiency is improved.

[0007] The patent "A Data Storage Method Based on FLASH Memory" (patent number CN 114637465 A) proposes a data storage method based on FLASH memory, which adopts a log-type file system data storage method based on space utilization and garbage collection, thus avoiding file system corruption caused by cache exhaustion.

[0008] The patent "A Data Recording Module for Aviation Power System Controllers" (patent number CN 108109224B) proposes a data recording module for aviation power system controllers that features complete recording, high accuracy, and large storage capacity.

[0009] All the above patents utilize FLASH memory chips for storage, with optimized designs to improve storage efficiency and lifespan. However, for aviation power distribution systems, fault data recording is trigger-based. Once a fault occurs, fault information and collected analog data are immediately recorded. The length of a single data recording depends on when the fault disappears or protection ends. If the fault state changes, the next fault data recording begins immediately. The shorter the fault recording cycle, the more detailed the recorded data, and the greater the support for fault analysis and health management analysis during aircraft ground maintenance. During fault storage, if the FLASH memory is not erased in time or is being erased, it significantly impacts the real-time performance of fault information storage. Therefore, aviation power distribution system data recording units must meet requirements such as large storage capacity, short data recording intervals, and strong real-time performance. Summary of the Invention

[0010] Purpose of the Invention: To meet the development requirements of a certain type of aviation power distribution system, which needs to use high-capacity storage chips to quickly and reliably store and record real-time analog and discrete quantities and fault information of the system from 500ms before a fault occurs until protection is activated or the fault disappears, with a recording interval of no more than 5ms, this invention proposes a data recording unit and method suitable for aviation power distribution systems. Combining the advantages of NVSRAM chips (fast read / write speed, high data reliability, small storage capacity, and large size) and FLASH chips (large storage capacity, economic efficiency, small size, limited sector erase cycles, low read / write efficiency, and slow response), this patent firstly uses NVSRAM chips to store some key operating data and important fault information, and uses FLASH chips to store comprehensive and detailed fault data, achieving reliable dual backup processing of fault data information. Secondly, to address the issue of poor real-time performance in FLASH chips due to the need for erasure before writing, a detailed fault data buffer is partitioned within NVSRAM. When a fault occurs, if the FLASH is in the "erasing" state, comprehensive and detailed fault data is cached in NVSRAM. Once the FLASH becomes idle, the cached data is read from NVSRAM and transferred to the FLASH, preventing the loss of crucial fault information due to system power failure during FLASH erasure. Furthermore, this patent allows for flexible setting of storage durations for different types of faults based on their occurrence, effectively utilizing and saving storage space, and ensuring the validity of fault data stored for ground maintenance. Finally, a pre-fault data buffer is partitioned within NVSRAM, which is cyclically stored in real-time before a fault occurs. Updates cease when a fault occurs, and after the real-time recording of the current FLASH fault data is completed, the 500ms data in the pre-fault data buffer within NVSRAM is transferred to the FLASH. This method fully leverages the advantages of both NVSRAM and FLASH chips, breaking away from the traditional model of using only NVSRAM for small-capacity data storage or only FLASH for large-capacity data storage. It allocates storage according to the importance of the stored data, only initiating erasure of the next sector when the minimum erase time for that sector is reached. This effectively reduces the number of sector write operations, lowers the risk of data errors, and enables timely storage of real-time data, improving the reliability of fault data storage. Therefore, this invention effectively ensures the efficient storage of critical aircraft operational data, providing strong support for the reliability and safety of aircraft flight missions.

[0011] Technical solution A data recording unit suitable for an aviation power distribution system, the data recording unit comprising the following components: The DSP module is connected to the FLASH module and NVSRAM via the address bus and data bus, respectively. The FPGA module is connected to the FLASH module and the NVSRAM module respectively and outputs control signals. The FLASH module is used to record detailed fault data; The NVSRAM is divided into four areas: Area A is the critical information storage area, which stores software configuration information, version information, and the tail pointer of the NVSRAM important fault information record, the tail pointer of the data record before the fault occurred, the tail pointer of the NVSRAM fault data cache record, the head pointer of the NVSRAM fault data cache record, and the tail pointer of the FLASH fault data record; Area B is the important fault information storage area; Area C is the data cache area for 500ms before the fault; Area D is the detailed fault data cache area.

[0012] Furthermore, the important fault information storage area stores important fault data in the form of an important fault information array, including: fault type flag and code, fault occurrence timestamp, fault protection flag and fault protection control signal; Detailed fault data is stored in the form of a detailed fault data array, including: in addition to important fault information, relevant analog quantities and status quantities collected by the system when the fault occurs.

[0013] Furthermore, the length of area C is a storage space with a fixed interval of 5ms, which is used to cyclically store detailed fault data 500ms before the fault occurs. Area D is used to cache detailed fault data during the FLASH chip's erase period. Areas B, C, and D all use a circular recording method, while area A uses fixed address storage. Both the NVSRAM and FLASH modules record data including a header, footer, and checksum, used for verifying data correctness during ground maintenance, and have the same timestamp.

[0014] A data recording method applicable to aviation power distribution systems. Step 1: After power-on initialization, determine the range of the head pointer and tail pointer stored in NVSRAM A area; Step 2: Perform a FLASH erase; Step 3: Enter the periodic task, count the power-on FLASH erase time, and after the erase completion time is reached, set the FLASH data storage enable flag to be valid; Step 4: When no system fault is detected, update the data storage array before the fault at a 5ms cycle and store it in the NVSRAMC area in a loop; Step 5: When a system fault is detected, stop storing data before the fault occurs; write the important fault information array cyclically into the B area of ​​NVSRAM, and write the detailed fault data array into FLASH.

[0015] Furthermore, step one also includes: determining whether all the tail pointers stored in NVSRAM A area are in the corresponding valid address segments; if not, setting the corresponding tail pointer to the starting address of the corresponding data storage area and storing it in area A.

[0016] Furthermore, in step two, if the FLASH fault data record tail pointer is the first address of the fault data storage area or the sector where the current storage location is located is the last sector of the fault data storage area, then the first sector is erased; otherwise, the next sector of the sector where the current storage location is located is erased.

[0017] Furthermore, in step four, the specific process is as follows: a) Read the tail pointer of the data record before the fault occurred in area A of the NVSRAM module; b) Perform segment switching: Compare the maximum storage address of the data buffer before the NVSRAM failure with the tail pointer of the data record before the NVSRAM failure. If the difference is less than Δ1, set the tail pointer of the data record before the NVSRAM failure to the initial address value of the data buffer before the NVSRAM failure. Otherwise, do not perform any processing. Here, Δ1 is the length of the detailed fault data storage array. c) Store the updated tail pointer of the data record before the NVSRAM failure into the NVSRAMA area.

[0018] Furthermore, in step five, the specific process is as follows: a) If a system fault is detected, the fault storage start flag is set to valid; if the fault disappears, the fault storage start flag is set to invalid. b) If the fault storage start flag is invalid, then set the fault storage end flag to valid and clear the fault storage time count to 0; if the fault storage start flag is valid, proceed to step c). c) If the fault storage end flag is detected as valid and the fault type of the previous cycle is inconsistent with the current fault type, the fault storage end flag is set to invalid, and the fault storage time task count value is set according to the current fault type and the time of each execution protection. If multiple faults occur at the same time, the longest execution protection time is used as the fault storage time count value; otherwise, no action is taken. If the fault storage end flag is detected as invalid, FLASH fault data recording is performed; otherwise, no action is taken.

[0019] Furthermore, the specific process of recording FLASH fault data is as follows: a) Update the detailed fault data array; b) Read the tail pointer of the FLASH fault data record in area A of the NVSRAM module and calculate the sector where the current storage location is located. Calculate the FLASH erase address of the next sector to be erased based on the current sector. c) If the difference between the FLASH erase address and the FLASH fault data record tail pointer is not greater than Δ2, where Δ2 is (sector erase time / write interval cycle time + 1) × FLASH fault data array length, then perform the following actions: 1) The next sector is erased by sending a FLASH erase command to the FLASH erase address; 2) Cache the current fault data into the D area of ​​NVSRAM and record the head and tail pointers of the NVSRAM fault data cache in the A area of ​​NVSRAM. At the same time, perform FLASH erase delay counting. When the delay reaches the target value, set the FLASH transfer flag to valid and stop NVSRAM fault data caching. 3) When the FLASH transfer flag is valid, the process of storing data from the NVSRAM fault data buffer into the FLASH is as follows: read data from area D, starting from the NVSRAM fault data buffer record head pointer, and store the data sequentially into the FLASH starting from the FLASH record tail pointer, while incrementing the task count according to the length of the detailed fault data array; after storage is completed, store the updated FLASH record tail pointer into area A of the NVSRAM; d) If the difference between the FLASH erase address and the FLASH fault data record tail pointer is greater than Δ2, then the updated fault data array will be stored in the FLASH, and the task count will be incremented periodically. e) When the task count is detected to reach the fault storage time count value, the tail pointer of the data record before the fault occurs is read from the A area of ​​the NVSRAM module. The data between the tail pointer of the data record before the fault occurs and the maximum address of the data buffer before the fault occurs, and the data between the first address of the data buffer before the fault occurs and the tail pointer of the data record before the fault occurs are sequentially transferred into the FLASH. After the transfer is completed, the fault storage end flag is set to valid, the fault storage time count is cleared to 0, and the current fault type is provided to the fault type of the previous cycle.

[0020] Furthermore, when a fault occurs, if the FLASH status is "erasing", the detailed fault data is cached in the D area of ​​the NVSRAM. When the FLASH reaches an idle state, the detailed fault data cached in the NVSRAM D area is read out and transferred into the FLASH. Finally, when the real-time recording of the FLASH fault data is completed, the 500ms data in the data cache area before the fault in the C area of ​​the NVSRAM is transferred into the FLASH.

[0021] In summary, the beneficial effects of the present invention are as follows: The beneficial effects of this invention are as follows: Based on the data storage requirements of aviation power distribution systems, which need to meet the requirements of short fault data storage intervals, large storage capacity, high storage reliability, and short fault data storage intervals, this invention utilizes the advantages of NVSRAM (small capacity but fast read / write speed, good data reliability, and small storage capacity), and FLASH (large storage capacity, good economy, small size, limited sector erase cycles, low read / write efficiency, and slow response). A data recording unit composed of a single NVSRAM and a single FLASH chip is proposed. Firstly, this unit can achieve dual backup processing of fault information. On the one hand, some key operational data and important fault information are stored in NVSRAM to ensure storage reliability. On the other hand, when a fault occurs, if the FLASH is in the "erasing" state, comprehensive and detailed fault data information is cached in NVSRAM. When the FLASH reaches an idle state, the cached data in NVSRAM is read out and transferred to the FLASH, avoiding the loss of important fault information due to system power failure during FLASH erasure. This method fully leverages the advantages of NVSRAM and FLASH chips, allocating storage according to the importance of the stored data. This reduces the number of sector erase / write operations, lowers the risk of data errors, and enables timely storage of real-time data. Fault information is also backed up with dual redundancy. Furthermore, the unit can flexibly store data of varying lengths based on the required "fault data duration" for different fault types. Even after recording for the specified duration for a current fault, if a different fault occurs, the "fault data duration" can be updated and the data re-stored. This method effectively ensures the integrity, accuracy, and real-time nature of fault data recording. Attached Figure Description

[0022] Figure 1 This is a structural diagram of the data recording unit in an aviation power distribution system.

[0023] Figure 2 This is a data recording and control logic diagram of an aviation power distribution system. Detailed Implementation

[0024] This invention proposes a data recording unit and method suitable for aviation power distribution systems. It addresses the requirement of aviation power distribution systems to use high-capacity storage chips to quickly and reliably store and record real-time analog and discrete quantities, as well as fault information, within the period from 500ms before a fault occurs until protection is activated or the fault disappears, with a recording interval not exceeding 5ms. Since both NVSRAM and FLASH are non-volatile memories, they can retain stored data even after power failure. NVSRAM offers fast byte-level access, while FLASH has a maximum cache programming (write) unit of 16 bytes and a minimum programming (write) unit of 1 byte. Furthermore, an erase operation is required before writing data, with the minimum erase unit being a sector.

[0025] Therefore, based on the timeliness of fault data recording, an aviation power distribution system data recording unit composed of a DSP module, an FPGA module, an NVSRAM module, and a FLASH module is proposed. The DSP module is connected to the FLASH module or NVSRAM module via a bus interface or an SPI interface (this patent uses a bus interface as an example). Its main functions are as follows: DSP module: It is connected to the FLASH module and NVSRAM through the address bus and data bus respectively, so as to realize the functions of writing or reading information from the FLASH module and NVSRAM module, and realize the storage of fault data of power distribution system. FLASH Module: The FPGA module provides the FLASH module with control signals such as chip select, reset, and read / write signals. It connects to the DSP module via the address and data buses, writing data provided by the DSP module via the data bus into the address units provided by the DSP module via the address bus. Its main function is to record detailed fault data.

[0026] The NVSRAM module receives chip select and read / write control signals from the FPGA module. It connects to the DSP module via the address and data buses, writing data provided by the DSP module via the data bus into the address units provided by the DSP module via the address bus. The NVSRAM module is mainly divided into four storage areas: the first area is the critical information storage area, storing software configuration information, version information, and information such as the tail pointer of important NVSRAM fault records, the tail pointer of data records before the fault, the tail pointer of NVSRAM fault data cache records, the head pointer of NVSRAM fault data cache records, and the tail pointer of FLASH fault data records; the second area is the important fault information storage area, storing only important fault information; the third area is the 500ms data cache area before the fault, with a fixed length of 100 times at 5ms intervals, used to cyclically store detailed fault data 500ms before the fault occurs; the fourth area is the detailed fault data cache area, used to cache detailed fault data within the FLASH chip erase time, also using a cyclic storage method.

[0027] FPGA module: Provides corresponding control signals to the FLASH module and NVSRAM module to the corresponding control pins to complete the configuration of the corresponding working mode of the memory chip.

[0028] Furthermore, this paper proposes a data recording method for aviation power distribution systems, implementing data storage with a 5ms cycle. When no fault occurs, the third area of ​​the NVSRAM stores the data in real-time and cyclically. When a fault occurs, the third area of ​​the NVSRAM stops storing data. Simultaneously, the second area of ​​the NVSRAM stores important fault information, including fault type flags and codes, fault timestamps, fault protection flags, and fault protection control signals. The FLASH area stores detailed fault data, including, in addition to important fault information, relevant analog quantities and status quantities collected by the system at the time of the fault, and other real-time system operation data. When a fault occurs, if the FLASH is in "erasing" state, the detailed fault data is cached in the fourth area of ​​the NVSRAM. Once the FLASH is idle, the detailed fault data cached in the fourth area of ​​the NVSRAM is read and transferred to the FLASH. Finally, after the real-time recording of the fault data in the FLASH is completed, the 500ms data in the pre-fault data cache area of ​​the third area of ​​the NVSRAM is transferred to the FLASH.

[0029] Furthermore, the second, third, and fourth regions of the NVSRAM module all employ a circular recording method, meaning that once a specified storage address is full, the preceding data is overwritten. The first region of the NVSRAM module, however, uses a fixed-address storage method, storing software configuration information, version information, and the tail pointers of important NVSRAM fault information records, the tail pointers of NVSRAM fault data cache records, the head pointers of NVSRAM fault data cache records, the tail pointers of FLASH fault data records, and the tail pointers of data records prior to the fault.

[0030] Furthermore, the data records of both the NVSRAM module and the FLASH module include packet headers, packet footers, and check bits, which are used to verify the correctness of data during ground maintenance. They also have the same timestamp for data comparison during maintenance.

[0031] Furthermore, this patent selects a 512Mb Nor FLASH memory of type SM29GL512, configured with a capacity of 32M×16bit. Sector erasure is employed. To ensure storage reliability, a cache write method is used.

[0032] The specific recording method for data is implemented as follows: Step 1: After power-on initialization, determine the range of the head and tail pointers for data recording after power-on to ensure normal operation of the storage function: Read the tail pointer of the NVSRAM important fault information record, the tail pointer of the NVSRAM fault data cache record, the head pointer of the NVSRAM fault data cache record, the tail pointer of the FLASH fault data record, and the tail pointer of the data record before the fault from the first area of ​​the NVSRAM module. If there is a tail pointer that is not in the corresponding valid address segment, set the corresponding tail pointer to the starting address of the corresponding data storage area and store it in the first area; Step 2: Execute the first FLASH erase task after power-on, only once: If the FLASH fault data record tail pointer is at the first address of the fault data storage area or the current storage location is the last sector of the fault data storage area, then erase the first sector; otherwise, erase the next sector of the current storage location.

[0033] Step 3: After entering the periodic task, start counting the power-on FLASH erase time. After the erase completion time is reached, set the FLASH data storage enable flag to be valid. Step 4: When no system fault is detected, update the data storage array before the fault at a 5ms cycle and store it in the third area of ​​NVSRAM in a loop; Furthermore, the specific implementation method for writing data to NVSRAM is as follows: a) Read the tail pointer of the data record before the fault occurred in the first area of ​​the NVSRAM module; b) Perform segment switching based on the tail pointer of the data record before the fault: Compare the maximum storage address of the data buffer before the NVSRAM fault with the tail pointer of the data record before the NVSRAM fault. If the difference is less than Δ1, set the tail pointer of the data record before the NVSRAM fault to the initial address value of the data buffer before the NVSRAM fault. Otherwise, do not perform any processing. Here, Δ1 is the length of the detailed fault data storage array. c) Store the updated NVSRAM tail pointer of the data record before the fault into the first area of ​​the NVSRAM.

[0034] Step 5: When a system fault is detected, stop storing data prior to the fault. On one hand, a critical fault information storage array is formed by combining the fault type flag and code, the fault occurrence timestamp, the fault protection flag, and the fault protection control signal, and is cyclically written into the second area of ​​the NVSRAM. On the other hand, a detailed fault data array is formed by combining critical fault information, relevant analog quantities and status quantities collected by the system at the time of the fault, and other real-time system operating data, and is stored in the FLASH memory.

[0035] Furthermore, the specific implementation method for the detailed fault data recording task is as follows: a) If a system fault is detected, the fault storage start flag is set to valid; if the fault disappears, the fault storage start flag is set to invalid. b) If the fault storage start flag is invalid, then the fault storage end flag is set to valid, and the fault storage time count is cleared to 0; if the fault storage start flag is valid, then the following steps are taken: 1) If the fault storage end flag is detected to be valid and the fault type of the previous cycle is inconsistent with the current fault type, the fault storage end flag is set to invalid, and the fault storage time task count value is set according to the current fault type and the time of each execution protection. If multiple faults occur at the same time, the longest execution protection time is used as the fault storage time count value; otherwise, no action is taken. 2) If the fault storage end flag is detected as invalid, then FLASH fault data recording is performed; otherwise, no action is taken.

[0036] Furthermore, the specific implementation method for the FLASH fault data logging task is as follows: a) Update the detailed fault data array; b) Read the tail pointer of the FLASH fault data record in the first area of ​​the NVSRAM module and calculate the sector where the current storage location is located. Calculate the FLASH erase address of the next sector to be erased based on the current sector. c) If the difference between the FLASH erase address and the FLASH fault data record tail pointer is not greater than Δ2, where Δ2 is (sector erase time / write interval cycle time + 1) × FLASH fault data array length, then perform the following actions: 1) The next sector is erased by sending a FLASH erase command to the FLASH erase address; 2) Cache the current fault data into the fourth area of ​​NVSRAM and record the head and tail pointers of the NVSRAM fault data cache in the first area of ​​NVSRAM. At the same time, perform FLASH erase delay counting. When the delay reaches the target value, set the FLASH transfer flag to valid and stop NVSRAM fault data caching. 3) When the FLASH transfer flag is valid, the process of storing data from the NVSRAM fault data buffer into the FLASH is as follows: Data is read from the fourth area, starting at the NVSRAM fault data buffer record head pointer, and sequentially stored into the FLASH starting at the FLASH record tail pointer. The task count is incremented according to the length of the detailed fault data array. After storage is complete, the updated FLASH record tail pointer is stored in the first area of ​​the NVSRAM.

[0037] d) If the difference between the FLASH erase address and the FLASH fault data record tail pointer is greater than Δ2, then the updated fault data array will be stored in the FLASH, and the task count will be incremented periodically.

[0038] e) When the task count is detected to reach the fault storage time count value, the NVSRAM module reads the tail pointer of the data record before the fault occurs in the first area, and sequentially transfers the data between the tail pointer of the data record before the fault occurs and the maximum address of the data buffer before the fault occurs, and between the first address of the data buffer before the fault occurs and the tail pointer of the data record before the fault occurs into the FLASH. After the transfer is completed, the fault storage end flag is set to valid, the fault storage time count is cleared to 0, and the current fault type is provided to the fault type of the previous cycle.

[0039] Example like Figure 1 As shown in Figure 2, the data recording unit of the aviation power distribution system consists of a DSP module, an FPGA module, an NVSRAM module, and a FLASH module. The specific implementation of the data recording method for the aviation power distribution system is as follows: a) After the system is powered on, the data recording unit performs the power-on initialization function to determine the range of the head and tail pointers of the data recording after power-on: read the tail pointer of the NVSRAM important fault information record, the tail pointer of the NVSRAM fault data cache record, the head pointer of the NVSRAM fault data cache record, the tail pointer of the FLASH fault data record, and the tail pointer of the data record before the fault from the first area of ​​the NVSRAM module. If the tail pointer is not in the corresponding valid address segment, set the tail pointer of the NVSRAM important fault information record, the tail pointer of the NVSRAM fault data cache record, the head pointer of the NVSRAM fault data cache record, the tail pointer of the FLASH fault data record, and the tail pointer of the data record before the fault to the starting address of the corresponding data storage area and store them in the first area; b) Execute the first FLASH erase task after power-on: If the power-on FLASH erase flag is "valid", then read the tail pointer of the FLASH fault data record in the first area of ​​the NVSRAM module and calculate the sector where the current storage location is located, and then determine the following: 1) If the FLASH fault data record tail pointer is the first address of the fault data storage area or the sector where the current storage location is located is the last sector of the fault data storage area, then set the FLASH erase address to the first address of the fault data storage area. 2) If the sector where the current storage location is located is not the last sector of the fault data storage area, then set the FLASH erase address to the starting address of the next sector; 3) Other cases will not be processed.

[0040] Finally, the FLASH erase operation code is sent to the FLASH erase address and the power-on FLASH erase flag is set to "invalid".

[0041] c) After entering the periodic task, start counting the power-on FLASH erase time. After the erase completion time is reached, set the FLASH data storage enable flag to be valid. d) When no system fault is detected, update the data storage array before the fault at 5ms intervals and cyclically store it into the third area of ​​NVSRAM: 1) Retrieve the tail pointer of the data record before the fault occurred in the first area of ​​the NVSRAM module; 2) Perform segment switching based on the tail pointer of the data record before the fault: Compare the maximum storage address of the data buffer before the NVSRAM fault with the tail pointer of the data record before the NVSRAM fault. If the difference is less than Δ1, set the tail pointer of the data record before the NVSRAM fault to the initial address value of the data buffer before the NVSRAM fault. Otherwise, do not perform any processing. Here, Δ1 is the length of the detailed fault data storage array. 3) Store the updated NVSRAM tail pointer of the data record before the fault into the first area of ​​the NVSRAM.

[0042] e) When a system fault is detected, stop storing data prior to the fault. An important fault information storage array is created by combining important fault flags and related variable information, and this array is written cyclically to the second area of ​​the NVSRAM, using the same method as above.

[0043] f) When a system fault is detected, the fault storage start flag is set to valid. If the fault disappears, the fault storage start flag is set to invalid. Furthermore, if the fault storage start flag is invalid, the fault storage end flag is set to valid, and the fault storage time count is reset to 0. If the fault storage start flag is valid, the following steps are taken: 1) If the fault storage end flag is detected to be valid and the fault type of the previous cycle is inconsistent with the current fault type, the fault storage end flag is set to invalid, and the fault storage time task count value is set according to the current fault type and the time of each execution protection. If multiple faults occur at the same time, the longest execution protection time is used as the fault storage time count value; otherwise, no action is taken. 2) If an invalid fault storage end flag is detected, execute FLASH fault data recording; otherwise, do nothing. i. Update the detailed fault data array; ii. Read the tail pointer of the FLASH fault data record in the first area of ​​the NVSRAM module and calculate the sector where the current storage location is located. Calculate the FLASH erase address of the next sector to be erased based on the current sector. iii. If the difference between the FLASH erase address and the FLASH fault data record tail pointer is not greater than Δ2, where Δ2 is (sector erase time / write interval cycle time + 1) × FLASH fault data array length, then perform the following actions: A.1 The next sector is erased by sending a FLASH erase command to the FLASH erase address; A.2 Cache the current fault data into the fourth area of ​​NVSRAM and record the head and tail pointers of the NVSRAM fault data cache in the first area of ​​NVSRAM. At the same time, perform FLASH erase delay counting. When the delay reaches the target value, set the FLASH transfer flag to valid and stop NVSRAM fault data caching. When the FLASH transfer flag (A.3) is valid, the process of storing data from the NVSRAM fault data buffer into the FLASH memory is as follows: Data is read from the fourth area, starting at the NVSRAM fault data buffer record head pointer, and sequentially stored into the FLASH memory starting at the FLASH record tail pointer. The task count is incremented according to the length of the detailed fault data array. After storage is complete, the updated FLASH record tail pointer is stored in the first area of ​​the NVSRAM memory.

[0044] iv. If the difference between the FLASH erase address and the FLASH fault data record tail pointer is greater than Δ2, then the updated fault data array will be stored in the FLASH, and the task count will be incremented periodically.

[0045] g) When the task count is detected to reach the fault storage time count value, the NVSRAM module reads the tail pointer of the data record before the fault in the first area, and sequentially transfers the data between the tail pointer of the data record before the fault to the maximum address of the data buffer before the fault, and between the first address of the data buffer before the fault to the tail pointer of the data record before the fault, into the FLASH. After the transfer is completed, the fault storage end flag is set to valid, the fault storage time count is cleared to 0, and the current fault type is provided to the fault type of the previous cycle.

Claims

1. A data recording unit suitable for aviation power distribution systems, characterized in that: The data recording unit is composed of the following: The DSP module is connected to the FLASH module and NVSRAM via the address bus and data bus, respectively. The FPGA module is connected to the FLASH module and the NVSRAM module respectively and outputs control signals. The FLASH module is used to record detailed fault data; The NVSRAM is divided into four areas: Area A is the critical information storage area, which stores software configuration information, version information, and the tail pointer of the NVSRAM important fault information record, the tail pointer of the data record before the fault, the tail pointer of the NVSRAM fault data cache record, the head pointer of the NVSRAM fault data cache record, and the tail pointer of the FLASH fault data record; Area B is the important fault information storage area; Area C is the data cache area for 500ms before the fault. Area D is a detailed fault data cache area.

2. The data recording unit according to claim 1, characterized in that: The important fault information storage area stores important fault data in the form of an array of important fault information, including: fault type flag and code, fault occurrence timestamp, fault protection flag and fault protection control signal; Detailed fault data is stored in the form of a detailed fault data array, including: in addition to important fault information, relevant analog quantities and status quantities collected by the system when the fault occurs.

3. The data recording unit according to claim 2, characterized in that: The C area is a storage space with a fixed interval of 5ms, which is used to cyclically store detailed fault data 500ms before the fault occurs. Area D is used to cache detailed fault data during the FLASH chip's erase period. Areas B, C, and D all use a circular recording method, while area A uses fixed address storage. Both the NVSRAM and FLASH modules record data including a header, footer, and checksum, used for verifying data correctness during ground maintenance, and have the same timestamp.

4. A data recording method suitable for aviation power distribution systems, implemented based on the data recording unit according to any one of claims 1-3, characterized in that: Step 1: After power-on initialization, determine the range of the head pointer and tail pointer stored in NVSRAM A area; Step 2: Perform a FLASH erase; Step 3: Enter the periodic task, count the power-on FLASH erase time, and after the erase completion time is reached, set the FLASH data storage enable flag to be valid; Step 4: When no system fault is detected, update the data storage array before the fault at a 5ms cycle and store it in the NVSRAMC area in a loop; Step 5: When a system fault is detected, stop storing data before the fault occurs; write the important fault information array cyclically into the B area of ​​NVSRAM, and write the detailed fault data array into FLASH.

5. The method according to claim 4, characterized in that: Step one also includes: determining whether all the tail pointers stored in NVSRAM A area are in the corresponding valid address segments. If not, the corresponding tail pointer is set to the starting address of the corresponding data storage area and stored in area A.

6. The method according to claim 4, characterized in that: In step two, if the FLASH fault data record tail pointer is the first address of the fault data storage area or the current storage location is the last sector of the fault data storage area, then the first sector is erased; otherwise, the next sector of the current storage location is erased.

7. The method according to claim 4, characterized in that: Step four involves the following steps: a) Read the tail pointer of the data record before the fault occurred in area A of the NVSRAM module; b) Perform segment switching: Compare the maximum storage address of the data buffer before the NVSRAM failure with the tail pointer of the data record before the NVSRAM failure. If the difference is less than Δ1, set the tail pointer of the data record before the NVSRAM failure to the initial address value of the data buffer before the NVSRAM failure. Otherwise, do not perform any processing. Here, Δ1 is the length of the detailed fault data storage array. c) Store the updated tail pointer of the data record before the NVSRAM failure into the NVSRAMA area.

8. The method according to claim 4, characterized in that: Step five involves the following steps: a) If a system fault is detected, the fault storage start flag is set to valid; if the fault disappears, the fault storage start flag is set to invalid. b) If the fault storage start flag is invalid, then set the fault storage end flag to valid and clear the fault storage time count to 0; if the fault storage start flag is valid, proceed to step c). c) If the fault storage end flag is detected to be valid and the fault type of the previous cycle is inconsistent with the current fault type, the fault storage end flag is set to invalid, and the fault storage time task count value is set according to the current fault type and the time of each execution protection. If multiple faults occur at the same time, the longest execution protection time is used as the fault storage time count value; otherwise, no action is taken. If the fault storage end flag is detected as invalid, FLASH fault data recording is performed; otherwise, no action is taken.

9. The method according to claim 8, characterized in that: The specific process of FLASH fault data recording is as follows: a) Update the detailed fault data array; b) Read the tail pointer of the FLASH fault data record in area A of the NVSRAM module and calculate the sector where the current storage location is located. Calculate the FLASH erase address of the next sector to be erased based on the current sector. c) If the difference between the FLASH erase address and the FLASH fault data record tail pointer is not greater than Δ2, where Δ2 is (sector erase time / write interval cycle time + 1) × FLASH fault data array length, then perform the following actions: 1) The next sector is erased by sending a FLASH erase command to the FLASH erase address; 2) Cache the current fault data into the D area of ​​NVSRAM and record the head and tail pointers of the NVSRAM fault data cache in the A area of ​​NVSRAM. At the same time, perform FLASH erase delay counting. When the delay reaches the target value, set the FLASH transfer flag to valid and stop NVSRAM fault data caching. 3) When the FLASH transfer flag is valid, the process of storing data from the NVSRAM fault data buffer into the FLASH is as follows: read data from the D area, starting from the NVSRAM fault data buffer record head pointer, and store the data sequentially into the FLASH starting from the FLASH record tail pointer, and increment the task count according to the length of the detailed fault data array. After storage is complete, the updated FLASH record tail pointer is stored in area A of NVSRAM; d) If the difference between the FLASH erase address and the FLASH fault data record tail pointer is greater than Δ2, then the updated fault data array will be stored in the FLASH, and the task count will be incremented periodically. e) When the task count is detected to reach the fault storage time count value, the tail pointer of the data record before the fault occurs is read from the A area of ​​the NVSRAM module. The data between the tail pointer of the data record before the fault occurs and the maximum address of the data buffer before the fault occurs, and the data between the first address of the data buffer before the fault occurs and the tail pointer of the data record before the fault occurs are sequentially transferred into the FLASH. After the transfer is completed, the fault storage end flag is set to valid, the fault storage time count is cleared to 0, and the current fault type is provided to the fault type of the previous cycle.

10. The method according to claim 4, characterized in that: When a fault occurs, if the FLASH status is "erasing", the detailed fault data is cached in the D area of ​​the NVSRAM. When the FLASH reaches an idle state, the detailed fault data cached in the NVSRAM D area is read out and transferred to the FLASH. Finally, when the real-time recording of the FLASH fault data is completed, the 500ms data in the data cache area before the fault in the C area of ​​the NVSRAM is transferred to the FLASH.

Citation Information

Patent Citations

  • A data logging module for aircraft power system controllers

    CN108109224B

  • A data storage method for Flash memory

    CN108376121B

  • A Flash chip storage method and device

    CN112860184B