Controllability's dependence on B matrix Assuming the LTI system:
$\dot{x}=Ax+Bu\\$ , where $x\in R^n$
I understand that 


*

*the $B$ matrix is usually given, and it is up to us to derive the optimal $u$ given an initial state of the system and a desired state where we want the system to arrive, in a finite time 

*a full-diagonal $B$ matrix could guarantee global controllability for the system  

*any $B$ matrix has to be dependent on the system and the application


In case the $B$ matrix is not a priori given, how could we cook up the "ideal" $B$ matrix, or at least any possible matrix that can render the system controllable? Let's consider that we have the freedom to choose the placement of actuators (see comments below)
potential ways, that might or might not be correct:


*

*calculating the controllability matrix for any possible combination and keep those combinations that offer ideally global controllability, or at least the maximum rank of the controllability matrix. But this is computationally too demanding

*through PBH test, finding the eigenvalues of $A$ matrix and accordingly deciding for the minimum and maximum number of columns of $B$ matrix. But this implies that we know or can find, the values of the components of the $B$ matrix

 A: The PBH test would to me seem the way to go. Namely this requires
$$
\text{rank}\!\left(
\begin{bmatrix}
B & A - \lambda\,I
\end{bmatrix}
\right) = n, \tag{1}
$$
or equivalently
$$
x^\top
\begin{bmatrix}
B & A - \lambda\,I
\end{bmatrix}
\begin{bmatrix}
B & A - \lambda\,I
\end{bmatrix}^\top
x > 0, \ \forall\,x\neq0. \tag{2}
$$
Expanding this yields
$$
x^\top B\,B^\top x + x^\top (A - \lambda\,I)\,(A - \lambda\,I)^\top x > 0, \tag{3}
$$
where the quadratic term in $A$ is only zero for $\lambda$ any eigenvalue of $A$ and $x$ a linear combination of eigenvectors corresponding to that eigenvalue (however often eigenvalues are simple so there would be only one corresponding eigenvector). The pair $(A,B)$ is therefore controllable if $B^\top v\neq 0$ for $v$ all vectors in the span of eigenvectors corresponding to each eigenvalue $\lambda_i$ of $A^\top$. In other words $B^\top V_i$ needs to be full rank, where the columns of $V_i$ are the eigenvectors corresponding to eigenvalue $\lambda_i$.

For example when
$$
A = 
\begin{bmatrix}
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 2
\end{bmatrix},
$$
yields 
\begin{align}
\lambda_1&=1, \quad V_1 = 
\begin{bmatrix}
1 & 0 \\
0 & 1 \\
0 & 0
\end{bmatrix}, \\
\lambda_2&=2, \quad V_2 = 
\begin{bmatrix}
0 \\
0 \\
1
\end{bmatrix},
\end{align}
so from $V_1$ it follows that $B$ should have at least two columns. If instead the matrix is changed slightly to
$$
A = 
\begin{bmatrix}
1 & 1 & 0 \\
0 & 1 & 0 \\
0 & 0 & 2
\end{bmatrix},
$$
yields 
\begin{align}
\lambda_1&=1, \quad V_1 = 
\begin{bmatrix}
0 \\
1 \\
0
\end{bmatrix}, \\
\lambda_2&=2, \quad V_2 = 
\begin{bmatrix}
0 \\
0 \\
1
\end{bmatrix},
\end{align}
so a single column for $B$ should be enough in this case. So it can be noted that repeated eigenvalues do not always require a higher number of columns of $B$.
