## 3 Parameter Identification of Black Box New Energy Units
### Comparison Error Calculation
Leveraging MATLAB's powerful computational and optimization libraries, App Designer excels in parameter identification, optimization, and data manipulation, enabling real-time parameter tuning and visualization of results. However, when dealing with complex power system simulation, especially new energy-structured modeling, the built-in functions of MATLAB App Designer may not be able to meet the demand for high-precision simulation and system dynamic behaviors, especially in the accurate simulation of new energy devices such as wind power and photovoltaic power plants after they are connected to the power grid. Therefore, it is often necessary to use it in combination with a dedicated simulation tool to ensure modeling accuracy. PSD-BPA (Power System Dynamics-Bonneville Power Administration) is a comprehensive power system simulation tool developed by the China Electric Power Research Institute (CEPRI), widely used in tasks such as tidal current calculation and transient stability analysis, and excels particularly in modeling and dynamic simulation of wind power and photovoltaic systems. Although BPA has advantages in the stability analysis of new energy systems connected to the grid, its lack of flexible custom programming and algorithm design functions limits the realization of personalized analysis needs. In addition, the operation of BPA is more specialized, and ordinary users face a higher threshold of using it. Based on this, this study combines the advantages of MATLAB App Designer and PSD-BPA to develop efficient parameter identification software for new energy-structured models. With the graphical interface provided by App Designer, researchers can easily adjust the parameters, view the identification results in real-time, and dynamically present the effects of parameter changes on the simulation results, which greatly simplifies the operation process. At the same time, with the powerful algorithm library of MATLAB, the software can efficiently identify and optimize the parameters and improve the identification accuracy and speed. Through the simulation function of PSD-BPA, it can accurately simulate the dynamic characteristics of the new energy equipment after connecting to the power grid and verify the accuracy and reliability of the parameters. This integrated solution makes up for the shortcomings of the MATLAB App Designer in simulation function and, at the same time, enhances the flexibility of the PSD-BPA in personalized identification and real-time optimization, which provides strong support for the control identification, parameter optimization, and engineering applications of new energy systems. The main components of the parameter identification simulation software based on the joint development of MATLAB and PSD-BPA proposed in this paper include the data import and processing module, control parameter identification module, PSD-BPA program simulation inspection module, error calculation, and model evaluation module. The MATLAB main program consists of data processing, a parameter identification algorithm, and a BPA calling program. The specific working principle of the joint parameter identification software and the physical diagram of the software are shown in Figures 14 and 15. The main functions of each functional module of the software are as follows:  
1. Data Import and Processing Module: It is used to import measured data, classify them based on fault type and usage after step transformation, and segment all kinds of data according to the three segments of the fault ride-through and extract the characteristic parameters of faults in each working condition. 2. Control Parameter Identification Module: Select the relevant optimization algorithm, set the initialization parameters, combine the optimization algorithm and the measured segmentation data to carry out a variety of control model parameter identifications, and determine the optimal control combination according to the results of the identification error of each model.