plotting the response of a vibration system using visual basic

27
NEAR EAST UNIVERSITY Nicosia - JUNE, 2010 Faculty of Engineering Mechanical Engineering Department PLOTTING THE RESPONSE OF A VIBRATION SYSTEM USING VISUAL BASIC. A GRADUATION PROJECT ME 400 Osude Benedict 20062985 SUPERVISED BY: Assist. Prof. Dr. Ing. Huseyin Camur

Upload: ben

Post on 10-Apr-2015

242 views

Category:

Documents


2 download

DESCRIPTION

Using Visual basic to plot the graph of the various vibrating systems

TRANSCRIPT

Page 1: Plotting the Response of a Vibration System Using Visual Basic

NEAR EAST UNIVERSITY

Nicosia - JUNE, 2010

Faculty of Engineering

Mechanical Engineering Department

PLOTTING THE RESPONSE OF A VIBRATION SYSTEM USING VISUAL BASIC.

A GRADUATION PROJECT

ME 400

Osude Benedict

20062985

SUPERVISED BY: Assist. Prof. Dr. Ing. Huseyin Camur

Page 2: Plotting the Response of a Vibration System Using Visual Basic

- 1 -

PAGE TABLE OF CONTENTS…………………………………………………1 LIST OF FIGURES……………………………………………………… 3 GENERAL NOTATION………………………………………………….4 ACKNOWLEDGEMENT……………………………………………… 5 ABSTRACT………………………………………………………………..6 CHAPTER 1 INTRODUCTION 1.1 Background………………………………………………………….7 CHAPTER 2 THEORY OF VIBRATION SYSTEMS. 2.1 Theory………………………………………………………………8 2.1.1 Equation of motion of a single degree of freedom system……….8 2.2 Un-damped single degree of freedom system………………………10 2.3 Damped single degree of freedom system…………………………..13 2.3.1 Under-damped single degree of freedom system ………………..13

Page 3: Plotting the Response of a Vibration System Using Visual Basic

- 2 -

2.3.2 Critically-Damped system………………………………………15 2.3.3 Over-Damped systems…………………………………………..16 CHAPTER 3 PROGRAM LANGUAGE ………………………………………………17 CHAPTER 4 DISCUSSION AND RESULTS 4.1 Program Simulation…………………………………………………22 CHAPTER 5 CONCLUSIONS 5.1 Conclusion…………………………………………………………..25 REFERENCES……………………………………………………………26

Page 4: Plotting the Response of a Vibration System Using Visual Basic

- 3 -

LIST OF FIGURES TITLE PAGE PAGE. 2.1 Single Degree of freedom System……………………………..…….8 2.3 Un-damped System……………………………………………..……11 2.4 Response of an un-damped System……………………………..……12 2.6 Response of an under-damped system………………………….….…14 2.7 Response of a critically damped system…………………………..…..15 2.8 Response of an over-damped system…………………………….…....16 3.1 Layout of my simulator………………………………………….….…18 4.1 Layout of case 1……………………………………………………….22 4.2 Layout of case 2………………………………………………………..23 4.3 Layout of case 3………………………………………………………..23 4.4 Layout of case 4………………………………………………………..24

Page 5: Plotting the Response of a Vibration System Using Visual Basic

- 4 -

GENERAL NOTATION. 𝜔𝜔n Natural Frequency 𝜔𝜔d dry friction damped circular frequency ζ dimensionless viscous damping factor m mass Xo Initial Displacement t Time Vo Initial Velocity K Stiffness constant c Damping constant E Elasticity g Acceleration due to gravity L Length

Page 6: Plotting the Response of a Vibration System Using Visual Basic

- 5 -

AKNOWLEDGEMENT. A milestone just passed, and finally I have gotten to the end of my undergraduate study. First and foremost, I give thanks to Almighty God for His abundant blessings all through the duration of my study, it seemed like a mirage at first but now it’s not just a stepping stone but an accomplishment and an experience that will guide me through my path in the future. A special thanks to my supervisor, Assist. Prof. Dr. Ing. Huseyin Camur who guided me though this project report. It wasn’t easy with so much distraction along the way but he kept me on-course. Understood my difficulties and yet made himself available in any way he could to fit my schedule. One thing I learnt in my years in the institute is that education isn’t just about what you learn and how good you can recall the knowledge when the time is due, but mainly about interaction and surviving the everyday pressures of the schooling environment. So I would thank my friend with whom I went through this education process together. To the teachers who steered me through the right path for the duration of my study; I say thank you. You’ve all been far too kind Finally, I am short of words to say to my parents who endured all these years I spent in the university demanding for funds and they never seize to give a helping hand when they could, which was always.

Page 7: Plotting the Response of a Vibration System Using Visual Basic

- 6 -

ABSTRACT Vibration is the fluctuation of a mechanical or structural system about an equilibrium position. Vibration is initiated when an inertia element is displaced from its equilibrium position due to an energy imparted to the system through an external source. A restoring force or moment pulls the element back toward equilibrium. When work is done on a block in to displace it from its equilibrium position, potential energy is developed in the spring. When the block is released the spring force pulls the block toward equilibrium with the potential energy being converted to kinetic energy. In the absence of non-conservative forces, this transfer of energy is continual, causing the block to oscillate about its equilibrium position. In this project i intend to develop a computer program that models the graphical representation of the response of a spring mass damper system under various conditions, through modelling without having to subject the real system to these conditions. The results are obtained in visual forms so that they can be readily interpreted and discussed. Although it may be possible to analyse the complete dynamic system being considered, it often leads to a very complicated analysis, and the production of much unwanted information. A simplified computer model of the system is therefore unusually sought which will, when analysed, produce the desired information as economically as possible and with acceptable accuracy. The derivation of a simple computer model to represent the dynamics of a real system is not easy, if the model is to give useful and realistic information. However, to model any real system, a number of simplifying assumptions can often be made. For example a distributed mass may be considered as a lumped mass, or a non-linear spring may be considered linear over a limited range of extension, or certain elements and forces maybe ignored completely if their effects are likely to be small. Thus a graphical model is usually a compromise between a simple representation which is easy to analyse but may not be very accurate, and a complicated but realistic model which is difficult to analyse but gives more useful results.

Page 8: Plotting the Response of a Vibration System Using Visual Basic

- 7 -

CHAPTER 1 1.1 INTRODUCTION Springs usually occur physically as a coil of metal, and their idealizations have pretty simple behaviour; compressing the spring will result in the spring pushing back, and stretching the spring will have it trying to pull back towards the start position, so any displacement along the axis of the spring will be countered by an opposite force that will tend to move the spring back to its original position [Beer and Johnston, 2002]. Usually one endpoint is fixed, the other is the one that bounces around, which is usually what happens; an initial impulse displaces the spring, the unfixed end of the spring acquires some velocity moving back, but it passes through the zero-displacement point, is pulled back in the other direction, and may bounce perpetually in the absence of any dampening forces. Physical springs have more complex behaviour (like the transverse vibration and accompanying sound when they're bent away from their axis) and could be described by more complex models but in this project we'll be dealing with the simplest model. In this project report, as the name implies I will be writing a computer program to graph the response of the three vibration systems at specified variables that are stated by the user. They are a wide range of computer programs that can be used to simulate this response but I was given only the choice of either Delphi or visual basic, since I have a better understanding of visual basic and considering the time factor I chose to use visual basic. This project is in two sections, so is the report; The basic theory of the vibration system and the program simulation. I will start off by discussing the basic theory of the vibration systems because a better understanding of the theory will give us a better view of the form the programming will be. I will be discussing the visual basic framework that’s relates to my project and a step by step breakdown of each program line. Then I’ll discuss my observation of the graph with respect to the sample references in the texts.

Page 9: Plotting the Response of a Vibration System Using Visual Basic

- 8 -

CHAPTER 2

THEORY OF VIBRATION SYSTEMS

2.1 Theory

The simplest vibratory system can be described by a single mass connected to a spring. The mass is allowed to travel only along the spring elongation direction. Such systems are called the Single Degree of Freedom (SDOF) systems and is shown in this figure below;

Fig.2.1 Single degree of freedom system.

2.1.1 Equation of Motion for a single degree of freedom Systems.

The Single degree of freedom of a vibration system can be analysed by Newton's second law of motion, by taking the summation of all the forces in equilibrium;

∑ 𝐹𝐹𝑛𝑛𝑖𝑖=1 i=m 𝑑𝑑

2𝑥𝑥𝑑𝑑𝑡𝑡2 2.1

The analysis can be easily visualized with the aid of a free body diagram,

-kx-c𝑑𝑑𝑥𝑥𝑑𝑑𝑡𝑡

+ƒ(t)=m𝑑𝑑2𝑥𝑥𝑑𝑑𝑡𝑡2 2.2

This equation of motion is a second order, non-homogeneous, ordinary differential equation.

Where c is the damping factor, k is the spring constant, f(t) is the external force and m is the mass. In our case there are no external forces, we only consider the initial excitations 𝑑𝑑𝑥𝑥

𝑑𝑑𝑡𝑡 and x(t)

Equation 2.2 becomes;

m𝑑𝑑2𝑥𝑥𝑑𝑑𝑡𝑡2 +c𝑑𝑑𝑥𝑥

𝑑𝑑𝑡𝑡+ Kx = 0 2.3

c

Page 10: Plotting the Response of a Vibration System Using Visual Basic

- 9 -

dividing throughout by m

equation 2.3 becomes;

𝑑𝑑2𝑥𝑥𝑑𝑑𝑡𝑡2 + 𝑐𝑐

𝑚𝑚 𝑑𝑑𝑥𝑥𝑑𝑑𝑡𝑡

+ 𝑘𝑘𝑚𝑚

x = 0 2.4

From equation 2.4 𝑘𝑘𝑚𝑚

can be defined by 𝜔𝜔n2, where 𝜔𝜔n is the natural frequency,

and depends only on the system mass and the spring stiffness (i.e. any damping will not change the natural frequency of a system).

.

𝑑𝑑2𝑥𝑥𝑑𝑑𝑡𝑡2 + 𝑐𝑐

𝑚𝑚 𝑑𝑑𝑥𝑥𝑑𝑑𝑡𝑡

+ 𝜔𝜔n2 x = 0 2.5

We manipulate equation 2.5 to get another variable crucial to the vibration system, then the equation becomes;

𝑑𝑑2𝑥𝑥𝑑𝑑𝑡𝑡2 +2

2𝑐𝑐𝑚𝑚𝜔𝜔𝑛𝑛𝜔𝜔𝑛𝑛

𝑑𝑑𝑥𝑥𝑑𝑑𝑡𝑡

+ 𝜔𝜔n2 x = 0 2.6

Where 𝑐𝑐2𝑚𝑚𝜔𝜔𝑛𝑛

is the dimensionless viscous damping factor ζ, "Viscous damping” is the damping that produces a damping force proportional to the velocity of the mass.

The equation then becomes;

𝑑𝑑2𝑥𝑥𝑑𝑑𝑡𝑡2 +2𝜁𝜁𝜔𝜔𝑛𝑛 𝑑𝑑𝑥𝑥

𝑑𝑑𝑡𝑡+ 𝜔𝜔n

2 x = 0 2.7

Equation 2.7 can then be simplified by substituting

x=A𝑒𝑒𝑠𝑠𝑡𝑡 2.8 𝑑𝑑𝑥𝑥𝑑𝑑𝑡𝑡

=A𝑠𝑠𝑒𝑒𝑠𝑠𝑡𝑡 2.9

𝑑𝑑2𝑥𝑥𝑑𝑑𝑡𝑡2 =As2𝑒𝑒𝑠𝑠𝑡𝑡 2.10

Therefore

As2𝑒𝑒𝑠𝑠𝑡𝑡 +2𝜁𝜁𝜔𝜔𝑛𝑛A𝑠𝑠𝑒𝑒𝑠𝑠𝑡𝑡+ 𝜔𝜔n2 A𝑒𝑒𝑠𝑠𝑡𝑡 = 0 2.11

A𝑒𝑒𝑠𝑠𝑡𝑡 (s2 +2𝜁𝜁𝜔𝜔𝑛𝑛𝑠𝑠 + 𝜔𝜔n2) =0 2.12

Page 11: Plotting the Response of a Vibration System Using Visual Basic

- 10 -

Splitting the equation 2.12 into 2 then get the solution;

s2 +2𝜁𝜁𝜔𝜔𝑛𝑛𝑠𝑠 + 𝜔𝜔n2 =0 2.13

We solve the quadratic equation of equation 2.13 then we get the solution;

S1,2=-ζ𝜔𝜔n ± 𝜔𝜔𝑛𝑛�𝜁𝜁2 − 1 2.14

Therefore;

x(t)= A1𝑒𝑒𝑠𝑠𝑡𝑡 + A2𝑒𝑒𝑠𝑠𝑡𝑡 2.15

A1 and A2 can be determined by using the initial conditions 𝑑𝑑𝑥𝑥𝑑𝑑𝑡𝑡

(t=0)=Vo

X(t=0)=xo

Then we will get a general equation for vibrating systems;

x(t)= A1𝑒𝑒𝑠𝑠𝑡𝑡 + A2𝑒𝑒𝑠𝑠𝑡𝑡= 1

S2−S1

[(XoS2-Vo) 𝑒𝑒𝑠𝑠𝑡𝑡 + (Vo+S1Xo) 𝑒𝑒𝑠𝑠𝑡𝑡 ] 2.16

where S1,2 was defined in equation 2.14.

From equation 2.16 we define four (4) cases for ζ which will be explained in the preceding sections.

2.2 Un-damped single degree of freedom system.

If there is no external force applied on the system, the system will experience free vibration. Motion of the system will be established by an initial condition.

Furthermore, if there is no resistance or damping in the system; c=0 the oscillatory motion will continue forever with constant amplitude. Such a system is termed un-damped and is shown in the following figure,

Page 12: Plotting the Response of a Vibration System Using Visual Basic

- 11 -

Fig.2.2 Un-damped system.

The equation of motion can now be simplified to,

m𝑑𝑑2𝑥𝑥𝑑𝑑𝑡𝑡2 + Kx = 0 2.17

with the same initial conditions defined above.

This equation of motion is an order, homogeneous, ordinary differential equation (ODE). If the mass and spring stiffness are constants, the ODE becomes a coefficient and can be solved by the Characteristic Equation method. The characteristic equation for this problem is,

ms2 +k=0 2.18

This determines the two independent roots for the un-damped vibration problem. The final solution (that contains the 2 independent roots from the characteristic equation and satisfies the initial conditions) is,

x(t)=Xocos𝜔𝜔nt+Voωn

sin𝜔𝜔nt 2.19

The displacement plot of an un-damped system would appear as,

Page 13: Plotting the Response of a Vibration System Using Visual Basic

- 12 -

Fig.2.3 Response of an un-damped system.

Please note that an assumption of zero damping is typically not accurate. In reality, there almost always exists some resistance in vibratory systems. This resistance will damp the vibration and dissipate energy; the oscillatory motion caused by the initial disturbance will eventually be reduced to zero.

Page 14: Plotting the Response of a Vibration System Using Visual Basic

- 13 -

2.3 Damped single degree of freedom system.

Free vibration (no external force) of a single degree-of-freedom system with viscous damping can be illustrated as in fig. 2.1

For a damped SDOF system, the general form was defined with equation 2.7 with the same initial condition specified above.

The equation of motion is an order, homogeneous, ordinary differential equation (ODE). If all parameters (mass, spring stiffness and viscous damping) are constants, the ODE becomes a linear ODE with constant coefficients and can be solved by the Characteristic Equation method. The characteristic equation for this problem is,

ms2 + cs+k=0 2.20

This determines the two independent roots for the damped vibration problem. The roots of the characteristic equation fall into one of the following three cases:

1. If ζ < 0, the system is termed under-damped. The roots of the characteristic equation are complex conjugates, corresponding to oscillatory motion with an exponential decay in amplitude.

2. If ζ = 0, the system is termed critically-damped. The roots of the characteristic equation are repeated, corresponding to simple decaying motion with at most one overshoot of the system's resting position.

3. If ζ > 0, the system is termed over-damped. The roots of the characteristic equation are purely real and distinct, corresponding to simple

Page 15: Plotting the Response of a Vibration System Using Visual Basic

- 14 -

2.3.1 Under-damped Systems.

When ζ < 0, the characteristic equation has a pair of complex conjugate roots. The displacement solution for this kind of system is,

x(t)= e−ζωnt

[Xocos𝜔𝜔dt+Vo +ζωnXoωd

sin𝜔𝜔dt] 2.21

The displacement plot of an under-damped system would appear as,

Fig.2.4 Response of an under-damped system

Page 16: Plotting the Response of a Vibration System Using Visual Basic

- 15 -

2.3.2 Critically-Damped Systems

When ζ = 0, the characteristic equation has repeated real roots. The displacement solution for this kind of system is,

x(t)=𝑒𝑒−𝜁𝜁𝜔𝜔𝑛𝑛𝑡𝑡 [Xo+(Vo+𝜔𝜔nXo)t] 2.22

In a critically-damped system there is a critical damping factor which is interpreted as the minimum damping that results in non-periodic motion.

The displacement plot of a critically-damped system with positive initial displacement and velocity would appear as,

Fig.2.5 Response of a critically-damped system.

Note that if the initial velocity Vo is negative while the initial displacement Xo is positive, there will be an overshoot of the resting position in the displacement plot.

Page 17: Plotting the Response of a Vibration System Using Visual Basic

- 16 -

2.3.3 Over-damped Systems

When ζ > 0, the characteristic equation has two distinct real roots. The displacement solution for this kind of system is,

x(t)=𝑒𝑒−𝜁𝜁𝜔𝜔𝑛𝑛𝑡𝑡 [(𝜁𝜁𝜔𝜔𝑛𝑛𝑛𝑛𝑛𝑛+𝑉𝑉𝑛𝑛𝜔𝜔𝑛𝑛�𝜁𝜁2−1

sinh𝜔𝜔𝑛𝑛𝑡𝑡�𝜁𝜁2 − 1 + Xo cosh𝜔𝜔nt√𝜁𝜁2-1 )] 2.23

The displacement plot of an over-damped system would appear as,

Fig.2.6 Response of an over-damped system.

Finally we have to define a variable that applies to all the systems of vibration and comes in handy when plotting their responses on a graph. The variable is called Amplitude, and it is the highest peak of the system when plotted on a graph and it can be defined by the equation;

A= √𝑛𝑛𝑛𝑛2 +𝑉𝑉𝑛𝑛2

𝜔𝜔𝑛𝑛2

2.24

Page 18: Plotting the Response of a Vibration System Using Visual Basic

- 17 -

CHAPTER 3

3.1 PROGRAMMING LANGUAGE.

We need to see the performance of the system under various conditions without actually having to subject the real system to these conditions, hence we simulate. The simulation tool that i made use of is the VB6®. VISUAL BASIC is a high level programming language which was evolved from the earlier DOS version called BASIC. BASIC means Beginners' All-purpose Symbolic Instruction Code. It is a very easy programming language to learn. The codes look a lot like English Language. Different software companies produced different version of BASIC, such as Microsoft QBASIC, QUICKBASIC, GWBASIC, and IBM BASICA and so on. However, it seems people only use Microsoft Visual Basic today, as it is a well-developed programming language and supporting resources are available everywhere. With Visual Basic, you can program practically everything depending on your objective. For example, you can program educational software to teach science, mathematics, language, history, geography and so on. You can also program financial and accounting software to make you a more efficient accountant or financial controller. For those of you who like games, you can program that as well. Indeed, there is no limit to what you can program! There are many such programs in this tutorial, so you must spend more time on the tutorial in order to benefit the most. VISUAL BASIC is a VISUAL and events driven Programming Language. These are the main divergence from the old BASIC. In BASIC, programming is done in a text-only environment and the program is executed sequentially. In VISUAL BASIC, programming is done in a graphical environment. In the old BASIC, you have to write program codes for each graphical object you wish to display it on screen, including its position and its colour. However, In Visual Basic, you just need to drag and drop any graphical object anywhere on the form, and you can change its colour any time using the properties windows. On the other hand, because users may click on certain object randomly, so each object has to be programmed independently to be able to response to those actions (events). Therefore, a VISUAL BASIC Program is made up of many subprograms, each has its own program codes, and each can be executed independently and at the same time each can be linked together in one way or another.

In this section; I will take you through a step by step analysis of the programming codes I used in my project. Since I’m making an interactive program; in other words the user should be able to define the quantity of each variable instead of predefined quantity. I created a textbox which enable the use to input the quantity of each variable.

Page 19: Plotting the Response of a Vibration System Using Visual Basic

- 18 -

Before the start of programming in visual basic; we ought to declare the variables we will be using.

In visual basic the program understands all the trigonometric functions but the hyperbolic function; to at the start of the programming we’ll have to declare the hyperbolic functions as well.

Fig 3.1 Layout of my simulator Function SinH (value As Double) As Double End Function Function Cosh (value As Double) As Double End Function Private Sub Command1_Click() Dim t, Xo, Vo, J, Wn, X, A As Single Dim UNDERDAMPED, OVERDAMPED, CRITICALLYDAMPED, UNDAMPED As Integer Since we will be using an input box (textbox) to identify the values of the

variables, we need to declare which textbox states the value of what variable.

Page 20: Plotting the Response of a Vibration System Using Visual Basic

- 19 -

Wn = Val(Text3.Text) Xo = Val(Text1.Text) Vo = Val(Text4.Text) J = Val(Text2.Text) t = Val(Text5.Text) A = (Sqr((Xo ^ 2) + ((Vo / Wn) ^ 2)))

When the graph is drawn the picture doesn’t last long then it disappears, now this program states that the picture remains drawn.

Picture1.AutoRedraw = True Picture2.AutoRedraw = True Picture3.AutoRedraw = True Picture3.Print Val(A) In my project I assigned a picture box that prints the name of the type of

vibrating system which we are about to sketch.

If J = 0 Then Picture2.Print "UNDAMPED" ElseIf J > 1 Then Picture2.Print "OVERDAMPED" ElseIf 0 < J < 1 Then Picture2.Print "UNDERDAMPED" ElseIf J = 1 Then Picture2.Print "CRITICALLYDAMPED" End If Finally we are ready to sketch the chart; we start by identifying what scale

we want for our chart; (Length, Width)

Picture1.Scale (-10, 10)-(10, -10) Then we identify the scale of the chart lines for both the x and y axis.

This is the most complex part of this project, cause we wont only be scaling the chart but also lines. We have to specify the kind chart whether a four pole chart or a bipolar chart. Due to the extensivity of using a four pole chart will result in a graph that plots outside the chart.

Page 21: Plotting the Response of a Vibration System Using Visual Basic

- 20 -

Picture1.Line (-100, 0)-(100, 0), vbBlack 'Draw X Axis Picture1.Line (0, 100)-(0, -100), vbBlack 'Draw Y Axis For i = -100 To 100 Step 1 'Add the axis legends (numbers) Picture1.CurrentX = i 'X axis Picture1.CurrentY = 0 Picture1.Print i Next For i = -100 To 100 Step 5 Picture1.CurrentX = 0 'Y axis Picture1.CurrentY = i Picture1.Print i Next Now that we’ve Identified the scales for both charts and the chart lines;

we now have to state the colour of line we want to use in our chart. Picture1.ForeColor = vbRed It’s now time to state the equation for which we want to sketch the chart

for. We have to employ an ‘if’ command since the graph that we have to plot is dependent of the J value.

If J = 0 Then X = (((Vo / Wn) * (Sin(Wn * t))) + (Xo * (Cos(Wn * t)))) ElseIf J = 1 Then X = (Xo * Cos((Sqr(J ^ 2 - 1)) * Wn * t)) ElseIf J > 1 Then X = (Exp(-J * Wn * t)) * ((Vo) / (Wn * (Sqr(J ^ 2 - 1)))) * (((Exp((Wn * t) * (Sqr(J ^ 2 - 1)))) - (Exp(-((Wn * t) * (Sqr(J ^ 2 - 1)))))) / 2) + Xo * (((Exp((Wn * t) * (Sqr(J ^ 2 - 1)))) + (Exp(-((Wn * t) * (Sqr(J ^ 2 - 1)))))) / 2) ElseIf 0 < J < 1 Then X = (Exp(-J * Wn * t)) * (((J * Wn * Xo + Vo) / ((Wn * (Sqr(1 - J ^ 2))))) * Sin((Wn * (Sqr(1 - J ^ 2))) * t) + (Xo * Cos((Wn * (Sqr(1 - J ^ 2))) * t))) End If Picture1.Line -(X, t) Next t End Sub

Page 22: Plotting the Response of a Vibration System Using Visual Basic

- 21 -

This program line saves the graph as a .jpg format picture on the desktop.

Private Sub Command3_Click() Dim image As image Picture1.Picture = Picture1.image SavePicture Picture1.Picture, "C:\Users\Ben\Desktop\file.jpg" End Sub This program line clears the picture boxes to make room incase the user

wants to input other variables. Public Sub Command2_Click() Picture1.Cls Picture2.Cls Picture3.Cls End Sub

Page 23: Plotting the Response of a Vibration System Using Visual Basic

- 22 -

CHAPTER 4 4.1 RESULTS AND CONCLUSION. Firstly as can be noted in the program J was used to represent the damping ratio (ζ), due to the fact that the program could not recognise the symbol even though it was defined during the programming. As can be seen on my project simulation a data input for Xo (initial displacement), ζ (Damping ratio), 𝜔𝜔n (natural frequency), Vo (Initial velocity), and t (time) were provided. Therefore the outcome of the graph depends on the users input; although there are three system of vibration and each of these systems are defined based on the value of their damping ratio, but as can be observed from the simulation the pattern of the graph also depends on the value of the rest of the quantities mention above. Even though the damping ratio identifies a predefined system of vibration, if the rest of the units aren’t reasonable the graph would take an unrecognised pattern, i.e. a pattern different from the sample graph of different system of vibration shown above. To test out the accuracy of my program I employed four case studies; Case 1: Xo=0; ζ= 0; 𝜔𝜔n =4; Vo=50; t=20

Fig. 4.1 Layout of case 1

Page 24: Plotting the Response of a Vibration System Using Visual Basic

- 23 -

Case 2: Xo=0; ζ= 0.5; 𝜔𝜔n =4; Vo=50; t=20

Fig 4.2 Layout of case 2 Case3: Xo=0; ζ= 1; 𝜔𝜔n =4; Vo=50; t=20

Fig. 4.3 Layout of case 3

Page 25: Plotting the Response of a Vibration System Using Visual Basic

- 24 -

Case4: Xo=0; ζ= 2; 𝜔𝜔n =4; Vo=50; t=20

Fig. 4.4 Layout of case 4

Page 26: Plotting the Response of a Vibration System Using Visual Basic

- 25 -

CHAPTER 5 5.1 CONCLUSION When I received this project topic it was hard to understand how this project apply to a mechanical engineer; even though it had to do with vibration system but the most tasking part of the project is the computer programming; so for the part half of the time I spent researching for this project I spent it with a computer teacher. From the research made in getting this project to work, I ascertained that a spring mass damper system, which is widely used in mechanical applications, can also be represented and simulated on a Computer to reproduce real-life situations and accurately predict different conditions and outputs desired. Thus it can be used to design systems which have not been manufactured for testing.

Page 27: Plotting the Response of a Vibration System Using Visual Basic

- 26 -

REFERENCES.

1. Leonard Meirovitch (2001). Fundamentals of Vibration, International Edition.

2. Ferdinand P. Beer & E. Russell Johnston (1997). Vector Mechanics for

Engineers, Sixth Edition. Pgs. 1172 – 1174.

3. S. Graham Kelly. (2000). Fundamentals of mechanical Vibrations, Secon Edition.

4. Allen S. Hall, Alfred R. Holowenko, Herman G. Laughlin (2002).

Schaum’s Outlines Machine Design. Pgs. 89-92

5. John Wiley & Sons, Inc. Edited by Myer Kutz (2006). Mechanical Engineers’ Handbook: Materials and Mechanical Design, Volume 1, Third Edition. Pgs. 1204-1209.

6. Aaron Wirth. (1997) Complete list of visual basic commands

7. Yahaya Md. Sam PhD. (2006). “Robust Control of Active Suspension

System for a quarter car model” Project for Department of Control and Instrumentation Engineering, University Technology, Malaysia, 81310 UTM Skudai. Pgs. 6-21

8. Appleyard M. and Wellstead P.E. (1995). Active Suspension: some

background. IEEE Proc.

9. Steven Holzner. (1996). Visual basic 6 black book, First Edition.

10. Karnopp, D. (1990). Design Principles for Vibration Control Systems using Semi-Active Dampers. ASME Journal of Dynamic Systems, Measurement and Control.

112:448-455.

11. Prof. P.Dinesh (2007). Mechanical Vibration e-notes Sambram College, Bangalore.