# A Randomized Algorithm for Optimal PID Controllers
## 5 Experimental Section
\begin{array}{rr}-0.221989603556075&0.07311286834 0369&-0.241805447889791\\ 0.119158793726812&0.403709017174812&-0.120711030008226\\ -0.541730211464951&0.187380061037601&-0.903873015737950\end{array} \right]\]  
\[\hat{K}_{3}^{(best)}=\left[ \begin{array}{rr}-1.068327578247724&0.146908957308 029&-0.525373002842116\\ -0.006608329355743&0.015609869717001&-0.182159600265849\\ -3.166355434538844&0.515059657329335&-2.156140670934107\end{array} \right],\]  
_with \(f_{\text{LQR}}\left(\hat{K}^{(best)}\right)=13.601550793243616\) (\(a\)\(18.778512\%\) relative improvement), in \(CPU-time=76.343750[sec]\). The resulting PID controller matrices are:_  
\[K_{P}=\left[ \begin{array}{rr}-1.040671697032480&0.034045803431248&-1.1582192844 10088\\ 0.177951420403750&1.273076937581805&-0.454684211704099\\ -2.362328186885230&0.369320416016725&-3.600390066086302\end{array} \right]\]  
\[K_{I}=\left[ \begin{array}{rr}-0.200613800205014&0.131015509566988&-0.25524902 7751546\\ 0.121430088217771&0.409861485359054&-0.122139482935926\\ -0.466787102815339&0.390385480823640&-0.951005918753228\end{array} \right]\]  
\[K_{D}=\left[ \begin{array}{rr}-1.050500770135795&0.146612915752025&-0.5428367768 32826\\ -0.004714134766140&0.015578413703667&-0.184015220520444\\ -3.103855027173255&0.514021741975605&-2.217368288447396\end{array} \right]\]  
_and the resulting closed-loop eigenvalues are_  
\[\sigma\left(\hat{A}_{c\ell}\left(\hat{K}^{(best)}\right)\right)=\left\{ \begin{array}{ r}-0.915131493828863\pm 0.914610403731497i\\ -0.881963764205315\pm 0.191516911259354i\\ -0.730009436848610\\ -0.616780364831122\\ -0.329413066341451\pm 0.071827905231358i\end{array} \right\}.\]  
**Example 2**. : _For the same system as in Example 1 with the objective to find a PID \(H_{\infty}\)-norm optimal controller, where the closed-loop eigenvalues should be in the same rectangular region \(\Omega\), starting from the same \(\hat{K}^{(0)}\) with \(f_{H_{\infty}}\left(\hat{K}^{(0)}\right)=0.095033139822324\), we had_  
\[\hat{K}^{(best)}=\left[ \begin{array}{cc}\hat{K}_{1}^{(best)}&\hat{K}_{2}^{( best)}&\hat{K}_{3}^{(best)}\end{array} \right],\]  
_where_  
\[\hat{K}_{1}^{(best)}=\left[ \begin{array}{rr}-1.087304300685670&-0.04593183 8436646&-1.085574892719301\\ 0.133605778924987&1.184070254573485&-0.359343489961314\\ -2.678924736751655&-0.264961819769927&-3.490264530663762\end{array} \right],\] \[\hat{K}_{2}^{(best)}=\left[ \begin{array}{rr}-0.275424882288615 &0.138303327101369&-0.075398358659212\\ 0.090631547438998&0.331640807629037&-0.054696779167659\\ -0.516085927047396&0.184332519865895&-0.733373655058220\end{array} \right]\] \[\hat{K}_{3}^{(best)}=\left[ \begin{array}{rr}-1.165473798084745 &0.076978746950025&-0.595094516639020\\ -0.052626935909114&-0.061681173045286&-0.250098357975546\\ -3.316496450850004&0.694282662038967&-2.314168285879468\end{array} \right],\]  
_with \(f_{H_{\infty}}\left(\hat{K}^{(best)}\right)=0.072175978563672\) (\(a\)\(24.051779\%\) relative improvement), in \(CPU-time=126[sec]\). The resulting PID controller matrices are:_  
\[K_{P}=\left[ \begin{array}{rr}-1.068321790034687&0.039576561177247&-1.10204100 6775961\\ 0.118395560901336&1.11554481033627&-0.346149598520451\\ -2.50771867599537&0.506251036541779&-3.638774839724999\end{array} \right]\] \[K_{I}=\left[ \begin{array}{rr}-0.266534452864325&0.16094904758 5517&-0.078679654648945\\ 0.083507865416445&0.313495349833722&-0.052067557547737\\ -0.435901834009705&0.3888577609900052&-0.762968147108973\end{array} \right]\] \[K_{D}=\left[ \begin{array}{rr}-1.159203620514524&0.0718810424 24526&-0.607938725615309\\ -0.057651074688413&-0.057596508025015&-0.239806609825754\\ -3.259944795394558&0.648305713745055&-2.430012099310619\end{array} \right]\]  
_and the resulting closed-loop eigenvalues are_  
\[\sigma\left(\hat{A}_{ct}\left(\hat{K}^{(best)}\right)\right)=\left\{ \begin{array} []{rr}-0.965762603991179\pm 0.955842860416991i\\ -0.507539612520429\pm 0.539780823728534i\\ -0.929257645094484\pm 0.106820410747074i\\ -0.402381802562664\pm 0.042181153576293i\end{array} \right\}.\]  
**Example 3**.