Docsity

Pendulum Slider System Simulation - Lab 4 | MEEN 364, Lab Reports of Mechanical Engineering

Toggle sidebar
bg1
MEEN 364
Vijay Alladi, 2001. Andrew Rynn, 2002
A.G. Parlos, 2006
Last Update: 22 August 2006
1
Lab 4 – Pendulum-Slider System Simulation
Introduction
Dynamic systems are in general characterized by differential equations. Their response is a function of
time. Hence, solving differential equations becomes an important part of understanding dynamic
systems. When the system response is a function of different variables, numerical methods prove
useful in solving the equations.
While it is sometimes possible to approximate the dynamics of a complex system with a single degree
of freedom model, there are times when this cannot be done effectively. Systems that require more
than one variable to describe their response are called multi-degree of freedom systems.
Many software packages have been developed that numerically integrate the differential equations.
MATLAB and its graphical simulation tool SIMULINK are a powerful system that is used by many
people to work with dynamic systems, controls and signal processing. This software package allows
the user to work with complex dynamic systems and simulate their behavior for various conditions.
Objective
1) To get an understanding of modeling dynamic systems by using MATLAB to simulate system
behavior.
2) To see the difference between the performance of a linear and a nonlinear model.
PreLab
Derive the nonlinear equations of motion for a pendulum oscillating as shown in the figure. Assume
there is viscous damping, D, at the pivot location. You can also assume that the pendulum has some
centroidal moment of inertia, J. Linearize the equation for small angles of motion about the
equilibrium position, i.e. obtain the equation of the form
.0
... =++
θθθ
KDI
θ
pf3
pf4
pf5
pf8

Partial preview of the text

Download Pendulum Slider System Simulation - Lab 4 | MEEN 364 and more Lab Reports Mechanical Engineering in PDF only on Docsity!

Vijay Alladi, 2001. Andrew Rynn, 2002 A.G. Parlos, 2006 Last Update: 22 August 2006

Lab 4 – Pendulum-Slider System Simulation

Introduction

Dynamic systems are in general characterized by differential equations. Their response is a function of time. Hence, solving differential equations becomes an important part of understanding dynamic systems. When the system response is a function of different variables, numerical methods prove useful in solving the equations.

While it is sometimes possible to approximate the dynamics of a complex system with a single degree of freedom model, there are times when this cannot be done effectively. Systems that require more than one variable to describe their response are called multi-degree of freedom systems.

Many software packages have been developed that numerically integrate the differential equations. MATLAB and its graphical simulation tool SIMULINK are a powerful system that is used by many people to work with dynamic systems, controls and signal processing. This software package allows the user to work with complex dynamic systems and simulate their behavior for various conditions.

Objective

  1. To get an understanding of modeling dynamic systems by using MATLAB to simulate system behavior.
  2. To see the difference between the performance of a linear and a nonlinear model.

PreLab

Derive the nonlinear equations of motion for a pendulum oscillating as shown in the figure. Assume there is viscous damping, D, at the pivot location. You can also assume that the pendulum has some centroidal moment of inertia, J. Linearize the equation for small angles of motion about the equilibrium position, i.e. obtain the equation of the form

...

I θ + D θ+ K θ =

θ

Vijay Alladi, 2001. Andrew Rynn, 2002 A.G. Parlos, 2006 Last Update: 22 August 2006

Lab

The system shown below consists of a pendulum mounted on a slider. It is a two-degree of freedom system. This is different from the pendulum in the prelab in the sense that the pivot, P, can also move in a linear fashion.

x

y

O

A

P

C

B

O'

Figure 4-1 - Pendulum-Slider System (drawn by Christopher Cullum)

Theory and analysis of the system

The following free body diagrams will be useful in the analysis of the coupled pendulum system.

θ

F y

F x

m 1 g

M 0 P

C

l cg

Figure 4-2 - Free Body Diagram of Pendulum (drawn by Christopher Cullum)

Vijay Alladi, 2001. Andrew Rynn, 2002 A.G. Parlos, 2006 Last Update: 22 August 2006

( cos( ) sin( ) )

.^2 ..

F y − m 1 g = m 1 ay = m 1 l θ θ + l θ θ (10)

..

M 0 − Fx l cos(θ )− Fyl sin(θ)= Ic θ (11)

For the slider, .. − Fs (^) 1 − Fs 2 − Fx − Ffr = m 2 x (12) (13) N ( d )− M 0 = 0 (14)

Assuming both the springs to be identical

F (^) s 1 = Fs 2 = k (Δ x ) (15)

where Δ x = x − l 0 , l (^) 0 = un-stretched length of the spring (16)

and

F fr = μ N (17)

Note: Equation (17) only represents the magnitude of the friction force. A better approximation is given by the following expression:

F fr = μ⋅ N ⋅ sign ( x &)

But this expression is not used in the present model due to mathematical complications arising when the sign function is included in the matrix.

Using (9) and (10) in (11) we get

.. 1

.. ..

M 0 − m 1 l ( x cos(θ )+ l θ )− mgl sin(θ)= Ic θ (18)

From (9), (12), (15) and (17)

From (10), (13)

N Fy mg m ( l cos( ) l sin( ) ) ( m 1 m 2 ) g

.^2 ..

The above equations will lead to

( ) (cos( ) sin( )) ( cos( ) sin( )) ( 1 2 ) 2 0

.^2 1

.. 1

..

m 1 + m 2 x + ml θ +μ θ θ+ ml μ θ − θ θ + μ m + m g + k Δ x = (21)

− F (^) y − m 2 g + N = m 2 ( 0 )

.. 2

.. ...^2 − 2 k Δ x − m 1 ( x + l (cos(θ)θ−sin(θ)θ ))−μ N = m x

1 0

2 .. 1

.. m 1 (^) l cos(θ ) x +( Ic + ml )θ+ mgl sin(θ)= M

Vijay Alladi, 2001. Andrew Rynn, 2002 A.G. Parlos, 2006 Last Update: 22 August 2006

Clearly we can see the nonlinearity in the system. Let us rewrite the derivation of the nonlinear model in a form that is suitable for us to simulate the system.

Lets define the states of the system as below

. 4

3

. 2

1

θ

θ

=

X

X

X x

X x

This gives

(^34)

.

(^12)

.

X X

X X

Using (21), (22), (23) and putting in the form MX &^ = F , we arrive at the following representation

This is the nonlinear state space representation of the coupled pendulum system. Both the LHS and RHS have nonlinearities. Let us also derive the linearized system from the above nonlinear equations. For this first we need to find out the equilibrium position(s) and apply Taylor’s theorem.

Equilibrium position: The above equation is of the form MX &^ = F. (25) Equilibrium position is given by 0 ;

. X = (26)

, 2

2 0 ;^40 ;sin( 3 ) 0 / 1 ;^12 k

m m g X X X M mgl x

Since we have used the assumption of viscous damping at the pivot P,

M 0 =− c ω =− cX 4 (27) where

c is the viscous damping coefficient X (^) 4 is the angular velocity (by definition)

⎥

⎥

⎥

⎥

⎦

⎤

⎢

⎢

⎢

⎢

⎣

⎡

−

− − − + −

⎥

⎥

⎥

⎥

⎥

⎥

⎦

⎤

⎢

⎢

⎢

⎢

⎢

⎢

⎣

⎡

⎥

⎥

⎥

⎥

⎦

⎤

⎢

⎢

⎢

⎢

⎣

⎡

M mglsin(X )

X

ml[ cos(X ) sin(X )]X (m m )g 2 kX

X

X

X

X

X

0 mlcos(X ) 0 I ml

0 0 1 0

0 m m 0 ml(cos(X ) sin(X ))

1 0 0 0

0 1 3

4

1 2 1

2 1 3 3 4

2

4

. 3

. 2

. 1

.

2 1 3 c 1

1 2 1 3 μ 3 μ^ μ

Vijay Alladi, 2001. Andrew Rynn, 2002 A.G. Parlos, 2006 Last Update: 22 August 2006

⎥

⎥

⎥

⎥

⎦

⎤

⎢

⎢

⎢

⎢

⎣

⎡ − = ∂

∂

0

0

2

0

1

k X

F

X 2

F

cos( )

[cos( ) sin( )]

1 3

2 1 3 3 4 3 mgl X

ml X X X X

F^ μ

c

ml X X X X

F

2 [ cos( ) sin( )]

1 3 3 4 4

Evaluating each of the above at the equilibrium position, we get

1

(^001)

0

A

mgl c

k X

F

X X

=

using ( 29), (30) and (32), gives us the final linearized form of the model written in standard state space form as

X = ( M (^) X ) A Δ X

− 1

. 1 0 (37)

where ( )

1 0

− M (^) X and A 1 can be obtained from (33) and (36) respectively.

Using the fact that

.. Δ X = X we finally get Δ X = ( M (^) X ) A Δ X = A Δ X

− 1 2

. 1 0 (38) This is of the form of the linearized state space.

Writing the linearized state space in the same form as the nonlinear state space ( MX &^ = F ) yields:

4 1 3

4

1

2

4

. 3

. 2

.

1

.

2 1 1

cX m glX

X

kX

X

X

X

X

X

ml I ml

m m ml

c

Vijay Alladi, 2001. Andrew Rynn, 2002 A.G. Parlos, 2006 Last Update: 22 August 2006

Simulations to be run

  1. Assume M 0 to be viscous drag. The TA will provide you with the different values of the parameters. You have already had a tutorial on Matlab for solving differential equations of the

form ( , ) ( )

. M xt X = f X. Run the simulation for initial conditions specified by your TA.

  1. Simulate the linear system for the same initial conditions as the nonlinear system.

Issues to be addressed in the report

The lab report should include the plots from all the simulations you have run.

  1. Are the responses of the linear and nonlinear systems the same? For what ranges of operation is the linearized model a good approximation of the nonlinear one?
  2. Explain the difference between the nonlinear and linear model by looking at the equations and also the results of simulation.

Things you have learned from this lab

  • How to solve differential equations using Matlab.
  • Differences in performance between nonlinear and linear models.