1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "e19197ba",
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"\n",
"import matplotlib.pyplot as plt\n",
"import matplotlib.image as mpimg"
]
},
{
"cell_type": "markdown",
"id": "ea1a7a45",
"metadata": {},
"source": [
"# Simple 2 tap fading"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "4465dcd9",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.collections.PathCollection at 0x7f16d0427e20>"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAD4CAYAAADvsV2wAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAccUlEQVR4nO3df2wc5Z0G8OfxsqgbrqpBhB9ZEoJQZEQuIm4tCMo/wLU10CtxUyhQUFF1ImrV/gGHLBkRFaioiGSdWrXiirgKXStyEH5uw4XWtIBEL3fhcGoHkytWAy1J1qikTUwL3jaO870/vJus1zOzs7uzO7+ejxTF3hnvvrM788w7777zvjQziIhI8nWFXQAREekMBb6ISEoo8EVEUkKBLyKSEgp8EZGUOCXsAng588wzbeXKlWEXQ0QkNnbv3v1HM1vqtCzSgb9y5UqMjo6GXQwRkdgg+a7bMjXpiIikhAJfRCQlFPgiIimhwBcRSQkFvohISkS6l46ISBIUxooYHpnE1HQ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RwsZvH8HcLXH8sR8vhUK/ACY2W/MrN6MyZcC2Gdm75jZUQBPANjQ/tK1xQYAPy7//GMAA+EVpW38fF4bAPzE5u0C0E3y3E4XNCBJ2j99MbNXARz2WCVJny8ABX4n5QEcqPr9YPmxODrbzN4DgPL/Z7msZwBeJLmb5KaOlS4Yfj6vJH2mfrflcpJ7SP6M5OrOFC00Sfp8AWjGK99I/hLAOQ6L7jGzn/p5CofHItsn1mt7G3ia9WY2RfIsAL8g+Va5VhUHfj6vWH2mdfjZll9jfpyWD0leC6CA+eaOpErS5wtAge+bmX26xac4CGB51e/nAZhq8Tnbxmt7Sf6B5Llm9l75Evd9l+eYKv//PsnnMN9sEJfA9/N5xeozraPutpjZn6t+foHkv5I808ziOshYPUn6fAGoSaeTXgewiuQFJE8FcBOA7SGXqVnbAdxW/vk2AIuucEieRvLjlZ8BfBbzX27HhZ/PazuAr5R7c6wD8EGlqSuG6m4vyXNIsvzzpZjPjz91vKSdk6TPF4Bq+IEg+QUAPwCwFMAOkuNm1k9yGYAfmdm1ZnaM5DcBjADIAHjUzPaGWOxWbAHwJMl/ArAfwA0AUL29AM4G8Fw5H04B8B9m9vOQytswt8+L5NfKyx8G8AKAawHsAzAD4KthlbdVPrf3egBfJ3kMQAnATRbjW/VJPg7gCgBnkjwI4F4AWSB5n2+FhlYQEUkJNemIiKSEAl9EJCUU+CIiKaHAFxFJCQW+iEhKKPBFRFJCgS8ikhL/D1oH6FTHpNFEAAAAAElFTkSuQmCC\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"nsamples = 200\n",
"samp_rate = 32e3\n",
"\n",
"# QPSK modulation\n",
"samp_per_sym = 4\n",
"symbol_map = {\n",
" 0: 1 + 1j,\n",
" 1: -1 + 1j,\n",
" 2: -1 - 1j,\n",
" 3: 1 - 1j,\n",
"}\n",
"\n",
"# generate random data for testing\n",
"data = np.random.randint(low=0, high=4, size=nsamples)\n",
"\n",
"# modulate and add AWGN\n",
"noise = np.random.normal(0, .03, size=nsamples) + 1j * np.random.normal(0, .03, size=nsamples)\n",
"sig = np.array(list(map(lambda v: symbol_map[v], data))) + noise\n",
"\n",
"# add 2 tap frequency selective channel\n",
"delay = np.zeros(5 * samp_per_sym)\n",
"one = np.array([1])\n",
"taps = np.concatenate([one, delay, .2 * one])\n",
"\n",
"# apply channel\n",
"sig_fading = np.convolve(sig, taps)\n",
"\n",
"# plot figure\n",
"fig = plt.figure()\n",
"plt.scatter(sig_fading.real, sig_fading.imag)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.2"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
|