This repository includes the functions maxve
and minve
that solve semi-definite programming optimization problems respectively to compute the ellipsoid of maximum volume inscribed within a polytopic set and the ellipsoid of minimum volume covering a polytopic set. The full mathematical derivation can be found within the book Convex Optimization, the functions have been coded in Matlab using the toolboxes Yalmip and MPT respectively for the optimization problem and to generate the plots in 2D and 3D. The optimization relies on the solver SeDuMi. Note that installing MPT toolbox will prompt for the installation of Yalmip and SeDuMi.
The polytope in dimension is defined using a set of linear inequalities in the following way,
where and . The inscribed ellipsoid is parametrized as follows,
where is a positive definite matrix. The optimization problem that maximizes the inscribed ellipsoid volume is formulated such that,
The polytopic set in dimension is defined based on a set of vertices. The ellipsoid covering the polytopic set covers the convex hull defined as follows
The covering ellipsoid is parametrized as follows,
where is a positive definite matrix defining the ellipsoid semi-axes and defines the ellipsoid center. The optimization problem that minimizes the volume of the covering ellipsoid is formulated such that,