# Performance Evaluation of CF-MMIMO Wireless Systems Using Dynamic Mode Decomposition
## 2 Materials and Methods
### DMD/PiMD/npeDMD
#### 2.5.3. Measure-Preserving Extended Dynamic Mode Decomposition (mpeDMD)  
This DMD variant is a powerful method that encodes geometric features, invariant measures, transient and long-time behavior, coherent structures, quasiperiodicity, etc. It is fully described in [10].  
The basic requirement for the application of this method is having a measure-preserving system. An ergodic system falls into this category [10]. In this work, we are using a delay-Doppler channel model, which is in a relatively long period of time and is assumed to be ergodic, in which case this method is suitable for this scenario.  
The Measure-Preserving Extended Dynamic Mode Decomposition (MPeDMD) is an extension of the DMD method used to analyze and extract dynamic modes from the sampled data of dynamical systems. mpeDMD is particularly useful for systems with ergodic characteristics and for preserving probability measures and ergodicity invariance properties. This method has the following steps:  
1. **Data Collection**: Dynamic data of a system are collected in the form of a snapshot matrix \(X\), where each column represents a sample of the system state at a given time. Algorithm input: Snapshot data \(\left\{x^{(m)},y^{(m)}\right\}=F(x^{(m)})\), quadrature weights \(\left\{w_{m}\right\}_{m=1}^{M}\), and a dictionary of functions \(\left\{\psi\right\}_{j=1}^{N}\). \[\Psi_{X} =\begin{pmatrix}\Phi(x^{(1)})\\ \vdots\\ \Phi(x^{(M)})\end{pmatrix}\in\mathbb{C}^{M\times N},\] (51) \[\Psi_{Y} =\begin{pmatrix}\Phi(y^{(1)})\\ \vdots\\ \Phi(y^{(M)})\end{pmatrix}\in\mathbb{C}^{M\times N}.\] (52)
2. **Eigenvalue-Eigenvector Problem Formulation**: The goal is to find dynamic modes \(\phi\) and eigenvalues \(\lambda\) that satisfy the following equation: \[X^{\prime}\approx\Phi\Lambda.\] where \(\Phi\) contains the dynamic modes and \(\Lambda\) is a diagonal matrix of eigenvalues.
3. **Measure-Preserving Optimization**: mpeDMD extends the standard DMD to preserve the system measure. This is achieved by optimizing the cost function to preserve the properties of the original system measure. The optimization problem is shown in (53)  
\[\mathbb{K}_{EDMD}\in\arg\min_{B\in\mathbb{C}^{N\times N}}\frac{1}{M}\sum_{m=1 }^{M}\left\|\Psi(y^{(m)})-\Psi(x^{(m)})B\right\|_{2}^{2}. \tag{53}\]The Gram matrix is defined as \(G=\Psi_{X}^{*}W\Psi_{X}\) and the matrix \(A=\Psi_{X}^{*}W\Psi_{Y}\). Letting \({}^{\dagger}\) denote the pseudoinverse, a solution to (53) is  
\[\mathrm{K}_{EDMD}=G^{\dagger}A=\left(\Psi_{X}^{*}W\Psi_{X}\right)^{\dagger}( \Psi_{X}^{*}W\Psi_{Y}). \tag{54}\]  
\[=\left(\sqrt{W}\Psi_{X}\right)^{\dagger}\sqrt{W}\Psi_{Y}. \tag{55}\]
4. **Selection of Relevant Modes**: After calculating the dynamic modes and eigenvalues, the most relevant modes for system analysis are selected.
5. **Prediction and Analysis**: Once the relevant modes are identified, they can be used to predict the future behavior of the system and to analyze its dynamic characteristics.  
mpeDMD is especially useful for complex systems where ergodicity and measurement properties are important, such as fluid systems, thermal systems, and quantum systems.  
This method provides a powerful tool for the analysis of dynamical systems from sampled data and has found applications in a wide range of fields, including engineering, physics, biology, and economics.  
The algorithm is as follows [10]:  
1. Compute \(G=\Psi^{*}XW\Psi X\) and \(A=\Psi^{*}XW\Psi Y\), where \(\Psi_{X},\Psi_{Y}\) are given in (51) and (52).
2. Compute an SVD of \(G^{-\frac{1}{2}}A^{*}G^{-\frac{1}{2}}=U_{1}\Sigma U_{2}^{*}\).
3. Compute the eigendecomposition \(U_{2}U_{1}^{*}=\tilde{V}\Lambda\tilde{V}^{*}\).
4. Compute \(K=G^{-\frac{1}{2}}U_{2}U_{1}^{*}G^{\frac{1}{2}}\) and \(V=G^{-\frac{1}{2}}\tilde{V}\).
5. Output: Koopman matrix \(K\), with eigenvectors \(V\) and eigenvalues \(\Lambda\).