Automated and scalable optimal control of three-phase embedded power grids including PLL

Embedded grids have been increasingly adopted into applications such as More Electric Aircraft where different power converters are interconnected to each other. Interactions between the grid components poses the risk of instability to the system, more so when in the presence of reduced passive filters. An approach of automated and scalable tuning of such embedded grids with consideration for the dynamics introduced by a PLL is presented in this paper. A structured state feedback optimal control approach is proposed which enables a controller to be synthesised is such a way that maximum performance of the grid can be achieved, whilst guaranteeing power converter synchronisation to the grid, and avoiding instability due to converter interaction, and PLL dynamics.


I. INTRODUCTION
In recent years, embedded power grids are becoming of particular interest in a range of different fields, particularly in more electric aircraft (MEA) [1]. MEA has introduced a multitude of advantages for the aviation industry, such benefits being a reduction in total weight, required maintenance, increased system reliability and increased aircraft efficiency. In order to continue maintaining the benefits from MEA, research has been moving towards developing optimized on-board electrical and power electronic conversion systems. These embedded grids system are generally comprised of many power electronic converters interconnected together along with their associated input and output filters. One of the aims in MEA is to reduce the total weight and size of these systems, where 25% -40% of the total weight is comprised of the filters themselves [2], where reduction in filter size and weight by optimisation is a priority [3]. This reduction in filter and overall grid size tends to make the interaction between interconnected converter no longer negligible which leads to undesirable and often unstable behaviour. In order to decrease these effects the most common approach is to increase the size of these passive filters, but this obviously increases the growth in the overall system and which in turn results in increased size, weight and cost of the overall system, away from the main goals of MEA research. Also, the fact that nonlinear systems such as the Active Front-End (AFE) are incorporated into the system model only further complicates the controller design. There have been many approaches to the development of nonlinear control systems in the past, for instance Lyapunov methods [4], feedback linearization [5], SISO conversion controller design [6] and passivity-based control [7]. Though, all of these methods have only been applied to a single converter, and not to the scale of an interconnected grid. There has been approaches proposed in recent literature to evaluate the stability of grids by estimating converter impedances [8] as well as a recent investigation into developing a global scalable control for a simple micro-grid system [9].
Though, what hasn't been investigated in the work presented in [9] is an implementation of a PLL which synchronises the AFE to the grid. In this paper, it shall be presented how using the model shown in Fig. 1 can too a PLL which synchronises the AFE to the grid be implemented into the global optimization problem, such that the designed controller not only has consideration for converter interaction, but also the PLL influence over the system.
In order to perform this, a state-space average model is derived. From this controller are derived by solving a structured state-feedback problem. This study does look at a relatively simple topology as an example, however, the approach discussed is easily scalable to more complex topologies, since all tuning is automated. Fig. 1 shows the system which shall be analysed in this study. The system consists of a three-phase voltage source inverter (VSI) which is fed by a fixed DC voltage source, along with an LC filter on the three-phase output. The three-phase Active Front End (AFE) rectifier is directly connected to the AC grid set up by the VSI via an inductive filter. On the output DC side of the AFE there is a filtering capacitor and a load. A Phase-Locked Loop (PLL) has been implemented into the system in order to synchronise the AFE PWM switching actions to that of the AC grid. Two different type of AFE dc load are analysed in the following: resistive load and constant power load.

A. VSI Model
In order to simplify the analysis of three-phase AC systems, a common approach to modelling is by using the dq-synchronous frame. By use of this transformation can a three-phase AC system be modelled by two coupled DC systems. Fig. 2 shows the resulting small-signal DQ model I id and I iq is defined as the output inductor currents on the VSI for the corresponding d-and q-frames. V cd and V cq represent the output capacitor voltage on the VSI for the corresponding d-and q-frames. C, L and R correspond to the values of the filter capacitance, inductance and intrinsic resistance of the filter. ω represents the angular frequency of the output AC grid produced by the VSI. The modulation indexes for both the d-and q-axes are defined by m d and m q respectively.

B. AFE Model: Resistive load
By similar approach to previous subsection, the state equations in (2) for the AFE can be developed.
I ad and I aq are defined as the input filter inductor currents to the AFE in the corresponding d-and q-frames, and V dc denotes the DC-Link output voltage. C a , L a and R a are the values of the DC-Link capacitance, filter inductance and intrinsic filter resistance. p d and p q are the modulation indexes.
In system (2) the following equilibrium points exist: It is important to note that the system has two equilibrium points. To minimize the load current being outputted by the system, the equilibrium point resulting with the minimum I ad shall be used hereafter.

C. AFE Model: Constant Power Load
An important case to consider is the case when the DC-Link is to power a constant power load (CPL). A good representation of a motor drive system loaded at the output of the converter. In order to incorporate the CPL into the system model, only an adaptation of (2c) is required, which results in:V where P l represents the desired steady state load power. Also the system steady-state equilibrium points change, giving Where, as with the resistive load case, the above equations results in the minimization of I ad .

III. PLL STATE-SPACE IMPLEMENTATION
PLL's are an integral part in ensuring that interconnected power converters are fully synchronised to the AC grid. They are essential for ensuring the good power flow from grid to the load. A common approach is to use Synchronous Reference Frame Phase-Locked Loops (SRF-PLL) to synchronise these grid tied converters [8]. A block diagram of a three-phase SRF-PLL is shown in Fig. 4 and its equations are where V α and V β are the sinusoidal grid voltages in the quadrature reference frame, θ c is the estimated grid angle and x i is the PLL integral state.
To analyse how PLL affects system stability, it is convenient to rewrite it in terms of an error angle. Fig. 5 shows the relation between the grid synchronous angle (θ 0 ) and the one estimated by AFE (θ c ). Defining the angle between the two reference frames as it is possible to rewrite (6) and (7) as where ω 0 is the grid pulsation. The PLL error model is reported in Fig. 6. Substituting (9) in (10) and dropping the exogenous input ω 0 Equation (11) describes PLL dynamic in the angle error domain. In the case of our system, the PLL is locked to the output capacitor voltages of the VSI. Therefore During transients, the presence of the PLL affects the interaction between AFE and VSI dynamics. Assume the following case study; if the AFE is leading in angle with respect to the grid as shown in Fig. 5, VSI terms which appear in the AFE state-space equation, must therefore be lagging in phase at an angle of θ e with respect to the AFE. Vice-versa, the AFE terms appearing in the VSI state-equations are leading in phase at an angle of θ e . The state-space equations of each converter need to have this phase adjustment to each of their cross-coupling terms. For instance, equations (1c) and (1d) have to be modified as where I V SI ad and I V SI aq are the AFE currents as seen by the VSI. Following the case study, these two currents will be leading the VSI states by an angle of θ e . Performing the transformation (9), the leading currents in the VSI terms can be expressed as The same adjustment will need to be performed for the VSI terms in the AFE equations. (2a) and (2b) are therefore modified as are the output capacitor voltages of the VSI seen from the AFE. Staying with the case study, these terms will be lagging the AFE reference frame by an angle of θ e . Therefore, transformation (9) has to be applied inverted Equations (1a), (1b), (2c), (4), (11), (13-16) describe all of the nonlinear system dynamics. However, equation (11) can be rearranged in a more convenient form. Substituting (12) in (11) and linearising the resulting system at steady state equilibrium the PLL system (11) reduces to (18) can be rewritten in the form where f 1 and f 2 are dummy inputs. PLL equations (20a) can now be augmented into the VSI-AFE state-space equations. The PLL gains will be computed as part of the structured static state feedback as explained in the following. It is now possible to compute a linearisation at the equilibrium point of the whole open loop system obtaininġ where the terms for the A matrix are define as: in the resistive load case and in the constant power load case. Terms found in the B 2 matrix are found to be: x AF E = I ad I aq V dca w Iaq w V dca (39) The terms scripted ω are the integral states to the corresponding subscripted state of the system. Please refer to [9] for more details. All the 0 are null matrices of appropriate dimension. Please note the dummy inputs f 1 and f 2 defined in (20) appear in (41) as well. They do not have physical meaning and are used to permit the tuning of PLL gains as part of the global state feedback matrix. In fact, because of the structure of the feedback matrix K described in the following, they affect only the PLL states.

IV. OPTIMAL H 2 CONTROLLER DESIGN
With all the state variables having been described, there is enough information in order to design a state-feedback optimal controller to regulate the system. In designing a H 2 controller, the configuration shown in Fig. 7 is used.
Each of the signals are denoted as: u are the control inputs, v are the measured system outputs, w are the disturbance signals, and z is the performance output.
The generalized plant P is definite as A and B 2 are reported in (22) and (23). B 1 is the disturbance input matrix and is set to be an identity matrix. Finally, C 1 and D 12 are defined as where Q ∈ 13×13 contains the weightings for each of the states [11]. Choosing a large value of Q for a given state results in the synthesis of a controller which will attempt to reject disturbances with the least possible change to the given state. The matrix R ∈ 6×6 contains the weightings on the control input. As with the Q matrix, a large value on a given input results in the synthesis of a controller which will try to to reject disturbances using less weighted energy for that given input.
The static controller K can be computed solving a H2 optimal control problem, i.e. finding a feedback matrix K which stabilize the system and minimizes the H 2 norm of the transfer function from w to z. In the time domain, this results in the following optimization problem: The resulting control law (44c) can be rewritten as From (47) it can be noted that the three input vectors of the three subsystems depend on all system states. This would require additional communication between the 2 system modules increasing cost and complexity. In addition, the PLL subsystem must respect the structure defined in (19) and (20). To solve the problem, the gain matrix is constrained to have the structureK where K v ∈ 2x6 are the VSI gains, K a ∈ 2×5 are the AFE gains and K P LL ∈ 2×2 are the PI controller gains for the PLL. From the structure in (48), it can be easily observed that the VSI duty cycles will only depend on VSI states, with the same occurring for the AFE duty cycles, and the PLL states only depending on the dummy inputs as shown in (20). Thus, creating three fully optimised decentralized controllers for each of the converters, and the PLL.
Finding K ∈K that minimize (46) is a structured static feedback control problem [12] that can be solved by computer software as explained later.

V. SIMULATION RESULTS
The proposed method of controller design and implementation has been tested in simulation. The average dq models of the system in Fig. 1 was implemented into MATLAB R2017a, with verification from Simulink. The system parameters used in this model is shown in Table I.
Q res and Q cpl are the Q state weights for the resistive load and constant power load cases respectively.

A. Resistive Load Case
In order to produce a controller with the required dynamic response, first the Q and R weighting matrices need to be determined. As a starting point to the development of these matrices, the general rule of weighting each given integral state in Q by 1 / x max , where x max denotes the maximum steady  state value of the given state being integrated, and setting the R matrix as an identity matrix. This was shown to give an unsatisfactory system response, and thus the weights for both matrices were iteratively adjusted to the values observed in Table I. This is why there is a different in the Q matrix values between the resistive and constant power loads. The resistive load case described in section II-B is first tested. The system equilibrium point has been computed according to (3) considering V * id = 81V, V * dca = 270V and R L = 36.45Ω. The obtained values along with (30) have been used in (22) and (23) and the structured optimal controller gains being computed using the method described in Section IV.
Two models, a dq average model, and a switching model have been used for the analysis of the proposed control method, to cross compare between the ideal and realistic environments. Fig. 8, shows a step response in the dq average model from a no-load condition, to full load condition (2kW) at a time of 0.07s. It is evident from Fig. 8 that a very fast response is achieved across all states.
In order to validate the result achieved from the average dq model, a switching model was implemented using Simulink. A two level three-phase voltage source inverter is used to facilitate both the VSI and AFE sides. The gate switching functions are generated by use of Pulse Width Modulation (PWM) with a switching frequency of 20kHz. Fig. 9 displays the results of the switching model using the same conditions used for the average model simulation, where we transition between a no load to full load condition at 0.07s. It can be observed from comparison of Fig. 8 and Fig. 9 that the DC-Link voltages match very well to one another. The grid voltages and currents between the two models also match up very well, where the peak value of each waveform in Fig. 9 match the d-axis values shown for the average model. This clearly shows the reliability of designing the control using average model, and the performance when applying to a more realistic switching model.
Another key feature to note is the PLL angle error in Fig.  9. This graph is computed by analysing the output of the optimized PI controller, and comparing it to the angle of the dq voltages outputted by the VSI. The plot shows a very quick response to synchronizing the AFE back to the grid after a large step change in load; with only a small undershoot and overshoot observed during transition. This has clearly shown the incorporating the PLL dynamics into the average model and optimising the PLL PI controller gains with regards to the rest of the system has achieved a fast acting and reliable PLL.

B. Constant Power Load Case
In this second model, a control method for the system in the presence of a constant power load on the AFE DC-Link side is presented.
In this case, the system equilibrium points have been computed according to (5) and resulting parameters substituted in (22) and (23) where (31) has been used instead of (30). The approach to performing the H 2 optimization remains the same method as for the resistive load case. The nominal load power has been set to be 2000W. It is important to note that in this case, matrix (31) has an eigenvalue with positive real part meaning that the open-loop system is unstable. The method for controller synthesis described in Section IV requires that a stabilizing initial value of the gain matrix K be submitted into the algorithm which is complicated for open-loop unstable systems. By taking the approach in [9], an initial unstructured gain matrix is computed by a standard LQR approach. Then the gain matrix is constrained to the gain structure imposed by (48), such that all matrix elements that do not follow the constraint are forced to zero. This following matrix is then set as the initial starting point for the H 2 optimization algorithm. Fig. 10 shows the simulation results from the dq average model for the response from no load to a connection to a 2kW constant power load on the AFE DC-Link side. As had been observed with the previous resistive model, a fast a stable system response is achieved, across all systems states, with all controlled at the required references, and the AFE modulation indexes and d-axis current following the equilibrium points described in (5) accurately.
As done with the previous study a switching model was used to validate the results that was obtained in the average model, shown in Fig. 11. What is shown is that the switching model closely reflects the behaviour observed in the average model. This can be easily seen by observation of the DC-Link voltage, where the undershoot and rise times are approximately exact. The peaks of the grid voltages and currents accurately reflect the dq response observed in the average model, where the d axis value generally equates to the peak value of the three-phase signal. The angle error of the PLL is shown to synchronise the AFE converter back with the grid after the load being connected, with larger overshoot when compared to the result observed in the resistive model (but still small in relative terms), but reaching the point of synchronisation within similar time to the previous model, showing the PLL gains have been implemented correctly.

VI. CONCLUSION
This paper has presented a global optimisation approach to tune the controllers of both the power converters of the embedded grid, but also the PLL controller to synchronise the AFE to the grid. Small-signal linearized models are used in order to synthesis the regulators whilst keeping into consideration the interactions between grid components and PLL dynamics. The controller design has been analysed for the case of a constant power load and resistive load case, along with validation of the method using MATLAB simulations. This work has successfully shown how the PLL dynamics of a SRF-PLL can be incorporated into the controller synthesis problem. Good dynamic behaviour and responses where achieved across all systems states, as well as the mitigating the effect of the cross-coupling interaction between converters, by enforcing a strict structure on the synthesized regulators.