# Continuous-Time Perfect Control Algorithm--A State Feedback Approach
## 4 New Perfect Control Law  
The perfect control algorithm has already been developed for discrete-time systems. The main property obtained for such procedure is minimum possible control error that vanquishes immediately after a single simulation step (for plants with unit state delay). In this particular work, we are targeting similar plant behavior, but for systems described in the continuous-time state-space framework. In both cases, the main concern is to minimize a performance index, which, for the continuous-time scenario, can be described as follows:  
\[J=||\mathbf{y_{ref}}(t)-\mathbf{y}(t)||_{2}, \tag{5}\]  
where symbols \(\mathbf{y_{ref}}(t)\) and \(\mathbf{y}(t)\) denote the reference value/setpoint and output of a system, respectively. Having such an index, we can attempt to obtain a similar minimum-error property as resulted in the discrete-time approach [31]. The study presented here is based on the important derivative of vector  
\[\dot{\mathbf{y}}(t)=\mathbf{C}\dot{\mathbf{x}}(t), \tag{6}\]  
allowing us to determine the operation of output variable. Now, aiming for the perfect control strategy with maximum accuracy (in terms of assumed norm (5)), we can introduce an equation minimizing the control error in the following manner  
\[\dot{\mathbf{y}}(t)=\mathbf{y_{ref}}(t+\Delta t)-\mathbf{y}(t). \tag{7}\]  
Of course, in such a scenario, the current control error is driven to zero immediately. However, at this moment, we need to acknowledge the fact, that solvers implemented in the Matlab environment are in fact based on nonzero fixed or adaptive step time \(\Delta t\); thus, we can unarguably write the subsequent formula  
\[\dot{\mathbf{y}}(t)=\frac{d\mathbf{y}(t)}{dt}\approx\frac{\mathbf{y}(t+ \Delta t)-\mathbf{y}(t)}{\Delta t}. \tag{8}\]  
Naturally, this assumption is valid under \(\Delta t\to 0\). It is clear now that the main aim here is to obtain system output behavior described by the following relation  
\[\dot{\mathbf{y}}(t)=\frac{\mathbf{y_{ref}}(t+\Delta t)-\mathbf{y}(t)}{\Delta t }, \tag{9}\]  
so the output error shall disappear right after the step time that is inherent to solver parameters. Once more, it is needed to emphasize that guaranteeing the output derivative equal to the current control error will minimize the performance index given in Equation (5). Now, using the output description from Equation (1), one can write the following outcome  
\[\mathbf{C}\dot{\mathbf{x}}(t)=\frac{\mathbf{y_{ref}}(t+\Delta t)-\mathbf{C} \mathbf{x}(t)}{\Delta t}, \tag{10}\]  
where all parameters are known for systems with given initial conditions. Based on the above, one can obtain the perfect control formula by the proper mathematical manipulations  
\[\mathbf{C}(\mathbf{A}\mathbf{x}(t)+\mathbf{B}\mathbf{u}(t))\Delta t= \mathbf{y_{ref}}(t+\Delta t)-\mathbf{C}\mathbf{x}(t). \tag{11}\]Now, the issue is to extract the control signal \(\mathbf{u}(t)\) from the above presented expression. This involves the crucial matrix inverse providing an infinite number of possible solutions for the discussed complex problem. Finally, let us introduce the perfect control law for continuous-time LTI MIMO state-space systems in the form of  
\[\mathbf{u}(t)=-(\mathbf{C}\mathbf{B})^{\mathrm{R}}\mathbf{C}(\mathbf{A}+ \mathbf{I}\frac{1}{\Delta t})\mathbf{x}(t)+(\mathbf{C}\mathbf{B})^{\mathrm{R}} \frac{1}{\Delta t}\mathbf{y_{ref}}(t+\Delta t), \tag{12}\]  
where superscript 'R' denotes any right inverse, particularly the right \(\sigma\)- and \(T\)-inverse covered in Section 3. Of course, for a zero reference value, the perfect control formula reduces to the perfect regulation as follows:  
\[\mathbf{u}(t)=-(\mathbf{C}\mathbf{B})^{\mathrm{R}}\mathbf{C}(\mathbf{A}+ \mathbf{I}\frac{1}{\Delta t})\mathbf{x}(t). \tag{13}\]  
Note that the dynamics of a plant can similarly be examined for both zero- and nonzero-referenced setpoints. **Remark 2**.