Given a state space model of the following form,
$$
\dot{x} = A\,x + B\,u, \tag{1}
$$
$$
y = C\,x + D\,u. \tag{2}
$$
The openloop transfer function of this system can be found by taking the Laplace transform and assuming all initial conditions to be zero (such that $\mathcal{L}\{\dot{x}(t)\}$ can just be written as $s\,X(s)$). Doing this for equation $(1)$ yields,
$$
s\,X(s) = A\,X(s) + B\,U(s), \tag{3}
$$
which can be rewritten as,
$$
X(s) = (s\,I - A)^{-1} B\,U(s). \tag{4}
$$
Substituting this into equation $(2)$ and defining the openloop transfer function $G(s)$ as the ratio between output ($Y(s)$) and input ($U(s)$) yields,
$$
G(s) = C\,(s\,I - A)^{-1} B + D. \tag{5}
$$
In a normal block diagram representation the controller has as an input $r-y$, with $r$ the reference value you would like to have for $y$, and an output $u$, which would be the input to $G(s)$. For now $r$ can be set to zero, so the controller can be defined as the transfer function from $-y$ to $u$.
For an observer based controller ($L$ and $K$ such that $A-B\,K$ and $A-L\,C$ are Hurwitz) for a state space model we can write the following dynamics,
$$
u = -K\,\hat{x}, \tag{6}
$$
$$
\dot{x} = A\,x - B\,K\,\hat{x}, \tag{7}
$$
$$
\dot{\hat{x}} = A\,\hat{x} + B\,u + L(y - C\,\hat{x} - D\,u) = (A - B\,K - L\,C + L\,D\,K) \hat{x} + L\,y. \tag{8}
$$
Similar to equations $(1)$, $(2)$ and $(5)$, the transfer function of the controller $C(s)$, defined as the ratio of $U(s)$ and $-Y(s)$, can be found to be,
$$
C(s) = K\,(s\,I - A + B\,K + L\,C - L\,D\,K)^{-1} L. \tag{9}
$$
If you want to find the total openloop transfer function from "$-y$" to "$y$" you have to keep in mind that in general $G(s)$ and $C(s)$ are matrices of transfer functions, so the order of multiplication matters. Namely you first multiply the error ($r-y$) with the controller and then the plant, the openloop transfer function can be written as $G(s)\,C(s)$. The closedloop transfer function can then be found with,
$$
\frac{Y(s)}{R(s)} = (I + G(s)\,C(s))^{-1} G(s)\,C(s). \tag{10}
$$
It can also be found directly using equations $(2)$ and $(6)$, and the closedloop state space model dynamics,
$$
\begin{bmatrix}
\dot{x} \\ \dot{\hat{x}}
\end{bmatrix} = \begin{bmatrix}
A & -B\,K \\
L\,C & A - B\,K - L\,C
\end{bmatrix} \begin{bmatrix}
x \\ \hat{x}
\end{bmatrix} + \begin{bmatrix}
0 \\ -L
\end{bmatrix} r, \tag{11}
$$
$$
\frac{Y(s)}{R(s)} = \begin{bmatrix}
C & -D\,K
\end{bmatrix} \begin{bmatrix}
s\,I - A & B\,K \\
-L\,C & s\,I - A + B\,K + L\,C
\end{bmatrix}^{-1} \begin{bmatrix}
0 \\ -L
\end{bmatrix}. \tag{12}
$$
If your system is of the form
$$
\dot{x} = A\,x + B\,u + f \\
y = C\,x + D\,u + g \tag{1}
$$
with $f$ and $g$ constant vectors, then you can do a coordinate transformation $z=x+\alpha$ and $v=u+\beta$ with $\alpha$ and $\beta$ constant vectors which satisfies
$$
\begin{bmatrix}
A & B \\ C & D
\end{bmatrix}
\begin{bmatrix}
\alpha \\ \beta
\end{bmatrix} =
\begin{bmatrix}
f \\ g
\end{bmatrix}. \tag{2}
$$
This can always be solved if the $(A,B,C,D)$ matrix is full rank and if this is not the case when the vector of $(f,g)$ lies in the span of the $(A,B,C,D)$ matrix. After this transformation the dynamics will simply be
$$
\dot{z} = A\,z + B\,v \\
y = C\,z + D\,v. \tag{3}
$$
However if it is required that $u=f(y)$, with $f(0)=0$ and $f(-y)=-f(y)$, then this transformation will only work if the value found for $\beta$ is zero. If $\beta\neq0$ or the system of equation in $(2)$ is not solvable, then you could resort to extending the state space by one state $\xi$, whose time derivative is always zero. If the initial condition of $\xi$ is one, then the same dynamics as $(1)$ will be obtained when using the following extended state space model
$$
\begin{bmatrix}
\dot{x} \\ \dot{\xi}
\end{bmatrix} =
\begin{bmatrix}
A & f \\ 0 & 0
\end{bmatrix}
\begin{bmatrix}
x \\ \xi
\end{bmatrix} +
\begin{bmatrix}
B \\ 0
\end{bmatrix} u \\
y =
\begin{bmatrix}
C & g
\end{bmatrix}
\begin{bmatrix}
x \\ \xi
\end{bmatrix} + D\,u. \tag{4}
$$
Best Answer
You can augment the state vector with $f$ such that $$x_{ag}:=\left[\matrix{x\\ f}\right]$$ Then we can write equivalently $$\dot{x}_{ag}=\left[\matrix{\dot{x}\\ \dot{f}}\right]=\left[\matrix{Ax+Bu\\ 0}\right]=\left[\matrix{A & 0\\ 0 & 0 }\right]x_{ag}+\left[\matrix{B\\ 0}\right]u$$ and $$y=Cx+f=\left[\matrix{C & I}\right]x_{ag}$$ which is now in the standard state-space form.