So, I am trying to create a discrete model of a first-order plus deadtime response for use in a microcontroller. So far, I have the Z-domain equation below.
$$ K_p e^{-\theta_p{Z-1\over T}}\over{T_p}(Z-1)+1$$
$K_p$, $T_p$, and $\theta_p$ are constants, $T$, in this case is sample time. I am trying to find the inverse Z-transform, so I can make a discrete model in code. The part that is tripping me up is the exponential, $e^{-\theta_p{Z-1\over T}}$. I'm not sure how to go about solving an inverse Z-transform with an exponential.
You have a continous first order transfer function with gain $K_p$, time constant $T_p$ and time delay $T_d$:
$$ G(s) = \frac{K_p}{T_p s + 1} e^{-T_d s} \tag{1} $$
The z-transform of a general transfer function with zero-order hold (ZOH) sampling and sampling time $T_s$ is
$$ G_d(z) = \frac{z - 1}{z}Z \Big\{ L^{-1} \Big\{ \frac{G(s)}{s} \Big\} \Big|_{t = k T_s} \Big\} \tag{2} $$
Lets assume that your time delay $T_d$ is an integer multiple of your sample time $T_s$, so that $T_d = m \, T_s$ or equivalently, $m = T_d/T_s$ with $m \in \mathbb{N}$. Then by $(1)$ and $(2)$ you get
$$ G_d(z) = \frac{K_p \Big(1 - e^{-\frac{T_s}{T_p}} \Big)}{z^{m + 1} - z^m e^{-\frac{T_s}{T_p}}} = z^{-m} \frac{K_p \Big(1 - e^{-\frac{T_s}{T_p}} \Big)}{z - e^{-\frac{T_s}{T_p}}} \tag{3} $$
Here you dont have any exponentials with $z$, so your z-transform seems to be wrong.
Example: Use $K_p = 1$, $T_p = 0.5$, $T_d = 0.2$ and $T_s = 0.1$. Then by $(3)$ you get
$$ G_d(z) = z^{-2}\frac{1 - e^{-0.2}}{z - e^{-0.2}} \approx z^{-2} \frac{0.1813}{z - 0.8187} $$
That should now be easy to convert into a difference equation.