Zero order hold -- Discrete control systems

In summary, the computer interface needs to handle discrete values, which is where the ZOH comes in. The ZOH circuit simulates the effect of the discrete controller on the continuous input. It is necessary to take into consideration the ZOH effect when converting from the s-domain to the z-domain.
  • #1
Razvan
53
0
I have some questions related to how a discrete control system is designed.
One method is to design the controller in the continuous time domain, arriving at a transfer function (in the s-domain). After that, a transfer function for the ADC system must be taken into consideration. I will suppose a zero order hold circuit is used. So, before finding the transfer function in the z-domain, we multiply our initial transfer function with the transfer function of the ZOH circuit (##G_{ZOH}(s) = \frac{1-e^{-sT}}{s}##). After that, we can transform the overall transfer function from the s-domain to the z-domain. After we have the z transfer function, we can design an algorithm to compute the current output based on past input and/or output.

My question is why do we need the ZOH circuit. I think it is because adding it to the system (in the s-domain) we get a simulation of how the discrete system will behave. We force the continuous transfer function to have a constant input throughout one "sampling period". Is this correct? But why do we keep it when converting from s-domain to z-domain?
 
Engineering news on Phys.org
  • #2
Razvan said:
My question is why do we need the ZOH circuit.
Most ADC need a constant input while converting, therefore some Sample-and-Hold is necessary. Even if you use a super-fast tracking ADC, your digital circuit cannot read the input more than once per processing cycle.
 
  • #3
The ultimate goal of such a design is to get to a difference equation which can be implemented using a "computer", correct? So why do I need to take into consideration the effect of the ZOH when converting to the z-domain? If from the s-domain I realize that the input signal needs to be integrated, why isn't enough for me to come up with a difference equation like output(kT) = output(k(T-1)) + input(kT)? Why do I need to also consider the ZOH effect?
 
  • #4
Say you have a resistor (2Ω) which you supply by a voltage V = 24V.

You get a output current through the resistor: I = U/R = 12A. The transfer function H(z)= Iout(z)/Vin(z) = 0.5.

Now you make a model of the resistor that just measures the input ( Vin ) through a switch that is closed very shortly at the start of every sample period, then it multiplies the measured input by 0,5 and transfers the result as an output. The output will look like this:

| | | | | | |

which has nothing with constant 12A current to do. Therefore the integration in a ZOH-circuit that will give you the correct output: A constant current = 12A
 
  • #5
If I were to write the "algorithm" for such a system, wouldn't it be simply:

read(Vin);
Vout = Vin/2; // output = {previous outputs} + {previous/current inputs}, the difference equation the z transform represents
output(Vout); ?

And this sequence would be executed at the beginning of every sample period. It is true that I need to hold the output constant during the sampling period, but I do not need to take it into consideration when designing the "algorithm".
 
  • #6
Razvan said:
output(Vout)

I assume that you write the Vout-value to some latch, connected to a DA-converter:

DP8481-pinout.jpg


Here the /STR input is connected to the /WR signal and thereby a ZOH is included in your example, as the latch will "hold" the value until next sample period ( next output ).

Doing so physically, you must include it in your math. Otherwise the math-world will not match the physics-world.
 
Last edited:
  • #7
Let's take a concrete example of a continuous controller, like G(s) = (s+2)/(s+10). It has a G(z) equivalent. Having the transfer function, I can create the algorithm based on the difference equation. Now, if I consider a sampler + a ZOH before the controller, I get a new transfer function, ##G'(s) = \frac{1-e^{-sT}}{s} \frac{s+2}{s+10}##. This has another equivalent G'(z), which results in another difference equation. My problem is why I need to "add" the effect of the ZOH in the difference equation. Isn't the ZOH like a "consequence" of using a digital controller? Thank you for your time.
 
  • #8
Say you have an analog controller, wherein there is many tranfer function blocks so as the total analog transfer function could be

T(s) = A(s) * B(s) * C(s)

You know ( I hope ) that T(z) A(z) * B(z) *C(z), so you must calculate the z-transform for T(s) as a whole. There is no problem here.

The "problem" arises when the interface in your controller/computer samples an analog input. In fact the analog signal is cut into "spikes" (discrete values) that are handled as spikes through the computer (just discrete signals). But having calculated a control-loop the output is not represented as spikes. Somewhere in the controller there is a ZOH so that the output will be a series of step-functions ( not pulse-functions ). You cannot tune/calculate parameters for filters in your program without regard to that this ZOH takes place. Your calculations will be wrong because a step-function is different from a pulse-function. You can say that the problem arises because the discrete signals in the controller crosses the interface and in the outside world changes "shape" from af pulse-signal to a step-function signal.

Assuming that the time-delay as for the calculations = 0, you need only one ZOH, despite there may be more filters in series in your controller and that the plant is included somehow in the control-loop.

In practice there is a "work-around" for all these problems with ZOH, time-delays, and so on: Simply program your controller to output some (known) function, sample some data from the response from the plant ( the output is time-delayed by a "dummy code", simulating the calculation delay ): From the output and response-data you can exact calculate the tranfer function as for the plant, included ZOH, time-delays, etc.
 
Last edited:
  • #9
I still don't think I understood correctly, I apologize. If I want to simulate what will happen, then yes, I need to add the effect of the ZOH to the computation. But when writing the algorithm, why exactly do I need to "create" myself the effect of the ZOH inside the controller? Isn't this effect happening and I somehow need to take care of that, not adding this possibly unwanted effect? Everywhere on the Internet, the effect of the ZOH added before the controller is considered when transforming from s to z domain. Is this only for the purpose of simulating what happens, but it is not used when actually designing the controller? Is there any source from which I could study these topics?
 
  • #10
Razvan said:
why exactly do I need to "create" myself the effect of the ZOH inside the controller?

You don't have to "create" the ZOH as for physical reasons, because it is already there physically.

But you have to create in your math, because the math must know about it to work proporly. You are telling the math of the existence by adding:

(1 - e-sT) / s before doing the z-transform.

You may try to make a simple RC-circuit. Calculate a transfer function H(s) = Uout(s) / Uin(s).
z-transform H(s) → H(z).
Calculate the output from H(z) when Uin(z) = 1: Does it look reasonable?

Now add the ZOH. Try again.
 
  • #11
This is what the output looks like for an RC circuit with R=C=1, the output being the voltage on the capacitor and the input a unit step. The plot is made both using a ZOH and not using a ZOH. Are my computations correct? When considering a ZOH, the input must be considered as being sampled, so a series of impulses. Is this correct?
 

Attachments

  • RC response.png
    RC response.png
    51.4 KB · Views: 771
  • #12
You have shown the output of H(s) with/without ZOH. ( nothing is sampled here ).

I'd see the output of H(z) with/without ZOH.
 
  • #13
I just wanted to make sure it is correct. These are the plots for the z transforms. I don't know how to plot only at discrete values. Are these correct?
 

Attachments

  • RC response.png
    RC response.png
    19.2 KB · Views: 783

1. What is a zero order hold in discrete control systems?

A zero order hold is a type of digital filter used in discrete control systems. It holds the input signal at a constant value for a specific period of time, resulting in a piecewise-constant output signal. This is useful for converting continuous-time signals into discrete-time signals, which are necessary for digital control systems.

2. How does a zero order hold differ from other types of digital filters?

Unlike other digital filters, a zero order hold does not use any mathematical operations to modify the input signal. Instead, it simply holds the input value until the next sampling period. This makes it a simpler and more efficient method for converting continuous-time signals into discrete-time signals.

3. What are the advantages of using a zero order hold in discrete control systems?

One advantage of using a zero order hold is that it introduces minimal distortion to the input signal. This is because the output signal is a direct representation of the input signal at each sampling period. Additionally, zero order hold filters are relatively easy to implement and require less computing power compared to other types of digital filters.

4. Are there any limitations to using a zero order hold in discrete control systems?

While zero order hold filters are useful for converting continuous-time signals into discrete-time signals, they are not suitable for all applications. For example, they may not work well with highly dynamic systems or systems with fast-changing input signals. In these cases, higher order filters may be more effective.

5. How can I design a zero order hold filter for my discrete control system?

Designing a zero order hold filter typically involves determining the appropriate sampling rate and adjusting the hold time to achieve the desired output signal. This can be done through simulations or by using mathematical formulas. It is important to consider the specific requirements and limitations of your control system when designing a zero order hold filter.

Similar threads

  • General Engineering
Replies
0
Views
711
  • Engineering and Comp Sci Homework Help
Replies
5
Views
1K
  • Electrical Engineering
Replies
12
Views
2K
  • General Engineering
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
3
Views
1K
  • Electrical Engineering
Replies
3
Views
987
  • Electrical Engineering
Replies
3
Views
799
  • General Engineering
Replies
12
Views
6K
  • Electrical Engineering
Replies
4
Views
841
Back
Top