Causal,Non Causal,Passive,Active,Stable and unstable systems in DSP

RLC circuit as a low-pass filter.

Image via Wikipedia

Continuing with the classification of digital systems, in this post, I am going to discuss about Causal and Non Causal systems, the system stability and the passive and active systems.

 

Causal and Non Causal Systems:

A system which cannot recognize future is called a causal system. It is also called a realizable system. We cannot predict the future of a signal and use it for analysis in the system. So, basically a difference equation which will not have any terms including a future sample makes itself a causal system while the others are non causal. It doesn’t mean that we cannot process non causal signals. Non Causal signal processing is possible from recorded data. It is mostly applied in Geo-Physics and weather prediction. But a non causal system cannot be realized in hardware. Only causal systems can be realized in hardware.

if X1(n) _= X2(n) for n <= N, then Y1(n) _= Y2(n) for n <= N.

 

Passive and Active systems:

The term passivity is very famous in analog systems. It means that the energy of output should be less than the energy of the output. There is an artificial concept regarding passivity too. It is called the loss less condition, where both the input and output power are exactly equal. All the RLC networks are passive. If the RLC networks are connected to an Op-Amp or a Transistor, they become active. The extra power comes from the power supply.

System is passive when

 

Stable and Unstable Systems:

Unless we need an oscillator, all the systems used for DSP need to be stable. There are different kinds of stable systems. The one that we will be looking into shall be Bounded Input Bounded Output stable systems abbreviated as BIBO. A Digital System is BIBO stable if both the input and output are both bounded. that is |X(n)| |Y(n)|

 

An important point to be noted here is that, the stability need not necessarily be inherent to the feed back.

Let us take the time reversal system Y(n) = X(-n). This system is linear, but time varying and non casual. The output requires future samples for positive values of n. Thus it is non causal. The waveform is also not preserved since after shifting a time interval the output and input are not equal.

In the next post, I will discuss about Impulse and Step relation of unit functions.

Linear and Non Linear, Time Invariant and Variant Systems in DSP

Scheme of a "norator", a "theor...

Image via Wikipedia

Since we have completed the digital system examples, in this post I am going to classify them and explain regarding various classifications of a digital system.

 

Classifications Of A Digital System:

The major classifications of a digital system are

  • Linear and Non Linear systems
  • Time Invariant and Time Variant systems
  • Causal and Non Causal Systems
  • Stable and Unstable systems
  • Passive and Active systems

 

In this post, I will discuss about the first two kinds of systems.

 

Linear and Non Linear systems:

A system is said to be linear if it follows both the Homogenity and superposition principles.

Homogenity: If the input is multiplied by a constant, the output shall also be multiplied by the same.

Superposition: If the input is superposed by two signals, the out put shall also be superposed.

So, a general description of a linear system is

iff X1,2(n) -> Y1,2(n) => aX1(n)+bX2(n) => aY1(n)+bY2(n)

Anything, which is not a linear system, which means that it doesn’t follow either of the above properties or all of them, the system is called non linear.

We can check for linearity by making X(n) equal to zero and see whether Y(n) becomes the same. If not, we can conclude it to be linear. But if it is zero, we need to further test the difference equation for superposition and then if the difference equation satisfies it, then the system is acknowledged as linear. We can sum that, any system with a non zero initial condition is a non linear system. A charged capacitor and an inductor with initial flux are all non linear.

 

Time Invariant and Variant Systems:

In digital signal processing, we can easily observe that time has lost its significance. So this is also called shift invariance. If the output waveform is preserved even after shifting the signal by a period of N and the body of the waveform is exactly preserved, this is called a Time Invariant system. Any system which do not follow the above specification is a time variant system. A general description  of time invariant system is

X(n) à Y(n) => X(n-N) à Y(n-N)

 

A system which obeys both the linearity and time invariance are called linear time invariant systems, abbreviated as LTI systems. I will be referring about these kinds of system for the maximum since I am an under graduation student. In the next post, I will discuss about the remaining classifications of Digital Systems.

Examples of Digital Systems

Continuing with the digital systems, today let us discuss about various examples of digital systems and the operations they perform on the digital signals.

 

An important point of significance is that, the characteristics of the system completely depend upon the way we look at the difference equation. I will come into this in a while with an example. Lets go through the digital systems first.

Examples of Digital Systems:

  • Accumulator: An accumulator simply adds up the signals going through the system. Let us take up an example.
    .
    This can be written as  which is a recursive relation that requires a feedback of the previous output, which will be saved in the accumulator and the summation continues.
    The same equation can also be written as .
    The above equation thus become .
    The Y(n) in both the cases are equal, but since the value that has to be stored in the accumulator is different since the difference in the difference equations, the system characteristics varies.
  • Up Sampler: An Up sampler, is a very funny and interesting device which fills (L-1) zeroes in between two consecutive sampled signals, where L is such that, n/L is a rational number and is an integral multiple of L. Thus the Up Sampler can be represented as

    Let us take an example signal. Let X(n) = [2,1,-1] with 1 at the origin.
    Let L = 4. Now going through the Up Sampler, the final signal will be
    Y(n) = [2,0,0,0,1,0,0,0,-1] with 1 at the origin.
    We can see here that, in the output signal, between every consecutive signal, L-1 that is 4-1 = 3 zeroes were present.The nature of the signal is not altered here. The schematic representation is
  •  M-point moving average system: This is one of the important systems. It accumulates the present sample in the past (M-1) times and divides it by M. The name moving average system is given because as M change, all the samples under observation also change. Thus, as we move with time, the average also changes. The equation representing this system is

    Suppose, X(n) = S(n)+d(n) where S(n)is the actual signal while d(n) is the noise, applying the signal into this system will diminish the disturbance d(n). If M is large enough, then d(n) will become zero. Thus this system is also called Data Smoothing System and is very much useful in observations.

 

There are a lot many systems like these. Like the Up Sampler, we can also have down sampler. Time reversal system is one gorgeous thing too. With this, I am stopping my discussion on digital system examples. In the next post, lets see about various classifications of the Digital Systems.

 

 

Sampling Process and Digital Systems

A simple block diagram of a typical digital si...

Image via Wikipedia

Before going into the digital systems, lets just go a little deep into the sampling process once again. In this post, I will be discussing about sampling and aliasing. Then I will go into a little of digital systems.

Sampling Process:

From the previous post, we know that the frequency of a signal can at maximum be half of that of the sampling frequency. So, wondering what happens when the sampling frequency isn’t adequate, it results in distortion of the signal.

Let us consider a simple example.

  • Let there be three signal, cos(6πt), cos(14πt), cos(26πt).
  • The frequency of the respective signals are 3Hz, 7Hz and 13Hz.
  • Let the sampling time be Ts = 0.1s. So the sampling frequency Fs = 10Hz.
  • Looking at the signals, we can say that only the first signal satisfies the condition while the other two signal undergo distortion.
  • After sampling, the signals will be cos(0.6πn), cos(1.4πn), cos(2.6πn)
  • Remember, in DSP the life is simple because we just have to compute to π.
  • Thus cos(1.4πn) and cos(2.6πn) become cos(0.6πn). Interesting point to note here is that, both the 7Hz and 13Hz signals poses like that of a 3Hz signal here. This property is called aliasing.
  • When a higher frequency signal poses like that of a lower frequency signal, distortion occurs. This distortion is called aliasing distortion.

Keeping all these in mind, lets now state the Sampling Theorem.

 

Sample Theorem: If the sampling frequency is not adequate, adequate in the sense, if its not at least be twice of the carrier signal, there will be aliasing distortion and the message can never be retrieved.

 

Digital Systems:

The digital system handles digital signals and various operations on them and results in another new digital signal, which is in some way better than the previous signal. Any digital system can be portrayed as a schematic showing its hardware and software. The basic hardware involves, summers, multipliers, delays e.t.c.., Every digital system can be expressed as a difference equation, which is an exact counter part of differential equation in analog signal processing. An example of a difference equation, such that, X(n) is the input and Y(n) being the output is

Y(n) = a*X(n) + b*X(n-1)+ c*Y(n-1).

This equation is obtained by using two summers to add the three signals (both the + signs), Three multipliers to multiply the constants to signals (all the three * signs) and two delays to delay the input signal and also the output signal (both the (n-1) are obtained using them.) The Y(n-1)term is obtained by looping back the output and feeding it to a delay. A digital system is thus, a system where the digital signal processing occurs and various operations and calculations are performed on the input signal.

How to sample analog signal in DSP

Plot of sine (red) and cosine (green) functions

Image via Wikipedia

The analog signal is our desired form of output. But digital signal is the desired form of traveller in the medium. In this post, I will discuss about the conversion of analog signal into the digital signal and how sinusoidal signals are very important.

Sinusoidal Signals:
The sinusoidal signals are the signals which follow the functions of sine and cosine. The major advantage of a sinusoidal signal is that they are finitely bounded. Bounded doesn’t mean the extent they travel. It depends on the amplitude of the sinusoidal wave. Another major characteristic of the sinusoidal signals are they are periodic. A point to be noted is that, all digital sinusoidal signals may or may not be periodic while all analog sinusoidal signals are periodic in nature. I will come to it after I discuss about the analog to digital conversion.

Analog To Digital Conversion:
To achieve a digital signal from an analog signal, we need to sample it first. For our ease, lets take a sinusoidal signal which will also help us to clarify the previous statement. Let us assume a signal Acos(Ωt+Φ) be analog. Let the sampling time be T. The signal after being sampled becomes Acos(Ωnt+Φ). Let ω = ΩT = Ω/Fs = 2π*Fc/Fs = 2 π* Ω/ Ωs. Thus ω is the ratio of either the carrier and sampled frequency and is a dimensionless quantity. An important thing, ω called the normalized digital frequency is measured in radians. The beauty of studying the digital signal over the analog signal is that, the maximum carrier frequency of signal can just be half of that of sampling frequency, the maximum ω is equal to π. Now isn’t that a boon. All we require to study is a period 0< ω< π. In the next post, I will discuss about sampling process and the digital systems.

Arbitrary Sequences and Operations in DSP

Sampled signal (discrete signal): discrete tim...

Image via Wikipedia

After going through the merits, demerits and some of the important functions used in DSP, today let us see about various beautiful sequences the digital signals can be passed upon. Let us also go through the various operations we can perform on sequences.

Sequences:

Every arbitrary sequence can be explained by the help of both the functions I described yesterday. The signal can essentially follow any kind of sequence. One particular sequence I find to my fancy is the exponential sequence, of form . The signal looks exquisite because of the geometric progression it follows. I have always loved this kind of progression. The signal, depending on the value of n, can traverse from infinity on the negative side to infinity on the positive side via A when it is zero.

Operations on sequences:

Various kinds of operations can be done on the sequences based on our need. Operations like Addition, Multiplication, Sample delay and so on.

  • Addition:
    The addition operation adds two sequences. Add doesn’t mean the kinder garten addition. Addition also means subtraction of the signal and in the reverse direction. While subtraction is just the alteration of the sign bit of the digital data being sent to the summer, where the addition is going on. The addition operation is a linear one. Adding two sequences result in addition of each sample in the sequence.
    Example, suppose lets add two sequences X(n) and Y(n). The operation results in a signal where the output is the addition of respective samples of both the sequences. The sample at n = 0 in both the sequences gets added and the output sequence is formed.
  • Multiplication:
    The multiplication operation multiplies two sequences. Just like in the addition operation, the respective samples in the sequences gets multiplied to each other and the output sequence is formed. The sample at n = 0 in both the sequences gets multiplied and the output sequence is formed.
  • Delay:
    The delay operation has got very high significance. The delay operation basically delays the signal sequence by respective delay. If after applying a delay of two time intervals to an arbitrary sequence X(n) the output results another sequence of the form X(n-2). It means the flow of the signal is interrupted for two time intervals and then resumed. One important thing, worth important here is, we use the required number of delays to delay the sequence. The delay id designated as inverse Z. For two delays we do not denote the schematic with inverse Z power two, but place two delays in series. Likewise, we can also see ahead of the sequence, but for that, we need a feedback system which, we will look into some time later, hopefully.

Similarly, there will be many operations, which will be used to alter the sequence the way we require it to play.

In the next post, I will discuss about the conversion of analog signal into a digital signal and the beauty of sinusoidal digital signals.

 

Merits,Demerits and Important Functions

Unit Step function u(t) - SST - 08DEC05

Image via Wikipedia

I am not going to go through the jeopardy of explaining what a signal is, what makes it a digital signal and all the stuff. Today, I am going to explain myself the merits, demerits and the important functions used in Digital Signal Processing. The merits and demerits I found to be catching my sleeves are

Merits of DSP:

  • In DSP, there is no delay distortion in processing a signal.
  • We can handle more number of signals at a time by a method known as time multiplexing.
  • DSP is less sensitive to element tolerances, environmental changes.
  • Accuracy and dynamic range of DSP can be increased almost without limit, if you are prepared to spend money.
  • Storage of Digital Signal is not a problem. They can be stored in magnetic tapes and discs.
  • Low Frequency Processing is not a problem because there is no inductance to bother about.
  • Characters can be changed very conveniently by changing more coefficients.

Demerits of DSP:

  • The Hardware complexity of DSP is more than that of ASP.
  • the highest frequency that can be used is limited because the sampling frequency is limited. At present the highest sampling frequency is limited to 10MHz(like my teacher say). So my carrier signal cannot go more than half of the sampling frequency which limits my carrier to a maximum of 5MHz.

One particular thing that interests me very much is the research going on to reduce the power usage as much as possible particularly for implantable devices, those which will be implanted into the body. The aim is that, these devices should work inside body at body temperatures. DSP is used everywhere to analyze the position of human body.

Coming back to functions, there are two very important functions that are used to process a digital signal. They are the impulse and unit step functions with which, we can represent any arbitrary sequence the sampled signal takes. An impulse function is infinity at zero and zero everywhere. While the unit step function takes an amplitude of an unit for every value greater than or equal to zero and is zero elsewhere. In the next post, I will go through the various kinds of sequences, how an analog signal is converted into a digital signal and various sequence operations.