[FREE PDF sample] Digital Modulations Using Matlab Build Simulation Models From Scratch black White Edition Viswanathan ebooks
[FREE PDF sample] Digital Modulations Using Matlab Build Simulation Models From Scratch black White Edition Viswanathan ebooks
com
https://ebookmeta.com/product/digital-modulations-using-
matlab-build-simulation-models-from-scratch-black-white-
edition-viswanathan/
OR CLICK BUTTON
DOWNLOAD NOW
https://ebookmeta.com/product/digital-modulations-using-python-1st-
edition-mathuranathan-viswanathan/
ebookmeta.com
https://ebookmeta.com/product/build-a-blockchain-from-scratch-in-go-
lukac/
ebookmeta.com
https://ebookmeta.com/product/electrical-machine-fundamentals-with-
numerical-simulation-using-matlab-simulink-1st-edition-atif-iqbal/
ebookmeta.com
https://ebookmeta.com/product/oahspe-1st-edition-john-ballou-
newbrough/
ebookmeta.com
https://ebookmeta.com/product/trigger-points-inside-the-mission-to-
stop-mass-shootings-in-america-1st-edition-mark-follman/
ebookmeta.com
https://ebookmeta.com/product/postcards-in-the-sand-1st-edition-brynn-
paulin/
ebookmeta.com
https://ebookmeta.com/product/unlearning-rethinking-poetics-pandemics-
and-the-politics-of-knowledge-1st-edition-briggs-charles-l/
ebookmeta.com
Mathuranathan Viswanathan
April 2019
No part of this publication may be reproduced, distributed, or transmitted in any form or by any means,
including photocopying, recording, or other electronic or mechanical methods, without the prior written
permission of the author, except in the case of brief quotations embodied in critical reviews and certain other
noncommercial uses permitted by copyright law. For permission requests, write to
[email protected]
https://www.gaussianwaves.com
ISBN: 9781521493885
The author has used his best endeavours to ensure that the URLs for external websites referred in this book
are correct and active at the time of publishing. However, the author bears no responsibility for the referred
websites, and can make no guarantee that a site will remain live or that the content is or will remain
appropriate.
Dedicated to Advaith
Preface
There exist many textbooks that provide an in-depth treatment of various topics in digital modulation tech-
niques. Most of them underscore different theoretical aspects of design and performance analysis of digital
modulation techniques. Only a handful of books provide insight on how these techniques can be modeled and
simulated. Predominantly, such books utilize the sophisticated built-in functions or toolboxes that are already
available in software like Matlab. These built-in functions or toolboxes hide a lot of background computations
from the user thereby making it difficult, especially for a learner, to understand how certain techniques are
actually implemented inside those functions.
In this book, I intend to show how the theoretical aspects of a digital modulation-demodulation system can
be translated into simulation models, using elementary matrix operations in Matlab. Most of the simulation
models shown in this book, will not use any of the inbuilt communication toolbox functions. This provides
an opportunity for a practicing engineer to understand the basic implementation aspects of modeling various
building blocks of a digital modulation system. I intend the book to be used primarily by undergraduate and
graduate students in electrical engineering discipline, who wish to learn the basic implementation aspects of a
modulation demodulation technique. I assume that the reader has a fair understanding on the fundamentals of
programming in Matlab. Readers may consult other textbooks and documentations that cover those topics.
Theoretical aspects of digital modulation techniques will be kept brief. For each topic discussed, a short
theoretical background is provided along with the implementation details in the form of Matlab scripts. The
Matlab scripts carry inline comments intended to help the reader understand the flow of implementation.
As for the topics concerned, only the basic techniques of modulation and demodulation of various digital
modulation techniques are covered. Waveform simulation technique and the complex equivalent baseband
simulation model will be provided on a case-by-case basis. Performance simulations of well known digital
modulation techniques are also provided. Additionally, simulation and performance of receiver impairments
are also provided in a separate chapter.
Chapter 1 introduces some of the basic signal processing concepts that will be used throughout this book.
Concepts covered in this chapter include- signal generation techniques for generating well known test signals,
interpreting FFT results and extracting magnitude/phase information using FFT, computation of power and
energy of a signal, various methods to compute convolution of two signals. Chapter 2 covers the waveform
simulation technique for the following digital modulations: BPSK, differentially encoded BPSK, differential
BPSK, QPSK, offset QPSK, pi/4 QPSK, CPM and MSK, GMSK, FSK. Power spectral density (PSD) and per-
formance analysis for these techniques are also provided. Chapter 3 covers the complex baseband equivalent
models for techniques such as M-ary PAM, M-ary PSK, M-ary QAM and M-ary FSK modulations. Chapter
4 covers the performance simulation using the models built in Chapter 3. Chapter 5 covers the aspects of
using various linear equalizers in a simple communication link. Design and implementation of two important
types of equalizers namely the zero-forcing equalizer and the MMSE equalizer are covered. Chapter 6 covers
the topic of modeling receiver impairment, estimation and compensation for such impairments and a sample
i
ii Preface
performance simulation for such case. Reference texts are cited in square brackets within the text and the
references are provided at the end of each chapter.
The documentation for the Matlab scripts shown in this book, is available at the following URL: https:
//www.gaussianwaves.com/digital modulations matlab/doc
The scripts are thoroughly checked for integrity and they will execute without any error. If you face any
issues during execution, do not hesitate to provide feedback or contact me via the email provided below.
Alternatively, technical queries can be posted in the following forum: https://www.gaussianwaves.com/
discuss/
Finally, it is a pleasure to acknowledge the help I received while writing this book. I thank my wife Varsha
Mathuranathan for getting the manuscript edited so quickly and for her support during the review process that
greatly helped improve the manuscript. I also thank the numerous reviewers for their generous comments that
helped improve the contents of this book.
iii
iv Contents
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
Chapter 1
Essentials of Signal Processing
Abstract This chapter introduces some of the basic signal processing concepts that will be used throughout
this book. The goal is to enable the reader to appreciate the concepts and apply them in building a basic
communication system. Concepts covered include - signal generation techniques for generating well known
test signals like rectangular pulse, sine wave, square wave, chirp signal and gaussian pulse, interpreting FFT
results and extracting magnitude/phase information using FFT, computation of power and energy of a signal,
various methods to compute convolution of two signals, analytic signal and applications, FIR/IIR filters.
In experimental modeling and simulation, simple test inputs such as sinusoidal, rectangular pulse, gaussian
pulse, and chirp signals are widely used. These test signals act as stimuli for the simulation model and the
response of the model to the stimuli is of great interest in design verification.
In order to generate a sine wave, the first step is to fix the frequency f of the sine wave. For example, we wish
to generate a f = 10Hz sine wave whose minimum and maximum amplitudes are −1V and +1V respectively.
Given the frequency of the sinewave, the next step is to determine the sampling rate.
For baseband signals, the sampling is straight forward. By Nyquist Shannon sampling theorem, for faithful
reproduction of a continuous signal in discrete domain, one has to sample the signal at a rate fs higher than
at-least twice the maximum frequency fm contained in the signal (actually, it is twice the one-sided bandwidth
occupied by a real signal. For a baseband signal bandwidth (0 to fm ) and maximum frequency fm in a given
band are equivalent).
Matlab is a software that processes everything in digital. In order to obtain a smooth sine wave, the sam-
pling rate must be far higher than the prescribed minimum required sampling rate which is at least twice the
frequency f - as per Nyquist-Shannon theorem. Hence we need to sample the input signal at a rate signifi-
cantly higher than what the Nyquist criterion dictates. Higher oversampling rate requires more memory for
signal storage. It is advisable to keep the oversampling factor to an acceptable value.
An oversampling factor of 30 is chosen in the following code snippet. This is to plot a smooth continuous-
like sine wave. Thus the sampling rate becomes fs = 30 × f = 30 × 10 = 300Hz. If a phase shift is desired for
the sine wave, specify it too. The resulting plot from the code snippet shown next, is given in Figure 1.1.
1
2 1 Essentials of Signal Processing
Program 1.1: sinusoidal signal.m: Simulate a sinusoidal signal with given sampling rate
f=10; %frequency of sine wave
overSampRate=30; %oversampling rate
fs=overSampRate*f; %sampling frequency
phase = 1/3*pi; %desired phase shift in radians
nCyl = 5; %to generate five cycles of sine wave
t=0:1/fs:nCyl*1/f-1/fs; %time base
Fig. 1.1: A 10Hz sinusoidal wave with 5 cycles and phase shift 1/3π radians
The most logical way of transmitting information across a communication channel is through a stream of
square pulse – a distinct pulse for ‘0’ and another for ‘1’. Digital signals are graphically represented as square
waves with certain symbol/bit period. Square waves are also used universally in switching circuits, as clock
signals synchronizing various blocks of digital circuits, as reference clock for a given system domain and so
on.
Square wave manifests itself as a wide range of harmonics in frequency domain and therefore can cause
electromagnetic interference. Square waves are periodic and contain odd harmonics when expanded as Fourier
Series (where as signals like saw-tooth and other real word signals contain harmonics at all integer frequen-
cies). Since a square wave literally expands to infinite number of odd harmonic terms in frequency domain,
approximation of square wave is another area of interest. The number of terms of its Fourier Series expansion,
taken for approximating the square wave is often seen as Gibbs phenomenon, which manifests as ringing effect
at the corners of the square wave in time domain.
1.1 Generating standard test signals 3
True square waves are a special class of rectangular waves with 50% duty cycle. Varying the duty cycle
of a rectangular wave leads to pulse width modulation, where the information is conveyed by changing the
duty-cycle of each transmitted rectangular wave. A true square wave can be simply generated by applying
signum function over a periodic function.
g(t) = sgn sin(2π f t) (1.1)
where f is the desired frequency of the square wave and the signum function is defined as
−1 i f x < 0,
sgn(x) = 0 i f x = 0, (1.2)
1 if x > 0
Program 1.2: square wave.m: Generate a square wave with given sampling rate
f=10; %frequency of sine wave in Hz
overSampRate=30; %oversampling rate
fs=overSampRate*f; %sampling frequency
nCyl = 5; %to generate five cycles of square wave
t=0:1/fs:nCyl*1/f-1/fs; %time base
g = sign(sin(2*pi*f*t));
%g=square(2*pi*f*t,50);%inbuilt fn:(signal proc toolbox)
plot(t,g); title(['Square Wave f=', num2str(f), 'Hz']);
Fig. 1.2: A 10Hz square wave with 5 cycles and 50 − 50 duty cycle
4 1 Essentials of Signal Processing
where,
1
1
i f |t| < 2
1 1
rect(t) = 2 i f |t| = 2
(1.4)
1
0 i f |t| >
2
The following code simulates a rectangular pulse with desired pulse width and the resulting plot is shown
in Figure 1.3.
Program 1.3: rectangular pulse.m: Generating a rectangular pulse with desired pulse width
fs=500; %sampling frequency
T=0.2; %width of the rectangule pulse in seconds
t=-0.5:1/fs:0.5; %time base
g=(t >-T/2) .* (t<T/2) + 0.5*(t==T/2) + 0.5*(t==-T/2);
%g=rectpuls(t,T); %using inbuilt function (signal proc toolbox)
plot(t,g);title(['Rectangular Pulse width=', num2str(T),'s']);
In digital communications, Gaussian Filters are employed in Gaussian Minimum Shift Keying - GMSK (see
section 2.11) and Gaussian Frequency Shift Keying (GFSK). Two dimensional Gaussian Filters are used in
1.1 Generating standard test signals 5
Image processing to produce Gaussian blurs. The impulse response of a Gaussian Filter is written as a Gaussian
function as follows
2
1 − t
g(t) = √ e 2σ 2 (1.5)
2πσ
The following code generates a Gaussian Pulse with σ = 0.1s. The resulting plot is given in Figure 1.4
Program 1.4: gaussian pulse.m: Generating a Gaussian pulse with desired pulse width
fs=80; %sampling frequency
sigma=0.1;%standard deviation
t=-0.5:1/fs:0.5; %time base
g=1/(sqrt(2*pi)*sigma)*(exp(-t.ˆ2/(2*sigmaˆ2)));
plot(t,g); title(['Gaussian Pulse \sigma=', num2str(sigma),'s']);
All the signals discussed so far do not change in frequency over time. Obtaining a signal with time-varying
frequency is of main focus here. A signal that varies in frequency over time is called chirp. The frequency of
the chirp signal can vary from low to high frequency (up-chirp) or from high to low frequency (low-chirp).
Chirp signals are encountered in many applications ranging from radar, sonar, spread spectrum, optical
communication, image processing, doppler effect, motion of a pendulum, as gravitation waves, manifestation
as Frequency Modulation (FM), echo location etc.
A linear chirp signal sweeps the frequency from low to high frequency (or vice-versa) linearly. One ap-
proach to generate a chirp signal is to concatenate a series of segments of sine waves each with increasing(or
decreasing) frequency in order. This method introduces discontinuities in the chirp signal due to the mismatch
in the phases of each such segments. Modifying the equation of a sinusoid to generate a chirp signal is a better
approach.
Other documents randomly have
different content
Herttua de Troncantique ja markiisitar de Souchevieille katselivat
ja kuuntelivat hetkisen sanaakaan hiiskahtamatta, mutta olihan heillä
sentään silmät nähdä ja korvat kuulla tuo kahden yhdistetyn
sydämen lempeä salaisuus.
*****
*****
Kukkiin oli prinsessa kiihkeästi mieltynyt. Niitä piti linnassa olla niin
yksinkertaisimpia lajeja kuin uhkeimpiakin. Luonnontutkija olisi
hänen puistossaan havainnut edustajia koko kuningaskunnan
kukkamaailmasta sekä lisäksi muiden maiden kiinnostavimmista
lajeista.
*****
*****
*****
Prinsessa polki jalkaa, huutaen että ritari oli tolvana, että kaikki
ihmiset olivat liittoutuneet häntä ärsyttääksensä ja että hän oli
onnettomampi kuin tiellä tallattavat kivet. Mutta huonosta tuulestansa
huolimatta hän suostui noudattamaan kuninkaan kehoitusta, jonka
tämä turhaan oli uudistanut alinomaa ainakin jo kahden kuukauden
aikana, luvaten valita puolisoksensa jonkun noista kosijoista, jotka
hänen välinpitämättömyytensä saattoi epätoivoon.
Helmi tunsi heti tuon miehen. Hän oli ainoa olento, joka oli
rohjennut lausua prinsessalle nuhteen sanan vasten kasvoja ja
puhutella häntä melkein käskevään sävyyn.
*****
Helmi huudahti, että jos niin oli, silloin ei hän välittänyt olla
prinsessa ja asua norsunluulinnassa, ei halunnut katsella
hoviväkensä tekopyhiä kasvoja. Ottaen mukaansa ainoastaan
vanhan imettäjättärensä ja muutamia uskollisia palvelijoita hän
asettui asumaan omistamaansa pieneen linnaan, joka sijaitsi metsän
reunassa maalla, monen tunnin matkan päässä pääkaupungista.
Siellä hän vietti yksinäistä elämää, kirjansa ja harppunsa huvinaan,
omistaen rukoukselle linnanherrattaren juhlallisessa rukoustuolissa
enemmän aikaa kuin koskaan norsunluulinnassa elellessään.
Maallisista asioista ei hän enää välittänyt.