# Laboratory Session Understanding Digital Signals Biology Essay

Published:

A discrete-time feedback system utilizes a controller which obtains information of the error signal at regular intervals of duration T seconds, where T is the sampling time interval as opposed to the continuous-time feedback system whose controller obtains this information continuously. A continuous-time signal can be transformed into a discrete-time signal and vice versa with the use of analogue-digital (A/D) and digital-analogue (D/A) converters.

Essentially, a digital control system consists of the designed digital controller, a clock which gives pulses for the sampling time, a sensor for feedback of output, a D/A converter and an A/D converter. The layout of actions taking place in a digital control system is as enumerated below;

At the desired sampling time interval, the clock sends a pulse to the A/D and D/A converters

The sensor takes the output signal and this signal is sampled and quantized (if the number of bit in binary representation is large then quantization effects can be neglected for simplification) and this is compared with the digital reference input. The difference of the two signals is the error signal and it becomes the new input to the digital controller.

### Professional

#### Essay Writers

Get your grade

or your money back

using our Essay Writing Service!

Since the plant to be controlled is a continuous-time system, the digital signal output of the digital controller is converted to its analogue equivalent using the D/A converter which holds the output constant at a level commensurate to its digital input signal till the next sampling interval is triggered by the clock. This is referred to as the Zero-Order-Hold.

The sampling time given by the clock has to be carefully chosen in order to accurately produce a digital signal comparable to the original analogue signal. The sampling time could be varied to enable shorter processing time or a constant sampling time could be chosen.

In digital control system theory, the z-domain is used and a system defined in its s-domain transfer function can be converted to its z-domain equivalent by using the backward difference method or the emulation method by substituting respectively (1-Z-1)/T or 2(1-Z-1)/T(1+Z-1) for every s in the transfer function. A digital control system is said to be stable if the magnitude of any of its poles is less than 1.

## RESULTS AND DISCUSSION

To investigate discrete signals, the plot of a sinusoidal function was generated for 100 sampling sequences as seen in figure 1 and later trimmed to be generated for 10 sampling sequences by forming a time sequence using a sampling time interval of 0.1 seconds as seen in figure 2. It is observed the number of cycles and number of samples per cycle for both plots are the same (number of cycles is 4 and number of samples per cycle is 25) and the only difference is the frequency of each sinusoidal sequence (0.04 seconds for the 100 sampling sequence signal and 0.4 seconds for the 10 sampling sequence signal). Hence, it is seen that the frequency if a discrete-time signal is dependent on the sampling time interval utilized when sampling the continuous-time signal.

Figure 1: Plot of sinusoidal sequence of 100 samples Figure 2: Plot of sinusoidal sequence with T=0.1 secs

Given a discrete-time system with transfer function;

The system has a zero at the origin and two poles at p1 = 0.6 + 0.583i (0.837 arg 44.18o) and p2 = 0.6 - 0.583i (0.837 arg -44.18o). Since the modulus of the poles is less than unity, the system is stable. The inverse z-transform and its equivalent Laplace transform can be derived for a sampling time T = 0.02 seconds by comparing the given discrete-time system transfer function in equation 1 above to the form given in equation 2 and then deriving the corresponding constants i.e. A, a, and ω.

Upon comparison, the following is true;

Therefore, the constants are calculated as follows; a = 8.917, ω = 38.565 rad/s, A = 0.857. Hence, the inverse z-transform and the equivalent Laplace transforms of the given discrete-time system transfer function are as shown in equations 3 and 4.

To get the steady state value of the system response to a step input, the final value theorem (as stated in equation 5) is used bearing in mind that X (z) = G (z)*U (z) where X (z) is the z-transform of the system output, U (z) is the z-transform of the system input and G (z) is the z-transform of the system transfer function. Thus, the z-transform of the system output is defined as shown in equation 6 below;

### Comprehensive

#### Writing Services

Plagiarism-free

Always on Time

Marked to Standard

The final value of the system output response to a step input, . From equation 4 it is observed that the system is a second-order system which can be compared with the general second-order system transfer function shown in equation 7 below. Thus, the damping ratio and natural frequency is derived to be 0.231 and 38.565 rad/s respectively. Consequently, rise time, settling time, damping ratio, and overshoot OS can be derived as 0.047 seconds, 0.517 seconds, 0.231 and 0.615 respectively.

Also, the step response of the discrete-time system is plotted using MATLAB and the result is as shown in figures 3 and 4 below. From the step response plot of the discrete system, the rise time, settling time, damping ratio, and overshoot OS can be derived as 0.029 seconds, 0.498 seconds, 0.3 and 0.5 respectively.

Therefore, it is observed that the response of the discrete system is not as expected but for the steady state value which has a value of unity as expected. Also the discrete-time system is observed to have produced better system performance than the continuous-time system as seen by comparing the system parameters in table 1.

Figure 3: Step response of discrete system using 'stem' Figure 4: Step response of discrete system using 'plot'

This is because the z-transform is the discrete equivalent of the Laplace transform and it depends on the sampling time T as seen from equation 2 therefore the smaller the sampling time T, the closer the simulated results are to the expected results but at the expense of simulation time and memory space. Also, excessive increase of the sampling time T will drive the system into instability. The comparison between the expected results and the simulated results are shown in table 1 below.

## (Damping ratio)

## s-plane (2nd order approx)

0.045

0.517

0.625

0.225

## z-plane (step response plot)

0.029

0.498

0.500

0.300

Table 1: Comparison of system performance parameters for s-plane and z-plane implementations

For a digital control system shown in figure 5 below, where Kd(z) represents the discrete form of the given continuous controller K(s) in equation 8, G(s) is continuous-time transfer function of the plant as given in equation 9, ZOH (zero-order-hold) represents the rectangular pulse-width function with width equal the sample time T which performs a conversion of the discrete-time signal to continuous-time signal.

Figure 5: A digital control system [1]

The step response of the continuous closed loop system in figure 3 below is studied and it is observed that the system has a rise time, settling time, and overshoot OS of 0.803 seconds, 6.274 seconds and 0.163 respectively. The step response plot is shown in figure 6 below.

Figure 6: Step response of closed loop continuous-time system shown in figure 5

From the above continuous-time system, a digital control system is formed firstly by choosing a suitable sampling time T equal to 0.2 seconds for the discrete-time system and then by converting the controller, the ZOH and the plant to their respective discrete equivalent using the bilinear transform method otherwise known as the Tustin method using MATLAB (Note: See Appendix A for MATLAB code for the transformation of continuous-time signal to discrete-time signal). Analytically, this can be done by using the substitution in equation 10 below for all s-plane transfer function under consideration.

Upon the transformation, the digital control systems with input R (z), output Y (z) and input R (z), output Y (Z) are shown in figures 7a and 7b where Gd(z) is the discrete-time equivalent of the combination of G(s) and ZOH.

Figure 7a: Closed loop between R (z) and Y (z) Figure 7b: Closed loop between R (z) and U (z)

The MATLAB code for the implementation of the above systems in figure 7a and 7b is given in Appendix B. The step response plot of the systems shown in figures 7a and 7b is shown in figures 8a and 8b below using the 'plot' command in order to obtain a response which can be continuous in time. The step response shown in figure 8a is observed to have a rise time, settling time, and overshoot OS of 0.678 seconds, 5.939 seconds and 0.215 respectively which shows that the discrete-time system produces better system performance parameters when compared with the response of the continuous-time equivalent shown in figure 6, as stated earlier.

### This Essay is

#### a Student's Work

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

Examples of our workFigure 8a: Step response of closed loop of R (z) and Y (z) Figure 8b: Step response of closed loop of R (z) and U (z)

To investigate the effects of using the 'stem' and 'stairs' command on the displayed results and also the function of the zero-order-hold (ZOH), the 'stem' and the 'stairs' commands were used to display the step responses of the control signal (i.e. the transfer function between R (z) and U (z)) rather than the 'plot' command. The results are displayed in figures 9a and 9b.

It is observed that using the 'stem' command displays the results of a discrete-time signal while the 'stairs' command displays the results of a continuous-time signal which is the output of the ZOH. Therefore, it can be concluded that the function of the ZOH is to perform a conversion of the discrete-time signal to continuous-time signal so as to reconstruct the original analogue signal by holding each digital sample value for the sample time [3].

Figure 9a: 'stem' plot of R (z) and U (z) closed loop Figure 9b: 'stairs' plot of R (z) and U (z) closed loop

As stated earlier, great care has to be taken while choosing the sampling time T as a very small sampling time utilizes greater memory space and increases simulation time while a large enough sampling time might drive the closed loop system to instability. The point of instability of the closed loop system between R (z) and Y (z) was determined as 1.2372 seconds by adequately tuning the sampling time and the poles of the closed loop system also determined at this point as P1 = 0.4235, P2 = -0.4693 + 0.8832i and P3 = -0.4693 - 0.8832i with magnitudes 0.4235, 1.0001 and 1.0001 respectively signifying instability as the magnitude of two poles is greater than unity. Therefore, it can be concluded that the closed loop system should not be sampled at a sampling time of greater than 1.2372 seconds as the system becomes unstable at a higher sampling time (i.e. Tsampling Ë‚ 1.2372 seconds). The step response plot of the closed loop system between R (z) and Y (z) at this point of instability using the 'stem' command and the 'stairs' command is shown in figures 10a and 10b.

Figure 10a: 'stem' plot of R (z) and Y (z) closed loop Figure 10b: 'stairs' plot of R (z) and Y (z) closed loop

## CONCLUSION

The following conclusions can be made from the enumerated results.

The frequency of a discrete-time signal is dependent on the sampling time interval utilized during sampling of the original continuous-time signal.

A discrete-time system is stable if the magnitude of each zero or poles are less than unity.

The z-transform is the discrete-time equivalent of the Laplace transform of a continuous-time signal/system and it is dependent on the sampling time T.

With a carefully chosen sampling time T, the discrete-time equivalent of a continuous-time system produces better system performance otherwise, the system model is driven into instability.

The function of the ZOH is to perform a conversion of discrete-time signal to a continuous-time signal by holding each digital sample value for the sample time so as to regenerate the original continuous-time signal [3].

The 'stem' command is used for displaying response results of a discrete-time system (especially for larger sampling times, since the inter-sampling time cannot be accurately evaluated with a purely discrete simulation [2]) while the 'stairs' is used to display the output of the ZOH, thus mimicking a continuous-time equivalent of a discrete-time system.

## REFERENCES

Dr Benjamin Chong. 2010. Chapter 8, Digital Control.

Dr Benjamin Chong. 2010. ELEC5570 - Laboratory 4: Discrete Time System and Digital Control.

Answers.com. 2011. [Online]. Accessed on 02/01/2011. Available from: http://wiki.answers.com/Q/What_is_the_function_of_zero_order_hold