Algorithm Search⌘K

Techniqueadvanced

Control variable transform

Writes the increment as x - x^b = U v with B = U U^T, so the background term of the variational cost becomes v^T v / 2, which removes B^-1 and preconditions the minimization.

A control variable transform is a change of variables in a variational analysis. The analysis increment is written as x−xb=Uvx - x^b = U v, where UU is a factor of the background error covariance, B=UU⊤B = U U^\top, and the minimization runs over the new variable vv. The background term 12(x−xb)⊤B−1(x−xb)\tfrac12 (x - x^b)^\top B^{-1} (x - x^b) of the cost then becomes 12v⊤v\tfrac12 v^\top v. This has two effects. The method never needs B−1B^{-1}, and in practice not even BB, only products with UU and U⊤U^\top. And the Hessian of the cost becomes the identity plus a term of rank at most pp, the number of observations, so its eigenvalues are at least 1 and conjugate gradients converge in far fewer steps. Every operational 3D-Var and 4D-Var system works in such variables, and UU is where the model of BB is coded.

In plain words

The background errors at nearby points and in related quantities move together, so the numbers that describe the state are strongly linked. A minimizer that works with these linked numbers makes slow progress, because a step in one number is undone by the links to the others. The transform replaces them by new numbers that are independent and all of the same size. Each new number stands for one independent pattern of error. In these numbers the background term is a plain sum of squares, the minimizer converges quickly, and at the end the transform turns the result back into a correction of the state.

When it applies

  • The analysis minimizes a cost with a background term weighted by B−1B^{-1}, as in 3D-Var, 4D-Var and incremental 4D-Var.
  • BB is too large to form or to invert, but it can be written as a product UU⊤UU^\top of operators that are cheap to apply, together with their transposes.
  • The minimizer is iterative, such as conjugate gradients, so its speed depends on the condition number of the Hessian.
  • UU may be square or rectangular, and it does not have to be invertible: BB may even be singular, as an ensemble covariance is.

The template

For a linear (or linearized) observation operator HH and the innovation d=yo−H(xb)d = y^o - H(x^b), the cost in the control variable is

J(v)=12v⊤v+12(d−HUv)⊤R−1(d−HUv),∇J(v)=v−U⊤H⊤R−1(d−HUv).J(v) = \tfrac12 v^\top v + \tfrac12 (d - H U v)^\top R^{-1} (d - H U v), \qquad \nabla J(v) = v - U^\top H^\top R^{-1} (d - HUv).

Its minimizer solves a linear system with the Hessian A=I+U⊤H⊤R−1HUA = I + U^\top H^\top R^{-1} H U:

  1. CVT-ANALYSIS(x^b, U, H, R, y^o)
  2. 1d <- y^o - H(x^b)
  3. 2b <- U^T H^T R^-1 d
  4. 3solve (I + U^T H^T R^-1 H U) v = b by conjugate gradients, with products only
  5. 4return x^a <- x^b + U v

The holes are the factor UU and its transpose (lines L2 to L4) and the observation operator with its adjoint. In an operational system UU is a product of simple steps, applied from right to left (Bannister 2008, Part II; Derber and Bouttier 1999): a horizontal transform, often spectral, in which the horizontal correlations are diagonal; a vertical transform onto the modes of a vertical covariance; a scaling by the standard deviations; and a balance operator that builds the full wind and mass increments from uncorrelated variables, such as a balanced part of the stream function and the unbalanced residuals.

Why the analysis is unchanged (a theorem). For any UU with UU⊤=BUU^\top = B, put C=HUC = HU. The minimizer of J(v)J(v) is v∗=(I+C⊤R−1C)−1C⊤R−1d=C⊤(R+CC⊤)−1dv^* = (I + C^\top R^{-1} C)^{-1} C^\top R^{-1} d = C^\top (R + CC^\top)^{-1} d, by the push-through identity. So

xa=xb+Uv∗=xb+BH⊤(HBH⊤+R)−1d,x^a = x^b + U v^* = x^b + B H^\top (H B H^\top + R)^{-1} d,

which is the analysis of optimal interpolation and of 3D-Var in the original variables. If UU is square and invertible, the two costs are equal point by point, J(v)=J(xb+Uv)J(v) = J(x^b + Uv), since (Uv)⊤B−1(Uv)=v⊤v(Uv)^\top B^{-1} (Uv) = v^\top v.

Why it preconditions (a theorem). C⊤R−1CC^\top R^{-1} C is positive semidefinite with rank at most pp, and its nonzero eigenvalues μi\mu_i are those of R−1/2HBH⊤R−1/2R^{-1/2} H B H^\top R^{-1/2}. So the eigenvalues of AA are 1, at least n−pn - p times, and 1+μi1 + \mu_i. Hence:

  • the condition number of AA is 1+μmax⁡1 + \mu_{\max}, whatever the condition number of BB;
  • AA has at most p+1p + 1 distinct eigenvalues, so conjugate gradients reach the exact minimizer in at most p+1p + 1 steps in exact arithmetic.

In the original variables the Hessian is B−1+H⊤R−1HB^{-1} + H^\top R^{-1} H, and its condition number grows with that of BB, which is large for long correlation lengths.

Worked example. Take B=(10.90.91)B = \begin{pmatrix} 1 & 0.9 \\ 0.9 & 1 \end{pmatrix}, with eigenvalues 1.9 and 0.1, one observation of the first value with R=1R = 1, and d=1d = 1.

  • In the original variables the Hessian is B−1+e1e1⊤=10.19(1.19−0.9−0.91)B^{-1} + e_1 e_1^\top = \frac{1}{0.19}\begin{pmatrix} 1.19 & -0.9 \\ -0.9 & 1 \end{pmatrix}, with eigenvalues 1 and 200/19≈10.53200/19 \approx 10.53.
  • The Cholesky factor is U=(100.90.19)U = \begin{pmatrix} 1 & 0 \\ 0.9 & \sqrt{0.19} \end{pmatrix}, so HU=(1,0)HU = (1, 0) and the Hessian in vv is (2001)\begin{pmatrix} 2 & 0 \\ 0 & 1 \end{pmatrix}, with the condition number 2=1+HBH⊤/R2 = 1 + HBH^\top/R.
  • The minimizer is v=(1/2,0)v = (1/2, 0), and xa−xb=Uv=(0.5,0.45)x^a - x^b = Uv = (0.5, 0.45). This is BH⊤d/(HBH⊤+R)=(1,0.9)/2BH^\top d/(HBH^\top + R) = (1, 0.9)/2, as the theorem says.

Measurement. On a line of n=100n = 100 points take Bij=ρ∣i−j∣B_{ij} = \rho^{|i - j|} with ρ=e−1/L\rho = e^{-1/L}, observe every fifth point with R=0.25 IR = 0.25\,I (p=20p = 20), and stop conjugate gradients at a relative residual of 10−810^{-8}.

LL (grid steps) cond BB cond, original CG steps, original cond, in vv CG steps, in vv
5 98.6 24.4 39 9.5 14
10 374.7 38.7 52 16.3 15

With every tenth point observed (p=10p = 10, L=10L = 10) the condition number falls from 92.1 to 9.2, and the steps fall from 76 to 10, within the bound p+1=11p + 1 = 11. Both forms gave the same analysis to the tolerance of the solver. The matrices were dense, and the eigenvalues were computed by the Jacobi method.

Classic examples

  • 3D-Var. The first operational 3D-Var minimized over spectral coefficients in which the horizontal covariance is diagonal (Parrish and Derber 1992).
  • Incremental 4D-Var and 4D-Var. The inner loop minimizes over vv, and the tangent linear and adjoint models are applied to UvUv and to U⊤U^\top of the adjoint result.
  • Multivariate balance. The balance operator in UU lets an observation of the wind correct the pressure and the opposite, without any explicit cross covariance (Derber and Bouttier 1999).
  • Hybrid ensemble-variational methods and 4D-EnVar. UU is extended with the ensemble perturbations, and the control vector gets one set of weights per member. Here UU is rectangular and the ensemble part of BB is singular, which the transform handles without change.

Variations

  • Symmetric square root. U=B1/2U = B^{1/2} is one choice, the Cholesky factor is another. Any UU with UU⊤=BUU^\top = B gives the same analysis, and the choice is made for cost of application, not for accuracy.
  • Rectangular factors. UU may be n×mn \times m with m>nm > n (several sources of covariance, as in hybrid methods) or m<nm < n (a reduced rank BB). The increments then lie in the range of UU.
  • Preconditioning with BB. A related method keeps the state variables and uses BB itself as the preconditioner of conjugate gradients. It needs products with BB but not a factor of it.
  • Second level preconditioning. If the observations are dense and accurate, μmax⁡\mu_{\max} is large and the transformed problem is still badly conditioned. Eigenvectors of the Hessian from an earlier minimization, computed by the Lanczos algorithm, are then used as a further preconditioner.

Pitfalls

  • U⊤U^\top not the exact transpose of UU. The gradient uses U⊤U^\top, so an error in it gives a wrong but plausible gradient. Check it with the dot product test ⟨Uv,w⟩=⟨v,U⊤w⟩\langle Uv, w \rangle = \langle v, U^\top w \rangle, as for an adjoint model.
  • Outer loops. With a nonlinear HH, each outer loop linearizes about a new guess, but the background term must stay relative to xbx^b. Keep vv as the total increment from xbx^b, and do not restart it from zero in each outer loop.
  • Balance relations where they do not hold. Geostrophic balance, the usual link between wind and mass, is weak near the equator, so a balance operator built on it must be relaxed there (a rule of thumb).
  • Expecting the transform to fix a bad BB. The transform makes the minimization faster and does not change the analysis. If the model of BB is wrong, the analysis is wrong in the same way.

Exercises

  1. Prove the push-through identity (I+C⊤R−1C)−1C⊤R−1=C⊤(R+CC⊤)−1(I + C^\top R^{-1} C)^{-1} C^\top R^{-1} = C^\top (R + CC^\top)^{-1} by multiplying both sides by (I+C⊤R−1C)(I + C^\top R^{-1} C) on the left and by (R+CC⊤)(R + CC^\top) on the right.
  2. For one observation, show that the Hessian in vv has the eigenvalue 1+HBH⊤/R1 + HBH^\top/R once and the eigenvalue 1 for all other directions, and that conjugate gradients stop after 2 steps at most.
  3. In the worked example, take U=B1/2U = B^{1/2} instead of the Cholesky factor, and check that Uv∗Uv^* gives the same increment (0.5,0.45)(0.5, 0.45).

References

  1. R. N. Bannister, A review of forecast error covariance statistics in atmospheric variational data assimilation. II, Modelling the forecast error covariance statistics, Quarterly Journal of the Royal Meteorological Society 134(637) (2008) 1971-1996, the control variable transform and its balance, vertical and horizontal parts
  2. D. F. Parrish and J. C. Derber, The National Meteorological Center's spectral statistical-interpolation analysis system, Monthly Weather Review 120(8) (1992) 1747-1763, the analysis variables and the background error covariance in spectral space
  3. J. Derber and F. Bouttier, A reformulation of the background error covariance in the ECMWF global data assimilation system, Tellus A 51(2) (1999) 195-221, the change of variables through balance operators in the ECMWF system

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW3 standard
  • five exercises