0% found this document useful (0 votes)
10 views16 pages

Comm File

The document outlines various MATLAB functions and techniques for signal processing, including impulse response, convolution, and Fourier transforms. It provides code snippets for generating and manipulating signals, visualizing results, and verifying properties such as frequency shifting. The content is structured around experiments and practical applications in signal analysis using MATLAB.

Uploaded by

Eva Arya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views16 pages

Comm File

The document outlines various MATLAB functions and techniques for signal processing, including impulse response, convolution, and Fourier transforms. It provides code snippets for generating and manipulating signals, visualizing results, and verifying properties such as frequency shifting. The content is structured around experiments and practical applications in signal analysis using MATLAB.

Uploaded by

Eva Arya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Date Page No.

Topic

Expeximest -l

Aim-Intducthan mATLAR and to pt vauoA CuHYeA -

G Unt Inpulse dunchen


(iSiynum dunctien

() eisdie and Nn-paindic Sunthok

Theoy
pegicdaymltpazagvicAnment
pgami devekeped
and
LanggeMathlwotka muneic
empheg
MaTLAS allow mdix manipuatioh
and data, imphmertatin a aenth
intetacea and ictoxbing ith pema
LOtuttern another

The buit in lunchank cËof mALAR elo tp mth


caleulationt incudigg aptimihcn
other

derrn these
hebe nimatnd
both
And 2-D3-D
pagsamming enicknnent pagga

T als
theanpudaton a tateseek
tatesee in Cemmand oindo)
WRITO-LINE ecos itsely Teacher's Sign..
title('nom
periodic
xlabel(tine")
sigal") Sbplot(2,1,2)
ylabel(ampli plot(x)xlabel(tine')
X=rand
ylabel(anplitude')
signal)
periodic
title( plot(t,y)
y=sin(t);
subplott=-18:e.e1:1
title('discrete
inpulse')
; xlabel('n')subplot
('u(n)
ylabel")(n,u)
continuousylabel(
inpulse')
stemtítle(" plot
'u(t)subplot(2, u)1,
1)
(n,n=-18:19;
U-[zeros
(1,
xlabel(t "); );
t-20:e.01:
y=heaviside
axis plot(t); 20;
152) (2,
(2,
1, (1, ([
(t,y,
tude) ; 1) 1, -20
2) 18) "linekidth',20
1 -2
zeros
2]);
(1,
3)
19) ;
];

Siscrete
impuie Continuous
impuise

Deiic
sia

Noo the MATLAß


Seirs
This
EditShit)- thiaIniomdaelyeute Topic
vasieys ttnetthat
oind aved
es
Cusse Loith Thase
diipay romerdThe
Loindo-This
by the
bove otenent
Th oe
the le
beun Date
adieni exact han exteniim
er's
ign..
cannt
in
lttedke diiplaya
Aatermeet
) Lacaticn the be
and m'.
custentiO lVed
PagetNo
then lpat)
Thwe
heds it ord
e
Page No
Date
Topic

SIGNUMEUNCIION i)Uit Step funchn


n-20: 20;
x_ nl=n-@; 270
05
stem(n, x_n1) ;
x_ n2=n=@;
sten(n, X_n2) ; -05
sgn_n=x_nl-x_ n2;
-20 13 10 5 10 15 20
ste(n, sgn_n);
ohich
Stt othesw ise
EXPONENTIONAL EUNCTION
20

n=-28:20; xenYalu e x
10 7D

xn=2.*(0.9. ^n); 5

plot(n, x_n); 1 -10 5 10 15 20

SINE WAVE
zapmental ath
a-2; sine plot
f=2;
t=0:8.01:1; O 05
x=sin(2"pi"ft)
plot(t, x, 'linawidth', 3);
title('sine plot');
a apeetie he iotezval while
xlabel(" tine') ; 02
time
06 0.9
neASakay epeti ite path and can
ylabel(' arplitude '); MYe at any path

Loealatted m mata and


matla Loeee tudied

WRITO-LINE eco Teacher's Sign.


title
convalution):
plet(x, plot(x, plet(, SAlot
, FiNN
the 1
siNi & label(
Sanple);
title(Convolution
ulse2_lengthinput('Enter
figunes
comvolution_nesult
conv(ulsei,
Sic2stem(convolutioneslt);
xlinspace(-S,000); S, ulse2); Delsel Dulsel_
ylabel(nplitude
ylabel(Anplitue subplet(3,
sbplot(3,3)sA,ylabel(Anpitue
)s ): sic); figures
siN); ,) subplot(, );covolution ylabel(Aplitene
Defie );
label(Te )s abel(Tie)s ): abel(
Te) lse
Covlution the lengthingut(
Sinc(N;
sinc(r)s the ones(1,
pulse2_length)
ones(,
convolution
sin
sic
conv(sincl,
Dlses pulse_length)s
f pulses of
Ente
sinc Rectangul
aN
the the
Pulses sinc2,'same')
their
ar length length
coolution Pulses
) of of
);
7
sum(sinc1);

Convoltoh

ol
Rectanguler

Puikes

E lShawD
hea Requiaed.
Bofase. Plßes shou Convalue. 2
PulleHence Topic

+end
that that
Canladatian gctSinet ’Canvalstion
Canval ub
Canvalutian
he teckangdat pulbed
andon.
deviatin
Riandasd Sinet
onf
Exferimct2
vatil MATLAB.
Date
in adasg
(t- Ainc MATLAB
er'Sgns X,
Tldz plded
let

iáa Page No
e
te kinc
mn plbe
Date
Title. Page.

talket xt) and hlt) be 2 hectangulakpulica


A

se-oeined
num
paname tes
2ulses = inutEnter the nunber of rectangular pulses: ):
2lse cth iNt('Enten the idt blt-I= A
f each Nctangular alse: ):
lse_height = innut( Enter the height of each rectangular pulse: ')
1 heate a vecton reonesenting one rectangul ar pulse
Lalse linspace(-5, 5, 1002);
ret_lse = retals(t_aul se,
Comvolve mulinle rectangulan pulse_with;
I
aulses
canvelve_result
for i= 2:hun alses t_ulse;
comvolve_result = conv(convolved result, rct_pulse, 'same') t<-27
max(camv(convalved_result, rect_ulse, 'same'));
visualization
Normalize for better ERTA A|)At+) -2T<t<o
end A (27-t) D<t<2T
1 2lot the reslts tT

subnlot (2,1,1);
plot(t_ulse, rect_pulse, Lineidth', 2); A2T -lt)
title('he Rectangular Pulse )
label("Tine )s
ylabel(Anplituce');
subplot (2,1,2);
plot(t_pulse, convalved_result, 'Linewiath', 2);
title("Convalution of Nltiple Rectangular Pulses');
dabel(Tìne' )s The
ylabel (Anplitude);
sgtitle(Verification af Central Linit Theoren' );
alot(t, convalved_pulse, Linekidth', 2);
title('Convolution of Sync Pulses');
label("Tìne' );
ylabel("'Anplitude):
title('Demonstrating Convalution of Syne Pulses') ahtained
plathed imilaL
mAILAßai
auccaaju
Land he
Verication of Central Lmt Theorem
eRaatangar Pse icdeapiabad thenmaaly

CLASSTIME
Page No
Date
Topic

Exp£RImENT- 3
1rneers
1 Sanpling nequency ( )
Duration of sgnal (s)
t2/Ps:t/2:Tine vecton Aim - To the
1 Create a Gussiam puse signal
1 Standane deviation
e-t.2(2*siga"2)):
1 Cute the Fourier transt t the original signal
Ptshif(Ft x)):
17ne shLft panametes
tsht2. 1Tine shitt amount
1S he signal in tine omai
ted ep(-(t - sh)."2/("sigma));
1 Comute the Fourier transfom f the shefted signal
Lshfted - tshift(fft(x_shifted)):
1ecuency ector
ength(t):
-(-Fs2:FsNFs/2-Fs N)
Translan A a mathemateal
2 Puot the orginal and shahed sigals n tine and reauency domains

Thasy- Th a a
gune: Orgina Sigrai Mapntuu SpetmDngima
sot(2, 2, 1)E

tite( riginal Sigral ):


Kabel Time (s) D: technigue hat demai sepeleototon
ViabeAue):
sulot2, 2, 2) Can be l e d t
oti(F, abs (K3):
titieagntue Specoum
Te s
Shte Spra
Magnituoe SpectrumShe
Lanalz it Cestent ad
Kabe(reauency ) 3 :
yabe(gniudeD:
subplot(Z, 2, 31:
platt, _shaFte) mdulaim onddemoduletn

Frecuenc
sgot(2, 2, 4):
plt, absK_shiftec)):
title g t u e Spectu (Shftec)"):
KLatel(Fneauency

2ry tine shifting pnaperty shifted()= ) Erp-j2pi*t_snift)


epecte Kfted = exp(-1j*zi"ftstift):
SFt he and expectec _shifted
erence beteen conputed Dfenece betuee Computd at Ege
figune
sunglst B,2.1)
pi(, abs(kshiftes - exgected T_stifted));
titeufference bete Computet ane Epected

Flo) e^ljut
WRITO-LINE eco Teacher's Sign.
Page No.
Date
Topic

the
ananetens the hoe
1Sanpl ing frequency (H2) amawnt
1Duration ef signal (s)
t:1Es:t; 1Tine vector
demain t the ahiftd
1heate a cosine wave signal
* Frequency of the cosine wave (Hz)
olamain

opute the Fourier trans form of the original signal


X= fft(x); gll=c^ywtlil)
t Frequency shift parameters
f_shift = 5; 3 Frequency shift amount
S Shift the signal in frequency domain
X shifted = fftshift (X) ;
N- length(X_shifted) ;
f - (-Fs/2:Fs/N: Fs/2-Fs/N) ;
X_shifted - X_shifted * exp(1j*2*pi*f_shift"t);
Compute the inverse Fourier transform of the shifted signal
x shifted - ifft(ifftshi ft(X_ shifted));
Plot the original and shifted signals in time domain
figure; Oniginal Signal
subplot(2, 1, 1);
pl x);
ec'Original Signal');
xlabel(Time (s)");
ylabel("Anplitude');

subplot (2, 1, 2); Tme (s)


plot(t, real(x_shifted) ) ; Shifted Signal

title('Shi fted Signal');


xlabel ("Tine (s));
ylabel( 'Anp litude');

Verify frequency shifting property 500 05 06 08


diff_signal = x - real (x_shifted); Tne (s)
max_diff = max(abs (diff_signal));
disp(["Maximum difference between original and shifted signals: ',
num2str(max_diff)]);

WRITO-LINE CO% Teacher's Sign.


Page tio
Date
Topio

lanvelution A a mdhemahcal
ConYutm puaperty pscdusa
Opaton thataled
1Define two functions f(t) and g(t)
t-5:0.e1:5: hitdfunchim hat sprasea
f sin(t); % Define f(t)
8- cos(t); XDefine g(t) othe The Canveluto sapeuty
S Compute h(t) f(t) g(t) 2tatesthat
h conv(f, g, 'same' ); ftheouxir tanh fah
$Conpute Fourier transforms of f(t), g(t), and h(t) Tnotbes
their foiee Torarkfaok
F fft(f);
G fft(g); the pduct a
agnali and glt, thu
f(t
fft (h) ;
2
S Plot the results
Lonyetution hlt) can be cOitten as
subplot (3, 1, 1);
plot(t, f); 1 2
Time
títle(' f(t) "); g()

xlabel("Time' );
ylabel( ' Amplitude');
denptes LonvelhooThen the t u r
subplot (3, 1, 2); ohee
plot(t, 8); Tune
h() t) o t ) O O a tensfo~ho of hlt) Hlo) can be
title('g(t) ');
xlabel ('Time' );
ylabel ("Amplitude');
Hlw) =Elw) clw)
subplot (3, 1, 3) ; 530 ase he
whese Flw) and clo)
Time
plot(t, h);
títle("h (t) f(t) g(t)"');
xlabel ('Time'); oflt) and
ylabel('Amplitude ');
*Verify Fourier transform property: F{h(t)} = F(f(t) g(t)}
figure;
ard
subplot (3, 1, 1);
plot (abs (fftshift (F)));
title('Fourier Transform of f(t)');
Fourier Transform off ( t ) 0 0 the zgeph
pepehes Lore
pletted
xlabel(" Frequency' ) ; VasiDus
ylabel ("Magnítude'); 400 1030 120
Frequency
subplot (3, 1, 2); Fourier Transform of gt)
plot (abs (fftshift(G) );
title('Fourier Transform of g(t)');
xlabel("'Frequency' );
ylabel ("Magnitude'); Frisancy
1010 1200

Fourler Transform of ht)AhOGa


subplot(3, 1, 3);
plot (abs(fftshift (H)));
title('Fourier Transform of h(t) ');
xlabel ('Erequency');
ylabel( "Magnitude '); Frequenc

WRITO-LINE ecos Teacher's Sign.


Page No.
Date
Topic

TUEABL biskit
Caital Iabesduchao to ETI Kt
9-15/1A OPOMER

PANSIG Expeimestes
Traot ol i
UUES
Darme impie the Enm Da Teleumk
A t lommuni catiao and
abot
hed te helo 2tudenta leatn
destboks A
ll conition
ANALOC
DECODER he hlackd n that mare
impifed repraeatation f a
GD

DIGITAL MODUL
Coroplex citcuid
MULTIPLIER
0ER
T
ERIAL |Slack diagtms abet hoo he
X electnoie Aystrok corthat a
ciscuit wokA each bdck 2epaent named
SNE)
that peifernk eperate task and i
EMONA
Telecoms-Trainer
101 CornmOLocksi
CISITAL to wbat it deek Example
the addese multpler,
ANALOG
DUAL
GEAYLSE Camunicathion eqipment indude
SWHCH
ENCODER and

TDM
Addes
GENEHANDE The addes medleia led

11NRZM real hme Twa enaleg inpt ipal Al) eR) ma


MULTIPLIER be added adtalle pepuhhon Gand g
MULTIPLIER The ewlht um iK preseotd at he outpt
X VCO

Ihe Becand
The Addes |) intludes adjutable gai
ADDER LE adder Ix The Addes
VDc EXDR ampliter
Can as be Lwhed as a mmal
me iopt ad he inpu

WRITO-LINE eCO Teacher's Sign..


signalaThid
ane
ohich vay Aignalatha
Thea
he fam.
Sine
Teacher
Sign.
shiftd value
2KHz
be and Theaipude
sawucejpal
Led
Date can digtal
unitbg 2KM2
uhich
puzth
nal
WRITO-L
eco
Topio
Agaala
Topic Date Page No

Tbe cther
a vatiable anpiter The bulte Can be used
and a ttenuate
|educe)Jangeignal.
Cae 2hauldbe takern toenkwe thatlates
medles ate not aveloaded du de excestie gai
which ol Jead whichia
to dista'hin afigaliLohich
to be ave ided

Speech
The kpeech medule allows peech and audie ignal
to be coovted iot an elactioaldigral The spzch
dule includes senstive micaphene Lshich o
eally pick up mhmal 2pech and haaksaund naike
The ipheneail cahruiualy cutpd alecticalL
2yamß

Junable LPF
Fltel iapatact bildiog Llocki in electenici
&eleormnuni Cathn Aie Son
and Lloek other
blocki
The toble LPF allaeA to ohich

Thw have adlthe Llocka


EIT-oL kit .

WRITO-LINE eco Teacher's Sign.


2XYe
Caiet

Latal
X tle
nadulto
Sredct "staden
Calie mte
CANues etal
ch
T
S8-SC
mdalaed

NE )Sed
the
Sape Poudune The
AidebandaCan
Pautbetemed DSB-CC
Cantaung and DsBscIhe LaldOALlloAtope
connech
Appanat
ReauiCIuteLad Amo
up a oiitohvalba
ue Toplo
th A)2Aidebande.Side
diar
medlated Aguchleneusdteate atnge.
-Stia haidettehieprcoduck
medulatex
uhith paee dundulathd
outputz
genenateamd
p QANe pcdc
ohich detector
Ltmeb the Conrtains Exprimot-h
hich which
caonaidtathe
bandA democulate a Date
gatu Ds&sc (demudlates) adapte.
wwea, kit
er's
lgn. taanimiásie
fignaThe aue denodulated
cairg
entsel Calcice Iel,
msdiclat theLowet a
a band TDual
to le alegoth Page No
kMz cackA Caxie IA dobeide
vies efeqn A channd
Cascek amd koken

higha
VCo Topic Date Page No
mERIK 7UNPSE NO1SE
CENC RATR

-2sd90 3S h e rmede Lonttt del paitn t


BFFER
yieY D9B-SC

4Recay2k the oeiage uing puct deteck by


gain antel
The multlix modle ard Rc
utlitiÅ accule aue wed to impmert a peoduct
dtect
eThe ent thed up iA apzeranted hy aß)The te
Agneonid which i
DS2-Se

Dasd

2dsennt ug to 2kH2 Qine eutput in Maste Sn


DU8-C nsdala
Brodoct oletech
4) The ampitex ge auible
ampltude t be

LT donimit and
Trdeprdt Contal to 2msdiy pitim and t n Buex Mdue
VCO
antclrkoike

Pedud
WRITO-LNE eco Teacher's Sign.
Date
Title Page.

he cheo kdeataed
osdiy poitin
Loate phase 2hfte nuolle geun derntuel dtt
t pation and
middle sf teovel
Set

omikde
obtersefeet

Lwave
CascieF
ATalk in miuaphen Lohe vNu
unaynckeaniked.
Roul The epiOot
S4)

Bucawt
Pucau had be checked boxe cannzih

CLASSTIME
Date
Pge.

which
7 Cha
he Lave
Lanpltk
Am sinal dranianthog a pisaf
LandA

Called madlaien and Hh i he mia

aled an
envelapedetee

St p theqipment mentioned in
t genkatl that iA ampltde
bMadulated aya 2kH2 Siocave

VASZ ASLE
Addene mdute 's Rutpt n Aape
Centeuntl Dc Jevel A V end a Cantelto
Labtain a Vp ine cwve
lal
5) St the Scapex mde Canto the DUAL palihim d vien
the A Aut e mulhpliet meele al cwell ad
Dlal CLASSTIME
Date
Title. Page

ttanuahienantl
the Seane'k Vehal a

sDiceecd the capei channel inpt Jaom he Sachfck


Quput Canneet RC LPFk cutt inttead

stup Bccpet tmehase Conteeltthe2 msldie peaihen


Ten he Buftei madek Can carbt flly antclackoite
and

Szpe diplat and tthe hedahone

2) Th additin to he
)The mhplex medue medeli the mathamaticad bae

inkae the mae analk empltde podece a


midelated Ann GCeate
iockeale the mas¡ Sinal ampkde tpeduce an
Am

Rowlk - The expSumint heHE iA and


an A wave

Prucahan-)Pl cannac Hank shautd be neat haht


Dches Rhedd be cheked bedee aaneeng
CLASSTME

You might also like