Skip to content

Discrete Time Elements - Introduction

In a sampled control loop the controlled variable consists of a sequence of discrete time values at time t = kT (k = 0...n) which are supplied to a discrete time controller. This is typically how a computer or microcontroller would manage the control loop. The analog signals between the sampled points are ignored.

The discrete time controller transforms the input sequence into a appropriate output sequence that is also defined at the same sample points t = kT only. If the actuator or controlled system uses a continuous signal input, the output signal of the controller needs to be reconstructed. The most common reconstruction method is the zero order hold (ZOH). A common implementation is a Digital to Analog converter (DAC) that holds the value of each digital output until the next one comes along.

SimApp can simulate discrete time elements in the time domain as well as in the frequency domain, however, the following differences need to be considered:

During time simulations, all discrete time elements have a virtual sampler at their inputs and a virtual hold element at their outputs. Discrete time elements may be placed anywhere in the system. Sample and hold elements are allowed but not required. In both cases, the signal process is unchanged.

During frequency simulations, however, the transition from the discrete time to the continuous process and vice versa is very important. The sampling process produces constant weighted sideband signals with the periodic repetition of the spectrum of the continuous time signal. The hold element exhibits a low pass characteristic with frequency dependent weighting. The Nyquist sampling theorem states that a sampled analog signal can be perfectly reconstructed from the samples if the sample rate exceeds twice the highest frequency in the system. In the range of half the sampling frequency and above strong distortions occur (poles and alias frequencies). Therefore, in sampled control systems, the sample period must be sufficiently short and the harmonic distortion produced by aliasing must be eliminated by a low pass filter before the sampling process. In practice, sampling should be done at least at 5-10x the highest frequency of interest.

Sampling

Holding

To get a valid frequency response, the sample and the hold elements must be correctly placed. They may be omitted however, if the simulated frequency range is significantly smaller than the sample period.

If the system for frequency simulation is purely linear, the sample and the hold element may be replaced by a combined sample and hold element.

Please Note: Each analog element or controller has the option to operate as a discrete time element. The check box: Time discrete simulation allows application of a sample period to the incoming signal, and it has a ZOH at the output. The time discrete model is derived from the linear model by substituting the complex frequency s = j ω in the linear transfer function by a forward, backward or trapezoid substitute:

Forward substitute:

Backward substitute:

Trapezoid substitute:

whereas the h is the sampling period