Lifting

This page gives an explanation for the mathematical concept of lifting and provides example code for its implementation.

Lift Map Structure

LiftAndLearn.liftingType
struct lifting

Lifting map structure.

Fields

  • N: number of variables of the original nonlinear dynamics
  • Nl: number of variables of the lifted system
  • lift_funcs: array of lifting transformation functions
  • map: function to map the data to the new mapped states including original states
  • mapNL: function to map the data to only the additional lifted states
source
Tip

For a simple pendulum we have

\[\begin{bmatrix} \dot{x}_1 \\ \dot{x}_2 \end{bmatrix} = \begin{bmatrix} x_2 \\ -\frac{g}{l} \sin(x_1) \end{bmatrix}\]

The lifted system becomes

\[\begin{bmatrix} \dot{x}_1 \\ \dot{x}_2 \\ \dot{x}_3 \\ \dot{x}_4 \end{bmatrix} = \begin{bmatrix} x_2 \\ -\frac{g}{l} x_3 \\ x_2 x_4 \\ -x_2 x_3 \end{bmatrix}\]

when $x_3 = \sin(x_1)$ and $x_4 = \cos(x_1)$. Which if coded, would look like this:

lifter = LnL.lifting(2, 4, [x -> sin.(x[1]), x -> cos.(x[1])])

Construct Lifted POD Basis from Data

LiftAndLearn.lifted_basisFunction
lifted_basis(W, Nl, gp, ro) → Vr

Create the block-diagonal POD basis for the new lifted system data

Arguments

  • w: lifted data matrix
  • Nl: number of variables of the lifted state dynamics
  • gp: number of grid points for each variable
  • ro: vector of the reduced orders for each basis

Return

  • Vr: block diagonal POD basis
source

An example implementation would be:

using LiftAndLearn
using Random
LnL = LiftAndLearn
W = round.(rand(30,100), digits=4)
LnL.lifted_basis(W, 3, 10, [2,3,4])
30×9 BlockDiagonals.BlockDiagonal{Float64, Matrix{Float64}}:
 -0.313139   0.474732   0.0  0.0  0.0  …   0.0         0.0          0.0
 -0.33649    0.116524   0.0  0.0  0.0      0.0         0.0          0.0
 -0.329496   0.183704   0.0  0.0  0.0      0.0         0.0          0.0
 -0.293478   0.349407   0.0  0.0  0.0      0.0         0.0          0.0
 -0.318335  -0.295235   0.0  0.0  0.0      0.0         0.0          0.0
 -0.323205   0.246728   0.0  0.0  0.0  …   0.0         0.0          0.0
 -0.32867   -0.384207   0.0  0.0  0.0      0.0         0.0          0.0
 -0.33463    0.0380014  0.0  0.0  0.0      0.0         0.0          0.0
 -0.286541  -0.301257   0.0  0.0  0.0      0.0         0.0          0.0
 -0.293455  -0.466224   0.0  0.0  0.0      0.0         0.0          0.0
  ⋮                                    ⋱                           
  0.0        0.0        0.0  0.0  0.0     -0.390829    0.168685     0.158827
  0.0        0.0        0.0  0.0  0.0      0.257466    0.00790278  -0.236725
  0.0        0.0        0.0  0.0  0.0     -0.241993   -0.491806     0.0260462
  0.0        0.0        0.0  0.0  0.0     -0.128622   -0.0449679   -0.466487
  0.0        0.0        0.0  0.0  0.0  …  -0.0962216  -0.325716    -0.477863
  0.0        0.0        0.0  0.0  0.0      0.371994    0.155839     0.216236
  0.0        0.0        0.0  0.0  0.0     -0.478896    0.533206     0.15826
  0.0        0.0        0.0  0.0  0.0     -0.0304306   0.0864747    0.107678
  0.0        0.0        0.0  0.0  0.0      0.548301    0.330149    -0.14287