Modelling and Simulation
MPW331
Lecture 03
Simulation Tools and Techniques
Dr. Eng. Mohamed Elsabahy
Ph.D. Energy Resources Engineering
Email: [email protected]
Course Content
1. Introduction to 2. Simulation Tools 3. Bond Graph 4. System Models
Modeling and Techniques Modeling for Various Domains
5. Multi-Domain 6. System Dynamics 7. Frequency 8. Simulink for
System Models and Response Response Analysis System Simulation
10. Parameter
9. Model
Estimation and 11. Introduction to
Verification and
System Optimization
Validation
Identification
Modelling and Simulation MPW327
(Bylaw Breakdown)
Lecture Outline
1- Introduction to Modelling
2- Examples of models
3- Modeling of Dynamic Systems
4- Introduction to Simulation
5- MATLAB as a Simulation tool
4- Introduction to Simulation Introduction
❑ Mathematical models of dynamic physical systems have been developed since the invention of
differential equations.
❑ However, these equations could not be analyzed due to the lack of computational devices.
❑ The prediction of dynamic behavior was limited to low-order linear models, and even these
predictions were not accurate.
4- Introduction to Simulation Simulation Definition
❑ Simulation refers to the procedure of solving the equations that form a model.
❑ For example, it involves numerically solving a set of differential equations with different initial or
boundary conditions, such as:
❑ A simulation of a system refers to the operation of a model, which is a representation of that
system.
❑ The model allows for manipulation that would be impossible, too expensive, or impractical to
perform on the actual system.
❑ By studying the operation of the model, properties concerning the behavior of the real system can
be inferred.
4- Introduction to Simulation Simulation Technique
❑ For a given mathematical model, it is sometimes possible to derive information about the system using
analytical methods.
❑ When analytical methods are not possible, numerical computation methods are used to solve the
equations.
❑ Analytical solutions are general, while numerical methods produce solutions in steps.
❑ Each step gives a solution for one set of conditions, and calculations must be repeated to expand the solution
range.
❑ Dynamic models can sometimes be solved analytically.
❑ When solving numerically, a simulation must be done by solving the model's equations step by step with
increasing time values.
❑ The current values at any step of computation represent the system's state at that specific point in time.
4- Introduction to Simulation System Simulation
❑ System Simulation is the technique of solving problems by observing the performance of a dynamic model
of the system over time.
❑ This definition also includes dynamic physical models, where results are obtained from actual
measurements rather than numerical computation.
4- Introduction to Simulation Comparison of Simulation and Analytical Methods
Aspect Analytical Method Simulation
Solution Type Gives a general solution. Provides a specific solution for each set of conditions.
Automobile motion: Analytical solution gives all conditions Automobile motion: Each simulation indicates whether the car
Example
that can cause oscillations. will oscillate for a specific set of conditions.
Preferable when seeking a solution for maximizing a
Applicability Requires multiple simulation runs to find a maximum value.
condition.
Evaluation Analytical results may involve complex series or integrals
Simulation is quicker and easier for deriving results.
Complexity requiring extensive evaluation.
A single mathematical solution can address broader To get a broader understanding, multiple simulations are
Scope
conditions. required.
Global vs Local Analytical methods can identify whether a solution is a Simulation may find a maximum but cannot always determine if
Maximum global maximum. it's global or local.
Can be complex and time-consuming due to the
Speed and Ease Faster and simpler to run compared to analytical methods.
mathematical nature.
4- Introduction to Simulation Experimental Nature of Simulation
❑ Simulation is an experimental problem-solving technique.
❑ Multiple simulation runs are conducted to understand the relationships within the system.
❑ The use of simulation in a study should be planned as a series of experiments to effectively grasp the
system's behavior.
4- Introduction to Simulation Simulation Types
4- Introduction to Simulation Simulation Process
Description of the Problem
• Clearly define the problem that needs to be addressed through simulation.
Definition of the Model
• Create a mathematical or conceptual model representing the system.
Simulate or Use Analytical Methods
• Decide whether to use simulation or analytical methods for the analysis.
Plan Study (if simulating)
• Develop a detailed plan for how the simulation study will be conducted.
Write a Program
• Implement the model in a programming language or simulation software.
Validate the Model
• Ensure the model accurately represents the real-world system.
Run Simulations
• Execute the simulation. If results are not satisfactory, increase the number of runs or adjust parameters.
Verify Results
• Analyze the simulation results to confirm their validity and reliability.
4- Introduction to Simulation Simulation Software
Classification of Simulation Software
❑ General-Purpose:
• Software used for a variety of simulation applications across different domains.
❑ Application-Oriented:
• Software tailored for specific industries or types of problems (e.g., healthcare, manufacturing).
Modeling Approaches
❑ Event-Scheduling Approach:
• Focuses on the timing of events and the state changes they trigger in the system.
❑ Process Approach:
• Emphasizes the flow of processes and their interactions over time.
4- Introduction to Simulation Simulation Software
Desirable Software Features
❑ Modeling Flexibility and Ease of Use:
• Ability to easily modify and adapt the model to different scenarios, along with a user-friendly interface.
❑ Hardware and Software Constraints:
• Consideration of system requirements and compatibility with existing infrastructure.
❑ Animation:
• Visual representation of the simulation to enhance understanding and communication of results.
❑ Statistical Features:
• Tools for analyzing data and generating statistical reports from simulation outcomes.
❑ Customer Support and Documentation:
• Availability of user guides, tutorials, and technical support to assist users.
❑ Output Reports and Plots:
• Capabilities for generating comprehensive reports and graphical representations of simulation results.
4- Introduction to Simulation Simulation Advantages and
Disadvantages
Advantages to Simulation Disadvantages to Simulation
Can study existing systems without disrupting ongoing Model building is both an art and a science,
operations. requiring skill and expertise.
Proposed systems can be tested before committing The quality of analysis depends on the quality of the
resources. model and the modeler’s skill.
Allows control over time, enabling faster or slower Simulation results can sometimes be hard to
analysis of the system's behavior. interpret.
Simulation analysis can be time-consuming and
Helps identify bottlenecks in a system.
expensive.
Provides insight into which variables are most critical to Should not be used when an analytical method
system performance. would yield quicker results.