# INVSID 1.0: An Inverse System Identification Toolbox for MATLAB
## 1 Introduction  
Nowadays, in many motion control systems, there are requirements of high performance, such as short motion times and small settling times. To fulfill these demands, combining feedback with feedforward control is normally implemented [1]. Figure 1 displays how a feedforward controller can be involved in feedback control systems. In total, there are two kinds of modes. The feedback controller guarantees stability and improves disturbance rejection, while the feedforward controller enhances tracking performance such that the feedforward controller should be designed as \(F=G^{\dagger}\) (in the first mode) and \(F=G^{\dagger}_{\rm c}\) (in the second mode), where the symbol \"\({}^{\prime\dagger}\)\" denotes the Moore-Penrose pseudo-inverse [2]: So system inversion is the key to the problem of feedforward control. Actually, in addition to applications in control systems, system inversion is frequently used in the areas of sensor calibration, loudspeaker linearization, digital predistortion for radio frequency communications, and so on [3]. So system inversion plays an important role in various research areas. System inversion can be conducted by direct inversion and indirect inversion [4]. There exist several kinds of intrinsic limitations of direct inversion approaches; here, an example is used to illustrate this, denoting the transfer function of a finite-dimensional, discrete-time, single-input single-output, linear, constant dynamical system as  
Figure 1: Inverse model-based feedforward-feedback control (\(r\): reference signal; \(F\): feedforward controller; \(C\): feedback controller; \(G\): plant model; \(G_{\rm c}\): closed-loop system model; \(e\): error; \(f\): feedforward controller output; \(y\): control system output). \[G(z)=\mathbf{C}(z\mathbf{I}_{n}-\mathbf{A})^{-1}\mathbf{B}+D:=\left[ \begin{array}{c|c}\mathbf{A}&\mathbf{ B}\\ \hline\mathbf{C}&D\end{array} \right], \tag{1}\]  
where \(\mathbf{A}\in\mathbb{R}^{n\times n}\), \(\mathbf{B}\in\mathbb{R}^{n}\), \(\mathbf{C}\in\mathbb{R}^{1\times n}\), \(D\in\mathbb{R}\), \(\mathbf{I}_{n}\) denotes an \(n\)-dimensional identity matrix, and \((\mathbf{A},\mathbf{B},\mathbf{C},D)\) is a state-space realization of \(G(z)\). Based on (1), the inversion of \(G(z)\) can be represented as [5]  
\[G^{\dagger}(z):=\left[ \begin{array}{c|c}\mathbf{A}-\mathbf{B}D^{\dagger}\mathbf{C}&-\mathbf{ B}D^{\dagger}\\ \hline D^{\dagger}\mathbf{C}&D^{\dagger}\end{array} \right]. \tag{2}\]  
There are at least two challenges in the direct inversion (2). (i) When \(D^{\dagger}\) does not exist, the direct inversion cannot be conducted; (ii) when there exist nonminimum-phase zeros (For discrete-time systems, nonminimum-phase zeros are zeros that lie outside the unit disk) in \(G(z)\), the inversion \(G^{\dagger}(z)\) will be unstable. Due to the limitations of direct inversion approaches, various indirect inversion approaches have thus been proposed. A possible classification of existing indirect system inversion approaches consists in distinguishing between preview-based and non-preview-based approaches [4,6]:  
1. [label=()]
2. Preview-based inversion approaches can be further categorized into infinite preview-based approaches and finite preview-based approaches. Infinite preview-based approaches admit an exact stable inversion solution; however, such a solution may require an infinite pre-actuation [7, 8, 9, 10]. Because the length of the pre-actuation is proportional to the length of the desired output preview, infinite preview-based approaches are not applicable from a practical point of view. To handle the problem of applicability, finite preview-based approaches have been proposed [11, 12, 13, 14, 15, 16, 17, 18]. 3. Non-preview-based inversion approaches are preferred in practice. A family of approaches called pseudo-inversion, which can be conducted without preview, has been proposed [19, 20]. However, such approaches will encounter other problems such as the difficulty of choosing a suitable basis function.