Design and Development of an

Inexpensive Acoustic Underwater
Communications and Control System
Technical Project pursuant to the M.S. Ocean Engineering degree requirements
Florida Institute of Technology – Spring 2014
John Claus

1

1 CONTENTS
2

Preface .................................................................................................................................................. 4

3

Introduction .......................................................................................................................................... 4

4

Underwater Acoustics History [3] ......................................................................................................... 8

5

Acoustic Communications Design Considerations .............................................................................. 11

6

7

5.1

Frequency Attenuation ............................................................................................................... 11

5.2

Doppler shift ............................................................................................................................... 12

5.3

Multi-path ................................................................................................................................... 14

Signal Processing ................................................................................................................................. 16
6.1

Fourier Transform ....................................................................................................................... 16

6.2

Discrete Fourier Transform (DFT) ............................................................................................... 19

6.3

Fast Fourier Transform (FFT) ....................................................................................................... 21

Project Design ..................................................................................................................................... 22
7.1

Theory ......................................................................................................................................... 22

7.1.1

Motivation........................................................................................................................... 22

7.1.2

Combinatorics ..................................................................................................................... 23

7.2

Initial System Design ................................................................................................................... 25

7.2.1

Hardware............................................................................................................................. 25

7.2.2

Software .............................................................................................................................. 26

7.3

Improved System Design ............................................................................................................ 28

7.3.1

Hardware............................................................................................................................. 28

7.3.2

Software .............................................................................................................................. 31

8

References .......................................................................................................................................... 38

9

Appendices .......................................................................................................................................... 39
9.1

Python Code ................................................................................................................................ 39

9.1.1

Shared Main ........................................................................................................................ 39

9.1.2

Laptop Main ........................................................................................................................ 40

9.1.3

Raspberry Pi Main ............................................................................................................... 41

9.1.4

freq_map function .............................................................................................................. 42

9.1.5

synthComplex function ....................................................................................................... 43

9.1.6

convert_freq function ......................................................................................................... 44

9.1.7

test_array function ............................................................................................................. 45

2

9.1.8

playback function ................................................................................................................ 46

9.1.9

file_to_wave function ......................................................................................................... 47

9.1.10

file_to_freq_array function................................................................................................. 47

9.1.11

clean_freq function ............................................................................................................. 48

9.1.12

convert_to_map function ................................................................................................... 49

9.1.13

command_arduino function ............................................................................................... 50

9.2

Arduino Code .............................................................................................................................. 50

9.2.1

Receiver............................................................................................................................... 50

9.2.2

Transmitter ......................................................................................................................... 56

9.2.3

FFT Library ........................................................................................................................... 67

9.3

Permutation Matrix .................................................................................................................... 75

9.4

LabView Virtual Instrument ........................................................................................................ 80

3

2 PREFACE
This project incorporates the material and academic topics covered in the majority of
my coursework here at the Florida Institute of Technology. Much of the signal processing
algorithms, specifically with DFTs, were covered in Digital Signal Processing I (ECE 5245) The
design of the frequency mapping algorithm was accomplished by using techniques learned in
Combinatorics / Graph Theory (MTH 5050). The Arduino software and hardware
implementation methodologies were covered extensively in Mechatronics (MAE 5316). The
control software was developed as a result of ample programming in a Python environment in
Artificial Intelligence/Robotics (CSE 5694). The underwater acoustic design considerations were
a direct result from coursework in Hydroacoustics (OCE 4545). The methodologies for the
design and development of the LabView signal processing software was cultivated in
Instrumentation Design and Scientific Measurement (MAE 5318) and the overall system design
incorporated techniques from Control Systems (MAE 4014). This technical project also reflects
the multi-disciplinary approach that I took to pursue my M.S. in Ocean Engineering by
incorporating aspects from Electrical Engineering, Mechanical Engineering, Computer Science,
and Ocean Engineering.

3 INTRODUCTION
The initial purpose of this technical project was to improve a personal understanding of
both the current communications methods and protocols used in modern acoustic modems as
well as develop a reliable and inexpensive system using off the shelf electronics,
microcontrollers, and single board computers. Acoustic communications are the predominant
method used today for the transfer of data underwater. There are a wide number of
applications such as underwater instrumentation monitoring, controlling and communicating
with various underwater robotic systems such as Remotely Operated Vehicles (ROVs) and
Autonomous Underwater Vehicles (AUVs), and submerged equipment recovery. Currently,
there is a great deal of research into developing a new infrastructure of underwater sensors
networks that communicate oceanographic information in near real time. These networks will

4

the end product of this Technical Project was to develop and design an underwater communications device that could be interfaced with such a system by using Atmel microcontrollers.allow for quicker detection and analysis of pollution data. inexpensive. The project did provide insight into a novel means by which an inexpensive command and control network could be implemented for subsea systems where valves. tsunami prediction. though reliable in its broadcast and reception. was not sufficiently fast enough to merit its use over traditional acoustic modem methodologies for large scale data transfers. and meteorological information. and 5 . [1] A compact. the implemented communication protocol which I developed. switching devices. and a Laptop computer with LabView as seen in Figure 1. a Raspberry Pi single board computer. Initially. actuators. and reliable device that can communicate acoustically to buoys and other equipment that are interfaced with satellite communication systems would be highly desirable for the creation of this network inexpensively. inflation bags. However.

Most Radio Wave (RF) frequencies are completely absorbed by water within only a few meters. [2] √ 6 . σ. in decibels per meter for water is related to the square root of the frequency.data collections systems can be controlled from the surface via laptop connected to a hydrophone and underwater speaker. α. as can be seen in Figure 2. There is a logarithmic relationship. of RF attenuation in seawater. The resulting electric field. in hertz [Hz] multiplied by the conductivity of the water. in Siemens per meter [S/m]. is an exponential function of the attenuation. The attenuation factor. Ex. (See Figure 2) Figure 2: Unidirectional System The preferred medium for wireless communication underwater has been sound due to the highly absorptive properties of seawater with respect to radio waves. f.

Figure 3: Approximate RF Frequency Attenuations in Seawater [2] There are significant challenges with the signal processing of acoustic communications that are distinctly different than that of over the air RF communications. underwater radio systems require high power and extremely long transmitting antennae due to their long wavelengths and are therefore impractical for the majority of underwater communications applications. Secondly. the speed of sound underwater (~1500 m/s) is significantly slower than that of RF energy (~3x10 8 m/s) This slower speed increases the amount of time the data takes to traverse the distance between a transmitter and receiver yielding the information to be near-real time at best. the data transfer rates for current acoustic modems are limited to a maximum of 115kbps. Super Low Frequencies (SLF). and Ultra Low Frequencies (ULF) of the order of 1 to 1000 Hz are the only practical frequencies which can be used for subsea RF communications. As can be seen in the Signal Processing section of this paper. As a result of these losses. there is a much lower maximal frequency range (kHz) with underwater acoustic communications than that of RF (GHz). Resultantly. The slower speed also results in more pronounced effects such as multipath and Doppler shift (see Acoustic Communication Design Considerations) not normally encountered in typical RF communications. This Technical Project investigates these limitations through an independent experimental development of an alternative communications protocol. First of all.One can see that the Extremely Low Frequencies (ELF). Please note that these figures and calculations only account for the primary losses from radio wave attenuation and do not account for other additional losses such as those specific to different fluid densities. this affects the maximum amount of information that can be sent per second. 7 .

An accurate measure of sound velocities underwater was performed through a series of experiments by different scientists throughout the 1800s. In 1820.C. a more formalized mathematical representation of sound propagation could be found in Sir Isaac Newton’s “Philosphiae Naturalis Principia Mathematica.4 UNDERWATER ACOUSTICS HISTORY [3] Underwater acoustic properties have been known by man for over two millennia. Nollet later performed a series of experiments in 1743 that proved sound could indeed travel underwater. Nearly eighteen hundred years later.A.” Building off of the work of Newton. In the mid-300s B. Figure 4: Excerpt from “L’Harmonie Universelle” [4] Sixty years later. Abbé J. Aristotle noted that sound could be heard in water as good as in air. the majority of modern day investigations into the subject have been undertaken in the last two hundred years. Froncois Sulpice Beudant 8 . In the 1620s. This is the first book of record in modern times that was published on the subject of hydroacoustics. Marin Mersenne published “L’Harmonie Universelle” in which he described his experiments with sound and experimental measurements of its speed. However. Leonardo DaVinci observed that ships could be heard at great distances underwater.

Figure 5: Colladon and Stern’s Experimental Setup [5] The wave equation for sound was first formulated by Lord Rayleigh in 1877 in his work “The Theory of Sound. This allowed them to convert electrical energy into compressional sound waves by way of mechanical motion as can be seen in Figure 6. Using this information they were able to calculate that the sound’s velocity underwater in Lake Geneva at 8o C was 1435 m/s. 9 . Throughout the First World War. Advances in this branch of hydroacoustics eventually led to a better understanding of effects of water as medium for sound as well as more robust technologies for the transmission and reception of sound underwater. They were able to create sound using a reversing voltage polarity at a given frequency to cause the piezo crystal to expand and contract at that given frequency.measured the speed of sound in the ocean near Marseilles as being 1500 m/s. the technological development for underwater acoustics focused primarily on submarine and mine detection. and reflection of sound waves underwater. An example of this is the use of the piezoelectric effect to produce sound by sandwiching quartz crystals in between to steel plates in 1917 by Paul Langevin. Another group of men located 10 miles away then measured the difference between the gunpowder flash and the bell’s sound arrival times. absorption. Jean-Daniel Colladon and Charles-Francois Sturn measured the speed of sound across Lake Geneva in 1826 by using an underwater bell and gunpowder. Two men were on a boat where a bell was rang underwater exactly at the same time as gunpowder on the surface was ignited.” This equation would later be instrumental in expanding our knowledge about scattering.

Lichte developed the theory about the refraction of sound due to changes in temperature. Figure 7 illustrates this physical attribute of our oceans used in WWII to locate the position of downed aircraft and ships. low frequency sound waves are able to travel extremely long distance due to the reflections of density variations just above and below it. Research conducted during World War II provided much of the backbone of modern hydroacoustic understanding and equations.Figure 6: Converse Piezoelectric [6] Shortly after the war. and pressure where water is used as a transmission medium. These include the understanding of the relationship between sea state and ambient noise as well as the discovery of the Sound Fixing and Ranging (SOFAR) channel by Maurice Ewing and Joe Worzel in 1944. This was later confirmed in the 1930s with the development of bathythermographs. H. At a depth of approximately 1km. salinity. Figure 7: SOFAR Channel [7] 10 .

Advances in technology continue today. higher frequencies tend to be absorbed at a greater magnitude than that of lower frequencies. 5 ACOUSTIC COMMUNICATIONS DESIGN CONSIDERATIONS 5. In general. This means that different layers of the ocean can attenuate certain frequencies greater than others. Figure 8: Spherical and Cylindrical Spreading Loss [9] 11 . (See Figure 8) This type of loss is frequently modeled as spherical at short distances and cylindrical at long distances because of the relative geometric change once the signal reaches the surface and seafloor.1 FREQUENCY ATTENUATION The attenuation of an acoustic signal in water depends primarily on the frequency of the signal. the density of the medium can vary depending upon the salinity. and temperature of the water. Spreading loss results from the geometric distribution of the compressive mechanical energy from the transmitting source. This is due to the conversion of the mechanical and compressive energy of the acoustic signal into thermal energy by the vibration of the molecules used as a transmission medium. A great deal of research has been devoted to increasing bandwidth and data transfer rates as more advanced subsea devices are put in to use in our oceans. In the case of seawater. Additionally attenuation also occurs from spreading loss. pressure.

5. The calculated attenuation value in conjunction with ambient noise. The spreading loss is modeled with k which equal to 1 if the spreading loss is cylindrical and 2 if it is spherical. present in the medium and the spectral power density. .Both of these losses act in effect as part of the frequency response of the system or medium by which the signal is transmitted over. The device designed in this project uses relatively low frequencies and its primary function is for communications at distances of 500 meters or less. For frequencies under 50 kHz as in this project. a transmitting object that is not moving relative to its receiver has evenly spaced wavelengths over the whole of its geometry. N. SNR. This shift is due to the compression and elongation of waves by a moving object. As can be seen with the example in Figure 9. as can be seen in the following equation [8]: ( ) ⁄ ( ) ( ) These equations are useful in determining a rough estimate of the range of the transmitter given a known power output and spectral density. Variations in density of the ocean at various depths and salinities do not however make it an exact science. Once either the 12 . these attenuated losses ( ) can be expressed using the following equation [8]: ( ) ( ) ( ) Where.2 DOPPLER SHIFT An additional consideration when designing acoustic communication systems is the Doppler shift. S. The transmission distance. Its operating parameters are therefore well within these constraints given acceptable and realistic transmission power requirements. ( ) The absorption coefficient is defined as ( ) where f is frequency. is determine in reference to distance. . of the transmitter is used to determine the signal to noise ratio.

Some subsea systems.transmitter or receiver begins moving away from the other. This shift in observed frequencies can cause communication devices to misinterpret the data received during signal processing. The Doppler shift for a source that is receding is represented mathematically as: ( ) Conversely. This is done by comparing the frequency shift with embedded GPS coordinates in the signal as well as through triangulation using multiple receivers placed strategically on the body of the vehicle. the apparent transmitting frequencies will shift either up or down depending upon the direction of travel. such as Underwater Autonomous Vehicles (UAVs) take advantage of this phenomenon in order to determine their velocity relative to a transmitter. Many acoustic modems today also are able to compensate for this shift through filtering and the use of multiple carrier frequencies. Figure 9: Doppler Shift from a moving transmitter [9] If the relative speed is fast enough. the Doppler shift for source that is approaching is represented: 13 . these evenly spaced waves now become elongated due to the combined velocity of the wave and the relative velocity between the two objects.

as with SOFAR. The first being the reflection of sound on solid objects such as rocks. 14 . The speed at which the sound passes through the medium can make a considerable difference in how much the frequency is shifted. Multipath can arise from two different causes. The other cause of multipath is normally due to the stratifications in the ocean due to density from salinity and temperature. subsea structures. 58 knots) toward a receiver would have a resulting frequency shift to 9. For example. ) is the source frequency. 5. The communications protocol in this project uses a wide selectable frequency separation of 250 Hz or more and filtering to compensate for minor shifts in the observed versus actual transmitted frequency values. [8] Figure 10 represents these multipath changes through these reflections. or the seafloor bottom and usually occurs in shallow water.3 MULTI-PATH Another limitation to underwater data communications is due to a phenomenon called multipath. The device developed in this project was designed for primarily buoy based or anchored seafloor devices communicating with each other or a drifting vessel where a maximum expected relative velocity would be no more than 10 m/s. This layering usually in deep water causes the sound to travel faster in some parts and slower in others. c is the speed of sound in the medium. These additional signal responses can be later misinterpreted by the receiver as signal responses in a different time sequence.8 kHz (c = 1500 m/s).( Where the variables is frequency observed.2 kHz in air (c = 340 m/s) whereas underwater the shift would be to 9. thereby causing the sound to arrive at the receiver at two different times. a 10 kHz source moving at 30 m/s (67mph. and v is the relative velocity between the two objects. Multipath is the result of the acoustic signal taking multiple paths simultaneously from the transmitter and therefore reaching the receiver at different times.

However. f: ( ) ∑ ( ) 15 . the gain of this system decreases linearly with this increased distance as a function of the frequency. affect the speed of the signal and hence the signal’s phase. p. Overcoming these challenges requires the system to compensate for these phase and gain changes by being able to both capture the frequency response of each path and filter out path frequency responses that are asynchronous with the communication signal. changes in density as seen in a deep water environment. at a given frequency.Figure 10: Multipath Signal Distortion [7] The multipath signal in shallow water is normally easier to model due to its uniform density. Milica Stonjanovic quantifies these variations in multipath frequency response and impulse response through the use of the following equations in “Underwater Acoustic Communications: Design Considerations on the Physical Layer” [8]. and are the frequency response and impulse response respectively for each path. It also can affect the gain of the signal differently with no clear linear pattern. The speed of sound remains constant as a result of this uniform density and therefore its time delay is a linear function of sound velocity divided by the total distance traveled. Additionally.

( ) ∑( ) 16 . Joseph Fourier published “Theorie analytique de la chaleur” where he introduced the idea that nearly every function can be described as a summation of sine and cosine functions with different weights and frequencies as seen in the equation below. This conversion was accomplished through the use a Fast Fourier Transform (FFT).( ) The variable ∑ ( ) is the time for the signal to reach the receiver for each path and ( ) is the inverse Fourier transform of ( ). In order to understand an FFT works. For the purposes this project.1 FOURIER TRANSFORM In 1822. 6. one must first understand the Continuous Fourier Transform and its digital version. the Discrete Fourier Transform. This equation is known as the Fourier series [10]. that the system had poor frequency separation at shorter transmit time intervals. therefore a greater number of frequencies were used with a longer transmit time in order to balance the density of data per second. multipath was overcome through longer transmit times. It was determined experimentally. 6 SIGNAL PROCESSING An integral portion of the functionality of this project’s communication protocols required an analysis of the frequency spectrum of an acoustic signal measured in the time domain.

The 17 . For example. one with an inductor. ∫ ( ) ∫ ( ) Normally.This equation can also be modified to describe a periodic function of x over discrete distances – and . ∫ ( ) ∫ ( ) Much of signal processing also involves the complex plane. The Fourier series for the periodic function in time domain therefore come to be: ( ) ∑( ) Where. This is due to primarily to phase shifts that take place on an analog signal as a result of the system’s physical characteristics. periodic signals or waveforms that are analyzed for signal processing are taken over the time domain where ( ) is a function of time rather than some distance x. suppose one were to inject a sine wave voltage into three different circuits: One with a resistor. and one with a capacitor as seen in Figure 11. The measured current of the resistive circuit A would have the same phase as that of the voltage. [10] ( ) ∑( ) Where the coefficients are defined. The sampling window of the periodic function now becomes –t0 to t0.

Figure 11: Phase response of a resistor. The series then takes the form: ( ) ∑ ⁄ Where. ∫ ( ) ⁄ This series represents the time dependent function ( ) as a combination of circles on the complex plane. however. If we want to express those values and find the transformation to the frequency domain we must first identify that the limits or window of the periodic function as defined by t0 can be expressed as a frequency ω0 through the relationship: 18 . of inductive and capacitive circuits B and C would be shifted 90o negatively and positively respectively. inductor. Therefore the ideal Fourier series for use in signal processing is the complex Fourier series where the coefficient sine component is an imaginary number .measured currents. and capacitor [11] This phase shifts are best represented mathematically over the complex plane.

A variation of the Fourier transform. The conversion of these discrete samples over time must be done using a discrete Fourier transform.Through the substitution of cn into the Fourier series with some careful Calculus and Algebra as seen on page 846 Donald A. Discrete amplified analog voltages sampled at regular pre-determined intervals were taken from the microphones and converted into arrays of digital representations. The calculated or measured frequency response of the system. is 19 . This project uses the Fourier Transform to determine the component frequencies of the transmitted signals and also can be used to test the acoustic frequency response of various underwater systems.2 DISCRETE FOURIER TRANSFORM (DFT) One design limitation to this project is the fact that the acoustic signals could not be measured continuously due to the non-continuous nature of digital electronics. or DFT for short. known as the discrete time Fourier transform (DTFT). this gives us a bridge between the time domain and frequency domain of signal which allows one to model the characteristics of the system that signal goes through. can be convolved with the input signal ( ) to find and predict the effects of the system on the output ( ). The LabView Virtual Instrument in this project was developed specifically for the purpose of signal analysis of a given transmitting medium. ( ). 6. Inversely. the Fourier transform can be used to map the time domain function ( ) over the frequency domain: ̂( ) √ ∫ ( ) This mathematical property allows us to solve both ordinary and partial differential equations by analyzing time dependent functions in the frequency domain. For signal processing. These functions in the frequency domain can then be returned time domain through the use of the Inverse Fourier Transform. McQuarrie’s “Mathematical Methods for Scientists and Engineers” [10] we are able to arrive to the inverse Fourier transform: ( ) √ ∫ ̂( ) Where ̂ ( ) is the function of ( ) represented in the frequency domain.

Also it is important to notice that is used instead of for the imaginary. the inverse DFT can be written as: ( ) ∑ ( ) ⁄ The notation of the DFT is often simplified by defining: ⁄ The DFT is typically therefore written: ( ) ∑ ( ) 20 . ( The resulting ( ) ∑ ( ) ) is the representative frequency component of multiple values of ( ). This notation is typical in signal processing and electrical engineering in order to avoid confusion with the current .nearly identical to the Fourier transform with the samples ( ) are mapped over the imaginary plane through summation rather than integration. The device designed in this project only processes discrete windows of N samples and therefore requires the DFT. The DTFT is not practical for this application due to assumption that an infinite or continuous number of samples ( ) will be taken. The DFT is a combination of Fourier transform of a periodic signal and the DTFT [12]: ( ) ∑ ( ) ⁄ Conversely.

The FFT takes advantage of the symmetry in order to minimize the total number of calculations undertaken by the processor. This algorithm splits the captured time domain signal into even and odd indexed terms and then exploits repetitious calculations through a butterfly pattern where at each node a varying twiddle factor W weights the indexed term. Figure 12: Eight point radix-2 decimation in time FFT 21 . a more efficient algorithm is required. For larger processors the speed is sufficient to make these calculations fast enough so that the data is transformed fast enough for hardware integration. This is accomplished through the use of the Fast Fourier Transform (FFT).3 FAST FOURIER TRANSFORM (FFT) The conversion of a time domain based array of samples into an array of magnitudes for a correlating frequency component of the captured signal requires an extensive number of computations by the computer processor when using the DFT. when using a smaller processor on microcontrollers like the Arduino Uno. There are many different FFT algorithms that are in use today. However. The FFT used in this project was an open source FFT that used a decimation-in-time radix-2 algorithm.6.

The receiver would determine the frequencies transmitted through the use of a FFT and then correlate those frequencies to the binary command sequence that was issued by the transmitter through the use of a table.1. Similarly.1 THEORY 7. The device’s eventual intended use is for the wireless control and actuation of various mechatronic devices underwater and/or the collection of data from subsea instrumentation. a four frequency system at 1 kHz. For example.1 Motivation The motivation behind this project and resulting technical report was to design. Below is an example table of command sequences: Table 1: Example system command byte correlation 22 .7 PROJECT DESIGN 7. build. The transmitted chord of frequencies represents a command that is sent to an underwater device. 3 kHz. 2 kHz. if only 1 kHz and 3 kHz signals were transmitted as a chord the resulting binary representation would be 0101. Therefore a four bit four frequency signal would correlate to 15 possible command variations. and 4 kHz would represent a four bit binary number. and test a system that transmits and receives data acoustically through spaced frequencies as chords representing Boolean table values. the resulting binary representation of the signal would be 1111. Should all four frequencies be transmitted as a chord simultaneously.

as will be seen later in this paper. one is only able to transmit twenty frequencies (N=20) with only permutations of no more than three frequencies being combined. the relationship quickly become less clear. Frequency Combinations for each k i k=1 k=2 1 a a 2 b b 3 c c 4 d d 5 ab 6 ac 7 ad 8 bc 9 bd 10 cd 11 12 13 14 15 and index k=3 a b c d ab ac ad bc bd cd abc abd acd bcd value i k=4 a b c d ab ac ad bc bd cd abc abd acd bcd abcd a = freq 1 b = freq 2 c = freq 3 d = freq 4 Table 2: Permutation Example 23 . is a simple calculation of: However if due to hardware limitations. For the sake of simplicity in defining the function that drives this project. a mathematical function describing how these permutations of various combinations could exist needed to be determined. I will take a system where N=4 and step through each increasing k value both graphically and mathematically. the maximum number of variations.7.1.2 Combinatorics In order to design a system that can implement this Boolean to frequency conversion. Notice that this can be extrapolated into higher orders with greater values for N and k. A table of those extrapolations can be seen in the Appendix of this paper. For a simple system with only four possible frequencies (N=4) that can be expressed in any combination (k=N). M.

the maximum number of permutations becomes the summation of all positive integers over N. analyzing a table of calculated M from N and k shows that a clear pattern exists: 2 3 4 5 6 7 8 9 10 1 1 1 1 1 1 1 1 1 1 2 3 3 3 3 3 3 3 3 3 3 6 7 7 7 7 7 7 7 7 Number of Frequencies (N) 4 5 6 10 15 21 14 25 41 15 30 56 15 31 62 15 31 63 15 31 63 15 31 63 15 31 63 15 31 63 7 28 63 98 119 126 127 127 127 127 8 36 92 162 218 246 254 255 255 255 9 45 129 255 381 465 501 510 511 511 10 55 175 385 637 847 967 1012 1022 1023 Table 3: Extrapolated Values for Maximum Variation M The maximum number of permutations can be written as a function of previous maximum permutation values for a system with one less frequency: This relationship between other maximum permutation calculations allows the calculation of larger systems without requiring increased processing time for large nested summations. Now if k is increased to 2. This should be intuitive as only one frequency can be transmitted at a time when k=1.Notice that for a k value of 1. ∑ Increasing k to 3 appears to complicate things even further: ∑∑ Permutation Value (k) However. 24 . the maximum number of permutations is exactly equal to the number of frequencies.

7. Additionally.1 Hardware The initial design of the project involved the use of two Arduino Uno microcontrollers communicating with one another acoustically. four LEDs representing the four distinct digital frequencies were tied to the Arduino in order to give a visual illustration of which frequency or combinations of frequencies were being transmitted. MCP 4725 Figure 13: Initial System Transmit Block Diagram 25 .2.2 INITIAL SYSTEM DESIGN 7. The transmitter for the Arduino used a digital to analog converter (DAC) that was controlled via I2C communications from the Arduino as seen in Figure 13. The output of the DAC was then wired to a self-contained audio amplifier and speaker.

2.The receiver was connected to a self-contained microphone chip as can be seen in Figure 14. 7. the FFT’s performance could be monitored via USB connection using USART serial communications protocols to a stand-alone laptop.2. Additionally. It also had 4 LEDs connected to it so that the frequencies that it had determined to be received could be displayed. The arrays that represented signals with multiple component frequencies were built in Matlab.2 Software 7. Microphone Assembly Figure 14: Initial System Receive Block Diagram This setup was designed to be simple and low cost in order to prove or disprove that it was possible to communicate acoustically between two Arduinos using multiple frequency shift keying. Primarily it was determined that the Arduino was not the correct platform for audio transmission and the microphone assembly was not fully sufficient in measuring sound at any distance greater than one foot. This timer interrupt would only allow for the transmission of a maximum frequency of 4 kHz.1 Transmitter The transmitted waveform for each frequency variation was the result of a hard coded array of voltage values for the DAC to transmit. Improvements to the hardware used were made after these initial experiments for the final design. The arrays 26 .2. The array voltage values were transmitted to the DAC as digital representation at the fastest timer interrupt value possible.

Unfortunately even with these hard-coded arrays.2. The overlaps of spectrums of closely related chords at 3 frequencies caused severe issues for the device in the discernment of the command issued. The software then compared the bins of the desired frequencies to see if their threshold was high enough for it to be a component frequency. Had the output voltage been calculated by using a sine function of the time in the timer interrupt clock with the desired frequency. the timer interrupt would stop.2. The FFT function would be then called and an array of frequency bins would be returned. Once enough array samples were taken. only a limited number of arrays could be stored due to limitations of memory on the Arduino. this system performed extremely poorly due to the distortion from the lagged voltage response of the DAC.were then hardcoded in order to conserve processing power for the I2C communications. Additionally. the processor would have been slowed down considerably. Array of Samples Taken FFT Performed on Array FFT O/P Array Converted into Component Frequencies Figure 15: Arduino Receiver Algorithm This FFT worked great on the Arduino as long as no more than 3 frequencies were combined simultaneously. This voltage level would then be stored as a value in an array. 7. 27 .2 Receiver The receiver software would simply poll the analog input pin at specific timer interrupts in order to measure the voltage level.

The two types of receiving devices to be used in the new system were the PC laptop and the Arduino Uno.3. However.7. These constraints also introduced a more focused purpose and use for this type of underwater acoustic communication system. Most typical off the shelf laptops have microphone and speaker jacks which can be used as analog inputs and outputs for the processing software.3 IMPROVED SYSTEM DESIGN The results of the initial design made it clear that a more powerful and robust platform was required for consistent acoustic outputs.1 Hardware The two platforms chosen to be used as transmitting devices were a typical PC laptop and a Raspberry Pi. it was determined that both a fast enough processor and software capable of creating wave files by modulating the required frequency combinations at any desired sample time would be needed to make this project work. Initially it was presumed that the speed required for the FFT would be the limiting factor. The 28 . 7.

The laptop interface is designed for onshore or shipboard communication with remote subsea devices.Raspberry Pi also comes equipped with an audio output jack for easy integration with an underwater speaker. As can be seen in the software section of this report. The Pi. One application for the laptop is to send a broadcast signal to slave Arduino Uno’s controlling either electronic or electro-mechanical devices such as valves. does not have any analog inputs and therefore requires the integration of an Arduino Uno for bi-directional communication to take place. telecommunication switches. Additionally. The laptop could issue a command for the Pi to transmit the result of the data it has collected over the past week. however. the system has the capability to issue a command to the Pi to transmit various combinations of frequencies in a predictive manner so that the frequency response of the medium in which the communication is taking place can be measured. the Laptop then converts the return acoustic transmission from the Pi into a text file. or actuating inflatable lift bags for subsea instrumentation and equipment. 29 . Laptop Arduino Uno Laptop Laptop Arduino Uno Arduino Uno Arduino Uno Raspberry Pi Figure 16: Applications of System Design Another application for this system is the bidirectional communication with a Raspberry Pi link via USB with an Arduino Uno.

An additional audio amplifier was integrated into the circuit design as can be seen in Figure 17.Figure 17: Receiver Assembly The hardware used for the Arduino receiver has been modified slightly from the initial design. It was determine that the self-contained microphone / amplifier assembly had only a range of 1 to 2 feet away from the transmitter. Figure 18: Schematic of Receiver 30 .

31 .3.2 7. The signal processing of a received signal is done initially through the LabView Virtual Instrument I developed. Figure 19: LabView Virtual Instrument Signal Processing This data is then processed via FFT and the spectral frequencies of the signals are then displayed graphically at the user interface. 7. The instrument records acoustic data taken from the microphone jack on the laptop via a subVI acquired online [14] and coverts it into an array.1 Software Laptop The laptop incorporates the use of two separate programs running simultaneously with one another while sharing a common text file and therefore was designed into two parts.This additional amplifier provided much better range as well as improved frequency discrimination by the FFT.2.3.

2. frequency to byte decoding. and transmitting software. Python also has a vast number of open source libraries for serial communications. and text file to byte conversion.3. byte to frequency encoding.1. At the heart of this system’s design is the encoding.1 Frequency Array Mapping k Calculate Array Size N Map Frequency Tags to Array Figure 21: Frequency Mapping Logic 32 .Figure 20: LabView Virtual Instrument User Interface These values are then further filtered and conditioned into a usable collection of frequencies. The main control software is composed of three parts: frequency array mapping. it is light enough to operate on a Pi with less lag than that of C++. wave file creation and playback. These frequencies are then recorded onto a log file which is then processed by the other software. and array manipulation. 7. decoding. This software was written in Python due to its ease of incorporation into both a PC Windows Operating System and the Linux based Debian Operating System for the Raspberry Pi. Most importantly. construction of wave files.

The mathematical relationships of how the number of possible permutations can be calculated are discussed in the section 8. It is the function that provides a map by which frequencies combinations are attributed to a decimal value. For the purposes of this project only 20 frequencies (N=20) with a maximum combination of 3 (k=3) were used.The frequency array mapping function is the heart to this system. N is total the number desired frequencies to be used in the system and k is maximum number of frequencies that can be combined into one signal. The function builds a map from two inputs which are N and k. N=3 k=1 k=2 k=3 A[0] A[1] A[2] A[3] A[4] A[5] A[6] A[7] 000 000 000 000 000 000 000 003 000 000 000 000 002 003 003 002 000 001 002 003 001 001 002 001 Table 4: Array Values for N=3 and k=3 The frequencies are spaced such that the maximum allowable N value is 999.2 of this paper. The function first determines the maximum number of combinations given N and k and then maps every permutation as an encoded integer value to a decimal index term. a table showing that maximum value for any set of k and N can be seen in the Appendix. 33 .1. Additionally.

Transmit. or frequency to byte decoding and/or text file to byte conversion. These commands are tied to functions that provide byte to frequency encoding and wave file creation and playback.2.1.2 User Interface Figure 22: Command Software User Interface There are four different user interface commands: Test Array.3.1.2.1 Command: Test Array The Test Array command enables to the laptop to send out a signal which methodically steps through every frequency that is pre-defined in the system at every possible permutations of frequency combinations for a given maximum allowable frequencies per chord. and Receive. Arduino.7.2. freq_map function test_array function freq_map array value playback function convert_freq function synthComplex function Figure 23: Frequency Mapping Logic 34 .3. 7.

and therefore the array is relatively small. Once the file in finished being created the program then transmits the . The user input command to the Arduino is then referenced through a series of if statements in the command_arduino function and a representative frequency tag is assigned.1.wav file. The test_array function then loops through the entire array where it converts the index value into a set of frequencies using the convert_freq function. the .3.wav file containing the command. However. The Arduino on the receiving end then receives the data and begins executing the command.1. These frequencies are then composed into a .This is done by first building a mapping array using the freq_map function.2. k =1.2. This frequency is then sent direct to the synthComplex function where it is built into a .3 Command: Transmit 35 .wav file. freq_map function command_arduino function Command to frequency Command synthComplex function playback function Figure 24: Command Arduino Function Logic Again with this function the mapping array is built. 7.2.wav file using the synthComplex function. Once all of the indexed values and associated frequencies have been written to a . 7.wav files are transmitted using the playback function.2.3. The command entered by the user is tied to preset frequency values already programmed into the Arduino which are then transmitted.2 Command: Arduino The Arduino command queries the user for a command to send the Arduino. since the command sequence only sends one frequency at a time.

freq_map function file_to_wave function Read text from the file Convert to decimal Text File Find freq_map value playback function convert_freq function synthComplex function Figure 25: Transmit Command Logic The transmit command also first builds an array of frequency value using the freq_map.1. the playback function is then called in order to transmit the data.3. The incoming acoustic signal should have already been recorded and processed by the Labview software before this command is given.4 Command: Receive This command reads a software specific log file written either by Labview which contains frequency values from a received signal.wav file. references the frequency values for that decimal index. 7.wav file. converts each character into hex then decimal. Once.2. the function has fully converted the document to . The current default setting for this function is N=20 and k=3.2. Labview can 36 . and sends the corresponding frequency values to the synthComplex function where it is converted into a . The file_to_wave function is then called which systematically reads each line of text from the text file.The transmit command is used to convert a text file into a wave file and then transmit to a receiving device.

Although the current system does process the FFT data from the Arduino. These decimals values are then converted back to ASCII and printed out on the user interface.run concurrently with the main program as it only writes to the log file while the signal is being recorded and processed. with the exception that it does not have a user interface.3. It instead sits in an infinite loop awaiting commands from the Arduino via USART serial communications on the USB port.2 Raspberry Pi The software written for the Raspberry Pi is nearly identical to that written for the laptop in Python. This set of frequency values is then sent to the clean_freq function where markers between samples and redundant values within a sample are removed.2. but that configuration would be relatively easy to implement. the Arduino code does have an option to send the Pi the frequencies measured rather than prewritten 37 . This current design does not incorporate the writing of this data directly to a file. file_to_freq_array clean_freq convert_to_map Find freq map value Convert to ASCII Return Characters Figure 26: Receive Command Logic The receive function first calls the file_to_frequency function which opens the file written by Labview and converts it to a set of frequency values. 7. These clean frequencies are then sent to the convert_to_map function where they are correlated to the frequency map array to its representative decimal value.

Web. “Attenuation of Electromagnetic Waves in Seawater. D.p.p.. Minor improvements were also made to the frequency discrimination of the FFT output that allowed for a smoother response to received command transmissions. N. "Signal Processing for Underwater Acoustic Communications. Capacitors and Inductors. n. [5] Colladon." A Level Physics Notes . “Underwater Acoustic Communications: Design Considerations on the Physical Layer." Masoneria En Valencia.Phase Differences Between Current and Voltage for Resistors. Souvenirs et Memoires. 2014.. AubertSchuchardt. Print [8] Stojanovic .. Web. [9] "DOSITS: Cylindrical vs. Colladon.d..d. Kozat. Florida Institute of Technology. 2003.” OCN 5401 Term Paper. 2014.p. n. Print J.p. n. MA [9] "Observation Methods. Web.s. en ve: Impr.p." IEEE Communications Magazine 47.d.Electricity . Daniel. [4] "Masoneria En Valencia. 1893. Souvenirs Et M moires Autobiographie. 2014 [10] McQuarrie. Web. 3 Mar. n. n. Donald A.Phase Differences 38 ." DOSITS: Cylindrical vs. A. N.1 (2009): 90-96. Dec 2012 [3] "DOSITS: History of Underwater Acoustics. Spherical Spreading. N. 1893 [6] "An Introduction to Transducer Crystals. 12 Feb. 15 Jan.” Massachusetts Institute of Technology.c.. 15 Mar. For demonstration purposes the receiving Arduino was set in command mode. CA: University Science. 2014 [2] Claus. Web." An Introduction to Transducer Crystals.d. 8 REFERENCES [1] "Researchers Developing 'Underwater Internet'" PCMAG." DOSITS: History of Underwater Acoustics. 2014. N. Mathematical Methods for Scientists and Engineers.d. 11 Feb. N. 15 Mar. 2014. The software written for the Arduino Uno in the improved system design is nearly identical to the initial system design with the exception of its built in frequency to command conversion functions.commands hard-coded in the Arduino.p.. Albert-Schuchardt. J.k.. Cambridge. [7] Sing." Methods. [11] "A Level Physics Notes . Milica. John. Print. Geneva. Web. N. Sausalito.Electricity . and S.d. n. Spherical Spreading. Nelson.

1. n. 9 APPENDICES 9.. and Ronald W. Discrete-time Signal Processing.Between Current and Voltage for Resistors. London: Prentice-Hall.p. 18 Mar. N.d. 2014.1 Shared Main 39 . 1989. [12] Oppenheim.. Alan V. Print. Capacitors and Inductors. Web. Schafer.1 PYTHON CODE 9.

1.2 Laptop Main 40 .9.

3 Raspberry Pi Main 41 .1.9.

1.4 freq_map function 42 .9.

9.1.5 synthComplex function 43 .

1.6 convert_freq function 44 .9.

7 test_array function 45 .1.9.

9.8 playback function 46 .1.

9 file_to_wave function 9.1.1.9.10 file_to_freq_array function 47 .

11 clean_freq function 48 .9.1.

9.12 convert_to_map function 49 .1.

1. float freq_div = 1000.2 ARDUINO CODE 9. 50 .1 Receiver #include "fix_fft.h" char im[256].2.13 command_arduino function 9. float freq_min = 500.9. int send_freq = 0. int bin = 0. char data[256].

digitalWrite(10. HIGH). LOW). digitalWrite(11.int bin_min. HIGH). } void command2(){ if (send_freq == 0) Serial. int threshold = 5. LOW). digitalWrite(8. digitalWrite(8. HIGH). LOW). LOW). void command1(){ if (send_freq == 0) Serial. digitalWrite(9. digitalWrite(10.println("command1").println("command2"). digitalWrite(9. } void command4(){ 51 . int bin_div. LOW). digitalWrite(10. LOW).println("command3"). digitalWrite(9. } void command3(){ if (send_freq == 0) Serial. int count = 0. LOW). int freq = 0. digitalWrite(11. LOW). digitalWrite(11. LOW). digitalWrite(8.

if (send_freq == 0) Serial.println("command4");
digitalWrite(8, LOW);
digitalWrite(9, LOW);
digitalWrite(10, LOW);
digitalWrite(11, HIGH);
}
void command5(){
if (send_freq == 0) Serial.println("command5");
digitalWrite(8, LOW);
digitalWrite(9, HIGH);
digitalWrite(10, LOW);
digitalWrite(11, HIGH);
}
void command6(){
if (send_freq == 0) Serial.println("command6");
digitalWrite(8, HIGH);
digitalWrite(9, LOW);
digitalWrite(10, LOW);
digitalWrite(11, HIGH);
}
void command7(){
if (send_freq == 0) Serial.println("command7");
digitalWrite(8, LOW);
digitalWrite(9, HIGH);
digitalWrite(10, HIGH);
digitalWrite(11, LOW);
}
void command8(){
if (send_freq == 0) Serial.println("command8");
52

digitalWrite(8, HIGH);
digitalWrite(9, HIGH);
digitalWrite(10, HIGH);
digitalWrite(11, HIGH);
}
void commandoff(){
if (send_freq == 0) Serial.println("commandoff");
digitalWrite(8, LOW);
digitalWrite(9, LOW);
digitalWrite(10, LOW);
digitalWrite(11, LOW);
}

void setup(){
Serial.begin(9600);
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
bin_min = int(((-0.003)*freq_min)+63.5);
bin_div = int(freq_div/333);
Serial.println(bin_min);
Serial.println(bin_div);

}

void loop(){
53

int static i = 0;
static long tt;
int val;
if (millis() > tt){
if (i < 128){
val = analogRead(1)*2 -128;
//Serial.print(val);
//Serial.print(" ");
data[i] = val;
im[i] = 0;
i++;
}
else{
fix_fft(data,im,7,0);
for (i=0; i< 64;i++){
//Serial.print(data[i], DEC);
//Serial.print(" ");
data[i] = sqrt(data[i] * data[i] + im[i] * im[i]);
//if (data[i] > threshold)
//Serial.print(i,DEC);
//Serial.print(data[i], DEC);
//Serial.print(" ");
if (send_freq == 1)
{
if (data[i] > threshold)
freq = int((-333.33*i)+21166.7);
Serial.println(freq);
}
}
54

if (send_freq == 1) Serial.println("###########");

if (data[bin_min] >= threshold) command1();
else if (data[bin_min-(bin_div)] >= threshold)
{
command2();
count = 0;
}
else if (data[bin_min-(2*bin_div)] >= threshold)
{
command3();
count = 0;
}
else if (data[bin_min-(3*bin_div)] >= threshold)
{
command4();
count = 0;
}
else if (data[bin_min-(4*bin_div)] >= threshold)
{
command5();
count = 0;
}
else if (data[bin_min-(5*bin_div)] >= threshold)
{
command6();
count = 0;
}
else if (data[bin_min-(6*bin_div)] >= threshold)
55

} else { count = count + 1.h> #include <Adafruit_MCP4725. if (count > 2) commandoff(). 56 . } else if (data[bin_min-(7*bin_div)] >= threshold) { command8().h> Adafruit_MCP4725 dac.2 Transmitter #include <Wire. int led1 = 8. count = 0.2.{ command7(). int wait = 0. count = 0. } } tt = millis(). int count = 0. int wait_in = 10000. } } 9.

747. 0 }. 0 }. 0. 1582. 1693. 1748. 669. 196. 1670. 2371. 1709. 1220. 1347. 1001. 277 57 . 2009. 920. 1859. 2094. 447. 747. 1582. PROGMEM uint16_t DAC_432[16] = { 1070. int led3 = 10. 2606. 558. 2244. 1393. int n = 1. 985. 2732. int DAC_Command = 1. PROGMEM uint16_t DAC_4321[16] = { 2094. 1393. 1220. int led4 = 11. PROGMEM uint16_t DAC_431[16] = { 1859. 1748. 1944. 392. 2967. 447. 1070. 724. 1393. 946. 1944. 1693.int led2 = 9. 392. 2139. 2139.

669. 1386. 0. 1301. 669. 1647. 1693. 623. 473. 0. 1497. 1693. PROGMEM uint16_t DAC_42[16] = { 985. 1347. 2009. 277. 669. 1301.}. 1748. 1024. 623. 985. 1970. 874. 708. 1970. 946. 39. 2371. 2371. 2521. }. 985. 946. 1024. PROGMEM uint16_t DAC_421[16] = { 2009. 724. 763. 1497. 362. 1040. 0. 277 }. 1647. 946. 316 }. 1859. 1709. 58 . PROGMEM uint16_t DAC_43[16] = { 874. PROGMEM uint16_t DAC_41[16] = { 1497. 1432. 1347. 1024.

1898. 724. 277. 1497. 0. PROGMEM uint16_t DAC_31[16] = { 1386. 0. 0. 874. 362. 1386. 1386. 2410. 1024. 0. 1898. 669. 1024. 946. }. 1748. 1024. 724. 874. 1859. 1386. 1386. 2410.2009. 0 }. 1386. 874. 1024. 59 . 0. 724. 1748. 1135. 362. 724. 0 }. PROGMEM uint16_t DAC_321[16] = { 1898. 874. 1898. 1135. 1386. 0 }. 985. 0. 724. 1898. 874. 724. PROGMEM uint16_t DAC_32[16] = { 874. 724. 0. 1898. 1748. 277. 1748. 724. 1386.

1536. 2048. 0. 0 }. PROGMEM uint16_t DAC_3[8] = { 600. 0. 1024. 1536. 0 }. 1536. 0 }. 1024. 0. 1264. 600. 1024. PROGMEM uint16_t DAC_4[16] = { 2048. 1536. 3495. 1264 }. 1536. PROGMEM uint16_t DAC_1[2] = { 60 . 600. 2831. 2048. PROGMEM uint16_t DAC_2[4] = { 2048. 2831. 4095. 1536. 1536. 3495. 4095. 3495. 3939.PROGMEM uint16_t DAC_21[16] = { 1536. 3939. 156. 156. 4095. 1024. 0. 600. 2048. 3495. 2048.

else if (DAC_Command == 4) wait = 4*wait_in. pinMode(led3. } if (n == 16) n = 0. OUTPUT). pinMode(led4. if (DAC_Command == 15) { 61 . OUTPUT). 0 }. count = count + 1. if (count == wait) { n = n + 1. } void loop(void) { DAC_Command = n. void setup(void) { pinMode(led1. if (DAC_Command == 2) wait = 2*wait_in. else if (DAC_Command == 8) wait = 8*wait_in. pinMode(led2.begin(0x62). dac. uint16_t i. OUTPUT).4095. else wait = wait_in. count = 0. OUTPUT).

HIGH). false). for (i = 0. HIGH). digitalWrite(led4.setVoltage(pgm_read_word(&(DAC_4321[i])). digitalWrite(led2. HIGH). HIGH). digitalWrite(led2. digitalWrite(led3. HIGH).digitalWrite(led1. i < 16. HIGH). false).setVoltage(pgm_read_word(&(DAC_421[i])). digitalWrite(led4. HIGH). i < 16. LOW). HIGH).setVoltage(pgm_read_word(&(DAC_321[i])). i < 16. digitalWrite(led3. i++) { dac. LOW). false). for (i = 0. i++) { dac. 62 . digitalWrite(led4. i++) { dac. digitalWrite(led2. digitalWrite(led3. } } if (DAC_Command == 13) { digitalWrite(led1. } } if (DAC_Command == 14) { digitalWrite(led1. HIGH). for (i = 0. HIGH).

digitalWrite(led3. HIGH). LOW).setVoltage(pgm_read_word(&(DAC_21[i])). 63 . HIGH). LOW). digitalWrite(led2. digitalWrite(led3. HIGH). digitalWrite(led3. LOW). digitalWrite(led4. for (i = 0. for (i = 0. digitalWrite(led2. false). } } if (DAC_Command == 11) { digitalWrite(led1. HIGH). HIGH).} } if (DAC_Command == 12) { digitalWrite(led1. i++) { dac. i < 16. i < 16. digitalWrite(led4. LOW). digitalWrite(led2. HIGH). HIGH). false). } } if (DAC_Command == 10) { digitalWrite(led1. i++) { dac.setVoltage(pgm_read_word(&(DAC_431[i])).

HIGH). for (i = 0. false). LOW). i < 16.setVoltage(pgm_read_word(&(DAC_31[i])). LOW). i++) { dac. digitalWrite(led3. } } if (DAC_Command == 8) { digitalWrite(led1. digitalWrite(led3.setVoltage(pgm_read_word(&(DAC_41[i])). } } if (DAC_Command == 7) 64 . for (i = 0. LOW). HIGH). LOW). i++) { dac. i < 16. HIGH).digitalWrite(led4. } } if (DAC_Command == 9) { digitalWrite(led1. digitalWrite(led4. LOW). digitalWrite(led2. false). digitalWrite(led2. i < 2. for (i = 0. false). LOW). digitalWrite(led4. i++) { dac.setVoltage(pgm_read_word(&(DAC_1[i])).

HIGH). false). HIGH). } } if (DAC_Command == 5) { digitalWrite(led1. digitalWrite(led4. digitalWrite(led3. i++) { 65 . LOW). } } if (DAC_Command == 6) { digitalWrite(led1. false).setVoltage(pgm_read_word(&(DAC_32[i])).{ digitalWrite(led1. i++) { dac. i < 16. digitalWrite(led3. LOW). HIGH). for (i = 0. digitalWrite(led2. i++) { dac. i < 16. for (i = 0. for (i = 0. digitalWrite(led2. LOW). HIGH).setVoltage(pgm_read_word(&(DAC_432[i])). digitalWrite(led3. LOW). HIGH). i < 16. HIGH). digitalWrite(led4. digitalWrite(led2. LOW). digitalWrite(led4. HIGH).

digitalWrite(led2.setVoltage(pgm_read_word(&(DAC_2[i])). digitalWrite(led4. i < 16. false). LOW). HIGH). 66 .setVoltage(pgm_read_word(&(DAC_43[i])). digitalWrite(led4. i++) { dac. HIGH). } } if (DAC_Command == 4) { digitalWrite(led1. HIGH). digitalWrite(led3.setVoltage(pgm_read_word(&(DAC_42[i])). LOW). false). LOW). LOW). for (i = 0. digitalWrite(led2.dac. } } if (DAC_Command == 2) { digitalWrite(led1. LOW). LOW). for (i = 0. digitalWrite(led2. i < 4. false). i++) { dac. } } if (DAC_Command == 3) { digitalWrite(led1. LOW). digitalWrite(led3.

HIGH).2. digitalWrite(led4. false).digitalWrite(led3. dac. i < 8. for (i = 0. LOW).setVoltage(0. digitalWrite(led3. HIGH). digitalWrite(led2. } } else { digitalWrite(led1. LOW). LOW). false). LOW). digitalWrite(led2.setVoltage(pgm_read_word(&(DAC_4[i])). LOW). LOW). } } 9. digitalWrite(led4.setVoltage(pgm_read_word(&(DAC_3[i])). LOW). for (i = 0. i++) { dac. i++) { dac. } } if (DAC_Command == 1) { digitalWrite(led1. digitalWrite(led3.3 FFT Library 67 . digitalWrite(led4. LOW). i < 16. false).

this cannot be done within fixed-point short integers.9.2010 */ #define N_WAVE 256 #define LOG2_N_WAVE 8 /* full length of Sinewave[] */ /* log2(N_WAVE) */ /* Since we only use 3/4 of N_WAVE.e. in order to conserve data space. Thus. the fix_fft() routine performs variable scaling. as the result will be approximately correctly normalized as is. if fix_fft() returns 3.2.h" //#include <WProgram.h> #include "fix_fft.com Enhanced: Dimitrios P. as two 0dB coefficients would sum to a peak amplitude of 64K. Integer arithmetic is used for speed.1 fix_fft. Written by: Tom Roberts 11/8/89 Made portable: Malcolm Slaney 12/15/94 malcolm@interval.cpp #include <avr/pgmspace. For the forward FFT (time -> freq).e.org Modified for 8bit values David Keller 10. and returns a value which is the number of bits LEFT by which the output must be shifted to get the actual amplitude (i. instead of the more natural floating-point. overflowing the 32k range of the fixed-point integers. amplitude = 32767) to two -6dB freq coefficients. the scale_shift can usually be ignored.Fixed-point in-place Fast Fourier Transform */ /* All data are fixed-point short integers. fixed scaling cannot be done. and to map a 0dB sine/cosine wave (i. The return value is always 0.h> /* fix_fft. in which -32768 to +32768 represent -1. In practice. */ 68 . Clearly.c . if the result is to be used as a filter. each value of fr[] and fi[] must be multiplied by 8 (2**3) for proper scaling.10. fixed scaling is performed to prevent arithmetic overflow. we define only this many samples.3. For the inverse FFT (freq -> time).0 respectively. Bouras 14 Jun 2006 dbouras@ieee.0 to +1.

-48. 48. 108. 76. 124. 0. 73. 102. 124. -92. -71. char b) { 69 . -102. 125. -24. 81. 114. -90. 117. 122. */ }. 125. 37. 100. 102. -40. -127. -109. 34. 18. -18. 127. 71. 34. 92. -18. -21. -83. 90. -60. -127. -98. -6. 109. 21. -123. -9. 119. -3. 120. 15. -51. -104. 43. -121. -96. -126. -71. -102. 65. -127. 37. 100. -76. 92. -126. 127. -126. 65. 46. -125. -34. -106. -100. 63. 57. 21. -40. -63. -117. -48. 94. -54. -6. 6. -104. -127. -85. -46. -100. -127. 127. 122. 88. -122. 40. 15. -94. -127. -78. -127. 120. -115. 85. 114. 83. -15. -31. 121. -83. -85. 123. */ inline char FIX_MPY(char a. 94. -124. -68. 73. 24. 109. 31. -28. 119. -65. 108. 96. 112. 83. 127. 127. -73. -37. 104. -28. 98. 124. -122. 115. -24. -12. 51. -118. -112. -125. 112. 57. -92. -63. 43. -57. -34. -124. 127. 60. -9. 118. 115. -111. -73. 104. 126. -15. 111. 6. 54. -121. 71. -12. -108. 85. -106. 90. -88. -126. -119. 12. 18. /* FIX_MPY() . 126. -114. 60. -123.const prog_int8_t Sinewave[N_WAVE-N_WAVE/4] PROGMEM = { 0. -43. 78. -118. 124. 40. 3. -112. -46. 68. -57. 121. -109. 96. 31. 106. 118. -120. 12. -43. 28. 24. -37. -127. -94. -124. 78. 9. -114. -127. 9. -115. -60. 123. -54. 68. -81. -51. 111. -65. -127. -120. -96. -108. 48. 28. 63. 81. -98. 127. -81. Scaling ensures that result remains 16-bit. -119. -88. 51. -31. 117. -78. 126. -111. 127. Substitute inline assembly for hardware-specific optimization suited to a particluar DSP processor. -21. 3. 126. -3. -76. -117. 88. 127. 127. 127. 76. -90. -68. 54. 106. -124. 46. /*-127. 98.fixed-point multiplication & scaling.

n. scale = 0. m<=nn. /* decimation in time . } while (mr+l > nn). /* last shift + rounding bit */ a = (c >> 1) + b.println(Sinewave[3]). if (mr <= m) continue. /* max FFT size = N_WAVE */ if (n > N_WAVE) return -1. char qr. char fi[]. Serial. shift. with 0 <= n < 2**m. while(1).perform forward/inverse fast Fourier transform. ++m) { l = n. n = 1 << m. both INPUT AND RESULT (in-place FFT).println(a). */ int fix_fft(char fr[].*/ return a. nn. //Serial.e.//Serial. /* Serial. qi. mr = 0. mr = (mr & (l-1)) + l. l.fi[n] are real and imaginary arrays.println(a). fr[n]. int inverse) { int mr. j. 15-1) */ int c = ((int)a * (int)b) >> 6. set inverse to 0 for forward transform (FFT). tr = fr[m]. or 1 for iFFT. 70 . do { l >>= 1.println(b). istep. nn = n . wi.re-order data */ for (m=1. tr. k. ti.println(c). /* shift right one less bit (i. i. int m. /* last bit shifted out = rounding-bit */ b = c & 0x01. wr. } /* fix_fft() . Serial. scale.1.

for (i=0. if (j > 16383 || m > 16383) { shift = 1. */ shift = 1. ++m) { j = m << k. for (m=0. fr[mr] = tr. fi[mr] = ti.println(wr). Serial. /* 0 <= j < N_WAVE/2 */ wr = pgm_read_word_near(Sinewave + j+N_WAVE/4). } } if (shift) ++scale. fi[m] = fi[mr]. during this pass. 71 . } else { /* fixed scaling. ++i) { j = fr[i]. if (m < 0) m = -m. k = LOG2_N_WAVE-1.println("asdfasdf"). depending upon data */ shift = 0. if (j < 0) j = -j.println(Sinewave[256]). break. m<l. Serial. Serial. distributed to maximize arithmetic accuracy. */ istep = l << 1. ti = fi[m]. i<n. } /* it may not be obvious. so this results in an overall factor of 1/n.fr[m] = fr[mr]. for proper normalization -there will be log2(n) passes. but the shift will be performed on each data point exactly once.println(j+N_WAVE/4). while (l < n) { if (inverse) { /* variable scaling. /*Serial. m = fi[i]. } l = 1.

if (inverse) wi = -wi. qi = fi[i].e. } for (i=m. tr = FIX_MPY(wr. ti = FIX_MPY(wr. } /* fix_fftr() . l = istep.*/ wi = -pgm_read_word_near(Sinewave + j). one for real.fr[j]). Real FFT/iFFT using half-size complex FFT by distributing even/odd samples into real/imaginary arrays respectively. i<n. } fr[j] = qr . if (inverse) 72 .ti. char tt. } } --k.fr[j]) . one for imaginary samples).fi[j]). N = 1<<(m-1). if (shift) { wr >>= 1. scale = 0. fi[j] = qi . qr = fr[i]. qi >>= 1. In order to save data space (i.Serial.println(""). int m. fi[i] = qi + ti. to avoid two arrays. } return scale. fr[i] = qr + tr. i+=istep) { j = i + l. we proceed in the following two steps: a) samples are rearranged in the real array so that all even samples are in places 0-(N/2-1) and all imaginary samples in places (N/2)-(N-1).fi[j]) + FIX_MPY(wi. */ int fix_fftr(char f[]. The above guarantees that fix_fft "sees" consecutive real samples as alternating real and imaginary samples in the complex array. *fr=f. int inverse) { int i. wi >>= 1. and b) fix_fft is called with fr and fi pointing to index 0 and index N/2 respectively in the original array. *fi=&f[N].forward/inverse FFT on array of real numbers.FIX_MPY(wi.tr. if (shift) { qr >>= 1.

with 0 <= n < 2**m. f[i] = tt. inverse). set inverse to 0 for forward transform (FFT). i<N. i+=2) { tt = f[N+i-1].2 fix_fft. both INPUT AND RESULT (in-place FFT). return scale.h> /* fix_fft() .fi[n] are real and imaginary arrays. char fi[]. int m. m-1. or 1 for iFFT. for (i=1. f[N+i-1] = f[i]. /* fix_fftr() .h #ifndef FIXFFT_H #define FIXFFT_H //#include <WProgram. fr. } 9. fr[n]. m-1. */ int fix_fft(char fr[].perform forward/inverse fast Fourier transform. 73 .3. } if (! inverse) scale = fix_fft(fi. inverse).forward/inverse FFT on array of real numbers. int inverse). fr.scale = fix_fft(fi.2.

The above guarantees that fix_fft "sees" consecutive real samples as alternating real and imaginary samples in the complex array. one for imaginary samples). In order to save data space (i. to avoid two arrays. we proceed in the following two steps: a) samples are rearranged in the real array so that all even samples are in places 0-(N/2-1) and all imaginary samples in places (N/2)-(N-1). #endif 74 . int inverse). and b) fix_fft is called with fr and fi pointing to index 0 and index N/2 respectively in the original array.Real FFT/iFFT using half-size complex FFT by distributing even/odd samples into real/imaginary arrays respectively. one for real.e. int m. */ int fix_fftr(char f[].

(K) 9.3 PERMUTATION MATRIX 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 6 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 4 10 14 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 5 15 25 30 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 Number of Frequencies Used (N) 6 7 8 9 21 28 36 45 41 63 92 129 56 98 162 255 62 119 218 381 63 126 246 465 63 127 254 501 63 127 255 510 63 127 255 511 63 127 255 511 63 127 255 511 63 127 255 511 63 127 255 511 63 127 255 511 63 127 255 511 63 127 255 511 63 127 255 511 63 127 255 511 63 127 255 511 63 127 255 511 63 127 255 511 63 127 255 511 63 127 255 511 63 127 255 511 63 127 255 511 63 127 255 511 63 127 255 511 63 127 255 511 63 127 255 511 63 127 255 511 63 127 255 511 63 127 255 511 63 127 255 511 63 127 255 511 63 127 255 511 63 127 255 511 63 127 255 511 63 127 255 511 63 127 255 511 63 127 255 511 63 127 255 511 63 127 255 511 63 127 255 511 63 127 255 511 63 127 255 511 63 127 255 511 63 127 255 511 63 127 255 511 63 127 255 511 63 127 255 511 75 .Maximum Freq Comb.

10 55 175 385 637 847 967 1012 1022 1023 1023 1023 1023 1023 1023 1023 1023 1023 1023 1023 1023 1023 1023 1023 1023 1023 1023 1023 1023 1023 1023 1023 1023 1023 1023 1023 1023 1023 1023 1023 1023 1023 1023 1023 1023 1023 1023 1023 1023 1023 11 66 231 561 1023 1485 1815 1980 2035 2046 2047 2047 2047 2047 2047 2047 2047 2047 2047 2047 2047 2047 2047 2047 2047 2047 2047 2047 2047 2047 2047 2047 2047 2047 2047 2047 2047 2047 2047 2047 2047 2047 2047 2047 2047 2047 2047 2047 2047 2047 12 78 298 793 1585 2509 3301 3796 4016 4082 4094 4095 4095 4095 4095 4095 4095 4095 4095 4095 4095 4095 4095 4095 4095 4095 4095 4095 4095 4095 4095 4095 4095 4095 4095 4095 4095 4095 4095 4095 4095 4095 4095 4095 4095 4095 4095 4095 4095 4095 13 91 377 1092 2379 4095 5811 7098 7813 8099 8177 8190 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 8191 14 105 469 1470 3472 6475 9907 12910 14912 15913 16277 16368 16382 16383 16383 16383 16383 16383 16383 16383 16383 16383 16383 16383 16383 16383 16383 16383 16383 16383 16383 16383 16383 16383 16383 16383 16383 16383 16383 16383 16383 16383 16383 16383 16383 16383 16383 16383 16383 16383 15 120 575 1940 4943 9948 16383 22818 27823 30826 32191 32646 32751 32766 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 16 136 696 2516 6884 14892 26332 39202 50642 58650 63018 64838 65398 65518 65534 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 65535 17 153 833 3213 9401 21777 41225 65535 89845 109293 121669 127857 130237 130917 131053 131070 131071 131071 131071 131071 131071 131071 131071 131071 131071 131071 131071 131071 131071 131071 131071 131071 131071 131071 131071 131071 131071 131071 131071 131071 131071 131071 131071 131071 131071 131071 131071 131071 131071 131071 18 171 987 4047 12615 31179 63003 106761 155381 199139 230963 249527 258095 261155 261971 262124 262142 262143 262143 262143 262143 262143 262143 262143 262143 262143 262143 262143 262143 262143 262143 262143 262143 262143 262143 262143 262143 262143 262143 262143 262143 262143 262143 262143 262143 262143 262143 262143 262143 262143 19 190 1159 5035 16663 43795 94183 169765 262143 354521 430103 480491 507623 519251 523127 524096 524267 524286 524287 524287 524287 524287 524287 524287 524287 524287 524287 524287 524287 524287 524287 524287 524287 524287 524287 524287 524287 524287 524287 524287 524287 524287 524287 524287 524287 524287 524287 524287 524287 524287 20 210 1350 6195 21699 60459 137979 263949 431909 616665 784625 910595 988115 1026875 1042379 1047224 1048364 1048554 1048574 1048575 1048575 1048575 1048575 1048575 1048575 1048575 1048575 1048575 1048575 1048575 1048575 1048575 1048575 1048575 1048575 1048575 1048575 1048575 1048575 1048575 1048575 1048575 1048575 1048575 1048575 1048575 1048575 1048575 1048575 1048575 21 231 1561 7546 27895 82159 198439 401929 695859 1048575 1401291 1695221 1898711 2014991 2069255 2089604 2095589 2096919 2097129 2097150 2097151 2097151 2097151 2097151 2097151 2097151 2097151 2097151 2097151 2097151 2097151 2097151 2097151 2097151 2097151 2097151 2097151 2097151 2097151 2097151 2097151 2097151 2097151 2097151 2097151 2097151 2097151 2097151 2097151 2097151 76 .

29E+09 4.34E+08 1.14E+08 4.59E+09 8.34E+08 1.37E+08 5.14E+09 2.34E+08 1.61E+08 3.29E+09 4.29E+09 4.37E+08 4.37E+08 5.99E+09 2.68E+08 2.15E+09 2.15E+09 2.07E+09 1.07E+09 2.34E+08 1.59E+09 8.37E+08 5.15E+09 2.29E+09 4.68E+08 2.25E+09 4.37E+08 5.83E+09 4.07E+09 1.07E+09 1.45E+09 3.34E+08 1.37E+08 5.29E+09 4.34E+08 1.29E+09 4.15E+09 2.89E+09 8.34E+08 1.19E+09 4.66E+08 1.37E+08 5.07E+09 1.07E+09 1.37E+08 5.07E+09 1.68E+08 2.07E+09 1.15E+09 2.44E+08 6.68E+08 2.1E+08 1.29E+09 33 561 6017 46937 284273 1391841 5663889 19548045 58115145 1.68E+08 2.68E+08 2.85E+09 1.33E+08 1.02E+09 1.07E+09 1.92E+08 2.07E+09 1.37E+08 5.09E+09 3.28E+09 4.34E+08 1.59E+09 8.68E+08 2.68E+08 2.05E+09 1.34E+08 1.07E+09 1.07E+09 1.08E+08 7.29E+09 4.07E+09 1.59E+09 8.68E+08 3.15E+09 2.68E+08 2.59E+09 8.34E+08 1.37E+08 5.14E+08 1.07E+09 1.36E+08 5.07E+09 1.26E+08 1.15E+09 2.29E+09 4.34E+08 1.29E+09 4.68E+08 2.15E+09 2.15E+09 2.34E+08 1.37E+08 5.12E+09 2.15E+09 2.15E+09 2.34E+08 1.68E+08 2.29E+09 5.31E+08 1.46E+08 4.68E+08 2.15E+09 2.35E+08 5.37E+08 5.59E+09 8.07E+09 1.59E+09 8.29E+09 4.28E+09 1.68E+08 2.68E+08 2.68E+08 2.07E+09 1.44E+08 2.34E+08 1.07E+09 1.59E+09 8.5E+09 7.68E+08 2.59E+09 8.07E+09 1.59E+09 8.15E+09 2.15E+09 2.29E+09 4.15E+09 2.34E+08 1.68E+08 2.59E+09 8.37E+08 5.15E+09 32 528 5488 41448 242824 1149016 4514872 15033172 43081972 1.15E+09 2.34E+08 1.85E+09 2.29E+09 4.2E+08 5.34E+08 1.53E+09 8.14E+08 4.37E+08 5.22E+08 2.54E+08 1.29E+09 4.34E+08 1.46E+09 6.07E+09 1.29E+09 4.37E+08 5.59E+09 8.15E+09 2.37E+08 5.15E+09 2.68E+08 2.29E+09 4.07E+09 31 496 4991 36456 206367 942648 3572223 11460948 31621023 75973188 1.29E+09 4.07E+09 1.91E+08 2.14E+09 2.68E+08 2.29E+09 4.29E+09 4.27E+09 2.57E+09 8.07E+09 1.66E+08 5E+08 5.37E+08 30 465 4525 31930 174436 768211 2804011 8656936 22964086 53009101 1.44E+09 8.34E+08 1.34E+08 1.99E+08 1.37E+08 5.29E+09 4.49E+09 3.62E+08 8.68E+08 2.34E+08 1.68E+08 2.37E+08 5.6E+08 8.68E+08 2.58E+09 8.68E+08 2.59E+09 8.29E+09 4.37E+08 5.18E+08 1.15E+09 2.37E+08 5.07E+09 1.07E+09 1.06E+09 4.59E+09 8.57E+08 2.15E+09 2.37E+08 5.15E+09 2.34E+08 1.07E+09 1.94E+08 3.15E+09 2.68E+08 2.59E+09 8.05E+08 1.15E+09 2.34E+08 1.29E+09 4.07E+09 1.07E+09 1.37E+08 5.34E+08 1.59E+09 8.15E+09 2.15E+09 2.68E+08 2.34E+08 1.29E+09 4.73E+08 1.29E+09 4.02E+08 5.37E+09 1.34E+08 1.68E+08 2.14E+08 7.59E+09 8.59E+09 8.68E+08 2.37E+08 5.34E+08 1.59E+09 8.25E+09 8.07E+09 1.32E+09 7.59E+09 8.59E+09 8.68E+08 29 435 4089 27840 146595 621615 2182395 6474540 16489545 36519555 71116845 1.29E+09 4.07E+09 1.15E+09 2.29E+09 4.59E+09 77 .59E+09 8.64E+08 2.37E+08 5.13E+09 4.29E+09 4.07E+09 1.01E+09 3.08E+08 2.64E+09 1.51E+08 3.22 253 1793 9108 35442 110055 280599 600369 1097789 1744435 2449867 3096513 3593933 3913703 4084247 4158860 4185194 4192509 4194049 4194280 4194302 4194303 4194303 4194303 4194303 4194303 4194303 4194303 4194303 4194303 4194303 4194303 4194303 4194303 4194303 4194303 4194303 4194303 4194303 4194303 4194303 4194303 4194303 4194303 4194303 4194303 4194303 4194303 4194303 4194303 23 276 2047 10902 44551 145498 390655 880969 1698159 2842225 4194303 5546381 6690447 7507637 7997951 8243108 8344055 8377704 8386559 8388330 8388583 8388606 8388607 8388607 8388607 8388607 8388607 8388607 8388607 8388607 8388607 8388607 8388607 8388607 8388607 8388607 8388607 8388607 8388607 8388607 8388607 8388607 8388607 8388607 8388607 8388607 8388607 8388607 8388607 8388607 24 300 2324 12950 55454 190050 536154 1271625 2579129 4540385 7036529 9740685 12236829 14198085 15505589 16241060 16587164 16721760 16764264 16774890 16776914 16777190 16777214 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 25 325 2625 15275 68405 245505 726205 1807780 3850755 7119515 11576915 16777215 21977515 26434915 29703675 31746650 32828225 33308925 33486025 33539155 33551805 33554105 33554405 33554430 33554431 33554431 33554431 33554431 33554431 33554431 33554431 33554431 33554431 33554431 33554431 33554431 33554431 33554431 33554431 33554431 33554431 33554431 33554431 33554431 33554431 33554431 33554431 33554431 33554431 33554431 26 351 2951 17901 83681 313911 971711 2533986 5658536 10970271 18696431 28354131 38754731 48412431 56138591 61450326 64574876 66137151 66794951 67025181 67090961 67105911 67108511 67108836 67108862 67108863 67108863 67108863 67108863 67108863 67108863 67108863 67108863 67108863 67108863 67108863 67108863 67108863 67108863 67108863 67108863 67108863 67108863 67108863 67108863 67108863 67108863 67108863 67108863 67108863 27 378 3303 20853 101583 397593 1285623 3505698 8192523 16628808 29666703 47050563 67108863 87167163 1.59E+08 6.34E+08 1.68E+08 2.34E+08 1.59E+09 8.08E+08 1.34E+08 28 406 3682 24157 122437 499177 1683217 4791322 11698222 24821332 46295512 76717267 1.37E+08 5.8E+08 9.67E+08 2.37E+08 5.07E+09 1.3E+08 5.68E+08 2.34E+08 1.37E+08 5.37E+08 5.59E+09 8.23E+08 1.

72E+10 1.77E+10 6.41E+12 7.89E+10 4.76E+08 5.5E+11 5.4E+12 4.45E+12 6.72E+10 1.28E+08 2.72E+10 1.47E+12 2.75E+11 2.5E+11 8.8E+12 8.8E+12 8.97E+12 2.75E+10 5.06E+11 2.72E+10 1.76E+13 1.87E+10 6.27E+10 3.75E+11 2.86E+11 8.37E+11 1.36E+13 1.53E+09 9.2E+12 2.87E+10 6.58E+12 2.97E+10 5.4E+12 4.1E+12 1.26E+10 1.75E+11 2.37E+11 1.87E+10 6.37E+11 1.72E+10 1.72E+10 1.49E+11 5.03E+08 2.4E+12 4.75E+11 2.64E+10 1.4E+12 4.26E+10 1.1E+12 1.55E+11 9.58E+09 1.51E+10 5.76E+13 1.59E+09 4.55E+11 1.44E+10 3.75E+11 2.44E+10 3.2E+12 2.79E+09 1.44E+10 3.8E+12 8.44E+10 3.76E+13 1.75E+11 2.76E+13 1.2E+12 2.48E+10 6.37E+11 1.5E+11 5.04E+10 6.37E+11 1.44E+10 3.72E+10 1.76E+13 1.1E+12 1.5E+11 5.72E+10 1.81E+11 6.06E+11 4.61E+12 1.87E+10 6.75E+11 2.5E+11 5.5E+11 5.8E+12 8.83E+10 6.22E+09 3.87E+10 6.87E+10 6.2E+12 2.29E+11 8.01E+09 5.2E+12 2.1E+12 1.01E+12 1.75E+11 2.87E+10 6.87E+10 6.29E+10 9.4E+12 4.61E+10 1.8E+12 8.1E+12 1.19E+12 2.87E+10 6.87E+10 37 703 8473 74518 510415 2835199 13130671 51738691 1.1E+12 1.56E+12 3.2E+12 2.37E+11 1.72E+10 1.09E+08 4.93E+08 9.1E+12 1.58E+10 1.85E+12 1.37E+11 1.5E+11 5.75E+11 2.37E+11 1.9E+11 5.72E+10 1.37E+11 1.87E+10 6.46E+10 2.5E+11 5.8E+12 8.94E+11 3.37E+11 1.44E+11 2.76E+13 1.04E+12 4.61E+13 1.03E+10 6.2E+12 4.55E+11 2.44E+10 3.76E+13 1.34E+11 1.39E+12 4.37E+11 1.5E+11 5.67E+09 8.43E+12 3.37E+11 38 741 9177 82992 584934 3345615 15965871 64869363 2.8E+12 8.1E+12 1.04E+09 1.24E+08 9.95E+11 5.4E+12 4.24E+12 8.01E+08 1.79E+12 8.76E+13 1.74E+10 8.76E+13 1.2E+12 2.2E+10 1.76E+13 1.53E+12 2.19E+13 1.37E+11 1.22E+10 8.2E+12 2.1E+12 1.39E+11 2.69E+11 1.75E+11 2.2E+12 2.37E+11 1.74E+10 4.57E+11 4.87E+10 6.52E+09 1.1E+12 1.5E+11 5.79E+12 8.38E+12 4.03E+10 1.46E+10 1.1E+12 1.74E+11 2.89E+11 2.36E+09 5.06E+12 1.72E+10 1.75E+11 39 780 9919 92170 667927 3930550 19311487 80835235 2.8E+12 8.71E+10 1.07E+09 6.37E+11 1.2E+11 5.44E+10 3.17E+10 2.75E+11 2.37E+11 1.4E+12 4.44E+10 3.3E+11 1.8E+12 8.1E+12 1.3E+12 4.5E+11 5.76E+13 1.74E+08 1.19E+11 7.93E+12 2.2E+12 2.8E+12 8.37E+12 1.37E+11 1.73E+11 2.9E+08 2.1E+12 1.44E+10 36 666 7806 66711 443703 2391495 10739175 40999515 1.67E+10 1.02E+11 1.87E+10 6.23E+10 3.77E+12 8.5E+11 5.5E+11 5.1E+12 1.25E+11 1.77E+11 1.44E+10 3.44E+10 3.35E+08 3.5E+11 5.75E+11 2.75E+13 1.4E+12 5.42E+10 6.8E+12 8.75E+11 3.2E+12 2.55E+10 1.1E+12 1.37E+10 3.8E+12 8.75E+11 2.42E+09 9.75E+11 2.62E+10 1.1E+12 1.72E+10 1.32E+11 3.87E+10 6.12E+09 2.11E+10 3.34 595 6579 52955 331211 1676115 7055731 25211935 77663191 2.44E+10 3.87E+10 6.37E+11 1.9E+09 4.72E+10 1.97E+12 5.65E+10 6.72E+10 1.39E+10 2.44E+10 3.1E+12 1.2E+12 2.1E+12 41 861 11521 112791 862189 5358577 27840517 1.86E+10 6.17E+12 2.52E+10 5.8E+12 8.5E+11 40 820 10700 102090 760098 4598478 23242038 1E+08 3.1E+10 6.72E+10 1.87E+10 6.5E+11 5.6E+09 6.5E+13 1.72E+10 1.44E+10 3.44E+11 4.17E+11 2.2E+12 2.4E+12 4.44E+10 3.1E+12 1.87E+10 6.44E+10 3.75E+11 2.31E+11 1.12E+10 2.99E+11 4.1E+12 1.87E+10 6.72E+10 1.72E+10 1.87E+10 8.2E+12 2.4E+12 4.58E+10 2.76E+13 1.37E+11 1.2E+12 2.5E+11 5.41E+10 1.1E+12 1.72E+10 1.72E+10 1.82E+12 8.65E+11 2.22E+09 7.23E+08 4.2E+11 1.7E+11 2.98E+10 3.75E+11 2.72E+10 1.66E+12 8.39E+12 3.2E+12 2.47E+11 5.4E+12 4.76E+13 1.75E+11 2.44E+10 3.44E+10 8.43E+10 3.43E+11 5.76E+13 1.49E+11 5.76E+13 78 .1E+12 1.76E+13 1.47E+11 2.52E+11 1.74E+08 1.37E+11 1.04E+08 1.5E+11 5.28E+08 7.2E+12 42 903 12383 124313 974981 6220767 33199095 1.8E+12 44 990 14234 149985 1235993 8295045 46615613 2.72E+10 1.37E+11 1.76E+13 1.82E+12 1.87E+10 6.4E+12 4.29E+10 2.44E+10 3.24E+09 4.95E+08 1.36E+11 3.67E+13 1.2E+12 2.72E+10 1.61E+09 1E+10 1.44E+10 3.1E+12 1.76E+13 1.74E+12 9.19E+12 2.2E+12 2.72E+13 1.44E+10 3.5E+11 4.15E+11 1.61E+11 6.4E+12 4.37E+11 1.75E+11 2.84E+08 7.16E+11 9.4E+12 4.54E+09 3.87E+10 6.4E+12 4.21E+12 7.84E+11 5.72E+10 1.35E+12 4.2E+12 2.44E+10 3.75E+11 2.5E+11 5.5E+11 5.97E+10 3.87E+10 6.13E+10 3.33E+08 3.76E+13 1.42E+12 1.5E+11 5.36E+11 1.75E+11 2.35E+09 1.48E+08 2.33E+09 8.4E+11 2.8E+12 8.4E+12 4.98E+12 3.38E+09 3.44E+10 3.8E+12 8.74E+13 1.74E+12 8.4E+12 4.51E+08 5.29E+11 2.43E+10 3.35E+11 5.41E+10 3.86E+08 7.9E+10 3.37E+11 1.73E+12 7.76E+09 1.72E+10 2.55E+09 8.23E+09 6.35E+09 1.42E+09 2.4E+12 43 946 13287 136697 1099295 7195749 39419863 1.75E+09 1.4E+12 4.38E+10 1.52E+10 1.37E+11 1.63E+11 9.87E+10 6.38E+10 6.49E+10 9.09E+12 1.4E+12 4.97E+09 3.87E+10 6.75E+11 2.87E+10 6.46E+11 1.72E+10 35 630 7175 59535 384167 2007327 8731847 32267667 1.97E+08 2.8E+12 8.07E+12 2.75E+11 2.41E+09 1.44E+10 3.89E+08 9.4E+12 4.12E+10 4.37E+11 1.2E+12 2.13E+12 2.24E+08 1.7E+10 1.28E+10 3.08E+12 1.51E+12 8.36E+12 4.78E+12 4.72E+10 1.76E+13 1.5E+11 5.44E+10 3.1E+12 1.8E+12 8.

31E+12 2.04E+13 7.52E+13 46 1081 16261 179446 1550200 10917019 64441699 3.13E+15 1.32E+13 3.04E+13 7.56E+14 9.6E+11 3.62E+13 2.2E+14 5.81E+14 2.13E+15 1.5E+14 5.41E+14 1.95E+11 1.41E+14 1.81E+14 2.63E+14 5.29E+13 7.04E+13 7.87E+13 3.4E+14 1.5E+09 1.11E+11 1.52E+13 3.95E+13 7E+13 7.87E+12 4.9E+08 1.35E+09 1.12E+12 8.76E+13 2.45E+10 4.18E+08 6.09E+15 1.72E+12 8.39E+14 1.65E+08 2.24E+14 1.63E+14 5.65E+12 6.44E+14 1.33E+10 1.41E+14 1.73E+14 2.04E+13 7.63E+14 5.65E+12 5.13E+15 1.52E+13 3.08E+10 4E+10 1.39E+14 5.63E+14 5.57E+14 1.7E+12 1.42E+13 7.8E+14 2.01E+13 1.45E+14 4.04E+13 7.13E+15 1.08E+10 1.41E+14 1.67E+13 6.63E+14 50 1275 20875 251175 2369935 18260635 1.78E+10 1.57E+13 2.66E+10 2.46E+13 3.94E+13 5.52E+13 3.81E+14 2.63E+14 5.25E+08 1.81E+14 2.52E+13 3.07E+12 2.63E+13 9.85E+13 6.39E+13 6.28E+13 3.53E+14 4.01E+11 2.06E+15 1.88E+10 5.69E+13 3.48E+14 8.13E+15 79 .41E+14 1.34E+10 5.13E+10 1.83E+11 6.11E+15 1.32E+11 3.41E+14 1.81E+14 2.13E+15 1.52E+13 3.63E+14 5.81E+14 2.13E+15 1.78E+14 5E+14 6.41E+14 1.68E+09 3.52E+13 3.27E+11 1.85E+13 3.13E+15 1.13E+15 1.94E+11 7.46E+12 3.81E+14 2.92E+14 5.4E+13 4.39E+13 3.93E+09 2.35E+14 1.49E+13 3.43E+10 7.81E+14 2.01E+15 1.28E+11 1.12E+15 1.12E+13 1.18E+14 2.04E+13 7.81E+14 2.52E+13 3.35E+13 1.81E+14 2.54E+14 2.63E+14 5.43E+09 5.41E+14 1.81E+14 2.81E+12 5.11E+13 3.04E+13 8.16E+09 1.81E+14 2.12E+15 1.55E+08 3.69E+13 1.52E+13 3.41E+13 5.41E+14 1.55E+13 2.52E+13 3.01E+14 1.66E+14 2.63E+14 5.65E+13 6.41E+14 1.17E+11 5.63E+14 5.81E+14 49 1225 19649 231525 2138409 16122225 1.64E+12 1.02E+08 5.52E+13 3.04E+13 7.6E+14 2.53E+08 2.51E+13 3.63E+14 5.52E+13 3.52E+13 3.41E+14 1.52E+13 3.93E+13 4.04E+13 7.04E+13 7.04E+13 7.81E+14 2.51E+13 3.41E+14 1.14E+14 1.04E+13 7.31E+14 1.7E+08 1.13E+15 1.81E+14 2.9E+12 3.63E+14 5.59E+11 1.41E+14 1.11E+13 3.16E+11 2.81E+14 2.37E+13 1.7E+14 3.04E+13 7.57E+14 5.63E+14 5.14E+09 8.71E+13 2.88E+14 2.76E+11 1.09E+12 6.81E+14 3.41E+14 1.4E+13 6.37E+12 1.13E+15 1.52E+13 3.65E+13 1.52E+13 3.63E+14 5.26E+14 7.12E+15 1.38E+14 2.41E+14 1.75E+09 6.15E+14 2.61E+09 1.63E+14 5.41E+14 1.72E+13 4.63E+14 5.13E+15 1.41E+14 48 1176 18472 213052 1925356 14196868 87825940 4.38E+14 1.13E+15 1.47E+12 1.03E+13 7.72E+11 5.14E+14 1.06E+13 1.45 1035 15225 164220 1385979 9531039 54910659 2.17E+13 2.03E+13 7.81E+14 2.53E+12 9.6E+14 5.04E+13 7.25E+14 1.62E+14 5.1E+14 1.02E+13 7.41E+14 1.77E+14 2.72E+13 5.13E+15 1.99E+12 1.27E+12 2.04E+13 7.04E+13 47 1128 17343 195708 1729647 12467220 75358719 3.16E+09 4.55E+12 1.03E+14 4.38E+12 4.25E+13 2.52E+13 3.81E+14 2.04E+13 7.81E+14 2.99E+11 9.52E+13 3.13E+15 1.97E+13 6.

4 LABVIEW VIRTUAL INSTRUMENT 80 .9.