Fiber-Bundle Based Receiver

Transcription

Fiber-Bundle Based Receiver
THE UNIVERSITY OF TULSA
THE GRADUATE SCHOOL
ENHANCING FSO LINK PERFORMANCE IN ADVERSE CONDITIONS USING A
FIBER-BUNDLE BASED RECEIVER DESIGN
by
Nathan F. Hutchins
A thesis submitted in partial fulfillment of
the requirements for the degree of Masters of Science
in the Discipline of Electrical Engineering
The Graduate School
The University of Tulsa
2015
COPYRIGHT STATEMENT
Copyright © 2015 by Nathan F. Hutchins
All rights reserved. No part of this publication may be reproduced, stored in a
retrieval system, or transmitted, in any form or by any means (electronic, mechanical,
photocopying, recording, or otherwise) without the prior written permission of the author.
iii
ABSTRACT
Nathan F. Hutchins (Master of Science in Electrical Engineering),
Enhancing FSO Link Performance in Adverse Conditions using a Fiber-Bundle Based
Receiver Design
Directed by Dr. Peter LoPresti
(100 words)
Redesigning the optical receiver is a necessary step in creating more reliable freespace optical mobile communication. The receiver design investigated in this research
consists of a fiber bundle based receiver that allows for better optical communication in
turbulent conditions by using an array of small powerful lenses to capture light. These
lenses allow signals to be collected that would be lost to a standard receiver. Through
experimentation, it was concluded that the bundle based receiver design collected at least
ten times more signal power in all levels of turbulence for 850nm, 1310nm, and 1550nm
wavelengths compared to the standard receiver.
iv
ACKNOWLEDGEMENTS
I would like to thank Dr. LoPresti for all the help he has given me over these
years and guiding my research till completion.
I would also like to thank Dr. Ashenayi and Dr. Holmstrom for serving on my
committee.
v
TABLE OF CONTENTS
COPYRIGHT STATEMENT ....................................................................................
iii
ABSTRACT...............................................................................................................
iv
ACKNOWLEDGEMENTS .......................................................................................
v
TABLE OF CONTENTS ...........................................................................................
vi
LIST OF FIGURES ...................................................................................................
vii
LIST OF TABLES .....................................................................................................
ix
CHAPTER 1 INTRODUCTION.........................................................................
1.1 Project Overview.......................................................................................
1.2 Summary of the Problem .........................................................................
1.3 Prior Relative Work .................................................................................
1.4 Thesis Objective ........................................................................................
1
1
2
2
3
CHAPTER 2 BACKGROUND ...........................................................................
2.1 Basic Theory ..............................................................................................
2.2 The Problem with Turbulence .................................................................
2.3 Bundle-Based Receiver Design ................................................................
2.4 Kolmogorov, Rytov, and Cn2 ....................................................................
4
4
6
9
12
CHAPTER 3 EXPERIMENTATION ................................................................
3.1 Experimental Setup ..................................................................................
3.2 Data Analysis ............................................................................................
15
15
22
CHAPTER 4 CONCLUSIONS AND FUTURE WORK ..................................
4.1 Conclusions ................................................................................................
4.2 Future Work ..............................................................................................
35
35
36
REFERENCES ..........................................................................................................
37
APPENDIX A MATLAB CODE ..........................................................................
38
vi
LIST OF FIGURES
2.1 Standard Optical Receiver ...................................................................................
4
2.2 Standard Optical Receiver ...................................................................................
5
2.3 Standard Optical Receiver with Beam Alignment Device ..................................
5
2.4 Beam Misalignment on Standard Receiver..........................................................
7
2.5 Graph of Reference Laser Signal .........................................................................
8
2.6 Beam Scattering Due to Turbulence on Standard Receiver.................................
9
2.7 Fiber-Bundle Based Receiver Design ..................................................................
10
2.8 Calumniating Transmitter Design with Linear Fiber Array ................................
10
2.9 Short Focal Length Lens used to tie the Signal to the Fiber Bundle ...................
11
2.10 Ray Diagram of Bundle Receiver ......................................................................
12
3.1 Flow Chart and Diagram of Experimentation ......................................................
15
3.2 Function Generator and Pseudo-Random Bit Generator .....................................
16
3.3 Electrical-Optical Converters and Amplifiers .....................................................
17
3.4 Linear Fiber Array Transmitter. Alignment laser in background. .......................
17
3.5 Turbulence Box with Glass Sides and Hot Plate Inside ......................................
18
3.6 Fiber Based Receiver, Front View .......................................................................
19
3.7 Fiber Based Receiver, Side View ........................................................................
20
3.8 Oscilloscope Display, Channel 1 is the Reference laser, Channel 2 is the
Transmitted Signal, and Channel 4 is the Received signal ..................................
21
3.9 National Instruments Machine used to Record and Save
Transmitted/Received data and Values for Reference Laser ...............................
21
vii
3.10 Screenshot of National Interment’s Signal Acquisition Software after
Recording ..........................................................................................................
22
3.11 Oscilloscope Graph of Bundle Receiver Low Turbulence ................................
25
3.12 Oscilloscope Graph of Bundle Receiver High Turbulence................................
25
3.13 Oscilloscope Graph of Standard Receiver Low Turbulence..............................
26
3.14 Oscilloscope Graph of Standard Receiver High Turbulence .............................
26
3.15 MATLAB Plot 850nm Received Signal on Standard Receiver Low
Turbulence ........................................................................................................
27
3.16 MATLAB Plot 850nm Received Signal on Standard Receiver High
Turbulence ........................................................................................................
27
3.17 MATLAB Plot 1550nm Received Signal on Bundle Receiver Low
Turbulence ..........................................................................................................
28
3.18 MATLAB Plot 1550nm Received Signal on Bundle Receiver High
Turbulence ........................................................................................................
28
3.19 Graph of Cn2 (written as Cn^2 in the plotting program) for the Zeros for the
1310nm Laser, Cn^2_0 is the Bundle Receiver, Cn^2_0_STD is the
Standard Receiver...............................................................................................
29
3.20 Graph of Cn2 for the Ones for the 1310nm Laser, Cn^2_1 is the Bundle
Receiver, Cn^2_1_STD is the Standard
Receiver ......................................
30
3.21 Graph of Cn2 for the Zeros for the 850nm Laser, Cn^2_0 is the Bundle
Receiver, Cn^2_0_STD is the Standard Receiver ............................................
31
3.22 Graph of Cn2 for the Ones for the 850nm Laser, Cn^2_1 is the Bundle
Receiver, Cn^2_1_STD is the Standard Receiver ............................................
31
3.23 Graph of Cn2 for the Zeros for the 1550nm Laser, Cn^2_0 is the Bundle
Receiver, Cn^2_0_STD is the Standard Receiver ............................................
32
3.24 Graph of Cn2 for the Ones for the 1550nm Laser, Cn^2_1 is the Bundle
Receiver, Cn^2_1_STD is the Standard Receiver ............................................
33
3.25 One Scale Graph of Cn2......................................................................................
34
viii
LIST OF TABLES
3.1 Example Output Data Form MATLAB in Excel .................................................
ix
24
CHAPTER 1
INTRODUCTION
1.1 Project Overview
Free space optics is the use of light propagation to communicate without a fiber or
transfer media other than open (free) space. The term free space refers to air, outer space,
atmosphere, or vacuum (i.e. not optical fiber or other waveguide). The technology is
capable of extremely high data rates compared to other wireless forms of communication
but is typically costly and very susceptible to weather, temperature, and atmospheric
changes.
With the increase in the number of mobile platforms and the need for high speed
data communications between them, it is becoming necessary to improve on the current
free space optical system design to make it compatible with the limitations imposed by a
mobile operating environment. In particular, the receiver requires a larger field of view to
reduce the effects of alignment errors; both transmitter and receiver require designs that
use less power, and optical tracking methods are needed to keep the transmitter and
receiver pointed at each other. These modifications would allow mobile high speed
communication through free-space optics to support the high data rates required by
current and future mobile applications.
1
1.2 Summary of the Problem
Air turbulence is a significant issue for free space optical transmission. The
scattering effects of turbulence on the optical beam are irregular and cause deflection of
the beam away from the receiver and changes in the angle of arrival at the receiver,
which cause hotspots and dead spots on receiver’s detector. Hot spots can cause receiver
saturation or blinding, while dead spots cause data to be lost or misinterpreted. The
irregular nature of turbulence, which affects every free-space optical communications
system regardless of the transmission distance, makes the effects difficult to predict and
to counteract. However, the amount of signal degradation due to turbulence can be
reduced through the proposed redesign of a traditional receiver.
1.3 Prior Relative Work
In earlier research, the effects of using different wavelengths for signal
transmission on the operation of the bundle-based receiver under study herein were
investigated. In this research, it was concluded there was minimal effect on receiver
performance as a function of wavelength for 1550 nm and 1310 nm wavelengths.
According to simulations that modeled the communication link, there was also minimal
effect on the performance when using an 850nm wavelength.
2
1.4 Thesis Objective
The goal of this research project is to investigate how a bundle-based receiver design
helps mitigate the effects of turbulence , and by how much, while keeping the size,
weight, and power of the optical receiver as low as possible.
3
CHAPTER 2
BACKGROUND
2.1 Basic Theory
The basic free space optical communication system consists of a transmitter and
receiver. The standard optical transmitter is a telescope that is used to direct the
propagation of light after it exits the optical fiber feeding the transmitter. This
arrangement can be as simple as one lens (Figure 2.1) or as complicated as a large series
of lenses and mirrors.
Figure 2.1 Standard Optical Receiver
The basic optical receiver is usually a series of lenses or mirrors used to gather as
much of the propagated light as possible and funnel it into an optical fiber or an optical
detector (Figure 2.2).
4
Figure 2.2 Standard Optical Receiver
The traditional receiver design can be augmented with a small alignment device,
at the cost of additional weight and power consumption, to slightly increase the field of
view. If the light exits the lens at an angle that would normally cause the light to miss the
detector, the beam steering device can be rotated to redirect the light back onto the
detector surface. This is demonstrated in Figure 2.3.
Figure 2.3 Standard Optical Receiver with Beam Alignment Device
5
This communication pair works well in stationary applications and good weather
conditions with low turbulence. Stationary installations can draw power from the
electrical grid and can typically support large mechanical systems to reduce vibration.
Low turbulence limits the change in angle of arrival to small angles that can still be
captured by the receiver. Difficultly occurs when either one of the pair must be mobile or
when the turbulence becomes large.
2.2 The Problem with Turbulence
One major problem with the traditional receiver in free space optical systems is
misalignment. There are several types of misalignment, which include physical
misalignment and signal misalignment. Physical misalignment is where the transmitter
and receiver are not aligned correctly, so that the transmitted beam does not enter the
center of the receiver and/or enters at a larger angle than the receiver is designed for.
Receivers with and without alignment-aiding devices have a maximum amount of
misalignment that can be corrected. It is possible, as shown in Figure 2.4 below, that the
misalignment too great to allow for correction.
6
Figure 2.4 Beam Misalignment on Standard Receiver
Signal misalignment can be caused by the introduction of turbulence. Deflection
and diffraction by the turbulent air makes the incoming power distribution of the signal
very irregular in time and in space. This can cause hot spots and dead spots on the
detector or can cause the power to miss the detector entirely. Traditional receivers have a
limited range of misalignment that can be corrected, and so the collected power is very
strongly modulated by the turbulence effects.
Turbulence can be defined as the change of refractive index of a material due to
heat, movement, and particulate dispersion in the air. These factors cause pockets, or
eddies, of different refractive index to form, and these eddies can vary in both size and
density of distribution. The value that is typically used to describe the intensity of the
turbulence, and used herein to compare the performance of different receivers, is the
index-of-refraction structure constant, 𝐢𝐢𝑛𝑛2 .This is the numerical value of the amount of
energy contained in the turbulence , which will cause a corresponding negative effect on
the optical signal transmission.
7
Figure 2.5 Graph of Reference Laser Signal
Figure 2.5 shows the variation due to turbulence of a continuous wave reference
laser that was used to measure the turbulence in the laboratory. The blue line shows the
signal of the reference laser as seen by the detector in a cool, non-turbulent laboratory
environment, with a Cn2 of 8.8x10-16 which is one of the lowest recordings observed in
the lab. The red line in the Figure is the signal of the reference laser with a hot, high
turbulence laboratory environment, with a Cn2 of 1.2x10-12, which is over one thousand
times more turbulent than the low turbulence case. This is the real effect on a transmitted
optical signal, and a representation of the effect is shown in Figure 2.6. The turbulence
changes the power distribution and angle of arrival of the signal and causes hot-spots,
which saturate the detector, as well as dead spots and signal misalignment. Since there is
no way to predict how turbulence will affect a signal these changes in the signal collected
by the receiver can lead to fatal errors in a communication system.
8
Turbulence
Figure 2.6 Beam Scattering Due to Turbulence on Standard Receiver
2.3 Bundle-Based Receiver Design
This thesis investigates a fiber bundle based receiver design which allows for a
larger viewing angle, also called the field of view. The creation of a larger viewing angle
will not only help in cases of misalignment but will also help mitigate the effects of
scattering due to turbulence and other airborne interference.
The transmitter design consists of a series of lenses used to collect and recollimate the beam for best transfer of optical power to the electrical receiver. The
bundle-based receiver, through the use of several small lenses, has many points on which
the maximum signal can be incident and thus collected. After the signal is captured by
one of the small lenses the signal is coupled to a corresponding fiber in the fiber bundle
and then collimated using an array of graded index lenses. The collimated signal is then
focused by an aspheric or parabolic lens which is used to focus the signal onto a fiber or
9
photodetector, as shown by Figure 2.7. The parabolic lens reduces aberrations so that the
focal spot is small enough to be entirely collected by the small area of very fast detectors.
Figure 2.7 Fiber-Bundle Based Receiver Design
The use of a linear fiber array in the transmitter design is for some future work
related to tracking. In this research only the middle pair of fibers was used for
transmission (Figure 2.8) to keep light directed at a stationary receiver.
Figure 2.8 Calumniating Transmitter Design with Linear Fiber Array
The design of the fiber bundle-based receiver produces a larger viewing angle by
using several small, very short focal length lenses to channel the input signal into the
receiving fibers, even at large angles of arrival. These powerful lenses can bend or
10
redirect the signal light into the fiber bundle with more consistently for a larger range of
input angles. As shown in Figure 2.9, even if the signal is coming in at a very wide angle
the collecting lenses are strong enough to redirect, or bend, the signal back toward the
central axis of the lens and then be channeled into the fiber bundle fiber. This increase in
the range of arrival angles that can be collected creates the increased field of view.
Another full ray diagram is shown in Figure 2.10. The lens in Figure 2.9 is one of the
3mm focal length lenses shown in Figure 2.10.
Figure 2.9 Short Focal Length Lens used to tie the Signal to the Fiber Bundle
11
Figure 2.10 Ray Diagram of Bundle Receiver
With this design the bundle-based receiver is able to capture more signal power. Another
feature of the receiver is that it has more than one lens for capturing light. Each fiber in
the bundle has its own capturing lens, so as the signal moves off one of the lenses it will
move onto another lens which will collect it, thus maintaining signal strength and
integrity.
2.4 Kolmogorov, Rytov, and Cn2
Atmospheric fluctuations in the refractive index, n, are almost purely caused by small
changes in temperature. Since the variations in pressure and humidity are usually small
enough to be neglected, the well-known Kolmogorov power-law spectrum, defined by
the equation 1 below, can be used to approximate the turbulence [1-4].
𝛷𝛷𝑛𝑛 (πœ…πœ…) = 0.033𝐢𝐢𝑛𝑛2 πœ…πœ… βˆ’11⁄3 , 1�𝐿𝐿 β‰ͺ πœ…πœ… β‰ͺ 1�𝑙𝑙
0
0
12
(1)
Ξ¦n describes the distribution of spatial variations in the refractive index in terms of the
spatial frequency ΞΊ. L0 and l0 are defined as the values of the inertial subrange, and
represent the largest and smallest scales on which the refractive index is expected to vary.
For basic modeling, L0 and l0 are usually assumed to be infinity and zero respectively. In
some cases, it may be necessary to write the Kolmogorov power-law spectrum to include
the effects of the distance of propagation of the wave. This can be written as shown in
equation 2,
𝛷𝛷𝑛𝑛 (πœ…πœ…, 𝑧𝑧) = 0.033𝐢𝐢𝑛𝑛2 (𝑧𝑧)πœ…πœ… βˆ’11⁄3 , (2)
which shows that value of Cn2 is a function of the distance of propagation, and thus
affects the Kolmogorov power-law spectrum as a whole.
Since the Kolmogorov power-law spectrum and the fluctuations in refractive
index are statistically homogeneous, the propagation of the wave can be represented by
the stochastic wave equation
βˆ‡2 𝐸𝐸 + π‘˜π‘˜ 2 𝑛𝑛2 (𝑅𝑅)𝐸𝐸 + 2βˆ‡[𝐸𝐸 βˆ™ βˆ‡ log 𝑛𝑛(𝑅𝑅)] = 0,
(3)
where R is the point in space, n(R) is the index of refraction at R and k is given by
equation 4,
and βˆ‡ is given by equation 5,
π‘˜π‘˜ =
βˆ‚2
2πœ‹πœ‹
πœ†πœ†
,
πœ•πœ•2
(4)
πœ•πœ•2
βˆ‡2 = βˆ‚x2 + πœ•πœ•πœ•πœ• 2 + πœ•πœ•πœ•πœ• 2 .
(5)
For this set of conditions and equations, the covariance function can be used to predict
and calculate the behavior of light propagating through the turbulent air, since the
Kolmogorov power-law spectrum and the stochastic wave equation are both deltacorrelated, meaning they both are continuous and random with time [1-4].
13
When using the Kolmogorov power-law spectrum to study plane waves, the value of
Cn2 can be calculated by using the covariance function of the refractive index. The result
of the calculation is the Rytov variance, which describes the received intensity, and is
given by equation 6,
πœŽπœŽπ‘…π‘…2 = 1.23𝐢𝐢𝑛𝑛2 π‘˜π‘˜
7οΏ½ 11οΏ½
6 𝐿𝐿
6,
(6)
where L is the length of propagation and k is determined by equation 4 [1]. Other
equations for the Rytov variance can be derived for spherical waves and Gaussian beams.
For the experiments conducted as part of this work, the plane wave equation is most
appropriate. This set of equations are considered to be accurate as long as the experiment
can satisfy five simple, but very realistic assumptions
1. Wave backscattering can be neglected
2. Depolarization effects can be neglected
3. The refractive index is delta correlated in the direction of propagation
4. The paraxial approximation will hold
5. The experiments are limited to the use of weak turbulence cases
Since the approximations do hold for the experiments conducted in the laboratory, the
Rytov variance, equation 6, is used in the calculations of the effective turbulence
observed during the experiments that were conducted and are described in chapter 3.
14
CHAPTER 3
EXPERIMENTATION
3.1 Experimental Setup
Figure 3.1 Flow Chart and Diagram of Experimentation
To test the performance of the bundle-based receiver under turbulent conditions, it
is necessary to not only implement successful free space optical communication but also
to recreate turbulence in a repeatable fashion in the laboratory. The overall experimental
setup that accomplishes this is diagramed in the flowchart in Figure 3.1.
For generating the signal, a function generator is used to drive a pseudo-random bit
sequence generator that then drives the optical source. The function generator was
operated at 100 kHz with a 4.8 Vpp square wave and an offset of 2.6 V DC. The square
wave is used as the clock signal for the pseudo-random bit sequence generator which
produces a pseudorandom bit stream that repeats every 248-1 bits. (Figure 3.2).
15
Figure 3.2 Function Generator and Pseudo-Random Bit Generator
The output of the pseudorandom bit sequence generator is connected to an
Electrical-to-Optical (EO) converter, where the electrical signal amplitude modulates an
internal laser source. Three separate EO converters were used (Figure 3.3), which
converted the electrical signal to one of three optical wavelengths 1550nm, 1310nm, or
850nm. The optical signal from the EO converter is coupled by optical fiber to an optical
amplifier to increase the optical signal power. The output of the amplifier is coupled by
another optical fiber to the middle fiber of the transmitter array (Figure 3.4), with the
exception of the 850 nm case for which no amplifier was available.
16
Figure 3.3 Electrical-Optical Converters and Amplifiers
Figure 3.4 Linear Fiber Array Transmitter. Alignment laser is in the background.
After the optical signal exits the transmitter, it travels through a turbulence
simulation box that contains a hot plate and a series of fans (Figure 3.5). This box is used
to create different strengths of turbulence in the laboratory. Increasing the temperature of
17
the hot plate in the box increases the turbulence, which in turn increases the effect of
turbulence on the optical signal that will be detected by the receiver. A 633 nm
alignment/reference laser is used to measure the baseline turbulence in the box for
analysis purposes and to provide a point of comparison for evaluating how the receiver
performs as a function of turbulence. The transmitted signal is then captured by the
receiver and coupled to a detector so the signal can be analyzed. In the experiments that
were conducted, all tests are run on two receivers, one traditional receiver and one
bundle-based receiver.
Figure 3.5 Turbulence Box with Glass Sides and Hot Plate Inside
.
The fiber bundle receiver is constructed using a hexagonal array of small, 3mm
focal length lenses that couple the signal to an array of fibers with a 400 micro meter
18
core. Each fiber in the bundle collects optical power from one lens in the array. The fibers
then transmit the signal to an array of graded index lenses which collimate the signal. The
collimated light is incident on a 25.4 mm diameter aspheric lens with a focal length of
20mm that focuses the signal onto the detector. The aspheric lens is used to achieve a
small enough focal spot to match the small area of the detector, so that the maximum
amount of signal power is coupled to the detector. Figure 3.6 shows the 3mm focal length
collecting lenses at the front of the receiver.
Figure 3.6 Fiber Based Receiver, Front View
The side view in Figure 3.7 shows the actual fiber bundle in the receiver that channels
the signal from the collecting lenses to the parabolic (aspheric) lens and the detector.
19
Figure 3.7 Fiber Based Receiver, Side View
The optical signal collected by the detector is converted into a voltage signal by
the detector, and this voltage signal can be observed on an oscilloscope (Figure 3.8) and
recorded by a National Instruments PIX-1042 (Figure 3.9) running LabVIEW Signal
Express 2012 (Figure 3.10) both of which are connected to the output of the receiver by a
coaxial cable. The PIX-1042 and the LabVIEW software samples the voltage signal at the
rate of 5·106 samples per second (5 MS/s). Once the sampled data has been acquired from
both the signal laser and the reference laser, the LabVIEW software saves the data to a
text file that can be viewed and analyzed in MATLAB.
20
Figure 3.8 Oscilloscope Display, Channel 1 is the Reference laser, Channel 2 is the Transmitted Signal,
and Channel 4 is the Received signal
Figure 3.9 National Instruments Machine used to Record and Save Transmitted/Received Data and Values
for Reference Laser
21
Figure 3.10 Screenshot of National Interment’s Signal Acquisition Software after Recording
Because of the memory limitations of MATLAB and the National Instruments
machine only about 15 seconds of data can be recorded per run. Since the runs were
limited in length, and a sufficiently large volume of data is needed for proper statistical
analysis, several runs were performed at each turbulence setting for each transmitting
wavelength and the results of the data analysis were averaged.
3.2 Data Analysis
After all the data is collected it is analyzed using a MATLAB script which reads
each bit and labels it as a 1 or 0 according to its signal strength relative to the average
22
value of the overall data set. After the data is sorted, the standard deviations of the values
of the 1’s and 0’s were calculated. The standard deviation of the laboratory reference
laser was also calculated and used as the baseline for comparing the quality of the signals
captured by the receivers.
The MATLAB analysis proceeded as follows. The first step was to determine the
mean value of all of the data in the run. This provides a baseline for determining ones or
zeros since the National Instruments machine provides data that has been normalized
with the mean of the incoming signal. From the mean, the script can decide whether or
not the bit was a one or zero. A bit is a one if the value of the bit is above the mean,
while a bit is a zero if the value of the bit is below the mean.
The standard deviation of the reference laser is calculated using the MATLAB
function β€œstd(x)”, which returns a value for the standard deviation based on the data
collected from the detector observing. The value of Cn2 can then be calculated using
equation 7
𝐢𝐢𝑛𝑛2 =
𝜎𝜎2
7
11
1.23βˆ—π‘˜π‘˜ οΏ½6 βˆ—π‘™π‘™ οΏ½6
(7)
which is based on the formula for the Rytov variance (equation 6), assuming weak
turbulence. Note that, since the reference laser was always present, that is, it is always a
one, there was no need to sort between zeros and ones as was needed with the signal
laser. After the data was analyzed by MATLAB it was to Excel to perform averaging and
to plot results.
The wavelengths used in the lab were 633nm for the reference laser, and 850nm,
1310nm, and 1550nm for the signal lasers. The total length from transmitter to receiver
was 1.68 meters, which is the effective length over which the turbulence occurred. Using
23
these values and the information for the standard deviation, Οƒ, the effective Cn2of the path
(box and air) traversed by the signal laser was calculated. An example of the Excel sheet
used for this calculation is shown in table 3.1. The sheet shows the results of several
different experimental runs. The results for each turbulence case for the two different
receivers were compared using the average of all the runs at a given temperature setting
of the hotplate.
Table 3.1 Example Output Data Form MATLAB in Excel
sigma_0
sigma_1
Sigma^2_0
Sigma^2_1
Lambda
L
K
Cn^2_0
Cn^2_1
1550 Box
1.48021E-03
1.87880E-03
2.19102E-06
3.5299E-06
1.55E-06
1.68
4.05E+06
1.34437E-14
2.16588E-14
1550 Box 2
1.51302E-03
1.76703E-03
2.28924E-06
3.12239E-06
1.55E-06
1.68
4.05E+06
1.40463E-14
1.91584E-14
1550 Box 3
1.56786E-03
1.64177E-03
2.45818E-06
2.69542E-06
1.55E-06
1.68
4.05E+06
1.50829E-14
1.65386E-14
1550 Box 4
1.57003E-03
1.76240E-03
2.465E-06
3.10604E-06
1.55E-06
1.68
4.05E+06
1.51247E-14
1.90581E-14
1550 Box 5
1.57394E-03
1.84693E-03
2.4773E-06
3.41113E-06
1.55E-06
1.68
4.05E+06
1.52002E-14
2.09301E-14
1550 Box 6
1.56806E-03
2.06636E-03
2.4588E-06
4.26986E-06
1.55E-06
1.68
4.05E+06
1.50867E-14
2.61991E-14
1550 Low
1.45155E-03
1.97636E-03
2.10701E-06
3.90601E-06
1.55E-06
1.68
4.05E+06
1.29282E-14
2.39665E-14
1550 Low 2
1.47475E-03
2.19843E-03
2.17488E-06
4.83312E-06
1.55E-06
1.68
4.05E+06
1.33446E-14
2.96551E-14
1550 Low 3
1.46706E-03
2.24288E-03
2.15225E-06
5.03053E-06
1.55E-06
1.68
4.05E+06
1.32058E-14
3.08664E-14
1550 Low 4
1.47316E-03
2.32184E-03
2.1702E-06
5.39093E-06
1.55E-06
1.68
4.05E+06
1.33159E-14
3.30777E-14
1550 Low 5
1.46010E-03
2.39198E-03
2.13189E-06
5.72156E-06
1.55E-06
1.68
4.05E+06
1.30808E-14
3.51064E-14
1550 Low 6
1.43883E-03
2.39492E-03
2.07022E-06
5.73564E-06
1.55E-06
1.68
4.05E+06
1.27025E-14
3.51928E-14
1550 med
1.39020E-03
2.30054E-03
1.93265E-06
5.2925E-06
1.55E-06
1.68
4.05E+06
1.18583E-14
3.24738E-14
1550 med 2
1.36573E-03
2.27473E-03
1.86522E-06
5.17438E-06
1.55E-06
1.68
4.05E+06
1.14446E-14
3.1749E-14
1550 med 3
1.35436E-03
2.34360E-03
1.83429E-06
5.49246E-06
1.55E-06
1.68
4.05E+06
1.12548E-14
3.37007E-14
1550 med 4
1.37463E-03
2.31476E-03
1.88961E-06
5.35813E-06
1.55E-06
1.68
4.05E+06
1.15943E-14
3.28764E-14
1550 med 5
1.37300E-03
2.30269E-03
1.88513E-06
5.30238E-06
1.55E-06
1.68
4.05E+06
1.15668E-14
3.25344E-14
1550 med 6
1.34907E-03
2.23500E-03
1.82E-06
4.99522E-06
1.55E-06
1.68
4.05E+06
1.11672E-14
3.06497E-14
1550 High
1.38441E-03
2.00649E-03
1.9166E-06
4.02599E-06
1.55E-06
1.68
4.05E+06
1.17599E-14
2.47027E-14
1550 high 2
1.40042E-03
1.97132E-03
1.96119E-06
3.8861E-06
1.55E-06
1.68
4.05E+06
1.20335E-14
2.38443E-14
1550 High 3
1.38221E-03
1.96113E-03
1.91051E-06
3.84601E-06
1.55E-06
1.68
4.05E+06
1.17225E-14
2.35984E-14
1550 high 4
1.35359E-03
1.93409E-03
1.83221E-06
3.74071E-06
1.55E-06
1.68
4.05E+06
1.12421E-14
2.29523E-14
1550 High 5
1.39842E-03
1.94269E-03
1.95559E-06
3.77405E-06
1.55E-06
1.68
4.05E+06
1.19991E-14
2.31568E-14
1550 high 6
1.36442E-03
2.01899E-03
1.86163E-06
4.07633E-06
1.55E-06
1.68
4.05E+06
1.14226E-14
2.50116E-14
Avg
Avg
1.46641E-14
2.05905E-14
1.30963E-14
3.13108E-14
1.1481E-14
3.23307E-14
1.16966E-14
2.38777E-14
The first column in table 1 shows the six runs that were performed at each
temperature setting and the data is averaged together in the last two columns. The four
temperatures tested were with the hotplate off (Box only run) and the three different
setting of the hotplate low, medium, and high. After taking six runs at every temperature,
Cn2 was averaged for both the ones and zeros and then graphed.
24
Figure 3.11 Oscilloscope Graph of Bundle Receiver Low Turbulence
Figure 3.12 Oscilloscope Graph of Bundle Receiver High Turbulence
Figures 3.11 and 3.12 show captured oscilloscope traces. Channel two(green or
bottom trace) is a sample of the data signal that was sent to the EO converter, and
channel four (pink or middle trace) is a sample of the signal collected by the bundle
25
receiver for the low (3.11) and high (3.12) turbulence cases. Channel one (yellow or top
trace) is output signal from the reference laser detector.
Figure 3.13 Oscilloscope Graph of Standard Receiver Low Turbulence
Figure 3.14 Oscilloscope Graph of Standard Receiver High Turbulence
Figures 3.13 and 3.14 show the same information as Figures 3.11 and 3.12 for the
case of the standard receiver.
26
Figure 3.15 MATLAB Plot 850nm Received Signal on Standard Receiver Low Turbulence
Figure 3.16 MATLAB Plot 850nm Received Signal on Standard Receiver High Turbulence
27
Figure 3.17 MATLAB Plot 1550nm Received Signal on Bundle Receiver Low Turbulence
Figure 3.18 MATLAB Plot 1550nm Received Signal on Bundle Receiver High Turbulence
28
Figures 3.15-3.18 show graphs of the data over a large range of samples produced
using MATLAB. Figures 3.15 and 3.16 are for the standard receiver at 850 nm and
Figures 3.17 and 3.18 are for the bundle-based receiver at 1550 nm. From these Figures it
can be seen how the signal is deformed by the introduction of turbulence in the system. In
particular, in Figures 3.17 and 3.18, it is observed that, at high turbulence, the average
voltage signal for a one (ignoring the spike artifacts from the amplifier) is both smaller
and more variable than the voltage signal for a one when lower turbulence is present.
1.28E-13
1.26E-13
1.24E-13
1.22E-13
1.2E-13
1.18E-13
1.16E-13
1.14E-13
1.12E-13
1.1E-13
3E-15
2.3E-14
4.3E-14
6.3E-14
Cn2
8.3E-14
1.03E-13
2.3E-13
2.2E-13
2.1E-13
2E-13
1.9E-13
1.8E-13
1.7E-13
1.6E-13
1.5E-13
1.4E-13
1.3E-13
1.2E-13
1.23E-13
Cn2 Traditional Rx
Cn2 Bundle Rx
1310nm Cn2 Zeros
Of The Lab
Cn^2_0
Cn^2_0_STD
Figure 3.19 Graph of Cn2 (written as Cn^2 in the plotting program) for the Zeros for the 1310nm Laser,
Cn^2_0 is the Bundle Receiver, Cn^2_0_STD is the Standard Receiver
29
1E-14
3E-14
5E-14
Cn2
7E-14
9E-14
4.3E-13
3.9E-13
3.5E-13
3.1E-13
2.7E-13
2.3E-13
1.9E-13
1.5E-13
1.1E-13 1.3E-13
Cn2 Traditional Rx
Cn2 Bundle Rx
1.8E-13
1.6E-13
1.4E-13
1.2E-13
1E-13
8E-14
6E-14
4E-14
2E-14
0
-1E-14
1310nm Cn2 Ones
Of The Lab
Cn^2_1
Cn^2_1_STD
Figure 3.20 Graph of Cn2 for the Ones for the 1310nm Laser, Cn^2_1 is the Bundle Receiver,
Cn^2_1_STD is the Standard Receiver
Figures 3.19 and 3.20 show the analysis results for the 1310 nm signal laser. In
the Figures, the Cn2 in the box, as measured by the reference laser, is plotted on the
horizontal axis and the effective value of Cn2 for the two receivers (Bundle receiver, Blue,
on the left axis, and Standard receiver, Orange, on the right axis) is plotted as a function
of the box value. The four points in the plot correspond to no turbulence (left-most point)
through high turbulence (right-most point). It can be observed that an increased Cn2 in the
box is directly correlated with the increase of effective Cn2 observed by the standard
receiver for both the sent zeros (Figure 3.19) and ones (Figure 3.20). The difference in the
effective Cn2’s of the standard and bundle receivers is about a factor of 2 for the 1310 nm
laser. That is, looking at average value per run, the Cn2 experienced by the standard
receiver is about twice the value of Cn2 experienced by the bundle receiver.
30
850nm Cn2 Zeros
7E-16
7E-16
6.8E-16
6.9E-16
6.6E-16
6.85E-16
6.4E-16
6.8E-16
6.2E-16
6.75E-16
6E-16
6.7E-16
5.8E-16
6.65E-16
6.6E-16
Cn2 Standard Rx
Cn2 Bundle Rx
6.95E-16
0
5.6E-16
1E-14 2E-14 3E-14 4E-14 5E-14 6E-14 7E-14 8E-14
Cn2 Of The Lab
Cn^2_0
Cn^2_0_STD
Figure 3.21 Graph of Cn2 for the Zeros for the 850nm Laser, Cn^2_0 is the Bundle Receiver,
Cn^2_0_STD is the Standard Receiver
850nm Cn2 Ones
7.3E-16
7.3E-16
7.1E-16
7.25E-16
6.9E-16
7.2E-16
6.7E-16
7.15E-16
6.5E-16
7.1E-16
6.3E-16
7.05E-16
6.1E-16
7E-16
5.9E-16
6.95E-16
5.7E-16
6.9E-16
0
2E-14
4E-14
6E-14
Cn2 Standard Rx
Cn2 Bundle Rx
7.35E-16
5.5E-16
8E-14
Cn2 Of The Lab
Cn^2_1
Cn^2_1_STD
Figure 3.22 Graph of Cn2 for the Ones for the 850nm Laser, Cn^2_1 is the Bundle Receiver,
Cn^2_1_STD is the Standard Receiver
31
Figures 3.21 and 3.22 show the analysis results for the 850 nm signal laser, and
are organized in the same manner as Figures 3.19 and 3.20. As before, it can be observed
that the increased Cn2 in the box is directly correlated to the increase of the effective Cn2
observed by the standard receiver for both the sent zeros (Figure 3.21) and ones (Figure
3.22). The dependence of the effective value of Cn2 on turbulence for the 850 nm
experiment is very similar to that of the 1310 nm experiments with the exception of the
observed behavior at the highest turbulence level. At this point, it is expected that the
signal is moving off one of the collecting lenses and moving onto another collecting lens
in the lens array. This allows the receiver to collect the optical power, just from a
different fiber. Since the standard receiver only has one collecting lens, similar to the
case shown in Figure 2.4, the effective value of Cn2 will continue to rise as turbulence
increases, since the beam from the lens will fail to be directed onto the detector.
1.5E-14
3.9E-14
1.45E-14
3.8E-14
1.4E-14
3.7E-14
1.35E-14
3.6E-14
1.3E-14
3.5E-14
1.25E-14
3.4E-14
1.2E-14
3.3E-14
1.15E-14
1.1E-14
0
5E-14
1E-13
1.5E-13
2E-13
2.5E-13
Cn2 Traditional Rx
Cn2 Bundle Rx
1550nm Cn2 Zeros
3.2E-14
3E-13
Cn2 Of The Lab
Cn^2_0
Cn^2_0_STD
Figure 3.23 Graph of Cn2 for the Zeros for the 1550nm Laser, Cn^2_0 is the Bundle
Receiver, Cn^2_0_STD is the Standard Receiver
32
3.4E-14
3.2E-14
Cn2 Bundle Rx
3E-14
2.8E-14
2.6E-14
2.4E-14
2.2E-14
2E-14
1.8E-14
0
5E-14
1E-13
1.5E-13
Cn2 Of The Lab
Cn^2_1
2E-13
2.5E-13
1.88E-13
1.86E-13
1.84E-13
1.82E-13
1.8E-13
1.78E-13
1.76E-13
1.74E-13
1.72E-13
1.7E-13
3E-13
Cn2 Traditional Rx
1550nm Cn2 Ones
Cn^2_1_STD
Figure 3.24 Graph of Cn2 for the Ones for the 1550nm Laser, Cn^2_1 is the Bundle Receiver,
Cn^2_1_STD is the Standard Receiver
Figures 3.23 and 3.24 show the analysis results obtained for the 1550 nm signal laser.
These plots show similar behavior to the previous plots, where the effective Cn2 is on the
order of ten times lower for the bundle receiver compared to the standard receiver, as
shown quite distinctly in Figure 3.25. In Figure 3.24 the same effect on the effective Cn2
is observed as in Figures 3.20 and 3.22, where at high turbulence the movement of the
signal power onto other lenses of the bundle can again be observed.
33
Cn2 Rx
2.2E-13
2E-13
1.8E-13
1.6E-13
1.4E-13
1.2E-13
1E-13
8E-14
6E-14
4E-14
2E-14
0
1550nm Cn2 Ones
0
5E-14
1E-13
Cn2
1.5E-13
2E-13
2.5E-13
3E-13
Of The Lab
Cn^2_1
Cn^2_1_STD
Figure 3.25 One Scale Graph of Cn2
In summary, the analysis results shown in the graphs not only show that the
bundle receiver has, on average, a lower value of effective value of Cn2 than a standard
receiver, but it also has the effect of reducing the effective value of Cn2 by a small
amount, as the bundle-based receiver possesses more lenses onto which the optical power
can fall and be collected.. As the signal drifts off one lens due to turbulence it drifts onto
another lens and is again collected, which reduces the effective Cn2 value since signal
integrity is maintained.
34
CHAPTER 4
CONCLUSIONS AND FUTURE WORK
4.1 Conclusions
In this thesis, two different free space optical receiver designs were compared, the
standard design and the bundle-based design, to determine whether or not the bundlebased design provided any advantage over the standard design for operation under
turbulent conditions. After experimental analysis was performed, it was found that the
bundle-based design reduces the effective value of Cn2 in most of the cases tested, which
demonstrates its ability to reduce the effect of turbulence on a free space optical signal.
This is an important result, as the receiver design will help to improve and expand the use
of free space optical communication in mobile and high turbulence applications.
4.2 Future Work
Moving forward there are a few steps that need to be taken to improve the overall
understanding and performance of the new system. First, increase the core diameter of
the fibers used in the bundle from 400ΞΌm to 600ΞΌm. It is expected that the larger core
will allow the receiver to collect light from a wider range of arrival angles and thus
provide greater ability to collect significant optical power even when strong turbulence is
present.
35
Second, simulations are currently being created that aim to predict the behavior of
the receiver for the case of weak turbulence. These simulations require more work before
they can be considered correct and complete. Successful simulations will not only
increase understanding of the behaviors but also allow discovery and application of
design rules for different cases.
Third, it is necessary to investigate the use of the fiber bundle-based receiver in
mobile applications; the addition of movement increases the signal degradation of free
space optical communication and requires that optical tracking must be investigated and
implemented in conjunction with the fiber bundle receiver design. The transmitter, using
all of the fibers in the transmitting array, may be used to track a moving receiver by
employing an optical switch to change between the fibers along the linear fiber array,
which will deflect the beam from side-to-side and would allow the transmitter beam to
track the receiver’s movements without complicated electronics or large and heavy
mechanical systems such as gimbals.
36
REFERENCES
1. J. D. Schmidt, β€œNumerical Simulation of Optical Wave Propagation,”
Bellingham, WA SPIE Press, 2010.
2. E. Hecht, β€œOptics,” 4th ed. San Francisco, CA Person, 2002.
3. L. C. Andrews and R. L. Phillips, β€œLaser Beam Propagation through Random
Media,” 2nd ed. Bellingham, WA SPIE Press, 2005.
4. F. L. Pedrotti and L. S. Pedrotti, β€œIntroduction to Optics,” 2nd ed. Englewood
Cliffs, NJ. Prentice Hall, 1993.
5. N. F. Hutchins et al. β€œWavelength Dependence of a Fiber-Bundle Based FSO
Link,” in IEEE Globecom, 2014 © IEEE. IEEE catalog number CFP1400E-USB.
ISBN 978-1-4799-7701-7.
6. L. C. Andrews et al. β€œLaser Beam Scintillation with Applications,” Bellingham,
WA SPIE Press, 2001.
37
APPENDEX A
MATLAB CODE
001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020
021
022
023
024
025
026
027
028
029
030
031
032
033
034
035
036
037
038
039
040
041
042
043
044
045
clc
p=9;
x=dataset;
for n=1500 %% determine the bit start
if abs(x(n)-x(n+1))>.8*mean(x)&&abs(x(n+1)-x(n+2))<1*mean(x)
p=n+1;
break
end
end
r=x(pend); %%%% p is the bit starting point
thri=mean(r);
% up_trans=0;
count_level_1=0;% counting samples of level 1
% dwn_trans=0;
count_level_0=0;% counting samples of level 0
m=0;
h=0;
q=0;
cnt_1=0;
l=0;
cnt_0=0;
for i=1length(r)
if r(i)>thri
cnt_0=0;
count_level_1=count_level_1+1;% counting samples of level 1
m=m+1;
data_level_1(m)=r(i);
index_data_level_1(m)=i;
cnt_1=cnt_1+1;% counter for counting the # of samples at every continues Nr of level_1
%sampling in the middle of eye opening
if (mod((cnt_1-5),50)==0)
h=h+1;
data_1(h)=r(i);
g(h)=i;%
end
%%%%%%
else
%
%
%
data_1=Level_1(m-cnt_1+1m);
%
%
cnt_1=0;
count_level_0=count_level_0+1;% counting samples of level 0
l=l+1;
data_level_0(l)=r(i);
38
046
047
048
049
050
051
052
053
054
055
056
057
058
059
060
061
062
063
064
065
066
067
068
069
070
071
072
073
074
075
076
077
078
079
080
081
082
083
084
085
086
087
088
089
090
091
092
093
094
095
096
097
098
099
100
101
index_data_level_0(l)=i;
cnt_0=cnt_0+1;
if (mod((cnt_0-5),50)==0)
q=q+1;
data_0(q)=r(i);
t(q)=i;
end
end
end
Nr_1=length(data_level_1);% #of bits of level 1
Nr_0=length(data_level_0);% #of bits of level 0
max_level_1=max(data_level_1);
min_level_1=min(data_level_1);
max_level_0=max(data_level_0);
min_level_0=min(data_level_0);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
I_1=mean(data_level_1);
I_0=mean(data_level_0);
sigma_1=std(data_level_1);
sigma_0=std(data_level_0);
%%% optimum threshold for all samples(10)included in 1 bit
I_D = ((sigma_0 * I_1) + (sigma_1*I_0))/(sigma_0 + sigma_1);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %%%%remove the DC level
% r=r-I_D;
% data_level_1= data_level_1-I_D;
% data_level_0= data_level_0-I_D;
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%plots
rrr=r(1500);
figure(3)
plot(r)
xlim([1 500])
figure(4)
subplot(1,2,1)
hist(data_level_1,length(data_level_1))
set(get(gca,'child'),'FaceColor','r','EdgeColor','r');
ylabel('No. of occurrence')
title('pdf of received samples of level 1 bit ')
subplot(1,2,2)
hist(data_level_0,length(data_level_0))
set(get(gca,'child'),'FaceColor','b','EdgeColor','b');
ylabel('No. of occurrence')
title('pdf of received samples of level 0 bit ')
%Normalising the pdf of 1 and 0 levels so the integration leads to 1
[n_1,X_out1]=hist(data_1,length(data_1));
%n_1=n_1./sum(n_1.*X_out1);
n_1=n_1./sum(n_1);
%mean_1=sum(X_out1.*n_1);%expected value of bit 1
mean_1=mean(data_1);%expected value of bit 1
39
102 max_data_1=max(data_1);
103 min_data_1=min(data_1);
104 [n_0,X_out0]=hist(data_0,length(data_0));
105 %n_0=-n_0./sum(n_0.*X_out0);
106 n_0=n_0./sum(n_0);
107 %mean_0=sum(X_out0.*n_0);%expected value of bit 0
108 mean_0=mean(data_0);%expected value of bit 0
109 max_data_0=max(data_0);
110 min_data_0=min(data_0);
111 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
112 figure(5)
113 subplot(1,2,1)
114 hist(data_1,length(data_1))
115 set(get(gca,'child'),'FaceColor','r','EdgeColor','r');
116 ylabel('No. of occurrence')
117 title('pdf of received bits of level 1')
118 subplot(1,2,2)
119 hist(data_0,length(data_0))
120 set(get(gca,'child'),'FaceColor','b','EdgeColor','b');
121 ylabel('No. of occurrence')
122 title('pdf of received bits of level 0 ')
123 N_1=length(data_1);
124 N_0=length(data_0);
125 % optimum Threshold
126 I_D_data=((std(data_0)*mean_1)+(std(data_1)*mean_0))/(std(data_0)+std(data_1));
127 rv=mean(data_1.^2)/mean(data_1)^2-1;% Rytov_var=mean(data_1.^2)/mean(data_1)^2-1
128 Q=(mean(data_1)-mean(data_0))/(std(data_1)+std(data_0));% Q-factor
129 Ber_op=(1/2)*erfc(Q/sqrt(2));
130 % for sampling in the middle of eye opening using Q_factor
131 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
132 figure(6)
133 subplot(1,2,1)
134 bar(X_out1,n_1)
135 set(get(gca,'child'),'FaceColor','r','EdgeColor','r');
136 ylabel('No. of occurrence')
137 title('pdf of received bits of level 1')
138 subplot(1,2,2)
139 bar(X_out0,n_0)
140 set(get(gca,'child'),'FaceColor','b','EdgeColor','b');
141 ylabel('No. of occurrence')
142 title('pdf of received bits of level 0 ')
143 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
144 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
145 %%%%%%%Calculating BER from pdf of 1 level and 0 level for sampling in
146 %%%%%%%middle of opening eye
147 %th=0;%%%%modified it latter
148 th=I_D_data;
149 [i]=find(X_out1<th);
150 v_1=X_out1(i);%bit values that is small than threshold
151 nn_1=n_1(i);% Nr of occurrences these bits
152 [j]=find(X_out0>th);
153 v_0=X_out0(j);
154 nn_0=n_0(j);
155 %% Calculating BER according to the Pdf integrations.
156 ber=(N_1/(N_1+N_0))*abs((sum(nn_1)))+(N_0/(N_1+N_0))*(sum(nn_0));
157 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
40
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
%%%%%%calculating Cn^2
lamda=1.55e-6;
k=(2*pi/lamda)^(7/6);
l=(3.05)^11/6;
Cn_sq=rv/(1.23*k*l);% Cn_sq=rv/(1.23 k^7/6 Lp^11/6);k=2*pi/lamda ; Lp=3.05m
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%curve fitting.
I=X_out1(1)X_out1(2)-X_out1(1)X_out1(end);
I0=mean_1;%% the singal without turbulence
a=1/(sqrt(2*pi*rv));
b=(log(I/I0)-rv/2).^2;
y_wt=exp(-b/(2*rv))./(a*I);
figure(7)
%plot( I,y_wt,'c')
plot( I,1e-3.*y_wt,'c')%1e-3 just for normalization
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%Normalizing the pdf for including 10 samps and plot the pdf
[n_level_1,X_out_level_1]=hist(data_level_1,length(data_level_1));
%n_1=n_1./sum(n_level_1.*X_out_level_1);
n_level_1=n_level_1./sum(n_level_1);
%mean_level_1=sum(X_out_level_1.*n_level_1);%expected value of bit 1 including 10 samps
mean_level_1=mean(data_level_1);%expected value of bit 1 including 10 samps
[n_level_0,X_out_level_0]=hist(data_level_0,length(data_level_0));
%n_0=-n_0./sum(n_level_0.*X_out_level_0);
n_level_0=n_level_0./sum(n_level_0);
%mean_level_0=sum(X_out_level_0.*n_level_0);%expected value of bit 0 including 10 samps
mean_level_0=mean(data_level_0);%expected value of bit 0 including 10 samps
th=I_D;
[i]=find(X_out_level_1<th);
v_level_1=X_out_level_1(i);%bit values that is small than threshold
nn_level_1=n_level_1(i);% Nr of occurrences these bits
[j]=find(X_out_level_0>th);
v_level_0=X_out_level_0(j);
nn_level_0=n_level_0(j);
%% Calculating BER according to the Pdf integrations.
ber_level=(Nr_1/(Nr_1+Nr_0))*abs((sum(nn_level_1)))+(Nr_0/(Nr_1+Nr_0))*(sum(nn_level_0));
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
figure(10)%%%%%%%%%%%after normalization
subplot(1,2,1)
bar(X_out_level_1,n_level_1)
set(get(gca,'child'),'FaceColor','r','EdgeColor','r');
ylabel('No. of occurrence for including 10 samps in bit')
title('pdf of received bits of level 1')
subplot(1,2,2)
bar(X_out_level_0,n_level_0)
set(get(gca,'child'),'FaceColor','b','EdgeColor','b');
ylabel('No. of occurrence for including 10 samps in bit')
title('pdf of received bits of level 0 ')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
41