# INVSID 1.0: An Inverse System Identification Toolbox for MATLAB
## 2 Creation of INVSID 1.0
### Inverse Identification Approach  
A finite-dimensional, discrete-time, single-input single-output, linear, constant dynamical system \(G_{\mathrm{d}}\) which is minimal-realized (The system is minimal-realized if and only if it is both controllable and observable) and proper (The system is proper when the degree of the numerator does not exceed the degree of the denominator of its transfer function; otherwise, the system is improper  
Step 2: A set \(S\) containing \(N\) discrete-time sine signals is given as:  
\[S=\{u_{m}(k),m=1,2,\ldots,N\}, \tag{4}\]  
where  
\[u_{m}(k)=\sin(2\pi f_{m}kT_{n}), \tag{5}\]  
where \(f_{m}\) denotes the frequency in Hz, and the sequence \((f_{m})_{m=1}^{N}\) is an arithmetic sequence, each sine wave in the set \(S\) can be represented as the output of a state-space model \(G_{m}\), i.e.,  
\[ \begin{cases}\mathbf{x}_{m}(k+1)=\mathbf{A}_{m}\mathbf{x}_{m}(k),\\ u_{m}(k)=\mathbf{C}_{m}\mathbf{x}_{m}(k),\end{cases}  \tag{6}\]  
Figure 2: Flowchart of the proposed inverse system identification approach. (The symbol “\(\cdots\)” denotes the reconstructed or the estimated value). where \(\mathbf{x}_{m}(k)\in\mathbb{R}^{2}\) denotes the state vector of the model (6), and the matrices \(\mathbf{A}_{m}\) and \(\mathbf{C}_{m}\) can be denoted as  
\[\mathbf{A}_{m}= \begin{pmatrix}\cos(2\pi f_{m}T_{\mathrm{s}})&\sin(2\pi f_{m}T_{ \mathrm{s}})\\ -\sin(2\pi f_{m}T_{\mathrm{s}})&\cos(2\pi f_{m}T_{\mathrm{s}})\end{pmatrix}  \tag{7}\]  
and  
\[\mathbf{C}_{m}= \begin{pmatrix}1&0\end{pmatrix} , \tag{8}\]  
respectively. **Remark 1**. : The frequencies of the signals \(u_{m}(k)\) for \(m=1,2,\ldots,N\) in the set \(S\) can be specified by the following rule:  
\[f_{m}=f_{\mathrm{b}}+(m-1)d, \tag{9}\]  
where \(f_{\mathrm{b}}\) is a non-negative value, and \(d\) is a positive value. The rule in Equation (9) is not the only way to specify the frequencies. The values of \(f_{m}\) for \(m=1,2,\ldots,N\) belong to the range \((0,\frac{f_{\mathrm{b}}}{2})\) with \(f_{\mathrm{s}}=\frac{1}{T_{\mathrm{s}}}\). 1. If the signal \(u_{m}(k)\) is used as the input signal of the model (3), we can obtain \[ \begin{cases}\mathbf{x}_{\mathrm{d}}(k+1)=\mathbf{A}_{\mathrm{d}}\mathbf{x}_{\mathrm{d}}( k)+\mathbf{B}_{\mathrm{d}}u_{m}(k),\\ y_{m}(k)=\mathbf{C}_{\mathrm{d}}\mathbf{x}_{\mathrm{d}}(k)+\mathbf{D}_{\mathrm{d}}u_{m}(k), \end{cases} \] (10) where \(y_{m}(k)\) denotes the output of the model (3) when the input signal is \(u_{m}(k)\). By augmenting the model (10) with the state vector of the model (6), an augmented model \(G_{\mathrm{a},m}\) can be obtained, and it can be represented as  
\[ \begin{cases}\mathbf{x}_{\mathrm{a},m}(k+1)=\mathbf{A}_{\mathrm{a},m}\mathbf{x}_{\mathrm{ a},m}(k),\\ y_{m}(k)=\mathbf{C}_{\mathrm{a},m}\mathbf{x}_{\mathrm{a},m}(k),\end{cases}  \tag{11}\]  
where the state vector \(\mathbf{x}_{\mathrm{a},m}(k)\) can be denoted as  
\[\mathbf{x}_{\mathrm{a},m}(k)= \begin{pmatrix}\mathbf{x}_{\mathrm{d}}(k)\\ \mathbf{x}_{m}(k)\end{pmatrix} , \tag{12}\]  
and the matrices \(\mathbf{A}_{\mathrm{a},m}\) and \(\mathbf{C}_{\mathrm{a},m}\) can be denoted as  
\[\mathbf{A}_{\mathrm{a},m}= \begin{pmatrix}\mathbf{A}_{\mathrm{d}}&\mathbf{B}_{\mathrm{d}} \mathbf{C}_{m}\\ \mathbf{0}&\mathbf{A}_{m}\end{pmatrix}  \tag{13}\]  
and  
\[\mathbf{C}_{\mathrm{a},m}= \begin{pmatrix}\mathbf{C}_{\mathrm{d}}&\mathbf{D}_{\mathrm{d}} \mathbf{C}_{m}\end{pmatrix} , \tag{14}\]  
respectively.