271.Innovation of Course of Vibration Theory Based on MATLAB

advertisement
Innovation of Course of Vibration Theory Based on MATLAB
YAN Anzhi, LIAO Mingcheng
The Institute of Civil Engineering, Henan Polytechnic University, Jiaozuo, P. R. China, 454100
Yanzhi@hpu.edu.cn
Abstract: At present, many undergraduates have more opportunity to use computer for C language
program or going online. In order to cultivate higher calculation and innovation abilities of more
students, and also to get similar results in the absence of actual test due to the lack of experimental
funding, it’s highly necessary to reform the present teaching method in the classroom about the course
of vibration theory. The new teaching method, which takes MATLAB language as an experiment aid, is
proposed in this paper. The largest characteristic of simulation is that it can be repeated for many times
and the key parameter of the system can be tuned or designed in undergraduate’s computer. Examples of
experimental teaching on linear and nonlinear vibration problems, respectively, are given in this paper.
The numerical simulation using flexible MATLAB can make up for some shortcomings of traditional
vibration experiments, and can be used as an experimental teaching method in experimental teaching.
Key words: experimental teaching, innovation of course, vibration theory, MATLAB, simulation
1 Introduction
Experimental teaching plays a very important role in colleges and universities during students’ training.
Innovation of experimental teaching must be started with four advantages. Firstly, it is in favor of to
stimulate students’ interest in experimental teaching of learning and motivation. Secondly, it will help
students improve the practicality of linking theory with practice. Thirdly, it will help to guide the
students to cultivate a scientific style of work and study, and the capability of innovation. Finally, it will
promote students to understand the entire discipline system in depth [1].
Most of the traditional hardware experiments are experiments with the real, intuitive, image
characteristics, the students easy to understand and operate, but require a larger capital investment. With
the colleges and universities enrollment expansion in recent years, college students increased. Owing to
a serious shortage of school funding, the corresponding experimental teaching profession would not
open. However, the experimental teaching can take full advantage of modern teaching tools such as
electronic teaching, computer-aided instruction, computer simulation and other means of teaching,
especially using computer simulation experiments. The computer simulation experiments can be used as
an important means of experimental teaching, and it can provide the teachers and students a learning
environment of the practice of simulation technology for the general theory, making up for the
deficiencies of the traditional hardware experiments.
Vibration theory courses are professional courses of mechanics and machinery, and also the theoretical
basis of resolving lots of modern science-technology and practical engineering problems of vibration
and dynamic problems. Since the basic concept of vibration theory is abstract, it is difficult to master the
analysis methods and the basic theory without a good understanding. In this paper, one can intuitively
understand the basic theory of vibration by using graphics features of MATLAB. Moreover, it is also
have some help to understand and solve the practical vibration problems.
The aim of this paper is to introduce how to use MATLAB in the course of vibration theory for students.
How to use the basic functions and main commands of MATLAB for understanding and solving general
problems of vibration theory are given by some examples, so that the students’ passion for learning
numerical technology can be inspired and spread on campus.
2 MATLAB overview
MATLAB, an interactive and powerful engineering package from The MathWorks, Inc., is one of the
most common software tools used in the analysis and design of dynamic systems and the control
556
systems implemented on them. The basic package has many powerful numerical analysis functions as
well as the ability to write scripts and functions to aid in repetitive analysis and to allow student to
augment the environment with custom capabilities. Although it is likely that the students will have a
working knowledge of MATLAB, this paper is intended to bring the uninitiated students up to speed
and to expose the casual students to several important features that are pertinent to the course of
vibration theory. The following can be considered as a general introduction to MATLAB.
Upon entering MATLAB, one should see the prompt >>. This prompt distinguishes a MATLAB
command line. Inside MATLAB, one can get information about a command by typing “help” followed
by the command name.
One of the strengths of the MATLAB environment is its data visualization capabilities. From simple x- y
plots of paired data to complex three-dimensional visualization and rendering techniques, MATLAB
provides users with a complex array of flexible tools for plotting and graphing.
In this section, those tools that are most often used to plot time-based sequences are given to students,
like the time response of dynamic systems to various inputs or initial conditions.
First, we introduce another use of the “:” operator in the environment. At the command prompt, issue
the following command: >> t = [0: 0.01: 1.0]
This command creates a matrix that is 1 row by 101 columns. The elements are a regularly spaced
sequence starting at 0 (the first element), spaced by 0.01 (the second element), and ending at 1.0 (the
third element).
A matrix can be easily described with MATLAB. In a multi-degree-of-freedom (DOF) vibration system,
such as a 3-DOF system, the dynamic matrix is given by
0 
 1.5 −0.5

A = −1.0 2.0 −1.0 


 0
−1.0 1.0 
The dynamic matrix can be input into MATLAB by typing the following on a MATLAB command
line: >>A=[1.5 -0.5 0;-1.0 2.0 -1.0;0 -1.0 1.0]
We can compute both the eigenvalues and eigenvectors in MATLAB by typing the command >> [U,
D]=eig(A)
The results of this command are two matrices U and D. Matrix U contains the eigenvectors as column
vector, and D is a diagonal matrix, which has the eigenvalues on the diagonal.
Where there is a space between each element and a semi-colon at the end of each row. Alternatively,
you can separate matrix elements by commas instead of spaces and you can indicate the end of each row
by a carriage return. MATLAB can efficiently implement many functions of matrices, such as eig( ),
inv( ) and det( ), it gives the eigenvalues and eigenvectors, the inverse and the determinant of a matrix,
respectively. For a complete description of MATLAB, the reader should consult “The Student Edition of
MATLAB”.
3 Simulation for linear vibration system
Harmonic excitation is often encountered in engineering system. It is commonly produced by the
unbalance in rotation machinery. We will first consider a single DOF system with viscous damping,
excited by a harmonic force F (t ) = F0 sin ω t , the model of it’s second-order linear ordinary
differential equation (ODE) is found [2]
mx&& + cx& + kx = F0 sin ω t
(1)
Where m , k and c are mass, spring stiffness and the viscous coefficient, respectively.
Its complete solution can be described as:
557
x = Ae −ζωn t sin (ωd t + ϕ ) +
Where,
ωn = k m
A = x 2 (0) + (
,
x& (0) + ζωn x (0)
ωd
λ = ω ωn
) , tan ϕ =
,
F0
k
sin(ωt − ϕ1 )
1 − λ 2  + [ 2ζλ ]
c
ζ =
,
ωd = ωn 1 − ζ 2
2mωn
2
(2)
2
,
ωd x (0)
2
, tan ϕ1 = 2ζλ (1 − λ ) .
x& (0) + ζωn x(0)
If F (t ) = F0 sin ω t = 0 , at this time, the response of single-DOF system becomes damped free
vibration response. The commands using MATLAB’s flexible matrix operations are to perform in
following:
>> omigad=omiga*sqrt(1-kaxi^2); A=sqrt(x0^2+(x0dot+kaxi*omega*x0)/omigad); % omega denotes the
natural frequency, kaxi denotes damping, x0 and x0dot are initial position and velosity, respectively;
>> fai=atan(omigad*x0/(x0dot+kaxi*omega*x0); % fai denotes the phase angle
>> y=A*exp(-kaxi*omega*t).*sin(omigad*t+fai); which should result in a new matrix in the
workspace, which is also 1 row by 101 columns. To see what this response looks like, simply use the
plot command
>> plot (t, y); xlabel (Time, t/s); ylabel (Displacement y/s);
To visualize this response, by assuming the initial condition x& (0) = 10.0 , x(0) = 0 , the natural
frequency ωn = 5 , by tuning the viscous damping ratio ζ = 0.01 and ζ = 0.05 , respectively, whose
results are plot in figure 1(a).
If F (t ) = F0 sin ω t ≠ 0 and ω = ωn , the forced response of the single-DOF system without viscous
damping is written in following
x=
F0
π
t sin(ωt − )
2mω
2
(3)
The resonance response can be easily plotted using MATLAB for time from 0 to 5 s shown in figure
1(b), when assuming the amplitude of the force F0 = 1 , the mass of the body m = 1 .
(a) Free vibration for single-DOF system
(b) forced vibration-resonance case
Figure 1 Response vs. time plot by use of the MATLAB
3 Simulation for complex and nonlinear vibration system
Although the previous introduction about linear system clearly illustrates the basic function of
558
MATLAB, the astute college students will recognize that it is impossible to have a good understanding
of nonlinear dynamic system, without the aid of numerical simulation. In the study of electronic systems,
a class of systems called relaxation oscillators is often encountered. One of these is a well-studied
nonlinear system called the Van Der Pol oscillator.
The model of the Van Der Pol oscillator is a second-order nonlinear ODE [3,4]
&&
x − µ (1 − x 2 ) x& + x = 0
Equation (4) can be now easily written in state equations by letting x1 = x and x2 = x&
 x&1 = x2

2
 x&2 = µ (1 − x1 ) x2 − x1
(4)
(5)
Translating these equations to an m-file is a straightforward procedure: function xdot = vandp(t,
x) %% x(1) − first state variable, x(2) − second state variable %% mu = 4; % mu denote the
coefficient of the equation
xdot1 = x(2); xdot2 = mu*(1 − x(1)ˆ2)*x(2)−x(1); xdot=[xdot1;xdot2];
Note how the added dimension of this example requires some additional details. First, the argument that
passes the current value of the states (called x here) is a vector, the length of which is equal to the order
of the system (2, in this case). Second, the value that is returned (xdot) is also a vector. Finally, note that
the MATLAB solvers expect the derivatives to be returned as a column vector. The last line in the
preceding function ensures that this requirement is met.
Now the state equation (5) is solved for time from 0 to 40s and initial conditions of 1.0 for the value of
x1 and zero for the value of x2 : >> [tout, yout]=ode45(@vandp,[0 40],[1 0]);
Plot the solution with following command >> plot(tout,yout(:,1), tout,yout(:,2), ‘red -.’)
the results of which can be seen in figure 2(a).
For second-order nonlinear equations, it is often illuminating to plot the two states against each other,
eliminating time as an explicit coordinate. The result is a graphic illustration of the actual state trajectory;
a plot such as this is called a phase plot of the system. The following command will generate a phase
map: >> plot(yout(:,1),yout(:,2))
which is shown in figure 2(b).
(a) time history
(b) phase map
Figure 2 Response of Van Der Pol oscillator for 40s.
4 Conclusion
The method of numerical simulation based on MATLAB can be used as an important means of teaching
experiment. College students can analyze the simulation results by changing the adjustable key
parameters to find the basic characteristic of dynamic system, and further to understand the basic theory
of vibration and the application of knowledge. From the introduction of MATLAB and the basic
application in theory of vibration in this paper, the total aim can be concluded as follows:
(1) Explore how to make computer-based learning tools into the teaching.
559
(2) To provide students with other learning space to enable them to study independently.
(3) To cultivate the sense of innovation and talent to play by computer simulation training and greater
understanding.
References
[1] L. Suxin, W. Rufang and Z. Guangsen. Design for experimental simulation of Communication
Systems base on MATLAB. Laboratory Science, 2008, 3:101-105. (In Chinese)
[2] L. Yimin. Mechanical vibration. Beijing: Tsinghua University press. 2007:22-39 (In Chinese).
[3] B. T. Kulakowski, J. F. Gardner and J. L. Shearer. Dynamic modeling and control of engineering
system.(3nd ed). Cambridge: Cambridge University press, 2007:453-455
[4] D. K. Frederick and J.H. Chow. Feedback control problems: Using MATLAB and the control system
toolbox. Thomson Learning press.2000:151-159. (In Chinese).
Acknowledgements
The writer is grateful for the financial supported by Research fund for higher Education of Henan
Province of China (504906), and the Research fund of Course reformation (2008JG042) and the Science
fund of Ph. D of Henan Polytechnic University (648408).
560
Download