Design of Real-Time Database for the Vacuum Cold-Black Environment Simulator

There is an urgent need to develop a real-time database (RTDB) to handle large amounts of realtime data, to realize process monitoring of vacuum cold-black environment simulation, cold-black environment data acquisition, fault processing, data storage, etc. This paper conducts real-time database design through network architecture, functional modules, communication interfaces, data management, and transaction scheduling. Simulation test and associated debugging test show that the real-time database can efficiently process large data volume, and the data interaction efficiency is greatly improved to meet the needs of space environment simulation equipment, laying a solid data foundation for subsequent


Introduction
The space environment simulator is used for the thermal balance test and thermal vacuum test of a whole star or large sub-system, which simulates spacecraft test equipment for basic parameters of space such as vacuum, cold-black and solar radiation [1][2][3]. It needs to store and process large amounts of real-time data, including test process monitoring, data acquisition, troubleshooting, etc [4]. The database is an important part of the measurement and control software and plays a role in the simulation of the entire space environment simulation equipment control system. Therefore, based on the traditional relational database, real-time high data should be included in real-time database management, improve the response speed of the system in process monitoring and fault handling, and meet the requirements of realtime data timeliness [5].

Design of real-time database (RTDB)
The real-time database (RTDB) system can be used as a real-time control module, a data acquisition module and a data support platform for the entire device flow measurement and control, providing data information support for the entire process control. In the field of process control, the RTDB system can realize the process data acquisition and control optimization instruction transmission to the control system. It monitors the process flow of equipment, advanced control and optimized control [6]. The process control database needs to store the processed real-time data in the traditional relational database based on the RTDB, and provide various functions such as several things recovery, accident recollection, performance analysis, data query, and report printing.
The real-time data storage requirements of the RTDB are designed for the space environment simulation equipment control system to meet the requirements of the control system for real-time data processing and concurrent transaction scheduling processing of large data volumes.

Design of RTDB network
The current mainstream real-time database, due to its large amount of data and management needs, has adopted a distributed architecture, and meets the needs of the distributed network architecture design of space environment simulation equipment.
The real-time database of the space environment simulation device is based on the current mainstream real-time database. It can support a simple monitoring system with only a single node (only one host computer) and multiple nodes, with dual-system hot standby and multiple redundancy functions. Complex monitoring network, in a complex control system, can configure various functional nodes to be dual or multi-machine redundant. [7] The network structure is shown in Figure  1.

Design of RTDB module
The functions that need to be implemented in the implementation of the RTDB are: data management, analysis scheduling, alarm events, and logging. Data management includes real-time data collection, implementation data processing, storage and query of real-time & historical data storage and query. The data processing also requires legality and consistency check on the collected real-time data, alarms and processing are required for abnormal situations. The implementation data is unified and implemented by the scheduling module for real-time transactions with strict time. Through the set departure conditions and timing mechanism, the alarm function is realized, and the data security and the stable operation of the system are ensured by providing real-time data backup and log mechanism. Software system structure design is mainly considered, there are several factors as follows: -Storage Management: Design an efficient data storage structure that enables fast data access; -Query processing: Run data queries efficiently by enabling users to pass constraints; -Transaction management: All users' operations on the database are real objects, and scheduling is completed by the system's transaction scheduling, to achieve real-time, correctness and consistency of monitoring; -Other services: Contains other services provided by the database, such as alarm modules, log management modules, and so on; -Comprehensive design, the main structure of the system is divided into three parts. Data management part, real-time transaction management part, service management part.
The Structure diagram is shown in Figure 2. For the design and implementation of the entire system, the component module is used to implement a single module separately, and all the modules are combined to form a system.

Design of communication interface
The RTDB is a data platform in the space environment simulation equipment. It needs to be connected not only with the field PLC, smart meters and sensors, but also with the upper monitoring system, as well as some special control software. Therefore, the data interface design of the RTDB system is very important. The communication interface module is responsible for the transmission of acquisition data and control commands by the field PLC, configuration software data point update and control command delivery and other data acquisition and data transmission functions.
The RTDB communication interface uses the new generation OPC unified architecture (OPC UA) released by the OPC Foundation for data communication. The RTDB uses the common Client-Server mode to implement OPC UA communication. The server is responsible for providing data and services, and the client is responsible for using the data and services to complete the corresponding data processing. The server and client service data interaction process are shown in Figure 3 Create OPC UA server

Design of database data storage management
The real-time database of the space environment simulation equipment control system uses a bottom-up design method, combined with the E-R model design, that is, first analyses the local conceptual structure of the design database, and then integrates the partial view to obtain the global database conceptual structure.
In the equipment control system, the most important function and requirement is to record the status data of all process equipment in the test, and then to classify and query the data after the test. Since the general vacuum environment simulation device operates, displays, and queries according to different processes, the system is abstracted into three typical process scenarios according to the process of the device: vacuum process, liquid nitrogen process, and auxiliary process. The three process scenarios are basically independent, and only a small part of the data is related to each other, so that it is convenient for data information storage. Since the threesystem device parameter management methods are similar, the following is a general device design. The relationship between the main tables in the database is shown in the figure below. The space-related data table only gives the attributes of the main functional modules of the system. Data table design is mainly based on equipment. It includes equipment list, analogy index, analogy data, digital index, digital data, calculation index, calculation data, maintenance management. The Database E-R diagram is shown in Figure 4.

Design of transaction scheduling
Data variables in real-time transactions are used to represent the current characteristics of real-time transactions and are used for real-time scheduling of modules for real-time scheduling, including priority management, transaction commit, transaction execution, transaction blocking, transaction recovery, transaction discarding, and so on. These operations are all related to the data variables in the corresponding real-time transaction. It is also possible to perform lock mechanism management based on these data, and to ensure correctness of real-time scheduling through concurrency control. [6] Real-time scheduling uses multi-threading technology. Through multi-threading technology, highspeed access of real-time data and concurrency control of real-time transactions can be well realized, and priority management is realized through queue management mechanism and priority management.
Because the number of transactions in a RTDB system is so large, it is impossible to keep all data resident in memory. However, because frequent I/O will reduce the real-time requirements of the RTDB system, it is necessary to make some data sets of transaction operations (real-time access parts) resident in memory to ensure the response speed. In general, a properly adequate memory space required by a RTDB system should be at least a data set to be stored by a frequently operating transaction. Based on this, the state of realtime transactions is divided into five types, which are divided into three levels for scheduling to improve system throughput and real-time response efficiency. The transaction scheduling state diagram is shown in figure 5. 1. Transaction → Ready, after the priority allocation of the transaction without the priority or due to the fault restart, put it into the ready state.
2. Ready → Execution, the transaction in the ready state enters the execution state once it is put into operation.
3. Execution → Completion, if the transaction in the execution state can be run and submitted, it indicates that it is normal completion and enters the completion state.
4. Completion → Block, the transaction in the execution state is used for resource competition and is pre-empted by other transactions, then enters the blocking state.
5. Block → Ready, the blocked transaction can enter the ready state once the resources are enough, re-allocate it and re-execute.
Through real-time transaction modelling analysis, the data variables of specific real-time transactions are shown in Table 1: That is, the transaction should be executed within the time limit.

Key
Current time

Priority
Free time, greater than zero, the smaller the higher the priority, the less than zero means the transaction needs to be aborted

Simulation test of RTDB
The RTBD system is implemented using the LabVIEW and the DSC toolkit.
To verify the high-volume storage and transaction processing capabilities of real-time databases, system simulation tests were performed on real-time database systems. The OPC server and OPC client are used to simulate the device field data in the space environment and provide periodic random data in real time. Test RTDB transaction scheduling capabilities by creating large amounts of simultaneous RT-data.
According to the data characteristics of the actual space environment simulation equipment and the scale of the conventional field data, refer to the data volume of the medium and large space environment simulator, simulation test design 1000 simulation data points, including 500 analogy points and 500 digital points for on-site data acquisition simulation. Since the field data transaction is periodic, the general sampling period is 1 s, so the test requires that all transactions be completed within 1 s.
Tested against the above test environment, simulate data update at the same time for all data points, and the average time for all update requests of the real-time database is 25ms; according to the typical space environment, simulate the data transaction size of the device, create 50 points for each transaction, and simulate 10 respectively. Concurrency with 50 transactions, through transaction scheduling, transactions are 100% complete, no discarding transactions, transaction processing capabilities to meet the needs of space environment simulation equipment.

Associated debugging test of RTDB
To verify whether the environment simulator can meet the requirements in the actual operating environment, the RTDB is debugging tested with a Bath-Oil simulator (Typical vacuum cold black environment simulation equipment). The equipment includes: a vacuum pumping system, a high and low temperature control system, a container interior lighting, a local touch screen, a remote measurement and control computer, and a PLC system. The test environment software and hardware configuration are designed according to the minimum configuration of the stable operation of the conventional vacuum environment simulator control system database software. The RTDB generates an alarm message.
Upload the information to the interface and save the information database. The alarm information data is correct.
Through the associated debugging test, the RTDB can meet the requirements of the real-time data by vacuum cold-black environment simulator.

Conclusion
The RTDB is an important part of the space environment simulation device control system and needs to store and process a large amount of real-time data. This paper introduces a RTDB design method suitable for the space environment simulator: the database real-time aspect, large data volume high-speed storage the processing speed is much faster than the traditional relational database or data table, which effectively improves the data interaction efficiency of the device. In terms of versatility, the platform-independent OPC UA protocol interface enables field PLC, data monitoring software and other special programs to easily interact with realtime databases, enhancing database scalability.