{'fraction_non_alphanumeric': 0.023006443817962144, 'fraction_numerical': 0.006141763995167137, 'mean_word_length': 5.2272727272727275, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Design and implementation of simulation test platform for battery energy storage station monitoring system

The test of battery energy storage station has the characteristics of low degree of automation, complicated testing process, and many cooperation links. Especially for the battery energy storage station monitoring, there are currently no corresponding test tools and test methods. Based on the business function and energy storage equipment simulation modularization, test configuration and test case configuration ideas, this paper designs a set of battery energy storage station simulation test system. It realizes the functions of configurable equipment model of energy storage power station, selectable communication protocol, settable test scenarios, scripted execution of test process, automatic generation of test results, etc., and can provide specialization tool for the testing of the grid-side battery energy storage station monitoring system, effectively improve the testing efficiency. The field test results show that the test system is accurate and effective.


Introduction
Serving as an important part of energy storage, battery energy storage station (BESS) is featured with fast response and high control accuracy, and is of great value in scenarios of distributed generation connection, frequency regulation joint with heat-engine plant, peak shaving and frequency regulation for power system, demand-side load shifting and etc. [1] At present, a great number of BESSes have been established and put into operation both at home and abroad, and abundant experience on the operational control of BESS has been accumulated [2] . Regarding the test of BESS, the research fields abroad are mainly concentrated in three aspects: grid-connected converter, control system and energy storage battery pack charging and discharging curve [3][4][5][6][7] . The domestic energy storage power station system test mainly focuses on the formulation of the corresponding standards [8][9][10] and grid-connected testing [11][12][13] , there is no relevant researches on the testing of the monitoring system of electrochemical energy storage power station.
Based on the testing requirements of BESS monitoring system, this paper summarized the mainstream architecture of BESS monitoring system, proposed the framework of monitoring system test platform, expounded the software, hardware and functional design of the test platform, designed and developed a set of simulation test platform on basis of modularization [14] and configuration ideas. It realized the test on BESS monitoring system, so as to provide theoretical and technical support for development and testing of large-scale BESS.

Monitoring System Architecture of BESS
Before performing simulation test of BESS monitoring system, it is necessary to clarify system network architecture, data flow and input/output parameters of BESS, so as to lay a solid foundation for constructing the test environment. Summarizing the existing grid-side BESS projects, it can be concluded that the architecture of the monitoring system mainly consists of master station layer, station control layer, bay layer and equipment layer. Some BESSes may also include a coordination control layer. Signals of BESS mainly consist of the conventional remote signaling, remote measurement, remote control, remote pulse, power control instructions, emergency control instructions and etc.

System Network Architecture
Refer to Figure 1 for detailed information about the overall network architecture of the grid-side BESS. The master station is connected with station control layer via Substation Gateway, and the station control layer includes monitoring system and related equipments. The station control layer is connected to the bay layer, which is mainly responsible for communication and operational control of the bay. An on-site monitoring unit is optional. Generally, a bay of BESS contains one or more energy storage units. The equipment layer mainly includes power conversion system (PCS), battery management system (BMS) and batteries.  Regarding an BESS equipped with controllers, the coordinated control layer is added between the bay layer and station control layer, which is responsible for primary frequency and reactive voltage control of the whole station, as shown in Figure 2.

Data Flow
The grid-side BESS exchanges data with Master Station through Substation Gateway. Substation Gateway collects the whole data of BESS and sends it to Master Station, including monitoring system data, PCS/BMS data and primary/secondary equipment data. Meanwhile, Substation Gateway forwards the power control instruction of Master Station to AGC/AVC module of the monitoring system to control the power of the whole station. At present, the data exchange between the grid-side BESS and Master Station adopts the IEC104 protocol. Next, the monitoring system is directly connected to the bay layer equipment. The communication protocol generally adopts the IEC104 or IEC 61850 MMS. The AGC/AVC module of the monitoring system performs power calculation and analysis according to the received power control instructions, and calculates the power of each unit. The power control instruction of each unit is sent directly to the PCS. For BESS equipped with coordinated controllers, the gateway machine needs to forward power control instructions to the monitoring system or the coordinated controller according to the actual division of labor between the AGC/AVC module of monitoring system and the coordinated controller. The instruction of emergency control is forwarded to the coordinated controller for control through hard contacts or communications. Conventional power control instructions for energy storage units station control instructions also need to be forwarded to the PCS through the coordinated controller to control the priority between multiple control modes. The coordinated controller uses IEC61850 GOOSE that is featured with quick action to control the PCSes.

Input and Output Parameters
Regarding the test requirements of the grid-side BESS monitoring system, there are two input parameters, one is the conventional power control instruction, and the other is the emergency control instruction. Both of these instructions can be simulated by simulation tools and issued to Substation Gateway, or the coordinated controller.
There are also two output parameters for the grid-side BESS monitoring system testing. One is the power station level information, including the voltage, active power, reactive power, current, and bus voltage at the grid-connected point; the other is information of each storage Energy unit, including active power, reactive power, current, SOC, etc.

Overall Functions and Modular Design
Refer to Figure 3 for detailed information about the overall modules of the simulation test system. more, it also includes application layer functions such as model maintenance, section data editing and loading, protocol processing, network topology, report management, user management and etc. Energy storage unit simulation includes PCS simulation and BMS simulation, with functions such as data communication, steady-state data simulation, fault triggering and etc., and is capable of simulating the characteristics of PCS and battery in BESS. The software adopts modular design, and each module realizes decoupling development and debugging through standardized interfaces, and coordinates the operation to complete the simulation test of the BESS. The interface program includes a communication processing program and a data format conversion and program to realize conversion and communication of different data formats among the simulation test system, energy storage unit simulation and the system under test.
In the test preparation stage, the model and section data of the BESS shall be firstly prepared. The model of the BESS shall be constructed in the simulation test system and the system under test respectively. And ensure the communication among the simulation test system, energy storage unit simulation and the system under test is normal.
While starting the test, the tester edits the section data of the BESS through the section data editing tool, and then loads it on the energy storage unit simulations.
The system under test obtains measurements by data communications. The simulation test system issues corresponding test power instructions to the system under test, which will performs corresponding processing and analysis according to real-time data generated by energy storage unit simulations and test power instructions, then issues power control instructions to the energy storage unit simulations. Meanwhile, responses of the energy storage unit simulations will be simultaneously passed to the simulation test system and the system under test. The simulation test system analyzes the test results to realize closed loop of the whole testing process.

Configuration and Test Case Configuration Realization
For different test scenarios, m test cases need to be configured. The data required for different use cases are quite different, and the configuration work is more cumbersome, including the configuration and generation of cross-sectional data, and the maintenance of equipments and topology configurations. Based on the ideas of configuration, this paper decoupled and encapsulationed various components of the test, and provided configuration tools, bound test cases and test configurations together, and supplied with standardized templates for users to modify, so as to simplify testing and improve configuration maintainability and overall testing efficiency.
For each group of test items, the configuration includes business function, network topology and data model, among which, the business function determines input and output parameters of the test. The input parameters are reflected in the form of telecontrol information, and the output parameters are measurements of PCSes, BMSes and coordinated controllers. All the parameters are configured in data model. Data model determines equipment parameters and measurements. The equipment model mainly includes of PCS, BMS, coordinated controller, bus, collector line and etc. Some equipment, such as PCS, BMS and coordinated controller, performs dynamic simulation, while other equipment, such as bus, provides static constrained parameters only. The network topology determines the connection relationships and communication relations, such as the connection relationships between topological devices such as grid-connected points, buses, switches and other topological equipment, as well as the communication configuration among PCS, BMS, coordinated controller, Substation Gateway and other equipment. In order to reduce the configuration workload, the system provides standardized templates for each test, so as to achieve rapid editing of test cases. Refer to Figure 4 for detailed information about the configuration relations of the simulation test system of the BESS.

Network Topology
Communicati on Topology Figure 4 Configuration diagram of simulation test system for energy storage station

PCS Simulation
The function of PCS simulation includes two parts, steady-state simulation and transient state simulation.
Since this system focuses on the interactive testing between the monitoring system and PCS, the transient simulation of PCS mainly considers the simulation of abnormal events such as PCS faults and alarms. The transient simulation of the body is not considered. Among them, the steady-state simulation of PCS simulation mainly realizes the communication between the PCS simulation equipment and the monitoring system and the BMS simulation equipment, the generation of remote signaling and telemetering and then sending them to the monitoring system, receiving the power dispatching commands of the monitoring system and responding correctly. Transient simulation mainly includes sending the corresponding abnormal signals to the monitoring system in the abnormal states, and refusing to execute the power dispatch commands of the monitoring system. As shown in Figure 5, the PCS simulation module mainly includes communication module, event processing module, telemetering processing module, remote signaling processing module, manual setup module and etc. The communication module realizes data interaction with the monitoring system and the BMS simulation system, mainly including realization and integration of various types of communication protocols and agreements, such as MODBUS, IEC104, IEC61850, etc. Manual setup module can modify real-time remote signalings, telemetering and trigger events through the man-machine interface tool, thereby realizing manual intervention in the simulation process.

Communication Module
Remote Signal Processing Event Processing

BMS System
Manual Setup of Event Remote Metering and Remote Signal Event processing, telemetering processing and remote signal processing are the core modules of PCS simulation. These modules realize real-time simulation of PCS operating status based on manually set signals and received signals from BMS system and monitoring system interaction, combined with the operating logic of PCS equipment. Among them, remote signaling, telemetering, and events affect each other. For example, a telemetering limit violation will trigger a protection event or an alarm event; a protection action event will trigger a real-time power telemetry to 0, and a PCS equipment shutdown event. When the PCS equipment is running in a steady state, it receives the upper-level control unit or local control commands, performs charging and discharging management, and sends re-mote signaling and telemetering data to the monitoring system. When an abnormal state occurs, the simulation tool will trigger corresponding protection actions, faults, alarms and other events to be sent to the monitoring system, and at the same time change the telemetering and remote signaling data of the PCS equipment.PCS simulation is managed by the simulation and test system. The simulation and test system edits the initial test section data and loads it to each PCS as the initial state of each PCS. The simulation and test system can also set event or fault information to the PCS.

BMS Simulation
The BMS simulation tool has the same architecture as the PCS simulation tool, but the main difference lies in the logic of event processing, telesignal processing and telemetering processing. Considering the huge amount of data in the BMS system of the energy storage station, and most of them is battery cell data, the impact on the operation of the BMS system can be processed uniformly, so the same type of data of the BMS can be merged and simplified, thereby simplifying the Model process and simulation control process of the BMS system. In case of stable operation, BMS communicates with PCS equipment and the monitoring system, and uploads status data of BMS to the monitoring system and PCS without receiving the power control instruction from the monitoring system. BMS transient process may also upload to the monitoring system and PCS via generating events. Since both PCS simulation data and BMS simulation data are generated from the simulation and test system, in the testing environment, it is only necessary to consider the logical relationship of BMS and PCS when constructing section data, and it is not necessary to realize the Data interaction between BMS and PCS at the energy storage unit simulation layer. there is no need to realize BMS and PCS data interaction on the layer of energy storage unit simulation.

Test Case Analysis
By means of adopting the aforementioned system, a certain monitoring system of the BESS is tested. The energy storage station is 26MW/52MWh, includes 52 units of PCS, adopts IEC61850 protocol and communicates in a direct connection mode. As an example, test processes and results of AGC and primary frequency regulation are described and displayed.

AGC Test
The AGC test process is as follows: Step 1: Prepare the testing environment, connect the energy storage unit simulation with the tested system and establish the communication process among the tested system, energy storage unit simulation and testing system.
Step 2: Load the testing environment, including the model and section data.
Step 3: Increase power test. The test system sends a test command to the gateway machine, initial active power is set as 0, the active power set value is modulated in step-by-step manner to -0.25P N , 0.25 P N , -0.5 P N , 0.5 P N , -0.75 P N , 0.75 P N , -P N , P N , each power point is maintained for at least 30s and record the sequential power of each PCS; take the average value of each 0.2 seconds' active power as one point to record the measured curve; Step 4: Power reduction test. The test system sendstesting commandsto the gateway machine, initial active power is set as P N , the active power set value is modulated in step-by-step manner to -P N , 0.75 P N , -0.75 P N , 0.5 P N , -0.5 P N , 0.25 P N , -0.25 P N , 0, each power point is maintained for at least 30s and record the sequential power of each PCS; take the average value of each 0.2 seconds' active power as one point to record the measured curve; Step 5: Calculate control accuracy, response time and modulation time of active power at each point. Check if output power of the tested system may comply with relevant standards. Calculate the control accuracy of the power set value according to formula (1): (1) where: P set --Set value of active power; P meas --the average value of the actual measured active power after each step --Control accuracy of power set value.
Step 6: Set some PCS fault or alarm signals, and repeat step 1-5.
Step 7: Generate test report and draw the correspondingtest curve.
Refer to Figure 6 for detailed information of AGC follow-up test curve.

Primary Frequency Regulation Test
The primary frequency regulation test is mainly applied to the response of energy storage power station to grid frequency fluctuations. The actual on-site grid frequency fluctuations cannot be simulated. Therefore, this test is mainly carried out in a simulation environment. In actual engineering, only after grid frequency fluctuations occurred, according to the output of the energy storage station to verify its function.
Step 1: Prepare the testing environment, connect the energy storage unit simulation to the tested system, and establish the communication between the tested system, the simulated energy storage unit and the test system.
Step 2: Load the testing environment, including the model and section data.
Step 3: Primary frequency regulation is thrown in the system and the test system simulates system frequency variation. Firstly, positive frequency deviation is simulated, and then negative frequency deviation is simulated, each frequency point is maintained for at least 2 minutes and record the output active power of each PCS.
Step 5: Verify the function of primary frequency regulation of the tested system, record system frequency deviation, output power, action time and response time of the primary frequency regulation.
Step 6: Generate test report and draw the relevant test curve.
Refer to Figure 7 for detailed information of the primary frequency regulation test curve.

Conclusion and Prospects
This paper introduced the architecture and implementation scheme of one kind of simulation and test system for the BESS. The system has the technical characteristics of function modularization, configuration, supporting various types of network topologies and convenient on-site configuration. According to actual test results, the system is stable, effective and capable of efficiently improving test efficiency of the monitoring system of the BESS.