• 沒有找到結果。

The software discussed in this section is all being implemented on STM32F407. In this section, the software implementation of BPSK modulation on transmitter side and BPSK demodulation on the receiver side will be discussed.

4.5.1 Transmitter Side

Unlike the FSK implementation, the software implementation of the BPSK transmitter uses a much simpler setup. The BPSK signal uses a hardware timer setup at 80kHz to generate the signal, by toggling the output every time the timer is triggered. The data is modulated in this fashion by inverting the signal whenever the input bit is ”1”, and keeping it normal when the input bit is ”0”. This results in a square wave output instead of the sine wave output from the FSK stage, which increases the bandwidth requirements and adds more noise to the channel. However, because BPSK operates at a fixed frequency, an low-pass filter based on the RC circuit is added before the signal is sent to the transmission amplifier, to create a sine wave output.

4.5.2 Receiver Side

Similar to the FSK implementation discussed earlier, the software implementation of the receiver makes use of the same timer, DMA, and ADC setup to obtain the input waveform.

One of the STM32F4 hardware timers is setup to trigger at a rate of 200kHz, this timer triggers the DMA controller to take an ADC reading. Once 826 ADC readings are obtained, the DMA passes the resulting vector to the decoding software to get a bit estimate. 826 readings are required because that is 4.13ms worth of samples at the sampling rate of 200kHz.

Figure 4.4 shows the block diagram for the decoding algorithm. The algorithm works by first passing the first 15 readings to the Offset Detector, which convolves the readings

-50

ADC Vector Readings

Offset Detector

Downsampler Demodulator Phase

Calculator

Strength Calculator

Bit Es-timator

Figure 4.9: Block Diagram for the BPSK decoding algorithm

with a pre-computed sine wave, to calculate the phase offset of the input waveform. With the phase offset, the input data is then down-sampled to 100kHz by throwing away half the readings, to reduce the computation power required. Then, the down-sampled data is demodulated by multiplying it with a 40kHz sine and cosine wave. Each data point on the demodulated waveform can then be passed to the Phase & Strength calculators to get the phase and strength of each data point. The Bit Estimator uses the strength of the data points to determine whether an actual signal has been received, or whether the reading is just random noise. Once it passes a certain adjustable threshold, the phase of the data point is used to calculate whether a bit ”1” or a bit ”0” was sent. Finally, as an additional processing step, utilizing the frame specification defined in Section 4.1.4, the parity of each frame can be calculated, to ensure that valid data has been received and decoded by the module, and if not, either correct or remove that data point respectively.

4.6 Testing Results

The BPSK software implementations has been tested in water by using a prototype remote control (shown in Figure 4.10) in various environments, including the air, a freshwater pool, and the sea. The board, the transducer, and battery are placed inside a waterproof box.

Figure 4.10: Prototype of waterproof transmitter remote controller

Figure 4.11 show the relationship between distance and Signal-to-Noise Ratio (SNR). It can be seen that air has the largest attenuation, while fresh water has the smallest attenuation.

Although we have successfully achieve our target to transmit messages reliably over 20 meters in fresh water, we only able to transmit over 10 meters in sea water with zero frame errors.

This zero frame errors means that we could transmit the packet with BER < 0.25 since the frame could detect up to 3 bits error per packet.

Figure 4.11: Distance vs Signal to Noise Ratio for three different media

5 Project Evaluation

Based on the objectives stated at the beginning of the project, we are able to evaluate the performance of our prototype, and define whether the project can be deemed successful or not, and what can be improved in the future.

The communications system should work at distances of up to 20 meters.

The communications system should have a bit error rate of no more than 10%. As shown in Figure 4.11, we are able to achieve a signal to noise ratio of approximately 15dB at a distance of 20 meters in fresh water. This represents frames that were received with no errors after parity checking. Due to the nature of our implementation, we do not have concrete bit error rate metrics, but instead need to infer bit error rate from the signal to noise ratio, simulation results, and the nature of the received data. Based on these factors, at a distance of 20 meters in fresh water, we can see a large number of intact packets being received and decoded correctly, which implies a bit error rate of less than 10%. This is further reinforced from our simulation results, which shows that our BPSK setup is able to achieve an error rate of 0%. Therefore, we can say that we able to achieve both of these objectives.

The communications system should have a per unit cost of less than USD100.

From Table 5.1, we can find that the per unit cost for our prototype is HKD380, which is roughly USD50, which is well under the design target of USD100 that we set for ourselves.

Therefore, in terms of cost, we can say that project is successful. Given that the per unit cost is USD50, we have a lot of room to improve the performance of this project.

Item Unit Price (HKD)

Quan-tity

Total Price (HKD)

Ultrasonic Transducers 25 2 50

STM32F407VGT6 MCU 30 2 60

OPA454 Operational Amplifier 15 1 15

LMV854 Operational Amplifier 10 1 10

XL6009 DC-DC Boost Converter 10 1 10

LP5907 DC-DC Buck Regulator 2.5 2 5

18650 Lithium Polymer Battery 20 2 40

Waterproof Enclosure 15 2 30

Printed Circuit Board (PCB) 60 2 120

Miscellaneous Components (Capacitors, Resistors, LEDs)

- - 40

Total 380

Table 5.1: Bill of Materials for a single prototype setup

The communications system should be able to transmit of at least 200 bits per second. The prototype’s design is able to achieve a bit rate of 242 bits per second, which is well above the objective of 200 bit per second. However, this is still well below the theoretical limits of what is achievable with the chosen transducers of 1500 bits per second. This can be improved in future works.

5.1 Future Works

Since the per unit cost of the project is very low, the next generation of the design can have uprated components that are able to give better performance. These improvements are suggested below;

• Use ultrasonic transducers with a higher frequency and bandwidth for better bit rates.

• Use a faster microcontroller for more complex modulation schemes which can improve bit rates and bit error rates.

• Redesign the reception amplifier for lower noise thresholds.

• Use an external high-performance Analog to Digital Converter for better dynamic range.

6 Summary

The potential of wireless underwater communication is massive, with major implications on underwater exploration and research opportunities. While there are some solutions that are commercially available, the cost of these solutions are very high, precluding their widespread adoption in the underwater domain. This project aims to fill the gap in the market for a low-cost (under USD100) wireless underwater communication system, which can spearhead a new wave of underwater robots and sensors that can increase the accessibility of underwater environments for everyone, allowing for a better understanding of the oceans.

Our findings dictate that acoustic waves are the most suitable medium for underwater communication in this application, especially compared to RF and VLC. To reach our objective of creating an inexpensive communication system, we take advantage of advancements in technologies, especially Digital Signal Processing, which allows for the majority of the system to be implemented on a low-power high-performance STM32F4 ARM microcontroller, using Digital Signal Processing. This allows for the a large amount of flexibility with the same hardware, as a new protocol can be implemented with a software update, and reduces the cost of the hardware since not much analog circuitry is needed.

After some MATLAB simulations, we were able to implement a BPSK based protocol on the actual prototype, and were able to achieve real-world results of over 200 bits per second of data over 20 meters away with less than 10% error rate, all at a cost which is markedly less than our target of USD100. However, this comes after some setbacks, mostly with the FSK implementation, and the knowledge that the design can be optimized highly.

7 References

[1] A. Brylske, H. Averill, and K. Shreeves, The Encyclopedia of Recreational Diving.

PADI, 2008.

[2] “Magnum Plus Spec Sheet,” Oceaneering International, Inc., 2016. [Online].R Available:

http://www.oceaneering.com/oceandocuments/brochures/rov/rov-magnumplus.pdf [3] “OpenROV Trident - An Underwater Drone for Everyone,” Kickstarter, Sep 2016.

[Online]. Available: https://www.kickstarter.com/projects/openrov/

openrov-trident-an-underwater-drone-for-everyone

[4] “Fathom One — The Affordable, Modular, HD Underwater Drone,” Kickstarter, Sep 2016. [Online]. Available: https://www.kickstarter.com/projects/1359605477/

fathom-one-the-affordable-modular-hd-underwater-dr

[5] L. Butler, “Underwater radio communication,” Amateur Radio, 1987. [Online].

Available: http://users.tpg.com.au/users/ldbutler/Underwater Communication.pdf [6] M. Lanzagorta, “Underwater communications,” Synthesis Lectures on

Communications, vol. 5, no. 2, pp. 32–37, 2012.

[7] S. Sendra, J. Lloret, J. M. Jimenez, and L. Parra, “Underwater acoustic modems,”

IEEE Sensors Journal, vol. 16, no. 11, pp. 4063–4071, June 2016.

[8] B. Benson, “Design of a low-cost underwater acoustic modem for short-range sensor networks,” Ph.D. dissertation, University of California, San Diego, 2010.

[9] L. Freitag, M. Grund, S. Singh, J. Partan, P. Koski, and K. Ball, “The WHOI micro-modem: an acoustic communications and navigation system for multiple

platforms,” in Proceedings of OCEANS 2005 MTS/IEEE. IEEE, 2005, pp. 1086–1092.

[10] “400EP18A Air Ultrasonic Ceramic Transducer,” Pro-Wave Electronic Corp., 2005.

[Online]. Available: http://www.prowave.com.tw/english/products/ut/ep/40ep18a.htm [11] “RM0090 Reference Manual: STM32F405/415, STM32F407/417, STM32F427/437

and STM32F429/439 advanced ARM -based 32-bit MCUs,” STMicroelectronics,R 2016. [Online]. Available:

http://www.st.com/content/ccc/resource/technical/document/reference manual/3d/

6d/5a/66/b4/99/40/d4/DM00031020.pdf/files/DM00031020.pdf/jcr:

content/translations/en.DM00031020.pdf

[12] “CMSIS DSP Software Library,” ARM Limited, 2015. [Online]. Available:

http://www.keil.com/pack/doc/CMSIS/DSP/html/index.html

相關文件