This example shows how create an incremental proper orthogonal decomposition (POD) and analyze the snapshot data stored in the object. An incrementalPOD
object computes a low-rank approximation of the snapshot matrix .
To start an incremental POD, initialize the object.
In POD-based model reduction, you provide the snapshots of state data. To generate state data, you typically run custom simulations with lsim
. The lsim
function also supports populating the xPOD
object directly during the simulation. Create a random state-space and run a simulation to update the POD object.
xPOD1 =
incrementalPOD with properties:
Snapshots: 251
MaxRank: 10
RankTol: 1.0000e-06
Transform: []
lsim
generates the state data and the incrementalPOD
object performs on-the-fly POD by updating the URV decomposition for each simulation step.
You can also run more simulations to enrich the incremental POD with more data. As the new data becomes available, the object updates the URV approximation.
xPOD2 =
incrementalPOD with properties:
Snapshots: 151
MaxRank: 10
RankTol: 1.0000e-06
Transform: []
You can combine multiple incremental PODs of state data from different simulations of a model. The state data must be of compatible sizes.
xPODm =
incrementalPOD with properties:
Snapshots: 402
MaxRank: 10
RankTol: 1.0000e-06
Transform: []
Merging these two PODs is equivalent to running sequential simulations on the same POD object.
xPOD =
incrementalPOD with properties:
Snapshots: 402
MaxRank: 10
RankTol: 1.0000e-06
Transform: []
Compute a truncated SVD of , use the svd
function.
This provides the approximation . Here, is the state snapshot data processed by incremental proper orthogonal decomposition (POD), matrix contains the dominant singular values, and columns of are the corresponding dominant left singular vectors.
You can see that sequential simulations with the same POD or merging two PODs is equivalent.