pymor.algorithms.dmd
¶
Module Contents¶
- pymor.algorithms.dmd.dmd(X, Y=None, modes=None, atol=None, rtol=None, cont_time_dt=None, type='exact', order='magnitude', svd_method='method_of_snapshots', return_A_approx=False, return_A_tilde=False)[source]¶
Dynamic Mode Decomposition.
See Algorithm 1 and Algorithm 2 in [TRL+14].
Parameters
- X
The
VectorArray
for which the DMD algorithm is performed. IfY
is given,X
andY
are the left resp. right snapshot series.- Y
The
VectorArray
of the right snapshot series.- modes
Maximum number of singular vectors of
X
to take into account.- atol
Absolute truncation tolerance for singular values of
X
.- rtol
Relative truncation tolerance for singular values of
X
.- cont_time_dt
If not
None
, return continuous-time DMD eigenvalues with scaling log(lambda) / dt.- type
- ‘standard’: uses the standard definition to compute the dynamic modes
Wk = U * evecs
, whereU
are the left singular vectors ofX
.
‘exact’ : computes the exact dynamic modes,
Wk = (1/evals) * Y * V * Sigma_inv * evecs
.
- order
Sort DMD eigenvalues either by
'magnitude'
or'phase'
.- svd_method
Which SVD method from
svd_va
to use ('method_of_snapshots'
or'qr_svd'
).- return_A_approx
If
True
, the approximation of the operatorA
withAX=Y
is returned as aLowRankOperator
.- return_A_tilde
If
True
the low-rank dynamics are returned.
Returns
- Wk
VectorArray
containing the dynamic modes. The number of computed modes is given by the SVD truncation rank determined by themodes
,atol
andrtol
arguments.- evals
Discrete or continuous time DMD eigenvalues.
- A_approx
LowRankOperator
containing the approximation of the operatorA
withAX=Y
. Only provided ifreturn_A_approx
isTrue
.- A_tilde
Low-rank dynamics. Only provided if
return_A_tilde
isTrue
.