Map and Vector Field Transformations
The following methods calculate invariant foliations and invariant manifolds of maps and vectopr fields.
Let us consider the following four-dimensional map
function trivialMAP(z)
om1 = 0.12
om2 = 1
dm1 = 0.002
dm2 = 0.003
return [(exp(dm1)*z[4]*(z[1]^3*z[2] + z[4]^2 + z[4]^4) + 2*z[1]*cos(om1) - 2*z[2]*sin(om1))/(2.0*exp(dm1)),
-0.5*z[2]^3 - z[1]^2*z[2]^2*z[4] - (3*z[2]*z[3]*z[4])/4. + (z[2]*cos(om1) + z[1]*sin(om1))/exp(dm1),
(-3*z[1]*z[2]^3*z[3])/4.0 + z[3]^5 - (3*z[1]^3*z[2]*z[4])/4.0 + (z[3]*cos(om2) - z[4]*sin(om2))/exp(dm2),
(z[2]*z[3]^4)/4.0 + (z[2]*z[3]^3*z[4])/2.0 - z[4]^5 + (z[4]*cos(om2) + z[3]*sin(om2))/exp(dm2)]
endTo calculate the invariant foliation corresponding to a two-simensional invariant subspace we use
using FoliationsManifoldsAutoencoders
MF = DensePolyManifold(4, 4, 5)
XF = fromFunction(MF, trivial)
MWt, XWt, MS, XS = iFoliationMAP(MF, XF, [3, 4], [])To calculate the invariant manifold corresponding to the same subspace we use
MWt, XWt, MR, XR = iManifoldMAP(MF, XF, [3, 4], [])One can also calculate the frequency and damping curves using
That, Rhat_r = MAPFrequencyDamping(MWt, XWt, MS, XS, amp_max)
r = range(0, domain(That).right, length=1000)
frequency = abs.(That.(r))
damping = -log.(abs.(Rhat_r.(r))) ./ abs.(That.(r))The relevant functions are the following:
FoliationsManifoldsAutoencoders.iFoliationMAP — FunctionMUr, XUr, MSr, XSr, MU, XU, MS, XS = iFoliationMAP(MF::DensePolyManifold, XF, vars, par; order = PolyOrder(MF))Calculates the invariant foliation of nonlinear map $\boldsymbol{F}$ with respect to selected eigenvectors of the Jacobian $D\boldsymbol{F}(\boldsymbol{0})$.
We solve the invariance equation
\[\boldsymbol{U} \circ \boldsymbol{F} = \boldsymbol{S} \circ \boldsymbol{U}\]
for $\boldsymbol{U}$ and $\boldsymbol{S}$ using polynomial expansion.
The input are
MF,XFrepresent the dense polynomial expansion of function\boldsymbol{F}`.varsis a vector of integers, selecting the eigenvectors of $D\boldsymbol{F}(\boldsymbol{0})$.parare the indices of input variable of $\boldsymbol{F}$, which do not have dynamics and can be treated as parameters.orderis the polynomial order for which the calculation is carried out. The default is the same order as the order ofMF,XF, but it can be greater for increased accuracy.
The output is
MUr,XUrrepresent $\boldsymbol{U}$ in real coordinatesMSr,XSrrepresent $\boldsymbol{S}$ in real coordinatesMU,XUrepresent $\boldsymbol{U}$ in complex coordinatesMS,XSrepresent $\boldsymbol{S}$ in complex coordinates
Note that it calculates the complex result first, which has the minimal number of parameters, then it transforms the result into real form.
FoliationsManifoldsAutoencoders.iFoliationVF — FunctionMUr, XUr, MSr, XSr, MU, XU, MS, XS = iFoliationVF(MF::DensePolyManifold, XF, vars, par; order = PolyOrder(MF))Calculates the invariant foliation of nonlinear vector field $\boldsymbol{F}$ with respect to selected eigenvectors of the Jacobian $D\boldsymbol{F}(\boldsymbol{0})$.
We solve the invariance equation
\[D \boldsymbol{U} \boldsymbol{F} = \boldsymbol{S} \circ \boldsymbol{U}\]
for $\boldsymbol{U}$ and $\boldsymbol{S}$ using polynomial expansion.
The input are
MF,XFrepresent the dense polynomial expansion of function\boldsymbol{F}`.varsis a vector of integers, selecting the eigenvectors of $D\boldsymbol{F}(\boldsymbol{0})$.parare the indices of input variable of $\boldsymbol{F}$, which do not have dynamics and can be treated as parameters.orderis the polynomial order for which the calculation is carried out. The default is the same order as the order ofMF,XF, but it can be greater for increased accuracy.
The output is
MUr,XUrrepresent $\boldsymbol{U}$ in real coordinatesMSr,XSrrepresent $\boldsymbol{S}$ in real coordinatesMU,XUrepresent $\boldsymbol{U}$ in complex coordinatesMS,XSrepresent $\boldsymbol{S}$ in complex coordinates
Note that it calculates the complex result first, which has the minimal number of parameters, then it transforms the result into real form.
FoliationsManifoldsAutoencoders.iManifoldMAP — FunctionMWr, XWr, MRr, XRr, MW, XW, MR, XR = iManifoldMAP(MF0::DensePolyManifold, XF0, vars, par; order = PolyOrder(MF0))Calculates the invariant manifold of nonlinear map $\boldsymbol{F}$ with respect to selected eigenvectors of the Jacobian $D\boldsymbol{F}(\boldsymbol{0})$.
We solve the invariance equation
\[\boldsymbol{W} \circ \boldsymbol{R} = \boldsymbol{F} \circ \boldsymbol{W}\]
for $\boldsymbol{U}$ and $\boldsymbol{S}$ using polynomial expansion.
The input are
MF,XFrepresent the dense polynomial expansion of function\boldsymbol{F}`.varsis a vector of integers, selecting the eigenvectors of $D\boldsymbol{F}(\boldsymbol{0})$.parare the indices of input variable of $\boldsymbol{F}$, which do not have dynamics and can be treated as parameters.orderis the polynomial order for which the calculation is carried out. The default is the same order as the order ofMF,XF, but it can be greater for increased accuracy.
The output is
MWr,XUrrepresent $\boldsymbol{W}$ in real coordinatesMWr,XSrrepresent $\boldsymbol{R}$ in real coordinatesMW,XWrepresent $\boldsymbol{W}$ in complex coordinatesMR,XRrepresent $\boldsymbol{R}$ in complex coordinates
Note that it calculates the complex result first, which has the minimal number of parameters, then it transforms the result into real form.
FoliationsManifoldsAutoencoders.iManifoldVF — FunctionMWr, XWr, MRr, XRr, MW, XW, MR, XR = iManifoldVF(MF0::DensePolyManifold, XF0, vars, par; order = PolyOrder(MF0))Calculates the invariant manifold of nonlinear vector field $\boldsymbol{F}$ with respect to selected eigenvectors of the Jacobian $D\boldsymbol{F}(\boldsymbol{0})$.
We solve the invariance equation
\[D \boldsymbol{W} \boldsymbol{R} = \boldsymbol{F} \circ \boldsymbol{W}\]
for $\boldsymbol{U}$ and $\boldsymbol{S}$ using polynomial expansion.
The input are
MF,XFrepresent the dense polynomial expansion of function\boldsymbol{F}`.varsis a vector of integers, selecting the eigenvectors of $D\boldsymbol{F}(\boldsymbol{0})$.parare the indices of input variable of $\boldsymbol{F}$, which do not have dynamics and can be treated as parameters.orderis the polynomial order for which the calculation is carried out. The default is the same order as the order ofMF,XF, but it can be greater for increased accuracy.
The output is
MWr,XUrrepresent $\boldsymbol{W}$ in real coordinatesMWr,XSrrepresent $\boldsymbol{R}$ in real coordinatesMW,XWrepresent $\boldsymbol{W}$ in complex coordinatesMR,XRrepresent $\boldsymbol{R}$ in complex coordinates
Note that it calculates the complex result first, which has the minimal number of parameters, then it transforms the result into real form.