Friday 18 December 2015

MATLAB CODE FOR INFINITE IMPULSE RESPONSE FILTER(LPF,HPF,BPF,BSF)

MATLAB PROGRAM FOR IIR:

To write a program for IIR(infinite Impulse Response) filter like Low pass FIR filter, High pass FIR filter, Band pass FIR filter and Band stop FIR filter using Rectangular window using MATLAB.

ALGORITHM:

LOW PASS FILTER:
Step 1: Read the input sequence
Step 2: Perform low pass filter calculations
Step 3: Plot the output sequences

HIGH PASS FILTER:
Step 1: Read the input sequence
Step 2: Perform high pass filter calculations
Step 3: Plot the output sequences

BAND PASS FILTER:
Step 1: Read the input sequence
Step 2: Perform band pass filter calculations
Step 3: Plot the output sequences

BAND STOP FILTER:
Step 1: Read the input sequence
Step 2: Perform band stop filter calculations
Step 3: Plot the output sequences

PROGRAM:
clc;
clear all;
close all;
rp= input ('Enter the passband ripple ');
rs= input('Enter the stop band ripple ');
wp= input('Enter the passband frequency ');
ws=input('Enter the stopband frequency ');
fs=input('Enter the sampling frequency ');
w1=2*wp/fs;
w2=2*ws/fs;
[n,wn]=buttord(w1,w2,rp,rs);
[b,a]=butter(n,wn);
w=0:0.01:pi;
[h,om]=freqz(b,a,w);
m=20*log10(abs(h));
an=angle(h);
subplot(2,1,1);
plot(om/pi,m);
title('IIR LPF');
ylabel('Gain(dB)');
xlabel('Normalised frequency');
subplot(2,1,2);
 plot(om/pi,an);
 ylabel('Phase(radians)');
 xlabel('Normalised frequency');


OUTPUT:



        
                                 Fig: IIR window Output



FOR MORE DETAILS  CLICK HERE

Monday 14 December 2015

LINEAR CONVOLUTION USING MATLAB?

MATLAB PROGRAM FOR THE GENERATION OF LINEAR CONVOLUTION:  


     To write a program for the generation of Linear convolution for the given sequences by using MATLAB.

Step 1: Start
Step 2: Read the first sequence
Step 3: Read the second sequence
Step 4: Perform convolution for both the sequences using conv() function
Step 5: Plot the sequence
Step 6: Display the output sequence
Step 7: Stop


clc;

x=input('Enter the sequence 1:');

h=input('Enter the sequence 2:');

y=conv(x,h);

figure;
subplot(3,1,1);
stem(x);
ylabel('Amplitude->');
xlabel('N->');
subplot(3,1,2);
stem(h);
ylabel('Amplitude->');
xlabel('N->');
subplot(3,1,3);
stem(y);
ylabel('Amplitude->');
xlabel('N->');
disp('The resultant signals:');

 





FOR MORE DETAILS CLICK HERE



HOW TO GENERATE SINE, COSINE,RAMP,EXPONENTIAL,UNIT STEP AND UNIT IMPULSE SIGNALS USING MATLAB?

GENERATION OF SIGNALS:
                          

To write a program using MATLAB for the generation of signals like Sine sequence, Cosine sequence, Ramp sequence, Exponential sequence, Unit-step sequence and Unit-impulse sequence.
ALGORITHM:
SINE SEQUENCE:
 Step 1: Initialize the time period.
 Step 2: Design the function of sine wave.
 Step 3: Plot the sine sequence.
 Step 4: Display the output
COSINE SEQUENCE:
 Step 1: Initialize the time period.
 Step 2: Design the function of cosine wave.
 Step 3: Plot the cosine sequence.
 Step 4: Display the output
RAMP SEQUENCE:
 Step 1: Read the length of the ramp sequence.
 Step 2: Define the length of the ramp sequence.
 Step 3: Plot the ramp sequence using stem function.
 Step 4: Display the output.
EXPONENTIAL SEQUENCE:
 Step 1: Read the length of the exponential sequence.
 Step 2: Read its amplitude.
 Step 3: Plot the exponential sequence using stem function.
 Step 4: Display the output.
UNIT-STEP SEQUENCE:
 Step 1: Read the length of the unit-step sequence.
 Step 2: Plot the unit-step sequence.
 Step 3: Display the output.
UNIT-IMPULSE SEQUENCE:
 Step1: Read the length of the unit-impulse sequence.
 Step2: Plot the unit-impulse sequence.
 Step 3: Display the output.


MATLAB CODE FOR SIGNAL GENERATION:
clc;
t=0:0.1:pi;
y=sin(2*pi*t);
subplot(3,2,1);
plot(t,y);
ylabel('Voltage(Volts)->');
xlabel('(a)time(Sec)->');
title('SINE SEQUENCE');
clc;
t=0:0.1:pi;
y=cos(2*pi*t);
subplot(3,2,2);
plot(t,y);
ylabel('Voltage(Volts)->');
xlabel('(b)time(Sec)->');
title('COSINE SEQUENCE');
clc;
n1=input('Enter the length of the ramp signal:');
t=0:n1;
subplot(3,2,3);
stem(t,t);
ylabel('Voltage(Volts)->');
xlabel('(c)N->');
title('RAMP SEQUENCE');
clc;
n2=input('Enter the length of the exponential sequence:');
t=0:n2;
a=input('Enter  the "a" value:');
y2=exp(a*t);
subplot(3,2,4);
stem(t,y2);
ylabel('Voltage(Volts)->');
xlabel('(d)N->');
title('EXPONENTIAL SEQUENCE');
clc;
n3=input('Enter the length of the unit sequence:');
t=0:1:n3-1;
y1=ones(1,n3);
subplot(3,2,5);
stem(t,y1);
ylabel('Voltage(Volts)->');
xlabel('(e)N->');
title('UNIT STEP SEQUENCE');
clc;
t=-5:5;
y=[zeros(1,5),ones(1,1),zeros(1,5)];
subplot(3,2,6);
stem(t,y);
ylabel('Voltage(Volts)->');
xlabel('(f)N->');
title('UNIT IMPULSE SEQUENCE');
  


OUTPUT:



  FOR MORE DETAILS CLICK HERE

WHAT IS SPEECH PROCESSING?

Signal processing is the action of changing one or more features (parameters) of a signal according to a predetermined requirement. The parameters that is to be changed may be , amplitude, frequency, phase etc... of the signal . The signal which undergoes such a process is known as input signal. And the entity which performs this processing is known as "Signal processing system" or simply system. ie; the input signal is fed to the system and the appropriately processed signal is coming out of the system. This signal is known as the "Output signal".


Fig:Signal processing 


FOR MORE DETAILS     CLICK HERE

MATLAB CODE FOR ANALOG TO DIGITAL SIGNAL CONVERSION

hi
     we know the analog sine wave but latest discrete signal . In  MATLAB  we can implement  by using following code
 clc;
clear all;
close all;
x=0:0.1:10;
y=sin(x);
subplot(2,1,1);

plot(x,sin(x));
xlabel('time');
ylabel('amplitude');
title('analog  signal');
hold on;
subplot(2,1,2);
x=0:0.1:10;
y=sin(x);
stem(x,y);
title('discrete  signal');xlabel('time');
ylabel('amplitude');

FOR MORE DETAILS
                                         CLICK HERE

WHAT IS 5G TECHNOLOGY?

WHAT is 5G:
FUTURE 5G communication systems need to support unprecedented requirements for the wireless access connection, targeting cell throughput capacities of 1000 X current 4G  technology and roundtrip latency of about 1 msec.
we know about 3G and 4G. now a days these are implemented in real time, but 5G is the latest concept and researching field. check latest IEEE paper with 5G concept with this link..








                                   
                                                        Fig: 5G TECHNOLOGY

          FOR MORE DETAILS..
FAIRNESS FOR NON-ORTHOGONAL MULTIPLE ACCESS IN 5G SYSTEMS

Saturday 12 December 2015

How to Creating an arbitrary periodic signal in square wave form?


If you have synthesized a signal using any of the methods described above you can use that signal as
the repeating segment in a periodic signal. This particularly useful for signals that cannot be described mathematically without the use of piece wise functions

Square waveform:


clear all;
close all;
repeating_segment = [ zeros(1, 100) ones(1, 100)];
num_periods = 10;
square_waveform = []; % empty variable
for k = 1 : num_periods
square_waveform = [square_waveform repeating_segment];
end
plot(square_waveform);
ylim([-0.1 1.1])



FOR MORE DETAILS CLICK HERE




Friday 11 December 2015

MATLAB CODE FOR TIME SHIFTING AND SCALING OF SIGNAL

MATLAB CODE:



clc;
clear all;
close all;

limit=15;
step=0.01;
T=5;
t=-limit:step:limit;

 x=t.*[t>=0 & t<=T];
 subplot(421)
 plot (t,x);
 grid on;
 xlabel('x(t)');

 a=-1;
 t0=0;
 t1=a*t+t0;
 x=t1.*[t1>=0 & t1<=T];
 subplot(422)
 plot (t,x);
 grid on;
 xlabel('x(-t)');

 a=1;
 t0=5;
 t1=a*t+t0;
 x=t1.*[t1>=0 & t1<=T];
 subplot(423)
 plot (t,x);
 grid on;
 xlabel('x(t+5)');

 a=1;
 t0=-5;
 t1=a*t+t0;
 x=t1.*[t1>=0 & t1<=T];
 subplot(424)
 plot (t,x);
 grid on;
 xlabel('x(t-5)');

 a=2;
 t0=0;
 t1=a*t+t0;
 x=t1.*[t1>=0 & t1<=T];
 subplot(425)
 plot (t,x);
 grid on;
 xlabel('x(2t)');

 a=1/2;
 t0=0;
 t1=a*t+t0;
 x=t1.*[t1>=0 & t1<=T];
 subplot(426)
 plot (t,x);
 grid on;
 xlabel('x(t/2)');

 a=2;
 t0=5;
 t1=a*t+t0;
 x=t1.*[t1>=0 & t1<=T];
 subplot(427)
 plot (t,x);
 grid on;
 xlabel('x(2t+5)');

 a=-2;
 t0=5;
 t1=a*t+t0;
 x=t1.*[t1>=0 & t1<=T];
 subplot(428)
 plot (t,x);
 grid on;
 xlabel('x(-2t+5)');

OUTPUT: 

 FOR MORE DETAILS CLICK HERE