Need help with your Discussion

Get a timely done, PLAGIARISM-FREE paper
from our highly-qualified writers!

glass
pen
clip
papers
heaphones

Averaging Algorithms in Matlab Report

Averaging Algorithms in Matlab Report

Averaging Algorithms in Matlab Report

Description

*Please answer Part B in full (3+ sentences for each question) and add code if asked for

*included details instructions in Networks Part B

*Included key from Part A if it helps with understanding, refer to matlabcode or adjacency matrices.m from part A if necessary

*included module 11 code and notes that will be used in later problems

Part B: Averaging Algorithms
4.1 Averaging over static networks

We will first explore consensus through averaging algorithms where the interaction networks are static
in time, which is consistent with the equations we wrote the equations in Section 2.

4.1.1 Discrete and continuous time models

As we saw in Section 2, the discrete time averaging algorithm for the interaction networks we built in
Section 3 is the system of linear difference equations

x(k + 1) = (I4 − εL)x(k)
when time is discrete and is the system of linear differential equations

when time is continuous.

4.1.2 Equilibria

x ̇ = − L x

Equilibria for averaging algorithms, as for all dynamical systems, are states from which the system
does not deviate if it begins there. The models should be designed so that the consensus state is an
equilibrium, meaning that coordination between individuals persists once it’s achieved.

Problem 4.1. Explain why the vector α14 is an equilibrium for the discrete and continuous models
above when any of the three adjacency matrices are considered, for a scalar α. Are there any other
equilibria for any of the three networks: A1, A2, and A3? If so, why?

4.1.3 Eigenvalues and stability

For the continuous-time model, convergence to consensus can depend on the interaction network and
initial conditions. However, the discrete-time model also has the averaging weight ε which controls the
stability of the equilibrium at α14.

Problem 4.2. First, write a general relationship between the eigenvalues of the graph Laplacian and
those of I4 − εL, and then write an inequality showing the values of ε (depending on the eigenvalues of
L) that will allow the system to reach consensus. For each of the three networks, compute bounds for ε
that ensure the system reaches consensus.

4.1.4 Simulations

Now that we have an expectation of what networks and what values of ε may enable the networked
individuals to reach consensus, we can demonstrate the behavior of the system through numerical sim-
ulations.

Problem 4.3. Use Matlab to simulate the averaging algorithms to demonstrate the effect of the inter-
action network on consensus.

  1. Randomly generate or manually define initial conditions that you will use for your simulations.
    This should be a 4×1 vector of real numbers. Save this vector in a file named initial conditions.mat.
  2. Write a Matlab script to simulate the discrete time model for 20 time steps for each of the inter-
    action networks A1 and A2. For each network, select two values of ε: one that allows consensus
    and one that is too large to allow consensus. Plot the 4 elements of the vector x with time on the
    horizontal axis for each simulation. Clearly label all plots and discuss your observations.

7

3.

4.

4.2

Use this Matlab script to simulate the discrete time algorithm with A3 with two values of ε of
your choosing. Discuss the behavior of the system. How does consensus depend on the interaction
network and ε? Can you relate this back to the network properties encoded in the graph Laplacian?

Use the Runge Kutta method script developed in Module 11 to simulate the continuous time model
for 20 units of time with a time step of 0.5. Simulate the system for each of the parameter sets (ε
and interaction network) you selected above and compare the results between the continuous and
discrete time models.

Averaging over switching networks

Now, we will allow the interaction network to change in time using the random networks we constructed
in Section 3.

Problem 4.4. Use Matlab to simulate the discrete time averaging algorithm to demonstrate the effect
of switching interaction networks.

  1. Write a Matlab script to perform the discrete time algorithm where the interaction network is an
    independent realization of a random network that switches at each time step.
  2. Simulate the algorithm with a switching network using parameter values of N = 4, ε = 0.4 and
    p = {0.1, 0.9} for 20 time steps. (You will notice that individual simulations will vary due to the
    stochastic nature of the switching network.)
  3. Compute the disagreement ∥ξ∥ for the two simulations above (the one with p = 0.1 versus the
    one with p = 0.9) and for a static network that uses A2 and ε = 0.4 for 20 time steps. Plot the
    disagreement for each simulation with time on the horizontal axis. Describe your observations.
    What is the effect of interaction networks that switch in time?

Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."

Order Solution Now

Our Service Charter


1. Professional & Expert Writers: Eminence Papers only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Eminence Papers are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Eminence Papers are known for the timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Eminence Papers, we have put in place a team of experts who answer all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.

We Can Write It for You! Enjoy 20% OFF on This Order. Use Code SAVE20

Stuck with your Assignment?

Enjoy 20% OFF Today
Use code SAVE20