Question: 1 . 2 Python Exercises 1 . 2 . 1 Creating Barker code signals in Python In the exercises that follow, you will implement matched

1.2 Python Exercises
1.2.1 Creating Barker code signals in Python
In the exercises that follow, you will implement matched filters for a set of signals known as Barker codes. Barker codes have been used in pulse compression radar and sonar systems and for synchronization in digital communication systems. You can read more about Barker codes in Chapter 10 of the book Detection, Estimation, and Modulation Theory, Volume III by Prof. Van Trees. \({}^{2}\) You can also check out the Wikipedia page for Barker codes. Figure 1 shows the Barker codes of length 3,7, and 13. You will see below that these signals have desirable autocorrelation properties.
1. Since Barker codes consist of a series of l's and -1's, they are easy to generate with digital logic. Similarly, it is easy to use python's logic functions to define a Barker code signal. The following code can be used to generate samples of the length 3 Barker codle signal \( b_{3}(t)\) :
```
fs-100
dur -3
tt3- np.arange(0, dur, 1/fs)
n3- tt3*fs
b3-1*((tt3>-0)&(tt3-2))-1*((tt3>-2)&(t.t3-3))
```
Type this code into python and verify that it generates samples of the signal \( b_{3}(t)\). Make two plots of the signal you generated: one should be a line plot versus time \( t \)(in seconds, stored in vector tt 3) and the other should be a stem plot versus the discrete index n (stored in vector n 3).
\({}^{2}\) Note that De. Van Trees was a Professor in the ECE Department at Mason.
Figure 1: Barker codes of length 3,7, and 13.
2. Using the code described above as a model, write code to generate samples of the length 7 and length 13 Barker codes. Use the same sample period (0.01) that you used to generate the length 3 codes. Include plots of the signals \( b_{7}(t)\) and \( b_{13}(t)\) in your report.
1 . 2 Python Exercises 1 . 2 . 1 Creating Barker

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!