1: Convert the continuous system into a state space system, where the states are the errors and the input is the
control action, according to equation (11);
2: Compute the maximal contractive controlled invariant set contained in the set of constraints, which must
be reexplained in terms of the new state representation;
3: Solve the mp-LP problem described in equation (2);
4: Compute the integral of error, error, and derivative of error;
5: Identify which polyhedral region the computed state belongs to.
6: Use the affine control law to control the system with and being the mp_PID parameters,
corresponding to the j-th polyhedral region;
7: If the control routine is not interrupted, return to step 4.
Algorithm 1