logo Hurry, Grab up to 30% discount on the entire course
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Georgee BlackbridgeData mining
(5/5)

560 Answers

Hire Me
expert
malvin kengeEngineering
(/5)

693 Answers

Hire Me
expert
StatAnalytica ExpertMarketing
(5/5)

788 Answers

Hire Me
expert
Lee BohlGeneral article writing
(5/5)

806 Answers

Hire Me
Others
(5/5)

Entire Python code as .py file, try to clean up the part that performs the classification and any features/metrics you calculate

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Assignment 3

For this assignment you will create a modulation classification algorithm that can distinguish between BPSK and QPSK. As part of the assignment, you will also create an RF dataset comprising of BSPK and QPSK signals with varying SNR and samples per symbol. The code provided during Lecture 7 (included on page 2) should give you a huge starting point for this assignment, you’ll mainly just have to add some for loops around it, and think about what kind of features/metrics you can use to classify with, that give different values for BSPK vs QPSK. Your classifier does not have to be perfect, but it should at least work at the higher SNRs. Bonus points will be given to the best performing classifier in low SNR. This assignment does not involve your PlutoSDR.

1. Simulate signals based on each modulation scheme’s constellation, like we did in Lecture 7. Have the samples per symbol vary between the values 2,4,6,8. Do not add a random phase rotation for now, i.e., assume the receiver has already synchronized to the signal (this greatly simplifies the problem, to the point where I am confident you can figure out your own features to use for classification between BPSK and QPSK). Vary SNR between -10 to 20 dB, in 2 dB increments. Label each piece of data (i.e. each signal snippet) with its modulation scheme and SNR, because we will plot classification accuracy over SNR. You do not need to label the samples per symbol, just make sure it varies for both the training and testing data (we don’t want to train a classifier that only works for one value). It is up to you whether you save each signal snippet as a file, or just keep everything in variables in Python, just make sure your dataset includes at least one example of each combination of modulation scheme, SNR, and samples per symbol. You can used pandas if you want, it is not required. The number of samples per signal snippet is up to you, I would recommend at least 100, so that there are many symbols per snippet.

2. Create your own modulation classifier, and test it by plotting accuracy over SNR. I’ll leave it up to you to decide how complex you want to get with your classifier; which could range anywhere from you figuring out your own simple calculated metric and threshold, up to training a DNN to do it all for you.

3. Once the classifier above works well, add a random phase rotation (between 0 and 360 degrees) to the signal snippets, make sure the rotation is different for each signal snippet in the dataset. Now make a new classifier that works (assuming the one in part 2 fails for this new dataset). You can add a random phase rotation by multiplying your symbols by π‘’π‘—πœƒ where πœƒ is the angle in radians to rotate by (make sure to convert degrees to radians!). Code hint: theta_degrees = np.random.uniform(0,360). For this classifier, you might need to use a more advanced feature compared to the first classifier, or multiple features, just try your best! Email me if you have trouble coming up with a working classifier at high SNR.

Submission instructions: Please submit the following items as individual files through Canvas:

1. Entire Python code as .py file, try to clean up the part that performs the classification and any features/metrics you calculate, so I can take a look at what you decided to do

2. Picture/screenshot of classification accuracy over SNR for Part 2

3. Picture/screenshot of classification accuracy over SNR for Part 3 

Appendix: Code from Lecture 7

import numpy as np

import matplotlib.pyplot as plt N = 10000 # number of symbols

# Note the samples per symbol has been hardcoded to 8 in this example

# QPSK

I = (np.random.randint(0, 2, N) - 0.5) * 2

Q = (np.random.randint(0, 2, N) - 0.5) * 2 # set this to 0 for BPSK x = (I + 1j*Q)/np.sqrt(2) #  remove sqrt(2) for BSPK

x = np.repeat(x, 8) # Create the noise

n = (np.random.randn(N*8) + 1j*np.random.randn(N*8))/np.sqrt(2) # unity power AWGN

n = n*0.1 # scaling the amount of noise (you'll want to change this line)

r = x + n # received signal is the transmitted signal x, plus noise n print("signal power =", np.var(x))

print("noise power = ", np.var(n))

print("SNR [dB] =", 10*np.log10(np.var(x)/np.var(n)))

# IQ plot plt.plot(np.real(r),np.imag(r),'.')

plt.axis([-1,1,-1,1]) plt.show()

(5/5)
Attachments:

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. ThisΒ  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme