Main Content

networkTrafficFTP

FTP application traffic pattern generator

Since R2020b

Download Required: To use networkTrafficFTP, first download the Communications Toolbox Wireless Network Simulation Library add-on.

Description

The networkTrafficFTP object specifies the configuration parameters to generate a file transfer protocol (FTP) application traffic pattern based on the 3GPP TR 36.814 specification and the IEEE® 802.11ax™ Evaluation Methodology.

You can use the FTP application traffic pattern in system-level simulations to model the real-world data traffic.

Creation

Description

example

cfgFTP = networkTrafficFTP creates a default FTP application traffic pattern object.

cfgFTP = networkTrafficFTP(Name=Value) sets properties using one or more name-value arguments. For example, GeneratePacket=true generates an FTP packet.

Properties

expand all

Custom size in megabytes of the file to be transmitted, specified as a positive scalar. If you do not specify this property, the object uses the truncated lognormal distribution to calculate the file size.

Data Types: double

Truncated lognormal distribution mu value, specified as a positive scalar. The object uses this property to calculate the file size.

Dependencies

To enable this property, set the FixedFileSize property to [ ].

Data Types: double

Truncated lognormal distribution sigma value, specified as a positive scalar. The object uses this value to calculate the file size.

Dependencies

To enable this property, set the FixedFileSize property to [ ].

Data Types: double

Truncated lognormal distribution upper limit, specified as a positive scalar. The object uses this value to calculate the file size. The generated file size value must be less than or equal to the UpperLimit value. If the generated file size value is greater than UpperLimit, the object discards the file size and creates a new one.

Dependencies

To enable this property, set the FixedFileSize property to [ ].

Data Types: double

Time interval in milliseconds between two consecutive file transfers, specified as a positive scalar. To specify a customized value for the reading time, specify this property. If you do not specify this property, the object uses the exponential distribution to calculate the reading time.

Data Types: double

Exponential distribution mean value in milliseconds, specified as a nonnegative scalar. The object uses this property to calculate the reading time.

Dependencies

To enable this property, set the ReadingTime property to [ ].

Data Types: double

Poisson distribution mean value in milliseconds, specified as a nonnegative scalar. The object uses this property to calculate the packet interarrival time.

Data Types: double

Flag to indicate whether the object generates an FTP packet, specified as a logical 0 (false) or 1 (true).

Data Types: logical

Application data to be added in the FTP packet, specified as a column vector of integers in the range [0, 255]. If the size of the application data is greater than the packet size, the object truncates the application data. If the size of the application data is less than the packet size, the object appends zeros.

Dependencies

To enable this property, set the GeneratePacket property to true.

Data Types: double

Object Functions

expand all

generateGenerate next FTP, On-Off, VoIP, or video conference application traffic packet

Examples

collapse all

Create a default FTP application traffic pattern object.

cfgFTP = networkTrafficFTP;

Generate an FTP application traffic pattern.

[dt,packetSize] = generate(cfgFTP);

Create an FTP application traffic pattern object, specifying the reading time.

cfgFTP = networkTrafficFTP(ReadingTime=5);

Generate an FTP application traffic pattern.

[dt,packetSize] = generate(cfgFTP);

Create an FTP application traffic pattern object to generate an FTP data packet.

cfgFTP = networkTrafficFTP(GeneratePacket=true);

Generate an FTP application traffic pattern and data packet.

[dt,packetSize,packet] = generate(cfgFTP); 

Create a default FTP application traffic pattern object.

cfgFTP = networkTrafficFTP;

Generate an FTP application traffic pattern with 20,000 FTP packets.

numPkts = 20000;
dt = zeros(1,numPkts);
packetSize = zeros(1,numPkts);
for packetCount = 1:numPkts
    [dt(packetCount),packetSize(packetCount)] = generate(cfgFTP);
end

Visualize the FTP packet sizes.

stem(packetSize); 
title('Packet Size Versus Packet Number');
xlabel('Packet Number');
ylabel('Packet Size in Bytes');

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

Visualize the FTP packet intervals.

figure;
stem(dt); 
title('dt Versus Packet Number');
xlabel('Packet Number');
ylabel('dt in milliseconds');

Figure contains an axes object. The axes object with title dt Versus Packet Number, xlabel Packet Number, ylabel dt in milliseconds contains an object of type stem.

References

[1] 3GPP TR 36.814. "Evolved Universal Terrestrial Radio Access (E-UTRA). Further advancements for E-UTRA physical layer aspects". Release 15. 3rd Generation Partnership Project; Technical Specification Group Radio Access Network. https://www.3gpp.org.

[2] IEEE 802.11-14/0571r12. "11ax Evaluation Methodology." IEEE P802.11. Wireless LANs. https://www.ieee.org.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced in R2020b

expand all