Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Constrained Optimization, Scaling, and Conditioning

Why f=0\nabla f=0 is insufficient

For an unconstrained differentiable optimum, f(x)=0\nabla f(\mathbf{x}^*)=0 is necessary. At a constrained optimum, the gradient need not vanish because active constraints block motion in improving directions.

Objective contours meeting an active constraint boundary at a constrained optimum, with objective and constraint gradients balancing one another.

At an active boundary, the objective gradient is balanced by the active constraint gradient.

Lagrangian and KKT conditions

Define the Lagrangian

L(x,λ,ν)=f(x)+i=1mλigi(x)+j=1pνjhj(x).\mathcal{L}(\mathbf{x},\boldsymbol{\lambda},\boldsymbol{\nu}) =f(\mathbf{x})+\sum_{i=1}^{m}\lambda_i g_i(\mathbf{x})+\sum_{j=1}^{p}\nu_jh_j(\mathbf{x}).

Under suitable regularity conditions, a local optimum satisfies the Karush–Kuhn–Tucker conditions:

xL=0,gi(x)0,hj(x)=0,λi0,λigi(x)=0.\begin{aligned} \nabla_{\mathbf{x}}\mathcal{L}&=0,\\ g_i(\mathbf{x})&\leq0,\\ h_j(\mathbf{x})&=0,\\ \lambda_i&\geq0,\\ \lambda_i g_i(\mathbf{x})&=0. \end{aligned}

The last condition is complementary slackness: an inequality is either inactive with zero multiplier, or active and potentially influential.

A multiplier measures the local value of relaxing its constraint. A large multiplier indicates that a small relaxation could significantly improve the objective and can help prioritize requirements.

Major constrained algorithms

Modern nonlinear-programming solvers often use SQP or interior-point methods. CCD users should understand the required inputs and returned diagnostics even if they do not implement these solvers.

Gradient-based and gradient-free solvers in CCD practice

SQP and interior-point methods are gradient-based: they exploit derivative information and typically converge in far fewer function evaluations than derivative-free alternatives, but they converge to the local optimum nearest the initial guess. Gradient-free algorithms—such as covariance matrix adaptation evolution strategy (CMA-ES), genetic algorithms (GA), and particle swarm optimization (PSO)—require only function evaluations, tolerate noisy or discontinuous objectives, and search more globally, but the number of evaluations they need tends to grow rapidly with the number of design variables, so they scale poorly to high-dimensional problems even after they have located a promising region.

A recent review of wind-turbine control co-design practice illustrates how these families are actually combined rather than chosen exclusively. Because CCD problems often combine a low-dimensional, potentially multimodal plant-design search with a much higher-dimensional control-trajectory search, a common hybrid strategy assigns a gradient-free optimizer (CMA-ES, GA, or PSO) to the plant-design variables and a gradient-based optimizer (SQP or an interior-point method) to the control-design variables, matching each discipline to the solver family best suited to its dimensionality and smoothness. Widely used implementations include CMA-ES and COBYLA on the gradient-free side, and SNOPT (a sparse SQP implementation) and IPOPT (an interior-point implementation) on the gradient-based side.

Why scaling matters

Mathematically equivalent formulations can behave very differently numerically. A solver may handle variables near 10-6 and 106 unevenly, especially when using common step and convergence tolerances.

Elongated objective contours and inefficient search steps before scaling, compared with balanced contours and direct steps after scaling.

Scaling produces a numerically more balanced landscape.

Variable, objective, and constraint scaling

A physical variable may be represented as

xi=xi,ref+six~i,x_i=x_{i,\mathrm{ref}}+s_i\tilde{x}_i,

with typical x~i\tilde{x}_i values near one. Bound-based scaling maps a variable to [0,1][0,1]:

x~i=xixL,ixU,ixL,i.\tilde{x}_i=\frac{x_i-x_{L,i}}{x_{U,i}-x_{L,i}}.

Functions can similarly be scaled using meaningful nonzero references:

f~=ffref,g~i=gigi,ref.\tilde{f}=\frac{f}{f_{\mathrm{ref}}}, \qquad \tilde{g}_i=\frac{g_i}{g_{i,\mathrm{ref}}}.

Conditioning and tolerances

Conditioning describes solution sensitivity to small changes in data. Poor conditioning can cause slow convergence, sensitivity to tolerances, inaccurate finite differences, unstable linear algebra, and large design changes from small numerical errors.

Scaling improves algorithm behavior but cannot remove genuine physical ill-conditioning. If two variables have nearly identical effects, the design may be fundamentally poorly identifiable.

Solver tolerances operate in the provided coordinates. A residual tolerance of 10-6 has a different meaning for a normalized constraint than for a dimensional force balance. Scale first, then select tolerances.

Example 3.3: poorly scaled quadratic

For

f(x1,x2)=106x12+x22,f(x_1,x_2)=10^6x_1^2+x_2^2,

the curvature in x1x_1 is a million times larger than in x2x_2. Gradient descent needs a small step for stability in x1x_1, making progress in x2x_2 slow. Define

x~1=1000x1,x~2=x2.\tilde{x}_1=1000x_1,\qquad\tilde{x}_2=x_2.

Then f=x~12+x~22f=\tilde{x}_1^2+\tilde{x}_2^2, which has balanced curvature.

Activity 3.2: KKT Analysis of a Minimum-Mass Cantilever Beam

Activity 3.3: Scaling, Conditioning, and Gradient-Method Convergence