TITLE: TO WRITE A â€˜Câ€™ PROGRAM TO COMPUTE CONVOLUTION OF TWO SEQUENCES.
Convolution is a mathematical way of combining two sequences or signals to form a third signal. It is the single most important technique in digital signal processing using the strategy of impulse deconvolution signals or systems are described by a signal called impulse response. Convolution is important because it relates the three signals and the impulse of interest, the input response, the output signal and the impulse response. This chapter presents convolution from two different algorithms called input side algorithm and output side algorithm. Convolution provides the mathematical frame work for DSP.
Lets summarize this way of understanding how a system changes an input signal into an output signal. First input signal can be received as a sealed and shifted delta function. Second the output resulting from each impulse is a sealed and shifted version of impulse response. Third the overall output signal can be found by adding these sealed and shifted impulse response.In other words if we know a system is impulse response then we can calculate what the output will be for any possible input signal. This means that we know everything about system. There is nothing more than that can be learned about the linear systems characteristics. (However, in later chapter we will show that this information can be represented in different forms). The impulse response goes by a different name in some applications. If the system being calculated considered is a filter, the impulse response is called as a filter. The convolution in image processing, the impulse response is called the point spread function.
While these terms are used in slightly different ways, they all mean the same thing. The signal produced by a system when input is delta function.
Definition of delta function and impulse response of a delta function is a normalized impulse. All of its samples have a value of zero except for all the sample number zero, which have value one. The Greek letter delta *[n] is used to identify the delta function. The impulse response of a linear system, usually denoted by h[n] is the output of the system when the input is delta function.
Convolution is a formal mathematical representation just as multiplication, addition and integration. Addition takes two numbers and produces a 3 rd number. While convolution takes two signals and produces a third signal. Convolution is used in the mathematics of many systems, convolution is used in the mathematics of many systems, convolution takes place to describe the relationship between 3 signals of the notation interest, the input signal, the impulse response and the output signal. Fig shows the notations when convolution is used with linear system with an impulse response h[n] resulting in the output signal y[n].
In equation form: x[n] h[n] y[n]
Expressed in words, the input signal convoluted with response is equal to the output signal. Just as addition is represented by it. It is unfortunate that most programming languages use the star to indicate multiplication.
A star in computer program means multiplication, while a star in equation represents convolution
Convolution of two sequences using c code
void main( )
printf(â€œ\t\t\t\t Convolution codes\nâ€);
printf(â€œ\n Enter the no of messege bitsâ€);
printf(â€œ\n enter the constraint lengthâ€);
printf(â€œ\n Enter the no of outputs for each message bitsâ€);
printf(â€œ\n Enter the %dth generating sequence in one row\nâ€,i+1);
printf(â€œ\n Enter the message sequenceâ€);
printf(â€œ\n Multiplexed output sequence isâ€);
Enter the no message bits 5
Enter the constraint length 3
Enter the no of outputs for each message bits 2
Enter the 1th generating sequence in one row
Enter the 2th generating sequence in one row
Enter the message sequence 1011
Multiplexed outpt sequence is 00 01 00 10 10 11 00