A constrained wind farm controller providing secondary frequency regulation: An LES study

Active power control for wind farms is needed to provide ancillary services. One of these services is to track a power reference signal with a wind farm by dynamically de- and uprating the turbines. In this paper we present a closed-loop wind farm controller that evaluates 1) thrust coef ﬁ cients on a seconds- scale that provide power tracking and minimize dynamical loading on a farm level and 2) yaw settings on a minutes-scale that maximize the possible power that can be harvested by the farm. The controller is evaluated in a high- ﬁ delity wind farm model. A six-turbine simulation case study is used to demonstrate the time-ef ﬁ cient controller for different controller settings. The results indicate that, with a power reference signal below the maximal possible power that can be harvested by the farm with non-yawed turbines, both tracking and reduction in dynamical loading can be ensured. In a second case study we illustrate that, when a wind farm power reference signal exceeds the maximal possible power that can be harvested with non-yawed turbines for a time period, it can not be tracked suf ﬁ ciently. However, when solving for and applying optimized yaw settings, tracking can be ensured for the complete simulation horizon. © 2018 The Authors. Published by Elsevier Ltd. This is an open access article under the CC BY license


Introduction
The trend towards clean energy is irreversible [1]. A large part of the clean energy we are currently generating is harvested by wind farms that extract energy from the wind [2]. A wind farm is a collection of wind turbines placed in each other's proximity to, i.a., reduce maintenance and electricity cabling costs. However, a wake develops downstream of each turbine, which is a region that is characterized by a flow velocity deficit and an increased turbulence intensity [3]. Since wind turbines are placed together in a farm, the wakes of upstream turbines influence the performance of downstream turbines. For example, the flow velocity deficit influences the power production of downstream turbines [4] while an increased turbulence intensity will increment the turbine's fatigue loads as suggested in Refs. [5,6], which possibly can reduce the turbine's lifetime. The objective of wind farm control is to reduce the levelized cost of wind energy by intelligently operating the turbines inside the farm. Subgoals may include the increase of the farm-wide power generation, the reduction of turbine fatigue, and the integration of energy from wind farms with the electricity grid. This integration is related to the provision of ancillary services. One example is secondary frequency regulation (a subclass of active power control) in which the objective is to have the wind farm's power generation track a power reference signal generated by transmission system operators, during a time span of several minutes [7]. We call this power tracking and turbines need to increase and decrease their power output during this time span such that tracking at a farm level is ensured. Since the power reference signal is below the maximum possible power that can be harvested, the tracking problem has multiple solutions. For example, one could uprate the downstream turbines while derating the upstream turbines or the other way around while generating an equal amount of power with the farm. It is therefore possible and necessary to add, besides tracking, another performance measure, such as the decrease of load variations over time (dynamical loading) on the turbines and/or the increase of available power in the farm (see e.g., [8]). Two actuation methods to ensure these objectives are axial induction and wake redirection control. In the former, generator torques and pitch angles or thrust coefficients are utilized as control variables while in the latter, the yaw angles are utilized as control variables [9].
Results that provide power tracking using axial induction actuation can be found in Refs. [10e14]. More precisely [10], proposes a wind farm tracking solution that additionally reduces the turbine's tower and shaft bending moments. This controller utilizes turbine models to illustrate the controllers effectiveness, but is not tested in a wind farm simulation model. It is therefore uncertain whether the proposed solution works in a wind farm model. Then in Refs. [11,12], the authors each propose a different wind farm power tracking solution while minimizing the axial force exerted by the flow on the turbines. However, as stated in Ref. [6], the dynamical turbine loading is a better measure of fatigue than static turbine loading. In Ref. [13], the authors propose a distributed controller providing tracking while minimizing variation in the axial force that is exerted by the turbine on the flow. In Ref. [14], besides tracking, a power reference distribution among the turbines is also found by the controller that maximizes the available power in the farm. The work presented in Ref. [15] demonstrates an optimization algorithm that provides power tracking while minimizing the added turbulence intensity. However, all the above proposed controllers except for [10] are tested in a simplified wind farm model [16], keeping the question open if similar results can be obtained when a more realistic dynamical wind farm model, such as a Large-Eddy Simulation (LES) based wind farm model, is utilized. The authors in Ref. [17] propose a tracking controller that contains a simplified wind farm model to evaluate control signals and the controller is tested in a simplified wind farm model. In this work, no additional objectives are considered and also, it remains questionable if the proposed controller will give similar results when tested in a more realistic simulation environment. A controller that is tested in an LES based wind farm model and employs axial induction actuation providing power tracking can be found in Ref. [18]. The therein solved optimization problem contains dynamical wake and turbine models, but the only objective is tracking and no constraint regarding, e.g., dynamical loading is included. Additionally, it is questionable if the controller can evaluate control signals within one second, which makes the proposed method not suitable for control on a seconds-scale. The controller presented in Ref. [19] is also tested in an LES, but no wake model nor constraints were taken into account. The controller provides tracking and the wind farm power reference signal is distributed heuristically among the turbines without taking any measure of fatigue into account.
Time-varying yaw actuation has, to the best of our knowledge, yet to be employed in power tracking. However, this wake actuation method is utilized for the maximization of wind farm power generation in LES based simulations [20,21], a wind tunnel [22] and in a field test experiment [23].
From the above, we conclude that results obtained with a closed-loop controller that provides power tracking and dynamical load minimization in an LES based wind farm model and additionally increases the available wind farm power using yaw actuation are not yet available in current literature.
Therefore, in this work, a closed-loop reference power tracking solution is proposed in which 1) thrust coefficients that provide wind farm power tracking while minimizing dynamical turbine loading are evaluated for every second with a constrained model predictive controller (MPC) and 2) yaw settings that increase the available wind farm power can be evaluated every fifteen minutes in the situation where the farm's power generation has to be close to or above its upper limit, in order to increase the range of power reference signals that can be tracked. The MPC employs a dynamical wind farm model that is updated according to optimized yaw settings and rotor-averaged flow velocities, and solves for a constrained optimization problem that finds a distribution of the thrust coefficients among the turbines accordingly. This is different with respect to the previous work presented in Ref. [24] where a control signal distribution is imposed. When doing so, it is not possible to change controller settings to have the controller find a control signal distribution among the turbines that reduces, i.e., dynamical turbine loading. In this work we investigate different controller settings and corresponding control signal distributions that minimize dynamical turbine loading. In addition to the MPC, if a reference will be above the maximum possible power extractable from the wind with zero yaw settings, the FLOw Redirection and Induction in Steady-state (FLORIS) tool [25] is employed to find optimal yaw settings that maximize the power that could be harvested from the wind with zero yaw settings. In addition to the proposed control strategy, another important contribution of this work is the controller evaluation in LES. For this, a software framework referred to as the PALM Supervisory Controller 1 is developed that allows for programming controllers in a controller friendly software environment and their evaluation in the PArallelized Large-eddy simulation Model (PALM) [26], an LES based wind farm model. Hence this work is more focused on controller evaluation in a more realistic wind farm flow model. The following enumeration summarizes the above described contributions: 1. A parameter-varying wind farm model is introduced, which can be employed in a time-efficient controller that provides power tracking. 2. A constrained time efficient closed-loop wind farm control approach is introduced. 3. Power tracking and dynamical loading are performance indices considered by the controller. 4. Axial induction and wake redirection control are employed both to ensure wind farm power tracking. 5. Online available software is developed that allows for advanced controller evaluation in a high-fidelity wind farm model.
The proposed framework is schematically depicted in Fig. 1. This paper is organised as follows. In Section 2, the developed PALM Supervisory Controller is introduced and a brief explanation of the PALM itself is presented. Then in Section 3, a description of the employed surrogate models is given and in Section 4, the wind farm controller is formally introduced. Simulation results are presented in Section 5. More precisely, in section 5.3, results obtained with different controller settings are compared and we show that these can influence the control signal distribution among the turbines. Consequences with respect to tracking behaviour and dynamical turbine loading are also presented. Then, in section 5.4, we illustrate the potential of including yaw actuation when power generation has to be close to or above its upper limit. This paper is concluded in Section 6.

Simulation model
The true wind farm is replaced by the high-fidelity "PArallelized Large-eddy simulation Model (PALM)" [26], because 1) a wind farm is not available and 2) in a high-fidelity model, controller settings can be compared under exactly equivalent atmospheric conditions, which is not possible in a real wind farm. PALM is programmed in FORTRAN, while almost all academic wind farm control algorithms are implemented in MATLAB or Python. One of the contributions of this work is the development of the PALM Supervisory Controller, which provides a communication interface between PALM and wind farm controllers implemented in MATLAB. This allows the straight-forward evaluation of such control algorithms in a highfidelity simulation environment. In section 2.1, a brief summary of PALM is given. Then in section 2.2, the PALM Supervisory Controller is introduced and in section 2.3, the specific controller implementation used throughout this work is given.

The PArallelized large-eddy simulation model
PALM is a meteorological model for atmospheric and oceanic boundary-layer flows. It has been developed as a turbulenceresolving large-eddy simulation (LES) model and is open source, available in the public domain [27]. In the LES approach, only the large eddies are simulated due to spatially filtering the Navier-Stokes equations. The dynamic influence of the small turbulent scales are consequently not resolved, but their influence is accounted for with a so called subgrid model. PALM is based on the unsteady, filtered, incompressible Navier-Stokes equations and the subgrid-scale turbulent kinetic energy (SGS-TKE) model [28]. PALM can simulate the effect of the Coriolis forces and if non-cyclic boundary conditions are imposed, PALM can generate timedependent turbulent inflow data by using a turbulence recycling method (see Ref. [26]). The resolved equations are discretized using finite differences on a staggered grid (see Appendix Appendix A for a more detailed discussion on employed discretization methods). Examples of embedded models for PALM are a land surface model, canopy model, radiation models and wind turbine models. The latter is employed in this work. Two different turbine models are available in PALM. The actuator disk model (ADM) [29] and the rotating actuator disk model (ADM-R) [30] (see Refs. [31,32] for an overview on generalized ADMs). Both these turbine models can be utilized with the PALM Supervisory Controller that is discussed in the following section.

PALM Supervisory Controller
The Supervisory Controller is a MATLAB/FORTRAN interface that allows for communicating with a wind farm controller implemented in MATLAB. This communication infrastructure is used for evaluating control signals by using measurements from PALM. A schematic representation is depicted in Fig. 2, where Y is the set of available measurements and U the set of control signals. The content of these sets depend on the employed turbine model, on the assumed measurements, and on the control signals sent from the wind farm controller. Table 1 gives all the possible options.
Note again that the developed framework is suitable for any controller programmed in MATLAB and that the developed software is available in the public domain [33]. Examples where it has already been utilized can be found in Refs. [24,34]. The specific implementation of the Supervisory Controller used in this work is discussed in the following section.

Supervisory Controller implementation proposed in this work
In this work, PALM includes the ADM to determine the turbine's forcing terms acting on the flow and power generation. This turbine model is efficient due its lower requirements of grid resolution and coarser allowed time-stepping as compared to having to resolve detailed flow surrounding rotating blades [35]. A consequence of choosing the ADM is that the control signals for turbine i are the disk-based thrust coefficient C 0 Ti ðtÞ following [35,36] and yaw angle g i ðtÞ. Both of these signals can be used to manipulate the turbine thrust force and power generation (see (2)). In this work, the measurements at time t are 1) the axial force that a turbine exerts on the flow F i ðtÞ, 2) the power generated by a turbine P i ðtÞ and 3) the rotor-averaged wind velocity v i ðtÞ for i ¼ 1; 2; …; ‫א‬ with ‫א‬ the number of turbines. The rotor-averaged wind velocity is assumed to be known, which could be realized by employing online estimation of the rotor-averaged wind velocity with techniques as presented in Refs.
[37e39]. This is however outside the scope of this work. The above defines the sets of measurements and control signals as follows: Fig. 3 illustrates the specific controller architecture programmed in the Supervisory Controller. The architecture contains two closed loops with in one loop a model predictive controller (MPC) containing a dynamical surrogate model of the wind farm and in the other loop a wind farm controller containing a steady-state surrogate model of the wind farm. The former regulates the thrust coefficients on the seconds-scale to provide power reference tracking, while the latter is utilized when it is desired to increase the available power in the farm. The following section will detail both the dynamical and steady-state surrogate models.

Controller models
The closed-loop controller proposed in this work contains two different surrogate models. Both are in the feedback loop (see Fig. 3), but work on different time scales, in different situations and with different control signals. The first loop contains an MPC employing a dynamical wind farm model. This controller works on the seconds-scale and its goal is to track a wind farm reference power signal using the filtered thrust coefficients b C 0 T ðtÞ as control signals (see Fig. 3). The dynamical model used for this control loop is detailed in section 3.1. The objective of the second control loop is to, when there will not be enough energy in the farm, increase the possible power that can be harvested by finding yaw settings gðtÞ.
This loop is working on the minutes-scale and employs the FLORIS optimization tool, which utilizes a steady-state model that is detailed in section 3.2.

Dynamical model
An MPC is based on the receding horizon principle in which a constrained optimization problem is solved at each time step using future predictions of the system and it therefore needs a dynamical model. Additionally, we require a computationally efficient model of the wind farm dynamics because we control on the secondsscale. Yet, due to nonlinear dynamics, uncertain atmospheric conditions and wind farm model dimensions, it is challenging to obtain such a dynamical wind farm model suitable for control. Examples of computationally expensive dynamical control-oriented wind farm models can be found in Refs. [18,36]. However, axial induction based wind farm power tracking results that are presented in Refs. [19,24] indicate that flow dynamics could be neglected and a wind farm can be modelled as ‫א‬ uncoupled subsystems, each subsystem consisting of a dynamical turbine model that is based on the actuator disk theory. While wake effects are neglected in the surrogate dynamical model, the turbine dynamics are still affected by the local flow conditions. Hence, the turbine models are updated according to the local rotor-averaged wind velocity, which in reality may or may not be affected by other turbines inside the farm. In this work, the following model for turbine i is employed for i ¼ 1; ‫,א;…;2‬ with P i ðtÞ the generated power, F i ðtÞ the axial force that flow exerts on turbine i, C 0 Ti ðtÞ the control signal, b C 0 Ti ðtÞ the first-order filtered control signal, g i ðtÞ the yaw angle and v i ðtÞ the rotor-averaged wind speed perpendicular to the rotor. Notice that v i ðtÞ is, i.a., influenced by the upstream turbine settings through wake propagation. We furthermore have t2R þ , the time constant of the filter that acts on the control signal such the applied control signal is smooth. Temporally discretizing (2) at sample period Dt using the zero-order hold method yields the following state-space representation of turbine i Lifting the state variables of the turbines and adding the wind farm power error signal to the state variable results in the following wind farm state-space model: which is a linear parameter-varying system due to the varying matrix Bðv k ; g k Þ. Furthermore we have: where blkdiag($) denotes block diagonal concatenation of matrices or vectors. Furthermore we have the wind farm power reference signal P ref k and tracking error signal e k . The model described above will be employed in the controller part presented in section 4.1.

Steady-state model
For the evaluation of the steady-state yaw angles that increase the possible power that can be harvested, the FLOw Redirection and Induction in Steady-state (FLORIS) tool is utilized, which is a lowfidelity steady-state wind farm model and it can be used for the purpose of wind farm control, offline analysis and layout optimization. The most recent version is based on the analytical wake model inspired by Bastankhah and Port e-Agel [40] and employed in this work. For brevity, the focus in this section lies on the far-wake model and the following formulation has not yet been published elsewhere.
All single wake equations described here are in the windaligned frame, with x 0 i aligned with the wind, y 0 i the lateral component, and z 0 i the vertical component, all centred at the hub of turbine i (see Fig. 4).
For a single wake, the near-wake region is modelled as a cone with its base at the rotor plane, and its tip at a distance x 0i downstream of turbine i. That is where C Ti is the time-averaged 2 thrust coefficient of turbine i. The steady-state yaw angle is defined with respect to the wind direction and defined as g ss i . This variable is a decision variable in the optimization to be defined in section 4.2. Note clearly that C Ti is a static value during the optimization. However, tracking a wind farm reference will be achieved when varying the thrust coefficient over time hence this assumption might seem not realistic. However, wake deflection mostly depends on wind direction and yaw settings, and to a much lesser extend on the thrust coefficient and therefore, this is assumed to be constant in the model defined in this section. In (6) we also have two tuning parameters a and b. A relation between C Ti and C 0 Ti is defined as The local turbulence intensity in front of turbine i, I i , is calculated as a squared summation of the atmospheric turbulence intensity I ∞ and the added turbulence intensities from upstream turbines I þ j . Mathematically, this is defined as with A j w the relative overlap area between the rotor of turbine i and wake of turbine j. Notice that the sum is taken over all turbines since A j w is zero for turbines downstream of turbine i. Furthermore, Potential core Fig. 4. Schematic representation of a wake evaluated with the steady-state model. The figure is taken from Ref. [40] and adapted. 2 The time over which is averaged is proposed to be the past fifteen minutes, equal to the period that new optimal yaw angles are evaluated and can be applied when necessary.
where Dx j turb the stream-wise distance between the turbines i and j, and a j the time-averaged axial induction factor with relation The variables t a , t b , t c , and t d are considered as tuning parameters. For x 0 i ! x 0i , the wake is modelled as a two-dimensional Gaussian velocity deficit in y 0 i -and z 0 i -direction, symmetrical around a centreline. This centreline lies in the horizontal plane at hub height, displaced in y 0 i -direction from the i th turbine hub by d fi , In this equation, q i is the initial deflection angle in radians, calculated as , k y and k z are linear wake expansion coefficients similar to that in Ref. [41], and S si is defined as S si ¼ Further, d ri is the wake deflection induced by the rotation of the blades, approximated using a linear function, by d ri ¼ a d $D þ b d $x 0 i , with a d and b d tuning parameters. The steady-state wind speed U i in the far-wake region at some location ðx 0 i ;y 0 i i;z 0 i iÞ, with x 0 i i ! x 0 0i , and with its origin at the hub of turbine i, is now defined as with U ∞ the free-stream wind speed, which is the mean longitudinal wind speed in front of the wind farm. Furthermore, the power capture in steady-state of turbine i is calculated as with v ss i the rotor-averaged stream-wise wind speed in steadystate. This quantity is calculated by integrating the effect of multiple wakes over the turbine rotor, as v ss where (r j , b j ) is the polar coordinate representation of ðy 0 j ; z 0 j Þ over the rotor of turbine j. Note that Q j ¼ 0 for the wakes of downstream turbines since U j ðr j ; b j Þ ¼ U ∞ for x 0 j < 0. The above described model will be employed in the controller as described in section 4.2.

Control strategy
The proposed closed-loop controller executes two tasks. The first task is executed on the seconds-scale and solves a finite-time constrained predictive optimization problem using the model defined in section 3.1 assuming full knowledge of the powers, axial forces and rotor-averaged wind velocities. The main objective is to provide power tracking on a farm level. The second task is executed on a 15-min scale and consists of an optimization procedure using the steady-state surrogate model defined in section 3.2 assuming full knowledge of the measured wind direction. The main objective is to increase the possible power extractable from the wind by finding optimal yaw settings. However, the second task will only be executed when the future wind farm reference signal will be above the maximal possible extractable wind farm power such that unnecessary yaw actuation and consequently potential additional loading [42] will not occur. If more than the maximal possible extractable wind farm power with zero yaw settings is demanded from the farm, optimal yaw settings can be evaluated and applied with the additional second loop. The first and second task will be detailed in section 4.1 and section 4.2, respectively.

Axial induction control for power tracking
The aforementioned MPC is stated to solve the following optimization problem from time k 0 until the prediction horizon k 0 þ N h Furthermore, C 0 T;max ; C 0 T;min , dC 0 T and P max represent the upper and lower bounds on the thrust coefficients, its variation and upper bound on the turbines power generation, respectively, and g k0 and v k0 the yaw angles and measured rotor-averaged wind velocity at time k 0 , respectively. Note that a constraint on the thrust coefficients is already an indirect constraint on the turbine power signals. However, this generalized framework is beneficial, as it will allow us to investigate different constraints on the power generation of each turbine in future work. We furthermore have the weighting matrices with q; s2R controller tuning variables. In fact, by tuning each weight one can increase or decrease the importance of the corresponding term in the cost function. More specifically, by increase the weight s relative to q, the controller puts more effort in minimizing the dynamical turbine loading. We would like to stress here that the optimization problem defined in (18) tries to find a distribution of control signals among the turbines, such that the tracking error and dynamical loading are minimized. This is different with respect to the work presented in Ref. [24] in which a distribution is imposed before the optimization routine. Clearly, by not imposing a distribution manually as done in this work, the controller is given relatively more freedom to find control signals that minimize tracking error and dynamical loading.

Axial induction control for power tracking with optimized yaw settings
The optimization algorithm described in this paragraph relies on the FLORIS tool described in section 3.2. In practice, first it is predicted whether the wind farm reference can be tracked for the upcoming 15 min. 3 A method to do this could be by taking the maximum value among the upcoming reference signal over a 15 min horizon and then estimate the available power using an algorithm such as presented in Ref. [43]. In this work we are not investigating such a method, but if it is possible to track the wind farm reference signal over the upcoming 15 min, then the turbines are yawed in alignment with the mean wind direction (zero yaw settings) so that no unnecessary yaw actuation will occur. However, when it is estimated that tracking will not be ensured, first the steady-state surrogate model should be adjusted to match the present atmospheric conditions inside the farm such as for example demonstrated in Ref. [44]. These atmospheric conditions such as wind direction could be estimated using, e.g., SCADA data and lidar measurements [34]. Subsequently, the following optimization problem is solved following an interior point method to address the nonlinearity and nonconvexity of the problem: (21a) s:t: À 25 + g ss i 25 + ; for i ¼ 1; …; ‫;א‬ and ð15Þ (21b) where g ss ¼ À g ss 1 g ss 2 / g ss ‫א‬ Á T . The yaw angle is constrained to suppress the increase in structural loading for strongly yawed turbines [42]. The optimal yaw settings, g Ã , are then distributed to the turbines and turbine models (see (2)), and maintained for a fifteen minute period, upon which the above described cycle is repeated.

Simulation results
PALM simulation results are all of a neutral atmospheric boundary layer and will be discussed in this section. In all simulation cases, the controller is applied to a wind farm with specifications as described in Table 2.
See Table C after tuning the controller. The influence of t; N h is not further investigated in this work. The value for C 0 T;max corresponds to the Betz-optimal value and hence no overinductive axial induction control is considered. Furthermore, C 0 T;min ¼ 0:1 indicating that we do not allow turbines to shut down completely, which is common practice in wind farms. The bound on the thrust coefficient variation dC 0 T ¼ 0:2 is set such that turbines can not de-and uprate instantaneously, but it also provides an upper and lower bound on the maximum allowable dynamical loading (see (2)).
The topology under consideration is illustrated in Fig. 5 and contains heavily waked wind turbines due to the fact that turbines are aligned with the mean wind direction. Although farms are designed such that the occurrence of this situation is minimized, it remains an interesting case study to investigate farm dynamics in these worst case scenarios [47]. This section is organised as follows. Firstly in section 5.1, two performance measures are introduced such that controllers with different settings can be evaluated. Secondly, in section 5.2, a brief summary on how PALM is initialized is given. In section 5.3, we investigate the influence of the controller parameter s (see (20)) on the tracking performance, the dynamical loading and consequently the differences between the found control signal distributions. Then in section 5.4, we illustrate by example that a wind farm power reference signal that temporarily exceed the maximal possible extractable wind farm power with zero yaw can be tracked when yawing turbines in an optimized way.

Performance measures
In order to evaluate the controller performance under different settings, two criteria are introduced.
The turbine performance index, dF i , represents the turbine's force variations and the quantity dF represents the force variations on a farm level, both evaluated over the complete simulation horizon. Clearly, a lower performance index indicates less force variations over the simulation horizon.

Simulation initialization
Simulations are initialized as follows: a fully developed flow field is generated in the precursor such that the free-stream wind speeds s] in the longitudinal, lateral and vertical direction, respectively, and a turbulence intensity in front of the farm of approximately 6% at hub-height in front of the wind farm (see Appendix B for definition of turbulence intensity used in this work). Then, for the specific topology considered in this work, the flow is propagated N seconds in advance with C 0 Ti;k ¼ 2 (corresponding to the Betz-optimal value) and g i;k ¼ 0 for i ¼ 1; …; ‫א‬ for the complete N seconds so that the wakes are fully developed.
Here, non-cyclic boundary conditions are imposed in the streamwise direction, i.e., a turbulent inflow boundary and an open outflow boundary on the opposite side are imposed. The turbulent inflow at one boundary is generated by using a turbulence recycling method [26]. For the flow quantities, Dirichlet conditions are used at the inflow and radiation conditions at the outflow. In the cross stream-wise direction, cyclic boundary conditions are imposed and Dirichlet conditions as bottom and top boundary conditions. The flow field obtained after these N seconds is utilized as initial flow field (see Fig. 5) for the simulation results presented in this work.
The greedy power ðP greedy Þ is defined as the time-averaged wind farm power harvested with C 0 Ti;k ¼ 2 and g i;k ¼ 0 for i ¼ 1; …; ‫א‬ and N seconds of simulation starting with the previous described initial flow field. With unyawed turbines, a wind farm can potentially harvest above the P greedy threshold for only a relatively short period of time. Clearly, this period is defined by the wake propagation time. In this work, P greedy is defined as the maximal possible extractable wind farm power.

Power tracking while minimizing dynamical turbine loading
In this section, the controller parameter s is varied so that its influence on the previously defined performance measures and control signal distribution can be studied. The value of controller parameter q ¼ 10 4 is found after tuning such that tracking is ensured. The wind farm power reference signal is defined as: with dP k a normalized "RegD" type AGC signal [48] coming from an operator and P greedy z7:5 [MW]. As can be seen in (23), the reference will never exceed P greedy during the simulation period and hence turbines are in derate mode for the complete simulation period. Consequently, the problem described in section 4.1 is exclusively solved to provide power tracking, and the problem described in section 4.2 is not due to the fact that it is possible to track the reference signal given in (23) with unyawed turbines over the complete simulation horizon.
In Fig. 6, it can be observed that tracking is ensured for all presented cases and hence we can conclude that, for the presented cases, the controller parameter s does not have a significant impact on the tracking performance.
However, in Fig. 7, it can be seen that the performance index dF as defined in (22) reduces when s increases indicating that dynamical loading can be reduced on a farm level. This is expected since dF can be found in the controller's objective function as defined in (18). However, Fig. 7 also depicts the turbine's performance indices as defined in (22), and it can be observed that, although dynamical loading on a farm level is reduced, it can increase for specific turbines in the farm (see for example turbine 5). We note, but do not show, that for s > 50 no significant changes in the dynamical loading can be observed.
Furthermore, from Fig. 8 it can be concluded that the control signal distribution significantly changes for a varying controller parameter s. In fact, an increasing penalty on the dynamical loading results in a decrease of the downstream thrust coefficients, while upstream turbines receive increased thrust coefficients. The latter results in a decreased rotor-averaged flow velocity and its variation, which reduces the fatigue loading (see (2)). In other words, the dynamical loading of the upstream turbines is reduced when increasing the weight s, while such a simple relation can not be observed for the downstream turbines. This could possibly be due to the complex wake dynamics that influence the dynamical loading of the downstream turbines. However, Fig. 7 indicates that, on a farm level, the dynamical loading is reduced when increasing s, which is expected since the weight s increases the penalty on the sum of the individual turbine dynamical loading (see Eq. (18)). Fig. 9 additionally depicts the turbine power signals for different controller settings. We observe that in all cases, the upstream turbines produce relatively the most power since the wind speed in front of these turbines is the highest and that an increase in s results in incremental power production of the upstream turbines.

Power tracking with optimized yaw settings
In this section, the controller is evaluated with the following reference signal Observe that, for a period, more power is demanded from the farm than the averaged power harvested under greedy control. Consequently, the optimization problem described in section 4.2 is solved firstly for the measured wind direction and topology under consideration to increase the maximum possible power that can be harvested by the farm. Solving the problem given in (21) takes approximately 30 s on a regular notebook and single core. The optimized yaw settings were found to be g Ã k ¼ ð À24:3 À24:3 À16:2 À16:2 0 0Þ T ½deg: These yaw settings are kept constant throughout the simulation case presented in this section and applied instantaneously in the initial flow field. See Fig. 10 for instantaneous longitudinal flow velocity components at hub-height. Note that we assume no deviation of the mean wind direction and free-stream wind speed during the simulation period since we update yaw settings every 15 min. Secondly, the problem described in section 4.1 is solved during the complete simulation horizon and power tracking is provided  with yawed turbines. On a regular note book and single core, it takes approximately 0.07 s to solve the problem described in section 4.1. Hence, due to the fact that the sample time is chosen to be one second, online power tracking can be achieved. The controller parameters q; s were found after tuning such that tracking is ensured and set to q ¼ 10 4 ; s ¼ 25. Note that during the simulation time, the wake mainly alters due to the changed yaw settings, which makes it extra challenging for the MPC to track the reference signal. Fig. 11 depicts simulation results of two simulations.
In the top plot, tracking results are depicted that are obtained with unyawed turbines. Here it can be seen that indeed, the reference can not be tracked sufficiently over the complete simulation horizon, which is due to the absence of sufficient wind power. Interestingly, from t ¼ 300 [s] to t ¼ 450 [s], the wind farm power produces more than P greedy , which is due to the fact that wakes of upstream turbines are not fully developed yet. However, when the wake changes arrive at downstream turbines, the available wind power decreases and the power production converges to P greedy from t ¼ 450 [s] to t ¼ 520 [s]. In the below plot, it can be observed that power tracking can be ensured over the complete simulation horizon, which is due to the fact that the yawed turbines increase the possible power that can be harvested by the farm. Fig. 12 depicts the thrust coefficients that are found by the MPC and it can be seen that in the non-yawed turbine case (i.e., g i;k ¼ 0), the thrust coefficients reach their boundaries from t ¼ 300 [s] to t ¼ 450 [s] and sufficient power tracking can not be ensured during this timespan. However, when the found optimized yaw settings g Ã k are applied, the wind speed is higher in front of the upstream turbines hence more power can be harvested with these turbines. In order to track the reference, it is therefore possible to reduce the thrust coefficients.

Conclusions
Ancillary services in wind farms are important to increase the wind power penetration in the energy market. One example is secondary frequency regulation in which the objective is to have the wind farm's power generation track a power reference signal generated by transmission system operators during a time span of several minutes. Due to the uncertain wake dynamics, a closedloop control solution with a dynamical surrogate model is needed to provide this so called power tracking. Since dynamical wake models are generally complex, approximations are required such that the surrogate model can be employed in a controller that  should work in a real time application. In this paper, we present such a dynamical surrogate wind farm model and utilize it in a model predictive controller that provides power tracking, and additionally is able to reduce the dynamical loading on a farm level by finding for each simulation second new optimized thrust coefficients in approximately 0.07 s. To increase the possible range of traceable power signals, wake steering is used when future reference signals exceed the maximum power that can be harvested with non-yawed turbines. Optimized yaw settings that maximize the possible power that can be harvested are then found by employing a steady-state surrogate model and set for a simulation period of fifteen minutes. The necessity of applying optimized or zero yaw settings to track the future reference can then be reevaluated. Note that the optimized yaw settings maximize the possible power that can be harvested, which can result in unnecessary turbine yawing. In future work, a more sophisticated method could be incorporated in the controller for determining yaw settings that exactly increase the possible power that can be harvested to the maximal value of the future reference. In this paper, we give an example where the reference can not be tracked sufficiently when turbines are non-yawed, while power tracking is ensured when optimized yaw settings are applied. The controller is evaluated in a high-fidelity simulation environment for which software is developed that allows for programming controllers in MATLAB and evaluating these in a high-fidelity simulation environment. In future work, an analysis on multi-scale dynamics in the high-fidelity simulation environment is necessary to better understand the wind farm flow dynamics under the proposed control strategy. This could possibly lead to a more efficient controller performance.