Skip to content

Dynamic Mode Decomposition using Simulator fOr Wind Farm Applications (SOWFA)

Notifications You must be signed in to change notification settings

czy-ac/DMD_SOWFA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dynamic Mode Decomposition (DMD) for Simulator fOr Wind Farm Applications (SOWFA)

This project is inserted in the Master Thesis Dissertation entitled "Economic Model Predictive Control: an Extended Dynamic Mode Decomposition Approach", where Dynamic Mode Decomposition is used with subspace identification methods and the ideias behind the Koopman Operator to derive a tractable model to perform Economic Model Predictive Control. The Master Thesis is currently being developed, so weekly commitments are expected.

The higher level goal of this code is to perform Dynamic Mode Decomposition in any set of data retrieved from simulations in SOWFA, thus allowing one to derive models for wind farm under certain conditions and perform control. As simulations might differ in terms of control strategy (pitch control, yaw control), the user should thus take the following into consideration: (all changes should only be necessary - ideally - in the main script - MPC_wakesteering):

A. Data (0. Initialise)

The program requires 2 different types of data: (1) Turbine data (2) Flow field and grid data

(1) Turbine data: 2 folders readily given by SOWFA must be made available, one for identification and the other for validation. They should contain a subfolder named 1000, where all turbine's simulation data is present.

(2) Flow field and grid spacing: a workspace variable which contains the complete flow field (u, v, w) - as well as the grid x, y, z - where the flow field was sampled. This workspace file should be generated by a post processing tool that resamples the grid with a certain Decimate (variable name). This is up to the user to decide, depending on computational power available.

B. Control Strategy (0. Initialise)

The 2 possible control strategies encapsulated in the code are pitch control and yaw control. The variable pitchmode informs the program of the control strategy being used. For pitch control, pitchmode=1 should be set, informing the program that a Multi-Blade Coordinate (MBC) transformation is needed to compute the inputs for DMD on the wind turbine fixed-frame. For pitchmode=0 the program is informed that the inputs for DMD will simply be the yaw angles.

C. Directories (0. Initialise and 1. Assess data)

The directories for the folder in A.1. must be stated when pitchmode is defined, informing the program where the identifications and validation data is located. The file name with the field velocity and grid points sampled should be specified in the beginning of the Assess Data field, in the variable filename. The relevant specified flow fields are then converted to full double matrices.

D. Animations and Snapshots (1.Assess data)

The code allows to perform animations by generating several figures, saving to a specified directory and then joining them with a certain speed (frames per second). The movie generated may also be converted to mp4. Snapshots are relevant parts of the movie, useful for reports and static exhibition. These codes must be adapted for the data in hand.

E. Pre Processing preprocessdmd.m. (2. Dynamic Mode Decomposition)

This is a fundamental part of the program, where the simulation data is processed, and will have an impact on the results [1]. The user has free rein to alter parameters according to final intentions and data in hand. In the base code, Input, Output and Deterministic information is detrended and resampled. Only a portion of the data is used, corresponding to steady state regime. This portion is changeable be varying begin and beg variables. Different scalings of the data are possible to improve numerical accuracy, such as using the variance of the data.

[1] Chen, K.K., Tu, J.H. & Rowley, C.W. Variants of Dynamic Mode Decomposition: Boundary Condition, Koopman, and Fourier Analyses. J Nonlinear Sci 22, 887–915 (2012).

F. Sates (2. Dynamic Mode Decomposition)

Different states may be used for DMD. For simplicity, only the streamwise component of the velocity field can be used. However, if computational power permits, the complete flow field might be used, allowing for 3D visualisation of the Proper Orthogonal Decomposition (POD) modes. The choosing of the states has meaningful consequences on the DMD reconstruction and final model accuracy.

G. Detrending States preprocessstates.m (2. Dynamic Mode Decomposition)

The user must also decide if the base flow is removed. In the base code, the base flow - corresponding to the temporal mean for every grid point used in steady state - is subtracted from the states, which are then finally used for DMD. T

H. Dynamic Mode Decomposition (2. Dynamic Mode Decomposition)

This is where the magic happens. Several DMD algorithms exist since it was first introduced [1] and many developments are under way [2]. The user must specify which DMD algorithm should be used. The following are highlighted:
(1) Dynamic Mode Decomposition with Control (DMDc): Standard DMD framework is further developed to separate dynamics of forced inputs. Allows to recover matrices A and B of state space model. [3]
(2) Input-Output Dynamic Mode Decomposition (ioDMD): DMDc is further developed, allowing to use standard subspace identification methods and recover the full state space model. [4]
(3) Extended Dynamic Mode Decomposition (extioDMD): ioDMD is extended to incorporate deterministic states, meaning states which are known and allow to improve accuracy of model. Intrinsically linked to Koopman Operator Theory [5] [6] and [7]. This modification does not perform Singular Value Decomposition on the extended states.

[1] Peter Schmid. Dynamic mode decomposition of numerical and experimental data. Jour-nal of Fluid Mechanics, Cambridge University Press (CUP), 2010, 656 (August), pp.5-28

[2] Jonathan H. Tu, Clarence W. Rowley, Dirk M. Luchtenburg, Steven L. Brunton, J. Nathan Kutz. On dynamic mode decomposition: Theory and applications. Journal of Computational Dynamics, 2014, 1 (2) : 391-421

[3] J.L.Proctor, S.L. Brunton and J.N.Kutz. Dynamic Mode Decomposition with Control. SIAM Journal on Applied Dynamical Systems, 15(1):142-161, 2016

[4] Annoni, Jennifer et al. “Wind farm flow modeling using input-output dynamic mode decomposition.” (2015).

[5] Korda, Milan and Igor Mezic. “Linear predictors for nonlinear dynamical systems: Koopman operator meets model predictive control.” Autom. 93 (2018): 149-160.

[6] Williams, M.O., Kevrekidis, I.G., & Rowley, C.W. (2015). A Data–Driven Approximation of the Koopman Operator: Extending Dynamic Mode Decomposition. Journal of Nonlinear Science, 25, 1307-1346.

[7] Arbabi, H., Korda, M., & Mezic, I. (2018). A data-driven Koopman model predictive control framework for nonlinear flows.

Comments and questions: nassir.cassamo@tecnico.ulisboa.pt or n.rodriguescassamo@tudelft.nl

Nassir Rodrigues Cassamo
MSc. Mechanical Engineering
TU Delft, Delft Center for Systems and Control (DCSC), Delft, The Netherlands
Instituto Superior Técnico, Lisbon, Portugal
March 2020

About

Dynamic Mode Decomposition using Simulator fOr Wind Farm Applications (SOWFA)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published