# On Application of the Ray-Shooting Method for LQR via Static-Output-Feedback
## 2 The Practical Algorithm for the Problem of LQR via SOF
Thus, it is worth searching for a starting point \(K^{(0)}\) that maximizes the abscissa \(\alpha\). This can be done efficiently by running a binary search on the abscissa and using the RS algorithm as an oracle. Note that RS CPU time appearing in the third column of Table 1 relates to running the RS algorithm for known optimal value of the abscissa. The RS algorithm is sufficiently fast also for this purpose, but other methods such as the HIFOO algorithm (see [19]) can be applied for this purpose as well. Let \(\sigma_{max}\left(F\right)\) denote the functional (6) for the system \(\left(A,B,I_{p}\right)\), where \(A-BF\) is stable, i.e., \(F\in\mathcal{S}^{q\times p}\). Let \(P\left(F\right)\) denote the unique solution of (4) for the system \(\left(A,B,I_{p}\right)\) with \(F\) as above. Let \(\sigma_{max}\left(K\right)\) denote the functional (4) for the system \(\left(A,B,C\right)\) with \(K\in\mathcal{S}^{q\times r}\) and related Lyapunov matrix \(P=P\left(K\right)\). Now, if \(A-BKC\) is stable for some \(K\) then, \(A-BF\) is stable for \(F=KC\) (but there might exist a \(F\) such that \(A-BF\) is stable, but which cannot be defined as \(KC\) for some \(q\times r\) matrix \(K\)). Therefore

\[\sigma_{max}\left(F_{*}\right)=\min_{F\in\mathcal{S}^{q\times p}}\sigma_{max }\left(F\right)\leq\min_{K\in\mathcal{S}_{a}^{q\times r}\cap\mathbb{B}\left(K ^{(0)},h\right)}\sigma_{max}\left(K\right)=\sigma_{max}\left(K_{*}\right), \tag{8}\]

where \(F_{*}\) is an optimal LQR state-feedback controller for the system \(\left(A,B,I_{p}\right)\). We conclude that \(\sigma_{max}\left(F_{*}\right)\leq\sigma_{max}\left(K_{*}\right)\leq\sigma_{ max}\left(K^{\text{(best)}}\right)\). Thus, \(\sigma_{max}\left(F_{*}\right)\) is a lower-bound for \(\sigma_{max}\left(K^{\text{(best)}}\right)\) and can serve as a good estimator for it (as is evidently seen from Table 1 in many cases) in order to stop the algorithm earlier, since \(\sigma_{max}\left(F_{*}\right)\) can be calculated in advance. The fourth column of Table 1 represents \(\sigma_{max}\left(K^{(0)}\right)\). The fifth column stands for \(\sigma_{max}\left(K^{\text{(best)}}\right)\), where the number in the parentheses is the relative improvement over \(\sigma_{max}\left(K^{(0)}\right)\), in percent. The sixth column is for \(\sigma_{max}\left(F_{*}\right)\) and the seventh column is for the CPU time of the suggested algorithm, given in seconds. The eighth column stands for \(\sigma_{max}\left(K^{\text{(best)}}\right)\) found by the MC Algorithm and finally, the ninth column stands for the CPU time of the MC Algorithm. Regarding the suggested algorithm, note that the relative improvement of \(\sigma_{max}^{\text{(best)}}\) over \(\sigma_{max}^{(0)}\) is at least \(1000\%\) for the systems: AC6, AC11, AC12, DIS4, REA1, TF1, NN9, NN15 and NN17 (i.e., in 9 out of 29 systems). The AC12 should be noted, for which the improvement is \(7.55\cdot 10^{17}\%\)! Note also that for the (13 out of 29) systems: AC1, AC2, AC6, AC11, AC12, AC15, HE3, DIS4, REA1, REA2, HF2D10, HF2D11 and NN15, the value of \(\sigma_{max}^{\text{(best)}}\) for \(\left(A,B,C\right)\) is very close to the value of \(\sigma_{max}\left(F_{*}\right)\) for \(\left(A,B\right)\). Regarding the comparison with the MC Algorithm, we conclude that the MC algorithm actually failed in finding any improvement of \(\sigma_{max}^{\left(\text{best}\right)}\) over \(\sigma_{max}^{\left(0\right)}\) for the systems: AC11, HE4, ROC1, ROC2, TF1 and NN12. The suggested algorithm performs significantly better regarding this key of performance for the systems: AC6, AC11, AC15, HE3, HE4, TF1, ROC4, NN9 and NN12. The suggested algorithm performs slightly better for the systems: AC1, AC2, DIS4, DIS5, HE1, HF2D10, HF2D11, REA1, REA2, ROC1, TMD, NN1, NN5 and NN13. Finally, the MC algorithm performs slightly better only for the systems: AC5, AC12 and NN16.