Introductory Chapter
Introductory Chapter
Introductory Chapter
net/publication/358331261
CITATIONS READS
0 1,339
1 author:
Constantin Volosencu
Polytechnic University of Timisoara
110 PUBLICATIONS 734 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
Applied research on the development of virtual process monitoring systems with application in control of electric drives. View project
Methods and algorithms for identifying systems with distributed parameters, based on sensor networks and artificial intelligence View project
All content following this page was uploaded by Constantin Volosencu on 03 February 2022.
5,600
Open access books available
138,000
International authors and editors
175M
Downloads
154
Countries delivered to
TOP 1%
most cited scientists
12.2%
Contributors from top 500 universities
In the scientific and technical field there are a multitude of numerical calculation
programs. Some examples of these programs can be given as follows. Analytica,
created by Lumina Decision Systems, is a numerical modeling environment with a
visual programming language based on influence diagrams. LabView, created by
National Instruments, is a graphical and textual through formula nodes software,
for process monitoring and control. Mathcad, created by Parametric Technology
Corporation, is a computer software for the verification, validation, documentation
and re-use of mathematical calculations. Matlab is a proprietary multi-paradigm
programming language and numeric computing environment developed by
MathWorks. It allows numerical computation and simulation with extended 2D/3D
visualization with vector manipulation. Matlab allows matrix manipulations, plot-
ting of functions and data, implementation of algorithms, creation of user inter-
faces, and interfacing with programs written in other languages. Simulink is a
Matlab-based graphical programming environment for modeling, simulating and
analyzing dynamical systems from different domains.
According to MathWorks presentation, the Matlab language fundamentals con-
sists in syntax, operators, data types, array indexing and manipulation. Some of
mathematics domain supported are linear algebra, differentiation and integrals,
Fourier transform and other. The users may presents graphic results in two and
three dimensional plots, images, animation and visualization. Data can be imported
and exported, analyzed, preprocessed and visually explored. The language has
many functions and assures programming scripts with program files, control flow,
editing and debugging. The users may develop applications using App Designer,
Guide or a programmatic workflow. Advanced software development is supported
with object-oriented programming, code performance, unit testing, external inter-
faces to Java and Web services, C/C++, .NET and other languages. The language is a
desktop environment with preferences and settings and platform differences. It
assures support for third-party hardware, such as webcam, Arduino, and Raspberry
Pi hardware. Simulink is a block diagram environment for multidomain simulation
and model-based design. It supports system-level design, simulation, automatic
code generation, and continuous test and verification of embedded systems.
Simulink provides a graphical editor, customizable block libraries, and solvers for
modeling and simulating dynamic systems. It is integrated with Matlab, enabling
users to incorporate Matlab algorithms into models and export simulation results to
Matlab for further analysis. It allows modeling of time-varying systems and of
large-scale architectures, running systems, reviewing results, validate system
behavior, optimizing performance for specific goals. The users may extend the
existing Simulink modeling functionality using Matlab, C/C++, and Fortran code.
1
MATLAB Applications in Engineering
2. Examples
The following example is realized using the PDE modeler toolbox. With this
application the users can analyze elliptic, parabolic and hyperbolic Eqs. A hyper-
bolic equation case study, for wave propagation in square domain in plane, is
presented in this example [24, 25]. The equation used in analysis is:
∂u2
¼ c1 ∇ðc2 ∇uÞ þ c3 u þ c4 (1)
∂2 t
2
Introductory Chapter: Matlab and Simulink Applications
DOI: http://dx.doi.org/10.5772/intechopen.98578
2.2 Modeling and simulation of a control system for a second order process
The second example presents a simple case of modeling and simulation of a basic
control system for a second order process.
The process has the transfer function:
yðsÞ KL
H p ð sÞ ¼ ¼ (2)
uðsÞ ðT 1 s þ 1ÞðT s þ 1Þ
Figure 1.
The optimized meshes.
3
MATLAB Applications in Engineering
Figure 2.
Contour plotted solution.
Figure 3.
Plotted solution in 3D.
where e is the error, as difference between the reference w and the feedback r
and uc is the command. The controller is tuned in accordance with the Kessler
version of the module criterion:
4
Introductory Chapter: Matlab and Simulink Applications
DOI: http://dx.doi.org/10.5772/intechopen.98578
T i ¼ T 1 ¼ 0, 4
T1
KR ¼ ¼ 2, 5 (4)
2K L T s
In Figure 4 shows how to arrange the work windows for this application on the
screen. First, Matlab work space is open, then Simulink. A Simulink block diagram
for the control system according the above theory is developed, with transfer func-
tion and integrator blocks from Continuous block library, Add and Gain blocks from
Math Operators, Step and Clock blocks from Sources, To Workspace and Scope blocks
from Sinks. The parameters are entered literally in the Simulink scheme, and their
values are given in Matlab. The parameter values are saved in a data file, which is
called with instruction load each time before the scheme is run. The values of the
vectors w, uc, v, u, y, calculated at the tome values from vector t, are passed into
Matlab workspace with the blocks To Workspace The time variations of the variables
Figure 4.
Simulink block diagram work screen.
Figure 5.
Simulink diagram for fuzzy block.
5
MATLAB Applications in Engineering
uc and y are presented on the two scopes. The time variations of the variables w, v,
uc, u and y are presented using the instructions suplot, plot, grid, xlabel, ylabel, axis.
Analyzing the output graph y it can be seen that the overshoot σ1% = 4,3%, the
settling time tr = 8,4.Ts = 0,336 s, in accordance with Kessler’s tuning criterion.
2.3 Modeling and simulation of a fuzzy control system for the second order
process
The third example presents a simple case of modeling and simulation of a basic
fuzzy control system [26–29] for the same second order process like in the second
example.
Figure 6.
The screen for fuzzy control system.
Figure 7.
The screen for fuzzy system design.
6
Introductory Chapter: Matlab and Simulink Applications
DOI: http://dx.doi.org/10.5772/intechopen.98578
The process has the same transfer function. A fuzzy PI controller is used.
In Figure 5 shows Simulink block diagram for fuzzy controller. With the
fuzzyLogicDesigner window the user may set membership functions, rule base and
inference.
In Figure 6 shows how to arrange the work windows for this application on the
screen.
In Figure 7 shows the work window for fuzzyLogicDesigner. The Simulink block
diagram uses a fuzzy controller with derivation at the input and integration at the
output. The working with Matlab and Simulink is the same like in the second
example.
Conflict of interest
Author details
Constantin Volosencu
“Politehnica” University, Timisoara, Romania
© 2021 The Author(s). Licensee IntechOpen. This chapter is distributed under the terms
of the Creative Commons Attribution License (http://creativecommons.org/licenses/
by/3.0), which permits unrestricted use, distribution, and reproduction in any medium,
provided the original work is properly cited.
7
MATLAB Applications in Engineering
References
[1] Chapman S.J. Matlab Programming [13] Leite E.P., editor, Scientific and
for Engineers, 6th edition, Cengage Engineering Applications Using Matlab
Learning, 2020. IntechOpen London UK 2011 DOI:
10.5772/1531.
[2] Xue D. Matlab Programming.
Mathematical Problem Solutions, [14] Chakravarty S., editor,. Technology
De Gruyter, 2020, DOI:10.1515/ and Engineering Applications of
9783110666953. Simulink IntechOpen London UK 2012
DOI: 10.5772/2414.
[3] Hahn B., Valentine D. Essential
Matlab for Engineers and Scientists, [15] KatsikisV., editor, Matlab A
Academic Press, 2019. Fundamental Tool for Scientific
Computing and Engineering
[4] Lee H.H. Programming and Applications - Volume 1, IntechOpen,
Engineering Computing with Matlab, London UK, 2012, DOI: 10.5772/2557.
SDC Publications, 2019.
[16] Katsikis V., editor,. Matlab A
[5] Moore H., Matlab for Engineers, 5th Fundamental Tool for Scientific
Edition, Pearson, 2018. Computing and Engineering
Applications - Volume 2 IntechOpen
[6] Attaway S. Matlab 5th Edition A London UK 2012 DOI: 10.5772/3338.
Practical Introduction to Programming
and Problem Solving Butterworth- [17] Katsikis V., editor, Matlab. A
Heinemann, 2018. Fundamental Tool for Scientific
Computing and Engineering
[7] Kattan P.I. Matlab For Beginners: A Applications - Volume 3, IntechOpen,
Gentle Approach, Createspace, 2008. 2012, London UK, DOI: 10.5772/3339.
[8] Dittmar R. Model Predictive Control [18] Bennett K., editor,. Matlab.
mit Matlab und Simulink, IntechOpen, Applications for the Practical Engineer,
London, UK, 2019, DOI: 10.5772/ IntechOpen London UK, 2014, DOI:
intechopen.86001. 10.5772/57070.
[9] Paluszek M., Thomas S. Practical [19] Valdman J., editor Applications
Matlab Deep Learning: A Project-Based from Engineering with Matlab Concepts
Approach, Apress, 2020. IntechOpen London UK 2016 DOI:
10.5772/61386.
[10] Leite E.P., editor, Matlab Modelling,
Programming and Simulations [20] Saghafinia A., editor, Matlab.
IntechOpen London UK 2010 DOI: Professional Applications in Power
10.5772/242. System, IntechOpen London UK 2018,
DOI: 10.5772/intechopen.68720.
[11] Assi A., editor, Engineering
Education and Research Using Matlab [21] Elmer, K.; Soffer, R.J.; Arroyo-
IntechOpen London UK 2011 DOI: Mora, J.P.; Kalacska, M. ASDToolkit: A
10.5772/1532. Novel Matlab Processing Toolbox for
ASD Field Spectroscopy Data. Data
[12] Ionescu C., editor, Ed. Matlab A 2020, 5, 96. DOI: 10.3390/data5040096.
Ubiquitous Tool for the Practical
Engineer IntechOpen London UK 2011 [22] Kotze, B.; Jordaan, G. Investigation
DOI: 10.5772/82. of Matlab as Platform in Navigation and
8
Introductory Chapter: Matlab and Simulink Applications
DOI: http://dx.doi.org/10.5772/intechopen.98578