Got stack in calculating state-space representation
Model your deterministic input as a $2 \times 1$ matrix :

$$ \begin{bmatrix}
 u  \\
T_a \\
\end{bmatrix}  
$$

Then your state space equations will be:

$$ \begin{bmatrix} \dot x_1 \\ \dot x_2 \\ \dot x_3 \end{bmatrix} =  \begin{bmatrix}
 -\frac 13p &amp; \frac 13p &amp; 0 \\
p &amp; -(p+ \frac{c}{10}) &amp; \frac{c}{10} \\
0 &amp; \frac{c}{30} &amp; -(\frac{c}{30}+\frac a3)
\end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} + \begin{bmatrix} 0 &amp; 0 \\ v &amp; 0 \\ 0 &amp; a/3 \end{bmatrix} \begin{bmatrix} u \\ T_a\end{bmatrix} $$