## 4 Simulation Examples  
In this section, we use two numerical examples to illustrate the optimal policy for the constrained LQ control problem (3).  
**Example 1**.: _We consider a stochastic LQ system with \(x_{0}=10\), \(m=3\), \(A=0.8\), and \(B=(-0.35,0.18,0.25)^{\prime}\). The cost matrix is_  
\[\mathbf{R}=\begin{pmatrix}1.2&0.6&0.4\\ 0.6&1.8&0.2\\ 0.4&0.2&2.4\end{pmatrix}\,,\text{ and }Q=1.2.\]  
_For time \(l=0,1,\cdots\), the variance of the 0-mean i.i.d. Gaussian noise \(\xi_{l}\) is \(\sigma^{2}=0.25\). We consider the conic constraint \(\mathbf{u}\geq 0\). By applying Theorem 1, the stationary optimal control is \(\mathbf{u}_{l}^{*}(x_{l})=\hat{\mathbf{K}}^{*}x_{l}\mathbf{1}_{x_{l}\geq 0}- \hat{\mathbf{K}}^{*}x_{l}\mathbf{1}_{x_{l}<0}\), for \(l=0,1,\cdots\), where \(\hat{\mathbf{K}}^{*}=(0.574,0,0)^{\prime}\), \(\hat{\mathbf{K}}^{*}=(0,0.250,0.270)^{\prime}\), \(\hat{\mathbf{G}}^{*}=2.773\) and \(\hat{\mathbf{G}}^{*}=3.473\). Furthermore, the optimal reward performance is \(\eta^{*}(x_{0})=\hat{\mathbf{G}}^{*}x_{0}^{2}\mathbf{1}_{x_{0}\geq 0}+\bar{ \mathbf{G}}^{*}x_{0}^{2}\mathbf{1}_{x_{0}<0}=623.987\)._  
As shown in Figure 0(a) plots the outputs \(\bar{\mathbf{G}}^{*}\) and \(\hat{\mathbf{G}}^{*}\) with respect to iteration time \(K\); Figure 0(b) plots the state trajectories of 50 samples by setting \(x_{0}=10\) and implementing the stationary optimal control \(\mathbf{u}^{*}\). It can be observed that \(x_{l}^{*}\) converges to 0 after time \(l=20\) and this closed loop system is asymptotically stable.  
Figure 1: The simulation results of Example 1.  
**Example 2**.: _In the second case, we assume \(x_{0}=10\), \(A\) and \(B\), following the identical discrete distribution with five cases. We assume \(A\in(-0.7,-0.6,0.9,1,1.1)\), and_  
\[B\in\Big{\{}\left(\begin{array}{c}0.18\\ -0.05\\ -0.140\end{array}\right),\left(\begin{array}{c}0.03\\ -0.12\\ -0.03\end{array}\right),\left(\begin{array}{c}-0.05\\ 0.05\\ 0.05\end{array}\right),\left(\begin{array}{c}-0.01\\ 0.05\\ 0.01\end{array}\right),\left(\begin{array}{c}-0.05\\ 0.01\\ 0.06\end{array}\right)\Big{\}},\]  
_each of which has the same probability 0.2. The cost matrix is_  
\[\mathbf{R}=\begin{pmatrix}1.5&0.6&0.4\\ 0.6&1.5&0.2\\ 0.4&0.2&2.5\end{pmatrix},\text{ and }Q=1.5.\]  
_For time \(l=0,1,\cdots\), the variance of the 0-mean i.i.d. Gaussian noise \(\xi_{l}\) is \(\sigma^{2}=0.25\). We consider the conic constraint \(\mathbf{u}\geq 0\). By applying Theorem 1, the stationary optimal control is \(\mathbf{u}_{l}^{*}(x_{l})=\hat{\mathbf{K}}^{*}x_{l}\mathbf{1}_{x_{l}\geq 0}- \hat{\mathbf{K}}^{*}x_{l}\mathbf{1}_{x_{l}<0}\), for \(l=0,1,\cdots\), where \(\hat{\mathbf{K}}^{*}\) and \(\hat{\mathbf{K}}^{*}\) are identified as follows, \(\hat{\mathbf{K}}^{*}=(0.259,0.100,0.130)^{\prime}\), \(\hat{\mathbf{K}}^{*}=(0.100,0.500,0.100)^{\prime}\), \(\hat{\mathbf{G}}^{*}=4.111\) and \(\hat{\mathbf{G}}^{*}=3.859\). Furthermore, the optimal reward performance is \(\eta^{*}(x_{0})=\hat{\mathbf{G}}^{*}x_{0}^{2}\mathbf{1}_{x_{0}\geq 0}+\bar{ \mathbf{G}}^{*}x_{0}^{2}\mathbf{1}_{x_{0}<0}=489.23\)._  
As shown in Figure 1(a) plots the outputs \(\hat{\mathbf{G}}^{*}\) and \(\hat{\mathbf{G}}^{*}\) with respect to iteration times \(K\); Figure 1(b) plots the state trajectories of 50 samples by setting \(x_{0}=10\) and implementing the stationary optimal control \(\mathbf{u}^{*}\). It can be observed that \(x_{l}^{*}\) converges to 0 after time \(l=35\) and this closed loop system is asymptotically stable.  
Figure 2: Simulation Results of Example 2.