Discrete-Event Simulation of a Random Early Detection

Assignment Help Simulation in MATLAB
Reference no: EM132410933

EE509 Assignment - Discrete-Event Simulation of a Random Early Detection (RED) Congestion Avoidance Scheme

Scenario I - Modelling a Queue with No Loss - Simple Queue Simulator

Implement the M/M/1 queuing model simulation as specified in Scenario I. Your simulator should include a batched mean-delay statistic that calculates the mean delay at periodic intervals.

(1.1) Give a brief description of how your simulator generates random numbers with the specified distribution and a given mean value.

(1.2) Describe how the departure time of a packet from the system (completion of transmission) is calculated given the arrival time of the packet (the time the packet joined the end of the queue). Make reference to any relevant variables that are used in the code to represent the current state of the system.

(1.3) Give a brief description of the functioning of the event processing loop, making reference to insertion and removal/processing of arrival, departure and statistic events during a simulation run.

Set up your simulation according to the parameters of Scenario I and with a mean offered load of ρ = 0.8 Erlangs. Run the simulation for 1000 simulated seconds. Gather mean delay statistics in batches of 10 sec intervals (100 batch means in total).

(1.4) Show how you have calculated the mean service rate μ (packet transmission rate) and the mean arrival rate λ for the given offered load.

(1.5) Plot the set of batch means against time (e.g. using MS Excel, Matlab or Scilab) and calculate the mean value over all batches.

(1.6) Calculate the 95% confidence interval, stating the answer as a ± percentage. Show your calculation, briefly commenting on the method/formulae you have used.

(1.7) Compare your mean simulation result to the theoretic result for system delay in the M/M/1 queuing system (see [4], pp. 61). Show your calculation. Comment briefly on the result.

(1.8) Using the analytic formula, plot a graph for mean system delay for the range of offered load values ρ = {0.4, 0.5, 0.6, 0.7, 0.8, 0.9} (with load values as x-axis).

Scenario II - Modelling a Queue with a Drop-Tail Policy - Drop-Tail Queue Simulator

Modify your previous simulator of Scenario I to implement the drop-tail queue of Scenario II. As well as a batched mean-delay statistic, your simulator should also implement a normalised throughput statistic and a statistic that records the proportion of packets whose delay is greater than a given value, as described in Section 1.6. A batch length of 5 seconds of simulated time should be used for all statistics.

(2.1) Explain briefly how the simulator of Scenario I has been modified to implement the drop-tail queue.

(2.2) Plot the instantaneous queue size vs time (all changes in queue size as packets arrive and depart the system) over a one second simulated interval, for ρ = 1.2.

(2.3) Execute your simulator for the load values in Table 1 below. Use a total simulation run time that ensures that the 95% confidence interval for all mean delay measures is no greater than ±3%. What length simulation run (in simulated seconds) was required? Complete Table 1 with mean throughput, mean delay and the corresponding 95% confidences intervals, calculated from the set of batch means in each case.

Table 1: Drop-tail Policy Simulated Performance Statistics

Offered Load (Erlang)

Mean Throughput (As fraction of time link busy)

95% C.I. (as ±%)

 

Mean Delay (ms)

95% C.I. (as ±%)

 

0.7

 

 

 

 

0.8

 

 

 

 

0.9

 

 

 

 

1.0

 

 

 

 

1.1

 

 

 

 

1.2

 

 

 

 

1.3

 

 

 

 

1.4

 

 

 

 

(2.4) Calculate the theoretic value of normalised throughput (λeff/μ) for an offered load of 1 Erlang and compare to your simulation result. (See analysis of M/M/1/K queue in [4] pp. 68, noting that K=31 in this case).

(2.5) From your simulation statistics, when offered load is 1.1 Erlangs, what proportion of accepted packets are delayed by more than 25ms. Quote the 95% confidence interval with your answer.

Scenario III - Modelling a Queue with a RED Congestion Control - RED Queue Simulator

Modify your previous simulator to implement the RED congestion avoidance policy described in Section 1.4. Use the same total queue length as in the previous exercise.

(3.1) Explain briefly how the previous simulator has been modified to implement the RED algorithm, making reference in particular to the following questions and, where appropriate, listing code snippets to illustrate your implementation,

a) When is the instantaneous queue size updated?

b) When is the average queue size updated?

c) How is the start of an idle period detected?

d) How is it decided if a packet is to be dropped given some value of pa?

(3.2) Plot the instantaneous queue size over a one second interval when ρ = 1.2 and the windowed average on the same plot. Choose an interval that includes at least one idle period (so that the effect of equation (2) is illustrated). Compare with the plot of (2.2).

(3.3) Execute your simulator for the load values in Table 2 below. Use the same total simulation run time and batch length as used in (2.3) above. Complete Table 2 with mean throughput, mean delay and 95% confidences intervals.

Table 2: RED Congestion Control Policy Simulated Performance Statistics

Offered Load (Erlang)

Mean Throughput (As fraction of time link busy)

95% C.I. (as ±%)

 

Mean Delay (ms)

95% C.I. (as ±%)

 

0.7

 

 

 

 

0.8

 

 

 

 

0.9

 

 

 

 

1.0

 

 

 

 

1.1

 

 

 

 

1.2

 

 

 

 

1.3

 

 

 

 

1.4

 

 

 

 

(3.4) Using your data from Tables 1 and 2, plot (i) a graph comparing the mean delay of the drop-tail and RED congestion avoidance policies and (ii) mean normalised throughput of the two policies (using offered load on x-axis of graphs). Briefly comment on the differences.

(3.5) From simulation results, when offered load is 1.1 Erlangs, what proportion of accepted packets are delayed by more than 25ms? Quote the 95% confidence interval with your answer. Assuming that a higher layer protocol ignores/discards packets that have been delayed longer than 25ms, estimate and compare the total effective throughput for the RED policy and the drop-tail policy (using your answer of (2.5) for the calculation for drop-tail).

Attachment:- Assignment File.rar

Reference no: EM132410933

Questions Cloud

Based on the amount of interest to be paid : a) Based on the amount of interest to be paid, which bank loan should the floral Boutique choose?
Company propose for the funds raised by the ipo : What does this company do? What purpose does the company propose for the funds raised by the IPO?
The misconceptions of sign language : The misconceptions of sign language. Some people believe sign language is based on English. When did it become considered a language?
Demonstrate the principles of love languages : To demonstrate the principles of love languages and effective use of interpersonal communication skills through "gifting" a close interpersonal relationship.
Discrete-Event Simulation of a Random Early Detection : EE509 Assignment - Discrete-Event Simulation of Random Early Detection Congestion Avoidance Scheme. Modelling a Queue with No Loss - Simple Queue Simulator
What is the npv of the project : Assume that TVflix has a choice to invest additional $80 million in year 1 to export the sitcoms to the rest of East Asia, only if the project succeeds in China
Impact the continent positively in the future : What African Leaders can do strategically that would impact the continent positively in the Future.
Effect on sales or investors interest : Explain why businesses should only be socially bound when it will have an effect on sales or investors interest.
What is the net present value of proposed : Your monthly interest rate is 1.5 percent. What is the net present value of this proposed switch using the accounts receivable approach?

Reviews

Write a Review

Simulation in MATLAB Questions & Answers

  Calculate the stress intensity factor

Use the three-parameter zone finite element method or the boundary collocation method to calculate the stress intensity factor K, at the crack tip for the plate

  Build a simulation using newtons laws of motion

Build a new and different simulation of your own using Newtons laws of motion and Show the code and describe how it works

  Write the specification of load mover

Write the specification of LOAD MOVER detailed of the whole design and precise for automatic control section and divide the design into various modules and Is the kernel required if yes which one?

  Design the automatic control section using statecharts

Aim of this project is to design an embedded system which can move loads from one place to another. The system can be operated manually, automatically and wirelessly.

  Need an expert who can model a drill in simulink

Need an expert who can model a drill in Simulink. Working model of a drill needing for an improvment to behave more realistically as a drill to drill through plastic block.

  Project is on load frequency control using fpid

Project is on load frequency control using FPID tuned using GA and PSO algorithm and the system is a two area system.

  Number of packets received with time

Let x be the number of packets received with time -

  Build a matlab based graphical user interface

Build a Matlab based graphical user interface (GUI) that operates in conjunction with a base Matlab/ Simulink simulation program. Any base simulation is considered acceptable.

  Build a matlab based graphical user interface

Build a Matlab based graphical user interface (GUI) that operates in conjunction with a base Matlab/ Simulink simulation program. Any base simulation is considered acceptable.

  Simulate the standardised sum of independent

Simulate the standardised sum of independent and identically distributed variates - Fit a linear regression model as in Q5, and plot your estimates for β0 and β1 as N increases, together with a line indicating their true values. Supply your code.

  Plot the original periodic square wave

Plot the original periodic square wave on the same graph. Comment on the difference between the original periodic square wave and its truncated Fourier series presentation.

  Use matlab to plot the function

Plot the original periodic square wave on the same graph. Comment on the difference between the original periodic square wave and its truncated Fourier series presentation.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd