**5. Experiments**

In the following experiments, we applied Algorithms 1 and 2, for systems taken from the libraries [26–28]. The systems given in these libraries are real-life continuous-time systems. In order to get related discrete-time systems, we sampled the systems using the Tustin method with sampling rate *Ts* ¼ 0*:*01 sec ½ �. We took only the systems for which the RS algorithm succeeded in finding SOFs for the continuous-time systems (see [10], Table 8, p. 231). In order to initialize the MC Algorithm, we also used the RS algorithm to find a starting *α*-stabilizing SOF. In all the experiments, we used *<sup>m</sup>* <sup>¼</sup> <sup>2</sup>⌈ *<sup>e</sup>* ffiffiffiffiffiffiffiffiffiffiffi <sup>2</sup>*<sup>π</sup> qr* <sup>p</sup> ⌉, *<sup>n</sup>* <sup>¼</sup> 100, *<sup>s</sup>* <sup>¼</sup> 100; *<sup>h</sup>* <sup>¼</sup> 100,*r*<sup>∞</sup> <sup>¼</sup> 100, <sup>ϵ</sup> <sup>¼</sup> <sup>10</sup>�16, for the RS algorithm; and *<sup>m</sup>* <sup>¼</sup> <sup>200</sup>⌈ *<sup>e</sup>* ffiffiffiffiffiffiffiffiffiffiffi <sup>2</sup>*<sup>π</sup> qr* <sup>p</sup> ⌉, *<sup>s</sup>* <sup>¼</sup> 100, for the MC Algorithm, in order to get the same number of total iterations and the same number *s* ¼ 100 of iterations for the local search. We took *Q* ¼ *Ip*, *R* ¼ *Iq* in all the cases.

The stability margin column of **Table 1** relates to 0 <*α* <1 for which the absolute value of any eigenvalue of the closed loop is less than 1 � *α*. The values of *α* in **Table 1** relates to the largest 0 <*α* <1 for which the RS algorithm succeeded in finding a starting SOF *K*ð Þ <sup>0</sup> . As we saw above, it is worth searching for a starting point *K*ð Þ <sup>0</sup> that maximizes 0 <*α*< 1. This can be achieved efficiently by running a binary search on the 0< *α*<1 and using the RS algorithm as an oracle. Note that the RS CPU time appearing in the fourth column of **Table 1** relates to running the RS algorithm for known optimal value of 0 <*α*< 1. The RS algorithm is sufficiently fast also for this purpose, but other algorithms such as the HIFOO (see [24]) and


#### **Table 1.**

*General information of the systems and initial values.*

initial condition responses of the closed-loop systems with the SOFs for *m* ¼ 20, with *<sup>x</sup>*<sup>0</sup> <sup>¼</sup> ½ � 3 1 *<sup>T</sup>* and sampling time *Ts* <sup>¼</sup> <sup>0</sup>*:*01, are given. One can see that the responses of the closed-loop systems with the SOFs computed by RS and RS + MC are very close to the global optimal response, while the response of the closed-loop system with the SOF computed by the MC algorithm (actually with the initial SOF),

*The initial condition response of the closed-loop system with the SOF computed by the RS + MC algorithm*

*The initial condition response of the closed-loop system with the SOF computed by the MC algorithm (blue)*

although stable, is unacceptable.

*(blue) compared with the global optimal response (red).*

**Figure 8.**

**70**

**Figure 7.**

*compared with the global optimal response (red).*

*Control Theory in Engineering*

HINFSTRUCT (see [29]) can be applied in order to get a starting SOF. The advantage of the use of the RS is of finding starting SOF with relatively small norm.

Let *σmax*ð Þ *F* denote the functional (7) for the system *A*, *B*,*Ip* , where *<sup>A</sup>* � *BF* is stable, i.e., *<sup>F</sup>* <sup>∈</sup>S*q*�*p*. Let *P F*ð Þ denote the Lyapunov matrix (5) for the system *<sup>A</sup>*, *<sup>B</sup>*,*Ip* with *F* as above. Let *σmax*ð Þ *K* denote the functional (7) for the system ð Þ *A*, *B*,*C* with *<sup>K</sup>* <sup>∈</sup> <sup>S</sup>*q*�*<sup>r</sup>* and related Lyapunov matrix *<sup>P</sup>* <sup>¼</sup> *P K*ð Þ given by (5). Now, if *<sup>A</sup>* � *BKC* is stable for some *K*, then *A* � *BF* is stable for *F* ¼ *KC* (but there might exist *F* such that *A* � *BF* is stable, which cannot be defined as *KC* for some *q* � *r* matrix *K*). Therefore,

$$\sigma\_{\max}(F\_\* \,) = \min\_{F \in \mathcal{S}^{\mathbb{P}^{\times p}}} \sigma\_{\max}(F) \le \min\_{K \in \mathcal{S}^{\times\_{\max} \times r}\_a \cap \mathbb{B}(\mathcal{K}^{(0)}, h)} \sigma\_{\max}(K) = \sigma\_{\max}(K\_\* \,), \tag{15}$$

where *F* <sup>∗</sup> is an optimal LQR state-feedback (SF) controller for the system *A*, *B*,*Ip* . We conclude that *<sup>σ</sup>max*ð Þ *<sup>F</sup>* <sup>∗</sup> <sup>≤</sup>*σmax*ð Þ *<sup>K</sup>* <sup>∗</sup> <sup>≤</sup> *<sup>σ</sup>max <sup>K</sup>*ð Þ best . Thus, *<sup>σ</sup>max*ð Þ *<sup>F</sup>* <sup>∗</sup> is a lower bound for *σmax K*ð Þ *best* and can serve as a good estimator for it, in order to quantify the convergence of the algorithm to the global minimum (as is evidently seen from **Table 1** in many cases) and in order to stop the algorithm earlier, since *σmax*ð Þ *F* <sup>∗</sup> can be calculated in advance. The lower bound appears in the last column of **Table 1**.

For all the systems, we had ð Þ *<sup>A</sup>*, *<sup>B</sup>* , *AT*,*C<sup>T</sup>* controllable, except for ROC1 and ROC2. All the systems are unstable, except for AC6, AC15, and NN16 which are stable, but not *α*-stable, for *α* given in the stability margin column.

The experiments were executed on: Computer: LAPTOP-GULIHG OV, ASUSeK COMPUTER, INC. TUF GAMING FX504GM-FX80GM. Processor: Intel(R) Core(TM) i7-8750H CPU@2.20GHz. Platform: MATLAB, Version R2018b Win 64.

#### **5.1 Conclusions from the experiments**

Regarding the experimental results in **Table 2** and the comparison between the RS algorithm and the MC algorithm, we conclude:

1.The RS algorithm performs in magnitude better than the MC algorithm for the systems: AC1, AC11, HE1, HE4, ROC1, ROC4, TF1, and NN5.

4.The RS + MC algorithm performs exactly as the MC algorithm for systems AC5

1.The RS algorithm failed in finding any improvement over *σ*max *K*ð Þ <sup>0</sup> for

2.The MC algorithm failed in finding any improvement over *σ*max *K*ð Þ <sup>0</sup> for systems AC1, AC11, ROC1, and ROC4. This observation assesses the heuristic that it is better to start with a SOF that brings the poles of the closed loop as

Regarding the assessment of convergence to a global minimum, we had the

1.The RS algorithm and the RS + MC algorithm had very close values of *σ*max *K*ð Þ *best* (or exactly the same value) which is very close to the lower bound, for systems AC1, AC6, HE1, HE3, HE4, ROC1, DIS4, NN5, and NN16.

Regarding improvements over the starting point, we had:

close as possible to the boundary of the disk *α*.

3.The RS + MC algorithm improved *σ*max *K*ð Þ <sup>0</sup> in any case.

and DIS5.

*Experimental results.*

**Table 2.**

**System** *σ*ð Þ **best**

**max for** ð Þ *A***,** *B***,** *C* **RS Algo***:*

*DOI: http://dx.doi.org/10.5772/intechopen.89319*

*σ*ð Þ **best max for** ð Þ *A***,** *B***,** *C* **MC Algo***:*

*Algorithms for LQR via Static Output Feedback for Discrete-Time LTI Systems*

*σ*ð Þ **best max for** ð Þ *A***,** *B***,** *C* **RS** þ **MC Algo***:*

AC1 <sup>1</sup>*:*<sup>9207</sup> � <sup>10</sup><sup>3</sup> <sup>1</sup>*:*<sup>0701</sup> � <sup>10</sup><sup>4</sup> <sup>1</sup>*:*<sup>9207</sup> � <sup>10</sup><sup>3</sup> <sup>2</sup>*:*9843 0*:*0468 3*:*<sup>0312</sup> AC5 <sup>1</sup>*:*<sup>5888</sup> � 109 <sup>2</sup>*:*<sup>5905</sup> � 108 <sup>2</sup>*:*<sup>5905</sup> � <sup>10</sup><sup>8</sup> <sup>2</sup>*:*0156 0*:*4062 2*:*<sup>2500</sup> AC6 <sup>6</sup>*:*<sup>1449</sup> � 102 <sup>6</sup>*:*<sup>5913</sup> � <sup>10</sup><sup>2</sup> <sup>6</sup>*:*<sup>1389</sup> � <sup>10</sup><sup>2</sup> <sup>5</sup>*:*1250 0*:*2500 5*:*<sup>1718</sup> AC11 <sup>2</sup>*:*<sup>4234</sup> � <sup>10</sup><sup>3</sup> <sup>1</sup>*:*<sup>2968</sup> � 104 <sup>2</sup>*:*<sup>4234</sup> � <sup>10</sup><sup>3</sup> <sup>2</sup>*:*9531 0*:*0468 3*:*<sup>0000</sup> HE1 <sup>9</sup>*:*<sup>1253</sup> � 102 <sup>1</sup>*:*<sup>0968</sup> � 103 <sup>9</sup>*:*<sup>1253</sup> � <sup>10</sup><sup>2</sup> <sup>2</sup>*:*2812 0*:*0468 2*:*<sup>3437</sup> HE3 <sup>8</sup>*:*<sup>6808</sup> � <sup>10</sup><sup>4</sup> <sup>7</sup>*:*<sup>1816</sup> � <sup>10</sup><sup>4</sup> <sup>8</sup>*:*<sup>1737</sup> � <sup>10</sup><sup>4</sup> <sup>13</sup>*:*4843 0*:*2343 13*:*<sup>7656</sup> HE4 <sup>5</sup>*:*<sup>2247</sup> � <sup>10</sup><sup>4</sup> <sup>1</sup>*:*<sup>1817</sup> � <sup>10</sup><sup>6</sup> <sup>3</sup>*:*<sup>1783</sup> � <sup>10</sup><sup>4</sup> <sup>10</sup>*:*9687 0*:*0468 11*:*<sup>2656</sup> ROC1 <sup>6</sup>*:*<sup>6239</sup> � <sup>10</sup><sup>5</sup> <sup>1</sup>*:*<sup>5906</sup> � 107 <sup>6</sup>*:*<sup>6239</sup> � <sup>10</sup><sup>5</sup> <sup>7</sup>*:*6250 0*:*1250 7*:*<sup>7500</sup> ROC4 <sup>5</sup>*:*<sup>9923</sup> � 105 <sup>1</sup>*:*<sup>2273</sup> � 106 <sup>5</sup>*:*<sup>9923</sup> � 105 <sup>5</sup>*:*3750 0*:*0625 5*:*<sup>4218</sup> DIS4 <sup>1</sup>*:*<sup>7590</sup> � <sup>10</sup><sup>2</sup> <sup>2</sup>*:*<sup>0376</sup> � <sup>10</sup><sup>2</sup> <sup>1</sup>*:*<sup>7590</sup> � <sup>10</sup><sup>2</sup> <sup>7</sup>*:*2187 0*:*1250 7*:*<sup>2656</sup> DIS5 <sup>2</sup>*:*<sup>8686</sup> � <sup>10</sup><sup>8</sup> <sup>3</sup>*:*<sup>2079</sup> � <sup>10</sup><sup>7</sup> <sup>3</sup>*:*<sup>2079</sup> � <sup>10</sup><sup>7</sup> <sup>1</sup>*:*8593 0*:*1562 1*:*<sup>9687</sup> TF1 <sup>1</sup>*:*<sup>9289</sup> � <sup>10</sup><sup>4</sup> <sup>1</sup>*:*<sup>1230</sup> � <sup>10</sup><sup>5</sup> <sup>1</sup>*:*<sup>9270</sup> � <sup>10</sup><sup>4</sup> <sup>5</sup>*:*0000 0*:*0625 5*:*<sup>0468</sup> NN5 <sup>9</sup>*:*<sup>6780</sup> � <sup>10</sup><sup>5</sup> <sup>1</sup>*:*<sup>3372</sup> � <sup>10</sup><sup>6</sup> <sup>9</sup>*:*<sup>6780</sup> � <sup>10</sup><sup>5</sup> <sup>1</sup>*:*2968 0*:*1718 1*:*<sup>3593</sup> NN13 <sup>2</sup>*:*<sup>0521</sup> � 102 <sup>2</sup>*:*<sup>6553</sup> � <sup>10</sup><sup>2</sup> <sup>1</sup>*:*<sup>7953</sup> � <sup>10</sup><sup>2</sup> <sup>2</sup>*:*3281 0*:*2656 2*:*<sup>4843</sup> NN16 <sup>6</sup>*:*<sup>4416</sup> � <sup>10</sup><sup>2</sup> <sup>6</sup>*:*<sup>0032</sup> � <sup>10</sup><sup>2</sup> <sup>6</sup>*:*<sup>0030</sup> � 102 <sup>6</sup>*:*4062 0*:*5468 6*:*<sup>7343</sup> NN17 <sup>3</sup>*:*<sup>6805</sup> � 103 <sup>4</sup>*:*<sup>9674</sup> � <sup>10</sup><sup>3</sup> <sup>3</sup>*:*<sup>6787</sup> � 103 <sup>0</sup>*:*9375 0*:*2812 1*:*<sup>1718</sup>

**RS Algo***:* **CPU time** ½ � **sec**

**MC Algo***:* **CPU time** ½ � **sec**

**RS** þ **MC Algo***:* **CPU time** ½ � **sec**

following results:

**73**

systems AC5 and DIS5.


Regarding the experimental results in **Table 2** and the performance of the RS + MC algorithm, we conclude:



*Algorithms for LQR via Static Output Feedback for Discrete-Time LTI Systems DOI: http://dx.doi.org/10.5772/intechopen.89319*

**Table 2.** *Experimental results.*

HINFSTRUCT (see [29]) can be applied in order to get a starting SOF. The advantage of the use of the RS is of finding starting SOF with relatively small norm.

stable, i.e., *<sup>F</sup>* <sup>∈</sup>S*q*�*p*. Let *P F*ð Þ denote the Lyapunov matrix (5) for the system *<sup>A</sup>*, *<sup>B</sup>*,*Ip*

with *F* as above. Let *σmax*ð Þ *K* denote the functional (7) for the system ð Þ *A*, *B*,*C* with *<sup>K</sup>* <sup>∈</sup> <sup>S</sup>*q*�*<sup>r</sup>* and related Lyapunov matrix *<sup>P</sup>* <sup>¼</sup> *P K*ð Þ given by (5). Now, if *<sup>A</sup>* � *BKC* is stable for some *K*, then *A* � *BF* is stable for *F* ¼ *KC* (but there might exist *F* such that *A* � *BF* is stable, which cannot be defined as *KC* for some *q* � *r* matrix *K*). Therefore,

*<sup>α</sup>* <sup>∩</sup> *<sup>K</sup>*ð Þ <sup>0</sup> ð Þ , *<sup>h</sup>*

where *F* <sup>∗</sup> is an optimal LQR state-feedback (SF) controller for the system

 . We conclude that *<sup>σ</sup>max*ð Þ *<sup>F</sup>* <sup>∗</sup> <sup>≤</sup>*σmax*ð Þ *<sup>K</sup>* <sup>∗</sup> <sup>≤</sup> *<sup>σ</sup>max <sup>K</sup>*ð Þ best . Thus, *<sup>σ</sup>max*ð Þ *<sup>F</sup>* <sup>∗</sup> is a lower bound for *σmax K*ð Þ *best* and can serve as a good estimator for it, in order to quantify the convergence of the algorithm to the global minimum (as is evidently seen from **Table 1** in many cases) and in order to stop the algorithm earlier, since *σmax*ð Þ *F* <sup>∗</sup> can be calculated in advance. The lower bound appears in the last column of **Table 1**. For all the systems, we had ð Þ *<sup>A</sup>*, *<sup>B</sup>* , *AT*,*C<sup>T</sup>* controllable, except for ROC1 and ROC2. All the systems are unstable, except for AC6, AC15, and NN16 which are

Regarding the experimental results in **Table 2** and the comparison between the

1.The RS algorithm performs in magnitude better than the MC algorithm for the

2.The MC algorithm performs in magnitude better than the RS algorithm for the

3.The MC algorithm performs slightly better than the RS algorithm for systems

Regarding the experimental results in **Table 2** and the performance of the

1.The RS + MC algorithm performs better than each algorithm separately, for

2.The RS + MC algorithm performs better than the RS algorithm for systems

3.The RS + MC algorithm performs exactly as the RS algorithm for systems AC1, AC11, DIS4, HE1, ROC1, ROC4, and NN5. This observation assesses the claim

, where *<sup>A</sup>* � *BF* is

*σmax*ð Þ¼ *K σmax*ð Þ *K* <sup>∗</sup> , (15)

Let *σmax*ð Þ *F* denote the functional (7) for the system *A*, *B*,*Ip*

*σmax*ð Þ *F* ≤ min *<sup>K</sup>* <sup>∈</sup>Sf*curr*;*q*�*<sup>r</sup>*

stable, but not *α*-stable, for *α* given in the stability margin column.

Processor: Intel(R) Core(TM) i7-8750H CPU@2.20GHz.

Computer: LAPTOP-GULIHG OV, ASUSeK COMPUTER, INC.

systems: AC1, AC11, HE1, HE4, ROC1, ROC4, TF1, and NN5.

systems AC6, HE4, TF1, NN13, NN16, and NN17.

for convergence of the RS algorithm to global optimum.

*σmax*ð Þ¼ *F* <sup>∗</sup> min

*Control Theory in Engineering*

*A*, *B*,*Ip*

*<sup>F</sup>* <sup>∈</sup>S*q*�*<sup>p</sup>*

The experiments were executed on:

TUF GAMING FX504GM-FX80GM.

**5.1 Conclusions from the experiments**

systems AC5 and DIS5.

RS + MC algorithm, we conclude:

AC5, HE3, and DIS5.

**72**

HE3 and NN16.

Platform: MATLAB, Version R2018b Win 64.

RS algorithm and the MC algorithm, we conclude:

4.The RS + MC algorithm performs exactly as the MC algorithm for systems AC5 and DIS5.

Regarding improvements over the starting point, we had:


Regarding the assessment of convergence to a global minimum, we had the following results:

1.The RS algorithm and the RS + MC algorithm had very close values of *σ*max *K*ð Þ *best* (or exactly the same value) which is very close to the lower bound, for systems AC1, AC6, HE1, HE3, HE4, ROC1, DIS4, NN5, and NN16. 2.The MC algorithm achieved a very close value of *σ*max *K*ð Þ *best* � � to the lower bound, for the systems AC6, HE3, DIS5, NN5, and NN16.

As was expected, the MC algorithm seems to perform better locally, while the RS algorithm seems to perform better globally. Thus, practically, the best approach is to apply the RS algorithm in order to find a close neighborhood of a global minimum and then to apply the MC algorithm on the result, for the local optimization, as is evidently seen from the performance of the RS + MC algorithm.
