Sie sind auf Seite 1von 135

Analysis and simulation of a communication system with binary amplitude shift keying (ASK) modulation

and non-coherent (post detector) signal processing. BER vs Bit/Noise ratio should be simulated for BER
10^-2 and 10^-3 for computer generated additive white Gaussian Noise without pulse shaping. Bit rate
is 64Kbps.

Abstract:

Keywords

Introduction:

 Goal of study
 Specify problem
 Describe how to investigate the problem
 System/ sub system block diagram

Section 1: Literature Review

 System Operational Principle


 Literature Review
 Definitions of everything
 Generic Block diagram of system (Tx and Rx)
 Comparison of modulation schemes and why Binary ASK in tabular form
 Mathematical Description of Signal and Noise
 Analytical equation for systems performance evaluation
 BPSK signal in time and frequency domain
 Analytical equation which describes BER in BPSK systems
 Definitions of baseband and bandpass signals
 Modulation and demodulation processes description
 Calculation of BER using equations
 Technical communication
 Areas of applications

Section 2: Communication System

 System Block Diagram


 Draw system model chart
 Modelling (signal generation using computer)
o Signal Modelling
 Signal generation
 Waveforms
o Noise Modelling
 Gaussian noise using computer
 PSD
 Explain meaning of all blocks
 Present data in table form i.e inputs and outputs of blocks with block name
 Show main signals at the blocks inputs and outputs in time and frequency domain
 Input and outputs waveform and spectrums
 Signal and noise processing in demodulator (with matched filter)
o Why matched filter
 Figures of all random signals
o PSD
o PDF
 Figures of all deterministic signals
o Spectrum
o Time domain waveform
 BER Modelling
o BER results for 10-2 and 10-3

Section 3: Design Analysis

 Comparison of analytical and modelling results (BER)


o One graph for both results
 Waveforms
 Comparison figures

Conclusion

 Based on section 3 results

Prospects

Appendix

 With program code

Acknowledgement

References

Author

 Picture and a small biography

2000-3000 words

4 tables

12 Figures

3-page Appendix

IEEE paper standard


Analysis and simulation of a communication system with binary amplitude shift keying (ASK)
modulation and non-coherent (post detector) signal processing. BER vs Bit/Noise ratio should
be simulated for BER 10^-2 and 10^-3 for computer generated additive white Gaussian Noise
without pulse shaping. Bit rate is 64Kbps.

Binary amplitude shift keying:

Non-coherent detection:

Additive white gaussian noise:

Without pulse shaping:

Modulation is a process of encoding information from a message source in a manner suitable for
transmission. It involves translating a baseband signal to a bandpass signal at frequencies thaT ARE HIGH
AS COMPARED TO THE BASEBAND SIGNAL.

The bandpass signal is called modulated signal and the baseband signal is called modulating signal.
Modulation may be done by varying the amplitude, phase or frequency of high frequency carrier in
accordance to the amplitude of baseband signal. Demodulation is the process of extracting the
baseband signal from the carrier so that it may be processed by the receiver.

Advancements in very large scale integration (VLSI) and digital signal processing (DSP) have made digital
modulation more cost effective than analog transmission systems.

Greater noise Robustness to Easy Greater


immunity channel multiplexing security
impairments
To improve the performance of overall communication link, digital error control codes are used which
can detect and correct transmission errors. This system supports complex signal processing techniques
like source coding, encryption and equalization.

In digital communication system, modulating signal is represented as a time sequence of symbols or


pulses where each symbol has m finite states. Each symbol represents n bits of information where,
n=log2m bits/symbol.

A desirable modulation scheme should have a low bit error rare at low received signal to noise ratio,
performs well in multipath and fading conditions, occupies a minimum bandwidth and is easy and cost
effective to implement. Depending upon the demand of a particular application, tradeoffs are made
when selecting a modulation scheme.

The performance of modulation scheme is measured in terms of power and bandwidth efficiency. Power
efficiency describes the ability of a modulation technique to preserve the fidelity of digital message at
low power levels. In a digital communication system, to increase noise immunity, signal power is to be
increased. However, the amount by which signal power should be increased depends upon the type of
modulation in order to obtain a certain fiedility i.e. an acceptable Bit error probability depends upon
the type of modulation.

Power efficiency is a measure of how favourably the tradeoff between fiedility and signal power is
made. And is oftem expressed a the ratio of the signal energy per bit to noise power spectral density
(Eb/ No) required t the receiver input to obtain a vertain probability of error (BER).

Bandwidth efficiency describes the ability of a modulation scheme to accommodate data within a
certain limited bandwidth. by increasing the data rate, pulse width of digital symbol is decreased which
increases the bandwidth of signal. Bandwidth efficiency describes how efficiently the allocated banwidth
is utilized and is defined as the ratio of throughput data rate per hertz in a given bandwidth.

Bandwidth efficieny: R/B bps/Hz

R=data rate I bits per second

B is bandwidth occupied b modulated RF signal

Pulse SHAPING:

This technique is used to reduce the intersymbol effects and the spectral width of a modulated digital
signal which occur due to the spreading of signal in time.
Coherent systems need carrier phase information at the receiver and they use matched filters to
detect and decide what data was sent , while noncoherent systems do not need carrier phase
information and use methods like square law to recover the data. In non coherent systems, the
receiver do not need the phase information of the transmitter carrier to recover the signal. Do not
require expensive and complex carrier recovery circuit. Comparatively poor bit error rate of
detection.

Ultra-wideband (UWB) systems are based on the transmission of subnanosecond pulses, typically
obtained by directly driving an antenna with short electrical pulses. According to the FCC regulation of
February 2002, signals belonging to this category are required to possess a −10 dB bandwidth which
exceeds 500 MHz or 20% of its fractional bandwidth [1]. Recently, this technology has been considered
for both adhoc [2] and indoor wireless personal area networks (IEEE 802.15.3a). UWB characteristics are
claimed to meet the requirements of these applications, in particular, low complexity, low cost, low
power consumption, and high data rate connectivity [3]. Furthermore, the fine delay resolution,
guaranteed by the large signal bandwidth, provides a high robustness in dense multipath environments
[4]. On the other hand, to fully exploit the channel diversity, a conventional coherent RAKE receiver
must be able to capture and track the energy associated with a high number of multipath replicas. In [5],
it is shown that the number of paths to be considered to reach the 85% of the overall energy can
sometimes exceed 100. In addition, the radiation and propagation processes can act on the transmitted
pulse as a filter whose characteristics vary from path to path. Therefore, the received signal can be seen
as a train of distorted waveforms that often show little resemblance with the transmitted pulse [6, 7].
Due to complexity constraints, only a small subset of the received replicas is expected to be selected and
combined, a fact that justifies the performance loss illustrated in [4, 8, 9, 10] for various selection
combining methods. Furthermore, the presence of pulse distortion increases the complexity of the
channel estimation algorithm [11, 12], a topic that has not been fully analyzed in the literature yet. In
general, it can be expected that complexity constraints will impose suboptimal solutions and determine
a further performance loss. A different approach to overcome all the abovementioned disadvantages is
based on the use of noncoherent reception techniques. These techniques do not require channel
estimation and allow to capture a large amount of the received energy, despite distortions and
multipath propagation. They represent, however, a suboptimal solution, if compared to coherent
receivers, because of the adoption of a noisy signal as a reference waveform for the demodulation
process..
Include channel effects

Non coherent: reference phase is not known

ASK also called on off keying

demodulation: only the presence or absence of a sinusoid in a given time interval needs to be
determined • advantage: simplicity • disadvantage: ASK is very susceptible to noise interference – noise
usually (only) affects the amplitude, therefore ASK is the modulation technique most affected by noise •
application: ASK is used to transmit digital data over optical fiber
SK – Amplitude shift keying • Amplitude-shift keying (ASK) is a form of modulation that represents
digital data as variations in the amplitude of a carrier wave. • The amplitude of an analog carrier
signal varies in accordance with the bit stream (modulating signal), keeping frequency and phase
constant. • The level of amplitude can be used to represent binary logic 0s and 1s.

1. 5. Binary ASK(BASK) or On-Off Keying (OOK) • Although we can have several levels (kinds)
of signal elements, each with a different amplitude, ASK is normally implemented using only
two levels. This is referred to as binary amplitude shift keying. • We can think of a carrier
signal as an ON or OFF switch. In the modulated signal, logic 0 is represented by the
absence of a carrier, thus giving OFF/ON keying operation and hence the name given OOK.
Used In satellite link.
AMPLITUDE SHIFT KEYING
MODULATION AND DEMODULATION
USING MATLAB
MARCH 18, 2013BY PRABHATH6
3

CODE:

clc;
clear all;
close all;
x=input(‘Enter the input digital sequence’);
N=length(x);
t=0.01:0.01:N;
c=2*sin(2*pi*t);
for i=1:1:N
m((i-1)*100+1:i*100)=x(i);
end
y=c.*m;
subplot(3,1,1);
plot(t,m);
xlabel(‘time’);
ylabel(‘amplitude’);
title(‘digital input signal’);
subplot(3,1,2);
plot(t,c);
xlabel(‘time’);
ylabel(‘amplitude’);
title(‘sinusoidal signal’);
subplot(3,1,3);
plot(t,y);
xlabel(‘time’);
ylabel(‘amplitude’);
title(‘PSK modulated signal’);
r=randn(1,length(y));
k=y+r;
figure;
plot(t,k);
xlabel(‘time’);
ylabel(‘amplitude’);
title(‘noise added PSK signal’);
t1=0:0.01:.99;
r1=sin(2*pi*t1);
r2=fliplr(r1);
l=length(k)+length(r2)-1;
d1=fft(k,l);
d2=fft(r2,l);
d=d1.*d2;
p=ifft(d,l);
figure;
plot(p);
xlabel(‘time’);
ylabel(‘amplitude’);
title(‘correlated signal’);
for j=1:length(x)
q(j)=p(100*j);
if q(j)>15
m1(j)=1;
else
m1(j)=0;
end
end
for i=1:1:N
s((i-1)*100+1:i*100)=m1(i);
end
figure;
plot(s);
xlabel(‘time’);
ylabel(‘amplitude’);
title(‘demodulated signal’);

Amplitude-shift keying (ASK) is a form of modulation that represents digital data as variations in the
amplitude of a carrier wave.
Any din scheme uses a finite number of distinct signals to represent digital data. ASK uses a finite number of
amplitudes, each assigned a unique pattern of binary digits. Usually, each amplitude encodes an equal
number of bits. Each pattern of bits forms the symbol that is represented by the particular amplitude. The
demodulator, which is designed specifically for the symbol-set used by the modulator, determines the
amplitude of the received signal and maps it back to the symbol it represents, thus recovering the original
data. Frequency and phase of the carrier are kept constant.

like am, ask is also linear and sensitive to atmospheric noise, distortions, propagation conditions
on divergent routes in pstn, etc. both ask modulation and demodulation processes are relatively inexpensive.
the ask technique is also commonly used to transmit digital data over optical fiber. for led transmitters,
binary 1 is represented by a brusque pulse of light and binary 0 by the absence of light. laser transmitters
normally have a fixed “bias” current that causes the device to emit a low light level. this low level represents
binary 0, while a higher-amplitude lightwave represents binary 1.
The simplest and most common form of ASK operates as a switch, using the presence of a carrier wave to
indicate a binary one and its absence to indicate a binary zero. This type of modulation is called on-off keying,
and is used at radio frequencies to transmit Morse code (referred to as continuous wave operation),

More sophisticated encoding schemes have been developed which represent data in groups using additional
amplitude levels. For instance, a four-level encoding scheme can represent two bits with each shift in
amplitude; an eight-level scheme can represent three bits; and so on. These forms of amplitude-shift keying
require a high signal-to-noise ratio for their recovery, as by their nature much of the signal is transmitted at
reduced power.

REFERENCE:

http://en.wikipedia.org/wiki/Amplitude-shift_keying

Additive white Gaussian noise (AWGN) is a basic noise model used in Information theory to mimic
the effect of many random processes that occur in nature. The modifiers denote specific
characteristics:

 Additive because it is added to any noise that might be intrinsic to the information system.
 White refers to the idea that it has uniform power across the frequency band for the information
system. It is an analogy to the color white which has uniform emissions at all frequencies in
the visible spectrum.
 Gaussian because it has a normal distribution in the time domain with an average time domain
value of zero.
Binary Amplitude Shift Keying (BASK) or On Off Keying (OOK) is one of
the digital modulation techniques in which the amplitude of carrier is switched
according to the binary data. This digital modulation scheme is used to transmit
digital data over optical fiber, point to point military communication
applications, etc. Binary 1 is represented by a short pulse of light and binary 0
by the absence of light. Amplitude Shift Keying modulation and
demodulation processes are relatively inexpensive and easy to implement.
The main disadvantage of ASK is that it is sensitive to atmospheric noise,
distortions and propagation conditions. Here is the practical circuit diagram of
amplitude shift keying modulator using CD4016 IC. CD4016 is a switching IC
with four embedded switches.

Also Read: Binary Phase Shift Keying (BPSK) Modulation


Circuit Diagram

Components Required
1. CD4016 IC
2. NOT gate 7404
Output Waveform

Working of ASK circuit


 Sine wave can be obtained from a function generator or by using a RC phase shift
oscillator.
 Two switches inside the quad analog switch CD 4016 are used in the circuit. When the
enable input of one gate is at high, then the input will appear at the output.
 When the binary data is 1, sine wave is switched to output because the sine wave is
connected to 1st switch and the binary data is applied to enable pin (13th pin) of 1st
switch.
 When binary data is 0, the 1st switch is disabled and 2nd switch is enabled using NOT
gate arrangement.
 The input of 2nd pin is grounded, hence we get 0V for binary 0.
 The output pins of both first and second switches are shorted and the output is taken
from it. The block diagram is self explanatory.

Components Pin out


In Amplitude Shift Keying, the bandwidth required is given by B=(1+d)SB=(1+d)S where B is
bandwidth, S is the signal rate, and d is a value of either 0 or 1. But how could the required
bandwidth be just some multiples of the signal rate when one signal element itself could have
higher frequencies?

The baud rate is 5, which implies the signal rate is also 5 signals per second. One signal itself
would need 3 cycles. Then the worst case scenario is where all the bits are 1 and the thus the
highest frequency is 3×5=15Hz3×5=15Hz and so the minimum bandwidth required of a
channel to allow this modulated signal to pass through is still 15Hz. Is this right?
However, if I were to follow the formula B=(1+d)SB=(1+d)S, I would get...
If let d=0d=0, B=(1+0)×5=5HzB=(1+0)×5=5Hz
If let d=1d=1, B=(1+1)×5=10HzB=(1+1)×5=10Hz
But is 5Hz or 10Hz be sufficient for the signal in the picture? Why does the formula say that the
bandwidth is either equivalent or maximum 2 times the signal rate? How is it so?

The bandwidth doesn't start at DC (0 Hz), but is centered around your carrier frequency, so

fMIN=fC−BW/2=15Hz−5Hz=10HzfMIN=fC−BW/2=15Hz−5Hz=10Hz, and

or

BW=fMAX−fMIN=20Hz−10Hz=10HzBW=fMAX−fMIN=20Hz−10Hz=10Hz
The minimum bandwidth for ASK is equal to the Baud rate (which in this case = bit rate).

Also, IIRC, d can be a value in [0..1], so isn't restricted to 0 or 1.

Since the BWBW is unknown before I have the fmaxfmax and fminfmin, how could I know
that for fMIN=fC−BW/2fMIN=fC−BW/2, the BW/2BW/2 is equals to 5Hz5Hz so that I could
subsequently find the fmaxfmaxand fminfmin? – xenon Sep 20 '11 at 12:48

@xEnOn - depends on the factor dd. If dd = 0 then BWBW = signal rate. I don't recall
where the ddcomes from :-( – stevenvh Sep 20 '11 at 13:00

I read that dd comes from the implementation ratio. According to the formula,
indeed, the bandwidth = signal rate when d=0d=0. But why and how is the bandwidth
equals to the signal rate? – xenon Sep 20 '11 at 13:33

CHECK SIMULATION OF RAYLEIGH CHANNEL IN MATLAB AND THEN YOU CAN ADD NOISE MORE
DETAILED MANNER
MSK
MSK stands for minimum shift keying. It is one type of the continuous phase modulation (CPM)
schemes 3). In this section, we use “MSK Modulator Baseband” block to modulate the input random
binary bits. In other words, the input is either 0 or 1.

Model
The figure below shows a MSK transmission model with the square root raised cosine pulse shaping
filters. In order to observe the effect of the pulse shaping filters, we use a “Spectrum Analyzer” block,
as well as several “Constellation” blocks on one of the channels.
Yo

Find the minimum bandwidth for an ASK signal transmitting at 2000 bps. The transmission mode is
halfduplex. Solution In ASK the baud rate and bit rate are the same. The baud rate is therefore 2000. An
ASK signal requires a minimum bandwidth equal to its baud rate. Therefore, the minimum bandwidth is
2000 Hz.
Bit Rate The speed of the data is expressed in bits per second (bits/s or bps). The data rate R is a
function of the duration of the bit or bit time (TB) (Fig. 1, again): R = 1/TB Rate is also called channel
capacity C. If the bit time is 10 ns, the data rate equals: R = 1/10 x 10–9 = 100 million bits/s This is usually
expressed as 100 Mbits/s.
ASK
the SHORT form of amplitude shift keying is referred as ASK. It is the digital
modulation technique. In this technique, amplitude of the RF carrier is varied in
accordance with baseband digital input signal. The figure depicts operation of
ASK modulation. As shown in the figure, binary 1 will be represented by carrier
signal with some amplitude while binary 0 will be represented by carrier of zero
amplitude(i.e. no carrier).
This Java applet allows you to experience the basics of ASK/OOK modulation and demodulation visually.
It’s interesting to look at the spectrogram and try changing the various parameters. You can understand
the background to the characteristics of the signal. To run the applet, click the picture.

*Java Runtime Environment version 5.0 or higher is required to run the applet.
Download:http://www.java.com/en/download/index.jsp

An outline of digital amplitude modulation and demodulation

digital amplitude modulation and demodulation includes ask and ook. ask stands for amplitude shift keying,
and ook stands for onoff keying. the modulation and demodulation circuits for digital amplitude modulation
are simple and relatively frugal, and so they are used in relatively low cost systems where long
communication range is not necessary such as rfid, etc, keyless entry and so on. demodulation methods
for ask modulating signals include synchronous detection and anachronistic detection. however, in most
cases, asynchronous detection is used because it is cheaper to implement.

The theory of digital amplitude modulation and demodulation

◆Modulation
Amplitude modulation is often associated with the modulation method of AM radio. When the carrier wave
is C(t) and the modulating signal is m(t), the modulated wave Sam is as follows.With ASK/OOK modulation,
a modulator is used to shift the amplitude of the carrier wave proportionally to the amplitude of the
modulating signal (digital signal). In the case of a digital signal, the modulating signal applied to the
modulator is called digital modulation. The modulator is the same as for analog modulation. With an ASK
modulating signal, the digital signal value is either -1 or +1, and when it is changed to 0 and +1 it is called
OOK. With OOK, the amplitude direction of the modulated wave is indicated by the presence or absence of
a carrier wave. In other words, when the signal is 0, there is no carrier wave and when it is 1, there is a
carrier wave. The spectrum of the ASK modulated wave is centered on the carrier frequency and the
square wave spectrum which is the modulating signal takes a spread-out form.

Expressed as a formula, carrier wave C(t) takes the following form.

The ASK modulated wave is modulating signal m(t) multiplied by carrier wave C(t), and is expressed as a
formula as follows.
◇ASK constellation
ASK can also be expressed as the constellation in the figure below, with the information at amplitude point
0 and 1 at phase 0 rad corresponding to 0 and 1. 0 rad means that even if the information signal changes,
there is no phase shift.

◆Demodulation
The receivers use envelope detection, a type of asynchronous detection, to simplify their structure and
reduce their cost. Envelope detection is a detection method that can only perform demodulation when the
envelope of the modulated signal indicates a modulating signal. The applet can be set with a modulation
factor higher than 1, but in this case, since the envelope of the modulated signal does not indicate a
modulating signal, envelope detection is not possible and it’s necessary to use synchronous detection.
The applet allows you to switch between synchronous detection and asynchronous detection. You can
confirm that demodulation can be carried out properly even with a modulation index over 1 if you use
synchronous detection.

The detection method used by the applet is as follows.

Synchronous detection:
The modulated wave is multiplied with the carrier frequency which is exactly the same frequency and
phase as the transmission carrier wave.

Asynchronous detection:
The received signal is multiplied by a squarer. Synchronous detection
When the ASK modulated wave is multiplied to become a regenerated carrier wave, it is as follows. The
second term in the braces is an unwanted component, so only the LPF signal component is added. The
determination device determines the level of the signal and the transmitting end information signal is
obtained.
◆Synchronous detection

When the ASK modulated wave is multiplied to become a regenerated carrier wave, it is as follows.

The second term in the braces is an unwanted component, so only the LPF signal component is added.

The determination device determines the level of the signal and the transmitting end information signal is
obtained.
◆Example of asynchronous detection
The ASK modulated wave is multiplied by a squarer as follows.

The second term in the braces is an unwanted component, so only the LPF signal component is added.

The determination device determines the level of the signal and the transmitting end information signal is
obtained.

ASK/OOK modulation and demodulation applet

An ASK modulation and demodulation applet Click the “Explain” button at the bottom right of the applet
for how to use it.
Demodulation methods for ASK modulating signals include synchronous detection and asynchronous
detection, and the applet shown below allows you to switch between the two to see the difference.
Click the image: ASK/OOK modulation and demodulation applet
Fig.1 ASK Modulation
ASK modulation can be represented by following equation:
s(t) = A2* cos(2*π*fc*t) for Binary Logic-1
s(t) = A1* cos(2*π*fc*t) for Binary Logic-0
Here A2>A1
Signalling used is ON-OFF signalling.
Bandwidth requirement for ASK is:
BW = 2/Tb = 2*Rb
Often in ASK modulation, binary-1 is represented by carrier with amplitude-A2
and binary-0 is represented by carrier with amplitude-A1. Here A2 is greater in
magnitude compare to A1. The form of ASK where in no carrier is transmitted
during the transmission of logic zero is known as OOK modulation (On Off
Keying modulation). This is shown in the figure-1. Refer OOK vs ASK modulation
>> which compares OOK vs ASK and depicts difference between OOK and ASK
modulation types with signal diagrams.
• In ASK probability of error (Pe) is high and SNR is less.
• It has lowest noise immunity against noise.
• ASK is a bandwidth efficient system but it has lower power efficiency.
As already indicated, the sharp discontinuities in the ASK waveform of Figure 1 imply a wide bandwidth.
A significant reduction can be accepted before errors at the receiver increase unacceptably. This can be
brought about by bandlimiting (pulse shaping) the message before modulation, or bandlimiting the ASK
signal itself after generation.
Amplitude Shift Keying (ASK) is a type of Amplitude Modulation which
represents the binary data in the form of variations in the amplitude of a
signal.

Any modulated signal has a high frequency carrier. The binary signal when
ASK modulated, gives a zero value for Low input while it gives the carrier
output for High input.

The following figure represents ASK modulated waveform along with its input.

To find the process of obtaining this ASK modulated wave, let us learn about
the working of the ASK modulator.
ASK Modulator
The ASK modulator block diagram comprises of the carrier signal generator,
the binary sequence from the message signal and the band-limited filter.
Following is the block diagram of the ASK Modulator.

The carrier generator, sends a continuous high-frequency carrier. The binary


sequence from the message signal makes the unipolar input to be either High
or Low. The high signal closes the switch, allowing a carrier wave. Hence, the
output will be the carrier signal at high input. When there is low input, the
switch opens, allowing no voltage to appear. Hence, the output will be low.

The band-limiting filter, shapes the pulse depending upon the amplitude and
phase characteristics of the band-limiting filter or the pulse-shaping filter.

ASK Demodulator
There are two types of ASK Demodulation techniques. They are −

 Asynchronous ASK Demodulation/detection

 Synchronous ASK Demodulation/detection


The clock frequency at the transmitter when matches with the clock
frequency at the receiver, it is known as a Synchronous method, as the
frequency gets synchronized. Otherwise, it is known as Asynchronous.

Asynchronous ASK Demodulator


the anachronistic ask detector consists of a half-wave rectifier, a low pass
filter, and a comparator. following is the block diagram for the same.

The modulated ASK signal is given to the half-wave rectifier, which delivers
a positive half output. The low pass filter suppresses the higher frequencies
and gives an envelope detected output from which the comparator delivers a
digital output.

Synchronous ASK Demodulator


Synchronous ASK detector consists of a Square law detector, low pass filter,
a comparator, and a voltage limiter. Following is the block diagram for the
same.
The ASK modulated input signal is given to the Square law detector. A square
law detector is one whose output voltage is proportional to the square of the
amplitude modulated input voltage. The low pass filter minimizes the higher
frequencies. The comparator and the voltage limiter help to get a clean digital
output.
Frequency and Single-Sideband Amplitude Modulation
Try this Example

Generate a 10 Hz sinusoidal signal sampled at a rate of 200 Hz for 1 second. Embed the sinusoid in
white Gaussian noise of variance 0.01.
fs = 200;
t = 0:1/fs:1;
x = sin(2*pi*10*t)+randn(size(t))/10;
frequency modulate the signal with a carrier frequency of 50 hz. compute the welch power spectral
density estimates of the original and modulated sequences. use a 100-sample hamming window with 80
samples of convergence. specify an fft length of 1024.
y = modulate(x,50,fs);

pwelch([x;y]',hamming(100),80,1024,fs,'centered')

Single-sideband amplitude modulate the signal with the same carrier frequency. Compute and display the
new Welch PSD estimates.
y = modulate(x,50,fs,'amssb');
pwelch([x;y]',hamming(100),80,1024,fs,'centered')

Unipolar encoding
: If the signal: If the signalelements all have the same algebraicelements all
have the same algebraicsigns, all positive or all negative, thesigns, all
positive or all negative, thesignal is called unipolar.signal is called unipolar.•
Polar encodingPolar encoding
: One logical state is: One logical state isrepresented by positive voltage
and therepresented by positive voltage and theother by the negative
voltage level.other by the negative voltage level.
Amplitude Shift Keying:
Amplitude shift keying (ASK) is a very popular modulation used in control applications.
This is due to its simplicity and low implementation costs. ASK modulation has the advantage of
allowing the transmitter to idle during the transmission of a bit zero. Therefore this reduces the
power consumption. This disadvantage of ASK modulation arises in the presence of an
undesired signal. in amplitude shift keying (ASK), as the name specifies the amplitude of the
carrier signal is varied between two levels if the ASK scheme is Binary ASK. Sometimes it is
more than two levels if the ASK scheme is M-array. All this is done according to the data bit to
be transmitted over the noisy channel. The information is assumed to be unipolar binary data.
In binary ask bit 1 is transmitted with the carrier of specified amplitude. The bit zero is
transmitted with the no carrier during the bit interval. During all the bit intervals amplitude will
be changed but frequency will be kept constant. In M-array ask the amplitude levels of the
carrier will change between M numbers of values. The main advantage of the ASK is power
saving and simplicity in implementation. The ASK wave form can be represented
mathematically as s(t)=m(t)*sin(2πfct). where s(t) is the ASK output signal, m(t) is the unipolar
binary message signal to be transmitted and fc is the carrier frequency.Amplitude shift keying
(ASK) is a simple and elementary form of digital modulation in which the amplitude of a carrier
sinusoid is modified in a
discrete manner depending on the value of a modulating symbol.This is a narrow
band modulation scheme and we assume that a large number carrier cycles are sent within a
symbol interval. obvious that the information is embedded only in the peak amplitude of
the modulated signal.this is described as a one type of digital amplitude modulation technique.
BASK has only one basis function so this can be described as a one dimensional modulation
scheme.this technique is used for telegraph services.on-off keying is not a spectrally not efficeint
scheme becuse as the amplitude of the carrier changes abruptly when the data bit changes. for
this reason this technique is used for transmission of data at low or moderate data rates.

Algorithm:
The binary message to be transmitted is taken and it should be represented in a
waveform so we can implement ask. Then generate the carrier it may be either sin or cos. After
generating carrier multiply the carrier with the message point by point.
in demodulation the code checks for the value and if the value matched during the all
the bit interval then the value will be returned.

Matlab commands:
1. K=Length(x)
It finds the length of the array x and returns its length as an integer.
2. T=[0.01:0.01:k]
This specifies the time interval over which the carrier time period will be decided.
3. Z=m.*c
This is matlab Command for point by point multiplication. Sometimes it generates errors if the
m and c are not of same dimensions.
4. M((i-1)*100+1:i*100)=a(i)
This applies the value of the message bit i during the specified interval.
5. p = randperm(n)
Returns a random permutation of the integers 1:n.
6. mod(1,randperm(n))
this command generates the n number of integers and all these having only two values. For
example mod(1,randperm(5)) ans =[0 1 1 1 1]

program:
x=input('binary message signal')%binary message signal
l=length(x)%length of message
t=[0.01:0.01:l]%time scaling
c=cos(2*pi*t)%carrier signal
for i=1:1:l
m((i-1)*100+1:i*100)=x(i)%loop to convert inputed sequence to pulsewave
end
a=c.*m
figure(1)
plot(m)
title('massage signal')
figure(2)
plot(a)
title('ASK Signal')
%%% ASK Demodulation envelope detection without noise%%%
for i=1:1:(i*100)
if a(i)==0
r(i)=0
else
r(i)=1
end
end
figure(3)
plot(r)
title('recovered signal')
Bit rate represents the No. of bits/sec whereas baud rate represents the No. of symbols
sent per second. Baud rate is less than or equal to the bit rate. Modulated symbol
waveform are represented as:
Bit Error Rate (BER) for BPSK modulation
by KRI SHNA SANKAR on AUGUST 5, 2007

In this post, we will derive the theoretical equation for bit error
rate (BER) with Binary Phase Shift Keying (BPSK) modulation
scheme in Additive White Gaussian Noise (AWGN) channel.
The BER results obtained using Matlab/Octave simulation
scripts show good agreement with the derived theoretical
results.

With Binary Phase Shift Keying (BPSK), the binary digits 1


and 0 maybe represented by the analog levels and
respectively. The system model is as shown in the
Figure below.
Figure: Simplified block diagram with BPSK transmitter-
receiver

Channel Model
The transmitted waveform gets corrupted by noise , typically
referred to as Additive White Gaussian Noise (AWGN).
Additive : As the noise gets ‘added’ (and not multiplied) to the
received signal
White : The spectrum of the noise if flat for all frequencies.
Gaussian : The values of the noise follows the Gaussian
probability distribution

function, with and .

Computing the probability of error


Using the derivation provided in Section 5.2.1 of [COMM-
PROAKIS] as reference:
The received signal,

when bit 1 is transmitted and

when bit 0 is transmitted.

The conditional probability distribution function (PDF) of for


the two cases are:

.
Figure: Conditional probability density function with
BPSK modulation
Assuming that and are equally probable
i.e. , the threshold 0forms the optimal
decision boundary.
 if the received signal is is greater than 0, then the
receiver assumes was transmitted.
 if the received signal is is less than or equal to 0, then the
receiver assumes was transmitted.
i.e.

and

Probability of error given was transmitted


With this threshold, the probability of error given is
transmitted is (the area in blue region):

,
where,

is the complementary error function.

Probability of error given was transmitted


Similarly the probability of error given is transmitted is (the
area in green region):

Total probability of bit error


.

Given that we assumed that and are equally probable


i.e. , the bit error probability is,
.

Simulation model
Matlab/Octave source code for computing the bit error rate
with BPSK modulation from theory and simulation. The code
performs the following:

(a) Generation of random BPSK modulated symbols +1′s and


-1′s

(b) Passing them through Additive White Gaussian Noise


channel
(c) Demodulation of the received symbol based on the
location in the constellation

(d) Counting the number of errors

(e) Repeating the same for multiple Eb/No value.

Click here to download Matlab/Octave script for simulating


BER for BPSK modulation in AWGN chnanel.

Figure: Bit error rate (BER) curve for BPSK modulation –


theory, simulation
Amplitude Shift Keying (ASK): – change amplitude with each symbol – frequency constant – low
bandwidth requirements – very susceptible to interference

Generate a vector of Eb/No values to evaluate.


EbNo = 8:2:20;
Initialize the BER results vector.
ber = zeros(length(EbNo),20);
Generate BER vs. Eb/No curves for 16-QAM in a fading channel. Vary the diversity order from 1 to 20.
for L = 1:20
ber(:,L) = berfading(EbNo,'qam',16,L);
end
Plot the results.
semilogy(EbNo,ber,'b')
text(18.5, 0.02, sprintf('L=%d',1))
text(18.5, 1e-11, sprintf('L=%d',20))
title('QAM over fading channel with diversity order 1 to 20')
xlabel('E_b/N_0 (dB)')
ylabel('BER')
grid on
% A fundemental
%question to ask is: "Why does BPSK show a 3dB improvement(as you will see
using the
%program)in BER over ASK?". A simple answer is that the signal for ASK is
being
%transmitted only half the time. A reference is provided at the end of the
program that
%was used in writing the program. Always remember a journey of a thousand
%miles requires a first one small step.
Signal Detection in White Gaussian Noise
Try it in MATLAB
This example discusses the detection of a deterministic signal in complex, white, Gaussian noise. This
situation is frequently encountered in radar, sonar and communication applications.

Overview
There are many different kinds of detectors available for use in different applications. A few of the most
popular ones are the Bayesian detector, maximum likelihood (ML) detector and Neyman-Pearson (NP)
detector. In radar and sonar applications, NP is the most popular choice since it can ensure the
probability of false alarm (Pfa) to be at a certain level.
In this example, we limit our discussion to the scenario where the signal is deterministic and the noise is
white and Gaussian distributed. Both signal and noise are complex.
The example discusses the following topics and their interrelations: coherent detection, noncoherent
detection, matched filtering and receiver operating characteristic (ROC) curves.

Signal and Noise Model


The received signal is assumed to follow the model

where s(t) is the signal and n(t) is the noise. Without losing the generality, we assume that the signal
power is equal to 1 watt and the noise power is determined accordingly based on the signal to noise ratio
(SNR). For example, for an SNR of 10 dB, the noise power, i.e., noise variance will be 0.1 watt.

Matched Filter
A matched filter is often used at the receiver front end to enhance the SNR. From the discrete signal point
of view, matched filter coefficients are simply given by the complex conjugated reversed signal samples.
when dealing with complex signals and noises, there are two types of receivers. the first benevolent is a
coherent receiver, which assumes that both the amplitude and phase of the received signal are known.
this results in a perfect match between the matched filter coefficients and the signal s. Therefore, the
matched filter coefficients can be considered as the conjugate of s. The matched filter operation can then
be modeled as

Note that although the general output y is still a complex quantity, the signal is completely characterized
by which is a real number and contained in the real part of y. hence, the detector following the
matched filter in a coherent receiver normally uses only the real part of the received signal. such a
receiver can normally provide the best performance. however, the coherent receiver is vulnerable to
phase errors. in addition, a coherent receiver also requires additional hardware to perform the phase
detection. for a noncoherent receiver, the received signal is modeled as a emulate of the original signal
with a random phase error. with a noncoherent received signal, the detection after the matched filter is
normally based on the power or magnitude of the signal since you need both real and imaginary parts to
completely define the signal.

Detector
The objective function of the NP decision rule can be written as

i.e., to maximize the probability of the detection, Pd, while limiting the probability of false alarm, Pfa at a
specified level a. The variable g in the equation is the Lagrange multiplier. The NP detector can be
formed as a likelihood ratio test (LRT) as follows:

In this particular NP situation, since the false alarm is caused by the noise alone, the threshold Th is
determined by the noise to ensure the fixed Pfa. The general form of the LRT shown above is often
difficult to evaluate. In real applications, we often use an easy to compute quantity from the signal, i.e.,
sufficient statistic, to replace the ratio of two probability density functions. For example, the sufficient
statistics, z may be as simple as

then the simplified detector becomes

T is the threshold to the sufficient statistic z, acting just like the threshold Th to the LRT. Therefore, the
threshold is not only related to the probability distributions, but also depends on the choice of sufficient
statistic.

Single Sample Detection Using Coherent Receiver


We will first explore an example of detecting a signal in noise using just one sample.
Assume the signal is a unit power sample and the SNR is 3 dB. Using a 100000-trial Monte-Carlo
simulation, we generate the signal and noise as
% fix the random number generator
rstream = RandStream.create('mt19937ar','seed',2009);

Ntrial = 1e5; % number of Monte-Carlo trials


snrdb = 3; % SNR in dB
snr = db2pow(snrdb); % SNR in linear scale
spower = 1; % signal power is 1
npower = spower/snr; % noise power
namp = sqrt(npower/2); % noise amplitude in each channel
s = ones(1,Ntrial); % signal
n = namp*(randn(rstream,1,Ntrial)+1i*randn(rstream,1,Ntrial)); % noise
Note that the noise is complex, white and Gaussian distributed.
If the received signal contains the target, it is given by
x = s + n;
The matched filter in this case is trivial, since the signal itself is a unit sample.
mf = 1;
In this case, the matched filter gain is 1, therefore, there is no SNR gain.
Now we do the detection and examine the performance of the detector. For a coherent receiver, the
received signal after the matched filter is given by
y = mf'*x; % apply the matched filter
The sufficient statistic, i.e., the value used to compare to the detection threshold, for a coherent detector
is the real part of the received signal after the matched filter, i.e.,
z = real(y);
Let's assume that the we want to fix the Pfa to 1e-3. Given the sufficient statistic, z, the decision rule
becomes

where the threshold T is related to Pfa as

In the equation, N is the signal power and M is the matched filter gain. Note that T is the threshold of the
signal after the matched filter and NM represents the noise power after the matched filter, so can be
considered as the ratio between the signal and noise magnitude, i.e., it is related to the signal to noise
ratio, SNR. Since SNR is normally referred to as the ratio between the signal and noise power,
considering the units of each quantity in this expression, we can see that

Since N and M are fixed once the noise and signal waveform are chosen, there is a correspondence
between T and SNR. Given T is a threshold of the signal, SNR can be considered as a threshold of the
signal to noise ratio. Therefore, the threshold equation can then be rewritten in the form of

The required SNR threshold given a complex, white Gaussian noise for the NP detector can be calculated
using the npwgnthresh function as follows:
Pfa = 1e-3;
snrthreshold = db2pow(npwgnthresh(Pfa, 1,'coherent'));
Note that this threshold, although also in the form of an SNR value, is different to the SNR of the received
signal. The threshold SNR is a calculated value based on the desired detection performance, in this case
the Pfa; while the received signal SNR is the physical characteristic of the signal determined by the
propagation environment, the waveform, the transmit power, etc.
The true threshold T can then be derived from this SNR threshold as

mfgain = mf'*mf;
% To match the equation in the text above
% npower - N
% mfgain - M
% snrthreshold - SNR
threshold = sqrt(npower*mfgain*snrthreshold);
The detection is performed by comparing the signal to the threshold. Since the original signal, s, is
presented in the received signal, a successful detection occurs when the received signal passes the
threshold, i.e. z>T. The capability of the detector to detect a target is often measured by the Pd. In a
Monte-Carlo simulation, Pd can be calculated as the ratio between the number of times the signal passes
the threshold and the number of total trials.
Pd = sum(z>threshold)/Ntrial
Pd =

0.1390

On the other hand, a false alarm occurs when the detection shows that there is a target but there actually
isn't one, i.e., the received signal passes the threshold when there is only noise present. The error
probability of the detector to detect a target when there isn't one is given by Pfa.
x = n;
y = mf'*x;
z = real(y);
Pfa = sum(z>threshold)/Ntrial
Pfa =

9.0000e-04

which meets our requirement.


To see the relation among SNR, Pd and Pfa in a graph, we can plot the theoretical ROC curve using the
rocsnr function for a SNR value of 3 dB as
rocsnr(snrdb,'SignalType','NonfluctuatingCoherent','MinPfa',1e-4);
It can be seen from the figure that the measured Pd=0.1390 and Pfa=0.0009 obtained above for the SNR
value of 3 dB match a theoretical point on the ROC curve.

Single Sample Detection Using Noncoherent Receiver


A noncoherent receiver does not know the phase of the received signal, therefore, for target present
case, the signal x contains a phase term and is defined as
% simulate the signal
x = s.*exp(1i*2*pi*rand(rstream,1,Ntrial)) + n;
y = mf'*x;
When the noncoherent receiver is used, the quantity used to compare with the threshold is the power (or
magnitude) of the received signal after the matched filter. In this simulation, we choose the magnitude as
the sufficient statistic.
z = abs(y);
Given our choice of the sufficient statistic z, the threshold is related to Pfa by the equation

The signal to noise ratio threshold SNR for an NP detector can be calculated using npwgnthresh as
follows:
snrthreshold = db2pow(npwgnthresh(Pfa, 1,'noncoherent'));
The threshold, T, is derived from SNR as before
mfgain = mf'*mf;
threshold = sqrt(npower*mfgain*snrthreshold);
Again, Pd can then be obtained using
Pd = sum(z>threshold)/Ntrial
Pd =

0.0583

Note that this resulting Pd is inferior to the performance we get from a coherent receiver.
For the target absent case, the received signal contains only noise. We can calculate the Pfa using
Monte-Carlo simulation as
x = n;
y = mf'*x;
z = abs(y);
Pfa = sum(z>threshold)/Ntrial
Pfa =

9.5000e-04

The ROC curve for a noncoherent receiver is plotted as


rocsnr(snrdb,'SignalType','NonfluctuatingNoncoherent','MinPfa',1e-4);

We can see that the performance of the noncoherent receiver detector is inferior to that of the coherent
receiver.

Summary
this example shows how to emulate and perform different detection techniques using matlab®. the
example illustrates the relationship among several frequently encountered variables in signal detection,
namely, probability of detection (Pd), probability of false alarm (Pfa) and signal to noise ratio (SNR). In
particular, the example calculates the performance of the detector using Monte-Carlo simulations and
verifies the results of the metrics with the receiver operating characteristic (ROC) curves.
There are two SNR values we encounter in detecting a signal. The first one is the SNR of a single data
sample. This is the SNR value appeared in a ROC curve plot. A point on ROC gives the required single
sample SNR necessary to achieve the corresponding Pd and Pfa. However, it is NOT the SNR threshold
used for detection. Using the Neyman-Pearson decision rule, the SNR threshold, the second SNR value
we see in the detection, is determined by the noise distribution and the desired Pfa level. Therefore, such
an SNR threshold indeed corresponds to the Pfa axis in a ROC curve. If we fix the SNR of a single
sample, as depicted in the above ROC curve plots, each point on the curve will correspond to a Pfavalue,
which in digression translates to an snr threshold value. using this particular snr threshold to perform the
detection will then result in the corresponding Pd.
Note that an SNR threshold may not be the threshold used directly in the actual detector. The actual
detector normally uses an easy to compute sufficient statistic quantity to perform the detection. Thus, the
true threshold has to be derived from the aforementioned SNR threshold accordingly so that it is
consistent with the choice of sufficient statistics.
This example performs the detection using only one received signal sample. Hence, the resulting Pd is
fairly low and there is no processing gain achieved by the matched filter. To improve Pd and to take
advantage of the processing gain of the matched filter, we can use multiple samples, or even multiple
pulses, of the received signal. For more information about how to detect a signal using multiple samples
or pulses, please refer to the example Signal Detection Using Multiple Samples.

Das könnte Ihnen auch gefallen