Homogeneous Formulation of Convex Quadratic Programs for Infeasibility Detection
Abstract
Convex Quadratic Programs (QPs) have come to play a central role in the computation of control action for constrained dynamical systems. In this paper, we present a novel Homogeneous QP (HQP) formulation which is obtained by embedding the original QP in a larger space. The key properties of the HQP are: (i) is always feasible, (ii) an optimal solution to QP can be readily obtained from a solution to HQP, and (iii) infeasibility of QP corresponds to a particular solution of HQP. An immediate consequence is that all the existing algorithms for QP are now also capable of robustly detecting infeasibility. In particular, we present an Infeasible Interior Point Method (IIPM) for the HQP and show polynomial iteration complexity when applied to HQP. A key distinction with prior IPM approaches is that we do not need to solve second-order cone programs. Numerical experiments on the formulation are provided using existing codes.
1 Introduction
Optimization algorithms are widely used in the control for constrained dynamic systems. In particular, the solution of convex Quadratic Programs (QPs) is a key ingredient of optimization algorithms. Convex QPs arise for example in the Model Predictive Control of linear systems, switched linear systems and nonlinear systems [1, 2]. The past two decades have witnessed the development of a number of algorithms for the solution of convex QPs arising in the context of optimization-based control. Initial work on QP algorithms were based on solving a system of equations representing the optimality conditions such as Interior Point Method (IPM) for QP [3], active-set methods [4, 5] and more recently, IPM for Second Order Cone Programs (SOCPs) [6]. In the last decade there has been interest in the development of first-order approaches such as gradient projection [7], dual gradient projection [8, 9], and splitting methods [10, 11, 12, 13] and iterative second-order approaches [14]. Recently, there has been work on employing these methods within Branch & Bound (B&B) algorithms for the solution of Mixed Integer Quadratic Programs (MIQPs) that arise in MPC for switched systems [15, 16, 17, 18].
A critical feature required of QP solvers for real-time applications is the ability to detect infeasibility and provide a graceful handling of the same. Infeasibility handling increases in importance when solving MIQPs in a B&B setting as it is expected that QPs resulting from the fixing of a subset of binary variables will likely be infeasible. Detecting such infeasible QPs and pruning the search tree in B&B is essential for computational efficiency of the MIQP solver.
Infeasibility of a QP is determined by the identification of a ray that is feasible for the dual and makes the dual objective unbounded. First-order primal-dual algorithms are capable of detecting infeasibility. Recent results on detecting infeasibility using first-order algorithms include [19, 20, 21]. A dual QP formulation, if it can be constructed explicitly, will allow the determination of a ray of infeasibility. However, such an explicit dual construction requires strong convexity of the QP. Active-set methods typically employ a feasibility phase to first determine a feasible point and then proceed to an optimization phase which produces the optimal solution. Failure of the feasibility phase allows to pronounce a QP as being infeasible [22]. The work performed in this phase is identical to that required for the optimization phase. When employing inexact linear algebra the first-phase is typically not employed and as a consequence the ability of such approaches to certify infeasibility is not clear. IPM algorithms, on the other hand, are not all capable of producing a certificate of infeasibility [23, 24]. IPMs based on Homogeneous Self-Dual (HSD) embedding [25, 26] are known to produce a certificate of infeasibility for Linear Programs (LPs). This technique has been implemented in MOSEK [27] and has also been extended to handle SOCPs. To detect infeasible QPs with IPMs, the QPs must first be formulated as a SOCP to which the HSD embedding is then applied. The ECOS solver [6] does exactly this for the solution of QPs arising in MPC and can detect infeasibility.
We present a novel embedding of the QP into a space that is one dimension higher. The embedding is produced by introducing an additional variable that is nonnegative and multiplies the affine terms in the objective and constraints. The objective contribution from the introduced variable is determined so the resulting Homogeneous Quadratic Program (HQP) satisfies the following properties: (i) HQP is always feasible, (ii) an optimal solution to the QP can always be recovered from the optimal solution to the HQP if the introduced variable is positive; and (iii) QP can be certified to be infeasible if the introduced variable is zero. More importantly, the HQP formulation can be presented to any QP solver to determine the optimal solution or infer infeasibility in a robust manner.
In this paper, we focus on applying an Infeasible IPM (IIPM) to solve the HQP. We are able to derive polynomial complexity of a standard IIPM when applied to HQP by adapting the analysis of IIPM for linear programs [23, Chapter 6]. Thus, we have an IIPM with polynomial iteration complexity for inferring optimality or infeasibility of QP without having to solve SOCPs.
The paper is organized as follows. §2 presents the QP and the assumptions. §3 presents the embedding of QP into a HQP and shows the equivalence of the formulations. An IIPM for solving HQP and the polynomial iteration complexity are described in §4. We present results in §5 when using the HQP formulation with IPOPT. Conclusions and directions for future work are provided in §6.
Notation. The set of reals is denoted by and the set of vectors of dimension by . The set of symmetric matrices is denoted by . For a matrix , the notation denotes that A is positive semidefinite (definite). Given a vector , denotes a diagonal matrix with the elements of the vector on the diagonal. The notation denotes the identity matrix of size .
2 Problem Formulation
Consider the QP in the form
(1a) | ||||
s.t. | (1b) | |||
(1c) |
where , , , and . Note that any QP formulation with finite lower or upper bound on each of the variables can be put into the form in (1) through a linear transformation of variables.
We make the following assumptions on QP (1).
Assumption 1.
The matrix has full row rank of .
Assumption 2.
The matrix where is an orthonormal basis for the null-space of , i.e. is a basis for .
Assumption 1 is not restrictive and can be easily satisfied by removing dependent rows if necessary. Assumption 2 requires that be positive definite when projected onto . This assumption readily holds for MPC formulations [19] and also for certain spectral relaxations of nonconvex MIQPs [28, 29]. Assumption 2 implies that the optimal solution to QP (1) is unique whenever QP (1) is feasible. Note that the assumptions do not preclude the infeasibility of QP (1). The basis is typically computed using a QR factorization of [30].
We conclude this section with a statement of the conditions for optimality and infeasibility of QP (1).
3 Homogeneous QP Formulation
Consider embedding QP (1) into a Homogeneous Quadratic Program (HQP) as
(4a) | ||||
s.t. | (4b) | |||
(4c) |
where is an additional nonnegative variable and is a parameter. Observe that the objective (4a) is obtained by multiplying the linear term in (1a) with and appending with the term . The equality constraints (4b) is obtained by multiplying the right-hand side of (1b) with . §3.1 provides conditions on that ensures HQP is convex. §3.2 shows how the parameter can be computed efficiently. Finally, §3.3 shows that solving HQP allows to recover a solution to QP or declare infeasibility.
3.1 Conditions on
The parameter is chosen to satisfy two conditions:
- 1.
-
2.
is chosen large enough so that
(8) where is a basis for the null space of (4b). Such a basis can be obtained as ,
(9) where .
The satisfaction of (8) implies that:
- 1.
-
2.
HQP (4) is convex and the first-order optimality conditions are necessary and sufficient for a minimizer.
3.2 Computing
We will now address the computation of satisfying (8).
Proof.
Remark 1.
It is not necessary to compute explicitly. Since it is sufficient to choose
(13) |
in order to satisfy (8).
Remark 2.
Further, it is not necessary to compute . It is sufficient to have a nontrivial lower bound estimate of . For example, if (as in MPC applications) then . In the context of MIQPs with binary variables, QPs (1) are solved at each node of the B&B tree. The QP solved at the child node is a result of fixing a binary variable to or . Let us suppose that in the child node the first variable index is fixed to 0 or 1. Then
Hence, the lower bound estimate available at the parent node serves as a valid lower bound estimate for smallest eigenvalue of the reduced Hessian at the child node. If then the choice of
(14) |
ensures satisfaction of (8).
3.3 Equivalence between QP and HQP
We collect some simple observations on the HQP (4).
- (O1)
-
(O2)
HQP (4) has an optimal solution with optimal value less than or equal to . This follows directly from (O1).
- (O3)
We now state the first-order optimality conditions for HQP (4).
A point minimizes HQP (4) if there exist multipliers satisfying the first-order optimality conditions
(15a) | ||||
(15b) | ||||
(15c) | ||||
(15d) | ||||
(15e) |
Theorem 1.
Proof.
Consider the if part. Let be an optimal solution of HQP (4) and let be multipliers such that (15) holds. Then, it is easily verified that satisifies the optimality conditions (2) for QP (1). This proves the if part.
Consider the only if part. Let be an optimal solution of QP (1) and let be multipliers such that (2) holds. Define . If then it can be easily verified that , , , , satisfy the optimality conditions for HQP (15). To show we need to show that since . Consider
(16a) | ||||
(16b) | ||||
(16c) | ||||
(16d) | ||||
(16e) |
where the equality in (16b) follows by multiplying (2b) by and substituting for with . Multiplying (2a) by and substituting for as yields (16c). Using the complementarity constraints (2c) in (16c) yields (16d). The final inequality follows from (7). This proves the only if part of the claim. The claim is proven. ∎
We now show that infeasibility of QP (1) is equivalent to the vanishing of the optimal solution to HQP (4).
Theorem 2.
4 Infeasible Interior Point Method (IIPM)
For the remainder of the paper, we assume that the HQP has the form
(17a) | ||||
s.t. | (17b) | |||
(17c) |
where , , , . We assume the following for the HQP (17).
Assumption 3.
The matrix has full row rank of .
Assumption 4.
The matrix is positive definite on the null space of , i.e. .
The above HQP can be identified with original QP (1) when and the Assumptions 1-2 imply satisfaction of Assumptions 3-4. If §3 shows how to cast (1) satisfying Assumptions 1-2 into a HQP of the form in (17) satisfying Assumptions 3-4.
In the rest of the section, we show how a standard IIPM for LPs can be extended to HQP (17). The IIPM also enjoys polynomial iteration complexity.
4.1 IIPM for HQP
In the rest of the section we employ the functions
(18a) | ||||
(18b) | ||||
(18c) | ||||
(18d) |
where , and , are the multipliers for the equality, nonnegativity constraints (17b)-(17c), and . The parameter is called a barrier or centrality parameter. In the following, we will suppress the arguments when the dependence is clear from the context.
A point is said to minimize HQP (17) if there exist and satisfying the first-order stationary conditions
(19) |
IPMs aim to compute by following the central path which is defined by where is a vector of all ones. In the limit as we recover a point satisfying (19). Feasible IPMs typically assume that an initial iterate satisfying and . Such a point is not generally guaranteed to exist and can also be difficult to compute. In the context of HQP (17) such a point will not exist if the original QP (1) is infeasible (refer Theorem 2). This is our motivation for considering IIPM.
IIPMs start from an initial iterate satisfying but where denote , . The method generates a sequence of iterates where the iterates are required to lie within a neighborhood with
(20) |
where is a fixed parameter. At each iteration a search direction is generated by solving
(21) |
where such that and . The residual of the complementarity condition is perturbed by to ensure that the iterates can be guaranteed to lie within the neighborhood . Given such a direction define . The step is chosen to be the largest value such that
(22a) | ||||
(22b) |
The next iterate is defined as . Algorithm 1 describes the IIPM.
4.2 Polynomial Complexity
The analysis of the Algorithm 1 is straightforward adaption of the analysis in [23, Chapter 6]. We will only highlight the key steps where we differ. The results are specialized to the case where the initial iterate is chosen as
(23) |
where is scalar for which
(24) |
for some optimal solution of HQP (17). Recall from the discussion in §3 that such a solution always exists under the Assumptions 3-4.
From the linearity of the residuals in (18a)-(18b), the choice of step direction (21) and the method of updating the iterate at it is easy to show that
where . We first state a key result that is used in subsequent lemmas.
Lemma 2.
Suppose be such that and . Then . Further, .
Proof.
The proof on complexity (Theorem 3) relies on 3 key lemmas. Lemma 3 first bounds . Lemma 4 provides a bound on scaled search directions. Finally, Lemma 6.7 [23] ensures that there exists an uniform lower bound on . We first provide a bound on .
Lemma 3.
Suppose the initial iterate satisfies (23). Then for any iterate
(25) |
Proof.
We next provide a bound on the scaled search directions.
Lemma 4.
Suppose the initial iterate satisfies (23). Then there is a constant independent of such that
where .
Proof.
Define | ||||
(27a) | ||||
Then satisfy the conditions in Lemma 2 and . From the last row in (21) | ||||
(27b) | ||||
Multiplying through by and the definition of obtain | ||||
(27c) | ||||
Taking norms on both sides, squaring and using obtain | ||||
(27d) | ||||
Starting from this inequality the arguments in the proofs of Lemmas 6.5-6.6 [23] can be followed to show the claim. |
∎
Lemma 6.7 [23] provides an uniform bound on and holds without any change in the arguments.
5 Numerical Experiments
We present preliminary numerical experiments with the HQP formulation using the IPM solver IPOPT [32]. IPOPT implements the standard IPM for QPs i.e. the algorithm cannot determine a certificate of infeasibility. In our experiments, we generated random instances of QP (1) with a single equality constraint with , , , . The coefficients in the single equality are restricted to be nonnegative and generated at random. It is easy to deduce that there exists no such that for . Hence, the instances are all infeasible. We presented the QP formulation directly to IPOPT. The HQP formulation (4) is derived for each such random instance and is also presented for solution to IPOPT. We generated 10 random instances of different sizes .
In the first set of experiments, we set the IPOPT option mehrotra_algorithm=no. In this case, the predictor-corrector algorithm of Mehrotra is disabled. When solving the QP formulation, IPOPT always terminates after 8-10 iterations with the indication that the problem might be infeasible. When solving the HQP formulation, IPOPT always terminates with an optimal solution of as specified in Theorem 2 in about 16-20 iterations.
In the second set of experiments, we enabled the predictor-corrector algorithm in IPOPT by setting mehrotra_algorithm=yes. In this setting IPOPT hits the iteration limit on every single instance when solving the QP formulation. The dual infeasibility blows up to infinity in every instance. When solving the HQP formulation IPOPT always terminates with an optimal solution of in about 8-10 iterations.
In the third set of experiments, we set . In this case the QP instances are always feasible. We verified that both the QP and HQP formulations solved the problem to optimality. Further, the solutions to QP can be recovered from the HQP could be recovered according to Theorem 1. Thre is no significant difference in the number of iterations taken for convergence using either formulation. However, the computational time per iteration for HQP is higher than that of QP formulation. This is likely due to the matrix in (21) being dense. This can be rectified using a tailored Schur-complement-based implementation for the step computation. We will investigate this in a future work.
6 Conclusions & Future Work
We presented a homogeneous formulation of QP that allows for robust detection of infeasibility in QPs. We also presented an infeasible IPM for the solution of the HQP and showed polynomial iteration complexity. In the context of IPMs, the paper leaves open a number of future avenues for exploration. Firstly, the sparsity of the linear systems in the step computation of IIPM are now affected by the sparsity of which can be dense. To effectively handle this a tailored linear algebra solution is required. Secondly, the linear system may have structure such as in the case of MPC. Exploiting this through a decomposition approach such as in [3] is critical to improving the computational efficiency. Thirdly, the user of predictor-corrector steps will be crucial for improving the practial performance. We will explore these in a future work. The homogeneous formulation can be readily presented to any QP algorithm. We will also investigate the performance of other QP algorithms on the proposed formulation.
References
- [1] F. Borrelli, A. Bemporad, and M. Morari, Predictive Control for Linear and Hybrid Systems. Cambridge University Press, 2017.
- [2] D. Mayne, J. Rawlings, and M. Diehl, Model predictive control: Theory, Computation and Design, 2nd ed. Santa Barbara: Nob Hill, LLC, 2020.
- [3] C. Rao, S. Wright, and J. Rawlings, “Application of interior-point methods to model predictive control,” Journal of Optimization Theory and Applications, p. 723–757, 1998.
- [4] R. Bartlett and L. Biegler, “Qpschur: A dual, active-set, schur-complement method for large-scale and structured convex quadratic programming,” Optimization and Engineering, vol. 7, p. 5–32, 2006.
- [5] H. Ferreau, H. Bock, and M. Diehl, “An online active set strategy to overcome the limitations of explicit mpc,” International Journal of Robust and Nonlinear Control, vol. 18, no. 8, p. 816–830, 2008.
- [6] A. Domahidi, E. Chu, and S. Boyd, “Ecos: An socp solver for embedded systems,” in 2013 European Control Conference (ECC), 2013, pp. 3071–3076.
- [7] S. Richter, C. Jones, and M. Morari, “Computational complexity certification for real-time mpc with input constraints based on the fast gradient method,” IEEE Trans. Autom. Control, vol. 57, no. 6, p. 1391–1403, 2012.
- [8] P. Giselsson, “Optimal preconditioning and iteration complexity bounds for gradient-based optimization in model predictive control,” in 2013 American Control Conference, 2013, pp. 358–364.
- [9] P. Patrinos and A. Bemporad, “An accelerated dual gradient-projection algorithm for embedded linear model predictive control,” IEEE Transactions on Automatic Control, vol. 59, no. 1, p. 18–33, 2014.
- [10] A. U. Raghunathan and S. Di Cairano, “Alternating direction method of multipliers for strictly convex quadratic programs: Optimal parameter selection,” in American Control Conference, 2014, pp. 4324–4329.
- [11] P. Giselsson and S. Boyd, “Diagonal scaling in douglas-rachford splitting and admm,” in 53rd IEEE Conference on Decision and Control, 2014, pp. 5033–5039.
- [12] P. Patrinos, L. Stella, and A. Bemporad, “Douglas-rachford splitting: Complexity estimates and accelerated variants,” in 53rd IEEE Conference on Decision and Control, 2014, pp. 4234–4239.
- [13] E. Ghadimi, A. Teixeira, I. Shames, and M. Johansson, “Optimal parameter selection for the alternating direction method of multipliers (admm): Quadratic problems,” IEEE Transactions on Automatic Control, vol. 60, no. 3, pp. 644–658, 2015.
- [14] R. Quirynen, A. Knyazev, and S. D. Cairano, “Block structured preconditioning within an active-set method for real-time optimal control,” in 2018 European Control Conference (ECC), 2018, pp. 1154–1159.
- [15] D. Frick, A. Domahidi, and M. Morari, “Embedded optimization for mixed logical dynamical systems,” Computers & Chemical Engineering, vol. 72, pp. 21–33, 2015.
- [16] V. Naik and A. Bemporad, “Embedded mixed-integer quadratic optimization using accelerated dual gradient projection,” in IFAC-PapersOnLine, vol. 50, no. 1, 2017, pp. 10 723–10 728.
- [17] B. Stellato, V. Naik, A. Bemporad, P. Goulart, and S. Boyd, “Embedded mixed-integer quadratic optimization using the osqp solver,” in 2018 European Control Conference (ECC), 2018, pp. 1536–1541.
- [18] P. Hespanhol, R. Quirynen, and S. Di Cairano, “A structure exploiting branch-and-bound algorithm for mixed-integer model predictive control,” in 2019 18th European Control Conference (ECC), 2019, pp. 2763–2768.
- [19] A. U. Raghunathan and S. Di Cairano, “Infeasibility detection in alternating direction method of multipliers for convex quadratic programs,” in 53rd IEEE Conference on Decision and Control, 2014, pp. 5819–5824.
- [20] G. Banjac, P. Goulart, B. Stellato, and S. Boyd, “Infeasibility detection in the alternating direction method of multipliers for convex optimization,” Journal of Optimization Theory and Applications, vol. 183, no. 2, pp. 490–519, 2019. [Online]. Available: https://doi.org/10.1007/s10957-019-01575-y
- [21] D. Liao-McPherson and I. Kolmanovsky, “Fbstab: A proximally stabilized semismooth algorithm for convex quadratic programming,” Automatica, vol. 113, p. 108801, 2020. [Online]. Available: https://www.sciencedirect.com/science/article/pii/S0005109819306648
- [22] J. Nocedal and S. J. Wright, Numerical Optimization, 2nd ed. New York, NY, USA: Springer, 2006.
- [23] S. Wright, Primal-Dual Interior-Point Methods. SIAM, 1997.
- [24] E. Wong, “Active-set methods for quadratic programming,” Ph.D. dissertation, University of California, San Diego, 2011.
- [25] Y. Ye, M. J. Todd, and S. Mizuno, “An o(/l)-iteration homogeneous and self-dual linear programming algorithm,” Mathematics of Operations Research, vol. 19, pp. 53–67, 1994.
- [26] X. Xu, P. Hung, and Y. Ye, “A simplified homogeneous and self-dual linear programming algorithm and its implementation,” Annals of Operations Research, vol. 62, pp. 151–172, 1996.
- [27] E. Andersen and K. Andersen, “The mosek interior point optimizer for linear programming: an implementation of the homogeneous algorithm,” High Performance Optimization, vol. 33, p. 197–232, 2000.
- [28] C. J. Nohra, A. U. Raghunathan, and N. Sahinidis, “Spectral relaxations and branching strategies for global optimization of mixed-integer quadratic programs,” SIAM Journal on Optimization, vol. 31, no. 1, pp. 142–171, 2021.
- [29] C. J. Nohra, A. U. Raghunathan, and N. V. Sahinidis, “Sdp-quality bounds via convex quadratic relaxations for global optimization of mixed-integer quadratic programs,” Math. Program., 2021.
- [30] G. H. Golub and C. F. Van Loan, Matrix Computations, 3rd ed. Johns Hopkins University Press, 1996.
- [31] O. Mangasarian, Nonlinear Programming, ser. Classics in Applied Mathematics. SIAM, 1994.
- [32] A. Wächter and L. T. Biegler, “On the implementation of an interior-point filter line-search algorithm for large-scale nonlinear programming,” Mathematical programming, vol. 106, no. 1, pp. 25–57, 2006.