48
7CEM2425 Dynamic Systems and Simulation Lab 2: Report Wijetunge de Silva, Michael-Melhan Department of Mechanical Engineering King’s College London January 21, 2008

7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

Embed Size (px)

DESCRIPTION

EN2342 — Simulation of Mechanical Engineering Systems EN2425 — Dynamical Systems and Simulation Coursework/Lab SMES1/DSS1 — Simulation of Simple Dynamical Systems Introduction This coursework has 3 elements: A) Pre-lab analysis B) Programming of model in SIMULINK C) Simulations and analysis of results The objective of element A is to model and analyze each system and to prepare the equations which describe the system into a form suitable for solution by a digital computer. Element B is to program the model into SIMULINK in order to solve the system equations and obtain simulation results. Element C is to perform the simulations, print the responses, record your observations and analyze the results. ELEMENT B OF SYSTEMS 1 AND 2 MUST BE COMPLETED DURING THE LABORATORY SESSION. WHEN IT IS COMPLETED, IT MUST BE CHECKED AND SIGNED-OFF BY THE DEMONSTRATOR. YOU WILL NOT BE ALLOWED TO BEGIN ELEMENT B OF ANY QUESTION UNTIL ELEMENT A FOR THAT QUESTION IS COMPLETE. ELEMENT C SHOULD BE STARTED AT THE END OF THE SCHEDULED SESSION AND COMPLETED IN YOUR OWN TIME. YOUR CHOICE OF SYSTEM FOR QUESTION 3 MUST BE AGREED WITH DR. MANNAN BEFORE THE END OF TERM. THE WRITE-UP FOR ELEMENTS A, B AND C MUST BE HANDED-IN TO THE DIVISION OFFICE BY MONDAY 21 JANUARY 2008. Remember to include your name, course and the date on your front page. Plots included in your report should be annotated by hand. All or part of your write-up may be hand-written. You are strongly advised to hand-write the maths. Keep the comments and answers reasonably brief and succinct but you must show your stages of workings. Support your comments and answers with appropriate theoretical results and analysis. Your SIMULINK programs should be suitably annotated so that the model is well-presented and clear to any other user, and sufficient information should be given for your results to be reproduced solely by reference to your report. Three dynamical systems will be considered in this exercise: 1. Chaotic system 2. Lumped capacitance model 3. Student’s choice - chaotic system

Citation preview

Page 1: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

7CEM2425 Dynamic Systems and Simulation

Lab 2: Report

Wijetunge de Silva, Michael-MelhanDepartment of Mechanical Engineering

King’s College London

January 21, 2008

Page 2: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

Contents

1 Chaotic Systems 1

Element A - Preliminary Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.1 Show, when in state space form, that there are three state space equations. Is it

therefore possible for this system to exhibit chaotic behaviour? . . . . . . . . . . . . 1

1.2 Find the three singularity points. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

1.3 Linearize the equation about these three singular points. . . . . . . . . . . . . . . . . 3

1.4 Find, without solving, the eigenvalue equation that determines the stability of each of

these equilibrium points. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Element B - SIMULINK Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

1.5 Give a full description of your SIMULINK model. . . . . . . . . . . . . . . . . . . . 5

Element C - Simulations and Analysis . . . . . . . . . . . . . . . . . . . . . . . . . 7

1.6 Choose parameters σ, λ, b such that the condition in (1) are not satisfied and the

system equilibria are not all unstable. . . . . . . . . . . . . . . . . . . . . . . . . . . 7

1.7 Choose parameters σ, λ, b such that the condition in (1) are satisfied and the system

equilibria are all unstable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

1.8 Plot how the trajectories of two points which start very close to each other diverge

over time for each of the two sets of parameters you have chosen in 1.6 and 1.7. . . 15

2 Lumped Parameter System 17

Element A - Preliminary Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

2.1 Calculate the Biot number for the system. hence determine the appropriate number of

lumps that the system must be split into, in a multiple-lumped capacitance modelling

approach. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

2.2 Draw an electrical circuit representing your lumped parameter system. Hence de-

rive the equation that determine the temperatures at each node in your system and

calculate the resistance and capacitance associated with each node. . . . . . . . . . . 18

2.2.1 Deriving the equation for node T0 . . . . . . . . . . . . . . . . . . . . . . . . 19

2.2.2 Deriving the equation for node Ti . . . . . . . . . . . . . . . . . . . . . . . . 19

i

Page 3: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

2.2.3 Deriving the equation for node Tn . . . . . . . . . . . . . . . . . . . . . . . . 20

Element B - SIMULINK Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

2.3 Give a full description of your SIMULINK model. . . . . . . . . . . . . . . . . . . . 22

Element C - Simulations and Analysis . . . . . . . . . . . . . . . . . . . . . . . . . 24

2.4 With T0∞ and Tn∞ set at 200 C and 30 C respectively, and with the steel plate

initially at 30 C, plot the temperature at each end of the plate against time. List the

steady state values for each node in your system. Calculate the heat flow into and

out of the plate at steady state and comment on the result. . . . . . . . . . . . . . . 24

2.5 With T0∞ and Tn∞ set at 200 C and 30 C respectively, and with the steel plate

initially at 200 C, plot the temperature at each end of the plate against time. Check

that your steady state values agree with your previous results. Calculate the heat flow

into and out of the plate at steady state and comment on the result. What do you

notice about the steady state temperatures plotted against distance? . . . . . . . . . 26

2.6 Choose a method for verifying the accuracy of your results. Decide, and justify the de-

gree of accuracy which is desired in the simulations, bearing in mind the assumptions

of the model, and record the system tolerances that achieve this level of accuracy. . . 29

2.7 With the parameters set as in Question 2.4, simulate the system for 800s and put on

a single graph plots of temperature against time at each node. Plot the temperatures

at each node versus distance at 800s and comment on the result. . . . . . . . . . . . 30

3 Focused Study of the Lorenz Model 32

Element A - Preliminary Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

3.1 Describe your chosen system. Show that the system has the potential for exhibiting

chaotic behaviour. Deduce the equations of motion for the system you have chosen

and write down your analysis, listing any approximations and assumptions you have

made. Rearrange your equations in state space form so that they can be implemented

in Simulink. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

3.2 Attempt to predict general characteristics of the behaviour of the system. For example,

you may want to find the system equilibrium points, linearize around these points,

and make deductions on system stability around these points. Alternatively, there

may be analytical solutions available for special classes of initial conditions. . . . . . 33

Element B - SIMULINK Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

3.3 Give a full description of your SIMULINK model. . . . . . . . . . . . . . . . . . . . 36

ii

Page 4: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

3.4 Devise some tests to determine the accuracy of your solution, and to check whether

the model is working correctly. Give an account of your tests and the results. . . . . 38

Element C - Simulations and Analysis . . . . . . . . . . . . . . . . . . . . . . . . . 39

A Appendix 40

iii

Page 5: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

List of Tables

1 Chosen values of the initial conditions. . . . . . . . . . . . . . . . . . . . . . . . . . 5

2 Chosen values of the initial conditions. . . . . . . . . . . . . . . . . . . . . . . . . . 7

3 Chosen values of σ, ρ, and b, so that the system equilibria are not all unstable. . . . 7

4 Chosen values of the initial conditions. . . . . . . . . . . . . . . . . . . . . . . . . . 11

5 Chosen values of σ, ρ, and b, so that the system equilibria are all unstable. . . . . . 11

6 Variables given for simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

7 List of steady state values of temperature for each node. . . . . . . . . . . . . . . . 25

8 Heat flow across each lump of the system. . . . . . . . . . . . . . . . . . . . . . . . 25

9 List of steady state values of temperature for each node. . . . . . . . . . . . . . . . 27

10 Heat flow across each lump of the system. . . . . . . . . . . . . . . . . . . . . . . . 27

11 Chosen values of the initial conditions. . . . . . . . . . . . . . . . . . . . . . . . . . 36

List of Figures

1 SIMULINK Model to Simulate System Dynamics . . . . . . . . . . . . . . . . . . . 5

2 SIMULINK: Simulation Configuration Parameters . . . . . . . . . . . . . . . . . . . 6

3 Plot of the system response on the x1-x2 plane. . . . . . . . . . . . . . . . . . . . . 8

4 Plot of the system response on the x1-x3 plane. . . . . . . . . . . . . . . . . . . . . 9

5 Plot of the system response on the x2-x3 plane. . . . . . . . . . . . . . . . . . . . . 10

6 Plot of the system response on the x1-x2 plane. . . . . . . . . . . . . . . . . . . . . 12

7 Plot of the system response on the x1-x3 plane. . . . . . . . . . . . . . . . . . . . . 13

8 Plot of the system response on the x2-x3 plane. . . . . . . . . . . . . . . . . . . . . 14

9 Plot of x1-x2 and x1-x3 for the system equilibria chosen in Q1.6. . . . . . . . . . . . 15

10 Plot of x1-x2 and x1-x3 for the system equilibria chosen in Q1.7. . . . . . . . . . . . 16

iv

Page 6: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

11 Steel plate in contact with air. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

12 The electrical circuit representing the lumped parameter system. . . . . . . . . . . . 18

13 SIMULINK Model of the lumped parameter system. . . . . . . . . . . . . . . . . . . 22

14 SIMULINK: Simulation Configuration Parameters . . . . . . . . . . . . . . . . . . . 23

15 Plot of the temperature at each end of the plate against time. . . . . . . . . . . . . 24

16 Plot of the temperature at each end of the plate against time. . . . . . . . . . . . . 26

17 Plot of the temperature at each end of the plate against time. . . . . . . . . . . . . 28

18 Plot of the lot of temperature against time at each node, simulated for 800s. . . . . 30

19 Plot of temperatures at each node versus distance, simulated for 800s. . . . . . . . . 31

20 SIMULINK Model to Simulate System Dynamics . . . . . . . . . . . . . . . . . . . 36

21 SIMULINK: Simulation Configuration Parameters . . . . . . . . . . . . . . . . . . . 37

22 3D plot of the Lorenz model in the x1-x3, x2-x3, x1-x3 and planes, respectively. . . . 38

v

Page 7: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

7CEM2425 - DSS Lab 2: ReportMSc Mechatronics 2007/8

Wijetunge de Silva, Michael-MelhanID: 0737855 / [email protected]

1 Chaotic Systems

Element A - Preliminary Analysis

1.1 Show, when in state space form, that there are three state space

equations. Is it therefore possible for this system to exhibit

chaotic behaviour?

The equation of motion for a simple pendulum undergoing forced harmonic excitation obeys,

θ = − 1

lp

(cpmplp

θ + g sin θ

)+ A cos(ωt) (1)

Written in state space form, as an autonomous system, yields three state space equations as follows,

x1 = θ (2)

x2 = θ (3)

x3 = t (4)

x1 = x2 (5)

x2 = − 1

lp

(cpmplp

x2 + gx1

)+ A cos(ωx3) (6)

x3 = 1 (7)

The equation of motion for a simple pendulum undergoing forced harmonic excitation, in state

space form yields a system that has three degrees of freedom - although the explicit dependence of

time has been removed from system state equations.

This is the first condition for a system to be chaotic, since in a two dimensional system the possi-

bilities are limited to attraction to a single point, or to a limit cycle for a bounded system (<λ→+ve). The second condition, is that the system must be non-linear else all solutions can be written

as sums of terms of the form x = x0eλt or x = x0t

neλt which do not lead to chaotic behaviour.

The Lorenz model equations are of this, autonomous, form where the time behaviour of the system

can be tracked by following the motion of a point whose coordinates are x1(t), x2(t), x3(t) in a

three-dimensional x1, x2, x3 state space.

Is it therefore possible for this system to exhibit chaotic behaviour?

Yes.

1

Page 8: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

7CEM2425 - DSS Lab 2: ReportMSc Mechatronics 2007/8

Wijetunge de Silva, Michael-MelhanID: 0737855 / [email protected]

1.2 Find the three singularity points.

To prevent confusion when finding the eigenvalue equations later on, since the symbol for the

eigenvalues are also λ, let it be substituted in the Lorenz model with the correct symbol for the

Rayleigh number, ρ,

x1 = σ(x2 − x1) (8)

x2 = (1 + ρ− x3)x1 − x2 (9)

x3 = x1x2 − bx3 (10)

Therefore,

σ(x2 − x1) = 0 x1 = x2 (11)

x1x2 − bx3 x21 = bx3 and x2

2 = bx3 (12)

(1 + ρ− x21

b)x1 − x1 = 0 x1(ρ−

x21

b) = 0 x1 = 0 or ±

√bρ (13)

From Eq.(65) and Eq.(66),

(1 + ρ− x22

b)x2 − x2 = 0 x2(ρ−

x22

b) = 0 x2 = 0 or ±

√bρ (14)

From Eq.(65), Eq.(66), and Eq.(67),

bρ = bx3 x3 = ρ (15)

x3 = 0 (16)

Therefore the singularities are,

x1 =

0

0

0

; x2 =

+√bρ

+√bρ

ρ

; x3 =

−√bρ−√bρ

ρ

(17)

2

Page 9: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

7CEM2425 - DSS Lab 2: ReportMSc Mechatronics 2007/8

Wijetunge de Silva, Michael-MelhanID: 0737855 / [email protected]

1.3 Linearize the equation about these three singular points.

Linearizing the system yields,

∆x = A∆x (18)

where,

A =

δf1

δx1

δf1

δx2

δf1

δx3

δf2

δx1

δf2

δx2

δf2

δx3

δf3

δx1

δf3

δx2

δf3

δx3

=

−σ σ 0

(1 + ρ− x3) −1 −x1

x2 x1 −b

(19)

Thereby linearizing the system about the singularities,

A(1) =

−σ σ 0

(1 + ρ− x3) −1 −x1

x2 x1 −b

∣∣∣∣∣∣∣∣∣∣∣x=

266640

0

0

37775

=

−σ σ 0

(1 + ρ) −1 0

0 0 −b

(20)

A(2) =

−σ σ 0

(1 + ρ− x3) −1 −x1

x2 x1 −b

∣∣∣∣∣∣∣∣∣∣∣x=

26664+√bρ

+√bρ

ρ

37775

=

−σ σ 0

1 −1 −√bρ

√bρ√bρ −b

(21)

A(3) =

−σ σ 0

(1 + ρ− x3) −1 −x1

x2 x1 −b

∣∣∣∣∣∣∣∣∣∣∣x=

26664−√bρ

−√bρ

ρ

37775

=

−σ σ 0

1 −1√bρ

−√bρ −

√bρ −b

(22)

3

Page 10: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

7CEM2425 - DSS Lab 2: ReportMSc Mechatronics 2007/8

Wijetunge de Silva, Michael-MelhanID: 0737855 / [email protected]

1.4 Find, without solving, the eigenvalue equation that determines

the stability of each of these equilibrium points.

The eigenvalue equation is,

Ax = λx (23)

|(A(1) − λI)| =

−σ σ 0

(1 + ρ) −1 0

0 0 −b

− λ 1 0 0

0 1 0

0 0 1

=

∣∣∣∣∣∣∣∣∣∣∣

−σ − λ σ 0

(1 + ρ) −1− λ 0

0 0 −b− λ

∣∣∣∣∣∣∣∣∣∣∣(24)

= (−b− λ)

∣∣∣∣∣∣ −σ − λ σ

(1 + ρ) −1− λ

∣∣∣∣∣∣ = (−b− λ) (−σ − λ)(−1− λ)− σ(1 + ρ) (25)

= −λ3 − λ2(1 + b+ σ)− λ(b+ σb− σρ) + σρb = 0 (26)

Likewise,

|(A(2) − λI)| = −λ3 − λ2(1 + b+ σ)− λb(1 + σ − ρ)− 2σρb = 0 (27)

|(A(3) − λI)| = −λ3 − λ2(1 + b+ σ)− λb(1 + σ − ρ)− 2σρb = 0 (28)

4

Page 11: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

7CEM2425 - DSS Lab 2: ReportMSc Mechatronics 2007/8

Wijetunge de Silva, Michael-MelhanID: 0737855 / [email protected]

Element B - SIMULINK Model

1.5 Give a full description of your SIMULINK model.

The following SIMULINK model directly represents the following three state space equations,

x1 = σ(x2 − x1) (29)

x2 = (1 + λ− x3)x1 − x2 (30)

x3 = x1x2 − bx3 (31)

which model the system.

Since the equations in the handout refer to ρ as λ, this notation was used in the model and .m-file

used to define and simulate the system.

Therefore the parameters controlling the system, apart from the initial conditions of the three

integrator blocks which represent x1(0), x2(0), and x3(0) respectively, are σ, λ, and b.

Figure 1: SIMULINK Model to Simulate System Dynamics

The initial conditions have been chosen close to the origin for the following simulations of the

system,

Variables Valuesx1(0) 0.3x2(0) 0.4x3(0) 0.6

Table 1: Chosen values of the initial conditions.

5

Page 12: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

7CEM2425 - DSS Lab 2: ReportMSc Mechatronics 2007/8

Wijetunge de Silva, Michael-MelhanID: 0737855 / [email protected]

To counter the occurrence of clipping in the plots generated in MATLAB, the Relative and Absolute

tolerances were changed as shown in Figure 21, below.

Figure 2: SIMULINK: Simulation Configuration Parameters

The simulation was executed directly from the controlling *.m-file using the following MATLAB

command,

EDU>> sim(‘lab2q1 mdl’,50);

where the simulation was run for 50 seconds, which seemed to produce optimal plots.

6

Page 13: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

7CEM2425 - DSS Lab 2: ReportMSc Mechatronics 2007/8

Wijetunge de Silva, Michael-MelhanID: 0737855 / [email protected]

Element C - Simulations and Analysis

1.6 Choose parameters σ, λ, b such that the condition in (1) are not

satisfied and the system equilibria are not all unstable.

The initial conditions have been chosen close to the origin,

Variables Valuesx1(0) 0.3x2(0) 0.4x3(0) 0.6

Table 2: Chosen values of the initial conditions.

Let b =8

3, and therefore σ causes instability if,

σ > 3.6666 (32)

Choosing σ = 8, ρ causes instability if,

ρ > 19.69 (33)

Therefore the values of σ, ρ, and b, have been chosen so that the system equilibria are not all

unstable.

Variables Valuesb 8/3σ 8ρ 19

Table 3: Chosen values of σ, ρ, and b, so that the system equilibria are not all unstable.

7

Page 14: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

7CEM2425 - DSS Lab 2: ReportMSc Mechatronics 2007/8

Wijetunge de Silva, Michael-MelhanID: 0737855 / [email protected]

Figure 3: Plot of the system response on the x1-x2 plane.

It can be seen that the system starts off from a singularity point (an unstable focus) and spirals out

wards. After a certain period has passed it continues to spiral outward around another singularity,

in a completely unpredictable manner.

We can see the formation of both attractors are just about taking place, therefore this could be

called a partial attractor.

8

Page 15: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

7CEM2425 - DSS Lab 2: ReportMSc Mechatronics 2007/8

Wijetunge de Silva, Michael-MelhanID: 0737855 / [email protected]

Figure 4: Plot of the system response on the x1-x3 plane.

It can be seen that the system starts off from a singularity point (an unstable focus) and spirals out

wards. After a certain period has passed it continues to spiral outward around another singularity,

in a completely unpredictable manner.

We can see the formation of both attractors are just about taking place, therefore this could be

called a partial attractor.

9

Page 16: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

7CEM2425 - DSS Lab 2: ReportMSc Mechatronics 2007/8

Wijetunge de Silva, Michael-MelhanID: 0737855 / [email protected]

Figure 5: Plot of the system response on the x2-x3 plane.

It can be seen that the system starts off from a singularity point (an unstable focus) and spirals out

wards. After a certain period has passed it continues to spiral outward around another singularity,

in a completely unpredictable manner.

We can see the formation of both attractors are just about taking place, therefore this could be

called a partial attractor.

10

Page 17: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

7CEM2425 - DSS Lab 2: ReportMSc Mechatronics 2007/8

Wijetunge de Silva, Michael-MelhanID: 0737855 / [email protected]

1.7 Choose parameters σ, λ, b such that the condition in (1) are satis-

fied and the system equilibria are all unstable.

The initial conditions have been chosen close to the origin,

Variables Valuesx1(0) 0.3x2(0) 0.4x3(0) 0.6

Table 4: Chosen values of the initial conditions.

Let b =8

3, and therefore σ causes instability if,

σ > 3.6666 (34)

Choosing σ = 10, ρ causes instability if,

ρ > 23.74 (35)

Therefore the values of σ, ρ, and b, have been chosen so that the system equilibria are all unstable.

Variables Valuesb 8/3σ 10ρ 25

Table 5: Chosen values of σ, ρ, and b, so that the system equilibria are all unstable.

11

Page 18: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

7CEM2425 - DSS Lab 2: ReportMSc Mechatronics 2007/8

Wijetunge de Silva, Michael-MelhanID: 0737855 / [email protected]

Figure 6: Plot of the system response on the x1-x2 plane.

The formation of a ‘strange attractor’ is now visible since the system is completely unstable. This is

a purely an imaginary plot that is complex and positive, hence an unstable focus exhibiting chaotic

behaviour.

12

Page 19: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

7CEM2425 - DSS Lab 2: ReportMSc Mechatronics 2007/8

Wijetunge de Silva, Michael-MelhanID: 0737855 / [email protected]

Figure 7: Plot of the system response on the x1-x3 plane.

The same attractor from a different plane view, and this depicts the well known ’butterfly’ form.

This is a purely an imaginary plot that is complex and positive, hence an unstable focus exhibiting

chaotic behaviour.

13

Page 20: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

7CEM2425 - DSS Lab 2: ReportMSc Mechatronics 2007/8

Wijetunge de Silva, Michael-MelhanID: 0737855 / [email protected]

Figure 8: Plot of the system response on the x2-x3 plane.

View of the Lorenz attractor from the x2-x3 plane. This is a purely an imaginary plot that is

complex and positive, hence an unstable focus exhibiting chaotic behaviour.

14

Page 21: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

7CEM2425 - DSS Lab 2: ReportMSc Mechatronics 2007/8

Wijetunge de Silva, Michael-MelhanID: 0737855 / [email protected]

1.8 Plot how the trajectories of two points which start very close to

each other diverge over time for each of the two sets of parame-

ters you have chosen in 1.6 and 1.7.

Figure 9: Plot of x1-x2 and x1-x3 for the system equilibria chosen in Q1.6.

It can been seen that the both trajectories started from the same location and have ended up in

two completely different locations, and have diverged away from each other by a significant amount

and therefore it is clear that this system is exhibiting chaotic behaviour.

15

Page 22: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

7CEM2425 - DSS Lab 2: ReportMSc Mechatronics 2007/8

Wijetunge de Silva, Michael-MelhanID: 0737855 / [email protected]

Figure 10: Plot of x1-x2 and x1-x3 for the system equilibria chosen in Q1.7.

It can been seen that the both trajectories started from the same location and have ended up in

two completely different locations, and have diverged away from each other by a significant amount

and therefore it is clear that this system is exhibiting chaotic behaviour..

16

Page 23: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

7CEM2425 - DSS Lab 2: ReportMSc Mechatronics 2007/8

Wijetunge de Silva, Michael-MelhanID: 0737855 / [email protected]

2 Lumped Parameter System

Element A - Preliminary Analysis

2.1 Calculate the Biot number for the system. hence determine the

appropriate number of lumps that the system must be split into,

in a multiple-lumped capacitance modelling approach.

The Biot number of a system is defined as,

Nb =RThermal Conduction

RThermal Convection

=

L

kA1

hA

=hLck

(36)

where Lc is the characteristic length of the solid and is defined as the thickness for a plate, i.e.

Lc = L, h is the convection coefficient, and k is the thermal conductivity.

Therefore, calculating the Biot number using the convection coefficient for free and forced convec-

tion,

NbFree Convection=

10 · 0.23

75= 0.0307 (37)

NbForced Convection=

200 · 0.23

75= 0.6133 (38)

Since the forced convection has a greater impact on the system, dominating the overall response,

the system is therefore split into lumps of 0.1.

0.6133

0.1= 6.133 ≈= 7 (39)

The system is therefore split into seven lumps of 0.1 and therefore the dominating temperature

difference will be at the surfaces of each lump.

17

Page 24: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

7CEM2425 - DSS Lab 2: ReportMSc Mechatronics 2007/8

Wijetunge de Silva, Michael-MelhanID: 0737855 / [email protected]

2.2 Draw an electrical circuit representing your lumped parameter

system. Hence derive the equation that determine the tempera-

tures at each node in your system and calculate the resistance

and capacitance associated with each node.

Figure 11: Steel plate in contact with air.

The electrical circuit representing the lumped parameter system defined in Q2.1 is shown below,

Figure 12: The electrical circuit representing the lumped parameter system.

18

Page 25: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

7CEM2425 - DSS Lab 2: ReportMSc Mechatronics 2007/8

Wijetunge de Silva, Michael-MelhanID: 0737855 / [email protected]

2.2.1 Deriving the equation for node T0

For a capacitor, q = Cv, and since current is given by q, i = CDδv, where D =d

dtis used for the

sake of clarity.

2.2.2 Deriving the equation for node Ti

19

Page 26: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

7CEM2425 - DSS Lab 2: ReportMSc Mechatronics 2007/8

Wijetunge de Silva, Michael-MelhanID: 0737855 / [email protected]

2.2.3 Deriving the equation for node Tn

The mass, M, of the steel plate is calculated by applying,

Density =Mass

Volume(40)

Therefore,

Mass = 7850 · 1 · 0.23 = 1, 805.5 kg (41)

The resistance and capacitance associated with each node are calculated as follows,

Rhn =1

hnA=

1

200Ω

Cn =CpM

n=

450 · (7850 · 0.23)

7=

812475

7F

Cn2

=CpM

2n=

450 · (7850 · 0.23)

14=

812475

14F

Rn =L

nkA=

0.23

7 · 75=

23

100· 1

523Ω

Rho =1

hoA=

1

10Ω

(42)

20

Page 27: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

7CEM2425 - DSS Lab 2: ReportMSc Mechatronics 2007/8

Wijetunge de Silva, Michael-MelhanID: 0737855 / [email protected]

Therefore, the general form of the three differential equations describing the system are as follows,

T0 =2

Cn

[−(

1

Rn

+1

Rh0

)T0 +

T1

Rn

+T0∞

Rh0

](43)

Ti =

[−2Ti + Ti+1 + Ti−1

CnRn

](44)

Tn =2

Cn

[−(

1

Rhn+

1

Rn

)Tn +

Tn∞

Rhn+

Tn−1

Rn

](45)

The fully expanded form of the differential equations describing this system,

T0 =2

Cn

[−(

1

Rn

+1

Rh0

)T0 +

T1

Rn

+T0∞

Rh0

](46)

T1 =

[−2T1 + T2 + T0

CnRn

](47)

T2 =

[−2T2 + T3 + T1

CnRn

](48)

T3 =

[−2T3 + T4 + T2

CnRn

](49)

T4 =

[−2T4 + T5 + T3

CnRn

](50)

T5 =

[−2T5 + T6 + T4

CnRn

](51)

T6 =

[−2T6 + T7 + T5

CnRn

](52)

T7 =2

Cn

[−(

1

Rhn+

1

Rn

)T7 +

T7∞

Rhn+

T6

Rn

](53)

21

Page 28: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

7CEM2425 - DSS Lab 2: ReportMSc Mechatronics 2007/8

Wijetunge de Silva, Michael-MelhanID: 0737855 / [email protected]

Element B - SIMULINK Model

2.3 Give a full description of your SIMULINK model.

The following SIMULINK model was based directly on the equations derived in Q2.2, which defined

T0 to T7,

Figure 13: SIMULINK Model of the lumped parameter system.

22

Page 29: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

7CEM2425 - DSS Lab 2: ReportMSc Mechatronics 2007/8

Wijetunge de Silva, Michael-MelhanID: 0737855 / [email protected]

The variables given for simulation of the SIMULINK model have been tabulated below,

Variables Values (w/ units)Thermal Conductivity (k) 75 W/m/K

Specific heat Capacity (Cp) 45 J/kg/KDensity of steel 7850 kg/m3

Area of plate (A) 1 m2

Thickness of plate (L) 0.23 mCoefficient of free convection (h0) 10 W/m2/K

Coefficient of forced convection (hn) 200 W/m2/K

Table 6: Variables given for simulation

The initial condition of each integrator for T0 to T7 has its initial condition set to the variable Tint,

which allows for the initial temperature of the plate, in Kelvin, to be defined within the *.m-file

before simulation.

The simulation was executed directly from the controlling *.m-file using the following MATLAB

command,

EDU>> sim(‘lab2q2 mdl’,100000);

where the simulation was run for 100,000 seconds. For Q2.7, the simulation time was reduced to

800s via this command.

To counter the occurrence of clipping in the plots generated in MATLAB, the Relative and Absolute

tolerances were changed as shown in Figure 14, below.

Figure 14: SIMULINK: Simulation Configuration Parameters

23

Page 30: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

7CEM2425 - DSS Lab 2: ReportMSc Mechatronics 2007/8

Wijetunge de Silva, Michael-MelhanID: 0737855 / [email protected]

Element C - Simulations and Analysis

2.4 With T0∞ and Tn∞ set at 200 C and 30 C respectively, and with

the steel plate initially at 30 C, plot the temperature at each end

of the plate against time. List the steady state values for each

node in your system. Calculate the heat flow into and out of the

plate at steady state and comment on the result.

Figure 15: Plot of the temperature at each end of the plate against time.

24

Page 31: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

7CEM2425 - DSS Lab 2: ReportMSc Mechatronics 2007/8

Wijetunge de Silva, Michael-MelhanID: 0737855 / [email protected]

The steady state values for each node are listed below with the steel plate temperature at 30 C=303

K,

Node Temperature (K)T0 315.6897 KT1 315.0005 KT2 314.3114 KT3 313.6222 KT4 312.9330 KT5 312.2439 KT6 311.5547 KT7 310.8655 K

Table 7: List of steady state values of temperature for each node.

The heat flow was calculated by applying,

Q =

(kA∆T

L

)(54)

where ∆T is the temperature difference across each lump.

The heat flow across each lump is tabulated in the table below,

Lump Heat flow, Q, (W)Lump 1 224.73 WLump 2 224.73 WLump 3 224.73 WLump 4 224.73 WLump 5 224.73 WLump 6 224.73 WLump 7 224.73 W

Table 8: Heat flow across each lump of the system.

Since the system is at steady state, the total heat flow entering the plate (224.73W) flows from

lump to lump until it flows out of the plate.

This is analogous to a purely resistive circuit of seven resistors in series, representing the Rn of each

lump, since the capacitance at each node tends to zero at steady state and therefore it reduces to

a simple electrical circuit of i = (V1 − V2)/Z, which is identical to Eq.(54) where Q represents the

current, ∆T represents the potential difference and L/kA represents the total impedance Z.

Since ic = 0, i2 = i1 and thus the current flowing through all the resistors is the same.

25

Page 32: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

7CEM2425 - DSS Lab 2: ReportMSc Mechatronics 2007/8

Wijetunge de Silva, Michael-MelhanID: 0737855 / [email protected]

2.5 With T0∞ and Tn∞ set at 200 C and 30 C respectively, and with

the steel plate initially at 200 C, plot the temperature at each end

of the plate against time. Check that your steady state values

agree with your previous results. Calculate the heat flow into and

out of the plate at steady state and comment on the result. What

do you notice about the steady state temperatures plotted against

distance?

Figure 16: Plot of the temperature at each end of the plate against time.

26

Page 33: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

7CEM2425 - DSS Lab 2: ReportMSc Mechatronics 2007/8

Wijetunge de Silva, Michael-MelhanID: 0737855 / [email protected]

The steady state values for each node are listed below with the steel plate temperature at 200 C=473

K,

Node Temperature (K)T0 315.6897 KT1 315.0005 KT2 314.3114 KT3 313.6222 KT4 312.9330 KT5 312.2439 KT6 311.5547 KT7 310.8655 K

Table 9: List of steady state values of temperature for each node.

The heat flow was calculated by applying,

Q =

(kA∆T

L

)(55)

where ∆T is the temperature difference across each lump.

The heat flow across each lump is tabulated in the table below,

Lump Heat flow, Q, (W)Lump 1 224.73 WLump 2 224.73 WLump 3 224.73 WLump 4 224.73 WLump 5 224.73 WLump 6 224.73 WLump 7 224.73 W

Table 10: Heat flow across each lump of the system.

Since the system is at steady state, the total heat flow entering the plate (224.73W) flows from

lump to lump until it flows out of the plate and agrees with the previous results obtained in Q2.4.

27

Page 34: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

7CEM2425 - DSS Lab 2: ReportMSc Mechatronics 2007/8

Wijetunge de Silva, Michael-MelhanID: 0737855 / [email protected]

The plot, shown below, of the steady state temperatures at each node against distance clearly

indicates that the temperature at each node is linearly reducing with the distance T0, in steps of

1/L, and that a line of best fit would be able to connect all the points plotted.

However, since the system has been split into lumps of 0.1, the dominating temperature is at the

surfaces of these lumps and internally they exhibit a constant temperature gradient at steady state,

where the gradient is determined by the surface temperature at either ends of each lump (at both

nodes).

Figure 17: Plot of the temperature at each end of the plate against time.

28

Page 35: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

7CEM2425 - DSS Lab 2: ReportMSc Mechatronics 2007/8

Wijetunge de Silva, Michael-MelhanID: 0737855 / [email protected]

2.6 Choose a method for verifying the accuracy of your results. De-

cide, and justify the degree of accuracy which is desired in the

simulations, bearing in mind the assumptions of the model, and

record the system tolerances that achieve this level of accuracy.

From the Taylor Series expansion, by neglecting terms of O(h2) and above, the Euler’s Method

maybe derived,

x(t+ h) = x(t) + x(t) · h+O(h2) (56)

This can be rewritten as,

Xn+1 = Xn + hf(Xn, tn) +O(h2) (57)

Where the step by step error is of O(h2) and the total error is of O(h).

Considering the initial condition of X(0) = 473, and applying the differential equations derived

for the multiple-lumped parameter system would yield the temperature at Xn+1. Since we are

interested in the steady state response of the system, when the system reaches steady state one can

consider thatd

dt= 0.

Therefore, it would be possible to solve the seven equations in this manner,

T0 =2

Cn

[−(

1

Rn

+1

Rh0

)T0 +

T1

Rn

+T0∞

Rh0

]= 0 (58)

Ti =

[−2Ti + Ti+1 + Ti−1

CnRn

]= 0 (59)

Tn =2

Cn

[−(

1

Rhn+

1

Rn

)Tn +

Tn∞

Rhn+

Tn−1

Rn

]= 0 (60)

Therefore, the system of equations maybe evaluated to compute values for T0 with each iteration

and thereby being able to plot them against the step size h.

Since the step by step error (truncation error) is of O(h2), if the step size is halved, the error will

be quartered. This is related to the SIMULINK simulation since it is also based on an ODE solver

method belonging to the Runge-Kutta family of ODE solvers, and the tolerances that control the

accuracy of the ode45 (Dormand-Prince) solver are the relative and absolute tolerances.

By ensuring that these tolerances are reasonably small, even after considering the assumptions of

the model, the resulting simulation would be as accurate as reasonably possible.

29

Page 36: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

7CEM2425 - DSS Lab 2: ReportMSc Mechatronics 2007/8

Wijetunge de Silva, Michael-MelhanID: 0737855 / [email protected]

2.7 With the parameters set as in Question 2.4, simulate the system

for 800s and put on a single graph plots of temperature against

time at each node. Plot the temperatures at each node versus

distance at 800s and comment on the result.

The system was simulated for 800s using the same parameters seen in Q2.4, and the plot of tem-

perature against time at each node is shown below,

Figure 18: Plot of the lot of temperature against time at each node, simulated for 800s.

Comparing this simulation with that of Figure (15), yields that the temperature rise to steady-state

does not appear to be as linear as first conceived. It can be seen that the thermal response to the

thermal conductivity of the plate is rather sluggish or slow starting.

However, the plot for T2 appears to be rather linear, compared to the response of the rest of the

nodes in this multiple-lumped parameter system.

30

Page 37: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

7CEM2425 - DSS Lab 2: ReportMSc Mechatronics 2007/8

Wijetunge de Silva, Michael-MelhanID: 0737855 / [email protected]

Since the simulation time is limited to 800s, steady state has not yet been reached and as such the

plot of the temperatures at each node versus distance, is no longer linear and therefore exhibits

curving from and including lump 3 to lump 7. Lump 1 and 2 seem to still exhibit a linear temperature

gradient, possibly since they are closest to the hotter surface.

Figure 19: Plot of temperatures at each node versus distance, simulated for 800s.

31

Page 38: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

7CEM2425 - DSS Lab 2: ReportMSc Mechatronics 2007/8

Wijetunge de Silva, Michael-MelhanID: 0737855 / [email protected]

3 Focused Study of the Lorenz Model

Element A - Preliminary Analysis

3.1 Describe your chosen system. Show that the system has the po-

tential for exhibiting chaotic behaviour. Deduce the equations of

motion for the system you have chosen and write down your anal-

ysis, listing any approximations and assumptions you have made.

Rearrange your equations in state space form so that they can be

implemented in Simulink.

The state space equations describing the Lorenz model are shown below,

x1 = σ(x2 − x1) (61)

x2 = (1 + ρ− x3)x1 − x2 (62)

x3 = x1x2 − βx3 (63)

Since the system has three state space equations, i.e. has three degrees of freedom, the first require-

ment for potentially exhibiting chaotic behaviour is satisfied.

The parameters σ and ρ are related to the Prandtl number and Rayleigh number, respectively, and

the third parameter β is a geometric factor. The only non-linear terms are x1ρ and x1x3, in the

second and third equations.

This non-linearity satisfies the second requirement for a system to exhibit chaotic behaviour.

32

Page 39: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

7CEM2425 - DSS Lab 2: ReportMSc Mechatronics 2007/8

Wijetunge de Silva, Michael-MelhanID: 0737855 / [email protected]

3.2 Attempt to predict general characteristics of the behaviour of the

system. For example, you may want to find the system equilib-

rium points, linearize around these points, and make deductions

on system stability around these points. Alternatively, there may

be analytical solutions available for special classes of initial con-

ditions.

The system equilibrium points are determined below,

σ(x2 − x1) = 0 x1 = x2 (64)

x1x2 − βx3 x21 = βx3 and x2

2 = βx3 (65)

(1 + ρ− x21

β)x1 − x1 = 0 x1(ρ−

x21

β) = 0 x1 = 0 or ±

√βρ (66)

From Eq.(65) and Eq.(66),

(1 + ρ− x22

β)x2 − x2 = 0 x2(ρ−

x22

β) = 0 x2 = 0 or ±

√βρ (67)

From Eq.(65), Eq.(66), and Eq.(67),

βρ = βx3 x3 = ρ (68)

x3 = 0 (69)

Therefore the singularities are,

x1 =

0

0

0

; x2 =

+√βρ

+√βρ

ρ

; x3 =

−√βρ−√βρ

ρ

(70)

33

Page 40: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

7CEM2425 - DSS Lab 2: ReportMSc Mechatronics 2007/8

Wijetunge de Silva, Michael-MelhanID: 0737855 / [email protected]

Linearizing the system yabout these three singular points yields,

∆x = A∆x (71)

where,

A =

δf1

δx1

δf1

δx2

δf1

δx3

δf2

δx1

δf2

δx2

δf2

δx3

δf3

δx1

δf3

δx2

δf3

δx3

=

−σ σ 0

(1 + ρ− x3) −1 −x1

x2 x1 −β

(72)

Thereby linearizing the system about the singularities,

A(1) =

−σ σ 0

(1 + ρ− x3) −1 −x1

x2 x1 −β

∣∣∣∣∣∣∣∣∣∣∣x=

266640

0

0

37775

=

−σ σ 0

(1 + ρ) −1 0

0 0 −β

(73)

A(2) =

−σ σ 0

(1 + ρ− x3) −1 −x1

x2 x1 −β

∣∣∣∣∣∣∣∣∣∣∣x=

26664+√βρ

+√βρ

ρ

37775

=

−σ σ 0

1 −1 −√βρ

√βρ√βρ −β

(74)

A(3) =

−σ σ 0

(1 + ρ− x3) −1 −x1

x2 x1 −β

∣∣∣∣∣∣∣∣∣∣∣x=

26664−√βρ

−√βρ

ρ

37775

=

−σ σ 0

1 −1√βρ

−√βρ −

√βρ −β

(75)

34

Page 41: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

7CEM2425 - DSS Lab 2: ReportMSc Mechatronics 2007/8

Wijetunge de Silva, Michael-MelhanID: 0737855 / [email protected]

The eigenvalue equations that determines the stability of each of these equilibrium points are

calculated as follows:

The eigenvalue equation is,

Ax = λx (76)

|(A(1) − λI)| =

−σ σ 0

(1 + ρ) −1 0

0 0 −β

− λ 1 0 0

0 1 0

0 0 1

=

∣∣∣∣∣∣∣∣∣∣∣

−σ − λ σ 0

(1 + ρ) −1− λ 0

0 0 −β − λ

∣∣∣∣∣∣∣∣∣∣∣(77)

= (−β − λ)

∣∣∣∣∣∣ −σ − λ σ

(1 + ρ) −1− λ

∣∣∣∣∣∣ = (−β − λ) (−σ − λ)(−1− λ)− σ(1 + ρ) (78)

= −λ3 − λ2(1 + β + σ)− λ(β + σβ − σρ) + σρβ = 0 (79)

Likewise,

|(A(2) − λI)| = −λ3 − λ2(1 + β + σ)− λβ(1 + σ − ρ)− 2σρβ = 0 (80)

|(A(3) − λI)| = −λ3 − λ2(1 + β + σ)− λβ(1 + σ − ρ)− 2σρβ = 0 (81)

It is clear that the stable singularity is A(0), while A(1) and A(2) are complex and imaginary thereby

forming unstable focuses.

35

Page 42: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

7CEM2425 - DSS Lab 2: ReportMSc Mechatronics 2007/8

Wijetunge de Silva, Michael-MelhanID: 0737855 / [email protected]

Element B - SIMULINK Model

3.3 Give a full description of your SIMULINK model.

The following SIMULINK model directly represents the following three state space equations,

x1 = σ(x2 − x1) (82)

x2 = (1 + ρ− x3)x1 − x2 (83)

x3 = x1x2 − βx3 (84)

Therefore the parameters controlling the system, apart from the initial conditions of the three

integrator blocks which represent x1(0), x2(0), and x3(0) respectively, are σ, ρ, and β.

Figure 20: SIMULINK Model to Simulate System Dynamics

The initial conditions and parameters have been chosen as follows,

Variables Valuesx1(0) 5x2(0) 5x3(0) 25σ 10β 8/3

Table 11: Chosen values of the initial conditions.

36

Page 43: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

7CEM2425 - DSS Lab 2: ReportMSc Mechatronics 2007/8

Wijetunge de Silva, Michael-MelhanID: 0737855 / [email protected]

To counter the occurrence of clipping in the plots generated in MATLAB, the Relative and Absolute

tolerances were changed as shown in Figure 21, below.

Figure 21: SIMULINK: Simulation Configuration Parameters

The simulation was executed directly from the controlling *.m-file using the following MATLAB

command,

EDU>> sim(‘lab2q3 mdl’,50);

where the simulation was run for 50 seconds, which seemed to produce optimal plots.

37

Page 44: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

7CEM2425 - DSS Lab 2: ReportMSc Mechatronics 2007/8

Wijetunge de Silva, Michael-MelhanID: 0737855 / [email protected]

3.4 Devise some tests to determine the accuracy of your solution,

and to check whether the model is working correctly. Give an

account of your tests and the results.

The system was simulated with ρ = 25, which was calculated to cause all the system equilibria to

be unstable.

The resulting plots were generated in 3-dimensions and are shown below,

Figure 22: 3D plot of the Lorenz model in the x1-x3, x2-x3, x1-x3 and planes, respectively.

These plots verified that the SIMULINK model was worked correctly.

38

Page 45: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

A Appendix

Page 46: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

MATLAB Files for Q1

MATLAB Files for Q1

Page 47: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

MATLAB Files for Q2

MATLAB Files for Q2

Page 48: 7CEM2425 Dynamic Systems & Simulation - Lab 2 Report (Michael M. Wijetunge de Silva)

MATLAB Files for Q3

MATLAB Files for Q3