Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

4 @matlab.

 

 

- 1. Pendulum Oscillation Modelling
Consider the pendulum and with a length / and a mass m (Figure 1). Using equilibrium of forces in the
polar system, the Ordinary Differential Equation (ODE) that describes the system can be written
as shown in Eq. 1.
AY
Figure 4. Free body diagram of a simple pendulum
d²0
EM= Ia-mgr sin = Ioa-mgr sin 8 = (1 + mr²);
dt²
d²0
dt²
mgr
(la+mr²)
sin 8
where m is the mass of the pendulum, g is gravity, is the distance from the pivot point to the centre of
gravity of the pendulum (rod), and Ic is the moment of inertia about the centre of gravity:
Based on this mathematical model of the pendulum:
Q1. Find the equivalent system of two ordinary differential equations (ODE) based on the second
order differential equation given in Eq. 1. Use the specifications for the real pendulum
(Figure 2), which are given in the Table 2.
Table 2. Pendulum specifications
Mass (kg)
Length (m)
Distance from pivot point to centre of gravity (r) (m)
Moment of inertia about centre of gravity (La) (kg.m³)
0.1270
0.3365
0.1778
1.2000E-3
Q2. Develop an algorithm for the Runge-Kutta 4*-order method in Matlab (See definition
at the end of this document). Solve the nonlinear ODE numerically with the same five 8,
amplitudes. Simulate the pendulum for 8s with a time step of h= 0.1s. Include your code as
an Appendix in your report.
Q3. Plot the velocities and for all five "0 amplitudes that resulted using the ODE (numerical method)
and the experimental trials (d.mat). Comment the results.
Transcribed Image Text:- 1. Pendulum Oscillation Modelling Consider the pendulum and with a length / and a mass m (Figure 1). Using equilibrium of forces in the polar system, the Ordinary Differential Equation (ODE) that describes the system can be written as shown in Eq. 1. AY Figure 4. Free body diagram of a simple pendulum d²0 EM= Ia-mgr sin = Ioa-mgr sin 8 = (1 + mr²); dt² d²0 dt² mgr (la+mr²) sin 8 where m is the mass of the pendulum, g is gravity, is the distance from the pivot point to the centre of gravity of the pendulum (rod), and Ic is the moment of inertia about the centre of gravity: Based on this mathematical model of the pendulum: Q1. Find the equivalent system of two ordinary differential equations (ODE) based on the second order differential equation given in Eq. 1. Use the specifications for the real pendulum (Figure 2), which are given in the Table 2. Table 2. Pendulum specifications Mass (kg) Length (m) Distance from pivot point to centre of gravity (r) (m) Moment of inertia about centre of gravity (La) (kg.m³) 0.1270 0.3365 0.1778 1.2000E-3 Q2. Develop an algorithm for the Runge-Kutta 4*-order method in Matlab (See definition at the end of this document). Solve the nonlinear ODE numerically with the same five 8, amplitudes. Simulate the pendulum for 8s with a time step of h= 0.1s. Include your code as an Appendix in your report. Q3. Plot the velocities and for all five "0 amplitudes that resulted using the ODE (numerical method) and the experimental trials (d.mat). Comment the results.
Q4. Solve the above equations using Runge-Kutta 2nd-order method in the Matlab.
Q5. Also, solve this problem using Euler's method in Matlab.
Q6. Similar to the requirements in Q3, plot the velocities by using the methods in Q4 and Q5.
And then discuss the similarities and differences by comparing 3 different methods that you
used to solve the problem above, and in the end make a conclusion which one is the best
method based on your own analysis and understanding.
Reference:
Definition of Runge-Kutta 4th-order method for 2nd order ODE:
dx
de
dt²
=f(t, x, v),
=v₁ x(to)=xo. v(t₁) = vo
t₁+1=₁+h₁
h = stepsize
dx₂ = hxv,
dv₂ = hxf(t₁.x, v₁)
dx₂ = h (v₁ + 2 dv₁)
dv₂ = hxf (t₁ + 1 h. x₁ + 2 dx,₁,v₁ + 2 dv₁)
dx, = h (v₁ + 2 dv₂)
dv₁ = kxf (t₁ + 1 h, x₁ + 1dx₂, v₁ + 2 dv₂)
hx
X₁+1=X₁
dx, = h(v₁ + dv₂)
dv=hxf(t + h, x₁ + dx3. v + dv₂)
+2dx₂ + 2dx3 + dx₂)
= x₁ + ²/(dx₁
Vies=v₁ + (dv₁ + 2dv₂ + 2dvs + dv₂)
Transcribed Image Text:Q4. Solve the above equations using Runge-Kutta 2nd-order method in the Matlab. Q5. Also, solve this problem using Euler's method in Matlab. Q6. Similar to the requirements in Q3, plot the velocities by using the methods in Q4 and Q5. And then discuss the similarities and differences by comparing 3 different methods that you used to solve the problem above, and in the end make a conclusion which one is the best method based on your own analysis and understanding. Reference: Definition of Runge-Kutta 4th-order method for 2nd order ODE: dx de dt² =f(t, x, v), =v₁ x(to)=xo. v(t₁) = vo t₁+1=₁+h₁ h = stepsize dx₂ = hxv, dv₂ = hxf(t₁.x, v₁) dx₂ = h (v₁ + 2 dv₁) dv₂ = hxf (t₁ + 1 h. x₁ + 2 dx,₁,v₁ + 2 dv₁) dx, = h (v₁ + 2 dv₂) dv₁ = kxf (t₁ + 1 h, x₁ + 1dx₂, v₁ + 2 dv₂) hx X₁+1=X₁ dx, = h(v₁ + dv₂) dv=hxf(t + h, x₁ + dx3. v + dv₂) +2dx₂ + 2dx3 + dx₂) = x₁ + ²/(dx₁ Vies=v₁ + (dv₁ + 2dv₂ + 2dvs + dv₂)
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY