Usage#
This page summarizes the usage of opt-syn. Further detail on the opt-syn workflow is available in subsequent pages:
All code is written in object-oriented MATLAB. The Documentation page contains details about each object and function.
Tasks#
The three main tasks of opt-syn are Simulation, Analysis, and Synthesis.
Simulation solves an inclusion algorithm \(0 \in \sum_{i=1}^{s} F_i(\beta^*)\) by iteratively executing an algorithm. Analysis certifies worst-case performance specifications of the algorithm for any \(F_i\) in given classes of operators. Synthesis creates a controller such that the overall algorithm obeys the desired performance specifications.
All three tasks model the algorithm as a System (opt_system). The System has three main parts: the operators, the network, and the controller.
1sys = opt_system(Operators, Network, Controller);
The operators are specified as an \(s\)-length cell array. These are specific operators \(F_i\) in Simulation (op_sim), or are operator classes in Analysis/Synthesis (e.g. op_gen for set-valued maps, op_quad for quadratics).
The network and controller are both state-space dynamical systems. These are represented through a Generalized Plant construction as genplant objects.
Simulation#
Simulation is conducted by the alg_sim object. The first \(T\) time steps of executing a \(d\)-dimensional inclusion algorithm is accomplished by
1simulator = alg_sim(sys, d);
2sim_result = simulator.sim(T);
The output of simulation can then be plotted by alg_plotter
1plt = alg_plotter(sim_result);
2fig1 = plt.plot({'w', 'z'}); %or other desired signals.
Analysis and Synthesis#
Analysis and Synthesis programs are declared by manager objects
1man_ana = opt_analysis(sys);
2man_syn = opt_synthesis(sys);
The Analysis and Synthesis problems are specified by the configuration options (opt_config), and performance specifications. They are solved by using the solve_single(), bisect(), or alternate() commands. Increasing the order yields tighter bounds, at the cost of more computationally intensive programs.
1sol = man_ana.bisect(order, specs); %specs: cell array of specifications
2sol = man_syn.bisect(); %empty: default to linear convergence with rate 1
3sol = man_syn.bisect(iqc, specs); %warm-start with previous Analysis solution (iqc)
4sol = man_syn.alternate(Niteration, order); %alternate between Synthesis and Analysis
The output is stored in the solution object sol. Fields of sol include sol.rho (convergence rate), sol.sys (overall system), and sol.objective (optimization target).