0% found this document useful (0 votes)
27 views114 pages

FINAL MERGE EEE515 (Goodluck) - Compressed

The document provides an overview of engineering packages, emphasizing their importance in managing engineering information and ensuring project accuracy across various industries. It highlights key components such as design drawings, specifications, and regulatory documentation, as well as the role of MATLAB in engineering applications, particularly in power systems. MATLAB is presented as a versatile tool for numerical computation, data analysis, and visualization, essential for engineers and scientists in solving complex problems.

Uploaded by

Chimezirim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views114 pages

FINAL MERGE EEE515 (Goodluck) - Compressed

The document provides an overview of engineering packages, emphasizing their importance in managing engineering information and ensuring project accuracy across various industries. It highlights key components such as design drawings, specifications, and regulatory documentation, as well as the role of MATLAB in engineering applications, particularly in power systems. MATLAB is presented as a versatile tool for numerical computation, data analysis, and visualization, essential for engineers and scientists in solving complex problems.

Uploaded by

Chimezirim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 114

EEE515:

The Use of
Engineering
PROF.
Packages.
ADEMOLA
ABDULKAREEM MATALB
1
INTRODUCTION
• In the digital age, where complexity and
interconnection reign, efficient management and
communication of engineering information are
crucial. Engineering, driving innovation and
progress, shapes our world. Engineering packages
act as the essential link between visionary ideas and
practical solutions. In this course, we'll explore
engineering packages, with a focus on
MATLAB/SIMULINK, the dynamic duo of
engineering and simulation.

• But first, let's set the stage by understanding


the fundamentals. Let's start with some 2
Engineering Packages
Engineering packages, often referred to as
engineering documentation or design packages,
are comprehensive sets of documents,
drawings, specifications, and other information
that provide detailed instructions and guidelines
for designing, constructing, operating, and
maintaining a system, structure, or product.
These packages are a fundamental part of
engineering and play a crucial role in various
industries, ensuring that engineering projects
are executed accurately and efficiently.

3
Key Components of
Engineering Packages
1. Design Drawings: Detailed schematics, blueprints, and diagrams
illustrating the physical layout and dimensions of components, systems, or
structures.

2. Specifications: Detailed descriptions of materials, components, standards,


and quality requirements necessary for the project. This may include
material specifications, performance criteria, and tolerances.

3. Bill of Materials (BOM): A list of all components, parts, and materials


required for the project, often including quantities, part numbers, and
suppliers.

4. Calculations and Analysis: Engineering calculations, simulations, and


analyses such as structural analysis, heat transfer calculations, stress
analysis, and more, depending on the nature of the project.

5. Operating and Maintenance Manuals: Instructions for operating,


4
maintaining, and troubleshooting the system or product after it's built. This
Key Components of
Engineering Packages
6. Testing and Quality Control Procedures: Procedures for testing,
inspecting, and ensuring the quality of the components or systems. This
includes test plans, testing methodologies, and acceptance criteria.

7. Regulatory and Compliance Documentation: Documents required to


meet industry-specific regulations and standards. This could include safety
certifications, environmental impact assessments, or compliance with
building codes.

8. Process Flow Diagrams (PFDs) and Piping and Instrumentation


Diagrams (P&IDs): Used in industries like chemical engineering, these
diagrams illustrate the flow of materials and the operation of systems.

9. CAD Models and 3D Renderings: Computer-Aided Design (CAD) models


and 3D visualizations that provide a detailed view of the project's physical
aspects.

10. Project Management Documents: Schedules, budgets, project plans, and


other management-related documents that help organize and monitor the
progress of the project. 5
In Summary
Engineering packages are essential for effective
communication among interdisciplinary teams, ensuring
a shared understanding of project design, specifications,
and processes. They play a pivotal role in guiding the
construction and assembly of complex engineering
projects, while also ensuring adherence to safety,
quality, and regulatory standards. These packages find
applications across a wide range of fields, including
mechanical engineering, civil engineering, electrical
engineering, aerospace engineering, software
development, and more, facilitating the design and
implementation of systems and products while
maintaining compliance with standards and regulations.
6
MATLAB
INTRODUCTION

7
• MATLAB, stands for "Matrix Laboratory," is not just a
software program. It is a dynamic, interpreted, environment for
matrix/vector analysis.

•MATLAB is a high-level programming language and interactive


environment designed for numerical computation, data analysis,
and visualization.

•Developed by MathWorks, it was first introduced in the late


1970s and has since evolved into a powerful tool used in
academia, research, and industry.

•At its core, MATLAB excels in working with matrices, making it


exceptionally well-suited for a wide range of engineering,
scientific, and mathematical applications.

•What sets MATLAB apart is its intuitive syntax, vast library of


functions, and seamless integration of computation, data
analysis, and visualization.

8
•Engineering: MATLAB is a go-to tool for engineers, enabling them to solve complex
mathematical problems, simulate systems, and analyze data in various engineering
disciplines such as mechanical, electrical, and civil engineering.

•Science: Scientists leverage MATLAB to process and analyze experimental data,


conduct simulations, and model natural phenomena, spanning physics, biology,
Few chemistry, and more.

•Data Science: In the age of big data, MATLAB is a valuable asset for data scientists,
Applications offering powerful statistical and machine learning capabilities for extracting insights
from large datasets.

of MATLAB •Academia: MATLAB is a staple in academia, where it aids in teaching and research
across disciplines, helping students and researchers bring their ideas to life.

•Image and Signal Processing: MATLAB excels in processing and analyzing images
and signals, making it crucial in fields like computer vision, remote sensing, and
telecommunications.

•Aerospace and Defense: Engineers in these industries rely on MATLAB for tasks
such as designing control systems, analyzing flight data, and simulating complex
systems…to design control systems, analyze flight data, and simulate 9
• Interactive Environment: MATLAB provides an interactive environment where you can
perform computations, visualize results, and experiment with algorithms in real-time. Its
command window allows for rapid prototyping and quick testing of ideas.

• Rich Functionality: MATLAB boasts a vast library of built-in functions and toolboxes
covering everything from linear algebra and optimization to image processing and machine
learning. These functions save time and simplify complex tasks.

• Matrix-Based Operations: MATLAB's native support for matrices simplifies mathematical

Key Features operations, making it ideal for applications involving large datasets and systems of
equations.

of MATLAB • Graphics and Visualization: MATLAB's plotting and visualization tools are renowned for
creating stunning graphs, charts, and animations, making it easy to present and understand
data.

• Customization and Extensibility: You can customize MATLAB through user-defined


functions and scripts, tailoring it to your specific needs. Moreover, you can interface with
other programming languages like C, C++, and Python.

• Simulink Integration: Simulink, a companion tool to MATLAB, extends its capabilities into
the realm of dynamic systems modeling and simulation. This integration is invaluable for
control system design, mechatronics, and more 10
MATLAB in Power Systems
Power System Simulation: MATLAB is extensively used for simulating
power systems, enabling engineers to model and analyze electrical grids'
behavior under various operating conditions.
Load Flow Analysis: Engineers employ MATLAB to conduct load flow
studies, ensuring that power generation, transmission, and distribution
are optimized, reliable, and compliant with standards.
Fault Analysis: In the event of faults or disturbances, MATLAB helps in
fault analysis, enabling quick detection and efficient response to minimize
downtime and ensure grid stability.
Renewable Energy Integration: As the world embraces renewable
energy sources, MATLAB assists in integrating solar, wind, and other
renewables into the grid, optimizing energy generation and distribution.

11
MATLAB in Power Systems
Control System Design: MATLAB supports the design of control
systems for power generation and distribution, enhancing grid stability
and efficiency.
Energy Storage Optimization: With the growing importance of energy
storage systems, MATLAB aids in optimizing the use of batteries and
other storage technologies to balance supply and demand.
Microgrid Design: For the development of microgrids, especially in
remote or off-grid areas, MATLAB is instrumental in designing and testing
resilient and efficient solutions.
Grid Modernization: MATLAB contributes to the modernization of
electrical grids, enabling the integration of smart grid technologies for
real-time monitoring and control
12
13
Let’s examine basic commands typed at the
command prompt
• Arrays
• Equations
• Polynomials
• Plotting
• Systems of equations
M-files
• Decision-making
• Loops
Polynomial fitting

14
Let’s examine basic commands typed at the command
prompt
• Arrays MATLAB…
• Equations
• Polynomials
• Plotting
• Systems of equations
M-files
• Decision-making
• Loops
Polynomial fitting

15
Arrays

To define a 2-row array, we used a


semicolon to mark the end of first row.
Both rows must have same number of
columns.
ize is 2x6 (2 rows, 6
ns).

(row, column) = (1, 3) entry is “8”

(row, column) = (2, 5) entry is “16”


Error because there are 6
columns in the 1st row and 7
columns in the 2nd row.
Arrays
Let’s define and add two row arrays.

Square each element of the “a” array. The “.” tells


MATLAB to perform the squaring operation “^2”
term-by-term.

Add the corresponding elements.


The first element of “a” is added to the first
element of “b”.
Arrays
Let’s define and add two other arrays.

Dimensions are: (rows, columns) = (1, 5)

Use the transpose operator (single quote) to


convert row array into column array.

Dimensions are now: (5, 1)


MATLAB…
Let’s examine basic commands typed at the command prompt

• Arrays

• Equations

• Polynomials

• Plotting

• Systems of equations

M-files

• Decision-making

• Loops

Polynomial fitting

20
Equations
Let’s define an equation. As an example, consider the
volume, V, of a circular cylinder.
Show the students last week’s problem

V  πr 2h
r

Use a radius, r, of 8 and a height, h, of 15.


Let’s examine basic commands typed at the command
prompt
• Arrays
• Equations
• Polynomials
• Plotting
• Systems of equations
M-files
• Decision-making
• Loops
Polynomial fitting
22
Polynomials
For a second-order polynomial, we can use the quadratic equation to
determine the two roots (x values where y(x) = 0).

y  ax  bx  c
 b  b2  4ac

2
x1,2
2a
MATLAB has a function “roots” that can be used to find the roots of n th-order polynomials.
Consider the example:

y  1x 2  15x  50

 15  152  4 1 50  15  5
x1,2  
2 1 2 1

x1  5 x 2  10
Let’s complete the same example using MATLAB.
Let’s examine basic commands typed
at the command prompt
• Arrays
• Equations
• Polynomials
• Plotting
• Systems of equations
M-files
• Decision-making
• Loops
Polynomial fitting
24
Let’s examine basic commands typed at the
command prompt
• Arrays
• Equations
• Polynomials
• Plotting
• Systems of equations
M-files
• Decision-making
• Loops
Polynomial fitting

25
Systems of Equations
Can use MATLAB to solve systems of linear equations.

2x1  9x 2  5 Write in vector- 2 9   x1  5


matrix form. 3 - 4 x   7
3x1  4x 2  7   2   

Vector-matrix form can be represented compactly as: Ax = b

2 9   x1  5
A  x  b 
3 - 4  x 2  7

Can determine x using the inverse of the A matrix: x = A-1b


Perform this operation in MATLAB.
1
 x1  2 9  5
 x   3 - 4 7
 2    
Let’s examine basic commands typed at the command
prompt
• Arrays
• Equations
• Polynomials
• Plotting
• Systems of equations
M-files
• Decision-making
• Loops
Polynomial fitting
27
Let’s write a program (tank.m) to solve the following problem.
A water tank consists of a cylindrical base of radius r and height h and has a hemispherical top (also
radius r). The tank is to be constructed to hold V = 500 m 3 of fluid when filled. The surface area of the
cylindrical part is 2rh and its volume is r2h. The surface area of the hemispherical top is 2r2 and
its volume is 2r3/3.
The cost to construct the cylindrical part of the tank is $300/m 2 of surface area; the hemispherical
part costs $400/m2. Plot the cost versus r for 2  r  10 m and determine the radius that results in the
minimum cost. Compute the corresponding height h.

r
2π  r 3
V
h 3
πr 2 h


C  3002π  rh  400 2π  r 2 
29
The aorta is the largest artery in the body, originating from the left ventricle of the heart
and bringing oxygenated blood to all parts of the body in the systemic circulation. The
aorta extends down to the abdomen, where it branches off into two smaller arteries

30
M-File
The blood pressure in the aorta during systole (the period
following the
. closure of the heart’s aortic valve) can be
described using:

 
y t   e - 8t
sin 9.7t  
 2

where t is time in seconds and y(t) is the pressure difference


across the aortic valve, normalized by a constant reference
pressure (y is unitless).

http://en.wikipedia.org/wiki/Aorta
Hold on is used to add
an additional plot to the
previous plot 1.2

5 steps
1
per
cycle
0.8

0.6
100 steps

y(t)
0.4
per cycle

Red square with dotted line 0.2

-0.2
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5
time (s)
Let’s examine basic commands typed at the
command prompt
• Arrays
• Equations
• Polynomials
• Plotting
• Systems of equations
M-files
• Decision-making
• Loops
Polynomial fitting

33
Decision-Making
The usefulness of computer programs is increased
by using decision-making functions. This enables operator meaning
operations to be completed that depend on the < Less than
results of calculations.
<= Less than or
equal to
The relational operators make comparisons between
arrays. > Greater than
>= Greater than or
The result of using relational operators is 1 if true equal to
and 0 if false.
== Equal to
56 False = 0
~= Not equal to
5  5 True = 1
You can compare arrays in element-by-element fashion. Let’s
5 ~ 5 False = 0
consider some examples…
x = [6 3 9] y = [14 2 9]

x = [6 3 9] y = [14 2 9]

9<9, false = 0

6<14, true = 1
x = [6 3 9] y = [14 2 9]

x = [6 3 9] y = [14 2 9]

9~=9, false = 0

6~=14, true = 1
Can also compare arrays to a scalar.

x = [6 3 9] 8

x = [6 3 9] 8

9>8, true = 1

6>8, false = 0
Decision-Making
The logical operators also make comparisons between arrays. The result of using logical operators
is again 1 if true and 0 if false.
operator name definition
~ NOT “~A” returns an array with the same dimensions as
“A”; the new array has ones where “A” is zero and
zeros where “A” is nonzero

& AND “A&B” returns an array the same dimensions as “A”


and “B”; the new array has ones where both “A”
and “B” have nonzero elements and zeros where
either “A” or “B” is zero
| OR “A|B” returns an array the same dimensions as “A”
and “B”; the new array has ones where either “A”
and “B” have nonzero elements and zeros where
both “A” or “B” is zero

Look at some examples in MATLAB…


z = ~x = ~[0 3 9]

~x(3) = ~9 = 0

~x(1) = ~0 = 1
“~A”
returns an array with the same
dimensions as “A”; the new array has ones
where “A” is zero and zeros where “A” is
nonzero
z = ~x > y = ~[0 3 9] > [14 -2 9]

~x = ~[0 3 9] = [1 0 0]

1 > 14, false = 0 z = [1 0 0] > [14 -2 9]

0 > -2, true = 1


z = ~(x > y) = ~([0 3 9] > [14 -2 9])

[0 3 9] > [14 -2 9]

[0>14 3>-2 9>9]

[0 1 0]

~[0 1 0]
z=0&3=0

“A&B” returns an array the same dimensions as “A”


and “B”; the new array has ones where both “A” and
“B” have nonzero elements and zeros where either
“A” or “B” is zero

z=2&3=1
Consider a projectile that is launched with a speed v0 at an angle A (relative to the
horizontal). Its height, h, and velocity, v, depend on the time since launch (at t = 0).
v(t)
v0
h(t)
A

ht   v 0 t sinA   0.5gt 2


v t   v 0 2v 0 gt sinA   g2 t 2
2

The time is takes to hit the ground is obtained


by setting h(t) = 0 and solving for the time, thit.
v 0 sinA 
t hit 
0.5g
Let v0 = 20 m/s and A = 40 deg (g = 9.81 m/s2). Find the times (between t = 0 and
thit) when the height is no less than 6 m and the speed is simultaneously no greater
than 16 m/s.

v <= 16 m/s

v0
h>=6m
A

Solve for v and h as a function of time. Use relational and logical operators to find
times when height and velocity conditions are both true.

Need to select step size for t. Choose thit/100.

Write a program (m-file) to complete this task. Plot v and h versus t to check the
results.
Decision-Making
Find the times (between t = 0 and thit) when the height is no less than 6 m and the speed is simultaneously
no greater than 16 m/s.

10

h(t)
4

0
0 0.5 1 1.5 2 2.5

20

19
t1 = 0.8649 s t2 = 1.7560 s
18
For the specified conditions,
v(t)
17
the velocity limits the range.
16

15
0 0.5 1 1.5 2 2.5
time (s)
Decision-Making
The conditional statements if, else, and elseif also enable decision-making in programs.

The basic structure of the if statement is: if logical expression


statements
end
Consider the case that it is only desired to calculate the square root of x if x is greater than or equal
to zero. The logic is: if x >= 0, then calculate y = sqrt(x). If x is negative, take no action.

if x >= 0 There can be multiple statements within the if statement.


y = sqrt(x); There is only one (y = sqrt(x);) here, however.
end

if logical expression 1
if statements may if logical expression 2
also be nested. statements
end
end
Decision-Making
When more than one action can occur as the result of a decision, use else and elseif statements along
with the if statement.
if logical expression
The basic structure of the else statement is: statements 1
else
statements 2
end

Consider the case that y = sqrt(x) for x >= 0 and that y = ex-1 for x < 0.

if x >= 0
y = sqrt(x);
else
y = exp(x) – 1;
end
Decision-making
The elseif statement enables an additional decision to be made with an if statement.

if logical expression 1
The basic structure of the elseif statement is: statements 1
elseif logical expression 2
statements 2
else
Consider the case that y = ln(x) for x > 10,
statements 3
y = sqrt(x) for 0 <= x <= 10, and y = ex-1
end
for x < 0.

if x > 10
If not true, then
y  lnx ,
y = log(x);
x  10 elseif x >= 0
x is <= 10.
y  x, 0  x  10 y = sqrt(x);
x0 else If not true, then
y  e  1,
x
y = exp(x) – 1; x is < 0.
end
Decision-Making
Consider the previous example and write an m-file to determine the result based on the selected x
value.

Request “x” value from the user.

Calculate “y” based on “x” input.

Display text and “y” to Command Window.


Decision-Making
x  10 y  lnx 

0  x  10 y x

x0 y  ex  1
MATLAB…
Let’s examine basic commands typed at the command prompt

• Arrays

• Equations

• Polynomials

• Plotting

• Systems of equations

M-files

• Decision-making

• Loops

Polynomial fitting

51
Loops
A loop is a structure used to repeat a calculation (or group of statements) a number of times. The
for loop is used when the number of repetitions is known beforehand. The while loop is used when
the loop continues until a specified condition is satisfied.

for counter = m:s:n “m” is the starting value of the loop counter
statements “s” is the step size of the counter
end “n” is the final value of the loop counter

Example: Write an m-file to compute the sum of the first 15 terms of the series 5k 2 – 2k, where k = 1,
2, 3…

Use a for loop to complete the task.


Initialize “total” value to zero.

Loop counter is “k”. Update “total” value each repetition.


54
SIMULINK
OVERVIEW

55
INTRODUCTION
Simulink is a graphical, drag-and-drop environment for building
simple and complex signal and system dynamic simulations.
It allows users to concentrate on the structure of the problem,
rather than having to worry (too much) about a programming
language.
The parameters of each signal and system block is configured by
the user (right-click on the block)
Signals and systems are simulated over a particular time.
Starting and Running Simulink
Type the following at the Matlab command prompt “simulink”
Click the blank model to create a new workspace
The Simulink library should be seen on the library browser click
on it. The library will appear and drag and drop objects from the
library onto the workspace.
Selecting run will run the dynamic simulation. Click on the blocks
to view the data or alter the run-time parameters
Signals and Systems in Simulink
Two main sets of libraries for building simple simulations in
Simulink
Signals Sources and Sinks
Systems Continuous and Discrete
◦ Sources Used to generate input signals
◦ Sinks Used to display results/signals
◦ Continuous To represent continuous systems
◦ Discrete To represent discrete systems
◦ Math Some mathematical functions
Basic Example 1
Copy sine wave source and scope onto a new Simulink workspace and
connect.
Set sine wave parameters modify to 2 rad/sec by double clicking on it
Run the simulation
Simulation - Start
Open the scope and leave it open while you change
parameters (sin or simulation parameters) and
re-run
Basic Example 2
Simulate the following system
xሷ + 2xሶ + x = sin(2t)
x 0 = x 0 ሶ= 0

Solution
x1 = x
x2 = xሶ
xሶ 1 = x2
xሶ 2 = sin 2t − 2x2 − x1
RESULT
NOTE
A system is represented by a block diagram

You select the block from a library of blocks

You need to know the library that contains the block that you need

click on the library name and you will see a list of blocks in that library

click on the block that you want and drag it to the work file

click on the block to select its parameters

Connect it to other blocks


Thank you for Listening
DR ADEMOLA ABDULKAREEM

63
1.0 INTRODUCTION

1.1 Machine Computation

To obtain meaningful results for a given problem using


computers, there are five distinct phases:

(i) Choice of method

(ii) Designing the algorithms

(iii) Flowcharting

(iv) Programming

(v) Computer execution


(i) A method is defined to be a mathematical formula for
finding the solution to a given problem. There may be more
than one method available to solve the same engineering
problem, but the choice of the method depends on the method
that suits the problem best.

(ii) Algorithm

Once the method has been chosen, we must describe a


complete and unambiguous set of computational steps to be
followed in a particular sequence to obtain the solution. This
description is called an Algorithm. Note that the computer is
concerned with the algorithm and not with the method. The
Algorithm tells the computer where to start, what information to
use, what operations to be carried out and in which order, what
operation to be printed, and where to stop.

Example 1.2 Design an algorithm to find the real roots of the


equation 𝑎𝑥 2 + 𝑏𝑥 + 𝑐 = 0, ∀ 𝑎, 𝑏, 𝑐, for 10 sets of values of a,
−𝑏+𝑒 −𝑏−𝑒
b, c using the method 𝑥1 = and 𝑥2 = (1)
2𝑎 2𝑎

where e = √𝑏 2 − 4𝑎𝑐

The following computational steps are involved:

Step 1: Set I = 1

Step 2: Read a, b, c.
Step 3: Check is a = 0? If yes, print the wrong data and go to
step 9, otherwise go to the next step

Step 4: Check d = 𝑏 2 − 4𝑎𝑐

Step 5: Check is d < 0? If yes, print the complex root and go


to step 9, otherwise go to the next step

Step 6: Calculate e = √𝑏 2 − 4𝑎𝑐

Step 7: Calculate 𝑥1 and 𝑥2 using method (1)

Step 8: Print 𝑥1 and 𝑥2

Step 9: Increase I by 1.
Step 10: Check is I ≤ 10? If yes, go to step 2, otherwise go to
the next step

Step 11: Stop.

On execution of the above eleven steps or instructions, in the


same order, the problem is completely solved. These eleven
steps constitute the algorithm of the method (1).

An algorithm has four (4) important features:

1. Finiteness: an algorithm must terminate after a finite


number of steps.
2. Definiteness: each step of an algorithm must be clearly
defined or the action to be taken must be unambiguously
specified.

3. Inputs: an algorithm must specify the quantities to be read


before the algorithm can begin. In example 1.2 the input
quantities are a, b, c.

4. Outputs: an algorithm must specify the quantities, that are


to be outputted, and their proper place. In the algorithm of
example 1.1, the two output quantities are 𝑥1 and 𝑥2 .

(iii) A Flow Chart is a graphical representation of a specific


sequence of steps (Algorithm) to be followed by a computer to
produce the solution to a given problem. It makes use of the
flow chart symbols to produce the basic operations to be
carried. The various symbols are connected by arrows to
indicate the flow if information and processing. While
drawing a flow chart any logical error in the formulation of the
problem or in the application of the algorithm can easily be seen
and corrected. Table 1.1 presents some of the symbols used in
the drawing flow chart.

Flow chart Symbols


Flow Chart Symbol Meaning
A processing symbol such as addition or subtraction of two
numbers and movement of data in computer memory

A decision-making symbol. Depending on the answer, yes or


no, a particular path is chosen.
An input symbol, specifying quantities, which are to be
read before processing, can proceed.

An output symbol, specifying which are to be


outputted.

Start
A terminating symbol, including start or end of the
Or
flow chart. This symbol is also used as a connector
End
Assignment 1: Draw a flow chart to find the real roots of the
equation 𝑎𝑥 2 + 𝑏𝑥 + 𝑐 = 0, 𝑎, 𝑏, 𝑐, real, for ten
sets of values of a, b, c. using the method

−𝑏+√𝑏2 −4𝑎𝑐 −𝑏−√𝑏2 −4𝑎𝑐


𝑥1 = , 𝑥2 =
2𝑎 2𝑎
where e = √𝑏 2 − 4𝑎𝑐
1.2 Computer Software

The purpose of computer software is to provide a


useful computational tool for users. The writing of
computer software requires a good understanding
of numerical analysis and the art of programming.
The use of engineering packages involves the
application of a computer and the appropriate
software packages for solving mathematical
equations related to the physics of engineering
systems or processes to provide the desired
numerical results and also supply the outputs in a
graphical form for an impressive presentation.
The data or information can then be interpreted by
the engineer for sound judgments in designing,
analyzing and optimization of engineering
systems or processes. Some of the engineering
software packages readily available in market
today include MATLAB, EES, EXCEL,
MATCHAD, FEMLAB, FLUENT, etc.
The use of engineering packages enables engineers
to solve problems easily and quickly.
However, inadequate understanding of the
software packages can lead to abuse and
misinformation as well as colossal damage in
engineering systems. Therefore, there is the need
for students to understand the fundamentals of
engineering packages and how to apply them in
solving engineering problems.

1.2.1 ENGINEERING PACKAGE


Engineering packages are application software
used by scientists and engineers to solve numerical
problems to facilitate good decision-making in
developing systems. Packages are built to
simplify interaction with the users by using a menu
to initiate operation or entering the data through
templates.

Engineering software packages are limited by


capabilities found in their standard mode of
operation. For example, a system of linear
equations or plot of x-y values can be solved with
either Excel or MATLAB software. This is because
of the little effort involved, hence most users tend to
adopt this mode of operation.
However, when problems arise that are beyond the
standard capability of the tool, users are advice to
choose from the following alternatives:

1. Search for a different package and see if it is


capable of solving the problem.

2. Learning how to write computer programs that


allow the user to extend the capabilities of the tool.

3. Learning the basic skills required for linking one


software package with another
1.3 COMPUTER-AID ENGINEERING
This is the use of computer software to simulate performance in
order to improve product designs or assist in the resolution of
engineering problems for a wide range of industries.

 Computer-aided engineering (CAE) is the broad usage of


computer software to aid in engineering analysis tasks.
 CAE is a broad term used by the electronic design automation
(EDA) industry for the use of computers to design, analyze, and
manufacture products and processes.
 CAE includes CAD (computer-aided design) - the use of a
computer for drafting and modeling designs; and CAM
(computer-aided manufacturing) - the use of computers for
managing manufacturing processes.
1.3.1 CAE APPLICATIONS
CAE applications support a wide range of engineering disciplines or phenomena
including:
 Stress and dynamics analysis on components and assemblies using Finite
Element Analysis (FEA)
 Thermal and fluid analysis using Computational Fluid Dynamics (CFD)

 Kinematics and dynamic analysis of mechanisms (multibody dynamics)

 Acoustics analysis using FEA or a boundary element method (BEM)

 Mechatronic System Simulation

 Mechanical Event Simulation (MES)

 Control Systems Analysis

 Simulation of manufacturing processes like casting, molding, and die press


forming
 Optimization of the product or process
1.3.2 BENEFITS OF CAE
 Reduced product development cost and time
Improved product quality and durability.

 Design decisions can be made based on their impact on


performance.
 Designs can be evaluated and refined using computer
simulations rather than physical prototype testing, saving
money and time.
 Provide performance insights earlier in the development
process, when design changes are less expensive to make.
 Helps engineering teams manage risk and understand the
performance implications of their designs.
 1.4 SYSTEMS, MODELS, AND SIMULATION
System: A collection of entities (people, parts, messages,
machines, servers, etc.) that operate in time and space to
interact together toward some end.

State of a system: Collection of variables and their values


necessary to describe the system at that time.

1.4.1 Types of System


Discrete
 State variables change instantaneously at separated points in
time
 Supermarket model: State changes occur only when a
customer arrives or departs
Continuous
 State variables change continuously as a function of time
 Airplane flight: State variables like position, velocity change
continuously

Many systems are partly discrete, partly continuous 




 Linear systems: Linear systems are ones in which the


equations of the model are linear.
 Non-Linear systems: Non-Linear systems are ones, which

are represented by non-linear equations.


 Linear Time Invariant Systems: Here the system is
represented by a differential equation whose coefficients
are a function of time.

1.5 SYSTEM MODEL

 One of the extremely important phases in the system design


methodology is the understanding in the form of a
mathematical model that details the essential system
features to be investigated.
 Modeling can be defined as the physical and mathematical
representation of a system dynamic that predicts the
behaviour of the control action applied. This is known as the
symbolic model. Others are the Prototype model, Descriptive
model, Analog model, Iconic model, etc.

 In Mathematical or symbolic modeling, the components of a


system are represented by an idealized element that has the
essential characteristics of the real component and whose
behaviour can be described by the mathematical equations.
We have employed this model in many area of engineering
system.
1.6 SIMULATION
Simulation is experimentation with models (either small-scale
physical models of a real system or mathematical models).
When a mathematical model is used it represent the system
then it is use to employ analogue or digital computer or a
combination of both to experiment with the model.
The need for simulation arises in the following situations:
1. When it is required to make judgement on that system
during the development stages in the absence of operational
hardware.
2. When planning the life testing of a prototype and it is
required to identify areas where system performance test
results would significant and hence avoid the prohibitive cost
of extensive testing of areas where system performance is
insensitive to changes.
3. When it is required to gain insight into the system behaviour
when such insight cannot be obtained by observing the real
thing as is the case in a biological, biomedical or complex
system. Introduction of sensors or probes in such system tends
to alter system behaviour.
4. When safety considerations prevent the use of certain types
of environment in order to test a prototype. For example it is
not safe to cause a real earthquake so as to test an earthquake
detecting device.
Classification of simulation models are illustrated as shown in
Figure 1.6.

Figure 1.6: Systems, Models, and Simulation


 Classification of simulation models
Staticvs. dynamic Deterministic vs. stochastic
Continuous vs. discrete

 Most operational models are dynamic, stochastic,


and discrete – will be called discrete-event
simulation models
MATLAB OVERVIEW
 MATLAB (matrix laboratory) is a fourth-generation high-
level programming language and interactive environment for
numerical computation, visualization and programming.
 MATLAB is developed by MathWorks.
 It allows matrix manipulations; plotting of functions and
data; development and implementation of algorithms;
creation of user interfaces; interfacing with programs written
in other languages, including C, C++, Java, and Fortran;
analyze data; and create models and applications.
 It has numerous built-in commands and math functions that
help you in mathematical calculations, generating plots and
performing numerical methods.
MATLAB is used in every facet of computational mathematics such as:
 Dealing with Matrices and Arrays
 2-D and 3-D Plotting and graphics
 Linear Algebra
 Algebraic Equations
 Non-linear Functions
 Statistics
 Data Analysis and visualization
 Calculus and Differential Equations
 Numerical Calculations
 Integration
 Transforms
 Curve Fitting
 Algorithm development
 Various other special functions
 Modelling, simulation and prototyping
FEATURES OF MATLAB
 It is a high-level language for numerical computation, visualization and
application development.
 It also provides an interactive environment for iterative exploration,
design and problem solving.
 It provides vast library of mathematical functions for linear algebra,
statistics, Fourier analysis, filtering, optimization, numerical integration and
solving ordinary differential equations.
 It provides built-in graphics for visualizing data and tools for creating
custom plots.
 MATLAB's programming interface gives development tools for improving
code quality and maintainability and maximizing performance.
 It provides tools for building applications with custom graphical
interfaces.
 It provides functions for integrating MATLAB based algorithms with
external applications and languages such as C, Java, .NET and Microsoft Excel.
USES OF MATLAB
 MATLAB is widely used as a computational tool in
science and engineering encompassing the fields of
physics, chemistry, math and all engineering streams. It
is used in a range of applications including:
Control Systems
Embedded Systems
Signal Processing and Communications
Image and Video Processing
Test and Measurement
Computational Finance
Computational Biology
 Control Systems
A control system is responsible for managing, giving commands and
regulating the behaviour of other devices or systems. It is based on
control loops. The devices or systems being controlled can range
from simple home heaters to large industrial control systems that
control the processes or the machines. The control system toolbox of
MATLAB provides algorithms and apps for systematically
analyzing, designing and tuning linear control systems.

 Embedded Systems
Embedded systems are computer systems consisting of hardware
and software components and are designed to do a specific task.
Some examples of embedded systems are washing machines,
printers, automobiles, cameras, industrial machines, etc. With the
push of one button, MATLAB allows us to generate code and run it
on hardware.
 Wireless Communications
Wireless communication is a broad term used for connecting two
devices using a wireless signal. Teams in wireless Engineering use
MATLAB to reduce development time, eliminate design problems
early, and streamline testing and verification.

 Image Processing and Computer Vision


Image processing is mainly focused on the processing of raw images
and making them ready for other tasks such as computer vision.
Computer vision, on the other hand, looks at images like the human
eye. It involves understanding and predicting the visual output.
Algorithm building is vital for image processing and computer
vision. MATLAB provides a comprehensive environment to analyze
images and build algorithms.

 Internet of Things
Internet of Things is the network of devices, vehicles and home
appliances and others embedded with electronics, software,
sensors, actuators, and connectivity which enables the exchange of
data. uses of MATLAB help in the design, prototype, and
deployment of IOT applications such as predictive maintenance,
operations optimization, supervisory control etc.

 Robotics
Robotics is an interdisciplinary field of science and engineering. It
involves mechanical engineering, electronic engineering, and
computer science to name a few to create robots or human-like
machines. Robotics researchers and engineers use MATLAB to
design and tune algorithms, model real-world systems, and
automatically generate code – all from one software environment.

 Data Analytics
Data Analytics is the process of studying data in order to gain
insights. It is mostly done with the help of other software and tools.
Engineering and IT people are using MATLAB to build the Big Data
Analytics Systems.
Commands

 MATLAB environment behaves like a super-


complex calculator. You can enter commands at the
>> command prompt.
 MATLAB is an interpreted environment. In other

words, you give a command and MATLAB executes


it right away.
Commands for Managing sessions
MATLAB provides various commands for managing a session. The following table provides all
such commands
Commands for Working with the System
MATLAB provides various useful commands like saving the current work in the workspace as a
file and loading the file later. It also provides various commands for other system-related
activities like, displaying date, listing files in the directory, displaying current directory, etc.
Input and Output Commands
Vector, Matrices and Array Commands
26
27
Plotting Commands
28
Introduction and
Overview of
Engineering
DR. TIMILEHIN F. Packages:
SANNI
MATLAB
Simulink and
AUTOCAD
1
INTRODUCTION
The focus of this
course is to focus on
MATLAB+SIMULINK,
the dynamic duo of
engineering and
simulation.

2
Matlab
SIMULINK
Simulink is a simulation and model-based design
environment for dynamic and embedded systems, which are
integrated with MATLAB.

Simulink is a graphical, drag-and-drop environment for


building simple and complex signal and system dynamic
simulations.

It allows users to concentrate on the structure of the


problem, rather than having to worry (too much) about a
programming language.

The parameters of each signal and system block is


configured by the user (right-click on the block)

Signals and systems are simulated over a particular time.

3
Simulink is a visual programming interface designed to make modelling systems intuitive. It offers a
way to solve equations numerically using a graphical user interface, rather than requiring code. Models
contain blocks, signals and annotation on a background:.

•Blocks are mathematical functions, they can have varying numbers of inputs and outputs.

•Signals are lines connecting blocks, transferring values between them. Signals are different data
types, for example numbers, vectors or matrices. Signals can be labelled.

•Annotations of text or images can be added to the model, and while not used in the calculations they
can make it easier for others to understand design decisions in the model.

4
Starting and
Running Simulink
1. Type the following at the Matlab command
prompt “simulink”

2. Click the blank model to create a new


workspace

3. The Simulink library should be seen on


the library browser click on it. The library
will appear and drag and drop objects
from the library onto the workspace.

4. Selecting run will run the dynamic


simulation. Click on the blocks to view the
data or alter the run-time parameters
Libraries and Tool-
boxes
• Two main sets of libraries for building
simple simulations in Simulink
Signals Sources and Sinks
Systems Continuous and Discrete
• Sources Used to generate input signals
• Sinks Used to display results/signals
• Continuous To represent continuous
systems
• Discrete To represent discrete systems
• Math Some mathematical functions
Basic Example 1
• Copy sine wave source and scope onto a new Simulink
workspace and connect.
• Set sine wave parameters modify to 2 rad/sec by double clicking
on it
• Run the simulation
• Simulation - Start
• Open the scope and leave it open while you change
• parameters (sin or simulation parameters) and
• re-run
Basic Example 2

RESULT
Example 3

10
NOTE
• A system is represented by a block diagram
• You select the block from a library of blocks
• You need to know the library that contains the block that you need
• click on the library name and you will see a list of blocks in that library
• click on the block that you want and drag it to the work file
• click on the block to select its parameters
• Connect it to other blocks
Thank you for Listening
DR ADEMOLA ABDULKAREEM

12

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy