== **Programmable Metamaterial Antenna For Physical Layer Security** **Members:** Dylan Turner [UG], Prachi Patel [UG] **Project Advisors and Mentors:** Narayan Mandayam, Chung-Tse Michael Wu, Hariharan Venkat == **PROJECT OVERVIEW** With the advent of the Internet of Things (IoT) revolution, there is an increasing need to develop low-cost physical layer security protocols for devices. This will reduce the computational power that is required and propagate energy savings to potentially tens of billions of IoT devices. This project proposes a computationally simpler solution that uses Metamaterial antenna arrays that scramble the signal for eavesdroppers from undesired directions. This is called Directional Modulation. [[Image()]] Previous researchers who have worked on this idea have successfully used Directional Modulation to securely transmit small amounts of data using low bandwidth. A problem arises however when larger amounts of data are transmitted, which require more bandwidth. It turns out that the Metamaterial Antenna is frequency-dependent. This means data sent on subcarrier waves with large differences in frequency ranges will be affected differently by the antenna, resulting in errors. [[Image(directional_modulation.png, 500px)]] The solution to this problem, and the focus of our research this summer, is called Symbol Precoding. [[Image(symbol_precoding.png, 500px)]] **Technologies:** GNU Radio == **PROGRESS LOG** **Week 1 (5/28 - 5/30)** [https://docs.google.com/presentation/d/1ulUIl1nBwaNs0O2fuv4TT23h_kQwHrS-2Z11JWm-oBI/edit#slide=id.g2e9f58915b7_2_119 Week 1 Presentation] - The first week was spent meeting with our mentor Hariharan Venkat who presented us with a high-level overview of the project. - Spent much of the day reading the research paper and proposal the project is based on, learning fundamental details of the research. - Learned how to interface with the ORBIT and COSMOS test bed, and practiced connecting and sending commands to nodes. **Week 2 (6/3 - 6/6)** [https://docs.google.com/presentation/d/1PjV6_HG6ShLwdet7x_-FJaumk4L-RC4zQDV2LcRlMQA/edit#slide=id.g2e9f938d79d_1_0 Week 2 Presentation] - Familiarized with fundamentals of Orthogonal Frequency Division Multiplexing (OFDM). - Attended the Introduction to Linux presentation. - Installed and configured GNU Radio on our local devices. - Investigated how flowgraphs are converted into Python code, as well as the source code of the built-in OFDM_TX block. - Experimented with creating flow graphs in GNU Radio. - Completed a tutorial with our mentor using COSMOS Sandbox 2, transmitting and receiving OFDM signals from two Software Defined Radios (SDR). **Week 3 (6/10 - 6/13)** [https://docs.google.com/presentation/d/1AnhEFBddQYQ6OEUQbbz8zJa7ZjhWAaeFk_a3_lOswMs/edit#slide=id.p Week 3 Presentation] - Learned how to output to file sink in GNU Radio, allowing us to investigate precisely how data is manipulated through the flow graph. - Traced through the flow graph for the OFDM_TX, viewing the binary output of each block and figuring out its purpose. - Studied the implementation and purpose of the Cyclic Redundancy Check (CRC) block. - Wrote a Python script to convert the complex numbers in Single precision IEEE 752 format to decimal for better human readability. - Attempted to find a way to visualize the output of the OFDM Carrier allocator, but ran into issues because we cannot open Embedded Python blocks on Mac OS due to a GNU Radio bug. Resulted to using a Windows Emulator as a workaround. - Created a Custom Python Block which multiplies the first input vectors by the second input vectors. This is an important step for Symbol Precoding, where we multiply the transmitted symbol vector by a precoding vector. [[Image(OFDM_TX_flowgraph.png, 500px)]] **Week 4 (6/17 - 6/20)** [https://docs.google.com/presentation/d/1f673j_8OvY_IveQROc_Z3Fgu473BeX-S8qFlyiKY3c4/edit#slide=id.g2e6eb1bb6b0_0_1 Week 4 Presentation] - Created custom python blocks to interact with OFDM Carrier Allocator Block: - Prints its output in a readable format. - Multiplies *specified* carriers by precoded vector. - Studied the math that goes into Symbol Precoding vector calculation. - Began implementing these functions using Python so we can complete our system and begin testing. - After finishing the Precoding Calculation functionality we brought it into GNU Radio as a custom block and fixed many bugs. [[Image(precoding_math.png, 500px)]] **Week 5 (6/24 - 6/27)** [https://docs.google.com/presentation/d/1VIiP_rxzmYI7zWlt6c7aVge2czYJWH-D3LC8AuN9CpE/edit#slide=id.g2e8699e79b9_0_0 Week 5 Presentation] - Spent many hours comparing output of Hari's matlab code with our new GNU Radio block's output to ensure correct precoding calculations. - Created an Emulator block for testing which would simulate the effects of the antenna on our signal digitally. - Created a Power Control block to ensure that we do not supply a dangerous voltage to our Metamaterial Antenna when we begin real world experiments. [[Image(custom_blocks.png, 500px)]] **Week 6 (7/1 - 7/3)** [https://docs.google.com/presentation/d/1QD5hbabMLldXe60llesTeND0E6au8xa_YAxcszYnOlA/edit#slide=id.g2e9b308d405_0_248 Week 6 Presentation] - Modified our custom Python blocks to ensure consistent processing of chunks. This was an issue as a couple of the blocks were processing more data than needed at once, causing downstream blocks to halt unnecessarily. - Hari informed us that our method of utilizing sync words might have been misguided, and we reorganized our flowgraph to reflect these changes. This involved removing sync words from our precoding vector calculations and prepending them to the output. - Researched the Sychmidl and Cox synchronization method. - Fixed small bugs in the Emulator Block, resulting in promising results! As the image below shows, observing a signal from an incorrect angle showed scrambled data, while the correct angle preserved it. [[Image(promising_results.2.png, 500px)]] **Week 7 (7/8 - 7/11)** [https://docs.google.com/presentation/d/1JzMc4aCOFDSt0gVXhohlTJDpxsglwNm2/edit#slide=id.p4 Week 7 Presentation] - Found a solution that allowed us to create blocks with different length inputs and outputs. In this case, our Prepend Sync Words block needed to take in 9 payload vectors, concatenate 2 sync words and output those 11 vectors. (Surprisingly challenging) - Major refactoring of our custom blocks to ensure consistency and efficiency. - Dynamically update matrix size depending on transmission content. - Calculated a packet length to ensure fully utilized carriers in each transmission. - Figured out a way to use GNURadio on MacOS, which is much quicker than using a Windows virtual machine. [[Image(prepend.png, 500px)]] **Week 8 (7/15/24 - 7/18/24)** [https://docs.google.com/presentation/d/1kPrZuyqEpa_HfCwks-fPZX9BDsjzfdDF/edit#slide=id.p1 Week 8 Presentation] - Visited the Anechoic chamber in the Electrical Engineering building on Busch Campus. - Prepared our antenna and FPGA in the anechoic chamber and became familiar with the room. - Figured out a method that would allow us to precode our sync words, something we had previously not been able to do. Rather than exclude the sync words from our precoding, we simply replace the zeros in the sync words with random non-zero symbols, and then do the same calculations. In the end, we multiply by the original symbols anyway, which restores the original sync words. - Learned how to connect to the USRP’s, and transmit a signal over antenna and wire. - Encountered many bizarre issues related to the USRP's in the lab. Experiments that had mostly worked previously on COSMOS Sandbox 2 were not working on the on-site USRP's. [[Image(Anechoic.png, 250px)]] [[Image(MTMAntenna.jpg, 250px)]] == **References** Nooraiepour, Alireza, et al. “Programming Wireless Security Through Learning‐Aided Spatiotemporal Digital Coding Metamaterial Antenna.” Advanced Intelligent Systems, vol. 5, no. 10, 2023, https://doi.org/10.1002/aisy.202300341.