Square-root raised-cosine pulse shaping

Let’s learn the equations and the filter model for simulating square root raised cosine (SRRC) pulse shaping. Before proceeding, I urge you to read about basics of pulse shaping in this article.

Combined response of two SRRC filters and frequency domain view of a single SRRC pulse
Figure 1: Combined response of two SRRC filters and frequency domain view of a single SRRC pulse

Raised-cosine pulse shaping filter is generally employed at the transmitter. Let be the raised cosine filter’s frequency response. Assume that the channel’s amplitude response is flat, i.e, and the channel noise is white. Then, the combined response of the transmit filter and receiver filter in frequency domain is given as

If the receive filter is matched with the transmit filter, we have

Thus, the transmit and the receive filter take the form

with , where is a nominal delay that is required to ensure the practical realizability of the filters. In time domain, a matched filter at the receiver is the mirrored copy of the impulse response of the transmit pulse shaping filter and is delayed by some time . Thus the task of raised cosine filtering is equally split between the transmit and receive filters. This gives rise to square-root raised-cosine (SRRC) filters at the transmitter and receiver, whose equivalent impulse response is described as follows.

This article is part of the book
Wireless Communication Systems in Matlab (second edition), ISBN: 979-8648350779 available in ebook (PDF) format and Paperback (hardcopy) format.

The roll-of factor for the SRRC is denoted as to distinguish it from that of the RC filter. A simple evaluation of the equation (4) produces singularities (undefined points) at and . The value of the square root raised cosine pulse at these singularities can be obtained by applying L’Hostipital’s rule [1] and the values are

A function for generating SRRC pulse shape is given next. It is followed by a test code that plots the combined impulse response of transmit-receive SRRC filter combination and also plots the frequency domain view of a single SRRC pulse as shown in Figure 1

The combined impulse response matters, as we can identify that the combined response hits zero at symbol sampling instants. This indicates that the job of ISI cancellation is split between transmitter and receiver filters. Note that the combined impulse response of two SRRC filters is same as the impulse response of the RC filter.

Program 1: srrcFunction.m: Function for generating square-root raised-cosine pulse (click here)

Matlab code for Program 1 is available is available in the book Wireless Communication Systems in Matlab (click here).

Program 2: test_SRRCPulse.m: Square-root raised-cosine pulse characteristics

Tsym=1; %Symbol duration in seconds
L=10; % oversampling rate, each symbol contains L samples
Nsym = 80; %filter span in symbol durations
betas=[0 0.22 0.5 1];%root raised-cosine roll-off factors
Fs=L/Tsym;%sampling frequency
lineColors=['b','r','g','k','c']; i=1;legendString=cell(1,4);
for beta=betas %loop for various alpha values
	[srrcPulseAtTx,t]=srrcFunction(beta,L,Nsym); %SRRC Filter at Tx
	srrcPulseAtRx = srrcPulseAtTx;%Using the same filter at Rx
	%Combined response matters as it hits 0 at desired sampling instants
	combinedResponse = conv(srrcPulseAtTx,srrcPulseAtRx,'same');
	
	subplot(1,2,1); t=Tsym*t; %translate time base & normalize reponse
	plot(t,combinedResponse/max(combinedResponse),lineColors(i));
	hold on;
	
	%See Chapter 1 for the function 'freqDomainView'
	[vals,F]=freqDomainView(srrcPulseAtTx,Fs,'double');
	subplot(1,2,2);
	plot(F,abs(vals)/abs(vals(length(vals)/2+1)),lineColors(i));
	hold on;legendString{i}=strcat('\beta =',num2str(beta) );i=i+1;
end
subplot(1,2,1);
title('Combined response of SRRC filters'); legend(legendString);
subplot(1,2,2);
title('Frequency response (at Tx/Rx only)');legend(legendString);

References

Rate this article: Note: There is a rating embedded within this post, please visit this post to rate it.

Topics in this chapter

Pulse Shaping, Matched Filtering and Partial Response Signaling
● Introduction
● Nyquist Criterion for zero ISI
● Discrete-time model for a system with pulse shaping and matched filtering
 □ Rectangular pulse shaping
 □ Sinc pulse shaping
 □ Raised-cosine pulse shaping
 □ Square-root raised-cosine pulse shaping
● Eye Diagram
● Implementing a Matched Filter system with SRRC filtering
 □ Plotting the eye diagram
 □ Performance simulation
● Partial Response Signaling Models
 □ Impulse response and frequency response of PR signaling schemes
● Precoding
 □ Implementing a modulo-M precoder
 □ Simulation and results

Books by the author


Wireless Communication Systems in Matlab
Second Edition(PDF)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart

Digital Modulations using Python
(PDF ebook)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart

Digital Modulations using Matlab
(PDF ebook)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart
Hand-picked Best books on Communication Engineering
Best books on Signal Processing

Raised cosine pulse shaping

As mentioned earlier, the shortcomings of the sinc pulse can be addressed by making the transition band in the frequency domain less abrupt. The raised-cosine (RC) pulse comes with an adjustable transition band roll-off parameter , using which the transition band’s rate of decay can be controlled. The RC pulse shaping function is expressed in frequency domain as

Correspondingly, in time domain, the impulse response is given by

This article is part of the book Wireless Communication Systems in Matlab, ISBN: 978-1720114352 available in ebook (PDF) format (click here) and Paperback (hardcopy) format (click here).

A simple evaluation of the equation (2) produces singularities (undefined points) at and . The value of the raised-cosine pulse at these singularities can be obtained by applying L’Hospital’s rule [1] and the values are

Figure 1: Raised-cosine pulse and its manifestation in frequency domain

The following Matlab codes generate a raised cosine pulse for the given symbol duration and plot the time-domain view and the frequency response (shown in Figure 1). The RC pulse falls off at the rate of as , which is a significant improvement when compared to the decay rate of sinc pulse which is . It satisfies Nyquist criterion for zero ISI – the pulse hits zero crossings at desired sampling instants. By controlling , the transition band roll-off in the frequency domain can be made gradual.

Program 1: raisedCosineFunction.m: Function for generating raised-cosine pulse(click here)

Matlab code for Program 1 is available is available in the book Wireless Communication Systems in Matlab (click here).

Program 2: test_RCPulse.m: Raised-cosine pulses and their manifestation in frequency domain

Tsym=1; %Symbol duration in seconds
L=10; % oversampling rate, each symbol contains L samples
Nsym = 80; %filter span in symbol durations
alphas=[0 0.3 0.5 1];%RC roll-off factors - valid range 0 to 1
Fs=L/Tsym;%sampling frequency
lineColors=['b','r','g','k','c']; i=1;legendString=cell(1,4);

for alpha=alphas %loop for various alpha values
	[rcPulse,t]=raisedCosineFunction(alpha,L,Nsym); %RC Pulse
	
	subplot(1,2,1); t=Tsym*t; %translate time base for given duration
	plot(t,rcPulse,lineColors(i));hold on; %plot time domain view
	[vals,f]=freqDomainView(rcPulse,Fs,'double');%See Chapter 1
	
	subplot(1,2,2);
	plot(f,abs(vals)/abs(vals(length(vals)/2+1)),lineColors(i));
	hold on;legendString{i}=strcat('\alpha =',num2str(alpha) );i=i+1;
end
subplot(1,2,1);title('Raised Cosine pulse'); legend(legendString);
subplot(1,2,2);title('Frequency response');legend(legendString);

References

[1] Clay S. Turner, Raised cosine and root raised cosine formulae, Wireless Systems Engineering, Inc, May 29, 2007.

Rate this post: Note: There is a rating embedded within this post, please visit this post to rate it.

Books by the author


Wireless Communication Systems in Matlab
Second Edition(PDF)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart

Digital Modulations using Python
(PDF ebook)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart

Digital Modulations using Matlab
(PDF ebook)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart
Hand-picked Best books on Communication Engineering
Best books on Signal Processing

Topics in this chapter

Pulse Shaping, Matched Filtering and Partial Response Signaling
● Introduction
● Nyquist Criterion for zero ISI
● Discrete-time model for a system with pulse shaping and matched filtering
 □ Rectangular pulse shaping
 □ Sinc pulse shaping
 □ Raised-cosine pulse shaping
 □ Square-root raised-cosine pulse shaping
● Eye Diagram
● Implementing a Matched Filter system with SRRC filtering
 □ Plotting the eye diagram
 □ Performance simulation
● Partial Response Signaling Models
 □ Impulse response and frequency response of PR signaling schemes
● Precoding
 □ Implementing a modulo-M precoder
 □ Simulation and results

Sinc pulse shaping

Key focus: Sinc pulse shaping of transmitted bits, offers minimum bandwidth and avoids intersymbol interference. Discuss its practical considerations & simulation.

Sinc pulse shaping

As suggested in the earlier post, the pulse shape that avoids ISI with the least amount of bandwidth is a sinc pulse of bandwidth . Here, is the baud rate of the system also called symbol rate. A sinc pulse described as time and frequency domain dual is given below

Following Matlab codes generate a sinc pulse with and plot the time-domain/frequency-domain response (Figure 1). From the time-domain plot, the value of the sinc pulse hits zero at integral multiple sampling instants seconds except at where it peaks to the maximum value. Thus the sinc pulse satisfies the Nyquist criterion for zero ISI.

This article is part of the book Wireless Communication Systems in Matlab, ISBN: 978-1720114352 available in ebook (PDF) format (click here) and Paperback (hardcopy) format (click here).

Program 1: sincFunction.m: Function for generating sinc pulse

Matlab code for Program 1 is available is available in the book Wireless Communication Systems in Matlab.

Program 2: Sinc pulse and its manifestation in frequency domain

Tsym=1; %Symbol duration
L=16; %oversampling rate, each symbol contains L samples
Nsym = 80; %filter span in symbol duration
Fs=L/Tsym; %sampling frequency
[p,t]=sincFunction(L,Nsym); %Sinc Pulse
subplot(1,2,1); t=t*Tsym; plot(t,p); title('Sinc pulse');
[fftVals,freqVals]=freqDomainView(p,Fs,'double'); %See Chapter 1
subplot(1,2,2);
plot(freqVals,abs(fftVals)/abs(fftVals(length(fftVals)/2+1)));
Figure 1: Sinc pulse and its manifestation in frequency domain

The main drawback of the sinc pulse is that it decays too slowly at the rate of as . This implies that the samples that are far apart can cause intersymbol interference in the event of modest clock synchronization errors. A sinc pulse is of infinite duration and for practical implementations, it has to be truncated to finite length for some integer . This leads to problems in frequency domain as explained next.

Figure 2 shows the one-sided frequency response of the sinc pulse that is truncated to various lengths. It is evident that the truncation of sinc pulse in time domain to leads to sidelobes in the frequency domain and the sidelobes become wider for decreasing values of . This effect is closely related to Gibbs phenomenon – the ringing artifact due to approximation of discontinuities by spectral methods. As a result, no matter how large the value of is chosen, the first sidelobe is always only down from the main lobe. Also, the sinc pulse is very sensitive to the timing jitters at the receiver. These problems can be addressed when the transition band in the frequency domain is made less abrupt.

Rate this article: Note: There is a rating embedded within this post, please visit this post to rate it.

Books by the author


Wireless Communication Systems in Matlab
Second Edition(PDF)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart

Digital Modulations using Python
(PDF ebook)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart

Digital Modulations using Matlab
(PDF ebook)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart
Hand-picked Best books on Communication Engineering
Best books on Signal Processing

Topics in this chapter

Pulse Shaping, Matched Filtering and Partial Response Signaling
● Introduction
● Nyquist Criterion for zero ISI
● Discrete-time model for a system with pulse shaping and matched filtering
 □ Rectangular pulse shaping
 □ Sinc pulse shaping
 □ Raised-cosine pulse shaping
 □ Square-root raised-cosine pulse shaping
● Eye Diagram
● Implementing a Matched Filter system with SRRC filtering
 □ Plotting the eye diagram
 □ Performance simulation
● Partial Response Signaling Models
 □ Impulse response and frequency response of PR signaling schemes
● Precoding
 □ Implementing a modulo-M precoder
 □ Simulation and results

Rectangular pulse shaping – simulation model

Key focus: Rectangular pulse shaping with abrupt transitions eliminates intersymbol interference, but it has infinitely extending frequency response. Simulation discussed.

Rectangular pulse

A rectangular pulse with abrupt transitions is a natural choice for eliminating ISI. If an information sequence is shaped as rectangular pulses, at the symbol sampling instants, the interference due to other symbols are always zero. Easier to implement in hardware or software, a rectangular pulse of duration can be generated by the following function

The complete set of Matlab codes to generate a rectangular pulse and to plot the time-domain view and the frequency response is available in the book Wireless Communication Systems in Matlab.

This article is part of the book Wireless Communication Systems in Matlab, ISBN: 978-1720114352 available in ebook (PDF) format (click here) and Paperback (hardcopy) format (click here).

Program 1: rectFunction.m: Function for generating a rectangular pulse

function [p,t,filtDelay]=rectFunction(L,Nsym)
%Function for generating rectangular pulse for the given inputs
%L - oversampling factor (number of samples per symbol)
%Nsym - filter span in symbol durations
%Returns the output pulse p(t) that spans the discrete-time base
%-Nsym:1/L:Nsym. Also returns the filter delay.

Tsym=1;
t=-(Nsym/2):1/L:(Nsym/2); %unit symbol duration time-base
p=(t > -Tsym/2) .* (t <= Tsym/2);%rectangular pulse

%FIR filter delay = (N-1)/2, N=length of the filter
filtDelay = (length(p)-1)/2; %FIR filter delay end

Program 2: test rectPulse.m: Rectangular pulse and its manifestation in frequency domain

Matlab code for Program 2 is available is available in the book Wireless Communication Systems in Matlab.

Figure 1: Rectangular pulse and its manifestation in frequency domain

As shown in Figure 1, the rectangular pulse in the time-domain manifests as a sinc function that extends infinitely on either side of the frequency spectrum (though only a portion of the frequency response is plotted in the figure) and thus its spectrum is not band-limited. When the infinitely extending frequency response is stuffed inside a band-limited channel, the truncation of the spectrum leads to energy spills in the time-domain. If we were to use sharp rectangular pulses, it needs a huge bandwidth that could violate practical design specs.

Rate this article: Note: There is a rating embedded within this post, please visit this post to rate it.

Books by the author


Wireless Communication Systems in Matlab
Second Edition(PDF)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart

Digital Modulations using Python
(PDF ebook)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart

Digital Modulations using Matlab
(PDF ebook)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart
Hand-picked Best books on Communication Engineering
Best books on Signal Processing

Topics in this chapter

Pulse Shaping, Matched Filtering and Partial Response Signaling
● Introduction
● Nyquist Criterion for zero ISI
● Discrete-time model for a system with pulse shaping and matched filtering
 □ Rectangular pulse shaping
 □ Sinc pulse shaping
 □ Raised-cosine pulse shaping
 □ Square-root raised-cosine pulse shaping
● Eye Diagram
● Implementing a Matched Filter system with SRRC filtering
 □ Plotting the eye diagram
 □ Performance simulation
● Partial Response Signaling Models
 □ Impulse response and frequency response of PR signaling schemes
● Precoding
 □ Implementing a modulo-M precoder
 □ Simulation and results

Discrete-time communication system model

Key focus: Baseband communication system and its equivalent DSP implementation (discrete time model) with a pulse shaping & matched filter is briefly introduced.

If a train of pulses representing an information sequence need to be sent across a band-limited dispersive channel, the bandwidth of the channel should be large enough to accommodate the entire spectrum of the signal that is being sent. If we try to stuff the signal spectrum without proper pulse shaping into a band-limited channel, the spectrum of the received signal at the receiver will be truncated by the band-limiting nature of the channel. In time-domain, the energy of one pulse may spill to the time slot allocated for one or more adjacent pulses, leading to Inter-Symbol Interference (ISI) and therefore a source of error in the receiver.

ISI can be minimized by optimal signal design and the detection of a signal with known pulse shape that is buried in noise is a well-studied problem in communication. At the receiver, optimal signal detection is performed by a matched filter whose impulse response is matched to the impulse response of the pulse shaping filter employed at the transmitter.

This article is part of the book
Wireless Communication Systems in Matlab (second edition), ISBN: 979-8648350779 available in ebook (PDF) format and Paperback (hardcopy) format.

A typical baseband communication system and its equivalent DSP implementation (discrete time model) with a matched filter is shown in Figure 1. The interpolating filter at the transmitter is implemented in DSP as a chain of upsampler and a pulse shaping function. The upsampler inserts L-1 zeros between the successive incoming data samples and the pulse shaping filter fills in the zeros generated by the upsampler by using a pulse shaping function. On the other hand, the receiver contains a downsampler that keeps every Lth sample starting from a specified offset. The factor L denotes the oversampling factor or upsampling ratio which is given as the ratio of symbol period (Tsym) and the sampling period (Ts) or equivalently, the ratio of sampling rate Fs and the symbol rate Fsym as

Figure 1: A typical baseband communication system (top) and its equivalent DSP implementation (bottom)

The interpolating filter at the transmitter is implemented in DSP as a chain of upsampler and a pulse shaping function. The upsampler inserts zeros between the successive incoming data samples and the pulse shaping filter fills in the zeros generated by the upsampler by using a pulse shaping function. On the other hand, the receiver contains a downsampler that keeps every sample starting from a specified offset. The factor denotes the oversampling factor or upsampling ratio which is given as the ratio of symbol period () and the sampling period () or equivalently, the ratio of sampling rate and the symbol rate as

The implementation of impulse response of the most widely discussed pulsing shaping functions (filters) will follow in the next series of articles, followed by an example on a complete matched filter system with square-root raised-cosine pulse shaping.

Rate this article: Note: There is a rating embedded within this post, please visit this post to rate it.

Books by the author


Wireless Communication Systems in Matlab
Second Edition(PDF)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart

Digital Modulations using Python
(PDF ebook)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart

Digital Modulations using Matlab
(PDF ebook)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart
Hand-picked Best books on Communication Engineering
Best books on Signal Processing

Topics in this chapter

Pulse Shaping, Matched Filtering and Partial Response Signaling
● Introduction
● Nyquist Criterion for zero ISI
● Discrete-time model for a system with pulse shaping and matched filtering
 □ Rectangular pulse shaping
 □ Sinc pulse shaping
 □ Raised-cosine pulse shaping
 □ Square-root raised-cosine pulse shaping
● Eye Diagram
● Implementing a Matched Filter system with SRRC filtering
 □ Plotting the eye diagram
 □ Performance simulation
● Partial Response Signaling Models
 □ Impulse response and frequency response of PR signaling schemes
● Precoding
 □ Implementing a modulo-M precoder
 □ Simulation and results

Nyquist ISI criterion

Key focus: As per Nyquist ISI criterion, to achieve zero intersymbol interference (ISI), samples must have only one non-zero value at each sampling instant.

Consider an equivalent baseband communication system model with baud rate ( is the symbol period) shown in Figure 1, where the transmitter, channel and the receiver are represented as band-limited filters.

Figure 1: An equivalent communication system model

The entire combination of filters can be represented as the following Fourier transform pair

This article is part of the book Wireless Communication Systems in Matlab, ISBN: 978-1720114352 available in ebook (PDF) format (click here) and Paperback (hardcopy) format (click here).

Given the noise term , the output of the receiving filter is given as

where, is the overall impulse response of the system due to an impulse at its input. Normalizing (where the signal of interest lies), at the symbol sampling instants ,

where, is the symbol of interest at sampling instant, is the noise at that sampling instant and the remaining terms are contributions from other symbols – representing intersymbol interference. For nullifying the ISI terms, with an impulse of unit value applied at to the combined filters , the samples of the at the output of the filter combination should be 1 at the sampling instant and zero at all other sampling instants . This is called Nyquist criterion for zero ISI. In frequency domain, the frequency-shifted replicas of the overall system transfer function should add up to a constant value.

It can be readily seen that, in time domain, the simplest signal that naturally avoids ISI is the rectangular pulse of width but it consumes infinite bandwidth. On the other hand, the signal that avoids ISI with the least amount of bandwidth is a sinc pulse of bandwidth . The next section walks thorough the various choices of pulse shapes that are available for avoiding or mitigating ISI.

Rate this article: Note: There is a rating embedded within this post, please visit this post to rate it.

Books by the author


Wireless Communication Systems in Matlab
Second Edition(PDF)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart

Digital Modulations using Python
(PDF ebook)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart

Digital Modulations using Matlab
(PDF ebook)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart
Hand-picked Best books on Communication Engineering
Best books on Signal Processing

Topics in this chapter

Pulse Shaping, Matched Filtering and Partial Response Signaling
● Introduction
● Nyquist Criterion for zero ISI
● Discrete-time model for a system with pulse shaping and matched filtering
 □ Rectangular pulse shaping
 □ Sinc pulse shaping
 □ Raised-cosine pulse shaping
 □ Square-root raised-cosine pulse shaping
● Eye Diagram
● Implementing a Matched Filter system with SRRC filtering
 □ Plotting the eye diagram
 □ Performance simulation
● Partial Response Signaling Models
 □ Impulse response and frequency response of PR signaling schemes
● Precoding
 □ Implementing a modulo-M precoder
 □ Simulation and results

Inter-symbol interference & pulse shaping

Key focus: Inter-symbol interference: symbols sent through a dispersive channel, arrive at different time intervals and interfere due to non-constant group delay.

Introduction

Communication systems have progressed from analog to digital implementation due to the latter’s advantages of bandwidth efficiency and exceptional immunity to noise. The greatest challenge to a communication systems engineer lies in designing a system that strikes a trade-off between the physical limitations of a given communication system, the need for higher capacity and the available resources such as bandwidth usage and power. Modern communication systems should operate in a very limited radio spectrum with minimized interference to other systems.

Numerous standardization committees define spectral masks for specific applications with the aim of reducing the interference to other systems by limiting the  out-of-band radiations. Spectral masks are implemented by pulse shaping filters. Pulse shaping should contain the transmit signal within the specified band while minimizing the probability of errors at the receiver. On the other hand, pulse shaping causes inter-symbol interference (ISI) that degrades the detection process and therefore brings down the error performance of the whole system.

This article is part of the book
Wireless Communication Systems in Matlab (second edition), ISBN: 979-8648350779 available in ebook (PDF) format and Paperback (hardcopy) format.

Most of the communication channels (data storage devices, optical, wireless channels etc…) can be considered as band-limited linear filters. Thus these channels can be modeled as having the following frequency response

where, is amplitude response and is the phase response of the channel. The envelope or group delay for the given filter model is defined as,

A channel is considered non-distorting (within the given bandwidth occupied by the transmitted signal), when the amplitude response is constant and the phase response is a linear function of frequency. In other words, the channel has a constant group delay.

Amplitude distortion occurs when the amplitude response is no longer a constant and delay distortion or phase distortion occurs when the phase response is not a linear function of frequency (that is, the envelope or group delay is not a constant). Channels with delay distortion are termed as dispersive channels.

When a succession of pulses are transferred through a dispersive channel, the pulses may arrive at different time intervals the output of the channel due to non-constant group delay. As a result, the  transmitted pulses may interfere with each other, rendering them completely indistinguishable at the receiver. This phenomenon is called inter-symbol interference (ISI). Dispersive effects are particularly relevant in high data rate communication systems. Delay dispersion can also manifest in time-variant multipath channels, since the copies of signals traveling via each propagating path may arrive at different times at the  receiver thereby giving rise to ISI. Following are the major approaches to deal with ISI.

Demo in Matlab and Python

Consider a band-limited channel, modeled as an ideal brickwall low pass filter. The cut-off frequency of the low pass channel is rad/sample. An unit impulse is sent through the channel. As expected, we get a sinc pulse at the channel output (Figure 1, plots in the first row).

Next, a series of pulses with values [1,-1,1] are sent through the band-limited channel, at low data rate. Low data rate implies, there is sufficient pauses between the transmission of each value. The output of the channel shows clearly distinguishable peaks. As a consequence, the receiver can distinguish the values by simply sampling at the signal peaks (sampling is done at regular interval). This scenario is illustrated by Figure 1 row 2 plots.

Finally, plots in the row 3 of Figure 1 is for high speed data transmission, where the values [1,-1,1] are transmitted consecutively without any pause in between them. Due to the band-limited nature of the dispersive channel, the sinc pulses interfere with each other, thereby producing a smeared output. Now, the receiver cannot discern the values from the received signal. This phenomenon is called ‘inter-symbol interference’ (to be exact – inter-bit interference in this case 🙂 ).

Download the Python program for this demo – ipython notebook (as pdf).↗
Download the Matlab program for this demo.↗

Figure 1: Demonstrating inter-symbol interference caused by a band-limited channel

Rate this article : Note: There is a rating embedded within this post, please visit this post to rate it.

Topics in this chapter

Pulse Shaping, Matched Filtering and Partial Response Signaling
● Introduction
● Nyquist Criterion for zero ISI
● Discrete-time model for a system with pulse shaping and matched filtering
 □ Rectangular pulse shaping
 □ Sinc pulse shaping
 □ Raised-cosine pulse shaping
 □ Square-root raised-cosine pulse shaping
● Eye Diagram
● Implementing a Matched Filter system with SRRC filtering
 □ Plotting the eye diagram
 □ Performance simulation
● Partial Response Signaling Models
 □ Impulse response and frequency response of PR signaling schemes
● Precoding
 □ Implementing a modulo-M precoder
 □ Simulation and results

Books by the author


Wireless Communication Systems in Matlab
Second Edition(PDF)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart

Digital Modulations using Python
(PDF ebook)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart

Digital Modulations using Matlab
(PDF ebook)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart
Hand-picked Best books on Communication Engineering
Best books on Signal Processing

Differentially encoded BPSK: coherent detection

In coherent detection, the receiver derives its demodulation frequency and phase references using a carrier synchronization loop. Such synchronization circuits may introduce phase ambiguity in the detected phase, which could lead to erroneous decisions in the demodulated bits. For example, Costas loop exhibits phase ambiguity of integral multiples of radians at the lock-in points. As a consequence, the carrier recovery may lock in radians out-of-phase thereby leading to a situation where all the detected bits are completely inverted when compared to the bits during perfect carrier synchronization. Phase ambiguity can be efficiently combated by applying differential encoding at the BPSK modulator input (Figure 1) and by performing differential decoding at the output of the coherent demodulator at the receiver side (Figure 2).

This article is part of the following books
Digital Modulations using Matlab : Build Simulation Models from Scratch, ISBN: 978-1521493885
Digital Modulations using Python ISBN: 978-1712321638
All books available in ebook (PDF) and Paperback formats

Figure 1: Differential encoded BPSK transmission

In ordinary BPSK transmission, the information is encoded as absolute phases: for binary 1 and for binary 0. With differential encoding, the information is encoded as the phase difference between two successive samples. Assuming is the message bit intended for transmission, the differential encoded output is given as

The differentially encoded bits are then BPSK modulated and transmitted. On the receiver side, the BPSK sequence is coherently detected and then decoded using a differential decoder. The differential decoding is mathematically represented as

This method can deal with the phase ambiguity introduced by synchronization circuits. However, it suffers from performance penalty due to the fact that the differential decoding produces wrong bits when: a) the preceding bit is in error and the present bit is not in error , or b) when the preceding bit is not in error and the present bit is in error. After differential decoding, the average bit error rate of coherently detected BPSK over AWGN channel is given by

Figure 2: Coherent detection of differentially encoded BPSK signal

Following is the Matlab implementation of the waveform simulation model for the method discussed above. Both the differential encoding and differential decoding blocks, illustrated in Figures 1 and 2, are linear time-invariant filters. The differential encoder is realized using IIR type digital filter and the differential decoder is realized as FIR filter.

File 1: dbpsk_coherent_detection.m: Coherent detection of D-BPSK over AWGN channel

Refer Digital Modulations using Matlab : Build Simulation Models from Scratch for full Matlab code. Refer Digital Modulations using Python for full Python code.

Figure 3 shows the simulated BER points together with the theoretical BER curves for differentially encoded BPSK and the conventional coherently detected BPSK system over AWGN channel.

Rate this article: Note: There is a rating embedded within this post, please visit this post to rate it.

Topics in this chapter

Digital Modulators and Demodulators - Passband Simulation Models
Introduction
Binary Phase Shift Keying (BPSK)
 □ BPSK transmitter
 □ BPSK receiver
 □ End-to-end simulation
Coherent detection of Differentially Encoded BPSK (DEBPSK)
● Differential BPSK (D-BPSK)
 □ Sub-optimum receiver for DBPSK
 □ Optimum noncoherent receiver for DBPSK
Quadrature Phase Shift Keying (QPSK)
 □ QPSK transmitter
 □ QPSK receiver
 □ Performance simulation over AWGN
● Offset QPSK (O-QPSK)
● π/p=4-DQPSK
● Continuous Phase Modulation (CPM)
 □ Motivation behind CPM
 □ Continuous Phase Frequency Shift Keying (CPFSK) modulation
 □ Minimum Shift Keying (MSK)
Investigating phase transition properties
● Power Spectral Density (PSD) plots
Gaussian Minimum Shift Keying (GMSK)
 □ Pre-modulation Gaussian Low Pass Filter
 □ Quadrature implementation of GMSK modulator
 □ GMSK spectra
 □ GMSK demodulator
 □ Performance
● Frequency Shift Keying (FSK)
 □ Binary-FSK (BFSK)
 □ Orthogonality condition for non-coherent BFSK detection
 □ Orthogonality condition for coherent BFSK
 □ Modulator
 □ Coherent Demodulator
 □ Non-coherent Demodulator
 □ Performance simulation
 □ Power spectral density

Books by the author


Wireless Communication Systems in Matlab
Second Edition(PDF)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart

Digital Modulations using Python
(PDF ebook)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart

Digital Modulations using Matlab
(PDF ebook)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart
Hand-picked Best books on Communication Engineering
Best books on Signal Processing

Phase demodulation via Hilbert transform: Hands-on

Key focus: Demodulation of phase modulated signal by extracting instantaneous phase can be done using Hilbert transform. Hands-on demo in Python & Matlab.

Phase modulated signal:

The concept of instantaneous amplitude/phase/frequency are fundamental to information communication and appears in many signal processing application. We know that a monochromatic signal of form x(t) = a cos(ω t + ɸ) cannot carry any information. To carry information, the signal need to be modulated. Different types of modulations can be performed – amplitude modulation, phase modulation / frequency modulation.

In amplitude modulation, the information is encoded as variations in the amplitude of a carrier signal. Demodulation of an amplitude modulated signal, involves extraction of envelope of the modulated signal. This was discussed and demonstrated here.

This article is part of the following books
Digital Modulations using Matlab : Build Simulation Models from Scratch, ISBN: 978-1521493885
Digital Modulations using Python ISBN: 978-1712321638
Wireless communication systems in Matlab ISBN: 979-8648350779
All books available in ebook (PDF) and Paperback formats

In phase modulation, the information is encoded as variations in the phase of the carrier signal. In its generic form, a phase modulated signal is expressed as an information-bearing sinusoidal signal modulating another sinusoidal carrier signal

\[x(t) = A cos \left[ 2 \pi f_c t + \beta + \alpha sin \left( 2 \pi f_m t + \theta \right) \right]   \quad \quad \quad (1)\]

where, m(t) = α sin (2 π fm t + θ ) represents the information-bearing modulating signal, with the following parameters

α – amplitude of the modulating sinusoidal signal
fm – frequency of the modulating sinusoidal signal
θ – phase offset of the modulating sinusoidal signal

The carrier signal has the following parameters

A – amplitude of the carrier
fc – frequency of the carrier and fc>>fm
β – phase offset of the carrier

Demodulating a phase modulated signal:

The phase modulated signal shown in equation (1), can be simply expressed as

\[x(t) = A cos \left[ \phi(t) \right]    \quad\quad\quad (2) \]

Here,  ɸ(t) is the instantaneous phase  that varies according to the information signal m(t).

A phase modulated signal of form x(t) can be demodulated by forming an analytic signal by applying Hilbert transform and then extracting the instantaneous phase. This method is explained here.

We note that the instantaneous phase is ɸ(t) = 2 π fc t + β + α sin (2 π fm t + θ) is linear in time, that is proportional to 2 π fc t . This linear offset needs to be subtracted from the instantaneous phase to obtained the information bearing modulated signal. If the carrier frequency is known at the receiver, this can be done easily. If not, the carrier frequency term 2 π fc t needs to be estimated using a linear fit of the unwrapped instantaneous phase. The following Matlab and Python codes demonstrate all these methods.

Matlab code

%Demonstrate simple Phase Demodulation using Hilbert transform
clearvars; clc;
fc = 240; %carrier frequency
fm = 10; %frequency of modulating signal
alpha = 1; %amplitude of modulating signal
theta = pi/4; %phase offset of modulating signal
beta = pi/5; %constant carrier phase offset 
receiverKnowsCarrier= 'False'; %If receiver knows the carrier frequency & phase offset

fs = 8*fc; %sampling frequency
duration = 0.5; %duration of the signal
t = 0:1/fs:1-1/fs; %time base

%Phase Modulation
m_t = alpha*sin(2*pi*fm*t + theta); %modulating signal
x = cos(2*pi*fc*t + beta + m_t ); %modulated signal

figure(); subplot(2,1,1)
plot(t,m_t) %plot modulating signal
title('Modulating signal'); xlabel('t'); ylabel('m(t)')

subplot(2,1,2)
plot(t,x) %plot modulated signal
title('Modulated signal'); xlabel('t');ylabel('x(t)')

%Add AWGN noise to the transmitted signal
nMean = 0; %noise mean
nSigma = 0.1; %noise sigma
n = nMean + nSigma*randn(size(t)); %awgn noise
r = x + n;  %noisy received signal

%Demodulation of the noisy Phase Modulated signal
z= hilbert(r); %form the analytical signal from the received vector
inst_phase = unwrap(angle(z)); %instaneous phase

%If receiver don't know the carrier, estimate the subtraction term
if strcmpi(receiverKnowsCarrier,'True')
    offsetTerm = 2*pi*fc*t+beta; %if carrier frequency & phase offset is known
else
    p = polyfit(t,inst_phase,1); %linearly fit the instaneous phase
    estimated = polyval(p,t); %re-evaluate the offset term using the fitted values
    offsetTerm = estimated;
end
    
demodulated = inst_phase - offsetTerm;

figure()
plot(t,demodulated); %demodulated signal
title('Demodulated signal'); xlabel('n'); ylabel('\hat{m(t)}');

Python code

import numpy as np
from scipy.signal import hilbert
import matplotlib.pyplot as plt
PI = np.pi

fc = 240 #carrier frequency
fm = 10 #frequency of modulating signal
alpha = 1 #amplitude of modulating signal
theta = PI/4 #phase offset of modulating signal
beta = PI/5 #constant carrier phase offset 
receiverKnowsCarrier= False; #If receiver knows the carrier frequency & phase offset

fs = 8*fc #sampling frequency
duration = 0.5 #duration of the signal
t = np.arange(int(fs*duration)) / fs #time base

#Phase Modulation
m_t = alpha*np.sin(2*PI*fm*t + theta) #modulating signal
x = np.cos(2*PI*fc*t + beta + m_t ) #modulated signal

plt.figure()
plt.subplot(2,1,1)
plt.plot(t,m_t) #plot modulating signal
plt.title('Modulating signal')
plt.xlabel('t')
plt.ylabel('m(t)')
plt.subplot(2,1,2)
plt.plot(t,x) #plot modulated signal
plt.title('Modulated signal')
plt.xlabel('t')
plt.ylabel('x(t)')

#Add AWGN noise to the transmitted signal
nMean = 0 #noise mean
nSigma = 0.1 #noise sigma
n = np.random.normal(nMean, nSigma, len(t))
r = x + n  #noisy received signal

#Demodulation of the noisy Phase Modulated signal
z= hilbert(r) #form the analytical signal from the received vector
inst_phase = np.unwrap(np.angle(z))#instaneous phase

#If receiver don't know the carrier, estimate the subtraction term
if receiverKnowsCarrier:
    offsetTerm = 2*PI*fc*t+beta; #if carrier frequency & phase offset is known
else:
    p = np.poly1d(np.polyfit(t,inst_phase,1)) #linearly fit the instaneous phase
    estimated = p(t) #re-evaluate the offset term using the fitted values
    offsetTerm = estimated
                           
demodulated = inst_phase - offsetTerm 

plt.figure()
plt.plot(t,demodulated) #demodulated signal
plt.title('Demodulated signal')
plt.xlabel('n')
plt.ylabel('\hat{m(t)}')

Results

Figure 1: Phase modulation – modulating signal and modulated (transmitted) signal

Rate this article: Note: There is a rating embedded within this post, please visit this post to rate it.

For further reading

[1] V. Cizek, “Discrete Hilbert transform”, IEEE Transactions on Audio and Electroacoustics, Volume: 18 , Issue: 4 , December 1970.↗

Topics in this chapter

Essentials of Signal Processing
● Generating standard test signals
 □ Sinusoidal signals
 □ Square wave
 □ Rectangular pulse
 □ Gaussian pulse
 □ Chirp signal
Interpreting FFT results - complex DFT, frequency bins and FFTShift
 □ Real and complex DFT
 □ Fast Fourier Transform (FFT)
 □ Interpreting the FFT results
 □ FFTShift
 □ IFFTShift
Obtaining magnitude and phase information from FFT
 □ Discrete-time domain representation
 □ Representing the signal in frequency domain using FFT
 □ Reconstructing the time domain signal from the frequency domain samples
● Power spectral density
Power and energy of a signal
 □ Energy of a signal
 □ Power of a signal
 □ Classification of signals
 □ Computation of power of a signal - simulation and verification
Polynomials, convolution and Toeplitz matrices
 □ Polynomial functions
 □ Representing single variable polynomial functions
 □ Multiplication of polynomials and linear convolution
 □ Toeplitz matrix and convolution
Methods to compute convolution
 □ Method 1: Brute-force method
 □ Method 2: Using Toeplitz matrix
 □ Method 3: Using FFT to compute convolution
 □ Miscellaneous methods
Analytic signal and its applications
 □ Analytic signal and Fourier transform
 □ Extracting instantaneous amplitude, phase, frequency
 □ Phase demodulation using Hilbert transform
Choosing a filter : FIR or IIR : understanding the design perspective
 □ Design specification
 □ General considerations in design

Books by the author


Wireless Communication Systems in Matlab
Second Edition(PDF)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart

Digital Modulations using Python
(PDF ebook)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart

Digital Modulations using Matlab
(PDF ebook)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart
Hand-picked Best books on Communication Engineering
Best books on Signal Processing

Extract envelope, phase using Hilbert transform: Demo

Key focus: Learn how to use Hilbert transform to extract envelope, instantaneous phase and frequency from a modulated signal. Hands-on demo using Python & Matlab.

If you would like to brush-up the basics on analytic signal and how it related to Hilbert transform, you may visit article: Understanding Analytic Signal and Hilbert Transform

Introduction

The concept of instantaneous amplitude/phase/frequency are fundamental to information communication and appears in many signal processing application. We know that a monochromatic signal of form cannot carry any information. To carry information, the signal need to be modulated. Take for example the case of amplitude modulation, in which a positive real-valued signal modulates a carrier . That is, the amplitude modulation is effected by multiplying the information bearing signal with the carrier signal .

Here, is the angular frequency of the signal measured in radians/sec and is related to the temporal frequency as . The term is also called instantaneous amplitude.

Similarly, in the case of phase or frequency modulations, the concept of instantaneous phase or instantaneous frequency is required for describing the modulated signal.

Here, is the constant amplitude factor (no change in the envelope of the signal) and is the instantaneous phase which varies according to the information. The instantaneous angular frequency is expressed as the derivative of instantaneous phase.

This article is part of the following books
Digital Modulations using Matlab : Build Simulation Models from Scratch, ISBN: 978-1521493885
Digital Modulations using Python ISBN: 978-1712321638
Wireless communication systems in Matlab ISBN: 979-8648350779
All books available in ebook (PDF) and Paperback formats

Definition

Generalizing these concepts, if a signal is expressed as

  • The instantaneous amplitude or the envelope of the signal is given by
  • The instantaneous phase is given by 
  • The instantaneous angular frequency is derived as
  • The instantaneous temporal frequency is derived as

Problem statement

An amplitude modulated signal is formed by multiplying a sinusoidal information and a linear frequency chirp. The information content is expressed as and the linear frequency chirp is made to vary from to . Given the modulated signal, extract the instantaneous amplitude (envelope), instantaneous phase and the instantaneous frequency.

Solution

We note that the modulated signal is a real-valued signal. We also take note of the fact that amplitude/phase and frequency can be easily computed if the signal is expressed in complex form. Which transform should we use such that the we can convert a real signal to the complex plane without altering the required properties ?? Answer: Apply Hilbert transform and form the analytic signal on the complex plane.  Figure 1 illustrates this concept.

Figure 1: Converting a real-valued signal to complex plane using Hilbert Transform

If we express the real-valued modulated signal as an analytic signal, it is expressed in complex plane as

where, (HT[.]) represents the Hilbert Transform operation. Now, the required parameters are very easy to obtain.

The instantaneous amplitude (envelope extraction) is computed in the complex plane as

The instantaneous phase is computed in the complex plane as

The instantaneous temporal frequency is computed in the complex plane as

Once we know the instantaneous phase, the carrier can be regenerated as . The regenerated carrier is often referred as Temporal Fine Structure (TFS) in Acoustic signal processing [1].

Matlab

fs = 600; %sampling frequency in Hz
t = 0:1/fs:1-1/fs; %time base
a_t = 1.0 + 0.7 * sin(2.0*pi*3.0*t) ; %information signal
c_t = chirp(t,20,t(end),80); %chirp carrier
x = a_t .* c_t; %modulated signal

subplot(2,1,1); plot(x);hold on; %plot the modulated signal

z = hilbert(x); %form the analytical signal
inst_amplitude = abs(z); %envelope extraction
inst_phase = unwrap(angle(z));%inst phase
inst_freq = diff(inst_phase)/(2*pi)*fs;%inst frequency

%Regenerate the carrier from the instantaneous phase
regenerated_carrier = cos(inst_phase);

plot(inst_amplitude,'r'); %overlay the extracted envelope
title('Modulated signal and extracted envelope'); xlabel('n'); ylabel('x(t) and |z(t)|');
subplot(2,1,2); plot(cos(inst_phase));
title('Extracted carrier or TFS'); xlabel('n'); ylabel('cos[\omega(t)]');

Python

import numpy as np
from scipy.signal import hilbert, chirp
import matplotlib.pyplot as plt

fs = 600.0 #sampling frequency
duration = 1.0 #duration of the signal
t = np.arange(int(fs*duration)) / fs #time base

a_t =  1.0 + 0.7 * np.sin(2.0*np.pi*3.0*t)#information signal
c_t = chirp(t, 20.0, t[-1], 80) #chirp carrier
x = a_t * c_t #modulated signal

plt.subplot(2,1,1)
plt.plot(x) #plot the modulated signal

z= hilbert(x) #form the analytical signal
inst_amplitude = np.abs(z) #envelope extraction
inst_phase = np.unwrap(np.angle(z))#inst phase
inst_freq = np.diff(inst_phase)/(2*np.pi)*fs #inst frequency

#Regenerate the carrier from the instantaneous phase
regenerated_carrier = np.cos(inst_phase)

plt.plot(inst_amplitude,'r'); #overlay the extracted envelope
plt.title('Modulated signal and extracted envelope')
plt.xlabel('n')
plt.ylabel('x(t) and |z(t)|')
plt.subplot(2,1,2)
plt.plot(regenerated_carrier)
plt.title('Extracted carrier or TFS')
plt.xlabel('n')
plt.ylabel('cos[\omega(t)]')

Results

Rate this article: Note: There is a rating embedded within this post, please visit this post to rate it.

Reference

[1] Moon, Il Joon, and Sung Hwa Hong. “What Is Temporal Fine Structure and Why Is It Important?” Korean Journal of Audiology 18.1 (2014): 1–7. PMC. Web. 24 Apr. 2017.↗

Topics in this chapter

Essentials of Signal Processing
● Generating standard test signals
 □ Sinusoidal signals
 □ Square wave
 □ Rectangular pulse
 □ Gaussian pulse
 □ Chirp signal
Interpreting FFT results - complex DFT, frequency bins and FFTShift
 □ Real and complex DFT
 □ Fast Fourier Transform (FFT)
 □ Interpreting the FFT results
 □ FFTShift
 □ IFFTShift
Obtaining magnitude and phase information from FFT
 □ Discrete-time domain representation
 □ Representing the signal in frequency domain using FFT
 □ Reconstructing the time domain signal from the frequency domain samples
● Power spectral density
Power and energy of a signal
 □ Energy of a signal
 □ Power of a signal
 □ Classification of signals
 □ Computation of power of a signal - simulation and verification
Polynomials, convolution and Toeplitz matrices
 □ Polynomial functions
 □ Representing single variable polynomial functions
 □ Multiplication of polynomials and linear convolution
 □ Toeplitz matrix and convolution
Methods to compute convolution
 □ Method 1: Brute-force method
 □ Method 2: Using Toeplitz matrix
 □ Method 3: Using FFT to compute convolution
 □ Miscellaneous methods
Analytic signal and its applications
 □ Analytic signal and Fourier transform
 □ Extracting instantaneous amplitude, phase, frequency
 □ Phase demodulation using Hilbert transform
Choosing a filter : FIR or IIR : understanding the design perspective
 □ Design specification
 □ General considerations in design

Books by the author


Wireless Communication Systems in Matlab
Second Edition(PDF)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart

Digital Modulations using Python
(PDF ebook)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart

Digital Modulations using Matlab
(PDF ebook)

Note: There is a rating embedded within this post, please visit this post to rate it.
Checkout Added to cart
Hand-picked Best books on Communication Engineering
Best books on Signal Processing