Constrained Optimization, Scaling, and Conditioning
Why is insufficient¶
For an unconstrained differentiable optimum, is necessary. At a constrained optimum, the gradient need not vanish because active constraints block motion in improving directions.
At an active boundary, the objective gradient is balanced by the active constraint gradient.
Lagrangian and KKT conditions¶
Define the Lagrangian
Under suitable regularity conditions, a local optimum satisfies the Karush–Kuhn–Tucker conditions:
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¶
Penalty and augmented-Lagrangian methods add measures of constraint violation to the objective.
Sequential quadratic programming (SQP) solves a sequence of quadratic constrained approximations.
Interior-point methods approach the solution from within the feasible region using barrier terms.
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.
Scaling produces a numerically more balanced landscape.
Variable, objective, and constraint scaling¶
A physical variable may be represented as
with typical values near one. Bound-based scaling maps a variable to :
Functions can similarly be scaled using meaningful nonzero references:
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
the curvature in is a million times larger than in . Gradient descent needs a small step for stability in , making progress in slow. Define
Then , which has balanced curvature.
Activity 3.2: KKT Analysis of a Minimum-Mass Cantilever Beam¶
Activity 3.2: KKT Analysis of a Minimum-Mass Cantilever Beam
A rectangular cantilever beam has width , height , length , elastic modulus , material density , and an end load . Its mass is
The maximum bending stress and tip displacement are
The optimization problem is
Use
and
Write the Lagrangian, including multipliers for the stress, displacement, and bound constraints.
Write all KKT conditions: stationarity, primal feasibility, dual feasibility, and complementary slackness.
Assume initially that the stress and displacement constraints are active and all bounds are inactive. Solve the two active constraints analytically for and .
Check whether the resulting design satisfies the variable bounds.
Compute the associated Lagrange multipliers and determine whether the assumed active set satisfies dual feasibility.
Enumerate all physically plausible active sets involving:
stress only;
displacement only;
stress and displacement; and
one performance constraint and one variable bound.
Determine the globally optimal feasible design by comparing all valid KKT candidates.
Interpret each nonzero multiplier as the local value of relaxing its corresponding engineering requirement.
Activity 3.3: Scaling, Conditioning, and Gradient-Method Convergence¶
Activity 3.3: Scaling, Conditioning, and Gradient-Method Convergence
Consider the quadratic optimization problem
where
Compute the exact minimizer
Compute the 2-norm condition number .
For fixed-step gradient descent,
derive the largest stable step size.
Derive the optimal fixed step size
and the corresponding worst-case error contraction factor
Estimate the number of iterations required to reduce the error norm by a factor of 10-6.
Introduce the scaled variables
Derive the scaled Hessian
and compute its condition number.
Compare gradient descent, Newton’s method, and BFGS on the original and scaled formulations from
Explain why variable scaling changes numerical behavior without changing the underlying physical optimum.
Give one example of physical ill-conditioning that cannot be eliminated by simple coordinate scaling.