⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 scm_core.m

📁 SCM 信道模型的相关仿真程序:3GPP-TR-25.996
💻 M
字号:
%SCM_CORE Channel coefficient computation for a geometric channel model
%   [H DELTA_T FINAL_PHASES FINAL_PHASES_LOS]=SCM_CORE(SCMPAR, LINKPAR,
%   ANTPAR, BULKPAR, BSGAIN, BSGAIN_LOS, MSGAIN, MSGAIN_LOS, OFFSET_TIME,
%   BSGAINISSCALAR, MSGAINISSCALAR) This is the scm_core aka the big for
%   loop. It implements the formulas in [1, Sec. 5.4] and [1, Sec. 5.5].
%
%   Outputs:
%
%   H               - [UxSxNxTxK] array of channel coefficients
%   DELTA_T         - time sampling intervals (in seconds) for all links
%   FINAL_PHASES    - final phases of all subpaths in degrees over (-180,180)
%   FINAL_PHASES_LOS- final phases for LOS paths in degrees over (-180,180)
%   
%   Inputs:
%
%   SCMPAR          - input struct, see SCMPARSET
%   LINKPAR         - input struct, see LINKPARSET
%   ANTPAR          - input struct, see ANTPARSET
%   BULKPAR         - input BULKPAR, see GENERATE_BULK_PAR
%   BSGAIN          - [KxSxNxM] array of interpolated antenna field
%                     patterns (complex)
%   BSGAIN_LOS      - [KxS] array of interpolated antenna field patterns
%                     (complex) for LOS paths. Only used with the LOS
%                     option; it is set to scalar otherwise.
%   MSGAIN          - [KxUxNxM] array of interpolated antenna field
%                     patterns (complex)
%   MSGAIN_LOS      - [KxU] array of interpolated antenna field patterns
%                     (complex) for LOS paths. Only used with the LOS
%                     option; it is set to scalar otherwise.
%   OFFSET_TIME     - time offset added to the initial phase (set to zero by default)
%   BSGAINISSCALAR  - this is 1 if BsGain is uniform over azimuth, 0 otherwise.
%   MSGAINISSCALAR  - this is 1 if MsGain is uniform over azimuth, 0 otherwise.
%
%   With 'polarized' option:
%
%   BSGAIN          - [KxSx2xNxM] array of interpolated antenna field
%                     patterns (complex), where the third dimension are
%                     the patterns for [V H] polarizations. 
%   MSGAIN          - [KxUx2xNxM] array of interpolated antenna field
%                     patterns (complex), where the third dimension are
%                     the patterns for [V H] polarizations. 
%
%   To compile the ANSI-C written optimized core, type
%
%       mex scm_mex_core.c
%
%   at MATLAB prompt. For further documentation on the ANSI-C implementation 
%   of the SCM_CORE, see SCM_MEX_CORE.

%   Authors: Giovanni Del Galdo (TUI), Jussi Salmi (HUT), Marko Milojevic (TUI), 
%   Christian Schneider (TUI), Jari Salo (HUT), Pekka Ky鰏ti (EBIT), 
%   Daniela Laselva (EBIT)
%   $Revision: 0.3 $  $Date: Jan 13, 2005$


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%      %%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%            %%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%                  %%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%                        %%%%%%%%%%%%%%
%%%%%%%%%%%                              %%%%%%%%%%%
%%%%%%%%                                    %%%%%%%%
%%%%%                                          %%%%%
%%                   --------                     %%
function [H, delta_t, output_SubPathPhases, output_Phi_LOS] = scm_core (scmpar,linkpar,antpar,bulkpar,BsGain,BsGain_Theta_BS,MsGain,MsGain_Theta_MS,offset_time, BsGainIsScalar, MsGainIsScalar)
%%                   --------                     %%
%%%%%                                          %%%%%
%%%%%%%%                                    %%%%%%%%
%%%%%%%%%%%                              %%%%%%%%%%%
%%%%%%%%%%%%%%                        %%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%                  %%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%            %%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%      %%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% scm_core AKA the big for loop. It implements the formula in 5.4
%
%
% offset_time [samples] = defines the starting point (in samples) of the
%                         time axis
% Examples: you want to calculate 1000 time samples calling the scm_core
%           twice (everytime for 500 timesamples)
%           H1 = scm_core (..., 0)
%           H2 = scm_core (..., 500)
%
%   Revision history:
%  
% ______09-June-2004_____
% 1- now scm_core uses path_powers and not subpath_powers
% 2- fixed PHI_LOS
% 3- fixed the antenna gains for the LOS component
%
% ______15-June-2004_____
% 
% 1- the powers must be in linear scale
% 2- LOS probability has been removed since it's never used
% 3- the shadow fading will be applied outside the scm_core, thus it's
%    removed
%
% ______16-June-2004_____
% 
% 1- removed the string argument to call 'safe' 'sparse' etc.  Now it
%    always runs the 'safe' way
% 2- Giovanni: added the polarized option
% 3- removed the sqrt from the gains - they are complex and expressed in
%    tension
% 4- added the phase output
%
% ______21-June-2004_____
% 1- fixed a bug in the polarized loop. du and aoas were missing
%
% ______21-June-2004_____
% 1- fixed a bug in the polarized loop. aoas and aods are degrees! 
%
% ______19-July-2004_____
% 1- Jari: help text and minor editorial work
%
% ______26-July-2004_____ (Jari)
% 1- changed 'polarized' option so that mean power is normalized
% 2- changed the way S and U are determined
% 3- changed MsElementSpacingULA to MsElementPosition
% 4- added ANSI-C core
%
% ______29-July-2004_____ (Jari)
% 1- Added two new input args: BsGainIsScalar and MsGainIsScalar
%
% ______14-September-2004_____ (Jari)
% 1- Modifications for intra-cluster delay spread (ANSI-C part only)
% 2- Fixed delta_t so that SampleDensity means samples per 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -