dkpy.HinfSynLmiBisection
- class dkpy.HinfSynLmiBisection(bisection_atol=1e-05, bisection_rtol=0.0001, max_iterations=100, initial_guess=10, lmi_strictness=None, solver_params=None)
Bases:
ControllerSynthesisH-infinity synthesis using an LMI approach with bisection.
Synthesis method based on Section 5.3.3 of [CF24].
Examples
H-infinity controller synthesis with default settings
>>> P, n_y, n_u = example_scherer1997_p907 >>> K, N, gamma, info = dkpy.HinfSynLmiBisection().synthesize(P, n_y, n_u)
H-infinity controller synthesis with CLARABEL
>>> K, N, gamma, info = dkpy.HinfSynLmiBisection( ... bisection_atol=1e-4, ... bisection_rtol=1e-3, ... max_iterations=20, ... initial_guess=10, ... lmi_strictness=1e-8, ... solver_params={ ... "solver": "CLARABEL", ... "tol_gap_abs": 1e-9, ... "tol_gap_rel": 1e-9, ... "tol_feas": 1e-9, ... "tol_infeas_abs": 1e-9, ... "tol_infeas_rel": 1e-9, ... }, ... ).synthesize(P, n_y, n_u) >>> gamma 9.51
- Parameters:
- __init__(bisection_atol=1e-05, bisection_rtol=0.0001, max_iterations=100, initial_guess=10, lmi_strictness=None, solver_params=None)
Instantiate
HinfSynLmiBisection.Solution accuracy depends strongly on the selected solver and tolerances. Setting the solver and its tolerances in
solver_paramsand settinglmi_strictnessmanually is recommended, rather than relying on the default settings.- Parameters:
bisection_atol (float) – Bisection absolute tolerance.
bisection_rtol (float) – Bisection relative tolerance.
max_iterations (int) – Maximum number of bisection iterations.
initial_guess (float) – Initial guess for bisection.
lmi_strictness (Optional[float]) – Strictness for linear matrix inequality constraints. Should be larger than the solver tolerance. If
None, then it is automatically set to 10x the solver’s largest absolute tolerance.solver_params (Optional[Dict[str, Any]]) – Dictionary of keyword arguments for
cvxpy.Problem.solve(). Notable keys are'solver'and'verbose'. Additional keys used to set solver tolerances are solver-dependent. A definitive list can be found at [1].
References
Methods
__init__([bisection_atol, bisection_rtol, ...])Instantiate
HinfSynLmiBisection.synthesize(P, n_y, n_u)Synthesize controller.
- synthesize(P, n_y, n_u)
Synthesize controller.
- Parameters:
P (control.StateSpace) – Generalized plant, with
yanduas last outputs and inputs respectively.n_y (int) – Number of measurements (controller inputs).
n_u (int) – Number of controller outputs.
- Returns:
Controller, closed-loop system, objective function value, solution information. If a controller cannot by synthesized, the first three elements of the tuple are
None, but solution information is still returned.- Return type:
Tuple[control.StateSpace, control.StateSpace, float, Dict[str, Any]]
- Raises:
ValueError – If the solver specified is not recognized by CVXPY.
ValueError – If the generalized plant is not continuous-time (i.e., if
p.dt != 0).