I have a lower-triangular matrix $T_{ij}$ wich can be decomposed in block form (say $m\times m$) as: \begin{eqnarray} T= \left(\begin{matrix} A & ... & ...&0\\ B & A& ... & 0\\ 0 & B & \ddots & \vdots\\ 0 & ...& B&A \end{matrix}\right) \end{eqnarray} where each $A,B$ are of dimension $N\times N$. I am facing a problem to factorise this matrix so that: \begin{eqnarray} F = U^{\dagger}.T.U \end{eqnarray} with $U$ being unitary, and where the resulting blocks of $F$ are all diagonal, that is, for arbitrary $n,k\in[0,...,m-1]$: \begin{eqnarray} F_{nm}=f_{ij}\delta_{ij} \end{eqnarray} with $i,j\in[0,N-1]$. I have tried so far to make a block decomposition as follows: \begin{eqnarray} F_{nm} =\sum_{s=0}^{m-1}\left(U^{\dagger}_{ns}\right).A.\left(U_{sm}\right) + \sum_{s=0}^{m-2}U_{n,s+1}^{\dagger}.B.U_{s,m} \end{eqnarray} and now I know $F_{nm}$ is diagonal; moreover, I know the diagonal entries. However, I am still stuck on how to determine the $U$ matrix elements.
Method tried so far: There are even more restrictions in the $A,B$ matrices, for instance, $A_{ij}\propto a_{ii}\delta_{ij}+ a_{i+1,i}$ with all the other elements being 0. The matrix $B$ only has a single matrix element at $B_{ij}=b\delta_{i0}\delta_{j,N-1}$. If we take that into account, an equation of the off-diagonal elements can be obtained as: \begin{eqnarray} (k\neq k') &&\sum_{s=0}^{m-1}\sum_{k_{1}=0}^{N-2}\left(U^{\dagger}_{nk,s,k_{1}+1}\right).a_{k_{1}+1,k_{1}}.\left(U_{s,k_{1};mk'}\right) = -\sum_{s=0}^{M-2}\left(U^{\dagger}_{nk,s+1,0}\right).b.\left(U_{s,N-1;mk'}\right) \end{eqnarray} and also for $k=k'$. However I don't know how to proceed from here on determining the $Q$ matrix elements, and I suspect there has to be an easier way to do this? Can anyone give some advice here? Thanks.
EDIT: The transformation does not need to be unitary necessarily. The structure of the $F_{nm}=B_{n,q}\delta_{n-m,q}$. This simplifies the system, as we can now write $F=U^{\dagger}.T.V$ using that: \begin{eqnarray} U^{\dagger}_{ns}=\frac{1}{\sqrt{m}}e^{i2\pi(s-n)/M}U^{\dagger}_{n}; && V_{sn} = \frac{1}{\sqrt{M}}e^{-i2\pi(s-n)/M}V_{n} \end{eqnarray} and I arrive to the following system (fixed $n$, solve for all $q$): \begin{eqnarray} B_{q,n}e^{i2\pi q/M} = U^{\dagger}_{n}.\left[A+Be^{i2\pi/M}\right].V_{n\pm q} \end{eqnarray} All blocks $B_{q,n}$ are diagonal $N\times N$ complex matrices; however I don't know how to calculate the $U_{n},V_{n}$ from here. If I take $q=0$ then: \begin{eqnarray} B_{0n} = U_{n}^{\dagger}.( A+ Be^{i2\pi/M} ).V_{n} \end{eqnarray} is a diagonal matrix on the lhs. So this is a diagonalization problem if $U^{\dagger}_{n}=V_{n}$. If I try to obtain the eigenvectors with $A_{ij}\propto a_{ii}\delta_{ij}+ a_{i+1,i}$ and $B_{ij}=b\delta_{i0}\delta_{j,N-1}$, I obtain always the zero eigenvector due to the structure of the $A+Be^{i2\pi/M}$ matrix, what am I doing wrong here?