44 views

Uploaded by swvhit

save

You are on page 1of 6

Page 1

**Digital Modulation in MATLABTM
**

This tutorial outlines the process of modulating binary (digital) information onto a continuous medium (such as radio waves) using digital modulation. The tutorial focuses on Phase Shift Keying (PSK) modulation.

1

A brief system introduction

PSK modulation in Matlab can be simulated using the pskmod() function and demodulation can be performed using pskdemod(). The pskmod() produces a sequence of channel symbols (e.g. {s3 , s3 , s5 , s6 , s1 , . . .}). This channel symbols live inthe complex plane and are represented by their I-channel and Q-channel plane. The I and Q representations together form nothing more exciting than a complex number. The following system model will be used:

Noise

e

Source

m

y

Sender

+

r

p

Receiver

The Source generates random bits (binary zeros and ones). This information m is fed to the ”Sender” that PSK-modulates and produces y. This signal is transmitted onto a noisy channel which is disturbed by additive noise (AWGN), e. The resulting signal r is received and demodulated into a binary sequence p that should be identical to m if no errors happened. However, the demodulator and modulator functions in Matlab assumes do not operate on binary sequences. For instance the modulator function takes (minimum) two arguments: pskmod(x,M). Here x is the input signal and M is the size of the modulation, i.e. it performs M-PSK modulation. From the help text it is stated that x can contain only integers between 0 and M − 1. In other words we do need to convert our binary information m to a integer sequence x and our demodulated integer sequence (lets call it w) to a binary sequence p. Lets step away from the modulation and channel and do only the binary/integer/binary conversions.

2

2.1

**Converting between binary and integer sequences
**

Convert

To have something to convert lets produce a binary sequence: Digital Signal Processing Labs Oslo University College c 2009 Ola Jetlund. Some rights reserved.

Remember that M-PSK modulation has M different symbols and each symbol can can therefore represent k = log2 M bits. while binary 0101 is an integer equal to ﬁve.g. Some rights reserved. In order to form groups of k bits we can reshape the sequence m into a matrix. . Remember that e. See the following ﬁgure: 1 0 1 0 0 1 1 1 1 0 1 0 0 1 0 0 reshape() 1 1 0 1 1 1 0 0 0 0 1 1 0 0 1 0 bi2de() 3 0 3 0 0 3 1 1 We must however make sure that there are the same number of elements in the input and output of reshape (the ﬁrst two ellipses). Subsequently we can convert each of these groups into an integer sequence using bi2de(). This can be controlled (since length of m is a power of 2): Exercise: • For k = 2 how many rows are there in the reshaped version of m? Digital Signal Processing Labs Oslo University College c 2009 Ola Jetlund. Now how many bits should we group together.Matlab Laboritory Exercise Page 2 Exercise: • Create a sequence m with N = 8192 elements consisting of only zeros and ones Now to convert from binary to integer we ﬁrst need to group k bits together that will form an integer. binary 000 is an integer equal to zero.

Some rights reserved. After the signal is modulated (into y) we shall add noise.1).2 Convert back To convert back we use de2bi() and reshape(). her we do have to consider where to put the mod signiﬁcant bit. By doing y = pskmod(x.M) this function does M-PSK modulation of the information in x denne funksjonen QAM modulerer signalet x[n]. 3 Modulation.Matlab Laboritory Exercise Page 3 • Find a general setting for reshaping any sequence m into matrix that groups k = log2 M bits. And the solution is to use for instance: p = reshape(de2bi(x. However. .’right-msb’). • Convert your sequence m into an integer sequence x for M = 2 2. and noise Now we can modulate x.length(m). demodulation. name the new sequence p. Exercise: • Convert x back to binary form. We shall use two methods for calcluating the noise added: • Signal-to-noise ratiostøy forhold per symbol • Ratio of bit energi to noise ”Eb /N0 ” The following relation converts between the two: Digital Signal Processing Labs Oslo University College c 2009 Ola Jetlund. • How can we compare m and p? • Count the number of errors between m and p. M = 16.

and note also that these are dB values. Note. This can be done using the following function: [number.q) This function ﬁnds the number of errors. 4. And the ﬁnal plot may look likethe plot in Figure 1.}. and also calculates the bit error rate (BER). For each point in plot the system has been simulated to ﬁnd at least 100 errors. We will therefore plot it for different values of SNR and Eb /N0 . 2. Digital Signal Processing Labs Oslo University College c 2009 Ola Jetlund.The BER is a good measure of how good a modulation technique is. 3.’measured’) Demodulation is performed subsequently using pskdemod(). ratio] = biterr(p. 4 Evaluation Let’s repeat the entire system: Noise e Source m y Sender + r p Receiver In order to evaluate this system we shall compare p and q.10*log10(1) For SNR the following function will add noise: r = awgn(y. Some rights reserved. . .snr. . the logarithmic scale which we get by using the semilogy instead of the plot Notice that the BER is plotted for Eb /N0 = {1. .Matlab Laboritory Exercise Page 4 k = log2(M) SNR = EbNo + 10*log10(k) .

Digital Signal Processing Labs Oslo University College c 2009 Ola Jetlund. .Matlab Laboritory Exercise Page 5 Figure 1: Forholdet mellom støyniv˚ aet og bitfeil. Some rights reserved.

• Plot the BER versus Eb /N0 for both of them. Digital Signal Processing Labs Oslo University College c 2009 Ola Jetlund.1 The real work 2PSK aka BPSK Exercise: • Plot the BER versus Eb /N0 and SNR (in two different) ﬁgures. • Compare the results. .Matlab Laboritory Exercise Page 6 5 5. 5. Some rights reserved. Exercise: • Use 4PSK with and without Gray coding. Put all BER versus Eb /N0 in the same ﬁgure. • Compare the the three different PSK modulation techniques.3 Oppppst we forgot Gray’s Anatomy The pskmod() does not use Gray coding as standard. and all BER versus SNR in another ﬁgure. 5.2 4PSK and 8PSK Exercise: • Also plot the BER versus Eb /N0 and SNR.

- Sem5-EJ5EUploaded byAjit Singh
- Modulation 1Uploaded byChristopher Bennett
- Communication 4Uploaded byGihan Mendis
- Cooperative Communications over Flat FadingUploaded byAtef Al-Kotafi Al-Abdi
- BWSIM Academics Guide v1Uploaded bySai Pavan Kumar
- Chapter 5 ADMUploaded byAnggoro Adi Sucipto
- Analysis of Multimode Radio for Wireless Comunication ApplicationsUploaded byijteee
- Analysis of Phase Noise and Gaussian Noise in terms of Average BER for DP 16-QAM Optical Coherent Receiver using Digital FiltersUploaded byIRJET Journal
- 6. Digital Modulation SchemesUploaded bydeepanece
- seminar topicUploaded byAshish Dubey
- 17_01_0211_0220Uploaded bydan r.
- 4 ModulationUploaded byMisbah Qaiser
- BPSK,QAMUploaded byYassine El Hadak
- EE4950 5 ModulationUploaded byMostafa_Scrib_93
- Analog DecodersUploaded bycaduzinhox
- Contemporary ReportUploaded byRAJKUMAR
- mimodocUploaded byAr Fatimzahra
- 211834_1Uploaded byRicardo Mercado
- Transmission Overview Tgenovt001Uploaded bynksnksnd
- briffa11Uploaded byHi_Lev
- 24 1509348650_30-10-2017.pdfUploaded byRahul Sharma
- 10-wireless1Uploaded byNasir Iqbal
- 05_1140_noiseUploaded byalapati1234567890
- NethawkUploaded byjohnsonsem
- Notes Data CommunicationsUploaded byGabbar Singh
- 17403_test111Uploaded byVikash Verma
- Trans Lab TemplateUploaded byEdith Castillo
- 06-08-04Uploaded byManish Patel
- 1st Interview Experience DRDOUploaded byArunGahlawat
- Adaptive Ofdm Modulation Used for SdrUploaded byijteee

- ELEC 450 LM Experiment 3Uploaded byswvhit
- cwa8087_40Uploaded byswvhit
- ListofElectedMembers FromE-gazetteUploaded byswvhit
- 2_AM_0809Uploaded byswvhit
- 12_GPSUploaded byswvhit
- NonRectQAMMSUploaded byswvhit
- Signals and Systems With MATLAB Computing and Simulink Modeling 4th Edition Apr 2008 eBook-BBL.torrentUploaded byswvhit
- Recruitment of Fellow 10.07.2012Uploaded byswvhit
- DocUploaded byswvhit
- Relativity Overview the Physics of Bruce HarveyUploaded byswvhit
- Term-Paper Leading to Large-Signal FET ModelingUploaded byswvhit
- 4009 Electromagnetic Theory Lecture 1Uploaded byswvhit
- eBooksUploaded byswvhit
- PrintFEYNMAN's THESIS - A New Approach to Quantum TheoryUploaded byswvhit
- A comparison of different techniques for the calculation of antenna coupling within a cavityUploaded byswvhit