Digital Twin of the Distributed Generation Plant

This article describes the concept of building a digital twin of the distributed generation (DG) plant operating on based on a synchronous generator with a fuzzy auto-tuning unit for automatic voltage regulator and automatic speed regulator. The structure of the digital twin is represented as a hierarchal fuzzy model built using experimental data. Programmatically implemented algorithms for optimization of term aggregations membership functions and numerals from knowledge base rules. The results of experiments on obtaining an optimized neuro-fuzzy model for regulating the generator rotor frequency are presented. The proposed algorithms can be used in further research on the construction of a digital twin of the DG plant, as well as for solving the problem of automatic regulators tuning.


Introduction
To increase the reliability of consumers power supply and the formation of Smart Grid networks [1][2], distributed generation (DG) plants are used, including those based on renewable energy [3], as well as electric energy storage units (ESU) [4] and various devices for modes intelligent control. For the optimal solution of the Smart Grid networks management problem, the use of a full mathematical model of the power supply system is required. The contemporary digital technologies allow to build advanced models of power plants that enable to deliver comprehensive diagnosticating and control solutions. One of the methods to generate such models can be based on digital twin technologies concept, which make it possible to obtain all the necessary data characterizing functioning of a physical object or a system [5][6][7][8]. The digital twin includes a detailed mathematical model of the object, the parameters of which are refined with the help of information coming from measuring-and-information systems.
In addition to the concept of "Digital Twin", the term "Digital Shadow" is used, which defines the presence of a system of relationships and dependencies that describe the behavior of a real physical object and contained in excess big data received from a real object using the means of industrial Internet. The digital shadow allows predicting the behavior of a real object, but only under the conditions in which data was collected, which is its main difference from a digital twin. The creation of a digital twin of real power generation equipment or power supply system should be based on the use of various sensors to refine the mathematical model, as well as on the use of the Internet of things, data collection systems for their subsequent processing based on intelligent technologies.
The article presents the main provisions of the concept of building the DG plant's digital twin where plant operates on the basis of a synchronous generator with a fuzzy auto-tuning unit for automatic voltage regulator (AVR) and automatic speed regulator (ASR) [9]. The structure of the digital twin is analyzed as a multiply connected model built using experimental data. The results of experiments on obtaining an optimized neuro-fuzzy model for regulating the generator rotor speed are presented. 2. Description of the concept and structure of building a the DG plant digital twin As an object for which the construction of a digital twin is proposed, a small-power turbogenerator plant based on a synchronous generator is considered. The small inertia constant of the rotor of its generator requires taking into account the mutual influence of AVR and ASR in the process of tuning. In addition, optimal control requires adjusting the tuning of AVR and ASR when significant changes are introduced in the operation modes of both DG plant and power systems (PS) in parallel operation modes. These requirements can be met using the use of intelligent control algorithms. In figure 1 a structural diagram of the DG plant under consideration with a fuzzy auto-tuning unit for AVR and ASR [9]. The operation principle of the control system in question is to identify the operating mode of DG plant generator and to correct the current settings parameters for AVR and ASR when the operation mode is changed. To identify the operating mode, it is proposed to use an adaptive network based on a fuzzy inference system (ANFIS), which is one of the hybrid neuro-fuzzy networks options. In general, ANFIS implements the Sugeno fuzzy inference system in the form of a five-layer feedforward signal neural network. The issue of identifying the operating mode of the DG plant, which resolved by the ANFIS unit, is described in [9].
A fuzzy controller with an automatic tuning unit is a fuzzy logic output system with modules for identifying a digital model of the DG plant harmonized configuring of AVR and ASR [9]. The application of harmonized configuring allows to form the initial fuzzy controller knowledge base. Then, the digital model identification module, based on experimental data, forms a digital shadow for constructing a digital twin of the DG plant.
The proposed concept of building the DG plant's digital twin is based on the representation of the object in the form of a multiply connected structure having a certain set of input and output parameters and relationships formed based on experimental data. The proposed structure of the digital twin of the DG plant under consideration is presented in figure 2. If it is necessary to add other controlled parameters of the DG plant, the proposed structure of the digital twin can be upgraded.
The main elements of the DG plant in question, such as regulators, turbine, excitation system are presented in the form of fuzzy models to identify the dependencies of input and output variables based on fuzzy logic. The particular relations of parameters of the synchronous generator are also presented in separate units of fuzzy logic inference (S1, S2, S3, S4, S5), together forming the generator hierarchical fuzzy model. Thus, the DG plant's elements are presented in a digital twin in the form of fuzzy logic units, that allow to describe adequately the dependence of input and output variables using a small number of rules. In the whole, building of the whole set of relations of the proposed structure of the digital twin is based on the use of hierarchical fuzzy inference systems, which allows to significantly reduce the dimensionality of fuzzy rules base. To reduce the rules bases of the individual units of fuzzy logic inference of elements and relations of the DG plant, it is proposed to use the subtractive clustering method [10] and ANFIS adaptive network, allowing to train neural networks, synthesize and update knowledge bases of  Figure 2. The structure of DG plant digital twin:  z ,  g -accordingly, the set and current values of rotor rotational frequency; d -the deviation of rotor rotational frequency from the set value; U gz , U g -accordingly, the set and current values of the generator voltage; dU g -the deviation of the generator voltage from a predetermined value; V asr , V avr -accordingly, the control signals from AVR and ASR; P m -mechanical power on the turbine shaft; U f -voltage of the generator excitation winding; P g , Q g -the generator active and reactive powers; I g -generator current of a figure caption.
The measuring system must ensure the identification of power quality indicators. For training and updating fuzzy models the parameters should be measured at the transient process caused by the change of the DG plant operation mode in the course of operation, and when special test signals of low intensity that do not violate the normal operation are applied to the regulators outputs. Updating fuzzy models should be aimed at optimizing the structure and parameters of membership functions of termaggregations and decreasing the number of fuzzy rules.
Algorithm for building the optimized fuzzy model for a individual relation of the digital twin using the neural networks and genetic algorithm (GA), involves the following steps:  Training the neural network based on experimental data;  Translation of experimental parameters to fuzzy variables (fuzzification);  Building a knowledge base of fuzzy inference system based on trained neural network using the subtractive clustering method;  The choice of membership functions and the formalization of the knowledge base termaggregations;  Determining optimal parameters of the membership functions using GA;  Determining optimal structure and the number of knowledge base rules of the fuzzy inference system.
The problem of minimizing the number of term-aggregations and the number of fuzzy model rules can be resolved by generating a structure of fuzzy inference system using the subtractive clustering method based on experimental data and subsequent parameter optimization of membership functions using the below-described method.
The method of membership functions parameters optimization of fuzzy terms of the model, allows to minimize the differences between desired (experimental) and model (theoretical) behavior of the object. The symmetrical Gaussian membership function suits best of all to represent terms of knowledge base of the fuzzy inference system: where с -coordinate of the membership function maximum; σ -mean square deviation, which determines the function width; x -value of variable from the base set.
Optimization of the membership function parameters consists in search through all the variants of the characteristic points and estimating the difference between the reactions of the fuzzy model and the reference values. When using GA, the characteristic points of the membership function (1) are represented on the chromosome by real numbers or binary sequences using one of the known coding methods. After choosing the encoding method, the genetic algorithm procedure is applied to the resulting population of individuals (i.e., to chromosomes containing encoded parameters of the membership functions of the fuzzy system). Thus, the algorithm for optimizing the membership functions of a fuzzy model requires the completion of the following steps: 1.
Decoding of each individual in the population, i.e. reading out a set of membership functions and constructing the corresponding fuzzy system: where U n is the vector of the input linguistic variable values; Y n is the vector of the output linguistic variable values; n -the number of lines in the knowledge base; C -the vector of parameter values of membership functions. 2.
The determination of the fitness function of individuals is carried out according to the difference between the reactions of the fuzzy model and the experimental data using the following quadratic criterion: where ) (C fuzzy i y -the response of the fuzzy model for various parameters of the membership functions of the terms of the output linguistic variable; i y -the values of the experimental data output parameters. 3. The use of genetic operators such as selection, crossing and mutation of individuals to determine the minimum of function (3) and the parameters of the membership functions.
To build and optimize a fuzzy model, a program has been developed that has a Windows -oriented interface in which the algorithms described above are implemented.

The modeling results
The studies were carried out based on a computer model of a turbogenerator plant with AVR and ASR having a power of 3125 kVA and a voltage of 10 kV, the plant being connected to the power generation system. To study the effect of the proposed algorithm for optimizing the parameters of membership functions on the accuracy of the resulting fuzzy model in the MATLAB system environment, the corresponding experiments were carried out to record characteristics of the input (mechanical power on the turbine P m shaft) and output (generator rotor speed  g ) signals when an additional load is connected (figure 3) Based on the obtained data, the neural network was trained and the rules of the knowledge base of the fuzzy logical inference system were formulated. The resulting non-optimized fuzzy model gives the response during the test which is shown in figure 3 b, where a certain deviation from the experimental characteristic is visible.
The procedure for optimizing membership functions and minimizing the number of terms and the number of rules of a fuzzy model allows us to get the response of the model being virtually coinciding with the reference values. A comparative analysis of the oscillograms of the output signal of the constructed optimized model shows acceptable accuracy in the case of using the method of subtractive clustering, which can also significantly reduce the number of terms and the number of the fuzzy model rules ( figure 4).
The operability test of the developed program for constructing and optimizing a fuzzy model was carried out using a physical model of an autonomous electrical system. It included a generator (synchronous machine), rotated by a primary engine -a turbine (direct current machine), a power supply of a direct current machine, a synchronous machine exciter, an angular transducer, as well as an active and inductive loads. The generator rotor rotational speed was automatically controlled by changing the voltage at the armature of the DC machine using the developed ASR model (proportional-integral-differential (PID) regulator) using library storage units of Real-Time Windows Target and Simulink of the MATLAB system.
(a) (b) Figure 3. Experimental characteristics of the input (a) and output signals (b): 1 -experimentally obtained (reference) characteristics of the generator rotor frequency; 2 -rotational frequency characteristics generated using a fuzzy inference system. To build a fuzzy model, the experimental characteristics of the generator rotor speed were taken for various groups of settings and tuning coefficients of the PID regulator ( figure 5, a). Based on the obtained experimental characteristics, an optimized fuzzy model was built. The results of testing the fuzzy model for random regulator tuning coefficients are shown in figure 5, b. It is necessary to note the obtained accuracy (the root-mean-square deviation is 0.008) and the efficiency of the developed optimization program.
Thus, the algorithm for building and optimizing fuzzy models of individual elements or relations of the synchronous generator of DG plant was developed and programmatically implemented. The results of the research on computer and physical models of the DG plant proved the effectiveness of the use of fuzzy logic and neural networks to build models based on experimental data.