Dear Label_Name,

Greetings! I hope you are well.

I am writing on behalf of an international publishing house, Science and Education Publishing, USA (http://www.sciepub.com).

Science and Education Publishing (SciEP) is a multidisciplinary open access publisher of Journals covering the fields of Science, Technology and Medicine. All SciEP publications are subject to high-quality peer review, editorial and production processes and are freely available online.

Welcome to the April, 2013 edition of SciEP newsletter, providing monthly summaries of articles on science & education related topics of interest to scientist and professionals. The mission of our journals is to provide an open access forum for publishing new findings on issues pertinent to scientific and academic field. We also invite you to submit original research papers, review articles, short reports, or case studies are considered for publication in our Multidisciplinary Journals.

American Journal of Public Health Research
DOI: 10.12691/ajphr-1-1-3

The Implementation of a Tele-Homecare System with Service Oriented Architecture and HL7 Message Transmission Standard
Ching-Sung Wang

American Journal of Medical and Biological Research
DOI: 10.12691/ajmbr-1-1-2

The Influence of Ethanol on Pyruvate Kinases Activity in Vivo, in Vitro, in Silico
Lelevich Sergey Vladimirovich, Khrustalev Vladislav Victorovich, Barkovsky Eugene Victorovich, Shedogubova Tatyana Aleksandrovna

American Journal of Medical Sciences and Medicine
DOI: 10.12691/ajmsm-1-1-1

Clinical and Histological Features in Wegener Granulomatosis
Li Cavoli Gioacchino, Passantino Rita, Bono Luisa, Tortorici Calogera, Ferrantelli Angelo, Giammarresi Carlo, Rotolo Ugo

American Journal of Infectious Diseases and Microbiology
DOI: 10.12691/ajidm-1-1-2

The Curse of Lymphatic Filariasis: Would the Continual Use of Diethylcarbamazine Eliminate this Scourge in Papua New Guinea?
Anne Lanham, Lillian Mwanri

We have released issues of some journals on February 2013.
American Journal of Public Health Research
American Journal of Medical Sciences and Medicine
American Journal of Medical and Biological Research
American Journal of Pharmacological Sciences
American Journal of Clinical Medicine Research
American Journal of Nursing Research
American Journal of Cancer Prevention
American Journal of Medicine Studies
American Journal of Infectious Diseases and Microbiology
American Journal of Cardiovascular Disease Research
American Journal of Biomedical Research
American Journal of Mechanical Engineering
American Journal of Microbiological Research
Journal of Preventive Medicine
American Journal of Food and Nutrition
American Journal of Hypertension Research
American Journal of Sports Science and Medicine
Journal of Cancer Research and Treatment
American Journal of Zoological Research
Journal of Biomedical Engineering and Technology
American Journal of Microbiological Research
Biomedical Science and Engineering

We are pleased to announce that submissions are now being accepted for peer review for all the journals across all our subject areas in SciEP.

Please submit your manuscript via our online submission system:
http://www.sciepub.com/author/signin

To unsubscribe from our mailing list, please click on the following link: unsubscribe

I am looking forward to hearing from you.

Kind regards,

David Rain
Email:join@sciepub.com
Science and Education Publishing (http://www.sciepub.com)

Modeling of Dynamic Systems in Simulation Environment MATLAB/Simulink – SimMechanics

Peter Frankovský*, Darina Hroncová, Ingrid Delyová, Ivan Virgala

Department of Applied Mechanics and Mechatronics, Faculty of Mechanical Engineering, Technical University of Košice, Košice, Slovakia

Abstract: The work shows the use of SimMechanics program for modeling of mechanical systems. The presented paper aims to determination the responses of the mechanical vibrating system through non-homogeneous linear differential equation of second order with constant coefficients using MATLAB/Simulink and SimMechanics. SimMechanics formulates and solves the equations of motion of mechanical system.

Keywords: MATLAB/Simulink – SimMechanics, displacement, velocity, acceleration

Received October 04, 2013; Revised October 10, 2013; Accepted November 12, 2013

Citation: Peter Frankovský, Darina Hroncová, Ingrid Delyová, Ivan Virgala, Modeling of Dynamic Systems in Simulation Environment MATLAB/Simulink – SimMechanics. American Journal of Mechanical Engineering, 1 (7). 282-288. January 2013. doi:10.12691/ajme-1-7-26

1. Introduction

Simulation of mechanical systems with more degrees of freedom is a common issue in engineering. There are various software applications available to deal with the issue, which use either symbolic equations or, based on a model, adopt numerical solution by means of rather more abstract representation such as block diagrams. SimMechanics, designed as an extension to program MATLAB, falls within the second-mentioned category.

As an extension to MATLAB/Simulink, SimMechanics enriches the features of Simulink through the implementation of additional tools to model and simulate mechanical systems. It includes block libraries which represent actual parts of mechanical systems. There are blocks which represent bodies, knuckle joints, endless screws, dampers, springs, sensors and actuators. These blocks enable us to design models of complex mechanical systems.

In order to solve equations of motion, the program MATLAB directly uses functions for numerical solution of differential equations. Similarly to Simulink, which is a program part of MATLAB, the extension application SimMechanics handles mechanical systems by means of block diagrams. Block diagrams in SimMechanics are direct representations of physical components (e.g. springs and dampers), geometric and kinematic relations, what differs them from block diagrams in Simulink. Contrary to the above-mentioned, the blocks in Simulink represent mathematical operations. On that account, physical modeling in the extension SimMechanics is more intuitive, less time-consuming and requires less effort when deriving equations of motion of particular mechanical system [1,3,4].

Within its models though, SimMechanics still enables us to use blocks from the Simulink environment. In this way it is possible to design a mechanical model in SimMechanics and, simultaneously, incorporate a control part of Simulink into one common environment [3,4].

2. Model of the Mechanical System with One Degree of Freedom

The mechanical system with one degree of freedom subject to the analysis is a body with mass m fixed to a solid frame Figure 1 with a spring and a damper. The mass of the spring is not considered. The system is excited harmonically by variable force F (t) and moves linearly in the direction of spring axis and damper axis [2]. A harmonically variable force F(t) = F₀sin(ωt) is used for the model excitation.

Figure 1. Mechanical system with one degree of freedom

Dynamic equation of motion which applies to the mechanical system Figure 1 in its vector form

[picture] | (1)

Substituting the forces equation of the motion

[picture] | (2)

where m - the mass of the body,

- acceleration of the mass,

- reaction force in the spring,

- damping force,

- excitation force.

The reaction force in the spring is

[picture] | (3)

The damping force is

[picture] | (4)

The excitation force is

[picture] | (5)

Where k - spring constant,

b - viscous damping coefficient,

x – displacement of the spring,

ω – natural frequency of the exciting force.

After substitution of relation (3), (4), (5) to the equation (2) we receive the acceleration of mechanical system with one degree of freedom as follows:

[picture] | (6)

The derived equation of motion (6) is further solved in the program MATLAB. As a result we gain kinematic values (displacement, velocity and acceleration) of the mechanical system in relation to time t.

3. Solution of the Mechanical System with One Degree of Freedom in MATLAB

In MATLAB the derived non-homogenous linear differential equation of second order with constant coefficients (6) was solved in relation to mechanical system with one degree of freedom by means of Runge-Kutta method. The following parameters were taken into consideration:

- mass m=1 [kg],

- viscous damping coefficient b=0 [N/(m/s)],

- spring constant k=(2 π)² [N/m],

- exciting force F(t)= F₀.sin(ωt), F₀=1 [N],

considering three different frequencies of exciting force:

- natural frequency of exciting force ω=1,

- natural frequency of exciting force ω=π,

- natural frequency of exciting force

ω=√(k/m)=√((2π)²/1)=2π.

The following conditions are initial conditions for the solution of mechanical system:

- x(0)=0 [m],

- v(0)=0 [m/s],

with solution period 0 ≤ t ≤ 20.

Prior to solution in MATLAB it is needed to create two m-files. The first is the m-function-file defining the language of MATLAB while the second m-file shall specify initial conditions and the integration period.

The m-files have the following form:

functionTDS_F.m

function dx=function TDS_F(t,x)

m=1; k=(2*pi)^2; b=0;

F0=1;

omega=pi;

F=F0*sin(omega*t);

dx=[x(2); -k * x(1) / m - b * x(2) / m + F/m];

vibration.m

[t,x]=ode45(@functionTDS_F,[0 20],[0.0;0.0]);

% [0 20] – parameters of time simulation (start time, end time), [0;0] – initial conditions (displacement, velocity)

% ode45 – numerical solution of differential equations systems, application of Runge-Kutta method of fourth order

Figure 4

plot(t,x)

title('Kinematic variables x(t),v(t) in MATLAB: F=sin(\omega*t), \omega = \pi ');

xlabel('t [s]');

ylabel('x [m], v [m/s]');

grid on;

legend('x=x(t)','v=v(t)');

Results of displacements and velocity of the mechanical system in relation to frequencies of exciting force ω=1, ω=π, ω=√(k/m)=√((2π)²/1)=2π in relation to time t are shown in Figure 2, Figure 3 and Figure 4 by means of function plot(t, x).

Figure 2. Simulation results x(t) and velocity v(t) in relation to frequency of exciting force ω=1

Figure 3. Simulation results x(t) and velocity v(t) in relation to frequency of exciting force ω= π

Figure 4. Simulation results x(t) and velocity v(t) in relation to frequency of exciting force ω= 2π

4. Solution of the Mechanical System with One Degree of Freedom in SimMechanics

SimMechanics is an extension to Simulink which was designed for modeling of systems with more degrees of freedom. It includes a library of blocks which constitute real parts of the mechanism (e.g. bodies and connections between them, actuators, sensors etc.). These blocks are in later stages processed on physical level. The model of actual technical object is designed when combining these blocks. Connecting physical blocks together a mathematical model is automatically designed for solution in Simulink. This method enables us to solve complex tasks in case of which manual derivation of equations of motion would be time-consuming or would cost much effort or might not be possible at all.

The calculation of kinematical values of mechanical system with one degree of freedom shall be done in SimMechanics for the same parameters of mechanical system with one degree of freedom as in case of kinematical values in MATLAB. In SimMechanics we design a block diagram in Figure 5 based on body geometry and connections regarding the environment in question. The block diagram shall further be processed in Simulink.

Figure 5. Block diagram of mechanical system with one degree of freedom in SimMechanics

Simulation results of kinematical parameters of mechanical system (displacement, velocity acceleration) are shown in Figure 6 to Figure 8 by means of plot function of m-file:

% variables simout in Workspace– results parameters x(t),v(t),a(t) after processing in SimMechanics

Figure 3

set(3,'Name','results x(t), v(t), a(t) in SimMechanics')

plot(simout.time, simout.signals.values(:,1:3), 'LineWidth', 2)

title('SimMechanics:x=x(t),v(t),a=a(t): m=1kg,F0=1,k=(2*pi)^2,\omega=\pi'),

legend('x=x(t)','v=v(t)','a=a(t)'),

xlabel('t [s]'),

ylabel('x [m], v [m/s], a [m/s^2]'),

grid on

Figure 6. Simulation results of displacement x(t),velocity v(t) and acceleration a(t) in relation to frequency of exciting force ω=1

Figure 7. Simulation results of displacement x(t),velocity v(t) and acceleration a(t) in relation to natural frequency of exciting force ω= π

Figure 8. Simulation results of displacement x(t),velocity v(t) and acceleration a(t) in relation to natural frequency of exciting force ω=2π

Simulation results of kinematical values (displacement, velocity) are shown in Figure 9, Figure 10, Figure 11 by means of plot function of m-file:

% variables simout in Workspace – results parameters x(t),v(t) after processing in SimMechanics

set(2,'Name','results x(t), and v(t) in SimMechanics')

plot(simout.time, simout.signals.values(:,1:2), 'LineWidth', 2)

title('SimMechanics:x=x(t),v(t),m=1kg,F0=1,k=(2*pi)^2, \omega=\pi'),

legend('x=x(t)','v=v(t)'),

xlabel('t [s]'),

ylabel('x [m], v [m/s]'),

grid on

As expected, the results of solution in SimMechanics in Figure 9, Figure 10, Figure 11 are equal to solution in MATLAB Figure 2, Figure 3, Figure 4.

Figure 9. Simulation results of displacement x(t) and velocity v(t) in SimMechanics – natural frequency of exciting force ω=1

Figure 10. Simulation results of displacement x(t) and velocity v(t) in SimMechanics with natural frequency of exciting force ω= π

Figure 11. Simulation results of displacement x(t) and velocity v(t) in SimMechanics with natural frequency of exciting force ω= 2π

In the following stage the courses of displacements x(t) for frequencies of exciting force are depicted in an analogous way: ω=1, ω=π, ω=2π in Figure 12, Figure 13, Figure 14.

Figure 12. Simulation results in SimMechanics displacement x(t) with natural frequency of exciting force ω=1

Figure 13. Simulation results in SimMechanics displacement x(t) with natural frequency of exciting force ω= π

Figure 14. Simulation results in SimMechanics displacement x(t) with natural frequency of exciting force ω=2π

5. Mechanical System with Two Degrees of Freedom

In the following part of the paper we present a model representing mechanical system with two degrees of freedom as solved in MATLAB and SimMechanics. The model consists of two bodies with masses m₁ and m₂ which are fixed to a solid frame with a spring of spring constant k₁ and a damper with linear damping coefficient b₁. The bodies are bound to each other with a spring with spring constant k₂ and a damper with linear damping coefficient b₂. Masses of the springs shall be ignored. The mass m₁ is excited by external harmonic force F(t) = F₀sin(ωt) in the axis direction of the spring and the damper, where F₀=konst. The output of the solution the model of mechanical system in Figure 15 in MATLAB and SimMechanics are simulation results of displacements, velocities and accelerations of individual system members.

Figure 15. Mechanical system with two degrees of freedom

Differential second order equations of motions related to the mechanical system depicted in Figure 15

[picture] | (7)

[picture] | (8)

shall be processed in order to be solved in MATLAB and shall gain the form of first order differential equations through the following substitution:

[picture] | (9)

[picture] | (10)

[picture] | (11)

[picture] | (12)

while transforming second order differential equations (7) and (8) to four first order differential equations as follows:

[picture] | (13)

[picture] | (14)

[picture] | (15)

[picture] | (16)

After the above-described processing the set of equations are rewritten into the m-file of MATLAB in the following form:

function dx=functionTDS_2(t,x)

m1=75; m2=150; k1=500; k2=250;

b1=10; b2=50; F=100*sin(2*t);

dx=[x(2); ...

(-(b1 + b2) * x(2) + b2 * x(4) - (k1 + k2)*x(1)+ ...

k2*x(3) + F)/m1; ...

x(4); ...

(b2*x(2)-b2*x(4)-k2*x(3)+k2*x(1))/m2];

MATLAB includes predefined functions, which differ in relevant integration method, to solve differential equations (7) and (8) numerically. The solution of required kinematic values shall be done after the following m-file is initiated:

[t,x]=ode45('functionTDS_2',[0 10],[0; 0; 0; 0]);

Figure 1

plot(t,x,'LineWidth',1.5)

title('Simulation in Matlab:x1(t),v1(t),x2(t),v2(t)');

xlabel('t [s]');

ylabel('x1 [m], dx1/dt [m/s], x2 [m], dx2/dt [m/s]');

legend('x1','dx1/dt','x2','dx2/dt');

grid on;

Graphical representation of kinematical parameters Figure 16 related to mechanical system in question Figure 15 shall be gained through standard function ode 45.

Figure 16. Simulation results of displacements and velocities of mechanical system with two degrees of freedom in MATLAB

6. Solution of the Mechanical System with Two Degrees of Freedom in SimMechanics

The solution of kinematic values of mechanical system with two degrees of freedom shall be done in SimMechanics for the same parameters of mechanical system with two degrees of freedom as in case of kinematic values in MATLAB. In SimMechanics we design a block diagram Figure 17 based on body geometry and connections regarding the environment in question. The block diagram shall further be processed in Simulink.

Figure 17. Block diagram of mechanical system with two degrees of freedom in SimMechanics

Solution results of kinematical parameters for individual members of mechanical system Figure 15 have been depicted in MATLAB by means of plot function of m-file:

% Depiction of kinematic values of simout9 and simout10

Figure 2

set(2,'Name','Results in Simulink – x1,v1,a1,x2,v2,a2)

subplot(2,1,1)

plot(simout9.time, simout9.signals.values(:,1:3), …

'LineWidth', 1.5)

title('Member 1');

legend('x1 = x1(t)','v1 = v1(t) ','a1 = a1(t)]');

xlabel('t [s]');

ylabel('x1 [m], v1 [m/s], a1 [m/s^2]');

grid on;

subplot(2,1,2)

plot(simout10.time, simout10.signals.values(:,1:3), …

'LineWidth', 1.5)

title('Member 2');

legend('x2 = x2(t)','v2 = v2(t) ','a2 = a2(t)]');

xlabel('t [s]');

ylabel('x2 [m], v2 [m/s], a2 [m/s^2]');

grid on

As expected, the results of solution in SimMechanics Figure 18 are equal to solution in MATLAB Figure 16.

Figure 18. Result parameters - displacements, velocities and accelerations of mechanical system in SimMechanics

The results parameters x₁=x₁(t), v₁=v₁(t) of member1 and x₂=x₂(t), v₂=v₂(t) of member2 of solution in SimMechanics Figure 19 are from m-file in Matlab where:

plot(simout9.time, simout9.signals.values(:,1:2),'LineWidth', 1.5)

and

plot(simout10.time, simout10.signals.values(:,1:2),'LineWidth', 1.5)

Figure 19. Result parameters - displacements and velocities of mechanical system with two degree of freedom

7. Conclusion

The paper presented the design of simulation model and depiction of results, courses of kinematic values of mechanical system with one degree of freedom and with two degrees of freedom excited harmonically by force transformed to the simulation environment of MATLAB and SimMechanics.

In addition to the above-mentioned, the paper presents the procedure of solving simple mechanisms in a usual way, i.e. through equations of motion solved in MATLAB, as well as by means of modeling procedure carried out in the Simulink extension to MATLAB and in SimMechanics. Based on the above-mentioned, modeling possibilities in individual environments have been presented as well.

Simulink is predominantly determined to solve behaviour of dynamic system in relation to time. It enables us to specify time courses of outcome values in relation to time courses of income values and initial conditions. The program provides us with a simple access to already advanced methods of MATLAB as regards time sets of non-linear differential equations and with tools for simple recording of the issue – model design and visualization of outcomes, and an elegant solution of problems which usually occur during simulation [5].

SimMechanics is a helpful extension to Simulink. It enables the user to add mechanical subsystems to Simulink models without any need for analytical description of their mathematical models, since such description might require considerable effort when solving rather complex tasks.

SimMechanics can be considered as special analytical program for dynamic analysis of mechanical systems and, additionally, is a suitable tool for solving a number of practical issues which may occur in the course of training and engineering practice, providing the fact that MATLAB is becoming a standard tool for technical calculations [7,8,9].

Acknowledgement

This contribution is the result of the project grant project VEGA no. 1/0937/12, VEGA no. 1/0102/11, Slovak Grant Agency – project VEGA 1/1205/12 “Numerical modeling of mechatronic systems” and VEGA no. 1/0289/11.

References

[1]   | Delyová, , Frankovský, P., Hroncová, D.: Kinematic analysis of movement of a point of a simple mechanism. In: MMaMS 2011: Modelling of Mechanical and Mechatronical Systems: proceedings of the 4th international conference: , 20. - 22. 9. 2011. Košice: TU, 2011 s. 53-58.
[2]   | Frankovský, P., Delyová, , Hroncová, D.: Modelovanie mechanického systému s jedným stupňom voľnosti pohybu v programe MATLAB. In: Transfer inovácií. č. 21, 2011, s. 71-73.
[3]   | Karban, P.: Výpočty a simulace v programech Matlab a Simulink, Brno, Computer Press, 2006.
[4]   | Kozák, Š. Kajan, S.: Matlab - Simulink I, Bratislava, STU Bratislava, 2006.
[5]   | Kuryło, P., Papacz, W.: Wykorzystanie pakietu Matlab Simulink w modelowaniu zjawiska tarcia. In: Proizvodstvo. Tehnologiâ. Ekologiâ/red. L. E. Švarcburg. Moskva: Moskovskij Gosudarstvennyj Tehnologičeskij Universitet "Stankin", 2011, s. 207-218.
[6]   | Navrátil, P., Ivanka, J.: Recursive identicication algorithms library in MATLAB&SIMULINK. In: DAAAM INTERNATIONAL VIENNA, Annals of DAAAM for 2010&Proceedings, 20-23 RD OCTOBER 2010, The International DAAAM Symposium, ZADAR, CROATIA, s. 0477-0478.
[7]   | Polóni, T., Takács, G., Rohaľ-Ilkiv, B.: Predicitve control of Mechatronic Systems with Fast Dynamics. In: Selected Topics on Constrained and Nonlinear Control. Textbook. Bratislava: STU v Bratislave, 2011.
[8]   | Takács, G. - Rohaľ-Ilkiv, B. Model Predictive Vibration Control: Efficient MPC of Lightly Damped Mechanical Structures. Springer-Verlag, , 2012. 515 pages.
[9]   | Virgala, , Frankovský, P., Kenderová, M.: Friction Effect Analysis of a DC Motor. In: American Journal of Mechanical Engineering. 2013. Vol. 1, no. 1 (2013), p. 1-5.