Commit 20d52e19 authored by jiangx's avatar jiangx
Browse files

ICC 2015 version

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5910 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 9465ca98
%
% PURPOSE : channel estimation using least square method
%
% ARGUMENTS :
%
% m_sym_T : transmitted symbol, d_N_f x d_N_ofdm x d_N_ant_act x d_N_meas
% m_sym_R : received symbol, d_N_f x d_N_ofdm x d_N_ant_act x d_N_meas
% d_N_meas : number of measurements
%
% OUTPUTS :
%
% m_H_est : estimation of sub-channels, d_N_antR x d_N_antT x d_N_f x d_N_meas
%
%**********************************************************************************************
% EURECOM - All rights reserved
%
% AUTHOR : Xiwen JIANG, Florian Kaltenberger
%
% DEVELOPMENT HISTORY :
%
% Date Name(s) Version Description
% ----------- ------------- ------- ------------------------------------------------------
% Apr-29-2014 X. JIANG 0.1 creation of code
%
% REFERENCES/NOTES/COMMENTS :
%
% - Based on the function "runmeas_full_duplex" created by Mirsad Cirkic, Florian Kaltenberger.
%
%**********************************************************************************************
function m_H_est = f_ch_est(m_sym_T, m_sym_R)
%% ** initialisation **
[d_N_f,d_N_OFDM,d_N_antT,d_N_meas] = size(m_sym_T);
d_N_antR = size(m_sym_R,3);
m_H_est = zeros(d_N_antR,d_N_antT,d_N_f,d_N_meas);
%% ** estimate the subband channel for each measurement and antenna **
for d_n_meas = 1:d_N_meas
for d_n_f = 1:d_N_f
m_y = reshape(m_sym_R(d_n_f,:,:,d_n_meas),d_N_OFDM,d_N_antR).'; % squeeze: problem for antenna number = 1 case
m_s = reshape(m_sym_T(d_n_f,:,:,d_n_meas),d_N_OFDM,d_N_antT).';
m_H_est(:,:,d_n_f,d_n_meas) = m_y*m_s'/(m_s*m_s'); % LS channel estimation
end
end
end
function m_sig_T = f_ofdm_mod(m_sym_T, d_N_FFT, d_N_CP, d_N_OFDM, v_active_rf, d_amp)
d_N_ant_act = sum(v_active_rf);
%** mapping useful data to favorable carriers **
m_sym_T_ext = zeros(d_N_FFT,d_N_OFDM,d_N_ant_act);
m_sym_T_ext(2:151,:,:) = m_sym_T(1:150,:,:);
m_sym_T_ext(362:512,:,:) = m_sym_T(151:301,:,:);
%** ifft **
m_sig_T_ = sqrt(d_N_FFT)*ifft(m_sym_T_ext,d_N_FFT,1);
%** add cyclic prefix **
m_sig_T_ = [m_sig_T_(end-d_N_CP+1:end,:,:); m_sig_T_];
d_L = (d_N_FFT+d_N_CP)*d_N_OFDM;
m_sig_T = floor(reshape(m_sig_T_,d_L,d_N_ant_act)*d_amp);
end
%
% PURPOSE : OFDM Receiver
%
% ARGUMENTS :
%
% m_sig_R : received signal with dimension ((d_N_FFT+d_N_CP)*d_N_ofdm) x d_N
% d_N_FFT : total carrier number
% d_N_CP : extented cyclic prefix
% d_N_OFDM : OFDM symbol number per frame
% v_active_rf : active RF antenna indicator
%
% OUTPUTS :
%
% m_sym_R : transmitted signal before IFFT with dimension d_N_f x d_N_ofdm x d_N_ant_act
%
%**********************************************************************************************
% EURECOM - All rights reserved
%
% AUTHOR : Xiwen JIANG, Florian Kaltenberger
%
% DEVELOPMENT HISTORY :
%
% Date Name(s) Version Description
% ----------- ------------- ------- ------------------------------------------------------
% Apr-29-2014 X. JIANG 0.1 creation of code
%
% REFERENCES/NOTES/COMMENTS :
%
% - Based on the function "genrandpskseq" created by Mirsad Cirkic, Florian Kaltenberger.
%
%**********************************************************************************************
function m_sym_R = f_ofdm_rx(m_sig_R, d_N_FFT, d_N_CP, d_N_OFDM, v_active_rf)
d_N_ant_act = sum(v_active_rf);
m_sig_R_eff = m_sig_R(:,find(v_active_rf));
m_sig_R_f = reshape(m_sig_R_eff,(d_N_FFT+d_N_CP),d_N_OFDM,d_N_ant_act);
%** delete the CP **
m_sig_R_noCP = m_sig_R_f(d_N_CP+1:end,:,:);
%** fft **
m_sym_R_fft = 1/sqrt(d_N_FFT)*fft(m_sig_R_noCP,d_N_FFT,1);
%m_sym_R_fft = fft(m_sig_R_noCP,d_N_FFT,1);
m_sym_R = m_sym_R_fft([2:151 362:512],:,:);
end
%
% PURPOSE : OFDM Transmitter
%
% ARGUMENTS :
%
% d_M : modulation order
% d_N_f : carrier number carrying data
% d_N_FFT : total carrier number
% d_N_CP : extented cyclic prefix
% d_N_OFDM : OFDM symbol number per frame
% v_active_rf : active RF antenna indicator
% d_amp : amplitude
%
% OUTPUTS :
%
% m_sym_T : transmitted signal before IFFT with dimension d_N_f x d_N_OFDM x d_N_ant_act
% m_sig_T : OFDM signal with dimension ((d_N_FFT+d_N_CP)*d_N_OFDM) x d_N_ant
%
%**********************************************************************************************
% EURECOM - All rights reserved
%
% AUTHOR : Xiwen JIANG, Florian Kaltenberger
%
% DEVELOPMENT HISTORY :
%
% Date Name(s) Version Description
% ----------- ------------- ------- ------------------------------------------------------
% Apr-29-2014 X. JIANG 0.1 creation of code
%
% REFERENCES/NOTES/COMMENTS :
%
% - Based on the function "genrandpskseq" created by Mirsad Cirkic, Florian Kaltenberger.
%
%**********************************************************************************************
function [m_sym_T, m_sig_T] = f_ofdm_tx(d_M, d_N_f, d_N_FFT, d_N_CP, d_N_OFDM, v_active_rf, d_amp)
d_N_ant_act = sum(v_active_rf);
%** constellation table **
v_MPSK = exp(sqrt(-1)*([1:d_M]*2*pi/d_M+pi/d_M));
%** transmitted symbol **
%v_state = [1;2;3;4];
%rand("state",v_state);
m_sym_T = v_MPSK(ceil(rand(d_N_f, d_N_OFDM, d_N_ant_act)*d_M));
%** mapping useful data to favorable carriers **
m_sym_T_ext = zeros(d_N_FFT,d_N_OFDM,d_N_ant_act);
m_sym_T_ext(2:151,:,:) = m_sym_T(1:150,:,:);
m_sym_T_ext(362:512,:,:) = m_sym_T(151:301,:,:);
%** ifft **
m_sig_T_ = sqrt(d_N_FFT)*ifft(m_sym_T_ext,d_N_FFT,1);
%** add cyclic prefix **
m_sig_T_ = [m_sig_T_(end-d_N_CP+1:end,:,:); m_sig_T_];
d_L = (d_N_FFT+d_N_CP)*d_N_OFDM;
m_sig_T = floor(reshape(m_sig_T_,d_L,d_N_ant_act)*d_amp);
end
%
% PURPOSE : TLS solution for AX = B based on alternative projection
%
% ARGUMENTS :
%
% A : observation of A
% B : observation of B
%
% OUTPUTS :
%
% X : TLS solution for X
%
%**********************************************************************************************
% EURECOM - All rights reserved
%
% AUTHOR : Xiwen JIANG, Florian Kaltenberger
%
% DEVELOPMENT HISTORY :
%
% Date Name(s) Version Description
% ----------- ------------- ------- ------------------------------------------------------
% Mai-05-2014 X. JIANG 0.1 creation of code
%
% REFERENCES/NOTES/COMMENTS :
%
% - none.
%
%**********************************************************************************************
function [X_est A_est B_est] = f_tls_ap(A,B)
%** initlisation **
e_new = 0;
e_old = 1e14;
e_thr = 1e-5; %error threshold: what if the error cannot fall down under the error threshold
X_est = eye(size(A,2));
A_est = A;
%** alternative projection **
while(abs(e_new-e_old)>e_thr)
e_old = e_new;
% optimise X_est
X_est = (A_est'*A_est)\A_est'*B;
%optimise A_est
A_est = B*X_est'/(X_est*X_est');
e_new = norm(A_est*X_est-B)^2+norm(A_est-A)^2;
end
B_est = A_est*X_est;
end
%
% PURPOSE : TLS solution for AX = B based on SVD assuming X is diagonal
%
% ARGUMENTS :
%
% A : observation of A
% B : observation of B
%
% OUTPUTS :
%
% X : TLS solution for X (Diagonal)
%
%**********************************************************************************************
% EURECOM - All rights reserved
%
% AUTHOR : Xiwen JIANG, Florian Kaltenberger
%
% DEVELOPMENT HISTORY :
%
% Date Name(s) Version Description
% ----------- ------------- ------- ------------------------------------------------------
% Apr-30-2014 X. JIANG 0.1 creation of code
%
% REFERENCES/NOTES/COMMENTS :
%
% - I. Markovsky and S. V. Huffel, “Overview of total least-squares methods,” Signal Processing, vol. 87, pp.
% 2283–2302, 2007
%
%**********************************************************************************************
function [X_est A_est B_est] = f_tls_diag(A,B)
d_N = size(A,2);
X_est = zeros(d_N);
A_est = zeros(size(A));
B_est = zeros(size(B));
err_est = zeros(d_N);
for d_n = 1:d_N
[X_est(d_n,d_n) A_est(:,d_n) B_est(:,d_n)] = f_tls_svd(A(:,d_n),B(:,d_n));
end
%method 2: LS solution
% for d_n = 1:d_N
% X_est(d_n,d_n) = (A(:,d_n).'*A(:,d_n))\A(:,d_n).'*B(:,d_n);
% end
%
% PURPOSE : TLS solution for AX = B based on SVD
%
% ARGUMENTS :
%
% A : observation of A
% B : observation of B
%
% OUTPUTS :
%
% X : TLS solution for X
%
%**********************************************************************************************
% EURECOM - All rights reserved
%
% AUTHOR : Xiwen JIANG, Florian Kaltenberger
%
% DEVELOPMENT HISTORY :
%
% Date Name(s) Version Description
% ----------- ------------- ------- ------------------------------------------------------
% Apr-30-2014 X. JIANG 0.1 creation of code
%
% REFERENCES/NOTES/COMMENTS :
%
% - I. Markovsky and S. V. Huffel, Overview of total least-squares methods, Signal Processing, vol. 87, pp.
% 22832302, 2007
%
%**********************************************************************************************
function [X_est A_est B_est]= f_tls_svd(A,B)
C = [A B];
n = size(A,2);
d = size(B,2);
[U S V] = svd(C,0);
V12 = V(1:n,n+1:end);
V22 = V(n+1:end,n+1:end);
S1 = S(1:n,1:n);
Z12 = zeros(n,d);
Z22 = zeros(d);
Z21 = zeros(d,n);
X_est = - V12/V22;
C_est = U*[S1 Z12;Z21 Z22]*V';
A_est = C_est(:,1:n);
B_est = C_est(:,n+1:end);
% delta_C = -U*diag([zeros(n,1);diag(S(n+1:end,n+1:end))])*V';
% delta_C = [A_est-A B_est-B]; %same as the previous calculation
% err = norm(delta_C,'fro')^2/norm(C,'fro')^2;:w
end
%
% SCRIPT ID : s_beamforming
%
% PROJECT NAME : TDD Recoprocity
%
% PURPOSE : perform beamforming based on TDD calibration
%
%**********************************************************************************************
% Eurecom - All rights reserved
%
% AUTHOR(s) : Xiwen JIANG, Florian Kaltenberger
%
% DEVELOPMENT HISTORY :
%
% Date Name(s) Version Description
% ----------- ------------- ------- ------------------------------------------------------
% Apr-30-2014 X. JIANG 0.1 script creation v0.1
%
% REFERENCES/NOTES/COMMENTS :
%
% - Based on the script "beamforming" created by Mirsad Cirkic, Florian Kaltenberger.
%
%**********************************************************************************************
%% -------- initilisation --------
d_M = 4; % modulation order, e.g. 4 means QPSK
%** frequency **
d_fc = 1907600000;
d_delta_f = 15000;
d_N_f = 301; % carrier number carrying data
d_N_FFT = 512; % total carrier number
d_N_CP = 128; % extented cyclic prefix
%** time **
d_N_OFDM = 60; % number of ofdm symbol per half frame
d_N_meas = 1; % measuement number
%** space **
d_N_antA = 4; % antenna number at site a
d_N_antB = 4; % antenna number at site b
v_active_rfA = [1 1 1 1];
v_active_rfB = [1 0 0 0];
v_indA = find(v_active_rfA); % active antenna index at site a
v_indB = find(v_active_rfB); % active antenna index at site b
d_N_antA_act = length(v_indA);
d_N_antB_act = length(v_indB);
%** amplitude **
d_amp = pow2(12.5)-1;
%% -------- load F --------
o_result = load('result/4a_l45_t10b.mat');
m_F_full = o_result.m_F0;
m_F_diag = o_result.m_F2;
%% -------- channel measurement --------
s_run_meas;
%% -------- signal precoding --------
v_MPSK = exp(sqrt(-1)*([1:d_M]*2*pi/d_M+pi/d_M));
m_sym_TA = v_MPSK(ceil(rand(d_N_f, d_N_OFDM*2)*d_M));
m_sym_TA_ideal = zeros(d_N_f,d_N_OFDM*2,d_N_antA_act);
for d_f = 1:d_N_f
%** ideal case **
v_H_A2B_ideal = squeeze(m_H_est_A2B(:,:,d_f));
v_P_ideal = v_H_A2B_ideal'/norm(v_H_A2B_ideal);
m_sym_TA_ideal(d_f,:,:) = (v_P_ideal*m_sym_TA(d_f,:)).';
%** identity matrix **
v_H_A2B_iden = squeeze(m_H_est_B2A(:,:,d_f)).';
v_P_iden = v_H_A2B_iden'/norm(v_H_A2B_iden);
m_sym_TA_iden(d_f,:,:) = (v_P_iden*m_sym_TA(d_f,:)).';
%** diagonal calibration **
v_H_A2B_diag = squeeze(m_H_est_B2A(:,:,d_f).')*squeeze(m_F_diag(:,:,2));
v_P_diag = v_H_A2B_diag'/norm(v_H_A2B_diag);
m_sym_TA_diag(d_f,:,:) = (v_P_diag*m_sym_TA(d_f,:)).';
%** full calibration **
v_H_A2B_full = squeeze(m_H_est_B2A(:,:,d_f).')*squeeze(m_F_diag(:,:,2));
v_P_full = v_H_A2B_full'/norm(v_H_A2B_full);
m_sym_TA_full(d_f,:,:) = (v_P_full*m_sym_TA(d_f,:)).';
end
%% -------- signal transmission --------
m_sig_TA_ideal = f_ofdm_mod(m_sym_TA_ideal,d_N_FFT,d_N_CP,d_N_OFDM*2,v_active_rfA,d_amp)*2;
m_sig_TA_iden = f_ofdm_mod(m_sym_TA_iden,d_N_FFT,d_N_CP,d_N_OFDM*2,v_active_rfA,d_amp)*2;
m_sig_TA_diag = f_ofdm_mod(m_sym_TA_diag,d_N_FFT,d_N_CP,d_N_OFDM*2,v_active_rfA,d_amp)*2;
m_sig_TA_full = f_ofdm_mod(m_sym_TA_full,d_N_FFT,d_N_CP,d_N_OFDM*2,v_active_rfA,d_amp)*2;
m_sig_TB = zeros((d_N_CP+d_N_FFT)*d_N_OFDM*2,d_N_antB);
oarf_send_frame(cardB,m_sig_TB,d_n_bit);
m_noise_RB_ = oarf_get_frame(cardB);
m_noise_RB = m_noise_RB_(1:d_N_OFDM*(d_N_FFT+d_N_CP),5:8);
m_n_sym_RB = f_ofdm_rx(m_noise_RB, d_N_FFT, d_N_CP, d_N_OFDM, v_active_rfB);
m_sig_TB(:,:)=1+1i;
oarf_send_frame(cardB,m_sig_TB,d_n_bit);
oarf_send_frame(cardA,m_sig_TA_ideal,d_n_bit);
m_sig_RB_ideal_ = oarf_get_frame(cardB);
m_sig_RB_ideal = m_sig_RB_ideal_(1:d_N_OFDM*(d_N_FFT+d_N_CP),5:8);
m_sym_RB_ideal = f_ofdm_rx(m_sig_RB_ideal, d_N_FFT, d_N_CP, d_N_OFDM, v_active_rfB);
oarf_send_frame(cardA,m_sig_TA_iden,d_n_bit);
m_sig_RB_iden_ = oarf_get_frame(cardB);
m_sig_RB_iden = m_sig_RB_iden_(1:d_N_OFDM*(d_N_FFT+d_N_CP),5:8);
m_sym_RB_iden = f_ofdm_rx(m_sig_RB_iden, d_N_FFT, d_N_CP, d_N_OFDM, v_active_rfB);
oarf_send_frame(cardA,m_sig_TA_diag,d_n_bit);
m_sig_RB_diag_ = oarf_get_frame(cardB);
m_sig_RB_diag = m_sig_RB_diag_(1:d_N_OFDM*(d_N_FFT+d_N_CP),5:8);
m_sym_RB_diag = f_ofdm_rx(m_sig_RB_diag, d_N_FFT, d_N_CP, d_N_OFDM, v_active_rfB);
oarf_send_frame(cardA,m_sig_TA_full,d_n_bit);
m_sig_RB_full_ = oarf_get_frame(cardB);
m_sig_RB_full = m_sig_RB_full_(1:d_N_OFDM*(d_N_FFT+d_N_CP),5:8);
m_sym_RB_full = f_ofdm_rx(m_sig_RB_full, d_N_FFT, d_N_CP, d_N_OFDM, v_active_rfB);
%% -------- SNR measurement --------
%** noise measurment **
%v_P_n = mean(var(squeeze(m_n_sym_RB),0,2));
v_P_n = mean(var(squeeze(m_n_sym_RB),0,2));
%** SNR caculation
%v_P_s_ideal = zeros(301,1);
%for d_f=1:d_N_f
% v_H_A2B_ideal = squeeze(m_H_est_A2B(:,:,d_f));
% v_P_s_ideal(d_f) = norm(v_H_A2B_ideal)^2;
%end
%keyboard;
v_P_s_ideal = var(squeeze(m_sym_RB_ideal),0,2);
v_P_s_iden = var(squeeze(m_sym_RB_iden),0,2);
v_P_s_diag = var(squeeze(m_sym_RB_diag),0,2);
v_P_s_full = var(squeeze(m_sym_RB_full),0,2);
v_SNR_ideal_ = 10*log10((v_P_s_ideal-v_P_n)/v_P_n);
v_SNR_iden_ = 10*log10((v_P_s_iden-v_P_n)/v_P_n);
v_SNR_diag_ = 10*log10((v_P_s_diag-v_P_n)/v_P_n);
v_SNR_full_ = 10*log10((v_P_s_full-v_P_n)/v_P_n);
v_SNR_ideal = nan(d_N_f+1,1);
v_SNR_iden = nan(d_N_f+1,1);
v_SNR_diag = nan(d_N_f+1,1) ;
v_SNR_full = nan(d_N_f+1,1) ;
v_SNR_ideal([1:151 153:302]) = v_SNR_ideal_([151:301 1:150]);
v_SNR_iden([1:151 153:302]) = v_SNR_iden_([151:301 1:150]) ;
v_SNR_diag([1:151 153:302]) = v_SNR_diag_([151:301 1:150]) ;
v_SNR_full([1:151 153:302]) = v_SNR_full_([151:301 1:150]);
save('-v7','result/bf_gain_4x1_t3.mat','v_SNR_ideal','v_SNR_iden','v_SNR_diag','v_SNR_full');
%% -------- plot --------
v_f = d_fc-floor(d_N_f/2)*d_delta_f:d_delta_f:d_fc+ceil(d_N_f/2)*d_delta_f;
figure(5)
hold on
plot(v_f,v_SNR_ideal,'k-')
plot(v_f,v_SNR_iden,'m-.')
plot(v_f,v_SNR_diag,'r-')
plot(v_f,v_SNR_full,'b-')
hold off
ylim([30 40])
%
% SCRIPT ID : s_run_calib
%
% PROJECT NAME : TDD Recoprocity
%
% PURPOSE : channel calibration for MISO case
%
%**********************************************************************************************
% Eurecom - All rights reserved
%
% AUTHOR(s) : Xiwen JIANG, Florian Kaltenberger
%
% DEVELOPMENT HISTORY :
%
% Date Name(s) Version Description
% ----------- ------------- ------- ------------------------------------------------------
% Apr-30-2014 X. JIANG 0.1 script creation v0.1
%
% REFERENCES/NOTES/COMMENTS :
%
% - Based on the script "calibration" created by Mirsad Cirkic, Florian Kaltenberger.
%
%**********************************************************************************************
%% ** initilisation **
%---------- to change in experiement ---------
%s_init_params;
%clc
%clear all
close all
%d_N_f = 301; % carrier number carrying data
%d_N_meas = 10; % measuement number
%d_N_loc = 5; % Rx locations
%d_N_antM = 2; % max active antenna number for site a and site b
%----------------------------------------------
%% -------- System parameters --------
d_M = 4; % modulation order, e.g. 4 means QPSK
%** frequency **
d_N_f = 301; % carrier number carrying data
d_N_FFT = 512; % total carrier number
d_N_CP = 128; % extented cyclic prefix
%** time **
d_N_OFDM = 60; % number of ofdm symbol per half frame
d_N_meas = 10; % measuement number
%** space **
d_N_antA = 4; % antenna number at site a
d_N_antB = 4; % antenna number at site b
v_indA = find(v_active_rfA); % active antenna index at site a
v_indB = find(v_active_rfB); % active antenna index at site b
d_N_antA_act = length(v_indA);
d_N_antB_act = length(v_indB);
%** amplitude **
d_amp = pow2(12.5)-1; % to see how to be used??
%% -------- calibration parameters -------
d_N_loc = 45; % Rx locations
d_N_antM = max(sum(v_active_rfA),sum(v_active_rfB)); % max active antenna number for site a and site b
%% -------- initialisation ----------------
m_H_A2B = zeros(d_N_antM,d_N_meas*d_N_loc, d_N_f); % d_N_antA x (d_N_meas*d_N_loc) x d_N_f
m_H_B2A = zeros(d_N_antM,d_N_meas*d_N_loc, d_N_f); % d_N_antA x (d_N_meas*d_N_loc) x d_N_f
m_F0 = zeros(d_N_antM,d_N_antM,d_N_f);
m_F1 = zeros(d_N_antM,d_N_antM,d_N_f);
%% ** collect the measurement data from different locations **
for d_loc = 1:d_N_loc
% run measurement, note: uncomment "clear all"
s_run_meas;
% --- the following part is dedicated to A2B MISO -----
m_H_A2Bi = permute(squeeze(m_H_est_A2B),[1 3 2]);
m_H_B2Ai = permute(squeeze(m_H_est_B2A),[1 3 2]);
% -----------------------------------------------------
m_H_A2B(:,(d_loc-1)*d_N_meas+1:d_loc*d_N_meas,:) = m_H_A2Bi;
m_H_B2A(:,(d_loc-1)*d_N_meas+1:d_loc*d_N_meas,:) = m_H_B2Ai;
%keyboard;
disp('Please move the antenna to another location and press any key to continue');
% pause
pause(5);
end
save('-v7','result/4a_l45_t10d.mat','m_H_A2B','m_H_B2A');
%save('-v7','result/2c_l15_t2a.mat','m_H_A2B','m_H_B2A');
%% ** calibration **
for d_f = 1:d_N_f
[m_F0(:,:,d_f),m_A0_est,m_B0_est] = f_tls_svd(m_H_B2A(:,:,d_f).',m_H_A2B(:,:,d_f).'); % solve the TLS problem using SVD method
[m_F1(:,:,d_f),m_A1_est,m_B0_est] = f_tls_ap(m_H_B2A(:,:,d_f).',m_H_A2B(:,:,d_f).'); % solve the TLS problem using Alternative Projection method
end
%% ** plot **
figure(10)
hold on;
for d_f=1:size(m_F0,3);
m_F= m_F0(:,:,d_f);
plot(diag(m_F),'bo')
plot(diag(m_F,1),'k+')
plot(diag(m_F,2),'rx')
plot(diag(m_F,3),'g*')
plot(diag(m_F,-1),'y+')
plot(diag(m_F,-2),'mx')
plot(diag(m_F,-3),'c*')
end
hold off;
title('F0');
axis([-2 2 -2 2])
grid on
figure(11)
hold on;