Signals ans Systems ,Elements digital signal Processing , Continuous time and discrete time signals , Sampling Theorem , Discrete time signals , Discrete time systems , Z transform , Convolution and correlation.

Posted by fasxxzczc on Thursday, 22 March 2012

Signals ans Systems ,Elements digital signal Processing , Continuous time and discrete time signals  , Sampling Theorem  , Discrete time signals , Discrete time systems , Z transform  , Convolution and correlation.


 

Part 1 : Video 


Part 2 : Video




Concepts Covered :

Signals ans Systems ,Elements digital signal Processing , Continuous time and discrete time signals  , Sampling Theorem  , Discrete time signals , Discrete time systems , Z transform  , Convolution and correlation. 





More aboutSignals ans Systems ,Elements digital signal Processing , Continuous time and discrete time signals , Sampling Theorem , Discrete time signals , Discrete time systems , Z transform , Convolution and correlation.

Implementation of Jury's Algorithm

Posted by fasxxzczc on Wednesday, 21 March 2012

Implementation of Jury's Algorithm




1:  #include<iostream.h>  
2:  #include<conio.h>  
3:  #include<stdio.h>  
4:  #include<stdlib.h>  
5:  #include<math.h>  
6:  void main(void)  
7:  {  
8:   int b[10]={0},mat[10],num1,temp,a[5],i,j;  
9:   clrscr();  
10:   cout<<"\n\t\tImplementation of Jury's Algorithm";  
11:   cout<<"\n\tInput number of coeff for D(z)::";  
12:   cin>>num1;  
13:   cout<<"\n\tInput Values::\n";  
14:   for(i=0;i<num1;i++)  
15:   {  
16:   cout<<"\n\tb["<<i<<"]::";  
17:   cin>>b[i];  
18:   }  
19:   if(b[num1-1]<0)  
20:   {  
21:       cout<<"System Unstable";  
22:       getch();  
23:       exit(0);  
24:   }  
25:   int Dz=0;  
26:   for(i=0;i<num1;i++)  
27:   Dz=Dz+pow(-1,i)*pow(-1,-i)*b[i];  
28:   if(Dz<0)  
29:   {  
30:       cout<<"System Unstable";  
31:       getch();  
32:       exit(0);  
33:   }  
34:   temp=num1-1;  
35:   for(i=0;i<(num1-3);i++)  
36:   {  
37:   if(b[0]<b[temp])  
38:   {  
39:       cout<<"\n\tSystem Unstable";  
40:       getch();  
41:       exit(0);  
42:   }  
43:   for(j=0;j<=temp;j++)  
44:    mat[j]=b[0]*b[j]-b[temp]*b[-j+temp];  
45:   temp--;  
46:   for(j=0;j<=temp;j++)  
47:    b[j]=mat[j];  
48:   }  
49:   if(b[0]<b[temp])  
50:   {  
51:       cout<<"\n\tSystem Unstable";  
52:       getch();  
53:       exit(0);  
54:   }  
55:   cout<<"\n\tSystem Stable";  
56:   getch();  
57:  }  
More aboutImplementation of Jury's Algorithm

Implementation of General Diffrence Equation

Posted by fasxxzczc

  Implementation of General Diffrence Equation

Find the output of a system described by given difference equation and initial conditions for
given input sequence. (Solution of difference equation) (Obtain the response for different
systems by changing Degree of difference equation (N) and coefficients and also for
different input sequence x(n). Observe the response by considering system as FIR and IIR
system) .

1:  #include<iostream.h>  
2:  #include<stdio.h>  
3:  #include<conio.h>  
4:  #include<math.h>  
5:  void main(void)  
6:  {  
7:   float a[10],b[10],x[20],y[20],sumx,sumy;  
8:   int N,M,k,L,n;  
9:   clrscr();  
10:   cout<<"\tImplementation of General Diffrence Equation";  
11:   cout<<"\n\n\tEnter Number of Coefficients a[k]::";  
12:   cin>>N;  
13:   cout<<"\tInput Values::";  
14:   for(k=1;k<=N;k++)  
15:   {  
16:   cout<<"\n\ta["<<k<<"]::";  
17:   cin>>a[k];  
18:   }  
19:   cout<<"\n\n\tEnter Number of Coefficients b[k]::";  
20:   cin>>M;  
21:   cout<<"\tInput Values::";  
22:   for(k=0;k<M;k++)  
23:   {  
24:   cout<<"\n\tb["<<k<<"]::";  
25:   cin>>b[k];  
26:   }  
27:   cout<<"\n\n\tEnter Number of Samples x[n]::";  
28:   cin>>L;  
29:   cout<<"\tInput Values::";  
30:   for(k=0;k<L;k++)  
31:   {  
32:   cout<<"\n\tx["<<k<<"]::";  
33:   cin>>x[k];  
34:   }  
35:   for(n=0;n<L;n++)  
36:   {  
37:   sumx=sumy=0.0;  
38:   for(k=1;(k<=N)&&(k<=n);k++)  
39:    sumy+=a[k]*y[n-k];  
40:   for(k=0;(k<M)&&(k<=n);k++)  
41:    sumx+=b[k]*x[n-k];  
42:   y[n]=sumx-sumy;  
43:   cout<<"\n\ty["<<n<<"]::"<<y[n];  
44:   }  
45:   getch();  
46:  }  

More aboutImplementation of General Diffrence Equation

Circular Convolution of two sequences using DFT and IDFT

Posted by fasxxzczc

Circular Convolution of  two sequences using DFT and IDFT

Compute the circular convolution of given two sequences using DFT and IDFT.





1:  #include<graphics.h>  
2:  #include<iostream.h>  
3:  #include<conio.h>  
4:  #include<stdlib.h>  
5:  void main(void)  
6:  {  
7:   int sample,impulse,sam[10],imp[10],out[10][10],outp[10]={0},i;  
8:   int gd=DETECT,gm,maxx,maxy,j,k;  
9:   char str[5];  
10:   initgraph(&gd,&gm,"c:\\tc\\bgi");  
11:   maxx=getmaxx();   // Returns maximum x or y screen coordinate  
12:   maxy=getmaxy();  
13:   cout<<"\n\tEnter the number of element in sample sequence::";  
14:   cin>>sample;  
15:   cout<<"\n\tEnter the number of element in impulse sequence::";  
16:   cin>>impulse;           //input impulse & sample sequence  
17:   cout<<"\n\tEnter the sample sequence";  
18:   for(i=0;i<sample;i++)  
19:   cin>>sam[i];  
20:   cout<<"\n\tEnter the impusle sequence";  
21:   for(i=0;i<impulse;i++)  
22:   cin>>imp[i];  
23:   if(sample<impulse)  
24:   for(i=sample;i<impulse;i++)  
25:    sam[i]=0;  
26:   else  
27:   for(i=impulse;i<sample;i++)  
28:    imp[i]=0;  
29:   if(sample<impulse)  
30:        sample=impulse;  
31:   int temp;  
32:   for(i=0;i<sample;i++)  
33:       for(j=0;j<sample;j++)  
34:       {  
35:            out[(j+i)%sample][i]=sam[j];  
36:       }  
37:   for(j=0;j<sample;j++)  
38:    for(k=0;k<sample;k++)  
39:     outp[j]=outp[j]+out[j][k]*imp[k];  
40:   int samp=sample;  
41:   setcolor(RED);  
42:   line(0,maxy/2,maxx,maxy/2);  
43:   line(maxx/2,0,maxx/2,maxy);  
44:   setcolor(GREEN);  
45:   for(i=0;i<samp;i++)  
46:   {  
47:    line(maxx/2+i*30,maxy/2,maxx/2+i*30,maxy/2-outp[i]*5);  
48:    moveto(maxx/2+i*30,maxy/2-outp[i]*5-10);  
49:    itoa(outp[i],str,10);        //converts integer to string  
50:    outtext(str);  
51:   }  
52:   getch();  
53:  }  
More aboutCircular Convolution of two sequences using DFT and IDFT