Skip to content

swischuk/rom-operator-inference-Python3

 
 

Repository files navigation

Operator Inference

This is a Python implementation of Operator Inference for constructing projection-based reduced-order models of dynamical systems with a polynomial form. The procedure is data-driven and non-intrusive, making it a viable candidate for model reduction of black-box or complex systems. The methodology was introduced in [1]. See References for more papers that use or build on Operator Inference.

See this repository for a MATLAB implementation and DOCUMENTATION.md for the code documentation.

Problem Statement

Consider the (possibly nonlinear) system of n ordinary differential equations with state variable x, input (control) variable u, and independent variable t:

where

This system is called the full-order model (FOM). If n is large, as it often is in high-consequence engineering applications, it is computationally expensive to numerically solve the FOM. This package provides tools for constructing a reduced-order model (ROM) that is up to quadratic in the state x with optional linear control inputs u. The procedure is data-driven, non-intrusive, and relatively inexpensive. In the most general case, the code can construct and solve a reduced-order system with the polynomial form

where now

This reduced low-dimensional system approximates the original high-dimensional system, but it is much easier (faster) to solve because of its low dimension r << n.

See DETAILS.md for more mathematical details and an index of notation.

Quick Start

Installation

Install from the command line with the following single command (requires pip).

$ pip3 install rom-operator-inference

Usage

Given a linear basis Vr, snapshot data X, and snapshot time derivatives Xdot, the following code learns a reduced model for a problem of the form dx / dt = c + Ax(t), then solves the reduced system for 0 ≤ t ≤ 1.

import numpy as np
import rom_operator_inference as roi

# Define a model of the form  dx / dt = c + Ax(t).
>>> model = roi.InferredContinuousROM(modelform="cA")

# Fit the model to snapshot data X, the time derivatives Xdot,
# and the linear basis Vr by solving for the operators c_ and A_.
>>> model.fit(Vr, X, Xdot)

# Simulate the learned model over the time domain [0,1] with 100 timesteps.
>>> t = np.linspace(0, 1, 100)
>>> x_ROM = model.predict(X[:,0], t)

Examples

The examples/ folder contains scripts and notebooks that set up and run several examples:


Contributors: Renee Swischuk, Shane McQuarrie, Elizabeth Qian, Boris Kramer, Karen Willcox.

References

About

Operator Inference for data-driven, non-intrusive model reduction of dynamical systems.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 89.5%
  • TeX 10.2%
  • Makefile 0.3%