80 views

Original Title: Toy Train

Uploaded by Draveilois

- E101.docx
- Evolution in Science and Religion - Robert Andrews Millikan
- BioGuide Dome 0
- Syllabus Format
- Lecture 9
- Takagi-Sugeno-Kang Fuzzy Structures in Dynamic System Modeling
- Unit 1 Test Physics
- 2. Science Formulae
- IEEE Xplore Download
- Dynamics Lab Intro New Version
- Phy Lab Rep 2.1 Linear Airtrack
- Engineering Mechanics for Civil Engr.
- Has Science Made Nature and Life Complex as Religions Made God Complex
- hw01 Linear system controls
- Automation and control lecture
- Life Evolution Universe Lecture Notes - AUC
- M1 Specimen Paper and Mark Scheme
- 能量守恒定律为唯一源定律的新牛顿力学修改稿2En.doc
- M1G
- 11. KOp Force n Acceleration

You are on page 1of 6

Mechanical System

We will consider a toy train consisting of an engine and a car as shown in Figure

1. Assuming that the train only travels in one direction, we want to apply control

to the train so that it has a smooth start-up and stop, along with a constant-speed

ride. The mass of the engine and the car will be represented by m1 and m2,

respectively. The two are held together by a spring, which has the stiffness

coefficient of k. F represents the force applied by the engine, and µ represents the

coefficient of rolling friction.

Engine Car

The system can be represented by the free body diagram shown in Figure 2.

x1 x2

k (x1 – x2)

F m1 m2

k (x1 – x2)

dx1 dx2

µ m1 g µ m2 g

dt dt

It is known from Newton’s law that the sum of forces acting on a mass equals the

mass times its acceleration. In this case, the forces acting on m1 are the spring, the

friction and the force applied by the engine. The forces acting on m2 are the

spring and the friction. In the vertical direction, the gravitational force is canceled

1

by the normal force applied by the ground, so that there will be no acceleration in

the vertical direction. We will begin to construct the model from the following

expression

∑ F1 = m1a (1)

∑ F2 = m2 a

The equations of motion in the horizontal direction are as follows:

d 2 x1 dx

m1 2

= F − k ( x1 − x2 ) − µm1 g 1

dt dt

d 2 x2 dx

m2 = F − k ( x1 − x2 ) − µm2 g 2

dt 2 dt

1. Open a Simulink new model window (Simulink library browser).

2. Math Operations -> Sum blocks, drag two of them, label as Sum_F1

and Sum_F2.

3. Commonly Used Blocks -> Gain, drag two of them, attach each one with

a line to the outputs of the Sum blocks, label as a1 and a2.

4. Double click the Gain blocks and change the variables to 1/M1 for a1,

and 1/M2 for a2.

5. Resize the Gain blocks by dragging the small squares at the corners to

stretch the block.

6. Re-align the blocks to modify the display.

7. Commonly Used Blocks -> Integrator, drag two for each of the

accelerations, label as v1, x1, v2 and x2.

8. Sinks -> Scopes, drag two of them, one for each integrator, label as

View_x1 and View_x2.

9. Add in one more force input to Sum_F1, double click the Sum block,

change list of signs to be “+++”.

10. Souces -> Signal Generator, drag one and connect to Sum_F1, label as

F.

11. Commonly Used Blocks -> Gain, drag one and connect to Sum_F1 (sign

of the input of Sum_F1 should be “-”), label as Friction_1, change the

variable to be “mu*g*M1”.

12. Math Operations -> Sum blocks, drag one of it at the bottom, label as

x1-x2.

2

13. Right click the block, select Format -> Flip Block, change the signs to

“-+”.

14. Connect x2 to the negative input, and connect x1 to the positive input.

(No dot means no actual crossing.)

15. Commonly Used Blocks -> Gain, drag one and connect to the output of

the x1-x2, label as spring, and change the variable to be k.

16. Connect the output of the spring to the third input of the Sum_F1, and

change the signs to “+--”.

17. Connect the output of the spring to the first input of the Sum_F2.

18. Commonly Used Blocks -> Gain, drag one and connect to Sum_F2 (sign

of the input of Sum_F2 should be “-”), label as Friction_2, change the

variable to be “mu*g*M2”.

19. Sinks -> Scopes, drag one and connect to v1, label as View_v1.

20. Save as “train.mdl”.

Before running the model, we need to assign numerical values to each of the

variable used in the model. For the train system, let

• M1 = 1 kg

• M2 = 0.5 kg

• k = 1 N/sec

• F= 1 N

• u = 0.002 sec/m

• g = 9.8 m/s^2

M1=1;

M2=0.5;

3

k=1;

F=1;

mu=0.002;

g=9.8;

2. Save as “variables.m”

MATLAB command window. Simulink will recognize MATLAB

variable for use in the model.

4. Give an appropriate input to the engine. Double-click on the function

generator (F block). Select a square wave with frequency .001Hz and

amplitude -1.

5. Select an appropriate simulation time. Select from menu Simulation ->

Parameters, change the Stop Time field to 1000. (Simulate for 1000

seconds.)

6. Run the simulation and open the View_v1 scope to examine the velocity

output (hit autoscale). 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.

out SIMULINK model.

1. Delete the View_v1 scope, Connections -> Out Block, drag and replace.

4

2. Delete the F function Generator block, Connections -> In Block, drag

and replace.

3. Save as “train2.mdl”.

4. Extract the model into MATLAB. Enter the following command at the

MATLAB command window to extract a state-space model.

[A,B,C,D]=linmod(‘train2’)

A=

0 -0.0196 -2.0000 2.0000

0 1.0000 0 0

1.0000 0 0 0

B=

1

0

0

0

C=

5

1 0 0 0

D=

MATLAB command prompt.

[num,den]=ss2tf(A,B,C,D)

Output of a transfer function of the train system should be seen as below:

num =

den =

- E101.docxUploaded byJon Luie V. Masilang
- Evolution in Science and Religion - Robert Andrews MillikanUploaded byJorge Bustamante
- BioGuide Dome 0Uploaded byKwok Chung Chu
- Syllabus FormatUploaded byzakibrant23
- Lecture 9Uploaded byLisa Koy
- Takagi-Sugeno-Kang Fuzzy Structures in Dynamic System ModelingUploaded byrafa_mas
- Unit 1 Test PhysicsUploaded byMaristela Paraan Macaranas
- 2. Science FormulaeUploaded byNoel Cunningham
- IEEE Xplore DownloadUploaded byAbhishek Singh
- Dynamics Lab Intro New VersionUploaded byHaFiy HaZim
- Phy Lab Rep 2.1 Linear AirtrackUploaded byMGunNicholas
- Engineering Mechanics for Civil Engr.Uploaded byClara Ogladit
- Has Science Made Nature and Life Complex as Religions Made God ComplexUploaded byJohn Paily
- hw01 Linear system controlsUploaded byAnselm Adrian
- Automation and control lectureUploaded bySamujawal Kumar Suman
- Life Evolution Universe Lecture Notes - AUCUploaded byAlejandro Verde
- M1 Specimen Paper and Mark SchemeUploaded byjayesh1997
- 能量守恒定律为唯一源定律的新牛顿力学修改稿2En.docUploaded byfuyh1945
- M1GUploaded byapi-3824743
- 11. KOp Force n AccelerationUploaded byJim Agcaoili Linda
- Gravitation Force Calculator Using CppUploaded byAmandeep Singh
- jeopardy- force and motionUploaded byapi-270681330
- 08217364Uploaded bySaddam Hussain
- Newton’s Law of Motion 2Uploaded byTika Ayu Kusuma
- Data Processing Magnetics (1)Uploaded byRoland Rawlins Igabor
- Modeling of Electrical SystemsUploaded byMohamedElsawi
- m7l13.pdfUploaded byPradip Gupta
- proof of efficacyUploaded byapi-375748727
- Lecture_2_web.pdfUploaded byMayur Mistry
- Answers to ACTIVITY 2.1Uploaded byRed Gallego

- Torque LimiterUploaded byDraveilois
- Maxwell on the Electromagnetic Field - A Self Guided StudyUploaded byDraveilois
- Rocket Engine Valve Poppet & Seat Design Data.pdfUploaded byDraveilois
- Design and Simulation of Two-Stroke EnginesUploaded byndlongnd
- PulleysUploaded byDraveilois
- Steam Powered Catapult 1Uploaded byDraveilois
- NASA Electronic Position Indicator for Latching Solenoid ValvesUploaded byDraveilois
- Design of Human Powered Vehicles (Bicycle Drive Train)Uploaded byDraveilois
- Door Closer Comprising Device for Preventing a Spring BackUploaded byDraveilois
- Thread Relief DesignUploaded byDraveilois
- Theory and Technology of Laser Imaging Based Target DetectionUploaded byDraveilois
- Some Problems of Fatigue of Bolts & Bolted Joints in Aircraft ApplicationsUploaded byDraveilois
- Essentials of Aircraft ArmamentsUploaded byDraveilois
- Exercises for Fourier AnalysisUploaded byDraveilois
- Steam Powered CatapultUploaded byDraveilois
- US Navy Course NAVEDTRA 14050 - Construction Mechanic, AdvancedUploaded byGeorges
- The Silk Road to RichesUploaded byDraveilois
- The Computation of Shakedown Limits for Structural Components Subjected to Variable Thermal LoadingUploaded byDraveilois
- 14.pdfUploaded byDraveilois
- Leak Detection Technology & ImplementationUploaded byDraveilois
- E ResumeUploaded byDraveilois
- 17Uploaded byDraveilois
- Experimental Modal Analysis of a Steel Grid FrameUploaded byDraveilois
- A Theory of Flight Flutter TestingUploaded byDraveilois
- 13.pdfUploaded byDraveilois
- 16.pdfUploaded byDraveilois
- f0 for Plastic Bending (1)Uploaded bybatmanbittu
- Landing GearUploaded byAktham Al-riyami
- 15.pdfUploaded byDraveilois
- Stress Concentration FactorUploaded byDraveilois

- Patilladoras Tex p60 - p90Uploaded byErik Mauricio Quico Ale
- Asympttic Ntaions 7 Insertin SortUploaded bym1u2n3n4i5
- CONTRIBUTIONS TO DIFFERENTIAL GEOMETRY OF SPACELIKE CURVES IN LORENTZIAN PLANE L2Uploaded byMia Amalia
- Excitation control of the synchronous generator.pdfUploaded byvelasquuez1993
- Comparative Study of Switching Losses of IGBTsUploaded byCata
- frosilda pushani and rachelle buna cuboUploaded byapi-310796915
- Common Laboratory ApparatusUploaded byFaye Tancinco
- Disc ReductionUploaded byrapannika
- 3 Point StarterUploaded bysuryavigne
- Books for GateUploaded bysantosh290
- Measurement Requirements in Product StandardsUploaded byAnonymous fGUP5h2A
- Hydroxyapatite-supported Ag–TiO2 as Escherichia coliUploaded bymanutd01
- Electricity Show2Uploaded byVicky Lakhwal
- C-03 Redox Reactions & Electrchemistry-2Uploaded bySantanu
- MS9483CUploaded byBryan Martinez
- EN1537-ground-anchorsUploaded byGeorg Vatsellas
- BS-3923-2 ut examinUploaded byNihat Şuvak
- 10.1.1.454.2013.pdfUploaded byantoniosanda
- DEsign, cons and maintenance RP].pdfUploaded byShiba Shankar
- Preparacion de PQR´s.pdfUploaded byPercyFlores
- Titanium1.pptxUploaded byTejas Kumar
- JAPEDv1Uploaded byKunal Singh
- Rosturi de Dilatare-DINACUploaded bynasuemil
- Psychedelic Information TheoryUploaded byStefan Detrez
- Physics ReviewerUploaded byZet Disquitado
- Haemonetics PCS2 - Operation ManualUploaded byEmerson Ceras Dávila
- CERNEY Training CourseUploaded byJose Hurtado
- Distribution Transformer Thermal AgingUploaded byGlenn Adalia Bonita
- Anhydride Theory - Warren HuntUploaded byzaroia
- 2011 Air Quality and Public Health Impacts of UK Airports. Part I - EmissionsUploaded byAlexander Koulidis