Computing Library › Optimization
Optimization

Response Surface Methodology

Fit simple polynomial models to experimental data, then optimize on the fitted surface to find good operating conditions.

Modeling the response

Response surface methodology (RSM) approximates how a measured response depends on several input factors using low-order polynomial models fitted to designed experiments. The fitted surface is cheap to evaluate and analyze, so it can be optimized directly to locate factor settings that maximize or minimize the response.

The typical model

Kronos motion — operating point

RSM usually fits a second-order (quadratic) model: y = b0 + sum b_i x_i + sum b_ii x_i^2 + sum b_ij x_i x_j. The linear terms capture main effects, the squared terms capture curvature, and the cross terms capture interactions. Least squares estimates the coefficients from experimental runs.

The sequential strategy

Analyzing the surface

Once a quadratic surface is fit, calculus locates its stationary point by setting the gradient to zero. Canonical analysis of the surface's curvature classifies the stationary point as a maximum, minimum, or saddle, and reveals ridges along which the response is nearly constant. Contour and surface plots make trade-offs visible for two or three factors.

Scope and limits

RSM works best locally, where a low-order polynomial is an adequate approximation, and with a modest number of factors. It is a mainstay of process optimization in manufacturing and chemistry. For strongly nonlinear or high-dimensional problems, more flexible surrogates such as Gaussian processes or neural networks replace the polynomial model.

python
import numpy as np
# fit quadratic surface via least squares on design matrix Phi
beta, *_ = np.linalg.lstsq(Phi, y, rcond=None)
# stationary point: solve grad = 0 from fitted coefficients

Response surface methodology turns a handful of experiments or simulation runs into a smooth model that pinpoints good operating conditions.