Let's say I have a Kalman filter with this simple state model:
$$\begin{pmatrix} x^0_{k+1}\\ x^1_{k+1}\\ \end{pmatrix} = \begin{pmatrix} 1 & \Delta t\\ 0 & 1\\ \end{pmatrix} \begin{pmatrix} x^0_{k}\\ x^1_{k}\\ \end{pmatrix} + \mathbf{w_k} \tag 1$$
where $x^1$ is the time derivative of $x^0$, and $\mathbf{w_k}$ is process noise. This model describes properly the system as long as there is no significant external perturbation like temperature variation, because $x^1$ is an unknown function of temperature. Assuming as a first approximation that this function of temperature is linear I add the temperature derivative of $x^1$ to the model which become for a small temperature step $\Delta T = T_{k+1}-T_k$:
$$\begin{pmatrix} x^0_{k+1}\\ x^1_{k+1}\\ x^2_{k+1}\end{pmatrix} = \begin{pmatrix} 1 & \Delta t & \Delta t \Delta T\\ 0 & 1 & \Delta T\\ 0 & 0 & 1 \end{pmatrix} \begin{pmatrix} x^0_{k}\\ x^1_{k}\\ x^2_{k} \end{pmatrix} + \mathbf{w_k} \tag 2 $$
This linear approximation works well in estimating $x^2$ as long as a small temperature range is covered but is not consistent when the full temperature range is taken into account because the non-linearity of $x^1(T)$ comes in. How can I include a non-linear temperature behavior in the model ?
An idea I have is to decompose the non-linear temperature behavior in piecewise linear temperature segments, adding as much variables to the state vector as there are linear behavior segments, with something like
$$\begin{pmatrix} x^0_{k+1}\\ x^1_{k+1}\\ x^2_{k+1} \\ ... \\ x^n_{k+1}\end{pmatrix} = \begin{pmatrix} 1 & \Delta t & \Delta t \Delta T_{x^2} & ... & \Delta t \Delta T_{x^n}\\ 0 & 1 & \Delta T_{x^2} & ... & \Delta T_{x^n}\\ 0 & 0 & 1 &... & 1 \\ ... & ...& ... &...&... \\ 0 &0 &0&... &1 \end{pmatrix} \begin{pmatrix} x^0_{k}\\ x^1_{k}\\ x^2_{k} \\ ... \\ x^n_k \end{pmatrix} + \mathbf{w_k} \tag 3 $$
where $ \Delta T_{x^i} = \Delta T $ if $ T_i < T <T_{i+1}$, or else 0.
Is this approach OK ? is there a more standard way to do this ?
I've read about extended Kalman filters (EKF) but it seems to me that EKF is appropriate for non-linear system dynamics, but here I consider my system still has linear time-dynamics but the non-linearity comes from an "external" effect so I don't know how I would apply the EKF approach to this particular case.