I have my space model here:
$$ x_{\textrm{1},k+1} = x_{\textrm{1},k} - \frac{1}{R(x_{\textrm{2},k})C(x_{\textrm{2},k})} \cdot x_{\textrm{1},k} + \frac{1}{C(x_{\textrm{2},k})} \cdot i_k \quad(1)\\ x_{\textrm{2},k+1} = x_{\textrm{2},k} + \frac{1}{Q} \cdot i_k \quad(2)\\ y_k = x_{\textrm{1},k} + U_{\textrm{OCV}}(x_{{2},k}) + R_{\textrm{i}}(x_{{2},k}) \cdot i_k \quad(3)$$
with my state vector $x = \begin{bmatrix} x_{\textrm{1},k} & x_{\textrm{2},k} \end{bmatrix}^T$ and my output $y_k$.
Is my state space model linear or nonlinear? I'd say it is partly linear: the state transition functions (1) and (2) are linear with regard to the state vector because in (1) there's only $x_1$ involved in a linear fashion and in (2) there's only $x_2$ involved in a linear fashion which should be sufficient to consider this part of the system as linear, If I'm not mistaking. What's the best way to check is a system is linear?
whereas the output function part of my state space model appears to be nonlinear because $x_2$ occures in a nonlinear function two times.
So in conclusion I can use the standard Kalman Filter for (1) and (2) but have to use the nonlinear Extended Kalman Filter for (3). Right?
I'm asking because my ownimplementation in which I did what I described here is not very stable. And I've seen a better implementation when I just use the Matlab Simulink EKF-Block.
The first equation seems nonlinear to me. From your notation i assume that R and C are parameter depending on the states. So in general it is nonlinear because the update for $x_{1,k+1}$ is depending in a nonlinear way on $x_{2,k}$. The second one seems to be linear. The output equation is also nonlinear in general. So the system is in general nonlinear because there exist nonlinear dependencies.
A way to check if a system is linear is to try to write it as linear equations, i.e.
$x_{k+1} = Ax_{k} + Bu_{k}$
$y_{k} = Cx_{k} + Du_{k}$
where A,B,C,D are matrices or vectors that do not depend on the states and inputs and u is your input.