# Mixed - Discrete and Continuous system Laplace domain stability - Effect of Sampler and DAC

I have a system whose the plant transfer function is continuous and the compensation is discrete. I have an ADC which allows to measure the output of the system and a DAC which allows to control the plant transfer function. The compensation is very slow with respect to the plant transfer function and it slows down the dynamics of the whole system.

I want to improve the discrete compensation by modelling the whole system and then build a compensation for achieve the performances whished. For this, firstly I would build a compensation into the s domain and then I will discretize it by the tustin method. Nevertheless, I want to have the effect of the discretization into the s domain otherwise my system could be stable in the s domain but it would be unstable into the z domain. So I need to place a ZoH for the DAC and use the padé approximation to get the ZoH transfer function into the s domain. But How can I do for having the effect of the sampler which is as slow as the DAC. I need to place a ZoH, ie to place a second padé approximation ?

Have a nice day,

• For starters, an ideal ADC should not be modeled by a ZOH - Padé approximation unless there is some significant sampling delay inside the ADC. – Ben Jun 16 at 23:21
• @Ben Thank you for your reply. There will be significant delay in my case :) – Jess Jun 17 at 6:21
• May I ask why? An ADC is a control loop should have minimal delay, for example a sigma-delta ADC is not appropriate – Ben Jun 17 at 11:50
• @Ben You re right ! My problem was not correctly raised ! The delay is not coming from the ADC but form the software which ask to the ADC the sensed value every 50µs. – Jess Jun 17 at 12:26

You can model the effect of the various delays and still work in the s-domain. Your DAC can be modeled as a zero-order-hold with a T period. In the s-domain you could model the zero-order-hold by a $$\frac{T}{2}$$ delay or $$e^{\frac{-Ts}{2}}$$. While this is not technically accurate, it should be good enough.
Secondly, your software must have some kind of processing delay, It cannot be more than T otherwise you'd miss ADC samples and you would get some weird dangerous behaviour. This delay $$T_{comp}$$ can also be model with the quation $$e^{\frac{-T_{comp}s}{2}}$$
The overall delay can be modeled as $$e^{\frac{-(T_{comp} + T_s) s}{2}}$$.
An alternative solution, would be to model everything in the z-domain, however I'm not 100% sure on how you could model a computational delay less than $$T_s$$