Fast interior point solution of quadratic programming problems arising from PDE-constrained optimization

Interior point methods provide an attractive class of approaches for solving linear, quadratic and nonlinear programming problems, due to their excellent efficiency and wide applicability. In this paper, we consider PDE-constrained optimization problems with bound constraints on the state and control variables, and their representation on the discrete level as quadratic programming problems. To tackle complex problems and achieve high accuracy in the solution, one is required to solve matrix systems of huge scale resulting from Newton iteration, and hence fast and robust methods for these systems are required. We present preconditioned iterative techniques for solving a number of these problems using Krylov subspace methods, considering in what circumstances one may predict rapid convergence of the solvers in theory, as well as the solutions observed from practical computations.


Introduction
We are concerned with optimization problems which involve partial differential equations. Problems of this type appear for example in numerous applications of optimal B John W. Pearson j.w.pearson@kent.ac.uk Jacek Gondzio j.gondzio@ed.ac.uk 1 control, where one wishes state variables to be close to a certain desired form and hopes to achieve it by an appropriate choice of control variables. Let Ω ⊂ R d , d ∈ {2, 3}, be a bounded open domain with sufficiently smooth boundary ∂Ω. An optimal control problem with constraints may be written as: where the state y and control u belong to appropriate function spaces Y and U , respectively. The objective J : Y × U → R and the constraints c : Y × U → Λ, where Λ is another function space, are assumed to satisfy certain smoothness conditions to guarantee the existence and uniqueness of the solution. Many real-life problems may be modelled as optimal control problems (1). There exists rich literature on the subject which addresses specific applications and provides theoretical background to such problems. The rigorous analysis of optimal control problems requires the use of nontrivial function spaces and involves sophisticated techniques from functional analysis. We refer the interested reader to excellent books on the subject [22,24,45], while for simplicity in this paper we assume that Y , U and Λ are all equal to L 2 (Ω).
The objective function J may take many different forms but it is often given as: which corresponds to balancing between two goals: keeping the state y close to a certain desired form y, and minimizing the "energy" of the applied control u. The constraints c in (1) involve some PDE operator(s), and restrict y and u to Ω and its boundary ∂Ω. Additionally they may include simple bounds on y and u. In Sect. 3 we will introduce two particular classes of optimal control problems: time-invariant and time-dependent PDE-constrained problems. Computational techniques for PDE-constrained optimal control problems involve a discretization of the underlying PDE. There are two options for doing this, and the typical paradigm in PDE-constrained optimization literature is for both approaches to solve the problem in a similar manner. The first is to apply an optimize-thendiscretize method, involving constructing continuous optimality conditions, and then discretizing these. However we find that this approach is inconvenient when examining the resulting discrete systems for the problems considered in this paper, specifically with regard to the reduction of the dimension of the system, as well as symmetry of the matrix involved. The alternative method, which we apply in this paper, is the discretizethen-optimize approach: here a discrete cost functional is constructed and discretized constraints are formulated. Then optimality conditions are derived for such (possibly huge) problems. Our motivation for using this approach originates from an observation that for a particular (quadratic) cost functional (2) the discretized PDE-constrained problem takes the form of a quadratic optimization problem for linear PDEs. The use of fine discretization leads to a substantial size of the resulting optimization problem. Therefore we will apply an interior point algorithm to solve it.
Interior point methods (IPMs) are very well-suited to solving quadratic optimization problems and they excel when sizes of problems grow large [17,52], which makes them perfect candidates for discretized PDE-constrained optimal control problems. The use of IPMs in PDE-constrained optimization is not new. There have been several developments which address theoretical aspects, including the functional analysis viewpoint, and study the convergence properties of an interior point algorithm [46,49,51], and many others which focus on the practical (computational) aspects. IPMs belong to a broad class of methods which rely on the use of Newton methods to compute optimizing directions. There have been several successful attempts to use Newton-based approaches in the PDE-constrained optimization context [4,5,25,28]. The main computational challenge in these approaches is the solution of the linear system which determines the Newton direction. For fine PDE discretizations such systems quickly get very large. Additionally, when IPMs are applied, the added interior point diagonal scaling matrices degrade the conditioning of such systems [17] and make them numerically challenging. Direct methods for sparse linear algebra [10] can handle the ill-conditioning well but struggle with excessive memory requirements when problems get larger. Inexact interior point methods [16,18,50] overcome this difficulty by employing iterative methods to solve the Newton equations.
Because of the unavoidable ill-conditioning of these equations the success of any iterative scheme for their solution depends on the ability to design efficient preconditioners which can improve spectral properties of linear systems. The development of such preconditioners is a very active research area. Preconditioners for IPMs in PDE-constrained optimization exploit the vast experience gathered for saddle point systems [2], but face an extra difficulty originating from the presence of IPM scaling. There have already been several successful attempts to design preconditioners for such systems, see [1,3,18] and the references therein.
In this paper, we propose a general methodology to design efficient preconditioners for such systems. Our approach is derived from the matching strategy originally developed for a particular Poisson control problem [37]. We adapt it to much more challenging circumstances of saddle point systems arising in IPMs applied to solve the PDE-constrained optimal control problems. We briefly comment on the enjoyable spectral properties of the preconditioned system, and provide computational results to demonstrate that they work well in practice.
This paper is structured as follows. In Sect. 2 we briefly recall a few basic facts about interior point methods for quadratic programming. In Sect. 3 we demonstrate how IPMs can be applied to PDE-constrained optimization problems. In Sect. 4 we introduce the preconditioners proposed for problems originating from optimal control. We consider separately two different cases of time-independent and time-dependent problems. In Sect. 5 we illustrate our findings with computational results and, finally, in Sect. 6 we give our conclusions.

Interior point methods for quadratic programming
Within this paper, we are interested in the solution of quadratic programming (QP) problems. In their most basic form, such problems may be written as We consider the case where A ∈ R m×n (m ≤ n) has full row rank, Q ∈ R n×n is positive semidefinite, x, c ∈ R n , and b ∈ R m . This formulation is frequently considered alongside its dual problem where z ∈ R n , and y ∈ R m . We note that a subset of this setup is that of linear programming (LP) problems, where Q = 0.
In this manuscript, we consider the solution of quadratic programming problems using interior point methods [17]. The nonnegativity constraints x ≥ 0 are "replaced" with the logarithmic barrier penalty function, and the Lagrangian associated with the barrier subproblem is formed: Differentiating L μ with respect to x and y and defining z j = μ/x j , ∀ j, gives the first order optimality conditions (or Karush-Kuhn-Tucker conditions): in which the standard complementarity condition for (3), that is x j z j = 0, ∀ j, is replaced with the perturbed complementarity condition x j z j = μ, ∀ j. IPMs drive the barrier term μ to zero and gradually reveal the activity of the primal variables x j and dual slacks z j . This is achieved by applying Newton's method to the system of (mildly) nonlinear equations (4) where δx, δy and δz denote Newton directions, ξ p , ξ d and ξ c denote primal and dual infeasibilities and the violation of complementarity conditions. X and Z denote diagonal matrices with elements of x and z spread on the diagonals, respectively. By eliminating δz, the Newton system (5) is further reduced to a saddle point form Since for any j = 1, 2, . . . , n at least one of the variables x j and z j reaches zero at optimality, the elements of the diagonal scaling matrix X −1 Z added to the (1, 1)-block may significantly differ in magnitude: some of them go to zero while the others go to infinity. This feature of IPMs [17] is a challenge for any linear equation solver applied to (6). We skip further details about IPMs and refer the interested reader to [17,52]. We also highlight that y in this description relates to a dual variable, whereas for PDEconstrained optimization the function y corresponds to a primal variable-we elect to use the standard notation within the respective fields. However, before moving on to PDE-constrained optimization, it is worth drawing the reader's attention to the fact that, although in (3) we assume only the one-sided bound x ≥ 0, IPMs can also be easily applied to variables with two-sided bounds: This requires introducing two nonnegative Lagrange multipliers associated with two inequalities. Later on we will denote them as z a and z b , respectively.

PDE-constrained optimization
We now wish to demonstrate how interior point methods may be applied to PDEconstrained optimization problems. These are a crucial class of problems which may be used to model a range of applications in science and industry, for example fluid flow, chemical and biological processes, shape optimization, imaging problems, and mathematical finance, to name but a few. However the problems are often of complex structure, and sophisticated techniques are frequently required to achieve accurate solutions for the models being considered. We recommend the works [22,45], which provide an excellent introduction to the field.
Let us first consider a time-independent linear PDE-constrained optimization problem with additional bound constraints: Here y, y, u denote the state, desired state and control variables, with L some PDE operator, and β a positive regularization parameter. The problem is solved on domain Ω (with boundary ∂Ω), for given functions f , y a , y b , u a , u b . We will now apply the discretize-then-optimize approach to (7), commencing with the construction of a Lagrangian on the discrete space. The alternative optimize-then-discretize method will guarantee an accurate solution of the continuous first order optimality conditions, however when applied in conjunction with interior point methods the resulting matrix systems are not necessarily symmetric, nor can they be reduced to such low dimensions for these problems as the matrix systems illustrated later in this section. For these reasons, we find it is advantageous to apply the discretize-thenoptimize approach for the interior point solution of PDE-constrained optimization problems-we highlight that this follows the approach used in important literature on the field such as [5,28]. Provided reasonable choices are made for the discretization of the problem, it is frequently observed that both methods lead to very similar behaviour in the solutions, and indeed this paradigm has recently been used to derive discretization schemes for PDE-constrained optimization (see [20], for instance).
We wish to construct a finite element discretization of the cost functional in (7): for the problems considered in this paper it is beneficial to use equal order finite elements for state and control variables, and observe that a discretized approximation of the cost functional is where y, u are the discretized versions of y, u.
with f, y a , y b , u a , u b the discrete versions of f , y a , y b , u a , u b . The matrix K depends on the PDE operator L considered: for example when a Poisson control problem (with L = −∇ 2 ) is examined, K denotes a finite element stiffness matrix with entries [K ] i j = Ω ∇φ i · ∇φ j dΩ. Alternatively for convection-diffusion control problems (with L = −ν∇ 2 + (w · ∇), and without stabilization applied within the solution method), K contains a sum of diffusion and convection terms with We observe that, using our equal order finite element method, the matrices M, K ∈ R N ×N , where N denotes the number of finite element nodes used, and furthermore that y, u ∈ R N .
It can be easily seen that the problem statement (8) is in the form of the quadratic programming problem (3), with It should be highlighted that, as there has been relatively little previous research on interior point methods for PDE-constrained optimization, there are a number of theoretical considerations that one should account for. As discussed in the paper [46], the majority of the theory available for primal-dual interior point methods is based on finite-dimensional mathematical programming, as opposed to the function space setting of optimal control problems. The authors then proceed to carry out a global and local convergence analysis in the L ∞ and L q (for q < ∞) settings. It is also important to note that the regularity properties of the optimal state and control are different, which as highlighted in [5] is a crucial feature of the continuous (infinite dimensional) problem which tends to be overlooked when moving to a discretized setting. It is essential to recognise the differences between the continuous formulations involving control constraints and state constraints [5,46], in particular the greater scope for a rigorous analysis of the control constrained problem, as well as the possibility of generating provably mesh-independent algorithms (including interior point methods) for problems with control constraints, in constrast to problems with state constraints [5]. As the main objective of this paper is to demonstrate the possibility of solving large scale linear systems that arise from interior point methods, we focus for the most part on the challenges faced on the discrete level, however it is crucial to also be aware of the issues present when examining the associated infinite dimensional problem, and in particular the implications of the discretization strategy employed.
In the next section we consider interior point methods for solving problems of structure (8), for a range of operators L and all β > 0. Although there has at this point been relatively little research into such strategies, we highlight that the paper [46] considers the numerical solution of problems of this type with control constraints only, and [1] derives effective preconditioners for large values of β and Ly = −∇ 2 y + y. We also point to the development of solvers of different forms to those presented in this paper: in [18] reduced-space preconditioners are considered for optimal control problems, and in [9] multigrid methods are discussed for a class of control problems.

Newton iteration
We now wish to derive the equations arising from a Newton iteration applied to the (nonlinear) problem (7). Let us define to be the discrete functional which we wish to minimize. Applying the discretized version of the PDE constraint, alongside a barrier function for the bound constraints as in the previous section, leads to the Lagrangian of which we wish to find the stationary point(s). Here λ denotes the discretized adjoint variable (or Lagrange multiplier), y j , y a, j , y b, j , u j , u a, j , u b, j denote the j-th entries of y, y a , y b , u, u a , u b , and μ is the barrier parameter used. Differentiating L μ with respect to y, u and λ gives the first order optimality conditions (or Karush-Kuhn-Tucker conditions): where the j-th entries of z y,a , z y,b , z u,a , z u,b are defined as follows: Note that, by construction, the following bound constraints apply for the Lagrange multipliers enforcing the constraints on y and u: Applying a Newton iteration to (9)- (12) gives, at each Newton step, Here, y * , u * , λ * , z * y,a , z * y,b , z * u,a , z * u,b denote the most recent Newton iterates for y, u, λ, z y,a , z y,b , z u,a , z u,b , with δy, δu, δλ, δz y,a , δz y,b , δz u,a , δz u,b the Newton updates, e defines the vector of ones of appropriate dimension, and • relates to the multiplication componentwise of two vectors.
In matrix form, (13)- (19) where Y , U , Z y,a , Z y,b , Z u,a , Z u,b are diagonal matrices, with the most recent iterates for y, u, z y,a , z y,b , z u,a , z u,b appearing on the diagonal entries. Similarly, the matrices Y a , Y b , U a , U b are diagonal matrices corresponding to y a , y b , u a , u b . Now, we may write that fourth, fifth, sixth and seventh rows lead to whereupon we may consider instead the solution of the reduced system where The conditions written in (24) are applied, alongside the imposition of (20)-(23), at each Newton iteration.
Note that, due to the fact that state and control bounds are enforced as strict inequalities at each Newton step, the diagonal matrices D y and D u are positive definite.
Of course, it is perfectly natural to consider a problem with only state constraints or only control constraints (or indeed only lower or upper bound constraints). For such cases we may follow exactly the same working to obtain a matrix system of the form (24), removing individual matrices corresponding to constraints that we do not apply.

Algorithm
We now present the structure of the interior point algorithm, adapted from the paper [17], that we apply to the problems considered in this paper. The essence of the method is to traverse the interior of the feasible region where solutions may arise-we do this by applying a relaxed Newton iteration, reducing the barrier parameter by a factor σ at each Newton step. Having computed the Newton updates δy, δu, δλ, δz y,a , δz y,b , δz u,a , δz u,b , we make a step in this direction that also guarantees that the strict bounds are enforced at each iteration. Upon convergence the iterates approach the true solution of the optimization problem, with the additional state and control constraints automatically satisfied.
Let us now consider appropriate stopping criteria for the method. Two natural requirements are for the norms of the primal and dual infeasibilities (at the k-th iteration) to be lower than some prescribed tolerances p , d , respectively. Additionally, we require the error in the complementarity products to fall below some specified tolerance c , and μ ≤ μ . We present the algorithm that we apply-its structure is similar to the algorithm outlined in [17,Section 2].
It is clear from the presentation of this method that the dominant computational work arises from the solution of the Newton system (24). It is therefore crucial to construct fast and robust solvers for this system, and this is what we focus on in Sect. 4.

Time-dependent problems
It is also important to be able to handle time-dependent problems using this methodology, due to the complexity and practical utility of such setups. To provide a brief

bound constraints on primal and dual variables hold
Compute error of complementarity products as in (27) Set iteration number k = k + 1 end illustration of how this may be accomplished, let us consider the time-dependent problem: The state, control and adjoint variables are now solved in a space-time domain Ω × (0, T ], with L the time-independent component of the PDE operator.
As in [35,44] for heat equation control problems, we may apply a discretize-thenoptimize approach, using the trapezoidal rule to approximate the integrals within the cost functional, and the backward Euler method to account for the time derivative. We thus rewrite the problem in the discrete setting as follows: Here the matrix where K corresponds to the time-independent part of the PDE operator, and τ denotes the (constant) time-step taken. The vectors y d,i relate to the values of y at the i-th timestep, and y 0 is the vector representation of y 0 . We denote by N t := T τ the number of time-steps taken.
We apply Newton iteration to the discrete optimality conditions, in an analogous way to the time-independent problem. This yields the matrix system with z y,a , z y,b , z u,a , z u,b the same as for the time-independent setting, except now measured over all points in space and time. Reducing (28) as for the time-independent case gives a block matrix system with D y , D u analogous to D y , D u , as defined in (25), (26), except with the quantities measured within the entire space-time domain.

Preconditioning for the Newton system
For the matrix systems considered in this paper, particularly those arising from timedependent problems, great care must be taken when seeking an appropriate scheme for obtaining an accurate solution. The dimensions of these systems mean that a direct method is often infeasible, so we find that the natural approach is to develop preconditioned Krylov subspace solvers. When seeking preconditioners for such methods, we exploit the fact that the matrix systems for the PDE-constrained optimization problems are of saddle point form: Here Φ ∈ R n×n , Ψ ∈ R m×n and Θ ∈ R m×m (with m ≤ n, as in Sect. 2). Further Φ and Θ are symmetric matrices, meaning that A is itself symmetric, and all of the matrices are sparse for the finite element method used. We recommend [2] for a thorough overview of saddle point systems and their numerical properties. The study of preconditioners for systems of this form is a well-established subject area: indeed it is known that two 'ideal' preconditioners are given by It can be shown [23,26,29] that the eigenvalues of the preconditioned systems are given by provided that these systems are invertible.
In practice, of course, one would not wish to invert Φ and S exactly within a preconditioner, so the main challenge is to devise effective approximations Φ and S which can be applied within a block diagonal or block triangular preconditioner of the form Such preconditioners are very often found to be extremely potent in practice, and in many cases one can prove their effectiveness as well (we discuss this further in Sect. 4.1). A major objective within the remainder of this paper is to develop effective representations of the (1, 1)-block Φ and Schur complement S for matrix systems arising from interior point solvers.

Time-independent problems
We now wish to apply saddle point theory to matrix systems arising from timeindependent problems. So consider the matrix system (24), for instance in the case where the matrix K arises from a Laplacian operator (considered for Poisson control) or convection-diffusion operator. This system is of saddle point form (30), with Let us consider approximating the (1, 1)-block and Schur complement of this matrix system. For this problem M is a positive definite matrix, with positive diagonal entries, and the same applies to K in the case of Poisson control problems. We now highlight that mass matrices may in fact be well approximated by their diagonal: for instance, in the case of Q1 mass matrices on a uniform two dimensional domain, the eigenvalues of [diag(M)] −1 M are all contained within the interval [ 1 4 , 9 4 ] (see [47]). As D y and D u are diagonal and positive definite, one option for approximating Φ is hence to take The effectiveness of the approximation may be measured in some sense by the eigenvalues of Φ −1 Φ, which may themselves be determined by the Rayleigh quotient , v 2 vectors of appropriate length, and λ min , λ max denote the smallest and largest eigenvalues of a matrix. We therefore see that if [diag(M)] −1 M is well-conditioned, then the same is true of Φ −1 Φ.
As an alternative for our approximation Φ, one may apply a Chebyshev semiiteration method [14,15,48] to approximate the inverses of M + D y and β M + D u . This is a slightly more expensive process to approximate this component of the entire system (in general the matrices with the most complex structure are K and K ), however due to the tight clustering of the eigenvalues of [diag(Φ)] −1 Φ we find greater accuracy in the results obtained.
The main task at this stage is to approximate the Schur complement The aim is to build an approximation such that the eigenvalues of the preconditioned Schur complement are tightly clustered. We motivate our approximation based on a 'matching' strategy originally derived in [37] for the Poisson control problem without bound constraints: for this particular problem, K is the finite element stiffness matrix, and the matrices D y = D u = 0. It was shown that by 'capturing' both terms (K M −1 K and 1 β M) of the Schur complement, one obtains the result independently of problem size, as well as the value of β. Furthermore, it is possible to prove a lower bound of the preconditioned Schur complement for a very general matrix form, as demonstrated below.

Theorem 1 Let S G and S G be the general matrices
which we assume to be invertible, and with realX,Ȳ . Then the eigenvalues of S −1 G S G are real, and satisfy λ ≥ 1 2 . Proof As S G and S G are invertible, they are symmetric positive definite by constuction. To examine the spectrum of S −1 G S G we therefore consider the Rayleigh quotient (for real v = 0): which is itself clearly real. By the invertibility of S G and S G , both numerator and denominator are positive. Therefore which gives the result.
For the Schur complement given by (33), the matricesX = K (M + D y ) −1/2 and Y = M(β M + D u ) −1/2 , which we use below to derive our approximation. Note that to demonstrate an upper bound for this problem, one would write provided v / ∈ ker(K ). We may therefore draw the following conclusions: -The Rayleigh quotient R is certainly finite, as the case χ + ω = 0 is disallowed by the assumption of invertibility of S G . -Furthermore, depending on the (typically unknown) entries of D y , the term v K (M + D y ) −1 K v should be large compared with the term v M(β M + D u ) −1/2 (M + D y ) −1/2 K v arising in the denominator above, due to the fact that K has larger eigenvalues than M in general. The term being minimized in (35) will therefore not take a large negative value in general, and hence R will not become excessively large. -However, it is generally not possible to demonstrate a concrete upper bound unless X andȲ have structures which can be exploited. The reason for this is that the diagonal matrices D y and D u that determine the distribution of the eigenvalues can take any positive value (including arbitrarily small or infinitely large values, in finite precision), depending on the behaviour of the Newton iterates, which is impossible to control. In practice, we find it is rare for the largest eigenvalues of the preconditioned Schur complement to exceed values of roughly 5 − 10. -However, using the methodology of Theorem 1, results of this form have been demonstrated for problems such as convection-diffusion control [36] and heat equation control [35] (without additional bound constraints). We also highlight that, in [39,42], preconditioners for problems with bound constraints 1 , solved with active set Newton methods, are derived. In [39], parameter-independent bounds are derived for a preconditioned Schur complement, however the additional requirement is imposed that M is a lumped (i.e. diagonal) mass matrix. As we do not assume that the mass matrices are lumped in this work, we may not exploit this method to obtain an upper eigenvalue bound. -In general, the eigenvalues of S −1 G S G are better clustered if the termXȲ +ȲX is positive semi-definite, or 'nearly' positive semi-definite. The worst case would arise in the setting where χ ≈ −ω, however for our problem the matricesX andȲ do not relate closely to each other as the activities in the state and control variables do not share many common features.
We now provide an indicative result for the situation which corresponds to the limiting case when the barrier parameter μ → 0 and all state and control bounds are satisfied as strict inequalities, i.e. all bounds remain inactive at the optimum. In such a case all Lagrange multipliers z y,a , z y,b , z u,a and z u,b would take small values of order μ and so would the diagonal matrices D y and D u defined by (25) and (26), respectively. In the limit we would observe D y = 0 and D u = 0. Lemma 1 If D y = D u = 0, and the matrix K + K is positive semi-definite 2 , then the eigenvalues of S −1 G S G satisfy λ ≤ 1.
Proof From the above working, we have that using the assumption that D y = D u = 0. The denominator of the quotient above is clearly positive, due to the positive definiteness of M, and the numerator is non-negative by the assumption of positive semi-definiteness of K + K . This automatically leads to the statement R ≤ 1, and hence the result.
The 'matching strategy' presented here guarantees a lower bound for the preconditioned Schur complement of matrices of this form, provided some very weak assumptions hold 3 , and often results in the largest eigenvalue being of moderate magnitude. We therefore wish to make use of this matching approach to generate effective Schur complement approximations for the very general class of matrix systems considered in this manuscript. In particular, we consider matrices K of general form (as opposed to the stiffness matrix as in (34)), as well as diagonal matrices D y and D u which can be extremely ill-conditioned. Motivated by Theorem 1, we may therefore consider a matching strategy for the Schur complement (33), by writing where M 1 is chosen such that the matrix M 1 (M + D y ) −1 M 1 captures the second term of the exact Schur complement (33). That is, This leads to the following requirement when selecting M 1 : We take diagonal approximations where appropriate, in order to avoid having to construct square roots of matrices, which would be extremely expensive computationally. That is, we take We now present a result concerning this choice for M 1 . (33) is approximated by S 1 , and with M 1 given by (37), then, provided K + M 1 is invertible, the eigenvalues of S −1 1 S satisfy

Lemma 2 When the Schur complement
In other words the eigenvalues are bounded below by a fixed constant, depending only on the finite element discretization used.
Proof Selecting M 1 as in (37) gives that the eigenvalues of S −1 1 S are determined by the Rayleigh quotient where for this problem the vectors of interest are As the numerator and denominator both consist of positive quantities, using the assumption that K + M 1 is invertible, with the possible exception of χ χ which may be zero, we can state that We then observe that the quotient ω ω γ γ can be decomposed as Now, it may be easily shown that using the working earlier in this section. Combining these bounds gives the desired result.
Clearly, it is valuable to have this insight that using our approximation M 1 retains the parameter independence of the lower bound for the eigenvalues of S −1 1 S. We note that this can potentially be a weak bound, as the large diagonal entries in D y and D u are likely to dominate the behaviour of M + D y and β M + D u , thus driving the eigenvalues of the preconditioned Schur complement closer to 1.
We highlight that, in practice, one may also approximate the inverses of K + M 1 and its transpose effectively using a multigrid process. We apply the Aggregation-based Algebraic Multigrid (AGMG) software [30][31][32][33] for this purpose within our iterative solvers.
Combining our approximations of Φ and S, we propose the following block diagonal preconditioner of the form (31): where (M + D y ) approx , (β M + D u ) approx indicate our choice of approximations for M + D y , β M + D u (i.e. diagonal approximation, or Chebyshev semi-iteration method), and S 1 is given by (36). This preconditioner is symmetric positive definite, and may thus be applied within a symmetric solver such as Minres [34]. It is useful to consider the distribution of eigenvalues of the preconditioned system, as this will control the convergence properties of the Minres method. The fundamental result we use for our analysis of saddle point matrices (30) is stated below [40, Lemma 2.1].

Theorem 2
If Φ is symmetric positive definite, Ψ is full rank, and Θ = 0, the eigenvalues of A are contained within the following intervals: where μ max , μ min denote the largest and smallest eigenvalues of Φ, with σ max , σ min the largest and smallest singular values of Ψ .
We now wish to apply a result of this form to the preconditioned system. The preconditioned matrix, when a general block diagonal preconditioner of the form (31) is used, is given by Now, to analyse the properties of this system, let where φ min , s min > 0. The analysis of this section gives us information about these values. By the similarity property of matrix systems (using that for our problem Φ and S are positive definite) the eigenvalues will be the same as those of , wherev = Ψ v, enables us to pin the singular values of the (2, 1)-block within √ φ min s min , √ φ max s max .
So, using Theorem 2, the eigenvalues of P −1 A are contained within the interval stated below.

Lemma 3
If Φ and S are symmetric positive definite, and the above bounds on λ( Φ −1 Φ) and λ( S −1 S) hold, then the eigenvalues of P −1 A satisfy It is therefore clear that, for our problem, a good approximation of the Schur complement will guarantee clustered eigenvalues of the preconditioned system, and therefore rapid convergence of the Minres method. As we have observed for our problem, the quantities of interest are therefore the largest eigenvalues of S −1 S, which can vary at every step of a Newton method.
We now present a straightforward result concerning the eigenvectors of a preconditioned saddle point system of the form under consideration.

Proposition 1 Consider an eigenvalue λ that satisfies
with Φ, S = Ψ Φ −1 Ψ , Φ, S symmetric positive definite. Then either λ is an eigenvalue of Φ −1 Φ, or λ, v 1 and v 2 satisfy Proof Equation (38) is equivalent to Let us first consider the case where Ψ v 1 = 0 (there are at most n − m such linearly independent vectors that correspond to eigenvectors). Then (40) tells us that v 2 = 0, from which we conclude from (39) that (λ Φ − Φ)v 1 = 0. Therefore, in this case, the eigenvalues are given by eigenvalues of Φ −1 Φ, with eigenvectors of the form v 1 , 0 -there are at most n − m such solutions.
which we may substitute into (39) to obtain This may be trivially rearranged to obtain the required result.
We observe that the eigenvalues and eigenvectors of the (1, 1)-block and Schur complement (along with their approximations) interact strongly with each other. This decreases the likelihood of many extreme eigenvalues of S −1 S arising in practice, as this would have implications on the numerical properties of Φ and Ψ (which for our problems do not interact at all strongly). However the working provided here shows that this is very difficult to prove rigorously, due to the wide generality of the saddle point systems being examined-we must also rely on the physical properties of the PDE operators within the optimization framework. Our numerical experiments of Sect. 5 indicate that the eigenvalues of S −1 S, and therefore the preconditioned system, are tightly clustered, matching some of the observations made in this section.
As an alternative to the block diagonal preconditioner P 1 , we may take account of information on the block lower triangular parts of the matrix system, and apply the block triangular preconditioner within a non-symmetric solver such as Gmres [41]. It is possible to carry out eigenvalue analysis for the block triangular preconditioner P 2 in the same way as for the block diagonal preconditioner P 1 . However it is well known that the convergence of non-symmetric solvers such as Gmres does not solely depend on the eigenvalues of the preconditioned system, and therefore such an analysis would be less useful in practice.
We now consider a completely different strategy for preconditioning the matrix system. We may first rearrange (24) to the form ⎡ The matrix within (41) is a saddle point system of the form (30), with This approach also has the desirable feature that the (1, 1)-block Φ can be inverted almost precisely, as all that is required is a method for approximating the inverse of a mass matrix (to be applied twice). Once again, a very cheap and accurate method is Chebyshev semi-iteration [14,15,48], so we apply this strategy within our preconditioner.
Once again, the main challenge is to approximate the Schur complement: Let us consider a 'matching' strategy once again, and write for our approximation: where M 2 is selected to incorporate the second term of S, i.e.
which may be achieved if For a practical preconditioner, we in fact select To approximate K + M 2 and K + M 2 in practice, we again make use of the AGMG software to apply a multigrid process to the relevant matrices within S 2 .
One may therefore build a block triangular preconditioner for the permuted system (41), of the form P T in (31). Rearranging the matrix system (and hence the preconditioner) to the form (24), we are therefore able to construct the following preconditioner for (24): where M cheb relates to a Chebyshev semi-iteration process for the mass matrix M. We notice that this relates to observations made on nullspace preconditioners for saddle point systems in [38]. It is clear that to apply the preconditioner P 3 , we require a non-symmetric solver such as Gmres, as it is not possible to construct a positive definite preconditioner with this rearrangement of the matrix system. Within such a solver, a key positive property of this strategy is that we may approximate Φ almost perfectly (and cheaply), and may apply K exactly within P 3 without a matrix inversion. An associated disadvantage is that our approximation of S is more expensive to apply than the approximation S 1 used within the preconditioners P 1 and P 2 -whereas Theorem 1 may again be applied 4 to verify a lower bound for the eigenvalues of the preconditioned Schur complement, the values of the largest eigenvalues are frequently found to be higher than for the Schur complement approximation S 1 described earlier.

Time-dependent problems
Due to the huge dimensions of the matrix systems arising from time-dependent PDEconstrained optimization problems, it is very important to consider preconditioners for the resulting systems, which are of the form (29). These are again of saddle point type (30), with As for the time-independent case we may approximate Φ using diagonal solves or the Chebyshev semi-iteration method applied to the matrices from each time-step.
To approximate the Schur complement of (29), we again apply a matching strategy to obtain This in turn motivates the choice and we require two multigrid processes per time-step to apply S −1 1,T efficiently. Combining our approximations of (1, 1)-block and Schur complement, we may apply within Minres, for example, or within a nonsymmetric solver such as Gmres.
Alternatively, in complete analogy to the time-independent setting, one could rearrange the matrix system such that the (1, 1)-block may be approximated accurately, and select the preconditioner Inverting M cheb requires the application of Chebyshev semi-iteration to N t mass matrices M, and the Schur complement approximation is given by Similar eigenvalue results can be shown for the Schur complement approximation S 1,T as for the approximations used in the time-independent case.

Remark 1
We highlight that a class of methods which is frequently utilized when solving PDE-constrained optimization problems, aside from the iterative methods discussed in this paper, is that of multigrid. We recommend [8] for an overview of such methods for PDE-constrained optimization, [7] for a convergence analysis of multigrid applied to these problems, [20,21] for schemes derived for solving flow control problems, and [6] for a method tailored to problems with additional bound constraints. These solvers require the careful construction of prolongation/restriction operators, as well as smoothing methods, tailored to the precise problem at hand. Applying multigrid to the entire coupled matrix systems resulting from the problems considered in this paper, as opposed to employing this technology to solve sub-blocks of the system within an iterative method, also has the potential to be a powerful approach for solving problems with bound constraints. Similar multigrid methods have previously been applied to the interior point solution of PDE-constrained optimization problems in one article [9], and we believe that a carefully tailored scheme could be a viable alternative when solving at least some of the numerical examples considered in Sect. 5.

Alternative problem formulations
We have sought to illustrate our interior point solvers, and in particular the preconditioned iterative methods for the solution of the associated Newton systems, using quadratic tracking functionals with a quadratic cost for the control, as in (2). We now wish to briefly outline some of the possible extensions to this problem that we believe we could apply our method to, as below: -Boundary control problems Our methodology could be readily extended to problems where the control (or state) variable is regularized on the boundary only within the cost functional, for instance where For such problems, we would need to take account of boundary mass matrices within the saddle point system that arises, however preconditioners have previously been designed for such problems that take into account these features (see [35], for instance). -Control variable regularized on a subdomain Analogously, problems may be considered using our preconditioning approach where the cost functional is of the form where Ω 1 ⊂ Ω. The matching strategy of Sect. 4.1 may be modified to account for the matrices of differing structures. -Alternative regularizations A further possibility is for the control (or state) variable to be regularized using a different term, for instance an H 1 regularization term of the following form: Upon discretization, stiffness matrices arise within the (1, 1)-block in addition to mass matrices, however the preconditioning method introduced in this paper may still be applied, by accounting for the new matrices within the matching strategy for the Schur complement. -Time-dependent problems Finally, we highlight that modifications to the cost functional considered for time-dependent problems in Sect. 3.3 may be made. For instance, one may measure the control (or state) variables at the final time only, that is On the discrete level, this will lead to mass matrices being removed from portions of the (1, 1)-block, and this information may be built into new preconditioners [35,44].
We emphasize that there are some examples of cost functional, for instance a functional where a curl function is applied to state or control, or one which includes terms of the form max{0, det(∇ y)} (see [19]), where the preconditioning approach presented here would not be directly applicable. As PDE-constrained optimization problems are widespread and varied in type, much useful further work could be carried out on extending the method presented in this paper to more diverse classes of optimization problems.

Numerical experiments
Having motivated our numerical methods for the solution of the problems considered, we now wish to test our solvers on a range of examples. These test problems are of both time-independent and time-dependent form, and are solved on a desktop with a quad-core 3.2GHz processor. For each test problem, we discretize the state, control and adjoint variables using Q1 finite elements. Within the interior point method, the value of the barrier reduction parameter σ is set to be 0.1, with α 0 = 0.995, and p = d = c = 10 −6 . To solve the Newton systems arising from the interior point method, we use the Ifiss software package [11,43] to construct the relevant finite element matrices. When the symmetric block diagonal preconditioner P 1 is used, we solve the Newton systems using the Minres algorithm to a relative preconditioned residual norm tolerance of 10 −8 , and the Chebyshev semi-iteration method to approximate the inverse of the (1, 1)-block (apart from within one experiment where we use a diagonal approximation), as well as the AGMG method to approximate the inverse Schur complement. Where the block triangular preconditioners P 2 and P 3 are applied, we solve the Newton systems with the preconditioned Gmres method to a tolerance of 10 −8 ; we apply 20 steps of Chebyshev semi-iteration to approximate the (1, 1)block, and once again utilize AGMG for the Schur complement approximations. We highlight that it would be feasible to relax the tolerances for Minres and Gmres in order to lower the overall CPU time for the interior point scheme [16], however we elect to solve the matrix systems relatively accurately in order to fully demonstrate the potency of our preconditioned iterative methods. All results are computed using Matlab R2015a.

Control constrained problems
The first experiments we carry out involve a Poisson control problem, with L = −∇ 2 applied on Ω := [0, 1] 2 , y = 0 on the boundary of Ω, and the desired state given by y = e −64 (x 1 −0.5) 2 +(x 2 −0.5) 2 , where the spatial coordinates x = [x 1 , x 2 ] . We solve this problem using the Minres algorithm with preconditioner P 1 , using both the Chebyshev semi-iteration method and the matrix diagonal to approximate the (1, 1)-block within the preconditioner. The results obtained are shown in Table 1, for a range of mesh-sizes h and regularization parameters β. A solution plot for β = 10 −2 is also shown in Fig. 1. We select box constraints for the control variable only, based on the value of β used and the behaviour of the optimal control problem when no bound constraints are imposed-we are careful to make sure that the constraints are sensible physically, but also challenging for our interior point solver. The constraints taken for each value of β are stated in Table 1.
It is worth pointing out that increasing the accuracy of discretization (decreasing h by a factor of 2) typically adds about one extra interior point iteration, which once again demonstrates that interior point methods are not very sensitive to the problem dimension (as discussed in [17], for instance). We find that both the number of iterations of the interior point method, and the average number of Minres iterations per interior point (Newton) step, are very reasonable for the problem considered. Whereas we observe an increase in iterative steps for the more challenging case of smaller β, all numbers are low, in particular the very encouraging iteration counts for moderate regularization parameters. We also find that, as one might expect, the computational cheapness of a diagonal approximation of the (1, 1)-block is counteracted by the higher Minres iteration numbers that result.
Problems with state constraints We next examine a Poisson control problem involving state constraints, where y = sin(π x 1 ) sin(π x 2 ), and y = y on the boundary of Ω. We apply the preconditioners P 2 (with Chebyshev semi-iteration used to approximate the (1, 1)-block) and P 3 , and solve using Gmres to a tolerance of 10 −8 for a range of h and β. Again the results, which are presented in Table 2, are very promising when Table 1 Results for the Poisson control example with control constraints, for a range of values of h and β, and preconditioner either preconditioner is used, and a large degree of robustness is achieved despite the very general matrix systems which can arise at each interior point iteration. We highlight that the iteration counts are likely to vary depending on how severe the box constraints that we impose are, as the structure of the matrices can change drastically. In Table 3 we present results for this problem (for β = 10 −2 ) with preconditioners P 1 , P 2 and P 3 -we observe in particular that the CPU times scale in an approximately linear fashion with the dimension of the matrix systems being solved.
In order to illustrate the potential of our solvers to handle PDE constraints of varying forms, in Table 4 we present results where the PDE constraint is an indefinite Helmholtz equation, that is Ly = −∇ 2 y − k 2 y for a given (positive) parameter k. We highlight that the forward Helmholtz equation itself is a notoriously difficult problem to solve numerically [12], and a great deal of research has been undertaken concerning the preconditioning of such systems (we recommend [13] for a discussion of shifted Laplacian preconditioners for these problems). We therefore emphasize that, given the challenges involved and the inherent indefiniteness of the problem, it is extremely difficult to obtain completely robust solvers, and much future research could be undertaken in this area. However the results obtained indicate that, at least for some test problems, the interior point method presented can be applied for a range of parameter setups. Presented are the number of interior point iterations required to achieve convergence (italic, left), and average number of Gmres steps needed (plain text, right). Results are given when the preconditioners P 2 (top) and P 3 (bottom) are used Both state and control constraints In Table 5 we investigate a problem of convectiondiffusion control type, with L = −0.01∇ 2 + − 1 · ∇, and y = e −64 (x 1 −0.5) 2 +(x 2 −0.5) 2 . We now impose both state and control constraints (as spec-     ified for each value of β), and test the preconditioners P 2 and P 3 using Gmres. We also present a solution plot for β = 10 −2 in Fig. 2. For convection-diffusion control problems such as this, we find there is a great advantage in applying the preconditioner P 3 over the preconditioner P 2 , due in part to the accurate approximation of the (1, 1)-block within it. Indeed this is demonstrated by the numbers of Gmres iterations required, which are much lower when using the preconditioner P 3 , especially for the final interior point iterations when convergence is close to being achieved. The Gmres solver with P 3 demonstrates excellent robustness considering the complexity of the problem.
3D test problems It is also important to emphasize that the methodology presented in this work can be readily applied to three dimensional test problems-indeed these are problems for which it is generally accepted that preconditioned iterative methods are essential, as the huge computer storage requirements associated with such problems ensure that direct methods are out of reach. We therefore experiment using a Poisson control problem applied on the domain Ω := [0, 1] 3 , with desired state y = e −64 (x 1 −0.5) 2 +(x 2 −0.5) 2 +(x 3 −0.5) 2 and spatial coordinates x = [x 1 , x 2 , x 3 ] . We present numerical results in Table 6, demonstrating that, as for two dimensional Table 6 Results for the three dimensional Poisson control example with control constraints, for a range of values of h and β, and preconditioner   problems, rapid convergence is achieved with robustness in problem size and regularization parameter.

Time-dependent PDE constraints
To demonstrate that our solvers are also able to handle matrix systems of vast dimension arising from time-dependent PDE-constrained optimization problems, we present results in Table 7 for a heat equation control problem, with the PDE constraint given by y t − ∇ 2 y = u (for t ∈ (0, 1]), and with additional control constraints imposed. The number of interior point iterations, and average Minres iteration count when P 1,T is applied, are provided for a range of h and β. As mentioned earlier, the backward Euler method is used for the time discretization, and values of τ = 0.04, 0.02 and 0.01 are tested for the time-step (in other words with 25, 50 and 100 time intervals). In Table 8, we present results obtained for the same problem using block triangular preconditioner P 2,T with Gmres. We once again observe a high degree of robustness in problem size (whether increased by refining  Presented are the number of interior point iterations required to achieve convergence (italic, left), and average number of Gmres steps needed (plain text, right)

Table 9
Results for the wave equation example with control constraints, for a range of values of h, τ , and Presented are the average number of Minres (with preconditioner P 1,T ) and Gmres (with preconditioner P 2,T ) iterations required to solve the Newton systems obtained the mesh in the spatial coordinates, or by decreasing the time-step) and regularization parameter. Our final investigation involves the optimal control of the wave equation, which is the same problem as above, except with the PDE operator y tt − ∇ 2 y = u and with an initial condition imposed on y t (which we set to be zero). The recent work [27] derives an implicit scheme for this problem, which involves averaging the Laplacian term in the PDE operator. Within the matrix K, this leads to discrete approximations of the operator I − τ 2 2 ∇ 2 on the block diagonal entries, as well as additional entries on the two blocks below the diagonal (corresponding to the operators −2I and I − τ 2 2 ∇ 2 , respectively). The method is designed to be unconditionally convergent, while also removing the requirement of a Courant-Friedrichs-Lewy (CFL) condition of the form τ ≤ h [27]. We investigate the potency of our preconditioners for this matrix system. In Table 9, we present the average number of Minres or Gmres iterations required to solve the systems arising from the interior point method. Although there is a larger variation in the number of steps required, due to the additional terms within the matrix system, the performance of the method is very encouraging considering the high complexity of the problem. We emphasize once again that the performance of the method is dependent somewhat on the severity of the box constraints imposed, however the numerical results obtained for a range of time-independent and time-dependent PDEconstrained optimization problems demonstrate the potency of the solvers presented in this manuscript.

Concluding remarks
In this paper we have presented a practical method for the interior point solution of a number of PDE-constrained optimization problems with state and control constraints, by reformulating the minimization of the discretized system as a quadratic programming problem. Having outlined the structure of the algorithm for solving these problems, we derived fast and feasible preconditioned iterative methods for solving the resulting Newton systems, which is the dominant portion of the algorithm in terms of computational work. Encouraging numerical results indicate the effectiveness and utility of our approach.
The problems we considered involved Poisson control, heat equation control, and both steady and time-dependent convection-diffusion control. A natural extension of this work would be to consider the control of systems of PDEs, for instance Stokes control and other problems in fluid flow, as well as the control of nonlinear PDEs, which arises in a wide range of practical scientific applications. The latter task would be accomplished by reformulating the discretization as a nonlinear programming problem-the robust solution of such formulations is a substantial challenge within the optimization community, but would represent significant progress in tackling realworld optimal control problems.