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.303461   0.0657393  0.0  0.0  0.0  …   0.0          0.0        0.0
 -0.316335   0.0839061  0.0  0.0  0.0      0.0          0.0        0.0
 -0.329258   0.558169   0.0  0.0  0.0      0.0          0.0        0.0
 -0.30643    0.133768   0.0  0.0  0.0      0.0          0.0        0.0
 -0.323164   0.350544   0.0  0.0  0.0      0.0          0.0        0.0
 -0.321895  -0.348591   0.0  0.0  0.0  …   0.0          0.0        0.0
 -0.323464  -0.208576   0.0  0.0  0.0      0.0          0.0        0.0
 -0.330664  -0.433942   0.0  0.0  0.0      0.0          0.0        0.0
 -0.317162   0.164851   0.0  0.0  0.0      0.0          0.0        0.0
 -0.287961  -0.394727   0.0  0.0  0.0      0.0          0.0        0.0
  ⋮                                    ⋱                          
  0.0        0.0        0.0  0.0  0.0      0.37392      0.42019    0.125492
  0.0        0.0        0.0  0.0  0.0     -0.0296939    0.236147  -0.326486
  0.0        0.0        0.0  0.0  0.0      0.00913231   0.255469  -0.0981429
  0.0        0.0        0.0  0.0  0.0      0.270307    -0.577056  -0.0109236
  0.0        0.0        0.0  0.0  0.0  …  -0.116062    -0.353133   0.498189
  0.0        0.0        0.0  0.0  0.0     -0.17846      0.124056   0.127118
  0.0        0.0        0.0  0.0  0.0     -0.562475    -0.25732   -0.0189921
  0.0        0.0        0.0  0.0  0.0     -0.244877     0.362964   0.361177
  0.0        0.0        0.0  0.0  0.0     -0.13461     -0.10259   -0.687211