Site icon i2tutorials

Signal and System- Exploring concepts with MATLAB

Exploring concepts with MATLAB. 

 

Digital computers are ideally suited to implementing time-domain descriptions of discrete-time systems because computers naturally store and manipulate sequences of numbers. For example, the convolution sum describes the relationship between the input and output of a discrete-time system and is easily evaluated with a computer as a sum of products of numbers.

 

In contrast, continuous-time systems are described in terms of continuous functions, which are not easily represented or manipulated in a digital computer.

 

For instance, the output of a continuous-time system is described by the convolution integral, the computer evaluation of which requires the use of either numerical integration or symbolic manipulation techniques. 

 

As it is so complex, we use MATLAB which focuses on discrete-time systems to explore all the concepts. 

 

Another limitation on exploring signals and systems is imposed by the finite memory or storage capacity and non-zero computation times inherent in all digital computers. Consequently, we can manipulate only finite-duration signals. 

 

For example, if the impulse response of a system has an infinite duration and the input is of infinite duration, then the convolution sum involves summing an infinite duration and the input is of infinite duration, then the convolution sum involves summing an infinite number of products. 

 

Even if we were able to store infinite-length signals in the computer, the infinite sum could not be computed in a finite amount of time. In spite of this limitation, a behavior of the system in response to an infinite-length signal may often be inferred from its response to a carefully chosen finite-length signal.

 

Furthermore, the impulse response of stable LTI systems decays to zero at an infinite time and thus may often be well approximated by a truncated version. In this scenario, we use MATLAB signal processing toolbox and control system toolbox. 

 

Convolution

As we know the convolution sum expresses the output of a discrete-time system in terms of the input and the impulse response of the system. MATLAB has a function named conv that evaluates the convolution of finite-duration discrete-time signals. If x and h are vectors representing signals, then the MATLAB command y=conv(x,h) generates a vector y representing the convolution of the signals represented by x and h, minus one. 

 

We must know the point in time at which the signals represented by x and h originated in order to determine the origin of their convolution. In general, suppose the first and last elements of x correspond to times n = kx and n = Ix, respectively, while the first and last elements of h still correspond to n =  kh and n = Ih. Then the first and last elements of y correspond to times n=ky= kx + kh. 

And, n=  Iy  = Ix + Ih

 

Step response

The step response is the output of a system in response to a step input and is infinite in duration, in general. Though we can evaluate the first p values of the step response using conv function if the system impulse response is zero for times n< kh by convoluting the first p values of h[n] with a finite-duration step of length p. Meaning we need to create a vector h from the first p nonzero values of the impulse response. 

 

State-variable descriptions

The MATLAB control system toolbox contains numerous routines for manipulating state-variable descriptions. A key feature of the control system toolbox is the use of the LTI objects, which are customized data structures that enable manipulation of LTI system descriptions as single MATLAB variables. 

 

If a, b, c, d are MATLAB arrays representing the matrices A, B, C, and D, respectively, in the state-variable description, then the command sys=ss(a,b,c,d,-1) produces an LTI object sys that represents the discrete-time system in state-variable form. 

 

Systems are manipulated by MATLAB by operation on their LTI objects. For example, if sys1 and sys2 are objects representing two systems in state-variable form, then sys=sys1 + sys2 produces state variable description for the parallel combination of sys1 and sys2, while sys=sys1*sys2 represents the cascade combination. 

 

The function lsim simulates the output of an LTI system in response to a specific input. For discrete-time systems, the command has the form y=lsim(sys, x) when x is a vector containing the input and y represents the output. The command h=impulse(sys, N) places the first N values of the impulse response in h. Both of these may also be used for continuous-time LTI systems, although the command syntax changes slightly based on the situation. 

 

In the continuous-time cases, numerical methods are used to approximate the system response. 

 

As we know, there is no unique state-variable description for a given LTI system. Different state-variable descriptions for the same system are obtained by transforming the state. 

 

 

Reference

Exploring concepts with MATLAB

Exit mobile version