radio communications final project design reportcrose/capstone12/entries/radiocomm_final.… ·...

77
Department of Electrical and Computer Engineering 332:428 Capstone Design - Communications Systems Spring 2012 Radio Communications Final Project Design Report Group Members: Tuan Le Brian Unangst Robert Chin Project Director: Dr. David G. Daut May 9, 2012

Upload: buidat

Post on 22-Mar-2018

215 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

Department of Electrical and Computer Engineering

332:428 Capstone Design - Communications Systems Spring 2012

Radio Communications

Final Project Design Report

Group Members:

Tuan Le

Brian Unangst

Robert Chin

Project Director: Dr. David G. Daut

May 9, 2012

Page 2: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

2

Table of Contents 1. Design Project Overview ........................................................................................ 1

2. Technical Specifications ......................................................................................... 3

3. Final Project Summary ........................................................................................... 6

3.1. System Design – Final Version ......................................................................... 6 3.2. System Implementation .................................................................................. 7 3.3. System Performance ....................................................................................... 9 3.4. System Design Iterations ...............................................................................11

4. Task List and Work Distribution. ..........................................................................13

5. Design Project Details ..........................................................................................18

5.1. Analog Transmitter/Receiver ........................................................................18 5.1.1. Theoretical Considerations ............................................................18 5.1.2. Design Procedure ..........................................................................18 5.1.3. Observed and Measured Results...................................................18

5.2. Digital Transmitter/Receiver Modules ..........................................................19 5.2.1. Design Procedure ..........................................................................19 5.2.2. Observed and Measured Results...................................................20

5.3. Localization – Direction on Arrival Estimation ..............................................23 5.3.1. Theoretical Considerations ............................................................23 5.3.2. Design Procedure ..........................................................................28 5.3.3. Simulation Results .........................................................................30 5.3.4. Observed and Measured Results...................................................32

6. Sub-system Integration Considerations ...............................................................40

7. Economics Considerations ...................................................................................40

7.1. Cost Analysis – Prototype ..............................................................................40 7.2. Cost Analysis – Final Version .........................................................................41

8. Manufacturability ................................................................................................41

9. Marketability........................................................................................................42

10. Individual Discussions ........................................................................................42

10.1. Overview Discussions of the Project ...........................................................42 10.1.1. Tuan Le ........................................................................................42 10.1.2. Brian Unangst ..............................................................................43 10.1.3. Robert Chin ..................................................................................44

10.2. Detailed Discussion of Pertinent Sub-systems ............................................46

10.2.1. Tuan Le ........................................................................................46

Page 3: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

3

10.2.2. Brian Unangst ..............................................................................46 10.2.3. Robert Chin ..................................................................................47

Appendices .................................................................................................................50

Appendix 1: List of Equipment .......................................................................50

Appendix 2:Simulation and Program Code ...................................................51

Appendix 3: Datasheets ................................................................................72

References ..................................................................................................................73

Page 4: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

4

1. Design Project Overview

The purpose of this project was to simulate the industry project lifecycle by using the

knowledge and skills gained from the Electrical and Computer Engineering curriculum to

produce a potential innovative project. This capstone design project focuses on the

Communications concentration of the ECE curriculum. With concepts gained from various

courses such as Principles of Communications Systems, Communications System Designs,

and Wireless Communications, the main objective is designed and implemented a basic radio

transceiver system with an additional signal-processing unit used for general localization.

These courses provided basic fundamental engineering concepts for basic transceiver systems

(this included the frequency spectrum by Fourier analysis, various modulation/demodulation

techniques, and various filters to combat noise/interference) and complex mathematical skills

(which consists of operations utilizing complex exponentials, linear algebraic

characterization of multiple signals, matrix operations, and matrix decompositions). Using

these backgrounds, the objectives of the project is to plan, design and implement project

following the idea proposal presentation. Ultimately, the final goal is to design and construct

a basic transmitter/receiver communication system with the ability to estimate general

location.

In addition, the scope of the project is including the exhibition of understanding and utilizing

knowledge in communication systems designs. The transceivers systems will be designed

and integrated into the overall systems for further use in signal’s location classification.

Multiple transceiver models will be examined and iterated to find the optimal systems for the

purposes of the project. The systems will be classified into subsystems to demonstrate the

function and performance of each block component in the systems. In due course, the project

demonstrates the comprehension and intuition of the students in the line of works assembling

the realistic engineering works.

In detailed specifications, the main goal is consisted of providing general localization of the

transmitter to the user. The precursor to this initiation presented itself when formulating the

project around the concept of providing location of a transmitter in distress in maritime

activities. In addition, the drive to this localization is that it is a cost-effective alternative to

the current Global Position Systems (GPS); and that it will be an additional feature to

existing maritime radios by utilizing preexisting receiver technology provided in the radios.

The Multiple Signal Classification (MUSIC) algorithm will be explored to provide the

solution of Angle of Arrival (AOA) at the receiver.

The overall scheme of providing the user the transmitting signal’s AOA required the in-depth

research into the potential algorithms to conducting localization. However, out of the various

localization techniques, the preexisting systems of signal localization require there is a

system/network ratio of at least two receivers to one transmitter to provide exact location of

transmitted signal. Acknowledging these constraints of preexisting maritime radio solutions,

the challenge was to explore the possibility of signal localization using one receiver to one

transmitter systems. The first proposal was to examine various algorithms to provide the

general capability of localization. There is a range of algorithms that can provide AOA such

as MUSIC, ESPRIT, and SAGE; and of these algorithms, MUSIC algorithm can provide the

Page 5: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

5

mean to estimate the AOA of the transmitted signal by studying of the subspace based

method base on the eigenvector decomposition of the covariance matrix. In summary, the

MUSIC algorithm consists of covariance, eigenvalue decomposition, and signal space

methodology. These complex mathematical operations would be further examined to develop

the algorithm within a single signal-processing unit to be used for the intended maritime

radio solution. Initially, the project desired that the algorithm be placed within a

microcontroller to provide some portability between systems; however, it is determined that

using MATLAB to analyze the incoming signal would be most the efficient mechanism for

providing AOA in a graphical representation. Ultimately, these mathematical concepts are

further examined to develop the microcontroller-MATLAB emulation of the AOA

estimation.

The microcontroller-MATLAB emulation consisted of reproducing the step-by-step process

through the MUSIC algorithm, which consisted of first formulating a covariance matrix.

After formulating the covariance matrix (from the required array antenna of M-elements), the

next step was to decompose the covariance matrix into eigenvalues and eigenvectors by

eigenvalue decomposition (Singular value decomposition). Following step would be to

separate noise subspace from the signal subspace from the eigenvalues. In the end, this noise

subspace was used as the independent variable for the MUSIC function (dB vs. AOA). This

understanding is developed into the production of the microcontroller-MATLAB emulation

of the algorithm.

The practical implementation of the algorithm by the means of the microcontroller-

MATLAB interface provided the ability to receive signals at 1 Hz. This limitation is proved

as a result of the cap of the sampling rate from the combined overhead provided by the

microcontroller-MATLAB interface and the analog-to-digital converter buffer within the

microcontroller. This restriction implicitly defines the obligation to adhere to the Nyquist

sampling theorem. In the end, an incoming signal would not be digitally characterized

correctly if the sampling theorem were not met. As a result, the proposal to overcome this

issue is emulating the signals mathematically to produce empirical data. The input signals

were then characterized by the MATLAB code and inputted into the algorithm to produce

AOA. Ultimately, the implementation of the design resulted in a drastically lower carrier

frequency than the preexisting maritime radio band. However, if the analog-to-digital

converter (ADC) was up-scaled and the MATLAB interface was eliminated there is potential

to upscale the overall project to provide the capability of analyzing signals at higher

frequencies.

In conclusion, the resulting input arguments to the algorithm (characterizations of the

incoming signals) were limited by the hardware for the project. Nevertheless, the proof of

concept that the algorithm produces AOA for use in signal processing presents itself useful in

localization estimation applications. However, some major concepts required for this

algorithm to work is that the SNR/noise power be known, and that the algorithm cannot

distinguish/separate signals within a channel. Ultimately, this means that there can be times

at which this algorithm will fail. Following the project scheme, it requires that it provide

general localization for purposes of emergency situations. This methodology finds itself as a

useful alternative to the preexisting GPS localization functionality within maritime activities

Page 6: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

6

currently, but in times of distress/life-threatening it may be more effective to utilize the GPS

system with a larger geographical scale.

2. Technical Specifications

For testing purposes, the channels in the amateur signal band will be used for transmitting

channel of the systems. The following specifications are applied to the transceiver systems:

- The designed transceivers systems operate in 315 MHz frequency channel

- Transceiver modules communicate at the narrow band channel of 315.0625 MHz

- The modulating signal is at 1 Hz

For localization/direction on arrival (DOA) estimation, there are two major high-level

diagrams that must be explained before further examine the AOA estimation within design

scope of the project. Of these two diagrams, the system architecture and the functional

architecture provide a brief overview of AOA estimation feature. The system architecture

provides where the signal-processing unit will reside with respect to the preexisting hardware

functionality of the receiver. The functional architecture will provide system-to-system

process of the algorithm to present final results of the MUSIC algorithm’s AOA estimation.

Fig.1: System architecture of multiple channels receiver with AOA estimation.

The discrete system will sit in parallel with the demodulation of the incoming carrier signal.

The reason for the RF down conversion is to bring the high frequency signal down to a

compatible and lower frequency analytical capability of the AOA estimation system. The

reasoning for this is due to the limitations of the hardware that used for MUSIC algorithm

implementation. The hardware can only process information as fast as the ADC.

For the purpose of localization of the project, there is a single ADC, which is used by all

analog readable ports available to the microcontroller. As a result, if large amount of data is

being processed, the ADC does not have time to purge the information currently held within

it, and thus it will generate incorrect results (in turn, causing incorrect data to be sent to the

algorithm).

Page 7: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

7

Another aspect is that the act of sending the information to the ADC is initiated by a

command executed in the Arduino/MATLAB to access the analog read port and send the

information to the ADC. This process further adds more overhead to the processing time of

the algorithm. Ultimately, it was experimentally examined that the Arduino/MATLAB

conversion could provide sufficient data for ~1 Hz frequency inputs. If the input data

operates at a higher frequency it would impact as a result of aliasing.

(1)

Nyquist Sampling Theorem: B = Carrier Frequency

fN = Sampling Frequency

To avoid aliasing, the proper procedure is to follow the mathematical limitation/requirement

of the Nyquist sampling theorem. It provides that the sampling frequency be at a multiple of

two in comparison to the received signal maximum frequency (in this case, the FM carrier

frequency). The design specifications of the capstone design states that the carrier signal be

modulated at a frequency of about 315 MHz. Without RF down conversion, it would be

necessary to sampling this at a rate of at least 630 MHz.

Fig. 2: Example of a two signals characterized by the same sampling frequency.

Fig. 3: Functional Architecture of MUSIC Algorithm.

The functional architecture provides a general overview system-to-system processing of the

information obtained from the receiver. A major requirement is that the receiver contains an

antenna array. There are many available configurations for a receiver’s antenna, but to

analyze the AOA/localization there is a requirement of at least two antenna elements to

provide proper arguments for the MUSIC algorithm.

Page 8: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

8

At the front-end of the receiver, each antenna element will contain its own variation of the

baseline/reference input signal (for the project, FM carrier signal). Depending on the antenna

configuration, the variation between antenna elements may vary by incremental/decremented

scaling and delaying factors of the baseline input signal.

The information of each antenna element is then formulated into a single covariance matrix,

which is then analyzed by signal space methodology to provide AOA. Of the empirical data,

the graphical representation will vary by AOA; thus, at the AOA which the signal is

transmitted, the graphical result will present a peak.

Fig. 4: Graphical representation of AOA estimation of signals - peaks at 90°, 60°, and 30°.

Ultimately, these two architectural diagrams only present a high-level overview of the

localization portion of the capstone design project. There was much further investigation and

research necessary to provide the final result of AOA graphical representation as specified by

the project design specification. Further investigations of the algorithm and signal

transmitting are required before the design initiation of the project.

Page 9: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

9

3. Final Project Summary

3.1.System Design – Final Version

In final systems implementation, a single channel transmitter/receiver system is designed

and constructed for the proof of concept testing purpose. Multiple models were iterated

and observed for operating performance. For FCC compliance, the Armstrong

modulation method is used as the base method of designing the transmitter with the

channel space of 200 KHz. The method is first generating the narrow signal then using

the frequency multiplier to bring the frequency up to the desired operating frequency and

band. To keep the distortion at the low level, the maximum angular deviation βf is set to

be at 0.1 radians; the modulating signal is in the audio band of DC to 15 KHz.

Crystal Oscillator455 KHz

90° Phase Shifter AdderFrequency Multiplier

(X50)Mixer

Frequency Multiplier(X73)

Balanced Modulator Modulating SignalCrystal Oscillator

4 MHzRF Power Amp.

To Antenna

Fig.5: Armstrong modulation method.

Base on the specifications above, the maximum narrow band deviation ΔfmaxNB is

found as:

ΔfmaxNB = βfW = 0.1x15KHz = 1.5 KHz (2)

W = maximum audio signal band.

For wide band deviation, the maximum deviation of the signal is 75 KHz. Therefore,

the number of multiplication for the first frequency multiplier is found as:

ΔfmaxWB = N1ΔfmaxNB (3)

N1 = 75/1.5 = 50 (4)

The desire operating frequency is at 315 MHz. The first crystal oscillator operates at

455 KHz; the second crystal oscillator operates at 4 MHz. The second multiplication

integer of the second frequency multiplier is:

fo = N1f1 + N2f2 (5)

315 MHz = 50x455 KHz + N2x4 MHz (6)

Page 10: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

10

Solving (6), the value of N2 is 73 with rounded to the closest integer; from (5), the

operating frequency of the transmitter is at 314.75 MHz.

3.2.System Implementation

Base on the block diagram above, the transmitter is designed and implemented base

on the Armstrong modulation method. Sub-circuits are built and tested at every single

section along the design. The following schematics are the implementations of the

block components in the design of transmitter.

Fig. 6: Schematic of Crystal Oscillator. [1]

The schematic above is capable of operating at 455 KHz and 4 MHz. At the output of

the crystal oscillator, the standard RC low pass filters are presented to cut out the

higher harmonics of the crystals. The component values used in the schematics are

given in Table1; the crystals are replaced appropriately for the operating frequencies.

Table 1: Discrete component of Crystal Oscillators.

R1 10K R4 470K C1 1μF C4 1000μF Q1 2N3904

R2 220K R5 15K C2 1μF C5 1000μF Q2 2N3904

R3 150K R6 1M C3 1000μF XTAL1 455K XTAL2 4M

Page 11: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

11

R1 5.6K

R2 5.6K

C 68pF

R 10K

TL081C

Fig. 7: Phase Shifter schematic.

Fig. 8: Carrier rejection balanced modulator. [2]

MC1496 were used for designing the carrier rejected balanced modulator. The IC can

also be used to design the mixer and frequency doublers. However, as the block

components were tested along the overall circuit constructing process, there were

troubles of integrating the first few block components in working together. A great

amount of time was putting into debugging the problem of integrating the circuit

blocks. The adder was constructed by the T configuration of 3 resistors.

SA602 were also considered for use in design the mixer. For frequency multipliers,

most of the transistors and IC have the gain bandwidth; therefore, the higher

frequency multiplication cannot be recognized. The same problem of gain bandwidth

is encountered in designing the amplifier for the signal at higher frequency.

For the remaining part of the project, the MUSIC algorithm is simulated empirical

data. The microcontroller-MATLAB interface cannot handle the large band of the

signal (~20K KHz), therefore the project is simulated in digital signal generated in

Page 12: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

12

MATLAB. For testing of transmitted/received signal, the systems of transceivers are

replaced with the hybrid transceivers modules.

3.3.System Performance

Nevertheless of the troubles in system integration, the single blocks in the system

produce the outputs as intended. However, the T-configuration adder using resistors

did not produce any output signal.

Some of the suspected reason that the circuit blocks are not working together are the

different in impedances and operating power.

Fig. 9: Output of 455 KHz crystal oscillator.

Page 13: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

13

Fig. 10: Output of 4 MHz crystal oscillator.

Fig. 11: Carrier rejected modulation of 5 KHz modulating signal.

Page 14: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

14

Fig.12: Output of Phase Shifter.

3.4.System Design Iterations

Many models of transmitters are considered for the system. One of the models is the

consideration of MC1648 IC for modulation of 157.5 MHz carrier and the frequency

doubler circuit. However, the circuit utilizes the LC tank circuit for the oscillator; the

design of the LC tank using discrete components proved to be not feasible due to the

low quality discrete components.

Fig. 13: VCO using the MC1648 IC. [3]

Page 15: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

15

Another circuit schematic is considered for the transmitter is the FM modulator using

two transistors. Using the output frequency in the 50 MHz, the circuit can be used to

realize the operation in the desired operating frequency of 315 MHz. However, the

frequency double and triple multiplication cannot be realized with the discrete

components available in the laboratory.

Fig. 14: Two transistors FM modulator. [4]

Fig. 15: Modulation of 1 KHz signal using two transistors FM modulator.

In the final decision, the transceivers systems are replaced with the transceiver

modules at 315 MHz. Signal localization is now being tested on these transceivers

modules and the empirical data.

Page 16: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

16

4. Task List and Work Distribution

Transmitter/Receiver System – Tuan Le

At the beginning of the project, the implementation of the transceivers systems by

discrete components is considered. Different methods of modulation were investigated;

the methods including using VCO, simple FM transmitters, Armstrong-type modulator,

etc. By the course of the works on the transmitters, it is determined that to design and

build the FCC compliance transmitter with discrete components is not feasible due to the

low quality component, limited understandings of circuit designs, and the access of

higher quality of equipment and material.

In using the discrete components to build the transmitter/receiver, the task is proved to be

difficult due to the high rate of drifting in operating frequency. The discrete components

are too sensitive to the surrounding environment such as heat, electromagnetic field

interference, RF interference, etc.

Localization (Direction on Arrival Estimation) - Robert Chin

Preliminary Design Methodology

The preliminary design methodology contains information of initial investigations

pertaining to the prospective project scope to provide general localization of AOA at the

receiver. Further research was completed to provide various options for estimating AOA,

methods of combatting noise/distinguishing intended signal, and signal-to-noise ratio

(SNR) calculation/estimation by with empirical data.

Roadmap to Direction on Arrival Estimation via MUSIC Algorithm

Within the conceptual phases as a precursor to the capstone design initiation, the scope of

this project contained localization, which would be accomplished by the means of RSS

(Received Signal Strength). The application of RSS and its uses for localization requires

the many variables of the channel to be identified to eliminate noise components on the

received signal. This identified signal would then be used to calculate the location of

where the signal is emitting.

PL = PL1METER + 10log(dn) + s (7)

Path loss (PL) experienced between sender and receiver (dB)

RXPWR = TXPWR – LossTX + GainTX – PL + GainRX – LossRX (8)

Formula for Received Signal Strength (RSS)

With these two equations the distance, d, can be formulated from all the identified

components of each formula (losses in the channel). However, this process, “rarely produces

acceptable results except in very controlled situations” [5]. Due to the issue of unknown

variables in the channel for maritime use and the necessity of a controlled situation, the use

of an algorithm to determine DOA/AOA was accepted.

Page 17: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

17

There are various different localization techniques that can be used in addition to RSS.

Another technique that was analyzed was the Time of Arrival (TOA) estimation. By

identifying the time differential between signal transmission and reception and the use of

speed of light can determine the distance travelled. A depiction of this is shown in Figure

below.

Fig. 16: The use of TOA to estimate transmitter distance

The radius of the receiver (A, B, and C) is determined by the time of arrival equation, the

difference of time transmitted and time received. By the use of multiple receivers, the

location of the transmitter can be determined by use of triangulation. To find exact location,

the minimum number of receivers required are two for one transmitter.

Distance = c (TimeTransmission – TimeReceived) (9)

Distance Calculation by using TOA (Time of Arrival)

Due to the requirement that the transmitters and receivers must be synchronized (or the

requirement that there is a base station that keeps track of the signals transmission/reception

times and analyze at a broad scope), the TOA estimation for localization was removed and

the DOA estimation was accepted. This is further iterated due to the fact that current

maritime radio communication techniques do not provide the ability to synchronize or build a

network between devices.

With the addition/acceptance of the DOA/AOA estimation as the solution to provide

localization for the communication system, came the analysis of the various different

algorithms that could be use to determine localization. Of these algorithms, MUSIC was

selected, but the analysis between the three was needed (MUSIC, SAGE, and ESPRIT). The

overview of how DOA estimation to find location is shown below. To find exact location,

there must be a minimum of 2 discrete receivers to triangulate the signal transmitter location.

However, the project was re-scoped to provide general location of the transmitter.

Page 18: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

18

Fig.17: Localization by use of DOA/AOA estimation [5]

The MUSIC algorithm and the SAGE algorithm both provide uses of electrical engineering

concepts that are learned in school. However, the result is that the SAGE algorithm becomes

more computationally extensive, especially for an undergraduate student.

Table 2: Comparison between DOA estimation algorithms [6]

Algorithm Advantages Disadvantages

MUSIC (Multiple Signal

Classification)

Provides high resolution DoA

(Direction on Arrival)

estimate

Breaks when signals are

correlated

Covariance matrix with

uncorrelated noise

ESPRIT (Estimation of Signal

Parameters via rotational

invariance techniques)

Array calibration requirements

are not stringent

Limited array geometry

SAGE (Space Alternating

Generalized Expectation

Maximization Algorithm)

Performance is superior to the

subspace techniques especially

in low SNR conditions

Computationally intensive

Ultimately, the decision of using the MUSIC algorithm falls on the difficulty of executing the

other algorithms. In addition, the development of the MUSIC algorithm is used at a higher

frequency (more experimental/practical implementations) than the other two, which would

provide more accessible information and assistance, if necessary. In addition, the re-scope of

the project to only provide the end-user with the general locality of the transmitter allows for

a direct application of the MUSIC algorithm. This is further iterated due to the fact that

various maritime devices are unable to communicate within a network. Thus, they will not be

able to provide each other with the information that they receive and analyze.

Coping with Noise/Interference by Auto-Channel Tuning (Bluetooth FHSS)

During the initial progression of the project, the concept of combatting noise and other

signals occupying the same channel at which the capstone design project would operate. This

concept leads to the overall research into the idea of providing the project with its own

mechanism to operate concurrently with other devices that utilize the same frequency band

Page 19: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

19

(same channels). Investigation into the frequency hopping spread spectrum (FHSS) technique

that Bluetooth® devices use to concurrently operate within the same band as Wi-Fi was

investigated to see how it could be applied to the capstone design project. The FHSS

technique would be used to accommodate for channel noise content. In a sense, this

automation would provide the ability to change channel tuning to the best channel to provide

better signal reception. It would be based on the FHSS technique used by Bluetooth®

devices.

FHSS involves the ability to synchronize the transmitter (master) and receiver (slave) to

simultaneously jump in a pre-determined channel sequence. Ultimately, it would provide for

more noise immunity and result in a more secure method. Due to the fact that Wi-Fi and

Bluetooth® devices occupy the same ISM (2.4 – 2.48 GHz), Bluetooth® devices need to

accommodate for the existence of interference from Wi-Fi. As a result, the Bluetooth master

analyzes (either using RSS or Packet Error Rate, PER) the ISM band and determines a

sequence to use the FHSS technique and will send this channel sequence to the slave device

and establish a connection. This connection will be synchronized between the two devices.

The passing of the pre-determined channel sequence happens during the inquiry phase.

Fig. 18: Call flow between Master and Slave Bluetooth® devices.

Page 20: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

20

FHSS Before Channel Assessment FHSS After Channel Assessment

Fig. 19: Adaptive Frequency Hopping (AFH) after Channel Assessment Technique

The Bluetooth® devices also provide the ability to determine the best hopping sequence

within the various channels of the ISM band. It either uses Packet Error Rate (PER) or

Received Signal Strength (RSS). The master analyzes the various channels of the ISM band

and determines that there is noise content in some of the channels (for PER it sends test

packets to update against packet error), and adapts the FHSS sequence and sends the updated

sequence to the slave. The two then communicate (synchronized) with this new sequence to

accommodate for the noise content.

Table 3: Radio Check for Maritime VHF.

ALPHA 12: X-RAY Two-Three, THIS IS ALPHA One-Two, RADIO CHECK, OVER

X-RAY 23: ALPHA One-Two, THIS IS X-RAY Two-Three, I READ YOU 5 BY 5, OVER

ALPHA 12: ALPHA One-Two ROGER, OUT

Ultimately, this project idea was removed due to the requirement of a new protocol to be

implemented to accommodate for noise handling (a similar protocol to Bluetooth would need

to be implemented to provide the automation of channel selection). In addition, this would

revolutionize current standardized maritime communication protocols (verbal protocol for

channel usage). In conclusion, this would be difficult to change the current standardized

process, which would require much input from the maritime community/regulators and

become a larger scale project.

In conclusion, the preliminary design methodologies provided background knowledge and

information to proceed to the design and implementation of the overall scheme of the project.

These few topics were necessary to provide the elimination of design alternatives, which may

be applicable towards the project scope. It was necessary to analyze the design alternatives to

plan according to the scheduled timeline provided for the localization portion of the capstone

design project.

Page 21: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

21

5. Design Project Details

5.1.Analog Transmitter/Receiver

Subsystem design: Tuan Le

Subsection preparation: Tuan Le

5.1.1. Theoretical Considerations

For designing the analog communications systems, the designed systems must meet

FCC compliance. The channels are 200 KHz apart, with the maximum frequency

deviation at 75 KHz.

For the Armstrong –type modulator, the specifications are calculated as above:

The narrow band is deviated maximum at 1.5 KHz

Narrow band frequency is at 447 KHz

Operating frequency for the second crystal is at 4 MHz

First frequency multiplication is 50, second is 73

5.1.2. Design Procedure

Colpitts crystal oscillator configuration is use for both crystal at 455 KHz and 4 MHz.

The second transistor MPS 918 is replaced by the general purpose transistor 2N3904

for the operating of low frequencies. Figure 9 and 10 confirm the operation of the

oscillator at these frequencies. An appropriate passive low pass filter is placed at the

output of the oscillator to filter out the higher harmonics of the crystals.

A phase shifter is constructed using the schematic and component values provided

above in Figure 7. The potentiometer value is calculated to be 5 KΩ; however the

10KΩ potentiometer is used to replace and compensate for the unknown

characteristics in the circuit.

The MC1496 IC and its schematics are used to implement the carrier rejected

modulation. When operating by themselves, these single block components working

properly. However, when integrate them together for narrow band modulation, the

system did not produce output for the circuit.

Many major obstacles for the construction of the circuit presented themselves such

the impedance mismatch, power mismatch, and the low operating frequency of the

discrete analog components. For the higher frequency multiplication, the circuit

cannot be recognized because of the low gain bandwidth of most of the components.

5.1.3. Observed and Measured Results

From Figure 9 to 12, the plots of power responses show that the block components

are working properly and stable. Figure 15 shows the very stable output of two

transistors type transmitter; this circuit can also be considered to be use as the final

version of the design. However, to get to the desired operating frequency, the VHF

frequency multiplier is needed.

Page 22: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

22

5.2.Digital Transmitter/Receiver Modules

Subsystem design: Brian Unangst

Subsection preparation: Brian Unangst

5.2.1. Design Procedure

When considering the use of digital RF modules to complete the over the air

communication for our prototype, we first need to take into consideration if digital

signal would be able to be used with the MUSIC algorithm software implementation

after being down-converted to a baseband signal. After taking into account that the

microcontroller ultimately converts any message signal into digital samples through

an analog to digital convertor, we concluded that digital transmission was process that

would be feasible to investigate.

RF modules in the 315 MHz range were obtained from a supplier and testing was

begun to characterize the operation of the digital transmission. The RF modules that

we chose were a simple on-off keying design that is known as Amplitude Shift

Keying in the digital communications world. The input and output characteristic of

the transmitter were studied with numerous input conditions. The first input

condition that was implemented was using a function generator to create a square

wave input signal of alternating bit-high and bit-low inputs. These square wave

inputs were varied over a frequency range that matched the bit rate of the transmitter

as given in the data sheet of the device. This input was used to simulated data that

would be coming from a microcontroller that would be coded in a similar wave of

square pulses.

The second input condition to the transmitter that was studied was using real serial

TTL communication data from an Arduino microcontroller. This data was generated

on the microcontroller or through user input into a terminal window of the Arduino

software.

The serial data was used to key the transmitter device by connecting the

Transmit(TX) pin of the serial input output section of the Arduino directly to the data

input of the transmitter. The TTL logic of the microcontroller provided the 5 volt

input signal that was required by the transmitter. The serial data rate on the Arduino

was observed at several key levels to observe the upper and lower limits of the data

rate that was specified of the transmitter module.

Next, the characterization of the receiver module was completed by observing how

various input conditions translated over to the receiving side of the system. This is

where the limits of the data rate became more apparent. A data rate below 100 Hz or

200 bps allowed the data output of the receiver to oscillate between logic high and

logic low at the trailing end of a received pulse. This would not be an acceptable

condition because it would cause significant error in decoding of the serial data. A

slow data rate also caused the data output of the receiver to be very random at times

Page 23: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

23

because a drop in carrier for an amount of time cause the Automatic Gain Control of

the receiver to increase to level that resulted in essential the demodulation of a noise

signal. Once these two conditions were realized, a standard data rate on the Arduino

of 2400 kbps was chosen because it was in the middle of the operating range

specification of the receiver.

The receiver module also has an analog data output called RSSI which is an analog

voltage representation of the relative receiving signal strength at receiver. This

voltage also varied with the ASK input. It was measure to be on the order of 0.5 volts

when no carrier was present and the receiver was only decoding noise. When a

modulate signal was present, the RSSI voltage ranged from 1.0 volts to 1.5 volts

depending up the location of the receiver relative to the transmitter. The connection

of antenna elements (13cm of hookup wire) to the transmitter and receivers also had

an effect of the indicator voltage. An attempt was made to use the analog input pin of

the Arduino to allow for the microcontroller to make a decision of whether an

acceptable modulated signal was present based on the RSSI voltage range. It was

observed that parasitic voltages on the Arduino analog pins made in impossible for

the software to distinguish which of the receiver had an acceptable input and which

did not. It was concluded that the analog input pins were designed for slowly varying

DC voltage and not a quickly varying input signal such as the RSSI voltage. Tests to

demodulate and decode the serial data at the receiver had limited successful results,

with very few test messages being decoded without error.

5.2.2. Observed and Measured Results

Fig. 20: 1 kHz Input Signal.

Page 24: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

24

Fig. 21: 1 kHz Input Modulated Output.

Fig.22: 1 kHz Input and Demodulated Output.

Page 25: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

25

Fig. 23: Serial Data Character Input.

Fig.24: Unstable Output Signal.

Page 26: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

26

Fig. 25: Demodulated Output Data and RSSI voltage.

5.3.Localization – Direction on Arrival Estimation

Sub-system design: Robert Chin

Subsection preparation: Robert Chin

5.3.1. Theoretical Considerations

Summary

Arduino to MATLAB Integration

MUSIC Algorithm – Mathematical Process

Antenna Configuration – (Phase Shift Incident at element-M)

fc = ~400 MHz, λ = .75m, d = 37.5 cm

Signal-to-Noise Ratio (SNR)

Theoretical Considerations

Arduino-MATLAB Interface

The assessment of utilizing the MATLAB software package in sequence with the

microcontroller to provide the AOA estimation graphical interface was investigated.

Within the Arduino microcontroller, it does not provide the ability to plot as easily by

function. In addition, the programming involved with the MUSIC algorithm is quite

intensive. Due to the complex linear algebraic equations and formulations involved with

Page 27: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

27

the MUSIC algorithm, it will require the programming to involve various 3-D arrays to

properly represent the signals acquired from the array antenna of the receiver. The

MATLAB package provides the ability to access existing libraries to provide

mathematical manipulations via functional commands. In addition, the MATLAB

package provides the ability to represent matrices/3-D arrays easily. In the end, it was

determined that the trade-off between the additional overhead from the Arduino-

MATLAB interface or the complex programming, the Arduino-MATLAB interface was

acquired into the project.

Development of the MUSIC Algorithm

The overall considerations and research involved with the MUSIC algorithm required a

detailed understanding of the underlying mathematical operations involved with the

MUSIC algorithm. The final graphical representation is provided by the MUSIC

function.

(10)

MUSIC Function (signal power in dB) dependent on the Direction on Arrival

Looking further into the MUSIC Algorithm functional architecture diagram, two major

elements of the MUSIC algorithm present itself as the signal-space based manipulations.

The observation of the samples of the incoming signals and the eigenvalue

decomposition/subspace partitioning are major elements, which lead to the final MUSIC

function, which provides the ability to see signal power at the respective DOA

estimation.

To start off the covariance matrix of the total samples is created using the correlation

matrix Equation (11). The further composition of xk is iterated by Equation (12), but in

practical use it is difficult to separate the signal from the noise component. By use of an

eigenvalue decomposition methodology (such as SVD), the decomposition of the

correlation matrix, R, is achieved in Equation (13).

(11)

Correlation Matrix, R, of the samples produced at the antenna array of the

receiver

(12)

X is the received signal with the additive noise component from the

channel; alpha is the phase shifting property between each element

(defined by the antenna configuration)

Page 28: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

28

(13)

Eigenvalue decomposition of Correlation Matrix, R

The partitioning of the matrix Q (of the smallest N – M eigenvalues of Q) to produce Qn

would produce the noise subspace. By using the MUSIC Function equation, the DOA

estimation is achieved. When plotting this MUSIC function (dB) versus φ (DOA, °),

would produce a graphical representation of power vs. angle of arrival.

Ultimately, this functional architecture is a clear description of the process of the MUSIC

algorithm. However, the requirement in this capstone project will be to utilize the

solution provided by this algorithm to explain further details of where the emitter is

located. The ‘Find Peak(s)’ system will be iterated by software to determine the highest

power (dB) peak, which would signify the intended transmitted signal’s DOA, and thus

providing a general localization of where it is transmitting.

Linear Antenna Array vs. Concentric Circular Array

As stated above, the addition of antenna configuration concepts were added to the

project. Due to the limitations of the Arduino microcontroller selected for the signal-

processing unit, the specified antenna configuration will contain 4 elements.

However, during implementation, the requirement of an antenna configuration was

needed. Further research into this topic was necessary to proceed forward. There are

many different configurations widely used, but the linear antenna array was selected. The

linear antenna array was a concept that was previously studied in the course Wireless

Communications.

As a side note, the hardware limitations of the Arduino with 4 analog inputs will, as a

result, define the antenna gain at the receiver. The more antenna elements (length of the

antenna array) will produce a higher gain/larger surface area (aperture). Ultimately, this

will result in a higher directivity (which in the end means, it can provide a wider range of

angle of arrival).

(14)

Antenna Gain, Efficiency and Directivity

The received signal will be around the center frequency of 400 MHz (Frequency

Modulation). The antenna configuration, or distance between the elements, is based

directly on the signals at which it is constructed to receive. At the range of 400 MHz, it

was determined that the wavelength, λ, would be about 75 centimeters. In addition, the

separation between elements, d, would be 75 cm/2 = 37.5 cm = λ/2. This requirement

(dependent on the carrier frequency of the signal input) is essential to limit/avoid spatial

aliasing. The spatial aliasing will be caused by the too large of a distance between

elements will provide the wrong period of analytical data.

Page 29: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

29

The purpose of defining the antenna configuration is to determine the phase differential

between each antenna element. This is crucial to the project to ensure that the correlation

between each antenna element for the input into the MUSIC algorithm is properly

configured. Below are the various antenna configurations (Linear Antenna Array and

Concentric Circular Array). These two are basic antenna configurations.

The project uses the Uniform Linear Array to provide the phase difference/time

difference between the received signals at each antenna element. To further analyze this

phase change between elements the time shifting Fourier transform property is needed,

(15)

Fourier Transform property for time shifting a signal

At each antenna element, there is a certain received signal power of X(ω) (which is the

received signal), this received power is offset by a time shift of e^(-j * ω * t_0). This

offset information at each element would then be translated into a correlation matrix, R,

of each of the antenna elements. The time difference, t_0, would vary the different

antenna configurations available.

Linear Antenna Array

Fig. 26: Conceptual diagram of Linear Antenna Array, M elements

The distance between each of the antenna elements would be restricted by d ≤ lambda/2.

This restriction is due to the spatial aliasing. For instance, if the antenna elements were

spaced too far apart you would be working with the incorrect period/peak of the signal.

Page 30: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

30

Thus, the lambda is predefined by the speed of light, c, divided by the frequency at which

you are receiving the signal. Due to this relation,

(16)

Wavelength with respect to velocity of signal and frequency of

signal

In a sense, the velocity of the signal would be estimated to the speed of light, c. This is

due to the fact that radio waves propagate at the speed of light.

Concentric Circular Array

Fig. 27: Conceptual Diagram of concentric circular antenna array, M elements

The concentric circular antenna array provides the ability to characterize the phase

difference between each of the antenna elements by the combination of equations 2 and 3

from the figure above. However, it was deemed that the complexity of this antenna

configuration would require more a larger range of antenna elements (instead of 4).

Page 31: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

31

Ultimately, the antenna configuration (and its predefined arguments – the phase

difference between each element) is necessary to produce the input argument to the

MUSIC algorithm. The basis of the MUSIC algorithm falls on the correct

input/compilation of the correlation matrix, R. The linear antenna array provides phase

changes in terms of basic trigonometry.

Determining Signal-to-Noise Ratio (SNR)

The project also consisted of further investigation into techniques that can provide signal-

to-noise ratio (SNR). This investigation was required due to the signal space processing

techniques used in the MUSIC algorithm. To properly characterize the incoming signal,

the noise subspace must be generated and as a result there needs to be a threshold to

determine the difference between signal and noise. This preliminary determination will

either be provided via SNR estimator module, SNR estimation algorithm, or

statically/dynamically provided by end-user.

(17)

Signal-to-Noise Ratio (Power and Amplitude ratios)

(18)

SNR in terms of Decibels (dB)

Of the various techniques, SNR estimation requires the ability to analyze a channel

before signal transmission occurs. In a sense, there is no ability in existing maritime

radios to provide this. There would be a necessary component to provide the receiver the

information that the transmitter is not transmitting information. When the receiver knows,

it can then analyze the channel and provide the power of noise. However, for this handoff

between receiver and transmitter to be available there would need to be a

network/communication established between the two. However, the currently maritime

radios do not have this capability.

Other methodologies include ways the means of a training sequence to provide SNR

ratio, but this would require an additional system to be added to the scope of the project.

As a result, the project added to the scope that it require that the end-user provide

information pertaining to the SNR ratio which would be utilized by the MUSIC algorithm

to separate the noise and signal subspaces to provide AOA.

5.3.2 Design Procedure

Iteration 1 – Initial Algorithm

The initial design for the MUSIC algorithm consisted of using MATLAB to simulate the

process of the MUSIC algorithm. These test applications allowed the user to simulate by

specifying AOA, the power of incoming signals, samples, wavelength, antenna elements,

Page 32: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

32

and variance of noise. After understanding further the potential of the MUSIC algorithm,

it would then be placed into development for the senior design project.

The next step in the process would be to understand further the process of how the

MUSIC algorithm goes about creating the input information to the algorithm. How it

populated certain matrices/arrays to be used as digital information for the algorithm. To

do this, the functional architecture was necessary to be understood. This necessary

requirement needed background/walkthrough information pertaining to the complex

linear algebraic/signal space mathematical operations.

After understanding the process of the MUSIC algorithm, the next step was to start

developing the code behind the scenes to produce the DOA estimation of empirical data

retrieved from the receiver.

It was realized that the Arduino required much programming to emulate the complex

mathematical process of the algorithm. The MUSIC algorithm consists of many arrays or

matrices, which characterize multiple input arguments to each functional process of the

algorithm. Thus, the Arduino-MATLAB interface was determined as useful as it, in

addition, can provide graphical representation, which would ultimately provide the end-

user a proper graphical representation of the MUSIC algorithm.

Iteration 2 – Test data from the Function Generator

After the MUSIC algorithm was developed, the preliminary step to putting the algorithm

in play would be to create a staging environment. This environment consisted of utilizing

function generators to produce a phase shift between each of the antenna elements to

produce an emulation of the algorithm processing an incoming signal to generate

direction on arrival.

However, due to the limitations of the Arduino-MATLAB interface, the incoming signals

could not be sampled at a rate sufficient enough to retrieve proper characteristics

(Nyquist rate). Thus, it was directed to emulate the incoming signals mathematically by

software to bypass the sampling restriction by the hardware limitations.

Iteration 3 – Emulate Data using MATLAB

Due to the hardware limitations, the incoming signals were characterized by MATLAB to

simulate empirical test cases. The bypass of the hardware limitations allowed the input

signals to be specified at a frequency of 400 MHz (in addition, sampled at 800 MHz), and

then the information was sent to the functions for further processing to the graphical

representation of the direction on arrival.

Iteration 4 – SNR Determined Statically/or Dynamically by End-User

The last iteration of the localization portion of the project consisted of the user

dynamically inputting the data for the SNR. It would provide the algorithm with a means

to distinguish noise from actual signal.

Page 33: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

33

5.3.3 Simulation Results

Simulated Test Cases for Proposal/Design Review

Fig. 28: Test case 1 – Single Signal Received, No Noise

Test case 1 is a simulation of an ideal situation where the is very little noise. There is

only one incoming signal to the algorithm. The DOA estimator sits in a receiver with 4

antenna elements (as a linear antenna array). The wavelength specified follows the design

for a 400 MHz signal at .75m.

The resulting waveform generated as a result of the MUSIC function shows an ideal delta

situated at the 0 degree mark.

Page 34: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

34

Fig. 29: Test Case 2 – Multiple Signals, Noise content available

The following test case is of multiple signal inputs to the MUSIC algorithm. The AOA of

each signal is 45 and -45 degrees respectively. The samples have been decreased from

test case 1, but the result is the same. There are spectral distributions/peaks at the

corresponding AOA of each of the incoming signals.

Again, the same specifications of test case 1 are available here. Antenna elements of the

linear array antenna are 4 and wavelength is specified at .75m.

In the end, these test cases proved as preliminary simulations of potential outcome of the

MUSIC algorithm when implemented. The difficulty is the practical implementation of

the wavelength to distance between antenna elements, noise recognition, and producing

the signals for input into the algorithm. However, this proves the algorithm has the

potential to provide general localization as specified in the scope of the project.

Page 35: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

35

5.3.4 Observed and Measured Results

Empirical Information Analyzed by Arduino

0 10 20 30 40 50 60 70 80 90 1000

100

200

300

400

500

600

700

800

900

1000

11005V ~ 1023

Sample [1:1000]

val =

analo

gR

ead()

Fig. 30: Test Scenario 5V, y = 1023, as a reference to digital signal characterization

0 10 20 30 40 50 60 70 80 90 1000

100

200

300

400

500

600

700

800

900

1000

11000V ~ 0

Sample [1:1000]

val =

analo

gR

ead()

Fig. 31: Test Scenario 0V, 0, as a reference to digital signal characterization.

Page 36: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

36

These test scenarios serve as a means of determining empirically the ceilings and floor of

the digital data provided by the A-to-D converter.

0 50 100 150 2000

500

1000

Analog Input A0 -- East

Sample [1:100]

val =

analo

gR

ead(A

0)

0 50 100 150 2000

500

1000

Analog Input A1 -- North

Sample [1:1000]

val =

analo

gR

ead(A

1)

0 50 100 150 2000

500

1000

Analog Input A2 -- West

Sample [1:1000]

val =

analo

gR

ead(A

2)

0 50 100 150 2000

500

1000

Analog Input A3 -- South

Sample [1:1000]

val =

analo

gR

ead(A

3)

Fig. 32: Test Scenario, function generator input to analogRead(ports A0->A3)

This provides a clear signal analog-to-digital conversion of the input to the analog read

ports of the Arduino. However, the characteristics of the signal are specified by the

function generator at f = 1.07 Hz, A = 2.05V, A-Offset = 1.180V. The sample count is

200.

Although, the signal seems to be characterized pretty well in these diagrams, when

reaching higher frequencies the A-to-D converter cannot maintain its stability/function as

it retains previous information as a result of buffering to quickly. Thus, the maximum

frequency at which the Arduino-MATLAB interface can handle is about .5 – 1 Hz max

frequency of input signal to sample it sufficiently.

Page 37: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

37

Emulated results from MATLAB simulation

Case 1: SNR = 100, AOA = -45

0 100 200 300-2

-1

0

1

2Analog Input A0

Sample [1:samples = 500]

val =

analo

gR

ead(A

0)

0 100 200 300-1

-0.5

0

0.5

1Analog Input A1

Sample [1:samples = 500]

val =

analo

gR

ead(A

1)

0 100 200 300-0.4

-0.2

0

0.2

0.4Analog Input A2

Sample [1:samples = 500]

val =

analo

gR

ead(A

2)

0 100 200 300-1

-0.5

0

0.5

1Analog Input A3

Sample [1:samples = 500]

val =

analo

gR

ead(A

3)

Fig. 33: Signal inputs for 4 antenna elements, at AOA = -45 degrees.

Page 38: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

38

-100 -80 -60 -40 -20 0 20 40 60 80 100-50

0

50

100

150

200

250

Angle of Arrival (phi)

Decib

els

(dB

)

MUltiple SIgnal Classification Function

Fig. 34: MUSIC Algorithm plot for -45 degree AOA.

Page 39: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

39

Case 2: AOA = 65, SNR = 0

0 100 200 300-5

0

5Analog Input A0

Sample [1:samples = 500]

val =

analo

gR

ead(A

0)

0 100 200 300-5

0

5

10Analog Input A1

Sample [1:samples = 500]

val =

analo

gR

ead(A

1)

0 100 200 300-5

0

5Analog Input A2

Sample [1:samples = 500]

val =

analo

gR

ead(A

2)

0 100 200 300-4

-2

0

2

4Analog Input A3

Sample [1:samples = 500]

val =

analo

gR

ead(A

3)

Fig. 35: Signal inputs at 4 antenna elements, AOA = 65, SNR = 0.

Page 40: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

40

-100 -80 -60 -40 -20 0 20 40 60 80 100-20

-10

0

10

20

30

40

50

60

Angle of Arrival (phi)

Decib

els

(dB

)

MUltiple SIgnal Classification Function

Fig. 36: MUSIC Function Plot for 65 degree AOA.

Page 41: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

41

Case 3: SNR = 50, AOA = 65

0 100 200 300-2

-1

0

1

2Analog Input A0

Sample [1:samples = 500]

val =

analo

gR

ead(A

0)

0 100 200 300-1

-0.5

0

0.5

1Analog Input A1

Sample [1:samples = 500]

val =

analo

gR

ead(A

1)

0 100 200 300-1

-0.5

0

0.5

1Analog Input A2

Sample [1:samples = 500]

val =

analo

gR

ead(A

2)

0 100 200 300-1

-0.5

0

0.5

1Analog Input A3

Sample [1:samples = 500]

val =

analo

gR

ead(A

3)

Fig. 37: Signal Inputs for AOA = 65, SNR = 50.

Page 42: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

42

-100 -80 -60 -40 -20 0 20 40 60 80 100-20

0

20

40

60

80

100

120

140

160

Angle of Arrival (phi)

Decib

els

(dB

)

MUltiple SIgnal Classification Function

Fig. 38: MUSIC Algorithm Plot for AOA = 65, with SNR = 50.

Table 4: Tabulated Signal Received Time shift at Respective antenna (Test Case Data)

Test Case # AOA Phase Shift 0 Phase Shift 1 Phase Shift 2 Phase Shift 3

1 -45 x(t - 0) x(t + .3321) x(t + .6642) x(t + .99)

2 65 x(t) x(t – 1.24) x(t – 2.48) x(t – 3.723)

3 65 x(t) x(t – 1.24) x(t – 2.48) x(t – 3.723)

(19)

Fourier Transform property for time shifting a signal

Of the few test cases of the emulated empirical data, the localization provides AOA at certain

test cases of angles and noise content. This information is obtained by the geometric identity of

the AOA and the linear antenna array. It is formulated that t_0, the phase/time shift between the

elements, would be represented by: (k = which element) * (lambda/2) * d * sin(AOA).

Of the various test cases, they can retrieve AOA quite sufficiently, with some aspect of noise

affecting the MUSIC function plotted.

These signals are simulated as a result of the angle of arrival being pre-defined as a test case, and

used a means of manipulating the received signal at each of the various antenna elements. In the

end, the threshold for determining the noise subspace is defined by the SNR ratio. In the cases

where the SNR ratio is lower, there are resulting additional peaks rising at unwanted angle of

Page 43: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

43

arrival statistics. However, it is still predominately at the angle of arrival specified by the test

case.

6. Sub-system Integration Considerations

Integration of DOA Estimation Signal Processor with Receiver

Initially in the intended system design, the DOA estimator would retrieve information

through direct connections to each antenna element’s respective RF down conversion line.

However, during implementation, the difficulty of obtaining correct signal characteristics due

to the limitations by the hardware used to process the DOA estimation became apparent. It

was deemed that the signal-processing unit could not sample at a rate sufficient enough to

characterize the 315 MHz carrier signal of the FM signal. To cope with this issue, the

empirical data used to classify the signals were analyzed mathematically and inputted to the

algorithm by the means of MATLAB commands. This provided the capability to bypass the

inability to sample at a rate that satisfies the Nyquist sampling rate, or a sufficient sampling

rate.

7. Economic Considerations

7.1.Cost Analysis – Prototype

Transmitter/Receiver System

It is unsuccessful to design and construct the prototype of the transceivers systems;

the transceiver modules were used in place of the prototype to establish the

transmitting and receiving signal. Any transceiver modules at 315 MHz range can be

used to this testing purpose.

Localization

Device/H

ardware

Q Cost ($) Description

Arduino

Uno R3

1 50.00 Microcontroller (Core Hardware)

USB A-

to-B

Cable

1 20.00 Peripheral

This microcontroller will be used to take the analog data tapped from the RF down

conversion of the single channel receiver and convert to digital data to be analyzed by a

software application. This hardware will be the component, which will hold the MUSIC

algorithm (via software implementation). The microcontroller has the capability of A-to-D

conversion via one of the inputs. It will be coded in a C-variant type programming language.

Page 44: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

44

7.2.Cost Analysis - Final Version

Transmitter/Receiver System – Final Version

There is no available cost analysis for the prototype transceiver system. Transceiver

modules were used for the testing purpose of MUSIC algorithm. These modules price

range varies from $5 to $35.

Localization – Final Version

Due to the limitations of the initial design, the final version of the product would

consist of a discrete system, which would process the A-to-D conversion of the

analog received information. It was determined that the A-to-D converter within the

Arduino addressed processing limitations and additional overhead due to multiple

analog read ports being multiplexed into the same A-to-D converter. Thus, this would

mean that if sufficient time were not provided to the A-to-D converter it would

produce incorrect results or misleading information to the algorithm. In addition, the

Arduino-MATLAB interface would be eliminated to provide more portability to the

product so that it could be further utilized in the maritime community. As the

alternate solution to this capstone design would be an existing maritime radio. Further

for a final version, it would require full encapsulation of the hardware to provide a

secure environment for the maritime radio alternative. In addition, potentially the

antenna array would be provided as a circular array or planar array to provide for a

more reasonable DOA estimation (currently with the antenna array, there are

limitations to deciphering between north and south with respect to the broadside of

the array).

8. Manufacturability

Transmitter/Receiver System

The design and implementation of communications systems did not return the positive

results. The system is incomplete. The final design schematics are not available; therefore

the manufacturability is not possible.

Localization

The subsystem of the DOA estimation could become mass-produced, but it will require

that the additional feature of an array antenna be included. The array antenna currently

presents some flaws towards distinguishing signals with respect to north and south of the

broadside of the linear antenna array. Thus, it will present itself as potentially misleading,

which may lead to unintended output for the end-user. In this end, this system is

incomplete to situate itself for emergency purposes of general localization.

Page 45: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

45

9. Marketability

Transmitter/Receiver

The final design product is not available; therefore, there is no possibility of

marketability. The software portion of the project is still missing various factors in

determination of signal’s location such as the signal attenuation factor, signal

propagation, etc. More study is needed before conduct any further systems

implementation.

Localization

As a result of the final version cost analysis and the manufacturability of the localization

portion of the project, it is deemed as unmarketable. Due to the constraints of the overall

general localization, the competitor of global position systems (GPS) presents itself as

much more useful by the means of a larger scale of line-of-sight, and it can very well

precise indicate the location of where the person is transmitting from (given that they are

using the same technology). In addition, the limitation of the linear antenna array

provides further unmarketable aspects as it cannot decipher the difference between north

and south with respect to the antenna array, and can only provide general localization of

east and west as a result of angle of arrival estimation.

10. Individual Discussions

10.1. Overview Discussions of the Project

10.1.1. Tuan Le

The project is the demonstration of the understandings and utilizing the knowledge

gained in Communications course works. Using the comprehension of block systems,

the goal of the project is to construct complete systems of communications. However,

with the limited knowledge and short of preparation, the hardware portion of the

project did not reach the immediate goal of the project of building a complete system

of communications. More extensive comprehension of sub-block systems design and

implementation is needed to construct the systems at discrete level.

Moreover, systems integration between the block components and between the

hardware and software portion did not return the positive results. To be more

successful, more understanding of hardware systems integration is needed; more

importantly, the extensive comprehension of MUSOC algorithm is needed to

implement the systems with more realistic factors in determine signal’s location, such

as signal propagation, power attenuation, environment of transmitting and receiving,

and many other hardware specifications.

Page 46: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

46

Overall, the project is not built on a strong central idea and knowledge of

communications systems designs. The scope of the project is somewhat beyond the

understandings of the group and the capability of the laboratory equipment.

However, the project explores and confirms the concept of using MUSIC algorithm in

determining signal’ general direction. To find the detail signal’ location, received

signal strength is needed to find the distance base on power attenuation, and others

environment and hardware factors.

10.1.2. Brian Unangst

The capstone design project process has been an eye opener as to how all of the skills

learned as an engineer are used in a true design and built situation. The process from

the initial conception of the project idea through the final design presentation has

been a great learning experience. The design process since the initial conception of

the idea has slowly cut the very large scope of the first multi-channel design, down to

a final prototype that was mostly successful in being implemented in the lab. The

design process had two very distinct tracks, one following the software design and the

other following the associated hardware design. As a design group, we conducted

effective research to slim our idea down to a basic scope we could handle.

Our final prototype idea consisted of a transmitter and receiver system that would use

the MUSIC algorithm for general localization and angle of arrival calculation to find

the direction in which our transmitted signal was radiating from. The system would

use relatively basic transmitter and receiver design, which significant system success

being place on sub-system integration and software performance. The system to

software integration was chosen to take place over the Arduino microcontroller

platform because of its ease of use to design and prototyping. The use of the entry

level microcontroller proved to be a major limiting factor in our system success and

performance. The process for the algorithm was chosen to be completed using

Matlab programming that would be directly linked to the Arduino through an

opensource library. We concluded that much faster processing would be needed in

the analysis software and the sub-system integration for successful testing before our

prototype would be feasibly close to the marketing and manufacturing. Testing of the

individual sub-systems showed that they worked in an acceptable manner as stand-

alone systems; however design oversights and limitation are holding the system back

from working together as a whole.

The marketability of our initial project idea was limited of the Maritime Radio market

because we assume that this technology would be used in fairly long distance tracking

of communication transmission. The price of our manufactures system would have to

be significantly cheaper than already available technology to be able to punch into the

market and to change sales from the present trusted technology. I believe our system

technology could also be marketed to interact with existing technology that is already

included in the maritime radio market. Much more research, design, and testing

would have to be completed to make that an acceptable marketing aspect of our

system.

Page 47: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

47

The manufacturing techniques for our system would not be very different from other

automated electronics manufacturing that is done today. Ultimately our system

would consist of much smaller surface mounted components in which the entire

receiver structure including processing requirements and associated antenna feed

connections would fit on a PCB board. Manufacturing our system as a standalone

product or an upgrade to existing technology would definitely help in marketing and

this would have to be taken into account also.

10.1.3. Robert Chin

This capstone project is associated with the many necessary fundamental engineering

concepts learned throughout the semesters of the ECE curriculum. The understanding

of the modulation techniques, the bandwidth consumption, circuit parasitic effects,

mathematical methods, and basic programming skills were necessary to complete this

project design (from project proposal to final report).

From the beginning, the analysis of the initial project proposal was necessary to de-

scope certain topics, which were deemed as difficult to implement practically. For

instance, the project had consisted of utilizing the path loss equation with

consideration of the link budget equation to formulate the distance between the

transmitter and receiver. This was a major component of the project scope, which

would determine the localization portion of the project. In a sense, de-scoping this

would ultimately lead the project to a basic transmitter receiver system. However,

with the constraints of the project proposal (the fact that this project will be used

within the maritime community), it was necessary not to actually remove the

localization portion, but to provide general locality of the transmitter (which would be

provided by direction on arrival estimation). This component would fit in the overall

system architecture as a parallel component to the demodulation of the transmitted

signal (the radio signals).

Firstly, the discussion of the transmitter and receiver is necessary to understand the

basis of this project. The transmitter is the way at which message signals are encoded

within a carrier signal to be able to transmit at a certain frequency. Ultimately, this

transmitted signal would travel through a channel specified by this frequency. There

are many methods of transmitting a signal through a channel, such as amplitude

modulation or frequency/phase modulation. In a sense, amplitude modulation

encapsulates the message signal in the amplitude variations of the carrier signal. This

design project involves the use of frequency modulation to transmit the signal. The

reasoning of utilizing frequency modulation is the fact that currently maritime radios

utilize the technique for transmitting information. In addition, with respect to

amplitude modulation, FM provides more protection to noise affects in the channel.

The next step is to recover the transmitted message signal encoded in the carrier

signal being transmitted in the channel.

Page 48: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

48

There are various ways to demodulate/receive a FM signal; of the many receivers

available there are the super-heterodyne FM receiver, the super regenerative, or the

phase locked loop. Of these different receivers, the idea is that they analyze the

frequency/phase variations in the signal and output the frequency/phase changes with

respect to time to provide the original message signal.

Ultimately, the foundation of this project presents itself useful in the maritime radio

community. This project provides a basic transmitter/receiver system with the

additional feature of general localization by direction on arrival estimation. It is a

radio which transmits/receives FM signals at a frequency of 400 MHz, and it provides

the direction on arrival estimation by use of the Multiple Signal Classification

algorithm.

The overall economic considerations for this project are based on the fact that it is a

very cost-effect way to simulate the localization provided currently by GPS.

However, not an exact competitor to Global Positioning Systems, it provides a

general idea of where the transmission is emitting. This is one feature that is not

provided as an additional feature within maritime radios, but it can be provided as a

cheap beaconing system provided to boats/ships within the maritime community. In a

sense, it may be a cost effective alternative to the GPS, but it does not provide the

same exact features (due to the fact that GPS provides a larger scale of line of sight –

due to satellite connectivity). Thus, in emergency situations, it may be more feasible

to go to the more expensive equipment due to the fact that it provides a much more

reliable result and is currently the method of rescue operations within the maritime

community.

The manufacturability of this project is possible due to the types of methodology used

within this design factor. In a sense, the basic transmitter/receiver system is utilized in

various different radios that exist today. The discrete components within are based on

the Armstrong FM radio (a widely used technique for FM transmission, and a patent

held by Edwin Howard Armstrong). The one variation of the maritime radio scope is

that the VHF band lies within the range of 156 to 162 MHz. The requirement will be

that this design scope will need to downscale its components to provide the FM

transmission at 156 to 162 MHz, rather than the currently experimentally developed

400 MHz transmission. In a sense, this would require that the antenna configuration

and the localization also be modified to associate itself with the change in frequency

range operation. However, in the end, the manufacturability of the project is definite,

but will require some modifications to abide by the laws and requirements set forth by

the FCC.

The marketability of this project strictly lies on the project’s ability to provide the

additional feature of general locality to the end-user. In a sense, currently the ability is

somewhat limited by the antenna configuration, adapting the project to the

modification from a linear antenna array to a circular antenna array will provide more

directivity from the antenna aperture as a result of the modification. The more

directivity will provide a larger range of AOA in comparison to the linear antenna

Page 49: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

49

array. In a sense, currently limitations of the uniform linear antenna array restrict and

provide some ambiguity to deciphering the differences between north and south. With

this small upscale, the localization portion will be an actual alternative to the Global

Positioning System. Ultimately, the marketability will be provided as an alternative to

the current GPS technology, but it will be difficult to market as a result the line-of-

sight operation of this radio is on a much lower scale than the current GPS

technology. Thus, as a result, for emergency purposes or location purposes in general

it may be hard to compete with the large scale of light-of-sight as a result from a

satellite.

In the end, the project proposal to project final report consisted of utilizing the many

skills gained from the ECE curriculum. However, there was one issue of systems

integration where the localization portion should be integrated with the receiver. Due

to the current limitations of the hardware, it was difficult to sample at a rate sufficient

to support the intended frequency of 400 MHz. In a sense, following the Nyquist

theorem, it would be required that the microcontroller sample at a rate of 800 MHz to

sufficiently account for the signal characteristics. However, this was very difficult

due to the limitations of the Arduino-MATLAB interface. To bypass this restriction,

the emulation of the FM characteristics were completed within the MATLAB

interface to provide the emulation of the handoff of the channel to the receiver (and

the input to the MUSIC algorithm).

10.2. Detailed Discussion of Pertinent Sub-systems

10.2.1. Tuan Le

The current products of transceivers modules are widely available with high

reliability and relatively low cost. For future implementation of the project, these

modules should be used to establish the connections of the systems for further study

and utilize MUSIC algorithm in determine signal location. It is unnecessary to

construct a new transceiver system; the existing systems can be used to integrate with

MUSIC algorithm for signal localization. After establishing the more concrete detail

in the performance of the algorithm, the transceiver systems modification might be

issued to further advance the performance of the overall systems.

In using MUSIC algorithm for signal localization, more knowledge of realistic

environment factors and hardware factors are needed. By integrating these factor into

the system, more accurate estimation of signal location may be achieved and

perfected.

10.2.2. Brian Uanagst

The hardware implementation was fairly well planned out after a concise idea of the

scope of the project was agreed upon. A single transmitter on one channel with a

receiver for down-conversion for each element in the antenna array needed for the

Page 50: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

50

MUSIC algorithm. Multiple design iterations were completed on the analog

transmitter and receiver designs. Each design that was completed only gave a mild

success and could not be paired together to work for a final prototype. We decided to

move on the research that we had conducted on pre-manufactured RF modules and

based on availability we chose to use digital components.

The majority of the development for these components was testing the transmitter and

receivers to see how they would perform to the various conditions they would be

under in our system. The testing phase proved many of the simple performance

characteristics that we assumed would work correctly using commercial-off-the-shelf

components. The testing and characterization also brought about aspects of their

operation that we had not been aware of just by reading the data sheet. The automatic

gain control operation and how it would affect our selection of the data rate is one

specific operation aspect that was encountered during initial testing.

The pre-manufactured transmitter-receiver pair performed as we expected to for a

prototype testing and worked fairly well under the laboratory conditions; however if

we were to commercially market our final prototype, the components would be

upgraded from developer grade electronics to those that would be more reliable in the

field. The 315 MHz unlicensed band operation would most likely be adapted to the

maritime radio band to reduce the effects of noise and interference, assuming that the

technology was properly migrated into the market. The components we used work as

a proof of concept that could be greatly expanded up if future commercial

development were to occur.

10.2.3. Robert Chin

Transmitter/Receiver System

As stated previously, the capstone design project consisted of a basic FM

transmitter/receiver system. The transmitter consists the operation of encoding the

message signal within the carrier signal’s frequency variation. As noted from the

equation below, the message signal will be encoded as a the frequency component of

the FM carrier signal (denoted by f(τ)). In a sense, this component is the

instantaneous frequency of the carrier signal. This frequency is dependent on the

message signal. Thus, as a result of encapsulating the message signal within the

frequency component of the carrier signal, the message signal is less susceptible to

noise (but, can still be impacted by noise).

Equation 10.2.3.1 – Frequency Modulation

Page 51: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

51

The design also utilizes a super-heterodyne receiver to recover the message signal

from the carrier signal within the 400 MHz frequency channel. One special aspect of

this model is that the IF amplifier will allow the receiver to drop the signal down to a

more operational frequency, and will provide a lower scale of frequencies to operate

with.

Figure 10.2.3.2 – Super-Heterodyne Receiver

Ultimately, the demodulation of the FM signal will consist of analyzing the carrier

signal, whether it is at the 400 MHz initial operation or the intermediate frequency of

down conversion. The frequency variations will be analyzed to recover the original

message signal.

Localization

The additional aspect of the localization portion of the project will consist of tapping

off signal content from the receiver. Note the figure above shows a top-level diagram

of the receiver, in a sense, this operation will consist of a four parallel interfaces,

which will provide the same operation (however, it will analyze a phase differential in

each of the carrier signals due to the positional difference in the antenna array). As a

result of 4 parallel channels of each of the antenna elements, the tapped off signal

content will be sent to the MUSIC algorithm (which will provide the DOA

estimation). Each antenna element will vary by a small time differential/phase

differential from the reference antenna element. This information will be formulated

into a covariance matrix. The covariance matrix will be decomposed via eigenvalue

decomposition. The eigenvalues will be filtered and ordered as a result of the

predefined threshold of the noise power. Thus the eigenvalues will be segmented into

two matrices the noise subspace and signal subspace. The noise subspace will be used

to plot the DOA estimation. Depending on the modifications to the system, the

MUSIC algorithm will need to be changed as a result of the classification of the

antenna elements. For instance, it is currently statically programmed to support the

Page 52: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

52

linear antenna array, but a slight modification will be necessary to support the circular

antenna configuration. Ultimately, this DOA estimation by the MUSIC algorithm will

act as a cost-effective alternative to the current standard of GPS.

Page 53: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

53

APPENDICES

Appendix 1: List of Equipment

Hewlett Packard 3314A Function Generator.

Hewlett Packard 8648A 100 kHz – 1000 MHz Signal Generator.

Tektronix DPO4032 Digital Phosphor Oscilloscope.

Agilent E4411B 5 kHz – 1.5 GHz ESA – L Series Spectrum Analyzer.

Agilent 34401A Digital Multimeter.

PS503A Dual Power Supply.

Sencore LC102 Auto-Z Capacitor-Inductor Analyzer.

BNC Cables.

Page 54: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

54

Appendix 2: Simulations and Program Code

MUSIC Algorithm – DOA Estimation - Prototype %======================================

% Practical Implementation of MUSIC

% MUltiple SIgnal Classification

% Algorithm

%======================================

% Developed Robert Chin, Undergraduate Student - Rutgers Univ School of Eng

% Capstone Design - Hardware Comm Sys (Prof. David G. Daut)

%======================================

clear all

close all

%============================

% Emperical Data - Pulled from Arduino

%============================

lambda = .75/100; %antenna spacing between elements, .75m for 400 MHz signal

kp=2*pi/lambda; %wave number

d = lambda/2;

noise = 1;

SNR = 0; %end-user will predefine the noise content/noise power

noise = 1/(10^(SNR/10));

antenna_elements = 4;

samples = 300;

rate = 1/samples;

a = arduino('COM3')

%Getting steering vectors/signals (at the antenna elements)

%A0, A1, A2, A3 of the Arduino (Analog Inputs)

%tic;

%dual reading reduces the error

%"Are you using analogRead for anything else? As the analog pins share a

%single A2D, rapid use of it can cause the previous read to impact the

%next. A common workaround in this situation is to read twice on each input,

ignoring the first."

for x = 1:samples;

dummy = a.analogRead(0);

signalA0(x) = a.analogRead(0);

dummy = a.analogRead(1);

signalA1(x) = a.analogRead(1);

Page 55: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

55

dummy = a.analogRead(2);

signalA2(x) = a.analogRead(2);

dummy = a.analogRead(3);

signalA3(x) = a.analogRead(3);

end

%time=toc;

figure(1);

subplot(2,2,1) %Plot Sampled Signal from Port 'A0' (E)

plot( [1:samples] , signalA0);

title('Analog Input A0');

xlabel(['Sample [1:samples = 500]']);

ylabel('val = analogRead(A0)');

axis([0 samples 0 1100]);

%

for x = 1:samples;

signalA1(x) = a.analogRead(1)

end

%

subplot(2,2,2); %Plot Sampled Signal from Port 'A1' (N)

plot([1:samples], signalA1);

title('Analog Input A1');

xlabel('Sample [1:samples = 500]');

ylabel('val = analogRead(A1)');

axis([0 samples 0 1100]);

%

for x = 1:samples;

signalA2(x) = a.analogRead(2)

end

%

subplot(2, 2,3); %Plot Sampled Signal from Port 'A2' (W)

plot([1:samples], signalA2);

title('Analog Input A2');

xlabel('Sample [1:samples = 500]');

ylabel('val = analogRead(A2)');

axis([0 samples 0 1100]);

%

for x = 1:samples;

signalA3(x) = a.analogRead(3)

end

%

subplot(2,2,4); %Plot Sampled Signal from Port 'A3' (S)

plot([1:samples], signalA3);

title('Analog Input A3');

xlabel('Sample [1:samples = 500]');

Page 56: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

56

ylabel('val = analogRead(A3)');

axis([0 samples 0 1100]);

%=====================================

% Produce big X from antenna array

%

%=====================================

X(1, :) = signalA0;

X(2, :) = signalA1;

X(3, :) = signalA2;

X(4, :) = signalA3;

%

%=====================================

% Create Synthetic Data -- Staging

% S = Signal, N = Noise

%=====================================

%

%.75 cm = wavelength of 400 MHz signal

lambda = .75/100; %wavelength (meters).. predefined by what frequency i'm

trying to pickup c/lambda = f

kp=2*pi/lambda; %wave number (angular wave number)

d = lambda/2; %d must be at least lambda/2 -> to avoid spacial aliasing

antenna_elements = 4; % the higher the elements the larger the aperture

(higher directivity)

samples = 300; %this is limited by how fast my code runs, ie. 300

samples/(15/4 elements) = samples/second

input_signals = 1; %only one input signal (will be a combination of all in

the channel)

frequency = [1]; %kHz, .1 kHz == 100 Hz, 400000 kHz == 400 MHz

angle = [0];

SNR = 50;

noise = 1/(10^(SNR/10));

%depending on the AoA speficied will alter the phase difference

%as the distance increases, the phase element*d will increase

%initially the power will be strongest at the 1st antenna element

S=zeros(input_signals,samples);

k = 1 : samples;

for i = 1 : input_signals;

%S(i,:)=sqrt(2)*sin(2*pi*frequency(i)*k);

S(i,:)=fmmod(sin(2*pi*(.001)*k), 4000000000, 8000000000, 50); %simulating

frequency modulation, 800 = Fs, sampling rate

end

figure(4);

plot( [1:samples] , S(1,:));

Page 57: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

57

title('Input (Modulated) Signal - FM/AM/Non-Modulated');

xlabel(['Sample [1:samples = 300]']);

ylabel('Amplitude');

%axis([0 350 0 2]);

N=zeros(antenna_elements,samples);

noise=1/(10^(SNR/10)); %noise power

for i=1 : antenna_elements;

N(i,:)=sqrt(noise)*randn(1,samples); %Create normal distributed pseudorand

end

alpha=zeros(antenna_elements,input_signals);

l = 0 : ((antenna_elements)-1);

for i = 1 : input_signals;

alpha2=exp(j.*l*kp*d*sin(angle(i)*pi/180));

alpha(:,i)=alpha2.';

end

X = zeros(antenna_elements, samples);

for i = 1 : samples;

X(:,i) = ( alpha * S(:,i) ) + N(:,i);

end

%

figure(1);

subplot(2,2,1) %Plot Sampled Signal from Port 'A0'

plot( [1:samples] , X(1,:));

title('Analog Input A0');

xlabel(['Sample [1:samples = 500]']);

ylabel('val = analogRead(A0)');

%axis([0 samples 0 1100]);

subplot(2,2,2); %Plot Sampled Signal from Port 'A1'

plot([1:samples], X(2,:));

title('Analog Input A1');

xlabel('Sample [1:samples = 500]');

ylabel('val = analogRead(A1)');

%axis([0 samples 0 1100]);

subplot(2, 2,3); %Plot Sampled Signal from Port 'A2'

plot([1:samples], X(3,:));

title('Analog Input A2');

xlabel('Sample [1:samples = 500]');

ylabel('val = analogRead(A2)');

%axis([0 samples 0 1100]);

subplot(2,2,4); %Plot Sampled Signal from Port 'A3'

plot([1:samples], X(4,:));

title('Analog Input A3');

xlabel('Sample [1:samples = 500]');

ylabel('val = analogRead(A3)');

%axis([0 samples 0 1100]);

Page 58: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

58

%====================================

% Plot Frequency Spectrum

%====================================

%

n = [0: samples];

N3 = 1024;

%signalA0test = cos(2*pi*n/10);

%BigX1 = abs(fft(signalA0test, N3));

BigX1 = abs(fft((X(1,:)), N3));

BigX1 = fftshift(BigX1);

F1 = [ -N3/2: N3/2 - 1];

figure(2);

plot(F1, BigX1), title('Frequency Spectrum - N = 1024'), xlabel('frequency/ f

==(10/x)'), ylabel('|Y(f)|'); xlim([-500 500]);

%

%======================================

% Create Covariance Matrix, R

%

% R = 1/K summation (1 to K): x_k*x_k'

% X = alpha*S + N

%======================================

R = zeros(antenna_elements,antenna_elements);

for i = 1:samples;

covariance = X(:,i)*(X(:,i)');

R = R + covariance;

end

R = R/samples;

%======================================

% R = Q * L * Q' -- Eigenvalue Decomposition

%======================================

[eigenvectors, eigenvalues] = eig(R, 'nobalance');

for i=1:antenna_elements

diagonal(i)=eigenvalues(i,i);

end

decending_sort = sort(diagonal)

%======================================

% Q -> Q_n -- Noise Subspace

%======================================

Page 59: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

59

%noise = 500000; %background noise level

for i = 1 :antenna_elements

diagonal_elements(i) = eigenvalues(i,i);

end

sort_diagonal = sort(diagonal_elements);

count = 0;

for i = 1 : antenna_elements

if sort_diagonal(i) < (1.5*noise)

count = count + 1;

end

end

Q_n=zeros( antenna_elements , count);

Qmain = zeros(antenna_elements, antenna_elements);

for i = 1 : antenna_elements

for k = 1 : antenna_elements

if (sort_diagonal(i) == diagonal(k))

Qmain(:,i) = eigenvectors(:,k);

end

end

end

for i=1: count

Q_n (:,count-i+1)=Qmain(:,i);

end

%======================================

% Plot MUSIC Function:

% = 1 / summation(M+1 to N): |q_m' s(phi)|^2

% = 1 / s(phi)' * Q_n * Q_n' * s(phi)

%======================================

degrees_1=(-90);

degrees_2=(90);

degrees_3=(degrees_2)-(degrees_1);

f=zeros(1,10001);

i=1;

for degrees = degrees_1:degrees_3/10000:degrees_2

k=0 : (antenna_elements - 1);

alpha2=exp(j.*k*kp*d*sin(degrees*pi/180));

alpha=alpha2.';

f(i)=1/(alpha'*Q_n*Q_n'*alpha);

Page 60: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

60

i=i+1;

end

degrees = degrees_1:degrees_3/10000:degrees_2;

%f = abs(f)./max(abs(f)); %normalize

f = abs(f);

figure(3)

plot(degrees, 20*log10(f) );

grid on

xlabel('Angle of Arrival (phi)');

ylabel('Decibels (dB)');

title('MUltiple SIgnal Classification Function');

%======================================

% End

%======================================

%a.delete

Page 61: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

61

MUSIC Algorithm – DOA Estimation - Emulation %======================================

% Practical Implementation of MUSIC

% MUltiple SIgnal Classification

% Algorithm

%======================================

% Developed Robert Chin, Undergraduate Student - Rutgers Univ School of Eng

% Capstone Design - Hardware Comm Sys (Prof. David G. Daut)

%======================================

clear all

close all

%============================

% Emperical Data - Pulled from Arduino

%============================

%

lambda = .75/100; %antenna spacing between elements, .75m for 400 MHz signal

kp=2*pi/lambda; %wave number

d = lambda/2;

noise = 1;

SNR = 0; %end-user will predefine the noise content/noise power

noise = 1/(10^(SNR/10));

antenna_elements = 4;

samples = 300;

rate = 1/samples;

a = arduino('COM3')

%Getting steering vectors/signals (at the antenna elements)

%A0, A1, A2, A3 of the Arduino (Analog Inputs)

%tic;

%dual reading reduces the error

%"Are you using analogRead for anything else? As the analog pins share a

%single A2D, rapid use of it can cause the previous read to impact the

%next. A common workaround in this situation is to read twice on each input,

ignoring the first."

for x = 1:samples;

dummy = a.analogRead(0);

signalA0(x) = a.analogRead(0);

dummy = a.analogRead(1);

signalA1(x) = a.analogRead(1);

Page 62: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

62

dummy = a.analogRead(2);

signalA2(x) = a.analogRead(2);

dummy = a.analogRead(3);

signalA3(x) = a.analogRead(3);

end

%time=toc;

figure(1);

subplot(2,2,1) %Plot Sampled Signal from Port 'A0' (E)

plot( [1:samples] , signalA0);

title('Analog Input A0');

xlabel(['Sample [1:samples = 500]']);

ylabel('val = analogRead(A0)');

axis([0 samples 0 1100]);

%

for x = 1:samples;

signalA1(x) = a.analogRead(1)

end

%

subplot(2,2,2); %Plot Sampled Signal from Port 'A1' (N)

plot([1:samples], signalA1);

title('Analog Input A1');

xlabel('Sample [1:samples = 500]');

ylabel('val = analogRead(A1)');

axis([0 samples 0 1100]);

%

for x = 1:samples;

signalA2(x) = a.analogRead(2)

end

%

subplot(2, 2,3); %Plot Sampled Signal from Port 'A2' (W)

plot([1:samples], signalA2);

title('Analog Input A2');

xlabel('Sample [1:samples = 500]');

ylabel('val = analogRead(A2)');

axis([0 samples 0 1100]);

%

for x = 1:samples;

signalA3(x) = a.analogRead(3)

end

%

subplot(2,2,4); %Plot Sampled Signal from Port 'A3' (S)

plot([1:samples], signalA3);

title('Analog Input A3');

Page 63: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

63

xlabel('Sample [1:samples = 500]');

ylabel('val = analogRead(A3)');

axis([0 samples 0 1100]);

%=====================================

% Produce big X from antenna array

%

%=====================================

X(1, :) = signalA0;

X(2, :) = signalA1;

X(3, :) = signalA2;

X(4, :) = signalA3;

%

%=====================================

% Create Synthetic Data -- Staging

% S = Signal, N = Noise

%=====================================

%.75 cm = wavelength of 400 MHz signal

lambda = .75/100; %wavelength (meters).. predefined by what frequency i'm

trying to pickup c/lambda = f

kp=2*pi/lambda; %wave number (angular wave number)

d = lambda/2; %d must be at least lambda/2 -> to avoid spacial aliasing

antenna_elements = 4; % the higher the elements the larger the aperture

(higher directivity)

samples = 300; %this is limited by how fast my code runs, ie. 300

samples/(15/4 elements) = samples/second

input_signals = 1; %only one input signal (will be a combination of all in

the channel)

frequency = [1]; %kHz, .1 kHz == 100 Hz, 400000 kHz == 400 MHz

angle = [0];

SNR = 50;

noise = 1/(10^(SNR/10));

%depending on the AoA speficied will alter the phase difference

%as the distance increases, the phase element*d will increase

%initially the power will be strongest at the 1st antenna element

S=zeros(input_signals,samples);

k = 1 : samples;

for i = 1 : input_signals;

%S(i,:)=sqrt(2)*sin(2*pi*frequency(i)*k);

S(i,:)=fmmod(sin(2*pi*(.001)*k), 4000000000, 8000000000, 50); %simulating

frequency modulation, 800 = Fs, sampling rate

end

figure(4);

plot( [1:samples] , S(1,:));

title('Input (Modulated) Signal - FM/AM/Non-Modulated');

Page 64: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

64

xlabel(['Sample [1:samples = 300]']);

ylabel('Amplitude');

%axis([0 350 0 2]);

N=zeros(antenna_elements,samples);

noise=1/(10^(SNR/10)); %noise power

for i=1 : antenna_elements;

N(i,:)=sqrt(noise)*randn(1,samples); %Create normal distributed pseudorand

end

alpha=zeros(antenna_elements,input_signals);

l = 0 : ((antenna_elements)-1);

for i = 1 : input_signals;

alpha2=exp(j.*l*kp*d*sin(angle(i)*pi/180));

alpha(:,i)=alpha2.';

end

X = zeros(antenna_elements, samples);

for i = 1 : samples;

X(:,i) = ( alpha * S(:,i) ) + N(:,i);

end

%

figure(1);

subplot(2,2,1) %Plot Sampled Signal from Port 'A0'

plot( [1:samples] , X(1,:));

title('Analog Input A0');

xlabel(['Sample [1:samples = 500]']);

ylabel('val = analogRead(A0)');

%axis([0 samples 0 1100]);

subplot(2,2,2); %Plot Sampled Signal from Port 'A1'

plot([1:samples], X(2,:));

title('Analog Input A1');

xlabel('Sample [1:samples = 500]');

ylabel('val = analogRead(A1)');

%axis([0 samples 0 1100]);

subplot(2, 2,3); %Plot Sampled Signal from Port 'A2'

plot([1:samples], X(3,:));

title('Analog Input A2');

xlabel('Sample [1:samples = 500]');

ylabel('val = analogRead(A2)');

%axis([0 samples 0 1100]);

subplot(2,2,4); %Plot Sampled Signal from Port 'A3'

plot([1:samples], X(4,:));

title('Analog Input A3');

xlabel('Sample [1:samples = 500]');

ylabel('val = analogRead(A3)');

%axis([0 samples 0 1100]);

Page 65: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

65

%====================================

% Plot Frequency Spectrum

%====================================

%

n = [0: samples];

N3 = 1024;

%signalA0test = cos(2*pi*n/10);

%BigX1 = abs(fft(signalA0test, N3));

BigX1 = abs(fft((X(1,:)), N3));

BigX1 = fftshift(BigX1);

F1 = [ -N3/2: N3/2 - 1];

figure(2);

plot(F1, BigX1), title('Frequency Spectrum - N = 1024'), xlabel('frequency/ f

==(10/x)'), ylabel('|Y(f)|'); xlim([-500 500]);

%

%======================================

% Create Covariance Matrix, R

%

% R = 1/K summation (1 to K): x_k*x_k'

% X = alpha*S + N

%======================================

R = zeros(antenna_elements,antenna_elements);

for i = 1:samples;

covariance = X(:,i)*(X(:,i)');

R = R + covariance;

end

R = R/samples;

%======================================

% R = Q * L * Q' -- Eigenvalue Decomposition

%======================================

[eigenvectors, eigenvalues] = eig(R, 'nobalance');

for i=1:antenna_elements

diagonal(i)=eigenvalues(i,i);

end

decending_sort = sort(diagonal)

%======================================

% Q -> Q_n -- Noise Subspace

%======================================

Page 66: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

66

%noise = 500000; %background noise level

for i = 1 :antenna_elements

diagonal_elements(i) = eigenvalues(i,i);

end

sort_diagonal = sort(diagonal_elements);

count = 0;

for i = 1 : antenna_elements

if sort_diagonal(i) < (1.5*noise)

count = count + 1;

end

end

Q_n=zeros( antenna_elements , count);

Qmain = zeros(antenna_elements, antenna_elements);

for i = 1 : antenna_elements

for k = 1 : antenna_elements

if (sort_diagonal(i) == diagonal(k))

Qmain(:,i) = eigenvectors(:,k);

end

end

end

for i=1: count

Q_n (:,count-i+1)=Qmain(:,i);

end

%======================================

% Plot MUSIC Function:

% = 1 / summation(M+1 to N): |q_m' s(phi)|^2

% = 1 / s(phi)' * Q_n * Q_n' * s(phi)

%======================================

degrees_1=(-90);

degrees_2=(90);

degrees_3=(degrees_2)-(degrees_1);

f=zeros(1,10001);

i=1;

for degrees = degrees_1:degrees_3/10000:degrees_2

k=0 : (antenna_elements - 1);

alpha2=exp(j.*k*kp*d*sin(degrees*pi/180));

alpha=alpha2.';

f(i)=1/(alpha'*Q_n*Q_n'*alpha);

i=i+1;

Page 67: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

67

end

degrees = degrees_1:degrees_3/10000:degrees_2;

%f = abs(f)./max(abs(f)); %normalize

f = abs(f);

figure(3)

plot(degrees, 20*log10(f) );

grid on

xlabel('Angle of Arrival (phi)');

ylabel('Decibels (dB)');

title('MUltiple SIgnal Classification Function');

%======================================

% End

%======================================

%a.delete

MUSIC Algorithm – Preliminary Testing Code

function varargout = doa(varargin)

Page 68: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

68

% DOA M-file for doa.fig

% DOA, by itself, creates a new DOA or raises the existing

% singleton*.

%

% H = DOA returns the handle to a new DOA or the handle to

% the existing singleton*.

%

% DOA('CALLBACK',hObject,eventData,handles,...) calls the local

% function named CALLBACK in DOA.M with the given input arguments.

%

% DOA('Property','Value',...) creates a new DOA or raises the

% existing singleton*. Starting from the left, property value pairs

are

% applied to the GUI before doa_OpeningFcn gets called. An

% unrecognized property name or invalid value makes property

application

% stop. All inputs are passed to doa_OpeningFcn via varargin.

%

% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one

% instance to run (singleton)".

%

% See also: GUIDE, GUIDATA, GUIHANDLES

% Edit the above text to modify the response to help doa

% Last Modified by GUIDE v2.5 13-Nov-2008 00:27:01

% Begin initialization code - DO NOT EDIT

gui_Singleton = 1;

gui_State = struct('gui_Name', mfilename, ...

'gui_Singleton', gui_Singleton, ...

'gui_OpeningFcn', @doa_OpeningFcn, ...

'gui_OutputFcn', @doa_OutputFcn, ...

'gui_LayoutFcn', [] , ...

'gui_Callback', []);

if nargin && ischar(varargin1)

gui_State.gui_Callback = str2func(varargin1);

end

if nargout

[varargout1:nargout] = gui_mainfcn(gui_State, varargin:);

else

gui_mainfcn(gui_State, varargin:);

end

% End initialization code - DO NOT EDIT

% --- Executes just before doa is made visible.

function doa_OpeningFcn(hObject, eventdata, handles, varargin)

% This function has no output args, see OutputFcn.

% hObject handle to figure

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

% varargin command line arguments to doa (see VARARGIN)

% Choose default command line output for doa

handles.output = hObject;

Page 69: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

69

% Update handles structure

guidata(hObject, handles);

% UIWAIT makes doa wait for user response (see UIRESUME)

% uiwait(handles.figure1);

% --- Outputs from this function are returned to the command line.

function varargout = doa_OutputFcn(hObject, eventdata, handles)

% varargout cell array for returning output args (see VARARGOUT);

% hObject handle to figure

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure

varargout1 = handles.output;

function edit1_Callback(hObject, eventdata, handles)

% hObject handle to edit1 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit1 as text

% str2double(get(hObject,'String')) returns contents of edit1 as a

double

th1=str2double(get(hObject,'String'))

handles.metricdata.th1 = th1;

guidata(hObject,handles)

% --- Executes during object creation, after setting all properties.

function edit1_CreateFcn(hObject, eventdata, handles)

% hObject handle to edit1 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.

% See ISPC and COMPUTER.

if ispc && isequal(get(hObject,'BackgroundColor'),

get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

function edit2_Callback(hObject, eventdata, handles)

% hObject handle to edit2 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit2 as text

% str2double(get(hObject,'String')) returns contents of edit2 as a

double

th2=str2double(get(hObject,'String'))

Page 70: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

70

handles.metricdata.th2 = th2;

guidata(hObject,handles)

% --- Executes during object creation, after setting all properties.

function edit2_CreateFcn(hObject, eventdata, handles)

% hObject handle to edit2 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.

% See ISPC and COMPUTER.

if ispc && isequal(get(hObject,'BackgroundColor'),

get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

function edit3_Callback(hObject, eventdata, handles)

% hObject handle to edit3 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit3 as text

% str2double(get(hObject,'String')) returns contents of edit3 as a

double

th3=str2double(get(hObject,'String'))

handles.metricdata.th3 = th3;

guidata(hObject,handles)

% --- Executes during object creation, after setting all properties.

function edit3_CreateFcn(hObject, eventdata, handles)

% hObject handle to edit3 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.

% See ISPC and COMPUTER.

if ispc && isequal(get(hObject,'BackgroundColor'),

get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

function edit4_Callback(hObject, eventdata, handles)

% hObject handle to edit4 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit4 as text

% str2double(get(hObject,'String')) returns contents of edit4 as a

double

p1=str2double(get(hObject,'String'))

handles.metricdata.p1 = p1;

guidata(hObject,handles)

% --- Executes during object creation, after setting all properties.

function edit4_CreateFcn(hObject, eventdata, handles)

% hObject handle to edit4 (see GCBO)

Page 71: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

71

% eventdata reserved - to be defined in a future version of MATLAB

% handles empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.

% See ISPC and COMPUTER.

if ispc && isequal(get(hObject,'BackgroundColor'),

get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

function edit5_Callback(hObject, eventdata, handles)

% hObject handle to edit5 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit5 as text

% str2double(get(hObject,'String')) returns contents of edit5 as a

double

p2=str2double(get(hObject,'String'))

handles.metricdata.p2 = p2;

guidata(hObject,handles)

% --- Executes during object creation, after setting all properties.

function edit5_CreateFcn(hObject, eventdata, handles)

% hObject handle to edit5 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.

% See ISPC and COMPUTER.

if ispc && isequal(get(hObject,'BackgroundColor'),

get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

function edit6_Callback(hObject, eventdata, handles)

% hObject handle to edit6 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit6 as text

% str2double(get(hObject,'String')) returns contents of edit6 as a

double

p3=str2double(get(hObject,'String'))

handles.metricdata.p3 = p3;

guidata(hObject,handles)

% --- Executes during object creation, after setting all properties.

function edit6_CreateFcn(hObject, eventdata, handles)

% hObject handle to edit6 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.

% See ISPC and COMPUTER.

Page 72: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

72

if ispc && isequal(get(hObject,'BackgroundColor'),

get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

function edit7_Callback(hObject, eventdata, handles)

% hObject handle to edit7 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit7 as text

% str2double(get(hObject,'String')) returns contents of edit7 as a

double

K=str2double(get(hObject,'String'))

handles.metricdata.K = K;

guidata(hObject,handles)

% --- Executes during object creation, after setting all properties.

function edit7_CreateFcn(hObject, eventdata, handles)

% hObject handle to edit7 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.

% See ISPC and COMPUTER.

if ispc && isequal(get(hObject,'BackgroundColor'),

get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

function edit8_Callback(hObject, eventdata, handles)

% hObject handle to edit8 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit8 as text

% str2double(get(hObject,'String')) returns contents of edit8 as a

double

d=str2double(get(hObject,'String'))

handles.metricdata.d = d;

guidata(hObject,handles)

% --- Executes during object creation, after setting all properties.

function edit8_CreateFcn(hObject, eventdata, handles)

% hObject handle to edit8 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.

% See ISPC and COMPUTER.

if ispc && isequal(get(hObject,'BackgroundColor'),

get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

Page 73: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

73

end

function edit9_Callback(hObject, eventdata, handles)

% hObject handle to edit9 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit9 as text

% str2double(get(hObject,'String')) returns contents of edit9 as a

double

noise_var= str2double(get(hObject,'String'))

handles.metricdata.noise_var = noise_var;

guidata(hObject,handles)

% --- Executes during object creation, after setting all properties.

function edit9_CreateFcn(hObject, eventdata, handles)

% hObject handle to edit9 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.

% See ISPC and COMPUTER.

if ispc && isequal(get(hObject,'BackgroundColor'),

get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

% --- Executes on button press in pushbutton1.

function pushbutton1_Callback(hObject, eventdata, handles)

% hObject handle to pushbutton1 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

th1=handles.metricdata.th1;

th2=handles.metricdata.th2;

th3=handles.metricdata.th3;

p1=handles.metricdata.p1;

p2=handles.metricdata.p2;

p3=handles.metricdata.p3;

K=handles.metricdata.K;

d=handles.metricdata.d;

N=handles.metricdata.N;

noise_var=handles.metricdata.noise_var;

doas=[th1 th2 th3]*pi/180; %DOAís of signals in rad.

P=[p1 p2 p3];

r=length(doas);

% Steering vector matrix. Columns will contain the steering vectors

% of the r signals

A=exp(-i*2*pi*d*(0:N-1)'*sin([doas(:).']));

% Signal and noise generation

sig=round(rand(r,K))*2-1; % Generate random BPSK symbols for each of the

% r signals

noise=sqrt(noise_var/2)*(randn(N,K)+i*randn(N,K)); %Uncorrelated noise

Page 74: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

74

X=A*diag(sqrt(P))*sig+noise; %Generate data matrix

R=X*X'/K; %Spatial covariance matrix

[Q ,D]=eig(R); %Compute eigendecomposition of covariance matrix

[D,I]=sort(diag(D),1,'descend'); %Find r largest eigenvalues

Q=Q (:,I); %Sort the eigenvectors to put signal eigenvectors first

Qs=Q (:,1:r); %Get the signal eigenvectors

Qn=Q(:,r+1:N); %Get the noise eigenvectors

% MUSIC algorithm

% Define angles at which MUSIC ìspectrumî will be computed

angles=(-90:0.1:90);

%Compute steering vectors corresponding values in angles

a1=exp(-i*2*pi*d*(0:N-1)'*sin([angles(:).']*pi/180));

for k=1:length(angles)

%Compute MUSIC ìspectrumî

music_spectrum(k)=(a1(:,k)'*a1(:,k))/(a1(:,k)'*Qn*Qn'*a1(:,k));

end

plot(angles,abs(music_spectrum))

grid on

title('MUSIC Spectrum')

xlabel('Angle in degrees')

function edit10_Callback(hObject, eventdata, handles)

% hObject handle to edit10 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit10 as text

% str2double(get(hObject,'String')) returns contents of edit10 as a

double

N= str2double(get(hObject,'String'))

handles.metricdata.N = N;

guidata(hObject,handles)

% --- Executes during object creation, after setting all properties.

function edit10_CreateFcn(hObject, eventdata, handles)

% hObject handle to edit10 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.

% See ISPC and COMPUTER.

if ispc && isequal(get(hObject,'BackgroundColor'),

get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

Page 75: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

75

Appendix 3: Datasheets

The datasheets of all components used in the design process are to be compiled in this appendix.

If needed this compilation can be bound separate from the main report and, in which case, must

have a corresponding stand-alone cover page and table of contents.

Page 76: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

76

REFERENCES

[1] [4] Daut, D.G., Communications Systems Design Laboratory Manual, Rutgers Univ.,

Piscataway, NJ, 2009.

[2] ON Semiconductor, Balanced Modulators/Demodulators, Colorado, 2010.

[3] Motorola Semiconductor, Voltage Controlled Oscillator, Motorola, INC 1997.

[5] “Wi-Fi Location-Based Services 4.1 Design Guide – Location Tracking Approaches.”

Cisco Systems. March 17, 2012.

http://www.cisco.com/en/US/docs/solutions/Enterprise/Mobility/wifich2.html

[6] “Application of MUSIC, ESPRIT, and SAGE algorithms for Narrowband detection and

localization”. UP EEE. March 17, 2012.

http://eee.upd.edu.ph/manuel/thesisproposalpresentation-deleon.pdf

[7] “Adaptive Frequency Hopping for Reduced Interference between Bluetooth and Wireless

LAN”. Ericsson Technology Licensing. May 2003. February 2012. http://www.design-

reuse.com/articles/5715/adaptive-frequency-hopping-for-reduced-interference-between-

bluetooth-and-wireless-lan.html

[8] “Adaptive Frequency Hopping”. Silicon Wave. December 2002. February 2012.

http://mclean-linsky.net/joel/cv/AFH_DevCon_Presentation_12_11_02.pdf

[9] “Bluetooth protocols”. Wikipedia.org. February 2012.

http://en.wikipedia.org/wiki/Bluetooth_protocols#Link_management_protocol_.28LMP.29

[10] “Bluetooth Frequency Hopping Spread Spectrum – FHSS”. Althos. February 2012.

http://www.althos.com/tutorial/Bluetooth-tutorial-frequency-hopping-FHSS.html

[11] “Bluetooth Tutorial – Baseband”. Palo Wireless. February 2012.

http://www.palowireless.com/bluearticles/baseband.asp

[12] “Bluetooth AFH and IEEE 802.15.1-2005” Motorola, Inc. January 20, 2009.

http://www.google.com/url?sa=t&rct=j&q=channel%20assessment%20bluetooth&source=w

eb&cd=2&ved=0CCgQFjAB&url=https%3A%2F%2Fmentor.ieee.org%2F802.11%2Fdcn%

2F09%2F11-09-0127-00-000n-bluetooth-afh-and-ieee-802-15-1-

2005.ppt&ei=K4I8T5HhO6nY0QHkiJXGBw&usg=AFQjCNE7R22QQ-

JbvcXOYG_jlo2hhBUMLA&sig2=p2uKb5H6YQ447XZfjOOYnA

[13] “Bluetooth Glossary”. PaloWireless. February 2012.

http://www.palowireless.com/infotooth/glossary.asp

[14] “Multiple Signal Classification (MUSIC)”. Wikipedia.org. February 8, 2012.

http://en.wikipedia.org/wiki/Multiple_signal_classification

Page 77: Radio Communications Final Project Design Reportcrose/capstone12/entries/RadioComm_Final.… · Radio Communications Final Project Design Report ... design and implement project following

77

[15] “Introduction to MUSIC and ESPRIT” Girdsystems.com.

http://www.girdsystems.com/pdf/GIRD_Systems_Intro_to_MUSIC_ESPRIT.pdf

[16] “Development of a Single Channel Direction Finding Algorithm”. February 8, 2012.

http://scholar.lib.vt.edu/theses/available/etd-04272007-

114307/unrestricted/NHarter_SingleChannelDF.pdf

[17] “Expectation-maximization algorithm”. February 8, 2012.

http://en.wikipedia.org/wiki/Expectation–maximization_algorithm

[18] “Array Signal Processing: An Introduction”. Connexions. September 12, 2005. April 25,

2012. < http://cnx.org/content/m12561/latest/>

[19] “The Basics of Antenna Arrays”. Orban Microwave Products. April 25, 2012.

<http://www.orbanmicrowave.com/The_Basics_of_Antenna_Arrays.pdf>

[20] “Optimal Design of Concentric Circular Antenna Array”. International Journal of

Computer Applications. Volume 1 – No. 17. 2010. April 25, 2012.

http://www.ijcaonline.org/journal/number17/pxc387534.pdf/