A second order disturbance-based model can be represented as follows:
$$\ddot{y}=f(y,\dot{y},w,t)+bu(t)$$
where $f(y,\dot{y},w,t)$ is generalized disturbance. This can be represented in continuous time state as:
$$\dot{x}=Ax(t)+Bu(t)+E\dot{f}(t)$$ $$y(t)=Cx(t)$$
where, $A= \begin{bmatrix} 0 & 1 & 0 \\ 0 & 0 & 1 \\ 0 & 0 & 0 \\ \end{bmatrix}$, $B=\begin{bmatrix}0\\b\\0\end{bmatrix}$, $C=\begin{bmatrix}1 & 0 & 0\end{bmatrix}$, $E=\begin{bmatrix}0\\0\\1\end{bmatrix}$ and $x=\begin{bmatrix}x_1\\x_2\\x_3\end{bmatrix}=\begin{bmatrix}y\\\dot{y}\\f\end{bmatrix}$.
When the above state space equation is discretized, we can get the following:
$$x(k+1)=\Phi x(k)+\Gamma u(k)+E_df(k+1)$$ $$y(k)=Cx(k)$$
My question is,
- Is the term $f(k+1)$ for discretized $\dot{f}(t)$ correct or should it be $f(k)$?
- How do you determine the term $E_d$ associated with $\dot{f}(t)$ using zero order hold?
In continuous time, you assume that $\dot{f}$ exists and can be written as a function $\xi(t):=\dot{f}(t)$. Then you can write your model as $$\dot{x}=Ax + Bu + E\xi$$ making the difference between the states and external inputs more explicit.
Following the same idea, in discrete time you have to assume the existence of a function $\Delta(k)$ such that $f(k+1)=f(k)+T_s\Delta(k)$, where $T_s$ is the sampling time. Then your model becomes $$x(k+1) = \Phi x(k) + \Gamma u(k) + E_d \Delta(k),$$ where the last line in $\Phi$ is $\begin{bmatrix}0 & 0 & 1\end{bmatrix}$ and $E_d = \begin{bmatrix}0 & 0 & T_s\end{bmatrix}^\top$.
Obviously, a good guess for $\Delta(k)$ is $$\Delta(k) = \frac{1}{T_s}\int_{t_k}^{t_{k+1}}\dot{f}(s)ds.$$