Attached is a picture of a simple control system in both $s$-domain and $z$-domain (bottom half is in $s$-domain, top half is in $z$-domain). I can't seem to get the $z$-domain version to work. I get an algebraic error loop unless I put in a $z^{-1}$ delay state, but I shouldn't have to, right? Even then the answer looks wrong. Sample time is $0.2$ so $e^{-2 \times 0.2}\approx0.67$.
Sorry, but I have never done a discrete control system in Simulink, and I am hoping someone will point out the obvious. Thanks!
How are you coming up with your discrete time model? For the plant, $G(s) = \frac{1}{s+2}$, the discretized plant using a zero-order hold on the input with sampling time $T=0.2$ gives $G_d(z) = \frac{0.1648}{z-0.6703}$. Since you have a discrete-time model for your plant, $G_d$, your signals in this block diagram are discrete-time signals. Therefore, you shouldn't need a zero-order hold in the top loop. Furthermore, if your intent is to use integral control in both feedback loops, the discrete-time integrater should be of the form $C_d(z) = \frac{T}{z-1}$, where $T$ is the sampling time. When I implement these changes to your block diagrams and run the simulation, I find results that match up to what I'd expect.
The reason you get an algebraic loop error is because the block diagram you have results in a system that is not strictly causal (the transfer function is not strictly proper). For more on causality, see here, and more on proper transfer functions, see here.