File:MIMO Capacity.png
Size of this preview: 800 × 400 pixels. Other resolutions: 320 × 160 pixels | 640 × 320 pixels | 1,024 × 512 pixels | 1,280 × 640 pixels | 3,000 × 1,500 pixels.
Original file (3,000 × 1,500 pixels, file size: 160 KB, MIME type: image/png)
This is a file from the Wikimedia Commons. The description on its description page there is shown below.
|
Summary
DescriptionMIMO Capacity.png |
English: The source code is also available in our GitHub repository. |
Date | |
Source | Own work |
Author | Kirlf |
PNG development InfoField | This plot was created with Matplotlib. |
Source code InfoField | Python codeimport numpy as np
from numpy import linalg as LA
import warnings
warnings.filterwarnings('ignore')
import matplotlib.pyplot as plt
def waterpouring(Mt, SNR_dB, H_chan):
SNR = 10**(SNR_dB/10)
r = LA.matrix_rank(H_chan)
H_sq = np.dot(H_chan,np.matrix(H_chan, dtype=complex).H)
lambdas = LA.eigvals(H_sq)
lambdas = np.sort(lambdas)[::-1]
p = 1;
gammas = np.zeros((r,1))
flag = True
while flag == True:
lambdas_r_p_1 = lambdas[0:(r-p+1)]
inv_lambdas_sum = np.sum(1/lambdas_r_p_1)
mu = ( Mt / (r - p + 1) ) * ( 1 + (1/SNR) * inv_lambdas_sum)
for idx, item in enumerate(lambdas_r_p_1):
gammas[idx] = mu - (Mt/(SNR*item))
if gammas[r-p] < 0: #due to Python starts from 0
gammas[r-p] = 0 #due to Python starts from 0
p = p + 1
else:
flag = False
res = []
for gamma in gammas:
res.append(float(gamma))
return np.array(res)
def openloop_capacity(H_chan, SNR_dB):
SNR = 10**(SNR_dB/10)
Mt = np.shape(H_chan)[1]
H_sq = np.dot(H_chan,np.matrix(H_chan, dtype=complex).H)
lambdas = LA.eigvals(H_sq)
lambdas = np.sort(lambdas)[::-1]
c = 0
for eig in lambdas:
c = c + np.log2(1 + SNR*eig/Mt)
return np.real(c)
def closedloop_capacity(H_chan, SNR_dB):
SNR = 10**(SNR_dB/10)
Mt = np.shape(H_chan)[1]
H_sq = np.dot(H_chan,np.matrix(H_chan, dtype=complex).H)
lambdas = LA.eigvals(H_sq)
lambdas = np.real(np.sort(lambdas))[::-1]
c = 0
gammas = waterpouring(Mt, SNR_dB, H_chan)
for idx, item in enumerate(lambdas):
c = c + np.log2(1+ SNR*item*gammas[idx]/Mt)
return np.real(c)
Mr = 4
Mt = 4
counter = 1000
SNR_dBs = [i for i in range(1, 21)]
C_open = np.empty((len(SNR_dBs), counter))
C_closed = np.empty((len(SNR_dBs), counter))
for c in range(counter):
H_chan = (np.random.randn(Mr,Mt) + 1j*np.random.randn(Mr, Mt))/np.sqrt(2)
for idx, SNR_dB in enumerate(SNR_dBs):
C_open[idx, c] = openloop_capacity(H_chan, SNR_dB)
C_closed[idx, c] = closedloop_capacity(H_chan, SNR_dB)
C_open_erg = np.mean(C_open, axis=1)
C_closed_erg = np.mean(C_closed, axis=1)
fig = plt.figure(figsize=(10, 5), dpi=300)
plt.plot(SNR_dBs, C_open_erg, label='Channel Unknown (CU)')
plt.plot(SNR_dBs, C_closed_erg, label='Channel Known (CK)')
plt.title("Ergodic Capacity")
plt.xlabel('SNR (dB)')
plt.ylabel('Capacity (bps/Hz)')
plt.legend()
plt.grid()
plt.savefig('MIMO_Capacity.png')
|
Licensing
I, the copyright holder of this work, hereby publish it under the following license:
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
- You are free:
- to share – to copy, distribute and transmit the work
- to remix – to adapt the work
- Under the following conditions:
- attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
Items portrayed in this file
depicts
some value
15 February 2019
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Dimensions | User | Comment | |
---|---|---|---|---|
current | 01:07, 15 February 2019 | 3,000 × 1,500 (160 KB) | Kirlf | User created page with UploadWizard |
File usage
The following page uses this file:
Metadata
This file contains additional information, probably added from the digital camera or scanner used to create or digitize it.
If the file has been modified from its original state, some details may not fully reflect the modified file.
Horizontal resolution | 118.11 dpc |
---|---|
Vertical resolution | 118.11 dpc |
Software used |
|
Retrieved from "https://wiki.kidzsearch.com/wiki/File:MIMO_Capacity.png"