# Frequency-Domain Characterization of Finite Sample Linear Systems with Uniform Window Inputs
## 2 Preliminary and Notations  
The input to the causal LTI system of interest is a uniform window function, \(x_{L}[n]=\left\{\begin{array}{ll}1,&0\leq n\leq L-1\\ 0,&\text{otherwise}\end{array}\right.\), and the output \(y[n]\)\(\left\{\begin{array}{ll}\
eq 0,&n=M-1\\ =0,&n\geq M\end{array}\right.\) has a finite non-zero length of \(M\). \(N\) is the length of zero-padded samples of the input and output. \(M\) can be regarded as the total number of samples of an FS-LTI system. For brevity, we use FS-LTI\((L,M,N)\) to denote an FS-LTI system with parameters \(L,M,N\) so defined. For such a system, the impulse response function (IRF), \(h[n]\), can be expressed as [3]  
\[h[n]=y[n]-y[n-1]+h[n-L]u[n-L], \tag{1}\]  
where \(u[n]\) is the unit step function. Let \(\mathbb{I}\) be the set for all the integers, \(\delta[n,L]\equiv\left\{\begin{array}{ll}1,&iff\frac{n}{L}\in\mathbb{I}\\ 0,&\text{otherwise}\end{array}\right.\) be the comb function, and \(\delta_{0+}[n,\ L]\equiv\delta[n,L]u[n]\) be the comb function for non-negative integers. The above expression can be alternatively written as  
\[h[n]=\sum_{i=0}^{\infty}y[n-iL]-\sum_{i=0}^{\infty}y[n-iL-1]\]  
\[=\sum_{m=0}^{M-1}y[m](\delta_{0+}[n_{m},\ L]-\delta_{0+}[n_{m}-1,\ L]), \tag{2}\]  
where \(n_{m}=n-m\). After \(\max(M-L+1,\ 0)\) points, the IRF of this simple marginally stable system is periodic with a period of \(L\). The total independent number of points to completely describe \(h[n]\) is \(M_{ind}=\max(M+1,\ L)\).  
Let \(\pi_{N}\equiv\frac{\pi}{N}\), \(W\equiv e^{-\int^{2\pi_{N}}}\), \(\mathbb{N=}\{0:N-1\}\), with \(0:N-1\) denoting consecutive integers from \(0\) to \(N-1\), inclusive. The discrete Fourier transform (DFT) of any \(x[n]\) is  
\[X[k]\equiv\sum_{n=0}^{N-1}x[n]W^{nk},\ k\in\mathbb{N}. \tag{3}\]Corresponding to the uniform window input function \(x_{L}[n]\), \(X_{L}[k]=\frac{1-W^{Lk}}{1-W^{k}}\), \(k\in\mathbb{N}\). The DFT of \(y[n]\) is \(Y[k]=\sum_{m=0}^{M-1}y[n]W^{mk}\), \(k\in\mathbb{N}\). The ratio of \(Y[k]\) to \(X_{L}[k]\) is  
\[H_{0}[k]\equiv\frac{Y[k]}{X_{L}[k]}=Y[k]\frac{1-W^{k}}{1-W^{kL}}. \tag{4}\]  
Let \(G_{LN}\) be the greatest common factor of \(L\) and \(N\), and \(\mathbf{k_{0}}\)\(\equiv\)\(\{k_{1}\),... \((G_{LN}-1)k_{1}\}\) with \(k_{1}\equiv\frac{N}{G_{LN}}\). We define  
\[Z[k]\equiv\left\{\begin{array}{cc}0&k\in\mathbf{k_{0}}\\ \frac{1-W^{k}}{1-W^{kL}}=e^{j\pi_{N}(L-1)k}\frac{sin(\pi_{N}k)}{sin(\pi_{N}L) }&k\
otin\mathbf{k_{0}}\end{array}\right., \tag{5}\]  
which is the inverse of \(X_{L}[k]\) with all its zeros set to zero. Further, we define  
\[H_{1}[k]\equiv Y[k]Z[k]. \tag{6}\]  
\(H_{1}[k]\) sets the poles of \(H_{0}[k]\) to zeros but otherwise is the same as \(H_{0}[k]\). The \(N\)-point inverse DFT (IDFT) of \(H_{1}[k]\) is  
\[h_{1}[n]\equiv\frac{1}{N}\sum_{k=0}^{N-1}H_{1}[k]W^{-nk}. \tag{7}\]  
All the parameters and variables \(i,\ k,\ l,\ m,\ n\) for both lower and upper cases, with or without subscripts, are integers. We use \(k\) and \(n\) for frequency- and time-domain indexing, respectively. The % symbol in the subscript indicates a modulo operation, e.g., \(N_{\%L}=mod(N,\ L)\). Similarly, \(N_{\%L}=floor(\frac{N}{L})\) is used for lower integer operations. With these notations, we can write \(N=N_{\#L}+N_{\%L}\). Note that the _floor_ operator rounds down for negative numbers, e.g., \(floor(-0.5)\ =\ -1\).  
We seek the IRF, \(h[n]\), from \(H_{0}[k]\) for FS-LTI(\(L,M,N\)) systems.