I have developed an embedded electronics system centered around the Arduino Due. In my application, I am controlling the force of the end effector of a rigid object using a DC motor. The feedback force sensor has a lot of dead-time and I am unable to get the performance I expect with a standard PID. I am now looking into model predictive control, however at first I will try to use a Smith predictor. To do this, we need to develop an internal model describing the system we have. I have never done this and I need some guidance on formulating a discrete model and implementing it in C++/Arduino.
So far, I developed a continuous-time model based off of input-output data using System Identification Toolbox in MATLAB. Then I performed appropriate discretization (zero-order hold) to get a discrete model, \$H(z)\$, in the z-domain. To implement this in C++/Arduino I believe I am supposed to perform the inverse z-transform to get \$h[n]\$. \$h[n]\$ is then written in a interrupt service routine (ISR) to get the model output.
For instance, my continuous model is:
$$H = \frac{1}{5s+10}$$
Using zero-order hold at 100 Hz, the discrete model is:
$$H_{zoh} = \frac{0.00198}{z-0.9802}$$
Sample time: 0.01 seconds
Using the z-transform table, the inverse \$h[n]\$ is:
$$h[n] = 0.00198 \cdot \mathcal{H}(n-1) \cdot 0.9802^{(n-1)}$$
So far, is what I have been doing on the right track? If so, how would I implement this in an ISR?