メインコンテンツ

このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。

FTP アプリケーションのトラフィック パターンの生成と可視化

この例では、IEEE® 802.11ax™ の評価方法 [1] および 3GPP TR 36.814 [2] に基づいて、ファイル転送プロトコル (FTP) アプリケーションのトラフィック パターンを生成する方法を示します。

FTP アプリケーションのトラフィック モデル

マルチノード通信システムでは、さまざまなアプリケーションのトラフィック モデルのモデル化が必要になります。各アプリケーションは、データ レート、パケット到着間隔、パケット サイズなどのパラメーターによって特徴付けられます。IEEE や 3GPP などの標準化団体は、さまざまなアルゴリズムやプロトコルを評価するため、Voice over Internet Protocol (VoIP)、ビデオ会議、FTP といったアプリケーションのトラフィック パターンを定義しています。この例では、FTP アプリケーションのトラフィック パターンを生成して可視化します。

読み取り時間 (D) で区切られた、ファイル サイズ (S) のファイル転送シーケンスは、FTP アプリケーションのトラフィック パターンを特徴付けます。読み取り時間は、ファイル転送の終了と後続のファイル転送の開始との間の時間間隔を指定します。

11ax の評価方法 [1] では、次の FTP アプリケーション トラフィック モデルが指定されています。

  • ローカル FTP トラフィック モデル — 打ち切り対数正規分布のファイル サイズと指数関数的な読み取り時間がこのモデルを特徴付けます。

3GPP TR 36.814 の仕様 [2] では、次の FTP アプリケーション トラフィック モデルが指定されています。

  • FTP トラフィック モデル 2 — 0.5 メガバイトのファイル サイズと指数関数的な読み取り時間がこのトラフィック モデルを特徴付けます。

MicrosoftTeams-image (1).png

  • FTP トラフィック モデル 3 — 0.5 メガバイトのファイル サイズとポアソン到着間隔 (トランスミッション時間と読み取り時間の合計) がこのトラフィック モデルを特徴付けます [3]。

次の表は、11ax システムおよび 5G システムのnetworkTrafficFTPオブジェクトのパラメーターを設定する方法を示しています。

FTP_Table.png

この例では、ローカル FTP トラフィック モデルを構成する方法を示します。FTP トラフィック モデル 2 および 3 を使って例を実行してみることもできます。

FTP アプリケーションのトラフィック パターン オブジェクトの構成

Communications Toolbox Wireless Network Simulation Library サポート パッケージがインストールされているかどうかを確認します。

wirelessnetworkSupportPackageCheck;

FTP アプリケーションのトラフィック パターンを生成するための構成オブジェクトを作成します。

% Reset the random number generator
rng('default');

selectFTPTrafficModel = 'localFTPModel';

% Create an FTP application traffic pattern object with default properties
ftpObj = networkTrafficFTP;

if  strcmp(selectFTPTrafficModel, 'localFTPModel')
    % Set truncated log-normal distribution mu value for file size calculation
    ftpObj.LogNormalMu = 10; 

    % Set truncated log-normal distribution sigma value for file size calculation
    ftpObj.LogNormalSigma = 1;

    % Set truncated log-normal distribution upper limit in MB
    ftpObj.UpperLimit = 5;

    % Set exponential distribution mean value for reading time in milliseconds
    ftpObj.ExponentialMean = 100;
else
    % Set file size in MB
    ftpObj.FixedFileSize = 0.5;

    if strcmp(selectFTPTrafficModel, 'ftpModel2')
        % Set exponential distribution mean value for reading time in milliseconds
        ftpObj.ExponentialMean = 100;
    else % FTP Model 3
        % Set exponential distribution mean value for reading time in milliseconds
        ftpObj.PoissonMean = 100;
    end

end

FTP アプリケーションのトラフィック パターンの生成と可視化

networkTrafficFTPオブジェクトのgenerateオブジェクト関数を使用して、FTP アプリケーションのトラフィック パターンを生成します。また、addTrafficSource メソッドを使用して、New Radio および無線ローカル エリア ネットワークのノードに FTP トラフィック パターンを追加することもできます。

% Set simulation time in milliseconds
simTime = 500;

% Simulation time left
remSimTime = simTime;

% Validate simulation time
validateattributes(simTime,{'numeric'},{'real','scalar','finite'});

% Generated packet count
packetCount = 0;

% Initialize arrays to store outputs for visualization
% Packet generation times in milliseconds
generationTime = zeros(5000,1);

% Initialize arrays to store outputs for visualization
% Packet generation times in milliseconds
sumPacketSizes = zeros(5000,1);

% Time between two consecutive packet transfers in milliseconds
packetIntervals = zeros(5000,1);

% Packet sizes in bytes
packetSizes = zeros(5000,1);

% TCP/IP header size
tcpIPHeaderSize = 40;

% FTP file size in bytes
fileSizes = zeros(simTime,1);

dt = 0; % Time remaining to generate next packet

% Loop over the simulation time, generating FTP application traffic
% pattern and saving the dt and packet size values for visualization.
while remSimTime > 0
    packetCount = packetCount+1; % Increment packet count
    % Call generate method and store outputs for visualization
    [dt, packetSizes(packetCount)] = generate(ftpObj, dt);
    packetIntervals(packetCount) = dt;
    % Remove the TCP/IP header
    packetSizes(packetCount) = packetSizes(packetCount) - tcpIPHeaderSize;
    % Store packet generation time for visualization
    generationTime(packetCount+1) = ...
        generationTime(packetCount) + packetIntervals(packetCount);
    sumPacketSizes(packetCount+1) = ...
        sumPacketSizes(packetCount) + packetSizes(packetCount);
    if dt > 0
        fileSizes(simTime-remSimTime+1) = sumPacketSizes(packetCount+1);
        sumPacketSizes(packetCount+1) = 0;
    end
    % Update simulation time
    remSimTime = remSimTime - dt;
end

生成された FTP アプリケーション トラフィック パターンを可視化します。このプロットでは、dt は 2 つの連続する FTP アプリケーション パケット間の時間間隔です。

% Packet Number Versus Packet Intervals (dt)
% Plot graph to see packet intervals
pktIntervalsFig = figure(Name='Packet intervals',NumberTitle='off');
pktIntervalsAxes = axes(pktIntervalsFig);
plot(pktIntervalsAxes,packetIntervals(1:packetCount));
grid on;
title(pktIntervalsAxes,'Packet Number Versus Reading Time');
xlabel(pktIntervalsAxes,'Packet Number');
ylabel(pktIntervalsAxes,'Reading Time in Milliseconds');

Figure Packet intervals contains an axes object. The axes object with title Packet Number Versus Reading Time, xlabel Packet Number, ylabel Reading Time in Milliseconds contains an object of type line.

% Plot to see different packet sizes
pktSizesFig = figure(Name='Packet sizes',NumberTitle='off');
pktSizesAxes = axes(pktSizesFig);
plot(pktSizesAxes,packetSizes(1:packetCount));
grid on;
title(pktSizesAxes,'Packet Number Versus Packet Size');
xlabel(pktSizesAxes,'Packet Number');
ylabel(pktSizesAxes,'Packet Size in Bytes');

Figure Packet sizes contains an axes object. The axes object with title Packet Number Versus Packet Size, xlabel Packet Number, ylabel Packet Size in Bytes contains an object of type line.

提供されたトラフィック、およびトランスミッション時間の大まかな推定値に基づいて、FTP トラフィックを可視化します。

% To obtain a correct plot, configure offeredTraffic so that the reading
% time is greater than the transmission time.

% Offered traffic per user in bits per second
offeredTraffic = 40e6;

% Find all file sizes
[tIdx]=find(fileSizes>0);
% Calculate transmission times of the packet in milliseconds
txTime = ceil((fileSizes(tIdx)*8/(offeredTraffic))*1e3);

% Estimate step increment per millisecond
stepIncr = fileSizes(tIdx)./txTime;

% Update file size after each step increment
for i = 1:numel(tIdx)
    a=1:txTime(i);
    fileSizes(tIdx(i)+1:tIdx(i)+txTime(i)) = max(fileSizes(tIdx(i))-a*stepIncr(i),0);
end

% Stem graph of FTP application traffic pattern (Packet sizes
% different files at different packet generation times)
ftpPatternFig = figure(Name='FTP application traffic pattern', ...
    NumberTitle='off');
ftpPatternAxes = axes(ftpPatternFig);
stem(ftpPatternAxes, ...
    fileSizes,Marker='none');
grid on;
title(ftpPatternAxes,'Packet Generation Time Versus File Size');
ylim([0 1.5*max(fileSizes)]);
ylabel(ftpPatternAxes,'File Size in Bytes');
xlabel(ftpPatternAxes,'Time in milliseconds');

Figure FTP application traffic pattern contains an axes object. The axes object with title Packet Generation Time Versus File Size, xlabel Time in milliseconds, ylabel File Size in Bytes contains an object of type stem.

その他の調査

この例では、11ax の評価方法 [1] および 3GPP の仕様 [2] で定義されている FTP トラフィック パターンを生成します。次の変更を行って例を実行してみてください。

  • networkTrafficVoIPを使用して、Voice over Internet Protocol (VoIP) アプリケーションのトラフィック パターンを生成する。

  • networkTrafficOnOffを使用して、オンオフ アプリケーションのトラフィック パターンを生成する。

  • networkTrafficVideoConferenceを使用して、ビデオ会議アプリケーションのトラフィック パターンを生成する。

  • 40 バイトの固定パケット サイズをもつ、クライアントからサーバーへの FTP トラフィック パターン [1] をモデル化して FTP の ACK を生成する。

参考文献

[ 1 ] IEEE 802.11-14/0571r12. "11ax Evaluation Methodology". IEEE P802.11. Wireless LANs.

[ 2 ] 3GPP TR 36.814. "Evolved Universal Terrestrial Radio Access (E-UTRA). Further advancements for E-UTRA physical layer aspects". 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

[ 3 ] 3GPP TR 36.889, "Study on Licensed-Assisted Access to Unlicensed Spectrum", 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

参考

オブジェクト