An inverse mapping approach for process systems engineering using automatic differentiation and the implicit function theorem

inverse-problems
differentiable-programming
process-operability
process-systems-engineering
AIChE Journal (2023)
Published

2023

Doi

Victor Alves, John R. Kitchin and Fernando V. Lima, “An inverse mapping approach for process systems engineering using automatic differentiation and the implicit function theorem”, AIChE Journal 69(9), e18119 (2023). https://doi.org/10.1002/aic.18119

Read the paper

This summary was written by a language model from the paper and has not been checked line by line. Rely on the published paper for details.

Question

In process systems engineering (PSE), designers often know the outputs they want (product rates, conversions, concentrations) and need the set of inputs (equipment dimensions, operating conditions) that achieve them. This inverse mapping is usually done either by brute-force forward evaluation over a grid of inputs or by solving a nonlinear program (NLP) for each target output point, and both become expensive as model complexity and dimension grow. The paper asks whether the inverse map can instead be computed directly, going from the output space to the input space without optimization (Alves et al. 2023).

Approach

The method has three ingredients. First, the process model must be differentiable, meaning automatic differentiation (AD) can be applied to it; the authors write their models in JAX, and suggest that models locked inside closed-source simulators could be replaced by a JAX-compatible surrogate such as a Gaussian process. Second, the implicit function theorem turns the model Jacobian into inverse derivatives: for a model written implicitly as F(x, y) = 0, the matrix of derivatives of inputs with respect to outputs follows from the inverse of the Jacobian with respect to the inputs multiplied by the derivatives of F with respect to the outputs, and a pseudo-inverse is proposed for non-square systems. Third, a target region in output space (here a circle given in parametric form) is discretized along its boundary, and the inverse derivatives are integrated along that path with a fixed-step classical fourth-order Runge-Kutta scheme, starting from one known input/output pair. The result traces the boundary of the corresponding input region. The authors note the similarity of this step to Newton steps in homotopy continuation, and point out that NaN or infinite Jacobian entries may signal an infeasible output region or an ill-posed problem, while singular Jacobians at bifurcations would call for arc-length continuation. Because the Jacobian is available everywhere along the path, the inverse map’s derivatives and a phase portrait (vector field) can be plotted at no extra cost.

Two two-dimensional case studies were run in Python 3.9 with JAX 0.3.15. The first is a CSTR with a second-order reaction A to B and a first-order reaction A to C, where the inputs are reactor radius (at fixed height) and an RT temperature term and the outputs are the concentrations of A and B; the output target was a circle centered at (0.58, 0.3) in molar concentration units. The second is a direct methane aromatization membrane reactor (DMA-MR) producing benzene and hydrogen, described by eight ODEs for tube and shell molar balances and integrated with JAX’s differentiable Dormand-Prince solver; the inputs are tube length and tube diameter.

Key findings

For the CSTR, the boundary traced by the AD approach enclosed all of the brute-force grid points that mapped into the desired output region, while computing only the boundary rather than the whole space. The derivatives along the path were smooth but spanned different orders of magnitude, indicating stiffness.

For the DMA-MR, the desired output set was a circle covering benzene production of 22.3 to 23 mg/h and methane conversion of 39.2% to 40%, discretized into 100 boundary points. The resulting desired input set is non-convex, which the authors attribute to the ill-posed character of inverse problems. Compared with the NLP-based operability approach (IPOPT), the method took 0.93 min against 17.84 min for a cold-start NLP with finite differences (about 19 times faster), 11.56 min for a warm-start NLP with finite differences, and 1.97 min for a warm-start NLP with AD derivatives (about twice as fast). The average relative differences from the NLP solution were 0.0186% for tube length and 0.0096% for tube diameter. The authors explain the remaining speedup by noting that the integration needs only first-order (Jacobian) information while the NLP route also uses second-order data.

Significance

The work recasts model inversion in PSE as an initial-value problem along an output-space path, replacing a sequence of optimizations with Jacobian evaluations from AD. It ties into the process operability framework (available input set, desired output set, desired input set) used for modular and intensified process design, and is an early concrete example of the group’s argument that AD has uses in chemical engineering well beyond training ML models. Limitations stated by the authors include the restriction to two-dimensional demonstrations, the need for a differentiable model, and the unhandled case of bifurcations; future work is to couple the method with ML surrogates for large problems and to treat bifurcations.