Simulink Modelling Tutorial In Simulink, it is very straightforward to represent a physical system or a model. In general, a dynamic system can be constructed.

Slides:



Advertisements
Similar presentations
1 Application Software Course Simulink By: Mahdi Akbari 2010.
Advertisements

1 1 Mechanical Design and Production Dept, Faculty of Engineering, Zagazig University, Egypt. Mechanical Design and Production Dept, Faculty of Engineering,
Click here to enter. Click a menu option to view more details Starters Main Courses Desserts Click on the coffee cup to return when Navigating For Vocabulary.
For System Dynamics & Control
System Dynamics, Third Edition
The robot structure model design 2 Curse 5. Modeling: the robot AcTrMStTk V(t) T(t)  (t) q(t) x(t)
 Dynamics – Atwood Machines / SBA urses/honors/dynamics/Atwood.html.
Getting started with Simulink An introductory tutorial ES205 Analysis and Design of Engineering Systems Rose-Hulman Institute of Technology © R. Layton.
System Dynamics, Third Edition
1 A Tool for System Simulation: SIMULINK Can be used for simulation of various systems: – Linear, nonlinear; Input signals can be arbitrarily generated:
Dynamics Why and how an object moves? Newton’s Laws.
SIMULINK Dr. Samir Al-Amer. SIMULINK SIMULINK is a power simulation program that comes with MATLAB Used to simulate wide range of dynamical systems To.
HossamTalaat - MATLAB Course - KSU - 21/1/24 1 IEEE Student Branch - College of Engineering - KSU Getting started with Simulink By Prof. Hossam Talaat.
Simulink ® From Simulink® 7 Getting Started Guide.
Using Simscape™ for Modeling Vibration Problems:
Newtons laws of motion Sir Isaac Newton (1642 – 1727) played a significant role in developing our idea of Force. He explained the link between force and.
Introduction to Simulink Dr. Mohammed F. Alsayed.
Simulink SubSystems and Masking April 22, Copyright , Andy Packard. This work is licensed under the.
Control Theory Lab 4 Modeling of Physical-SİMULİNK.
Energy Transformations and Conservation of Mechanical Energy 8
ECEN/MAE 3723 – Systems I MATLAB Lecture 2. Lecture Overview What is Simulink? How to use Simulink  Getting Start with Simulink  Building a model Example.
Equations for Projectile Motion
Linear Impulse & Linear Momentum Lecture VIII. Introduction From Newton ’ s 2 nd Law:  F = m a = m v. = d/dt (m v) The term m v is known as the linear.
Regensburg, 24. – Introduction to Simulink Pavel Karban University of West Bohemia, Faculty of Electrical Engineering, Department of Theory.
Introduction to Matlab Module #9 Page 1 Introduction to Matlab Module #9 – Simulink Topics 1.Simulink Textbook Reading Assignments Practice Problems.
Introduction to MATLAB for Engineers Third Edition William J. Palm III Chapter 10 Simulink PowerPoint to accompany Copyright © The McGraw-Hill Companies,
SIMULINK-Tutorial 1 Class ECES-304 Presented by : Shubham Bhat.
Department of Mechanical Engineering, LSUSession VII MATLAB Tutorials Session VII Introduction to SIMULINK Rajeev Madazhy
DC Motor Speed Modeling in Simulink
EE3417 – Introduction to Simulink
Lecture 6: Time Response 1.Time response determination Review of differential equation approach Introduce transfer function approach 2.MATLAB commands.
Simulink Simulink is a graphical extension to MATLAB for modeling and simulation of systems. In Simulink, systems are drawn on screen as block diagrams.
INTRODUCTION TO SIMULINK by Yasmin Hanum Md Thayoob & Aidil Azwin Zainul Abidin.
Simulink  ? 1 Simulink  ( Simu lation and Link ) is an extension of Matlab Offers modeling, simulation, and analysis of dynamical systems; i.e., a system.
Agenda Aim: SWBAT recognize kinetic energy is related to momentum by the end of today’s lesson. Tasks: Kinetic Energy and Momentum PPT notes Example Problems.
Spring 2002 Lecture #18 Dr. Jaehoon Yu 1.Simple Harmonic Motion 2.Energy of the Simple Harmonic Oscillator 3.The Pendulum Today’s Homework Assignment.
MATLAB and SimulinkLecture 21 To days Outline Introduction to Simulink Block diagrams Building models Exercises on today’s topics.
+. + Bell Ringer A shopping cart is being accelerated across the floor. What forces are acting on the shopping cart? Draw a diagram representing these.
Today: (Ch. 3) Tomorrow: (Ch. 4) Apparent weight Friction Free Fall Air Drag and Terminal Velocity Forces and Motion in Two and Three Dimensions.
Modeling First Order Systems in Simulink And Analyzing Step, Pulse and Ramp Responses SOEN385 Control Systems and Applications.
HossamTalaat - MATLAB Course - KSU - 17/08/14231 IEEE Student Branch - College of Engineering - KSU Getting started with Simulink (part 2) By Prof. Hossam.
Getting started with Simulink
Getting started with Simulink An introductory tutorial.
Harmonic Motion AP Physics C.
WORKSHOP 1 CO-SIMULATION.
- Graphical extension to MATLAB for modeling and simulation of systems
Physics 1 – Oct 27, 2016 P3 Challenge –
Damped Forced Vibrations Analysis Using CAMP-G® and Simulink® Modeled Solutions to Problem (
12.1 Momentum Momentum is a property of moving matter.
ECEN/MAE 3723 – Systems I MATLAB Lecture 2.
Work Done by a Constant Force
Different kinds of energy
Laws of Motion Friction and Drag
Simulink Basics Reijo Vuohelainen
RECTANGULAR COORDINATES
Ch. 5 slides Forces.ppt.
Before we begin… enjoy the break.
Physics 1 – Oct 28, 2016 P3 Challenge –
Getting Started With Simulink
Example Problems for Newton’s Second Law Answers
Step 1: Get Organized Draw a picture.
Unit 1 Our Dynamic Universe Newton’s Laws
How to draw, read, and work with free body diagrams.
AS-Level Maths: Mechanics 1 for Edexcel
VIBRATION.
VIBRATION.
NEWTON'S THIRD LAW OF MOTION.
Physics 1 – Nov 1, 2018 P3 Challenge –
Work and Kinetic Energy
Presentation transcript:

Simulink Modelling Tutorial In Simulink, it is very straightforward to represent a physical system or a model. In general, a dynamic system can be constructed from just basic physical laws. We will demonstrate through some examples. We begin by demonstrating the train model as below

Train system The train consists of an engine and a car. We assume that the train only travels in one direction The mass of the engine and the car will be represented by M1 and M2, respectively. The two are held together by a spring with stiffness k. (F) is the force of the engine, (µ) represents the coefficient of rolling friction. We want to apply control to the train so that it has a smooth start-up and stop, along with a constant-speed ride.

Free body diagram and Newton's law The system can be represented by following Free Body Diagrams. By Newton's law: the sum of forces on a mass = the mass x acc’n

The Equations of Motion Sum(forces_on_M 1 )=M 1 *x 1 ” Or F – k(x 1 -x 2 ) - µ.M 1. g.x 1 ’= M 1.x 1 ” Or x 1 ” = 1/M 1 (F – k(x 1 -x 2 ) - µ.M 1. g.x 1 ’) The red represents the summation of all forces, hence we need to employ a summation box in Simulink and Sum(forces_on_M 2 )=M 2 *x 2 ” Or k(x 1 -x 2 ) - µ.M 2. g.x 2 ’= M 2.x 2 ’’ Or x 2 ” = 1/M 2 (k(x 1 -x 2 ) - µ.M 2. g.x 2 ’) The red represents the summation of all forces, hence we need to employ a summation box in Simulink

Graphical Representations Open a new model window, and drag two Sum blocks (from the Linear library), one above the other. Label these: "Sum_F1" and "Sum_F2". The outputs of each of these Sum blocks represents the sum of the forces acting on each mass. Multiplying by 1/M will give the acceleration.

Add the Gains Drag two Gain blocks into your model and attach each one with a line to the outputs of the Sum blocks Double-click on the upper Gain block and enter 1/M1 Similarly, change the second Gain block to 1/M2

Enlarge each gain to show its expression Also, label these two Gain blocks "a1" and "a2".

Adding Integrators a1 & a2 are the accelerations Integrating the accel’n, gives the velocities (v1 & v2) Integrating v1 & v2 gives the disp’t (x1 & x2) So we add 4 integrator blocks 1/s and labels to blocks

Adding Scopes to view output Now, drag two Scopes from the Sinks library into your model and connect them to the outputs of these integrators. Label them "View_x1" and "View_x2".

Adding the Forces Now we are ready to add in the forces acting on each mass. First, you need to adjust the inputs on each Sum block to represent the proper number of forces. There are a total of 3 forces acting on M1, so change the (Sum_F1) block's dialog box entry to: +++ There are only 2 forces acting on M2, so we can leave Sum_F1 alone for now

The diagram now looks like this:

Adding the driving force (F) The first force acting on M1 is just the input force, F. Drag a Signal Generator block from the Sources library and connect it to the uppermost input of the (Sum_F1) block. Label the Signal Generator "F".

Adding the friction force on M1 This force is equal to: µ*g*M1*v1 Tap off the velocity signal and multiply by a gain, (µ*g*M1). Drag a Gain block into your model window. and connect it to the v1 integrator Connect the output of the Gain block to the second input of (Sum_F1). Change the gain of this gain block to (µ*g*M1) Re-size and label the gain block (Friction_1). This force, however, acts in the negative x1-direction. So, it must come into the (Sum_F1) block with negative sign. Change the list of signs of (Sum_F1) to (+-+). The diagram now looks like:

Adding the Spring Force The last force acting on M1 is the spring force between masses. This is equal to: k*(x1-x2) First, we need to generate (x1-x2) which we can then multiply by (k) to generate the force. Drag a Sum block below the rest of your model & label it "(x1-x2)" and change its list of signs to (-+) Since this summation comes from right to left, we need to flip the block around. Select the block by single- clicking on it and select Flip from the Format menu (or hit Ctrl-F). Now, tap off the x2 signal and connect it to the negative input of the (x1-x2) Sum block. Tap off the x1 signal and connect it to the positive input. You should see the following:

Continue adding the spring force Now, we multiply (x1-x2) by (k) to get the spring force. Drag a Gain block into your model to the left of the Sum blocks, change it's value to (k) and label it "spring". Connect the output of the (x1-x2) block to the input of the spring block, and the output of the spring block to the third input of (Sum_F1). Change the third sign of Sum_F1 to negative (use +--). Now the diagram looks like this:

Adding the spring force to M2 Now, we can apply forces to M2. For the first force, we will use the same spring force we just generated, except that it adds in with positive sign. Simply tap off the output of the spring block and connect it to the first input of Sum_F2.

Adding the Friction force on M2 The last force to add in the friction on M2. Tap off v2, multiplying by a gain of ( µ *g*M2) and add to (Sum_F2) with negative sign. We get the following:

Final Touches Now the model is complete. We simply need to supply the proper input and view the proper output. The input of the system will be the force, F, provided by the engine. We already have placed the function generator at the input. The output of the system will be the velocity of the engine. Drag a Scope block from the Sinks block library into your model. Tap a line off the output of the "v1" integrator block to view the output. Label the scope "View_v1".

Final Diagram The model is complete. Save your model.

Running the Model Before running the model, we need to assign numerical values to each of the variables used in the model. For the train system, let M1 = 1 kg M2 = 0.5 kg k = 1 N/sec F= 1 N u = sec/m g = 9.8 m/s^2 Create an new m-file and enter the following commands. M1=1; M2=0.5; k=1; F=1; mu=0.002; g=9.8; Save and execute your m-file to define these values. Simulink will recognize MATLAB variables for use in the model.

Force Input for Engine Now, we need to give a suitable input to the engine. Double- click on the function generator (F block) and select a square wave with frequency.001Hz and amplitude -1 (positive amplitude steps, negative before stepping positive).

Decide on the Simulation Time The last step before running the simulation is to select a suitable simulation time. To view one cycle of the.001Hz square wave, we should simulate for 1000 seconds. Select Parameters from the Simulation menu and change the Stop Time field to Close the dialog box. Now, run the simulation and open the (View_v1) scope to examine the velocity output (hit auto-scale). The input was a square wave with two steps, one positive and one negative. Physically, this means the engine first went forward, then in reverse. The velocity output reflects this.

Velocity Output After running the simulation, we get the following trace for the velocity output: