You are on page 1of 37

LABORATORY MANNUAL

Simulation, Modeling & Analysis

Course- M.Tech (1st Year)


Branch- Mechanical

Institute of Engineering and Technology


Lucknow
Table of Content

Sr. No. Objective Page


1 Study of simulation software Like MATLAB 3
2 Generation of Random numbers. 12
3 Simulation of Queuing System of a Hospital. 14
4 Simulation of Spring Mass system using MATLAB. 16
5 Simulation of translation and rotational Mechanical system using MATLAB. 17
6
7
8
9
10
Experiment-1
Objective-Study of simulation software Like MATLAB

Platform- MATLAB Software

Theory- Simulink is a graphical extension to MATLAB for the modeling and simulation of
systems. In Simulink, systems are drawn on screen as block diagrams. Many elements of block
diagrams are available (such as transfer functions, summing junctions, etc.), as well as virtual
input devices (such as function generators) and output devices (such as oscilloscopes). Simulink is
integrated with MATLAB and data can be easily transferred between the programs. In this
tutorial, we will introduce the basics of using Simulink to model and simulate a system.

1.1.1 Starting Simulink

Simulink is started from the MATLAB command prompt by entering the following command:

>>simulink
Alternatively, you can click on the "Simulink Library Browser" button at the top of the
MATLAB command window as shown below:

The Simulink Library Browser window should now appear on


the screen. Most of the blocks needed for modelling basic
systems can be found in the subfolders of the main "Simulink"
folder (opened by clicking on the "+" in front of "Simulink").
Once the "Simulink" folder has been opened, the Library Browser window should look like
Basic Elements-There are two major classes of elements in Simulink: blocks and lines. Blocks are
used to generate, modify, combine, output, and display signals. Lines are used to transfer signals
from one block to another.

Blocks-The subfolders underneath the "Simulink" folder indicate the general classes of blocks
available for us to use:

 Continuous: Linear, continuous-time system elements (integrators, transfer functions,


state- space models, etc.)
 Discrete: Linear, discrete-time system elements (integrators, transfer functions, state-
space models, etc.)
 Functions & Tables: User-defined functions and tables for interpolating function values
 Math: Mathematical operators (sum, gain, dot product, etc.)
 Nonlinear: Nonlinear operators (coulomb/viscous friction, switches, relays, etc.)
 Signals & Systems: Blocks for controlling/monitoring signal(s) and for creating
subsystems
 Sinks: Used to output or display signals (displays, scopes, graphs, etc.)
 Sources: Used to generate various signals (step, ramp, sinusoidal, etc.)

Blocks have zero to several input terminals and zero to several output terminals. Unused input
terminals are indicated by a small open triangle. Unused output terminals are indicated by a small
triangular point. The block shown below has an unused input terminal on the left and an unused
output terminal on the right.

Lines-Lines transmit signals in the direction indicated by the arrow. Lines must always transmit
signals from the output terminal of one block to the input terminal of another block. One exception
to this is that a line can tap off of another line. This sends the original signal to each of two (or
more) destination blocks, as shown below:

Lines can never inject a signal into another line; lines must be combined through the use of a
block such as a summing junction. A signal can be either a scalar signal or a vector signal. For
Single-Input, Single-Output systems, scalar signals are generally used. For Multi-Input, Multi-
Output systems, vector signals are often used, consisting of two or more scalar signals. The lines
used to transmit scalar and vector signals are identical. The type of signal carried by a line is
determined by the blocks on either end of the line.
Building a System-To demonstrate how a system is represented using Simulink, we will build the
block diagram for a simple model consisting of a sinusoidal input multiplied by a constant gain,
which is shown below:

This model will consist of three blocks: Sine Wave, Gain, and Scope. The Sine Wave is a Source
Block from which a sinusoidal input signal originates. This signal is transferred through a line in
the direction indicated by the arrow to the Gain Math Block. The Gain block modifies its input
signal (multiplies it by a constant value) and outputs a new signal through a line to the Scope
block. The Scope is a Sink Block used to display a signal (much like an oscilloscope).

We begin building our system by bringing up a new model window in which to create the block
diagram. This is done by clicking on the "New Model" button in the toolbar of the Simulink
Library Browser (looks like a blank page).
Building the system model is then accomplished through a series of steps:

1. The necessary blocks are gathered from the Library Browser and placed in the model
window.
2. The parameters of the blocks are then modified to correspond with the system we are
modeling.
3. Finally, the blocks are connected with lines to complete the model.
Each of these steps will be explained in detail using our example system. Once a system is built,
simulations are run to analyze its behavior.
Gathering Blocks-Each of the blocks we will use in our example model will be taken from the
Simulink Library Browser. To place the Sine Wave block into the model window, follow these
steps:

1. Click on the "+" in front of "Sources" (this is a subfolder beneath the "Simulink" folder) to
display the various source blocks available for us to use.
2. Scroll down until you see the "Sine Wave" block. Clicking on this will display a short
explanation of what that block does in the space below the folder list:
3. To insert a Sine Wave block into your model window, click on it in the Library Browser
and drag the block into your workspace.
The same method can be used to place the Gain and Scope blocks in the model window. The
"Gain" block can be found in the "Math" subfolder and the "Scope" block is located in the
"Sink" subfolder. Arrange the three blocks in the workspace (done by selecting and dragging an
individual block to a new location) so that they look similar to the following:

Modifying the Blocks-Simulink allows us to modify the blocks in our model so that they
accurately reflect the characteristics of the system we are analyzing. For example, we can modify
the Sine Wave block by double-clicking on it. Doing so will cause the following window to
appear:
This window allows us to adjust the amplitude, frequency, and phase shift of the sinusoidal
input. The "Sample time" value indicates the time interval between successive readings of the
signal. Setting this value to 0 indicates the signal is sampled continuously.

Let us assume that our system's sinusoidal input has:

 Amplitude = 2
 Frequency = pi
 Phase = pi/2

Enter these values into the appropriate fields (leave the "Sample time" set to 0) and click "OK"
to accept them and exit the window. Note that the frequency and phase for our system contain
'pi' (3.1415...).
These values can be entered into Simulink just as they have been shown.

Next, we modify the Gain block by double-clicking on it in the model window. The following
window will then appear:
Note that Simulink gives a brief explanation of the block's function in the top portion of this
window. In the case of the Gain block, the signal input to the block (u) is multiplied by a
constant (k) to create the block's output signal (y). Changing the "Gain" parameter in this
window changes the value of k.

For our system, set k = 5. Enter this value in the "Gain" field, and click "OK" to close the window.

The Scope block simply plots its input signal as a function of time, and thus there are no system
parameters that we can change for it. We will look at the Scope block in more detail after we
have run our simulation.

Connecting the Blocks

For a block diagram to accurately reflect the system we are modeling, the Simulink blocks must
be properly connected. In our example system, the signal output by the Sine Wave block is
transmitted to the Gain block. The Gain block amplifies this signal and outputs its new value to
the Scope block, which graphs the signal as a function of time. Thus, we need to draw lines from
the output of the Sine Wave block to the input of the Gain block, and from the output of the Gain
block to the input of the Scope block.

Lines are drawn by dragging the mouse from where a signal starts (output terminal of a block) to
where it ends (input terminal of another block). When drawing lines, it is important to make sure
that the signal reaches each of its intended terminals. Simulink will turn the mouse pointer into a
crosshair when it is close enough to an output terminal to begin drawing a line, and the pointer
will change into a double crosshair when it is close enough to snap to an input terminal. A signal
is properly connected if its arrowhead is filled in. If the arrowhead is open, it means the signal is
not connected to both blocks. To fix an open signal, you can treat the open arrowhead as an
output terminal and continue drawing the line to an input terminal in the same manner as
explained before.

Properly Connected Signal-When drawing lines, you do not need to worry about the path you
follow. The lines will route themselves automatically. Once blocks are connected, they can be
repositioned for a neater appearance. This is done by clicking on and dragging each block to its
desired location (signals will stay properly connected and will re-route themselves).
After drawing in the lines and repositioning the blocks, the example system model should look like:

In some models, it will be necessary to branch a signal so that it is transmitted to two or more
different input terminals. This is done by first placing the mouse cursor at the location where the
signal is to branch. Then, using either the CTRL key in conjunction with the left mouse button or
just the right mouse button, drag the new line to its intended destination. This method was used to
construct the branch in the Sine Wave output signal shown below:

The routing of lines and the location of branches can be changed by dragging them to their
desired new position. To delete an incorrectly drawn line, simply click on it to select it, and hit
the DELETE key.
Running Simulations-Now that our model has been constructed, we are ready to simulate the
system. Before starting simulation, we need to set the simulation parameters. To do this, go to the
Simulation menu and click on Configuration Parameters. The Configuration Parameters dialog
box opens on your desktop
Enter desired stop time (e.g. 100 microseconds), and change the Solver Options from
Variable-step to fix- step and the step size to 1e-4. The step size specifies the resolution of
simulation. Click Apply and OK to close the Configuration Parameters window.
Go to the Simulation menu and click on Start, or just click on the "Start/Pause Simulation"
button in the model window toolbar (looks like the "Play" button on a VCR). Because our
example is a relatively simple model, its simulation runs almost instantaneously. With more
complicated systems, however, you will be able to see the progress of the simulation by
observing its running time in the lower box of the model window. Double-click the Scope
block to view the output of the Gain block for the simulation as a function of time. Once the
Scope window appears, click the "Auto scale" button in its toolbar (looks like a pair of
binoculars) to scale the graph to better fit the window. Having done this, you should see the
following:
Experiment-2
Objective- Generation of Random numbers.
Platform- MATLAB Software
Theory-When you create random numbers using software, the results are not random in a
strict, mathematical sense. However, software applications, such as MATLAB, use
algorithms that make your results appear to be random and independent. The results also pass
various statistical tests of randomness. These apparently random numbers are often described
as pseudorandom numbers. You can use these numbers as if they are truly random and
independent. One benefit of using pseudorandom, pseudo independent numbers is that you
can repeat a random number calculation at any time. This can be useful in testing or
diagnostic situations.

Although repeatability can be useful, it is possible to accidentally repeat your results when
you really want different results. There are several ways to avoid this problem. The
documentation contains several examples that show how to ensure that your results are
different when that is your intention.
Use the rand, randn, and randi functions to create sequences pseudorandom numbers.
Use the rng function to control the repeatability of your results. Use the RandStream class
when you need more advanced control over random number generation.
Functions-

rand Uniformly distributed pseudorandom numbers

randn Normally distributed pseudorandom numbers

randi Uniformly distributed pseudorandom integers

randperm Random permutation

Observation and Calculation -


Result and Discussion-
Experiment-3
Objective- Simulation of Queuing System of a Hospital.
Platform- MATLAB Software.
Theory-
Simulate the queuing system of a hospital of a given example.

This example shows how to model a single-queue multiple-server system with a single traffic
source and an infinite storage capacity. In the notation, the M stands for Markovian; M/M/1
means that the system has a Poisson arrival process, an exponential service time distribution,
and one server. Queuing theory provides exact theoretical results for some performance
measures of an M/M/1 queuing system and this model makes it easy to compare empirical
results with the corresponding theoretical results.
Structure
The model includes the components listed below:
Time Based Entity Generator block: It models a Poisson arrival process by generating
entities (also known as "customers" in queuing theory).
Exponential Inter-arrival Time Distribution subsystem: It creates a signal representing
the inter-arrival times for the generated entities. The inter-arrival time of a Poisson arrival
process is an exponential random variable.
FIFO Queue block: It stores entities that have yet to be served.
Single Server block: It models a server whose service time has an exponential distribution.
Observation and Calculation-The MATLAB Model of the example is shown in the
diagram. Simulate the system and show the graph.
Result and Discussion -
Experiment-4
Objective- Simulation of Spring Mass system using MATLAB.
Platform- MATLAB Software.
Theory-A mass on spring with a velocity-dependent damping force and a time-dependent
force acting upon it will behave according to the following equation-
m ẍ + c ẋ+ kx=f (t)
The model will be formed around this equation, ‘m’ is the equivalent mass of the system, ‘c’
is the damping constant and, ‘k’ is the constant of stiffness of the spring. First we want to
rearrange the above equation so that it is in terms of acceleration; then we will integrate to get
the expression for the velocity and position. Rearranging the equation to accomplish this, we
get
1
ẍ= ( f ( t ) −c ẋ−kx)
m

Observation and Calculation-


Result and Discussion -

Experiment-5
Objective- Simulation of translation and rotational Mechanical system using MATLAB.
Platform- MATLAB Software.
Theory: - Modeling of Translational Mechanical Systems

Translational mechanical systems move along a straight line. These systems mainly consist of
three basic elements. Those are mass, spring and dashpot or damper.
If a force is applied to a translational mechanical system, then it is opposed by opposing
forces due to mass, elasticity and friction of the system. Since the applied force and the
opposing forces are in opposite directions, the algebraic sum of the forces acting on the
system is zero. Let us now see the force opposed by these three elements individually.
Mass:-Mass is the property of a body, which stores kinetic energy. If a force is applied on a
body having mass M, then it is opposed by an opposing force due to mass. This opposing
force is proportional to the acceleration of the body. Assume elasticity and friction are
negligible.

Where,
Fm ∝ α
d2 x  F is the applied force
⇒ F m=Ma=M
d t2  Fm is the opposing force due to
mass
d2 x
⇒ F=F m=M  M is mass
d t2
 a is acceleration
 x is displacement
Spring: - spring is an element, which stores potential energy. If a force is applied on
spring K, then it is opposed by an opposing force due to elasticity of spring. This opposing
force is proportional to the displacement of the spring. Assume mass and friction are
negligible.

Fm ∝ α
Where,
⇒Fk=Kx  F is the applied force
 Fk is the opposing force due to
F=Fk=Kx elasticity of spring
 K is spring constant
 x is displacement
Dashpot: - If a force is applied on dashpot B, then it is opposed by an opposing force due
to friction of the dashpot. This opposing force is proportional to the velocity of the body.
Assume mass and elasticity are negligible.

Fb ∝ v Where,
 Fb is the opposing force due to
dx
Fb=Bv=B dt friction of dashpot
 B is the frictional coefficient
 v is velocity
dx  x is displacement
F=Fb=B dt
Modeling of Rotational Mechanical Systems
Rotational mechanical systems move about a fixed axis. These systems mainly consist of
three basic elements. Those are moment of inertia, torsional spring and dashpot.
If a torque is applied to a rotational mechanical system, then it is opposed by opposing
torques due to moment of inertia, elasticity and friction of the system. Since the applied
torque and the opposing torques are in opposite directions, the algebraic sum of torques
acting on the system is zero. Let us now see the torque opposed by these three elements
individually.

Moment of Inertia:-In translational mechanical system, mass stores kinetic energy.


Similarly, in rotational mechanical system, moment of inertia stores kinetic energy.
If a torque is applied on a body having moment of inertia J, then it is opposed by an opposing
torque due to the moment of inertia. This opposing torque is proportional to angular
acceleration of the body. Assume elasticity and friction are negligible.

Where,
Tj ∝ α
 T is the applied torque
2
d θ
⇒ Tj=Jα=J dt 2
 Tj is the opposing torque due to
moment of inertia
d2θ  J is moment of inertia
T=Tj=J dt 2  α is angular acceleration
 θ is angular displacement
Torsional spring:-In translational mechanical system, spring stores potential energy.
Similarly, in rotational mechanical system, torsional spring stores potential energy.
If a torque is applied on torsional spring K, then it is opposed by an opposing torque due to
the elasticity of torsional spring. This opposing torque is proportional to the angular
displacement of the torsional spring. Assume that the moment of inertia and friction are
negligible.

Tk ∝ θ
Where,
⇒Tk=Kθ  T is the applied torque
 Tk is the opposing torque due to
T=Tk=Kθ elasticity of torsional spring
 K is the torsional spring constant
 θ is angular displacement
Dashpot:-If a torque is applied on dashpot B, then it is opposed by an opposing torque due to
the rotational friction of the dashpot. This opposing torque is proportional to the angular
velocity of the body. Assume the moment of inertia and elasticity are negligible.

Tb ∝ ω

⇒Tb=Bω= B dt

T=Tb= B dt
Where,
 Tb is the opposing torque due to the rotational friction of the dashpot
 B is the rotational friction coefficient
 ω is the angular velocity
 θ is the angular displacement

Observation and Calculation-

Result and Discussion -

Experiment No. 6
Objective : Modelling and Analysis of Dynamic system
Theory :
Mechanical System manages power to accomplish a task that involves forces and
movement.
lsim is a MATLAB command to simulate time response of dynamic systems to arbitrary
inputs.
ode23 is a MATLAB command to solve non-stiff differential equations, low order method.
Simulink provides a graphical editor, customizable block libraries, and solvers for modeling and
simulating dynamic systems. It is integrated with MATLAB®, enabling you to incorporate
MATLAB algorithms into models and export simulation results to MATLAB for further analysis.
Stages of Experiment :

In the first part of experiment we calculated trasfer function of given mechanical system for input
f(t) and output x(t). Then we obtained x(t) by using lsim command for time interval 0< t < 10 sec.
for m = 2, b = 1.8, b = 0.2 and f(t) = sin(t). The system was at rest initially. Finally our linear
simulation result as shown in figure

Next, we determined the differential equation representation of system and we solved this equation
by using ode 23 command for the above conditions
Firstly ve obtained a set of 1st order differential equations set from the original one.
- new variables as x1=x and x2=x’
then we can write x1’=x2 and
x2’=….
Secondly we defined differential equation set in a function file as
function dy=eqn_name(t,x)
dy=[x2;.........]; (dy shows a vector containing x1’ andx2’)

Finaly equation was solved by ode23 command as in the form:


[t,xt]=ode23('eqn_name',timeInterval,initialCond) (x(t) contains the solutions of x1 and x2)
and we obtained and ploted x(t) versus t as shown in figure.
As you seen the red curve shows velocity and the blue curve shows changing of position.
In the second part of experiment we created different simulink models and obtained these
simulink models for transfer function that is found at first part of experiment. Our first simulink
model as shown in figure

The we created another simulink models to observe output x(t) on scope by using the
differential equation in first part of experiment as shown in figure.

Then we connected these two simulink models using multiplexer block as you seen.
Our resulted graphs was same because two simulink models do same thing in different way.

Result : In this experiment we learned mathematical modelling of a mechanical system by creating


MATLAB functions and scripts and using simulink blocks. We used some special MATLAB commands
like lsim ode23 to obtain models.
Experiment No. 7
Objective : Simulation of hydraulic and pneumatic system

Introduction : Hydraulic and pneumatic systems are highly nonlinear. These systems
exhibit nonlinear behavior because of restricted flows, finite cylinder length and non-
negligible static and dynamic frictions. Pneumatic system non- linearity is even stronger
because of air compressibility. Since no single law exists which describes the resistance of
passages to flow, simple design procedures are difficult to obtain due to the analytical
complexity involved. Numerical simulations provide a mean to bypass these analytical
difficulties.Our goal is to fulfill the need for a fully adjustable small-to-medium scale
simulation package comprising the followingcharacteristics:
 Direct coupling between hydraulic and pneumaticcomponents.
 Fast and accurate quasi real-time iterative numerical solver for nonlinear differentialequations.
 Continuous and step-by-step simulationmodes.
 Visual feedback using graphical animation synchronized with solveroutputs.
 Arbitrary connection of measurement point (instrumentation) for datacollection.
 In-simulation interactivity between user and circuitcomponents.
 Graphical editor for easy and intuitive systemconstruction.
System formulation :
In our design approach, all components are modeled as multi-port devices. There are two
variables associated with each device port. They represent the effort-quantity (pressure,
force, etc.) and the flow-quantity (flow, speed, etc.) of the device. However device port’s
directional information is not known à priori. That is, input-output relationship of the
device ports is dependent on the circuit’s topology. By using bond-graph’s causality
analysis method, one can determine input-output relationship of every connected port on-
line.
In Hydro+Pneu, several component palettes are available from the user interface. Below is
a short list of theses component palettes. The process of design, simulation and analysis is a
sequence of simple steps. These steps and their purposes are given below.
 Component selection and interconnection. Hydraulic, pneumatic and mechanical
components are selected from the component palettes. Using hydraulic and/or pneumatic
links and connecting them to component ports, one can create component
interconnections to formcircuits.
 Component parameter setting. Each circuit component contains a numerical model whose
parameters are fully adjustable from the user interface. User can accept default values or
specify fine-tuned values from manufacturer’s datasheets.
 Instrumentation. Output measurement is the process of collecting data from
circuit’s output variables. Various meters and cartesian graphs are available t o
performinstrumentation.
 Simulation mode selection. Numerical simulation is performed in either continuous mode
or step-by-step mode. In continuous mode, system equations solution and graphical
animation updates are continuously executed in a quasi real-time manner. In step-by-step
mode, the user is responsible for time-step increment (by depressing a key or a click of
themouse).
 Post-simulation analysis. Data collected by the grapher object are persistent until the next
simulation run. The grapher object can also perform formatted storage operations. This
enables extensive post-simulation analysis using appropriate data analysis tools such as
Matlab orMatrixX.
Hydro+Pneu uses a color-coded scheme to represent state changes in transient regime and
transient-to-steady state transitions. Usually, mechanical displacements (linear translations
and rotational movement) can be expressed easily by graphical animations. However,
dynamic entities such as pressure differential, flow resistance and temperature variations
are much more difficult to express.
A color-coded scheme is suitable to represent these dynamic variables. In this scheme a set
of colors is mapped to a range of variable values. While a simulation is in progress, the user
can notice component internal changes by observing its color variations. For a more
quantitative evaluation, the user can also connect measurement components to the circuit.
These measurement components display numerical data at eachtime-step.
Simulation Process :
Figure 1 shows a typical hydraulic two-speed circuit. This circuit provides differential
forward and backward cylinder speeds. The user can control forward or backward motion
by activating the distributor chambers.
Also in figure 1 is a grapher object which shows the cylinder position versus simulation time-steps.
To further enhance user-software interactivity, Hydro+Pneu permits in-simulation component
manipulations. For example, user can reposition a cylinder’s piston by dragging its shaft without
stopping the simulator. It is an important feature since it allows user to experiment with different
component settings on-line. The simulator allows hydraulic and pneumatic systems coupling at
mechanical contact points. This capability permits the study of different system dynamics and their
interplay. In figure 2, the single mechanical contact point is the interface between the pneumatic
and hydraulic cylinders. This hybrid circuit shows an interesting application where a pneumatic
cylinder, driven by its compressor group, is the prime movingforce.
The hydraulic cylinder, which is coupled to the pneumatic one, acts as a retaining
force on behalf of the load. Note that this hybrid configuration permits different
retaining force for forward and backward cylinder motions since there is two flow
controls installed to the hydraulic cylinder. Again, the user can control forward or
backward motion by activating the distributor chambers. Every hydraulic,
pneumatic and mechanical component possesses a numerical model that is fully
adjustable. Figure shows a typical component dialog box for parameter input. In
most cases, non-ideal component characteristics are possible. For example, depicts
an input dialog box for a double acting cylinder. The user can select from several
joint leak degrees (negligible, low, medium and high) to obtain non-ideal
characteristics caused by aging and wears of thecomponent.

Experiment No. 8
Objective : Simulation of service operations
Introduction :
Simulation is a powerful technique for solving a wide variety of problems. Simulation is an
imitation of the operation of a real world processor system over time. Simulation involves
the generation of an artificial history of a system and the observation of that artificial
history to draw inferences concerning of the operating characteristics of the real system.
Simulation is done either manually or using computers. Simulation is basically an
experimental technique. It is a fast and relatively inexpensive method of doing an
experiment on the computer.

The basic idea behind simulation include

 Model the given system by means of someequations.


 Determine its time dependentbehavior.
The simplicity of approach when combined with the computational power of the high speed
digital computer makes simulation a power full tool.

Simulation is mostly used when

 An exact analytic expression for the behavior of the system under


investigation is notavailable
 The analytic solution is too time consuming orexpensive.
Simulation modeling can be used as

 An analysis tool: To predict the effect of changes to the effect of


changes to existingsystem.
 A design tool: to predict the performance of new systems under
varying set of circumstances.
Examples of simulation applications in services
 Simulating aircraft delayabsorption
 Runway schedule determination by simulation optimization
 ship arrivals inports
 Modeling and simulation of telephonic callcentre
 Baggage screening atairports
 Telecommunication billingsystem
 Modeling front office and patient care in ambulatory health
carepractices
 Project management
 Scheduling of policepatrols
 Hazardous wastehandling

DEFINITION OF SYSTEM AND STATE OF ASYSTEM


System

A system is defined as a group of objects that are joined together in some regular interaction
or interdependence toward the accomplishment of some purpose. System can be categorized
as discrete or continuous.
State of a system

The state of a system is defined to be a collection of variables necessary to describe the


system at any time relative to the objective of the study. In case of banking the possible state
variables are a number of busy tellers, the number of customers waiting in line or being
served, and the arrival time of the next customer.
Discrete system

A discrete system is one in which the state variables change only at a discrete set of points in
time. The number of customer waiting in line in a bank is an example of discrete system.

Continuous systems

A continuous system is one in which the state variables change continuously over time. An
example is arrival time of the next customer in a bank

Model of a system

A model of a system is defined as a representation of a system for the purpose of studying


thesystem.

Types of model

Models can be classified as:

Models Static simulation models

It represents a system at a particular point in time. It is otherwise called as Monte Carlo


simulation.

Dynamic simulation models

It represents systems as they change over time. Example: The simulation of a bank from 9
A.M. to 4 P.M for the time of arrival ofcustomers.

Deterministic simulation models

Simulation models that contain no random variables are classified as deterministic.


Deterministic models have a known set of inputs which will result in unique set of outputs.
Example: deterministic arrivals would occur at a dentist’s office if all patients arrived at the
scheduled appointment time.

Stochastic simulation models


A stochastic simulation model has one or more random variables as inputs. Random inputs
lead to random outputs. Since the outputs are random they can be considered only as
estimates of the true characteristics of the model. Example: the simulation of a bank would
usually involve random interval times and random service times. Thus in a stochastic
simulation, the output measures like the average number of people waiting, the average
waiting time of a customer, must be treated as statistical estimates of the true characteristics
of thesystem.

Discrete event system simulation

It is the modeling of systems in which the state variables change only at a discrete set of
points in time. The simulation models are analyzed by numerical methods rather than by
analytical methods. Analytical methods employ the deductive reasoning of mathematics to
solve the model. For example, differential calculus can be used to compute the minimum
cost policy for some inventory models. Numerical methods employ computational procedure
to solve mathematicalmodels.

MONTE CARLO METHOD

A Monte Carlo method is a stochastic technique that involves use of random numbers and
probability statistics to solve the problems. The term Monte Carlo Method was coined by
S. Ulam and Nicholas Metropolis in reference to games of chance, a popular attraction in
Monte Carlo, Monaco (Hoffman, 1998; Metropolis and Ulam, 1949). This method can be
used in many areas from economics, nuclear physics to regulating the flow of traffic. To call
something a "Monte Carlo" experiment, all you need to do is use random numbers to
examine some problem.

The Monte Carlo method is just one of many methods for analyzing uncertainty propagation,
where the goal is to determine how random variation, lack of knowledge, or error affects the
sensitivity, performance, or reliability of the system that is being modeled.

Monte Carlo simulation is a method for iteratively evaluating a deterministic model using
sets of random numbers as inputs. This method is often used when the model is complex,
nonlinear, or involves more than just a couple of uncertain parameters. A simulation can
typically involve over 10,000 evaluations of the model, a task which in the past was only
practical using super computers.
Experiment No. 9
Objective : Simulation of job shop with material handling and flexible manufacturing
system
Introduction :
The pursuit of achieving flexibility and timeliness on manufacturing system has brought
manufacturer in to the choice of adopting flexible manufacturing system (FMS). An FMS is
generally consisted of machines, storage, and material handling system which is integrated and
controlled by a computer center. The computer center is responsible for creating job dispatch list
which then automatically dictate the material handling system on conducting material pick-up and
delivery from one processing point unto another. The system will then operate without operator
attendance for a specified time interval.

We consider here a specific FMS where four identical machines, pallet stocker and stacker
crane (as material handling system) are integrated by computer center. The system will process
jobs which has multiple stages. The stages are sequence dependent, meaning stage two can
only begin after stage one is finished. At the start of the production shift, operator will check on
the list of jobs to be processed and then create dispatch list on the computer center. Jobs will
then be setup on the loading/unloading area. The stacker crane, having role as shared resource,
is responsible for delivering parts from loading/unloading area unto machines, back to
loading/unloading area to be setup for the second stage, unto machine and then to the pallet
stocker as the storage area. The stacker crane can only move one part at a particular time. The
system is to be operated unmanned for 24 hours, so the aim for this system is to have all the
parts processed (makespan) less than 24hours.
There are several research conducted to deal with the specified system above. Research by
starts by applying genetic algorithm to generate job dispatch list, the calculation were done
manually thus inefficient in terms of computation time. Improvements were done by and by
adopting three different heuristic and meta-heuristic approaches, but they all excludes material
handling process by assuming that stacker crane is always available and transportation time
equals to zero. This assumption cannot always be true. Being a shared resource there are
possibilities that stacker crane is required by multiple jobs, it then can only select one job to be
picked up and delivered at a particular time. This will leads to the delay of another job to be
processed. Without taking this phenomenon into account the makespan will be underestimated.
This paper aims to model the transportation process conducted by stacker crane given that
dispatch list is already been determined. When there are multiple jobs to be picked up, several
rules can be applied, such as random , shortest travels distance first, and longest waiting rule.
We will apply these rules and compared their performance in terms of makespan and stacker
crane utilization.
We will present the paper in five sections. Section 1 presents the introduction and motivation
of the research, section 2 presents the research methods, section 3 presents the system
description and simulation modeling, section 4 presents the simulation result and analysis and
section 5 presents the research conclusion.
Method :
Many studies show that simulation is found to be an effective tool in design and operation of an
FMS. Simulation can benefit us when we want to study the impact of a certain control policy
without disturbing the real system. Depend on the simulation software; it can also give us better
visualization about the way the system works. Taking these into consideration, we took
simulation as our research approach and Promodel as our simulation platform.
System Modelling
System description :
Consider an FMS work center consisted of one loading/unloading area, four identical machines
with incoming and outgoing buffer area in front of each machine, and pallet stocker with the
capacity of 60 pallets, all integrates by a computer center. The pallet stocker was assigned
evenly to serve each machine (15 pallet stocker for each). Whenever a machine is selected as
processing destination but currently unavailable, job would be queued up on the incoming
buffer and the pallet stocker dedicated for that particular machine. (See the layout on Figure1).

Fig. 1 FMS work centre layout


There are 15 jobs each having 1 or 2 process stages, each stage is consisted of several
operations. The operations on a particular stage have to be processed in one machine to avoid
damage due to frequent handling, so we do not modeled the detail of the operation sequence
here. The processing requirement were saved and identified by the entity attribute (named part
number).
Simulation model building :
We create dispatch list by applying longest processing time (LPT) rule. The selection of this
rule is based on the aim to minimize process makespan [9]. The steps of simulation were given
below:
Step 1:Initialization, read part number processing time, set machines load as zero. Step
2:Apply LPT rule to sort part number based on its first stage processing time.
Step 3:Read from the part number sorted list, starting from the first sequence on the list;
determine machines with the least load and select the particular machine (defined by the
machine number) as the job processor. Update the load for the chosen machine by adding part
processing time to its current load.
Step 4:Based on the machine number selected on step 3, check on the current availability of
the machine (whether it is currently processing another job). If it is available, select the
machine as destination point and go to step 7, else go to step 5.
Step 5:Based on the machine number selected on step 3, check on the availability of incoming
buffer at the machine (whether it is occupied by another job). If it is available, select the
incoming buffer of the machine as destination point and go to step 7, else go to step6.
Step 6:Based on the machine number selected on step 3, check on the availability of its
dedicated pallet stocker (whether it is occupied by another job). If it is available select the
pallet stocker of the machine as destination point and go to step 7, else wait until one of the
condition mentioned on step 4, 5 and 6 are met.
Step 8: Stacker crane will create request list, and answer the request based on its priority rule.
Starting from the first job on the list, stacker crane would read the destination point and deliver
jobs accordingly. Any requests conducted during the delivery process were recorded on the
stacker crane request list. After delivering jobs, stacker crane will pause and read its request list
to determine the next pick up location. If there are no other request it will then parked on the
last deliverydestination.
Step 9: For part at the destination machine, read the data from table 1 and begin processing
time. Update machine availability status from available to unavailable.
Step 10:For part at the machine. At the end of processing time, entity is routed to machine
outgoing buffer. Update machine availability status from unavailable to available.
Step 11: For part at the outgoing buffer, read the data and determine whether there is stage 2
processing or not. If yes, loading/unloading will be selected as destination point, else pallet
stocker will be selected as destination point. Go to Step7.
Step 12:Checks whether all jobs has been processed, if yes, go to step 13, else, go back to step
3.
Step 13: Calculate the makespan of the process.

Experiment No. 10
Objective : Simulation of manufacturing system

Introduction :
The most important objective of simulation in manufacturing is the understanding of
the change to the whole system because of some local changes. It is easy to understand
the difference made by changes in the local system but it is very difficult or impossible
to assess the impact of this change in the overall system. Simulation gives us some
measure of this impact. Measures which can be obtained by a simulation analysis are:
 Parts produced per unit time
 Time spent in system by parts
 Time spent by parts in queue
 Time spent during transportation from one place to another
 In time deliveries made
 Build up of the inventory
 Inventory in process
 Percent utilization of machines and workers
Simulation is used to address some issues in manufacturing as follows: In workshop to
see the ability of system to meet the requirement, To have optimal inventory to cover
for machine failures.

Methods :
Simulators were more user friendly but they came with rather rigid templates that
didn’t adapt well enough to the rapidly changing manufacturing techniques. Nowadays,
there is software available that combines the flexibility and user friendliness of both,
but still some authors have reported that the use of this simulation to design and
optimize manufacturing processes is relatively low.

One of the most used techniques by manufacturing system designers is the discrete
event simulation. This type of simulation allows to assess the system’s performance by
statistically and probabilistically reproducing the interactions of all its components
during a determined period of time. In some cases, manufacturing systems modelling
needs a continuous simulation approach. These are the cases where the states of the
system change continuously, like, for example, in the movement of liquids in oil
refineries or chemical plants. As continuous simulation cannot be modeled by digital
computers, it is done by taking small discrete steps. This is a useful feature, since there
are many cases where both, continuous and discrete simulation, have to be combined.
This is called hybrid simulation,[8] which is needed in many industries, for example,
the food industry.

A framework to evaluate different manufacturing simulation tools was developed by


Benedettini & Tjahjono (2009) using the ISO 9241 definition of usability: “the extent
to which a product can be used by specified users to achieve specified goals with
effectiveness, efficiency, and satisfaction in a specified context of use.” This
framework considered effectiveness, efficiency and user satisfaction as the three main
performance criterion as follow:

Performance criterion Usability attributes


Effectiveness Accuracy: Extend to which the quality of
the output corresponds to the goal
Efficiency Time: How long users take to complete
tasks with the product
Mental effort: Mental resources users need
to spend on interaction with the product
User satisfaction Ease of use: General attitudes towards the
product
Specific attitudes: Specific attitudes towards
or perception of the interaction with the tool

The following is a list of popular simulation techniques:


 Discrete event simulation (DES)
 System dynamics (SD)
 Agent-based modelling (ABM)
 Intelligent simulation: based on an integration of simulation and artificial intelligence (AI)
techniques
 Petri net
 Monte Carlo simulation (MCS)
 Virtual simulation: allows the user to model the system in a 3D immersive environment
 Hybrid techniques: combination of different simulation techniques
Applications :
The following is a list of common applications of simulation in manufacturing:
Number in Application Simulation type Description
Figure usually used
1 Assembly line DES Design and
balancing balancing of
assembly lines
2 Cellular Virtual simulation Comparing
manufacturing planning and
scheduling in CM,
comparing
alternative cell
formation
3 Transportation DES, ABS, Petri Finished products
management net delivery from
distribution centers
or plants, vehicle
routing, logistics,
traffic
management,
congestion pricing
4 Forecasting SD Comparing
different
forecasting models
5 Just in time DES Design of Kanban
systems
6 Resource allocation DES Allocating
equipment to
improve process
flows, raw
materials to plants,
resource selection
7 Scheduling DES Throughput,
reliability of
delivery, job
sequencing,
production
scheduling,
minimize idle time,
demand, order
release

You might also like