The University of Texas at Arlington Department of Electrical Engineering Project Report EE 5364 – Information theory and coding Spring 2011 Submitted by: CHIRAG PANDYA: 1000722427 VAIBHAV PATANKAR: 1000734804 CONTENTS 1) Introduction 2) Problem Statement 3) Channel Capacity 4) Channel Side Information 5) Antenna Diversity 6) Power Control Schemes 7) MATLAB Simulation Results 8) Conclusion 9) MATLAB Code 10) References 1. INTRODUCTION: Mobile phone technology has become an integral part of our lives today. We use it for trivial tasks such as making calls, listening to music and web browsing as well as for more significant purposes like video conferencing etc. Mobile phone technology is growing at incredibly faster rate. In 2008 there were 4,100 million mobile cellular subscriptions in the world. IS-95 and CDMA 2000 are well known mobile phone technologies – both use CDMA (Code Division Multiple Access) as an underlying channel access method. Comparison of IS-95 and CDMA 2000 2. PROBLEM STATEMENT: Rate versus Power Control in IS-95 and CDMA2000 CDMA2000 1×EV-DO (Enhanced Version Data Optimized) is a cellular data standard operating on the 1.25MHz bandwidth. In this project, you (a team up to 3 graduate students) are requested to evaluate and compare rate versus power control in IS-95 (a CDMA standard for 2G wireless communications) and CDMA2000 1×EV-DO. Rayleigh fading channel is assumed with Doppler shift 100Hz (the channel gain will be provided). Please evaluate rate versus power control for the following different scheme and write a technical report to compare these approaches. Using channel inversion power control for IS-95 Using equal power allocation for CDMA 2000 Using waterfilling power control for CDMA2000 For each scheme, please use SISO, SIMO, MISO, and MIMO for IS-95 and CDMA2000. Please choose M=2, and M=4. Consider two cases: Full Channel Side Information (CSI) Channel Side Information at the Receiver (CSIR) 3. CHANNEL CAPACITY: Let X represent the space of signals that can be transmitted, and Y the space of signals received, during a block of time over the channel. Let be the conditional distribution function of Y given X. Treating the channel as a known statistic system, pY | X(y | x) is an inherent fixed property of the communications channel (representing the nature of the noise in it). Then the joint distribution of X and Y is completely determined by the channel and by the choice of the marginal distribution of signals we choose to send over the channel. The joint distribution can be recovered by using the identity Under these constraints, next maximize the amount of information, or the message, that one can communicate over the channel. The appropriate measure for this is the mutual information I(X;Y), and this maximum mutual information is called the channel capacity and is given by AWGN channel: If the average received power is [W] and the noise power spectral density is N0 [W/Hz], the AWGN channel capacity is [bits/Hz], 4. CHANNEL SIDE INFORMATION: CSIR is the scheme in which receivers can track the channel but the transmitter does not have access to the channel realizations. All the above cases are with respect to CSIR. Full CSI is the scheme with tracking of channels of all the users at the receiver and all the transmitters, here we can allocate power dynamically to the users as a function of the channel states, the sum of capacities for such scheme is as follows: Subject to powers being non-negative and the power constraint on each user: The optimal Power allocation policy is (where λ is chosen to meet the sum power constraint equation as above): The resulting sum capacity is: where k*(h) is the index of the user with the strongest channel at the joint channel state h 5. ANTENNA DIVERSITY: Antenna diversity, also known as space diversity, is any one of several wireless diversity schemes that use two or more antennas to improve the quality and reliability of a wireless link. Often, especially in urban and indoor environments, there is no clear line-of-sight (LOS) between transmitter and receiver. Instead the signal is reflected along multiple paths before finally being received. Each of these bounces can introduce phase shifts, time delays, attenuations, and distortions that can destructively interfere with one another at the aperture of the receiving antenna. Antenna diversity is especially effective at mitigating these multipath situations. This is because multiple antennas offer a receiver several observations of the same signal. Each antenna will experience a different interference environment. Thus, if one antenna is experiencing a deep fade, it is likely that another has a sufficient signal. Collectively such a system can provide a robust link. While this is primarily seen in receiving systems (diversity reception), the analog has also proven valuable for transmitting systems (transmit diversity) as well. The antenna system characterization with respect to the number of antennas used at transmitter and receiver can be described as follows: 1. 2. 3. 4. SISO : Single-Input Single-Output SIMO : Single-Input Multiple-Output MISO : Multiple-Input Single-Output MIMO: Multiple-Input Multiple-Output 5.1 SISO: Single-Input Single-Output In this case transmitter and receiver both have single antenna. The signal is transmitted using single channel. The basic SISO communication system can be described as follows SISO Communication System Here are as shown in figure the channel used has the channel gain h1. This model is the very basic simulation model of communication system. Here we used channel with the gain h1 as follows: šš = |š|š Where, g is the channel coefficient. 5.2 SIMO: Single-Input Multiple-Output In this case transmitter have single antenna and receiver have multiple antennas. In here we consider two and four antennas at receiver side. The signal is transmitted using single channel. Below figure shows the basic SIMO communication system. SIMO Communication Systems Here we used channel with the gain as h11, h12, h13, h14. 5.3 MISO: Multiple-Input Single-Output In this case transmitter has multiple antennas (2 antennas and 4 antennas in our case) and receiver has one antenna. In here we consider two and four antennas at receiver side. The signal is transmitted using single channel. Below figure shows the basic MISO communication system. MISO Communication Systems Here are we used channel with the gain as h11, h21, h31, h41. 5.4 MIMO: Multiple-Input Multiple-Output In this case transmitter and receiver both have multiple antennas (2 antennas and 4 antennas in our case). In here we consider two and four antennas at receiver side. The signal is transmitted using single channel. Below figure shows the basic MIMO communication system. MIMO Communication Systems 6. POWER CONTROL SCHEMS: 6.1 Equal Power Allocation: Usually, when transmitter doesn’t know the channel, Equal Power Allocation is used. This was given by Dr. Alamouti. In this scheme if we have ‘n’ number of channels available for communication, the total power will be given by “P/n” where P shows the total power. In this case, transmitter doesn’t know the channel and hence the power allocation is independent from each other irrespective of the individual channel performance. Let us think of a MISO (as shown in fig) system having 2 transmitter antennas and 1 receiver antenna. We are using the equal power allocation system for assignment of the power to each channel. For this system, Total Power = P Gain of the 1st channel = h1 Gain of the 2nd channel = h2 Power assigned to each of the channel = P/2 Power spectral density for noise for each channel = N0 SNR = P/N0 and ||h||2 = ||h1||2 + ||h2||2 The channel capacity for this system would be, C = log(1 + ||h||2 P/2N0 ) bits/s/Hz Therefore, C = log(1 + ||h||2 SNR/2 ) bits/s/Hz Which shows when the transmitter doesn’t have the channel information; it transmits the power in all directions rather than concentrating on a specific direction. Now instead of two if we have L number of transmitting antenna, the transmitted power would be P/L. And hence, the above equation will become generalized, C = log(1 + ||h||2 SNR/L ) bits/s/Hz So, outage probability would be, Pout(R) = Pr {log(1 + ||h||2 SNR/L ) < R} The disadvantage of this scheme is that we don’t worry about the behaviour of the channel and just allocate the power equally to all the channels. But for Rayleigh distributed random variables which are i.i.d., h1, h2,......,hL, this scheme is optimum and gives best outage probability. Now, we will discuss another power allocation scheme which is Channel Inversion scheme in the next section. 6.2 Channel Inversion Scheme: Now, when the transmitter knows the channel, we can control the power which is going to be supplied as per the channel gain. In this case, we keep received SNR as a constant entity and hence vary power to do so. This technique is called channel inversion scheme. Here the transmitted power is an inverse of the channel gain. So, if the channel gain is high, we need to transmit small amount of power and if the channel gain is low, we need to transmit high amount of power making the system moderate. Let us take the same example as above where, Total Power = P = sum(Pi) Gain of the 1st channel = h1 Gain of the 2nd channel = h2 Power assigned to channel 1 = 1/||h1||2 Power assigned to channel 1 = 1/||h2||2 Power spectral density for noise for each channel = N0 SNR for each channel= constant and ||h||2 = ||h1||2 + ||h2||2 The channel capacity for this system would be, C(i) = log(1 + ||h||2 / ||hi||2 N0 ) bits/s/Hz Hence, in this case our capacity is constant as the SNR is a constant entity. So, this is the sub optimal scheme by which we can get moderate performance depending upon the channel performance. Now in the very next section, we will focus on optimum power allocation scheme which is called “Waterfiling”. 6.3 Waterfilling Scheme: We can find the optimum power allocation for the channel using Waterfilling scheme. When the channel is known, we take N0/|hn2| values plotted as the subcarrier indices i.e. n=0,1,.....,N-1. Then we find the graph shown in fig. 2. So, as shown in fig.2 we are supposed to fill the “water” into the empty vessels up to some defined level which is the height of the vessel. Some bars in the graph are higher than the height of the vessel. In this case we pour nothing. Actually speaking, the water poured in the vessel is the assigned power to the channel and the vessel is defined as Noise to Carrier ratio. So, when the noise is maximum, i.e. the channel performance is poor, we transmit minimum amount of the power and when the noise is very less, i.e. the channel performance is very high, we transmit maximum power. And hence, transmitter takes advantage of the better channel conditions. Waterfilling Schemes Now if we take the same example we used earlier then, Total Power = P = sum(Pi) Gain of the 1st channel = h1 Gain of the 2nd channel = h2 Power assigned to individual channel Pi = ((1/ lambda) – (N0/|hi|2))+ Where, 1/ lambda = height of the vessel Power spectral density for noise for each channel = N0 The channel capacity for this system would be, C(i) = log(1 + ||h||2 Pi / N0 ) bits/s/Hz So, this scheme is precisely opposite to the channel inversion scheme. By doing dynamic power allocation this scheme ensures spending more power when channel is good and hence to boost the received power. 7. MATLAB SIMULATION RESULTS: 7.1 Channel Inversion Power Control in IS-95: SISO [1x1]: Channel Inversion : SISO 10 9 8 Capacity [C] ---> 7 6 5 4 3 2 1 0 -15 -10 -5 0 SNR(in dB) ---> 5 10 15 SIMO [1x2 and 1x4]: Channel Inversion for SIMO : M=2 & M=4) 6 SIMO:1x2 SIMO:1x4 5 Capacity [C] ---> 4 3 2 1 0 -15 -10 -5 0 SNR(in dB) ---> 5 10 15 MISO [2x1 and 4x1]: Channel Inversion for MISO : M=2 & M=4) 5 MISO:2x1 MISO:4x1 4.5 4 Capacity [C] ---> 3.5 3 2.5 2 1.5 1 0.5 0 -15 -10 -5 0 SNR(in dB) ---> 5 10 15 MIMO [2x2and4x4]: Channel Inversion for MIMO : M=2 & M=4 15 MIMO: 2x2 MIMO: 4x4 Capacity [C] ---> 10 5 0 -15 -10 -5 0 SNR(in dB) ---> 5 10 15 Comparison between All communication Systems for Channel Inversion: Channel Inversion for SISO, SIMO, MISO and MIMO for M=2) 6 SISO SIMO:1x2 MISO:2x1 MIMO:2x2 5 Capacity [C] ---> 4 3 2 1 0 -15 -10 -5 0 SNR(in dB) ---> 5 10 15 7.2 Equal Power Allocation in CDMA: MISO [2x1 and 4x1]:. Equal Power Allocation for MIMO: M=2 & M=4 14 MIMO: 2x2 MIMO: 4x4 12 Capacity [C] ---> 10 8 6 4 2 0 -15 -10 -5 0 SNR(in dB) ---> 5 10 15 MIMO [2x2 and 4x4]: Equal Power Allocation for MIMO: M=2 & M=4 14 MIMO: 2x2 MIMO: 4x4 12 Capacity [C] ---> 10 8 6 4 2 0 -15 -10 -5 0 SNR(in dB) ---> 5 10 15 Comparison of MISO and MIMO Systems for Equal Power Allocation System: Equal Power Allocation for MISO and MIMO : M=2 & M=4) 14 MISO:2x1 MISO:4x1 MIMO:4x4 MIMO:2x2 12 Capacity [C] ---> 10 8 6 4 2 0 -15 -10 -5 0 SNR(in dB) ---> 5 10 15 7.3 Water Filling Algorithm for CDMA-2000: Water Filling Algorithm for MIMO: M=2 & M=4 20 MIMO: 2x2 MIMO: 4x4 18 16 Capacity [C] ---> 14 12 10 8 6 4 2 0 -15 -10 -5 0 SNR(in dB) ---> 5 10 15 Comparison among Channel Inversion, Equal Power Allocation and Water Filling Algorithm: Comparision of all techniques for MIMO: M=2 8 Equal Power Allocation Channel Inversion Water Filling Algorithm 7 Capacity [C] ---> 6 5 4 3 2 1 0 -15 -10 -5 0 SNR(in dB) ---> 5 10 15 8. CONCLUSION: We have studied Channel Inversion Power Control method used in IS-95, Equal Power Allocation and Water-Filling methods both used for power control in CDMA-2000 considering Full Channel Side Information (CSI) and Channel Side Information at Receiver (CSIR) cases using M=2 and M=4. We conclude from all the MATLAB simulation results that the Water-Filling algorithm gives the maximum channel capacity hence the transmission rate among all power control methods. The Equal Power Allocation method gives the lowest performance and the Channel Inversion gives the moderate channel capacity at given transmission rate. 9. MATLAB CODE: % Channel Inversion: clc; clear all; close all; load g11.mat; load g12.mat; load g21.mat; load g22.mat; %$$$$$$$$$$$$$$$$$$$$$ % SISO System : 1X1 %$$$$$$$$$$$$$$$$$$$$$ SNR_db = -15:15; for index = 1:length(SNR_db) SNR = 10^(SNR_db(index)/10); h1 = g22(1,1)'*g22(1,1); p1 = 1/(h1); N1 = p1/SNR; C_SISO(index) = log(1+(1/N1)); % Convert in to Watt % h1 = |g|^2 % By Channel Inversion % SNR = P/N => N = P/SNR % C = log(1 + h*p/N) end %$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ % SISO System : for 5000 Iterations %$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ SNR_db = -15:1:15; C_SISO = 0; for index = 1:length(SNR_db) SNR = 10^(SNR_db(index)/10); % Convert in to Watt C_SISO = 0; C_TEMP = 0; for i = 1:5000 % Iteration for 5000 coefficient h(i) = g11(1,i)'*g11(1,i); % h = |g|^2 p(i) = 1/h(i); % Channel Inversion N(i) = p(i)/SNR; % SNR = P/N => N = P/SNR C_TEMP(i) = log(1+(1/N(i))); % C = log(1 + h*p/N) C_SISO = C_TEMP(i) + C_SISO; end C_FINAL_SISO(index)= C_SISO/5000; % Average of all 5000 coefficients of channel end %$$$$$$$$$$$$$$$$$$$$$$ % SIMO System : M = 2 %$$$$$$$$$$$$$$$$$$$$$$ SNR_db = -15:15; C_SIMO_1x2 = 0; for index = 1:length(SNR_db) SNR = 10^(SNR_db(index)/10); % Convert in to Watt % h = |g|^2 h11 = g11(1,2)'*g11(1,2); h12 = g12(1,1)'*g12(1,1); % Channel Inversion p11 = 1/(h11); p12 = 1/(h12); % SNR = P/N => N = P/SNR N11 = p11/SNR; N12 = p12/SNR; % C = log(1 + h*p/N) => C = log(1 + 1/N) C1 = log(1+(1/N11)); C2 = log(1+(1/N12)); % Take the max value as the system capacity C_SIMO_1x2(index) = max(C1,C2); end %$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ % SIMO System : for 5000 Iterations %$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ SNR_db = -15:15; index=0; C_FINAL_SIMO = 0; for index = 1:length(SNR_db) SNR = 10^(SNR_db(index)/10); % Convert in to Watt C1_SIMO = 0; C2_SIMO = 0; C_TEMP = 0; % Iteration for 5000 coefficient for i = 1:5000 h11(i) = g22(1,i)'*g22(1,i); % Channel gain : h = |g|^2 h12(i) = g22(1,i)'*g22(1,i); p11(i) = 1/(h11(i)); % Channel Inversion p12(i) = 1/(h12(i)); N1(i) = p11(i)/SNR; % SNR = P/N => N = P/SNR N2(i) = p12(i)/SNR; C1_TEMP(i) = log(1+(1/N1(i))); % C = log(1 + h*p/N) => C = log(1 + 1/N) C2_TEMP(i) = log(1+(1/N2(i))); C1_SIMO = C1_TEMP(i) + C1_SIMO; % for 5000 values C2_SIMO = C2_TEMP(i) + C2_SIMO; end C1_FINAL = C1_SIMO/5000; C2_FINAL = C2_SIMO/5000; % Taking the final channel capacity as the max of both values C_FINAL_SIMO(index) = max(C1_FINAL,C2_FINAL); end %$$$$$$$$$$$$$$$$$$$$$$$ % SIMO System : M = 4 %$$$$$$$$$$$$$$$$$$$$$$$ SNR_db = -15:15; for index = 1:length(SNR_db) SNR = 10^(SNR_db(index)/10); % Convert in to Watt % h = |g|^2 h11 = g11(1,2)'*g11(1,2); h12 = g12(1,2)'*g12(1,2); h13 = g21(1,2)'*g21(1,2); h14 = g21(1,2)'*g22(1,2); % Channel Inversion p11 = 1/(h11); p12 = 1/(h12); p13 = 1/(h13); p14 = 1/(h14); % SNR = P/N => N = P/SNR N11 = p11/SNR; N12 = p12/SNR; N13 = p13/SNR; N14 = p14/SNR; % C = log(1 + h*p/N) => C = log(1 + 1/N) C1 = log(1+(1/N11)); C2 = log(1+(1/N12)); C3 = log(1+(1/N13)); C4 = log(1+(1/N14)); C = [C1 C2 C3 C4]; % Take the max value as the system capacity C_SIMO_1x4(index) = max(C); end %$$$$$$$$$$$$$$$$$$$$$$$$ % MISO System : M = 2 %$$$$$$$$$$$$$$$$$$$$$$$$ SNR_db = -15:15; C_MISO_2x1 = 0; for index = 1:length(SNR_db) SNR = 10^(SNR_db(index)/10); % Convert in to Watt % h = |g|^2 h_MISO = [g11(1,1); g21(1,1)]' * [g11(1,1); g21(1,1)]; p_MISO = 1/(h_MISO); % Channel Inversion N_MISO = p_MISO/SNR; % SNR = P/N => N = P/SNR % C = log(1 + h*p/N) => C = log(1 + 1/N) C_MISO_2x1(index) = log(1+(1/N_MISO)); end %$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ % MISO System : for 5000 Iterations %$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ SNR_db = -15:15; C_FINAL_MISO = 0; for index = 1:length(SNR_db) SNR = 10^(SNR_db(index)/10); % Convert in to Watt C_MISO = 0; % Iteration for 5000 coefficient for i = 1:5000 % Common coefficient for both channel g = [x y] g_MISO = [g11(1,i) g12(1,i)]; h_MISO = g_MISO*g_MISO'; % h = |g|^2 p_MISO = 1/(h_MISO); % Channel Inversion N_MISO = p_MISO/SNR; % SNR = P/N => N = P/SNR C_TEMP = log(1+(1/N_MISO)); % C = log(1 + h*p/N) C_MISO = C_TEMP + C_MISO; % Adding all 5000 values end % Taking average of 5000 values C_FINAL_MISO(index) = C_MISO/5000; end %$$$$$$$$$$$$$$$$$$$$$$$ % MISO System : M = 4 %$$$$$$$$$$$$$$$$$$$$$$$ SNR_db = -15:15; C_MISO_4x1 = 0; for index = 1:length(SNR_db) SNR = 10^(SNR_db(index)/10); % Convert in to Watt % h = |g|^2 h_MISO = [g11(1,1); g12(1,1); g21(1,1); g22(1,1)]' * [g11(1,1); g12(1,1); g21(1,1); g22(1,1)]; p_MISO = 1/(h_MISO); % Channel Inversion N_MISO = p_MISO/SNR; % SNR = P/N => N = P/SNR % C = log(1 + h*p/N) => C = log(1 + 1/N) C_MISO_4x1(index) = log(1+(1/N_MISO)); end %$$$$$$$$$$$$$$$$$$$$$$$ % MIMO System : 2X2 %$$$$$$$$$$$$$$$$$$$$$$$ SNR_db = -15:15; C_MIMO_2x2 = 0; for index = 1:length(SNR_db) SNR = 10^(SNR_db(index)/10); % Convert in to Watt % Using SVD to convert 2X2 matrix into parallel channels h_MIMO = [g11(1,1) g12(1,1); g21(1,1) g22(1,1)]; [m n] = eig (h_MIMO); % h = |g|^2 h11 = n(1,1)'*n(1,1); h22 = n(2,2)'*n(2,2); % Channel Inversion p11 = 1/(h11); p22 = 1/(h22); % SNR = P/N => N = P/SNR N1 = p11/SNR; N2 = p22/SNR; % C = log(1 + h*p/N) => C = log(1 + 1/N) C1 = log(1+(1/N1)); C2 = log(1+(1/N2)); % Adding all two parallel channels capacities C_MIMO_2x2(index) = C1 + C2; end %$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ % MIMO System : for 5000 Iterations %$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ SNR_db = -15:15; C_FINAL_MIMO = 0; for index = 1:length(SNR_db) SNR = 10^(SNR_db(index)/10); % Convert in to Watt C_MIMO=0; % Iteration for 5000 coefficient for i = 1:5000; % Doing SVD to convert MIMO to Parallel h_MIMO = [g11(1,i) g12(1,i); g21(1,i) g22(1,i)]; [m b] = eig (h_MIMO); h11 = b(1,1)'*b(1,1); % Parallel Channel gain h22 = b(2,2)'*b(2,2); % Channel Inversion p11 = 1/(h11); p22 = 1/(h22); % SNR = P/N => N = P/SNR N1 = p11/SNR; N2 = p22/SNR; % C = log(1 + h*p/N) C1_TEMP = log(1+(1/N1)); C2_TEMP = log(1+(1/N2)); % Adding all capacities for 5000 iterations C_MIMO = C1_TEMP + C2_TEMP + C_MIMO; end C_FINAL_MIMO(index) = C_MIMO/5000; % Taking average over 5000 values end plot([-20:20], C_FINAL_MIMO,'g'); XLABEL('SNR'); YLABEL('Channel Capacity'); LEGEND('Equal Power Allocation','AWGN Capacity','Channel Inversion without constraint','Channel Conversion with contraint','Water Filling'); %$$$$$$$$$$$$$$$$$$$$$$ % MIMO System : 4x4 %$$$$$$$$$$$$$$$$$$$$$$ SNR_db=-15:1:15; C_MIMO_4x4 = 0; for index = 1:length(SNR_db) SNR = 10^(SNR_db(index)/10); % Convert in to Watt % Using SVD to convert 4X4 into parallel channel h_MIMO_4X4 = [g11(1,1) g11(1,2) g11(1,3) g11(1,4); g12(1,1) g12(1,2) g12(1,3) g12(1,4); g21(1,1) g21(1,2) g21(1,3) g21(1,4); g22(1,1) g22(1,2) g22(1,3) g22(1,4)]; [m b] = eig(h_MIMO_4X4); % h = |g|^2 h11 = b(1,1)'*b(1,1); h22 = b(2,2)'*b(2,2); h33 = b(3,3)'*b(3,3); h44 = b(4,4)'*b(4,4); %Channel Inversion p11= 1/h11; p22= 1/h22; p33= 1/h33; p44= 1/h44; % SNR = P/N => N = p/SNR N1 = p11/SNR; N2 = p22/SNR; N3 = p33/SNR; N4 = p44/SNR; % C = log(1 + h*p/N) => C = log(1 + 1/N) C1_TEMP = log(1+(1/N1)); C2_TEMP = log(1+(1/N2)); C3_TEMP = log(1+(1/N3)); C4_TEMP = log(1+(1/N4)); % Adding all four parallel channels capacities C_MIMO_4x4(index)= C1_TEMP + C2_TEMP + C3_TEMP + C4_TEMP; end % Equal Power Allocation: clc; clear all; close all; load g11.mat; load g12.mat; load g21.mat; load g22.mat; %$$$$$$$$$$$$$$$$$$$$$$$$$ % MISO System : M = 2 %$$$$$$$$$$$$$$$$$$$$$$$$$ SNR_db = -15:15; No_Antenna = 2; C_MISO_2x1 = 0; for index = 1:length(SNR_db) SNR = 10^(SNR_db(index)/10); % Convert in to Watt % Channel coefficient for 2X1 MISO and h = |g|^2 h1 = ([g11(1,1); g21(1,1)]'*[g11(1,1); g21(1,1)]); % SNR = P/N => P = N/SNR pwr = SNR*N1; % C = log(1 + h*p/N) C_MISO_2x1(index) = log(1+(h1 * pwr/No_Antenna)); end %$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ % MISO System : for 5000 Iterations %$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ SNR_db = -15:15; No_Antenna = 2; C_MISO = 0; C_MISO_FINAL = 0; C_MISO_TOTAL = 0; for index = 1:length(SNR_db) SNR = 10^(SNR_db(index)/10); % Convert in to Watt for i = 1:5000 % Iteration for 5000 values % Channel coefficient for 2X1 MISO and h = |g|^2 h = ([g11(1,i); g21(1,i)]'*[g11(1,i); g21(1,i)]); % SNR = P/N => P = N/SNR pwr = SNR*N1; % C = log(1 + h*p/N) C_MISO = log(1+(h * pwr/No_Antenna)); % Adding 5000 values C_MISO_TOTAL = C_MISO_TOTAL + C_MISO; end % Average over 5000 values C_MISO_FINAL(index) = C_MISO_TOTAL/5000; end %$$$$$$$$$$$$$$$$$$$$$$$$$$ % MISO System : M = 4 %$$$$$$$$$$$$$$$$$$$$$$$$$$ SNR_db = -15:15; N1 = 1; No_Antenna = 2; C_MISO_4x1 = 0; for index = 1:length(SNR_db) SNR = 10^(SNR_db(index)/10); % Convert in to Watt % Channel coefficient for 4X1 MISO and h = |g|^2 h1 = ([g11(1,1); g12(1,1); g21(1,1); g22(1,1)]' * [g11(1,1); g12(1,1); g21(1,1); g22(1,1)]); % SNR = P/N => P = N/SNR pwr = SNR*N1; % C = log(1 + h*p/N) C_MISO_4x1(index) = log(1+(h1 * pwr/No_Antenna)); end %$$$$$$$$$$$$$$$$$$$$$$$$$$ % MIMO System : M = 2 %$$$$$$$$$$$$$$$$$$$$$$$$$$ SNR_db = -15:15; C_MIMO_2x2 = 0; for index = 1:length(SNR_db) SNR = 10^(SNR_db(index)/10); % Convert in to Watt % Using SVD to convert 2X2 matrix into parallel channels h_MIMO = [g11(1,1) g12(1,1); g21(1,1) g22(1,1)]; [m g] = eig (h_MIMO); % Parallel Channel gain h11 = g(1,1)'*g(1,1); h22 = g(2,2)'*g(2,2); % SNR = P/N => P = N/SNR pwr11 = SNR / N1; pwr22 = SNR / N1; % C = log(1 + h*p/N) C1 = log(1+(h11 * pwr11/No_Antenna)); C2 = log(1+(h22 * pwr22/No_Antenna)); % Adding both channel capacities C_MIMO_2x2(index) = C1 + C2; end %$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ % MIMO System : for 1000 Iterations %$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ SNR_db = -15:15; C_MIMO_TOTAL = 0; C_MIMO_AVG = 0; for index = 1:length(SNR_db) SNR = 10^(SNR_db(index)/10); % Convert in to Watt % Iteration for 5000 coefficient for i = 1:5000 % Channel coefficient for 2X2 MIMO h_MIMO = [g11(1,i) g12(1,i); g21(1,i) g22(1,i)]; % Doing SVD to convert MIMO to Parallel [m b] = eig (h_MIMO); h11 = b(1,1)'*b(1,1); % Parallel Channel gain h22 = b(2,2)'*b(2,2); % SNR = P/N => P = N/SNR pwr11 = SNR * N1; pwr22 = SNR * N1; % C = log(1 + h*p/N) C1 = log(1+(h11 * pwr11/No_Antenna)); C2 = log(1+(h22 * pwr22/No_Antenna)); % Adding 5000 values C_MIMO_TOTAL = C1 + C2 + C_MIMO_TOTAL; end % Average over 5000 values C_MIMO_AVG(index) = C_MIMO_TOTAL/1000; end %$$$$$$$$$$$$$$$$$$$$$$$$$$ % MIMO System : M = 4 %$$$$$$$$$$$$$$$$$$$$$$$$$$ SNR_db = -15:15; C_MIMO_4x4 = 0; for index = 1:length(SNR_db) SNR = 10^(SNR_db(index)/10); % Convert in to Watt % Using SVD to convert 4X4 matrix into parallel channels h_MIMO_4X4 = [g11(1,1) g11(1,2) g11(1,3) g11(1,4); g12(1,1) g12(1,2) g12(1,3) g12(1,4); g21(1,1) g21(1,2) g21(1,3) g21(1,4); g22(1,1) g22(1,2) g22(1,3) g22(1,4)]; [m b] = eig (h_MIMO_4X4); % h = |g|^2 h11 = b(1,1)'*b(1,1); h12 = b(2,2)'*b(2,2); h21 = b(3,3)'*b(3,3); h22 = b(4,4)'*b(4,4); % SNR = P/N => P = N/SNR pwr11 = SNR * N1; pwr12 = SNR * N1; pwr21 = SNR * N1; pwr22 = SNR * N1; % C = log(1 + h*p/N) C11 = log(1+(h11 * pwr11/No_Antenna)); C12 = log(1+(h12 * pwr12/No_Antenna)); C21 = log(1+(h21 * pwr21/No_Antenna)); C22 = log(1+(h22 * pwr22/No_Antenna)); % Adding all four channel capacties C_MIMO_4x4(index) = C11 + C12 + C21 + C22; end % Water Filling Algorithm: %$$$$$$$$$$$$$$$$$$$$$$$$$$ % MIMO System : 2X2 %$$$$$$$$$$$$$$$$$$$$$$$$$$ SNR_db = -15:1:15; Sigma_n = 1; % assume B = 1; % assume for index = 1:length(SNR_db) SNR = 10^(SNR_db(index)/10); % Convert in to Watt % Using SVD to convert 2X2 matrix into parallel channels h_MIMO = [g11(1,5) g12(1,2); g21(1,5) g22(1,1)]; [m b] = eig (h_MIMO); % Parallel Channel gain h11 = b(1,1)'*b(1,1); h22 = b(2,2)'*b(2,2); % Sigma^2 = h => Channel coefficient Sigma1_Square = h11; Sigma2_Square = h22; % SNR = P / Sigma_n^2 => P = SNR * Sigma_n^2 pwr = SNR * Sigma_n * Sigma_n; % Lamda_i = (Sigma_i^2 * P) / Sigma_n^2 Lamda_1 = (Sigma1_Square * pwr) / (Sigma_n*Sigma_n); Lamda_2 = (Sigma2_Square * pwr) / (Sigma_n*Sigma_n); Lamda_0 = (2*Lamda_1*Lamda_2)/(Lamda_1+Lamda_2+(Lamda_1*Lamda_2)); % Capacity for Water-filling case: C = [B * log(Lamda_i/Lamda_0)] % Here : n = 2 and B = 1 C_MIMO_2X2_WF(index) = log(Lamda_1/Lamda_0) + log(Lamda_2/Lamda_0); end %$$$$$$$$$$$$$$$$$$$$$$$$$$ % MIMO System : 4X4 %$$$$$$$$$$$$$$$$$$$$$$$$$$ SNR_db= -15:1:15; Sigma_n = 1; % assume B = 1; % assume for index = 1:length(SNR_db) SNR = 10^(SNR_db(index)/10); % Convert in to Watt % Using SVD to convert 2X2 matrix into parallel channels h_MIMO = [g11(1,1) g11(1,3) g11(1,4) g11(1,5); g11(1,7) g11(1,8) g11(1,9) g11(1,10); g11(1,11) g11(1,12) g11(1,13) g11(1,14); g11(1,6) g11(1,15) g11(1,16) g11(1,17)]; [m b] = eig(h_MIMO); % Parallel Channel gain h11 = b(1,1)'*b(1,1); h22 = b(2,2)'*b(2,2); h33 = b(3,3)'*b(3,3); h44 = b(4,4)'*b(4,4); % Sigma^2 = h => Channel coefficient Sigma1_Square = h11; Sigma2_Square = h22; Sigma3_Square = h33; Sigma4_Square = h44; % SNR = P / Sigma_n^2 => P = SNR * Sigma_n^2 pwr = SNR*Sigma_n*Sigma_n; % Lamda_i = (Sigma_i^2 * P) / Sigma_n^2 Lamda_1 = (Sigma1_Square * pwr)/(Sigma_n*Sigma_n); Lamda_2 = (Sigma2_Square * pwr)/(Sigma_n*Sigma_n); Lamda_3 = (Sigma3_Square * pwr)/(Sigma_n*Sigma_n); Lamda_4 = (Sigma4_Square * pwr)/(Sigma_n*Sigma_n); % Here n = 4 Lamda_0= 4/[1+(1/Lamda_1)+(1/Lamda_2)+(1/Lamda_3)+(1/Lamda_4)]; % Capacity for Water-filling case: C = [B * log(Lamda_i/Lamda_0)] C_MIMO_4X4_WF(index) = log(Lamda_1/Lamda_0) + log(Lamda_2/Lamda_0) + log(Lamda_3/Lamda_0) + log(Lamda_4/Lamda_0); end 10. REFERENCES: [1] Class Notes by Lie Xu [2] Thomas Cover and Joy Thomas, Elements of Information Theory, 2nd Edition, John Wiley & Sons, Inc, 2006 [3] David Tse and Pramod Viswanath, Fundamentals of Wireless Communication, Cambridge University Press, 2005. [4] CDMA Development Group: http://www.cdg.org/technology/3g.asp [5] http://www.articlesbase.com/communication-articles/modern-mobile-phone-technology213572.html [6] http://www.buzzle.com/articles/todays-mobile-phones-modern-technology-changedlives.html [7] http://users.ece.utexas.edu/~mkountouris/publications/conferences/VTC_Spring_2006.pdf [8] http://paros.stanford.edu/Publications/Chris/NgSubmitted.pdf [9] http://www.cl.cam.ac.uk/research/dtg/publications/public/ja316/PowerAlloc_ver8.pdf [10] http://persons.unik.no/arehj/publications/vtc08_Behrouz.pdf [11] http://www.stanford.edu/class/ee360/Ahmad/Lin_f.pdf [12] http://ns01.net.i.kyoto-u.ac.jp/~kazunori/paper/wpmc2006_2.pdf