*Abstract*—A method for fitting
very long IP traffic traces to a Markov Modulated Poisson

Process (MMPP) model is proposed in this paper. We compare our method to a previously

published technique using several 24 hour traces. Our method is useful when the traces are

very long and exhibit diurnal traffic changes.

**Matlab Code**

Save the trace file with the name packsPerSec in the same directory as the Matlab code.

packsPerSec is a text file with number of packets received per time unit in each line

This is an implementation of algorithm *LAMBDA*
that was proposed in [1]. Once the MMPP

states are determined using algorithm *LAMBDA,*
the code determines transition probability

matrix and then generates data using the transition probability matrix. Finally, it compares

generated data with trace data using quantile-quantile plot. The code is divided into 5 parts

(see comments in matlab code).

__Part 1:__ Determine MMPP states from the trace using
algorithm *LAMBDA.*

__Part 2:__ Assign each sample in trace to the corresponding
MMPP state and find state transition

matrix.

__Part 3:__ Find state transition probability matrix and infinitesimal
generator matrix (Q matrix) from

state transition matrix.

__Part 4:__ Generate a MMPP state sample from Q-Matrix.

__Part 5:__ Generate a packet trace from MMPP state sample.

This is an implementation of the algorithm that we proposed in this paper. This code is also

Divided into 5 parts and all parts are similar to Algorithm 1 except parts 1 and 2. In part 1,

algorithm *LAMBDA* is used only to
generate the rates (not states). In part 2, data is divided into

state sets (regions that can be modeled using the same set of states). Then states are assigned

with rates that were determined using
algorithm *LAMBDA.*

This code takes two traces as input: one is original traffic trace and other is the trace generated

from MMPP model using one of the two program Algorithm1.m or NewAlgorithm.m. It uses the

fluid-flow simulation model to find the mean waiting time in queue. Packet arrivals to the queue

are determined using the two traces and service rate depends on the load which varies from

0.1 to 0.9 in the simulation.

This code uses the same fluid-flow simulation model as the code Meandelay.m but compares mean

packet loss rates for the two traces instead of mean delays.

Reference:

[1]. Daniel P. Heyman and David Lucantoni, “Modeling Multiple IP Traffic Streams with Rate

Limits,”
*IEEE/ACM Transactions on Networking*, Vol. 11, No. 6, pp. 948-958,
December 2003.