You are on page 1of 30

Eng: Khairi A.

Elrmali

communication systems lab

Communication system lab

The main objectives of this lab are To implement experiments of communication system lab using 'Matlab 'Simulin !repare" by Eng: Khairi A.Elrmali #$$%
Communication Engineering

Eng: Khairi A. Elrmali

communication systems lab

Laboratory Manual
PREFACE Welcome to the Communication Engineering Lab As course & Lab instructors, we do hope that you will enjoy working out the experiments. The idea of these experiments is that you will do a combination of MATLAB simulation experiment followed by a hardware circuit experiment to really grasp and fully understand the main concepts of communication engineering We tried our best to relate what you are learning in class with what you are taking in the lab. The following outlines the general policies for the lab: Grading Policy: 8% for Lab Reports 2% for Pre-labs 4% for Lab performance 6% for Lab Final which will add-up to 20% for the Lab grade. Lab Report: You must submit the report at the beginning of the new following lab. The report must have a cover page. It must have the following: 1. Lab objective 2. Clear theoretical concepts & equations used. 3. Description of the lab results or data collected and plotted. 4. Conclusions 5. Appendices showing your source code and results of the simulations or plotted data Note: You can follow the sample report included below. Important Notes: 1)Always bring an empty floppy disk with you. 2)Each unexcused absence will result in a grade of ZERO for that experiment. 3)As per university rules, three unexcused absences will cost the student a DN grade. 4)No make-ups are allowed. 5)Any kind of cheating in is forbidden and will be treated according to the university rules. Just do your work independently.

Eng: Khairi A. Elrmali lab


Communication Engineering I

communication systems lab

Lab Report for Experiment No#


Place the title of the experiment over here Prepared for (Place the name of your lab instructor) By (Place your) Name ID No. Section No. (Place the date of the lab experiment)

Objective:
Place the objective of the experiment here

Equations, general concepts and theoretical background:


Place the equations if they exist & your general fundamentals of the experiment here

Observations & discussion:


Write your comments independently regarding the simulations youve done or the results youve obtained through the whole experiment in details. They should be very clear, well written & logically convincing the reader of the report. You have to refer to the simulations or plots accordingly

Conclusion:
Write a brief conclusion stating the main lessons that youve learnt from running the experiment. DONT REPEAT THE OBJECTIVE HERE OR DESCRIBE THE EXPERIMENT AGAIN! Appendix I: (put Matlab Code here, or other relevant material) Appendix II: (put Matlab simulation figures, or other lab plots and results)

Eng: Khairi A. Elrmali

communication systems lab

Experiments for analog communication system


o Spectrum Analyzer

Objectives: :The objectives of this laboratory are


&. #. To intro"uce the spectrum analy'er as use" in fre(uency "omain analysis. To i"entify various types of linear mo"ulate" )aveforms in time an" fre(uency "omain representations This section "eals )ith loo ing at the spectrum of simple )aves. *e first loo at the spectrum of a

.simple sine )ave


To Start Simulin : Start Matlab then type Simulin on the comman" line. A Simulin +ibrary *in"o) opens up

Simulation Circuit Diagram

Equipment's Sine wave's {sources ,sine )ave&: Amp-# volt. # /' an" phase -$0 !o wor"space's an# scope's {sin" ,)or space's 1name's. #$234. scope's 1$.$$5. 640 Sum {linear $ pro#uct's {non linear Simulation %arameters & 7-#$23 number of points start time simulation -$8 stop time simulation -$.$$58 1sto-n9Tm48 Min : Max step si'e-$.$$5;#$23 1sto;74' <n the Matlab comman" )in"o) == )hos 7ame Si'e >ytes ?lass

Eng: Khairi A. Elrmali m t #$23x& #$23x& &%632 "ouble array &%632 "ouble array

communication systems lab

@ran" total is 2$A% elements using 6#B%3 bytes Tout-sto91$:17C&44';78 Save MCfile spectra.m DEra) the message signal in both time an" fre(uecny "omains subplot1#&&4 plot1t.m4 gri". axis1,$ max1t4;# C#9max1m4 #9max1m404 xlabel1'Time in sec'4.ylabel1'Amplitu"e in volt'4 title1'Message Signal'4 Dcompute the FGHI<EI TIA7SFGIM of the message signal by using Matlab Dfunction fft ,Fast Fourier Transform0 f-1&;$.$$5491$:#$2B48 mf-abs1fft1m44;#$238 subplot1#&#4 stem1f.mf4 gri". axis1,$ 2$$$ $ #04 xlabel1'Fre( in K/''4.ylabel1'Magnitu"e in volt'4 title1'Spectrum of the message signal'4

Eng: Khairi A. Elrmali

communication systems lab

M es sage Signal 5 A m plitude in v olt 0 -5 0 0.5 1 Tim e in sec Spec trum of the m ess age signal 2 M agnitude in volt 1.5 1 0.5 0 1.5 2 2.5 x 10
-3

500

1000

1500

2000 2500 Freq in Khz

3000

3500

4000

o Amplitu#e (o#ulation
This experiment is the amplitu"e mo"ulation for mo"ulation in"ex m - & an" $.5. From the e(uation of the AM

The representation of the signal in both timeC"omain an" fre(uency "omain )hen Ac-& for m-& an" m-$.5 )ere foun" to be as sho)n in figures

Set simulation parameters & 7-#$23 number of points start time simulation -$8 stop time simulation -$.$$#81sto-n9Tm48 Min : Max step si'e-$.$$#;#$23 1sto;74' )n t*e (atlab comman# win#ow.

Eng: Khairi A. Elrmali ==)hos 7ame am t

communication systems lab

Si'e

>ytes ?lass &%632 "ouble array &%632 "ouble array

#$23x& #$23x&

@ran" total is 2$A% elements using 6#B%3 bytes Save MCfile am.m DEra) the amplitu"e mo"ulation signal in both time an" fre(uency "omains subplot1#&&4 plot1t.am4 gri". axis1,$ max1t4 C#9max1am4 #9max1am404 xlabel 1'Time in sec'4.ylabel1'Amplitu"e in volt'4 title 1'amplitu"e mo"ulation'4

Dcomputes the FGHI<EI TIA7SFGIM of the amplitu"e mo"ulation signal by using Dfunction fft ,Fast Fourier Transform0 f-1&;$.$$2491$:&:#$2B48 amf-abs1fft1am44;#$238 subplot1#&#4 stem1f.amf4 gri". axis1,$ &6$$$ $ 204 xlabel1'Fre( in K/''4. ylabel1'Magnitu"e in volt'4 title1'Spectrum of the amplitu"e mo"ulation signal'4

Eng: Khairi A. Elrmali

communication systems lab

amplitude modulation 10 Amplitude in volt 5 0 -5 -10 0 0.5 1 1.5 2 Time in sec 2.5 3 3.5 x 10 4
-3

Spectrum of the amplitude modulation signal 4 Magnitude in volt 3 2 1 0

2000

4000

6000 8000 Freq in Khz

10000

12000

!o observe t*e e++ect o+ c*anging t*e mo#ulation in#e, o+ an A( signal ?hange the mo"ulation in"ex to $. 6 . $.3 an" "isplay the AM )aveform in the time "omain 1oscilloscope4 an" in the fre(uency "omain
&. >riefly explain the effect of mo"ulation in"ex on an AM signal. E++ect o+ -ariations in (o#ulating an# Carrier +requencies 1. Vary the carrier frequency 2. Vary the modulating frequency 3. Change the modulating signal to a square wave

Double.Si#eban# Suppresse# Carrier Signals:

DSB = cos1# 1 #$$$4t 4 cos1 # 1&$$$$4t

Eng: Khairi A. Elrmali

communication systems lab

DEra) the amplitu"e mo"ulation signal in both time an" fre(uency "omains subplot1#&&4 plot1t."sb4 gri". axis1,$ max1t4 C#9max1"sb4 #9max1"sb404 xlabel1'Time in sec'4.ylabel1'Amplitu"e in volt'4 title1'EoubleCSi"eban" Suppresse" ?arrier Signals'4 Dcompute the FGHI<EI TIA7SFGIM of the EoubleCSi"eban" Suppresse" D ?arrier Signals signal by using Matlab Dfunction fft ,Fast Fourier Transform0 f-1&;$.$$#491$:&:#$2B48 "sbf-abs1fft1"sb44;#$238 subplot1#&#4 stem1t."sb4 gri". axis1,$ &5$$$ $ #04 xlabel1'Fre( in K/''4.ylabel1'Magnitu"e in volt'4 title1'Spectrum of the EoubleCSi"eban" Suppresse" ?arrier Signals'4

Double-Sideband Suppressed Carrier Signals Amplitude in volt 5 0 -5 0 0.2 0.4 0.6 0.8 1 1.2 Time in sec 1.4 1.6 1.8 x 10 2
-3

Spectrum of the Double-Sideband Suppressed Carrier Signals 2 Magnitude in volt 1.5 1 0.5 0

5000 Freq in Khz

10000

15000

Eng: Khairi A. Elrmali

communication systems lab

oSingle Si#eban# (o#ulation Filtering the ES>S? gives the output as either a +S> 1+o)er si"e ban"4 or a HS> 1Hpper si"e ban"4.The simulation set up for the SS> signal is sho)n in figure belo) Analog /utterwort* 0ilter's JExtraK &1%02 parameter J#9pi9A$$$. 3K'

DEra) the Single Si"eban" Mo"ulation signal in both time an" fre(uency "omains subplot1#&&4 plot1t.lsb4 gri". axis1,$ max1t4 C#9max1lsb4 #9max1lsb404 xlabel1'Time in sec'4.ylabel1'Amplitu"e in volt'4 title1'Single Si"eban" Mo"ulation'4 Dcompute the FGHI<EI TIA7SFGIM of the Single Si"eban" Mo"ulation Suppresse" D ?arrier Signals signal by using Matlab Dfunction fft ,Fast Fourier Transform0 f-1&;$.$$2491$:&:#$2B48 lsbf-abs1fft1lsb44;#$238 subplot1#&#4 stem1t.lsb4 gri". axis1,$ &$$$$ $ #04 xlabel1'Fre( in K/''4.ylabel1'Magnitu"e in volt'4

Eng: Khairi A. Elrmali title1'Spectrum of the Single Si"eban" Mo"ulation'4

communication systems lab

Single Sideband Modulation 4 Amplitude in volt 2 0 -2 -4 0 0.5 1 1.5 2 Time in sec 2.5 3 3.5 x 10 4
-3

Spectrum of the Single Sideband Modulation 2 Magnitude in volt 1.5 1 0.5 0

1000

2000

3000

4000 5000 6000 Freq in Khz

7000

8000

9000 10000

Conclusion:

*e learnt ho) to operate the spectrum analy'er. oscilloscope an" the function generator to generate an" vie) "ifferent )aveforms. *e also performe" the "ifferent mo"ulation schemes L ES>S?. AM an" SS>

Simple training

Eng: Khairi A. Elrmali

communication systems lab

FEM multiplexing an" "emultiplexing

Objective

Eng: Khairi A. Elrmali

communication systems lab

@iven three message signal mt&-mt#-mt6-$.5sin 12$$$ t4 )ith Matlab Simulin using FEM techni(ue to transmit these three signals on a one common channel )here fc&-$/' 1i.e. the first message is sen" it using base ban" mo"ulation4. fc#-&$ /' an" fc6-#fc# an" also use this techni(ue to receive these transmitte" signals S"etc* t*e message signal$ (ultiple,e# an# #e multiple,e# signals in bot* time an# +requency #omains Simulation Circuit Diagram

Equipment's Sine wave's {sources ,sine )ave&: Amp-$.5 volt. # /' an" phase -$0 ,sine )ave#: Amp-& volt. &$ /' an" phase -$0. ,sine )ave6: Amp-& volt. #$ /' an" phase -$0 $ ,sine )ave2: Amp-# volt. &$ /' an" phase -$0$ ,sine )ave5: Amp-# volt. #$ /' an" phase -$0 Sum {linear $ pro#uct's {non linear !o wor"space's an# scope's {sin" ,)or space's 1name's. 6#B%34. scope's 1$.$$&. 640 Analog /utterwort* 0ilter's JExtraK &1%02. +!F# : +!F6 parameter J#9pi965$$. 2K' &/%02 1center fre(- &$ /' : *.> -&$ /'4. /%03 1center fre(-#$ /' : >.*-&$ /'40 Save MCfile +#4m

)n (atlab comman# win#ow == )hos

Eng: Khairi A. Elrmali 7ame Si'e >ytes ?lass &%632 "ouble array &%632 "ouble array &%632 "ouble array &%632 "ouble array &%632 "ouble array &%632 "ouble array

communication systems lab

f"m #$23x& m& m&# m# m6 t #$23x& #$23x& #$23x& #$23x& #$23x&

@ran" total is &##33 elements using A36$2 bytes 5compute t*e 0O67)E7 !7A8S0O7( o+ t*e message signal an# multiple,ing an# 5#emultiple,ing signal by using (atlab 5+unction ++t &0ast 0ourier !rans+orm' clc f-1&;$.$$#491$:#$2B48 m&f-abs1fft1m&44;#$238 f"mf-abs1fft1f"m44;#$238 m&#f-abs1fft1m&#44;#$238 m#f-abs1fft1m#44;#$238 m6f-abs1fft1m644;#$238 m&f-abs1fft1m&44;#$238 subplot1#&&4 plot1t.f"m4 gri". axis1,$ max1t4 C#9max1f"m4 #9max1f"m404 xlabel1'Time in sec'4.ylabel1'Amplitu"e in volt'4 title1'Fre(uency Eivision Multiplexing'4 subplot1#&#4 stem1f.f"mf4 gri". axis1,$ #5$$$ $ #9max1f"mf404 xlabel1'Fre( in K/''4.ylabel1'Magnitu"e in volt'4 title1'Spectrum of the Fre(uency Eivision Multiplexing'4

Eng: Khairi A. Elrmali

communication systems lab


Frequency Division Multiplexing

Amplitude in volt

10 0 -10 0 0.2 0.4 0.6 0.8 1 1.2 Time in sec 1.4 1.6 1.8 x 10 2
-3

Spectrum of the Frequency Division Multiplexing 2 Magnitude in volt 1.5 1 0.5 0

0.5

1 Freq in Khz

1.5

2.5 x 10
4

0requency (o#ulation

Simulation Circuit Diagram

Set simulation parameters & 7-#$23 number of points start time simulation -$8 stop time simulation -$.$$#81sto-n9Tm48 Min : Max step si'e-$.$$#;#$23 1sto;74' Equipment's Sine wave's {sources ,sine )ave: Amp-6 volt. & /' an" phase -$0 ,sine )ave&: Amp-2 volt. &$ /' an" phase -$0. ,sine )ave#: Amp-2 volt. &$ /' an" phase -pi;#0 $ Sum {linear $ pro#uct's {non linear !o wor"space's an# scope's {sin" ,)or space's 1name's.#$234. scope's 1$.$$#. 640 Save Simulin mo"el as fml.m"l

Eng: Khairi A. Elrmali

communication systems lab

DEra) the Fre(uency Mo"ulation signal in both time an" fre(uency "omains subplot1#&&4 plot1t.fm4 gri". axis1,$ max1t4 C#9max1fm4 #9max1fm404 xlabel1'Time in sec'4.ylabel1'Amplitu"e in volt'4 title1'Single Si"eban" Mo"ulation'4 D Dcompute the FGHI<EI TIA7SFGIM of the Fre(uency Mo"ulation D D by using Matlab Dfunction fft ,Fast Fourier Transform0 f-1&;$.$$#491$:#$2B48 fmf-abs1fft1fm44;#$238 subplot1#&#4 stem1f.fmf4 gri". axis1,$ #$$$$ $ #9max1fmf404 xlabel1'Fre( in K/''4.ylabel1'Magnitu"e in volt'4 title1'Spectrum of the Fre(uency Mo"ulation signal'4

Single Sideband Modulation 5 0 -5 0 0.2 0.4 0.6 0.8 1 1.2 Time in sec 1.4 1.6 1.8 x 10 2
-3

Amplitude in volt

Spectrum of the Frequency Modulation signal

Magnitude in volt

1.5 1 0.5 0

0.2

0.4

0.6

0.8 1 1.2 Freq in KHz

1.4

1.6

1.8 x 10

2
4

Eng: Khairi A. Elrmali

communication systems lab

Experiments for "igital communication system


E,periment: sampling t*eorem

C+ab reports shoul" inclu"e: &CAll figures plotte" in the experiment #CAns)ers of the (uestions given at the en" of the lab manual Objective The objectives of this laboratory are: &. To increase the stu"entsM familiarity )ith the sampling theorem #. To examine signal sampling. aliasing an" signal reconstruction E,periment Start Simulin by typing Simulink in the Matlab )or space. 2.Sampling 1i4 Gpen a ne) mo"el )in"o) 1File 7e) Mo"el4. 1ii4 ?reate the follo)ing NSampling.m"lO mo"el

1iii4 Set the parameters of the "ifferent bloc s as follo)s {sources :%ulse 9enerator & perio"-&;&$$$$. Euty cycle -# 1for i"eal sampling4. -2$ 1for 7atural sampling 4' . Signal 9enerator & f-&$$$/'. A-$.5' {DS/ bloc" set 0ilter ,or"er: 3. fc-#$$$0 Simulation %arameters & 7-#$23 number of points start time simulation -$8 stop time simulation -$.$$68 1sto-n9Tm48 Min : Max step si'e-$.$$6;#$23 : 1sto;74' )n (atlab comman# win#ow

Eng: Khairi A. Elrmali == )hos 7ame Im t Si'e #$23x& #$23x& >ytes ?lass &%632 "ouble array &%632 "ouble array &%632 "ouble array

communication systems lab

sam #$23x&

@ran" total is %&22 elements using 2A&5# bytes Save m.+ile sam4m DDEra) the sampling signal in both time an" fre(uency "omains subplot1#&&4 plot1t.sam4 gri". axis1,$ max1t4 C#9max1sam4 #9max1sam404 xlabel1'Time in sec'4.ylabel1'Amplitu"e in volt'4 title1'sampling Signal'4 Dcompute the FGHI<EI TIA7SFGIM of the sampling signal by using Matlab Dfunction fft ,Fast Fourier Transform0 f-1&;$.$$#491$:#$2B48 samf-abs1fft1sam44;#$238 subplot1#&#4 stem1f.samf4 gri". axis1,$ 6$$$$ $ max1samf404 xlabel1'Fre( in K/''4.ylabel1'Magnitu"e in volt'4 title1'Spectrum of the sampling signal'4

Eng: Khairi A. Elrmali

communication systems lab

1iv4 Iun the simulation an" print the output )aveforms an" spectra

sampling Signal 5 0 -5 0 0.2 0.4 0.6 0.8 1 1.2 Time in sec 1.4 1.6 1.8 x 10 2
-3

Amplitude in volt

Spectrum of the sampling signal

Magnitude in volt

0.6 0.4 0.2 0

0.5

1.5 Freq in KHz

2.5 x 10

3
4

&. ?hange the sampling rate 1fs4 by changing the perio" of the pulse generator #. Iepeat for i"eal sampling 6. Iepeat for other information signals , s(uare. triangular 0 Sampling using Sample an# :ol#

Puestions
&. Eetermine the spectrum of the sample" signal an" compare it )ith the spectrum obtaine" by simulation. #. <n the sampling mo"el. )hat is the impact of changing the sampling rate 1fs4 on the reconstructe" signalQ Eoes this comply )ith the 7y(uist sampling rateQ

Eng: Khairi A. Elrmali

communication systems lab

E,periment: pulse amplitu#e mo#ulation

Objectives The main objectives of this lab are To learn about !ulse Amplitu"e Mo"ulation 1!AM4 as a transmission scheme

Set the parameters of the "ifferent bloc s as follo)s {sources :%ulse 9enerator & perio"-&;&$$$$. Euty cycle -# 1for i"eal sampling4. -2$ 1for 7atural sampling 4' . Signal 9enerator & f-&$$$/'. A-$.5' Simulation %arameters & 7-#$23 number of points start time simulation -$8 stop time simulation -$.$$68 1sto-n9Tm48 Min : Max step si'e-$.$$6;#$23 : 1sto;74' DDEra) the sampling signal in both time an" fre(uency "omains subplot1#&&4 plot1t.pam4 gri". axis1,$ max1t4 C#9max1pam4 #9max1pam404 xlabel1'Time in sec'4.ylabel1'Amplitu"e in volt'4 title1'!ulse Amplitu"e Mo"ulation Signal'4 Dcompute the FGHI<EI TIA7SFGIM of the sampling signal by using Matlab

Eng: Khairi A. Elrmali Dfunction fft ,Fast Fourier Transform0 f-1&;$.$$6491$:#$2B48 pamf-abs1fft1pam44;#$238 subplot1#&#4 stem1f.pamf4 gri". axis1,$ #$$$$ $ max1pamf404 xlabel1'Fre( in K/''4.ylabel1'Magnitu"e in volt'4 title1'Spectrum of the !ulse Amplitu"e Mo"ulation signal'4

communication systems lab

Pulse Amplitude Modulation Signal

Amplitude in volt

0.5 0 -0.5

0.5

1.5 Time in sec

2.5 x 10

3
-3

Spectrum of the Pulse Amplitude Modulation signal

Magnitude in volt

0.1

0.05

0.2

0.4

0.6

0.8 1 1.2 Freq in KHz

1.4

1.6

1.8 x 10

2
4

Eng: Khairi A. Elrmali

communication systems lab

E,periment: %ulse ;i#t* (o#ulation

Set the parameters of the "ifferent bloc s as follo)s {sources :7epeating sequence &J,$ &0;&$$$$:,C& &0K8J,$ &0K;&$$$$. ,& C&0 K8J,$ $.5 &0;&$$$$8 ,& C& &0K' . sinwave & f-&$$$/'. A-$.5' Simulation %arameters & 7-#$23 number of points start time simulation -$8 stop time simulation -$.$$68 1sto-n9Tm48 Min : Max step si'e-$.$$6;#$23 : 1sto;74' <n Matlab comman" )in"o) == )hos 7ame p) t Si'e #$23x& #$23x& >ytes ?lass &%632 "ouble array &%632 "ouble array

@ran" total is 2$A% elements using 6#B%3 bytes

Eng: Khairi A. Elrmali

communication systems lab

DDEra) the p)m in both time an" fre(uency "omains subplot1#&&4 plot1t.p)4 gri". axis1,$ max1t4 $ #9max1p)404 xlabel1'Time in sec'4.ylabel1'Amplitu"e in volt'4 title1'!ulse )i"th Mo"ulation Signal'4 Dcompute the FGHI<EI TIA7SFGIM using Matlab Dfunction fft ,Fast Fourier Transform0 f-1&;$.$$6491$:#$2B48 p)f-abs1fft1p)44;#$238 subplot1#&#4 stem1f.p)f4 gri". axis1,$ #$$$$ $ &04 xlabel1'Fre( in K/''4.ylabel1'Magnitu"e in volt'4 title1'Spectrum of the !ulse )i"th Mo"ulation signal'4

Pulse Width Modulation Signal 2 Amplitude in volt 1.5 1 0.5 0

0.5

1.5 Time in sec

2.5 x 10

3
-3

Spectrum of the Pulse width Modulation signal 0.4 Magnitude in volt 0.3 0.2 0.1 0 0 0.5 1 1.5 Freq in KHz 2 2.5 x 10 3
4

Eng: Khairi A. Elrmali

communication systems lab

E,periment: %ulse %osition (o#ulation

DDEra) the ppm in both time an" fre(uency "omains subplot1#&&4 plot1t.pm4 gri". axis1,$ max1t4 $ #9max1pm404 xlabel1'Time in sec'4.ylabel1'Amplitu"e in volt'4 title1'!ulse position Mo"ulation Signal'4 Dcompute the FGHI<EI TIA7SFGIM using Matlab Dfunction fft ,Fast Fourier Transform0 f-1&;$.$$6491$:#$2B48 pmf-abs1fft1pm44;#$238 subplot1#&#4 stem1f.pmf4 gri". axis1,$ 2$$$$ $ max1pmf404 xlabel1'Fre( in K/''4.ylabel1'Magnitu"e in volt'4 title1'Spectrum of the !ulse position Mo"ulation signal'4

Eng: Khairi A. Elrmali

communication systems lab

R
Pulse position Modulation Signal 4 Amplitude in volt 3 2 1 0

0.5

1.5 Time in sec

2.5 x 10

3
-3

Spectrum of the Pulse position Modulation signal

Magnitude in volt

0.04

0.02

0.5

1.5

2 2.5 Freq in KHz

3.5 x 10

4
4

Eng: Khairi A. Elrmali

communication systems lab

o (. +iles programs

D An MCfile script to pro"uce D Sflo)er petalS plots theta - Cpi:$.$&:pi8

D ?omment lines

D ?omputations

rho1&.:4 - # 9 sin15 9 theta4 .T #8 rho1#.:4 - cos1&$ 9 theta4 .T 68 rho16.:4 - sin1theta4 .T #8 rho12.:4 - 5 9 cos16.5 9 theta4 .T 68 for - &:2 D @raphics output polar1theta. rho1 .:44 pause en" D D&9999999999999999999999999999999999999999999999999999999 for m - &:5 for n - &:&$$ A1m. n4 - &;1m U n C &48 en" en" D D D#99999999999999999999999999999999999999999999999999999999999 x-#8 for n - #:% x1n4 - # 9 x1n C &48 en" D D6999999999999999999999999999999999999999999999999999999999999999 t - $:pi;&$$:#9pi8 y - sin1t48 y# - sin1tC$.#548 y6 - sin1tC$.548 plot1t.y.t.y#.t.y64

Eng: Khairi A. Elrmali figure plot1t.y.'C'.t.y#.'CC'.t.y6.':'4

communication systems lab

D D29999999999999999999999999999999999999999999 x - $:pi;&5:29pi8 y - exp1#9cos1x448 plot1x.y.'rU'4 plot1x.y.'Cr'.x.y.'o '4 D D599999999999999999999999999999999999999999 fs - &$$$$8 t - $:&;fs:&.58 x - sa)tooth1#9pi95$9t48 plot1t.x4. axis1,$ $.# C& &04 D D%99999999999999999999999999999999999999999999999 x - linspace1$.5.#$2348 y - sinc1x48 plot1x.y4 DDB 999999999999999999999999999999999999999999999999999 fs-&e%8 ts-&;fs8 7-5$$$8 to-79ts8 fo-&;to8 t-$:ts:toCts8 f-Cfs;#:fo:fs;#Cfo8 fm-&$$$8 x-#9cos1#9pi9fm9t48 subplot1#&&4 plot1t.x4.gri" )-fftshift1fft1x448 subplot1#&#4 plot1f.)4.gri" axis1,C#9fm #9fm $ 704 pause fc-5$$$8 Dsample rate D sample perio" Dnumber of samples Dtime )in"o) D"iscrete fre(uency spacing Dtime vector D Fre(uency vector

Eng: Khairi A. Elrmali c-#9cos1#9pi9fc9t48 figure subplot1#&&4 plot1t.c4.gri" )&-fftshift1fft1c448 subplot1#&#4 plot1f.)&4.gri" axis1,C#9fc #9fc $ 704 pause figure "s-x.9c8 )#-fftshift1fft1"s448 subplot1#&&4 plot1t."s4.gri" subplot1#&#4 plot1f.)#4 gri" axis1,C#91fc4 #91fc4 $ 704 pause figure am-"sUc8 )6-fftshift1fft1am448 subplot1#&&4 plot1t.am4.gri" subplot1#&#4 plot1f.)64 gri" axis1,C1fcU#9fm4 1fcU#9fm4 $ 704

communication systems lab

t-linspace1$.#.#$2348 x& -59 sa)tooth1#9pi95$9t48 x# - 59cos1#9pi95$9t48 x6-59s(uare1#9pi95$9t48

D time vector

Eng: Khairi A. Elrmali x2-#9exp1C59t4.9x#8 subplot1##&4 plot1t.x&4 gri" axis1,$ $.# C&$ &$04 xlabel1'Time 1sec4'48 ylabel1'Amplitu"e'48 title1'Sa)tooth !erio"ic *ave'4 subplot1###48plot1t.x#48gri"8 axis1,$ $.# C&$ &$04

communication systems lab

xlabel1'Time 1sec4'48ylabel1'Amplitu"e'48 title1'cosine !erio"ic *ave'4 subplot1##648plot1t.x648gri"8 axis1,$ $.# C&$ &$04 xlabel1'Time 1sec4'48ylabel1'Amplitu"e'48 title1'pulse !erio"ic *ave'4 subplot1##248plot1t.x248gri"8 axis1,$ & C&$ &$04

Eng: Khairi A. Elrmali

communication systems lab

You might also like