Skip to content
Fabian Geyer edited this page Feb 20, 2025 · 8 revisions

Welcome to the CaΣoS wiki! Here you'll find information about polynomial optimization, sum-of-squares and related cones, and general usage of the software.

About CaΣoS

CaΣoS aims to bring nonlinear optimization into sum-of-squares programming as well as facilitate the integration of pre-computed polynomials into optimal control solutions. CaΣoS is developed by researchers at the Institute of Flight Mechanics and Control of the University of Stuttgart and distributed open-source under the GPL-3.0 license.

Getting Started

The following requirements need to be met in order to use all functionalities of CaΣoS:

  1. Download CasADi v3.6.x and add it to your Matlab path.

  2. Download and install at least one solver for semidefinite (conic) programs, and add the solver(s) to the Matlab Path.

  3. Add the CaΣoS root folder (the one that contains the directory +casos) to your Matlab path.

Important

CaΣoS requires CasADi version 3.6.0 or newer.

You can check if CaΣoS is ready to go by running the install script in utils/install.m.

Examples

Nonnegativity of scalar polynomial

With sossol, CaΣoS can verify nonnegativity of a polynomial. Consider for example

$$ f(x) = x^4 + 10x. $$

For which $\gamma>0$ is $f(x)+\gamma$ nonnegative? This can be checked using polynomial optimization:

% Polynomial optimization.

% indeterminate variable
x = casos.Indeterminates('x');
% some polynomial
f = x^4 + 10*x;
% scalar decision variable
g = casos.PS.sym('g');

% define SOS problem:
%   min g s.t. (f + g) is SOS
sos = struct('x',g,'f',g,'g',f+g);
% constraint is scalar SOS cone
opts = struct('Kc',struct('sos',1));

% solve by relaxation to SDP
S = casos.sossol('S','sedumi',sos,opts);
% evaluate
sol = S();

fprintf('Minimum is %g.\n', full(sol.f))

Quasiconvex sum-of-squares programming

TODO: add example (ROA)