📄 mimo.m
字号:
%MIMO Perform MIMO system simulation.% MIMO is the main simulation script where all the blocks are% glued together. This is the body of the program which allows% to set various simulation conditions and change wide range% of parameters. Modular architecture let's you easy focus your% effort on particular block development while the rest of the% system is not affected by this module.Other modules can be% integrated into the body very easily. You just need to modify% simulation parameters in the script header. %% See the script body to learn more.% Copyright 2001-2002 Kamil Anis, anisk@feld.cvut.cz% Dept. of Radioelectronics, % Faculty of Electrical Engineering% Czech Technical University in Pragu% $Revision: 2.0 $ $Date: 2002/10/23 17:33:28 $% --% <additional stuff should go here>clear all;fashion; % graphics settingsmd = 4; % # of constellation signalss = 8; % # of code trellis statesfr_length = 10; % frame length [symbols]frames = 1; % # of frameszf = 3; % length of zero appendixsrc_mode = 'Random'; % source operation mode% src_mode = 'Ramp';% src_mode = 'Const';src_const = 0;pulse_shape = 'SqRRC'; % modulation impulse shape% pulse_shape = 'Rect';pulse_cutoff = 8; % mod. impulse shorteningpulse_rolloff = 0.4; % roll-off factorsymb_time = 0.0001; % symbol durationsymb_samples = 4; % samples per symbolsymb_energy = 1; % symbol average energych_conf = [2 2]; % MIMO configurationch_snr = 4; % channel SNR [dB]ch_fading = 'None'; % MIMO channel fading% ch_fading = 'AWGN';% ch_fading = 'Rayleigh';% est_csi = 'Perfect'; % CSI mode%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% INIT %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pre-requisitiessymb_smplper = symb_time / symb_samples; % symbol sample periodsig_pwr = symb_energy / symb_time; % modulation (constell) powermod_gain = scale(md,symb_energy); % scale factor[lt_data,lt_state] = ltable(md,s,'EchoOn');% display chosen design% figure(1); dispdes(lt_data,lt_state);mod_pulse = makepulse(pulse_shape,pulse_cutoff,symb_time,symb_samples,... pulse_rolloff,'EchoOn');%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% RUN %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%data_src = source(fr_length,frames,md,zf,src_mode,src_const,'EchoOn');data_enc = space(data_src,lt_data,lt_state,'EchoOn');sig_mod = modul(data_enc,md,mod_pulse,symb_samples,mod_gain,'EchoOn');[sig_corr,ch_coefs] = channel(sig_mod,ch_conf,ch_fading,sig_pwr,ch_snr,... symb_time,symb_smplper,'EchoOn');% [est_coefs,mse]=est(sig_corr,est_csi,ch_coefs);sig_rec = sig_corr;[data_est,state_est] = detect(sig_rec,lt_data,lt_state,ch_coefs,symb_samples,... symb_smplper,mod_gain,mod_pulse,'EchoOn');%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TERM %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%errs = count(data_src,data_est,'EchoOn');% display decoding process in graphical form% figure (2); disptrell(lt_data,lt_state,data_est,state_est);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -