Home

Working Model 2D Tutorial

image

Contents

1. Working Model Tutorial 4 O00 2 000 0 000 2 O00 Working Model 2D Version 4 0 for Windows 95 Windows NT and Mac OS Tutorial Guide Knowledge Revolution lt A d Information in this document is subject to change without notice and does not represent a commitment on the part of Knowledge Revolution The software described in this document is furnished under a license agreement or non disclosure agreement The software may be used or copied only in accordance with the terms of the agreement It is against the law to copy the software on any medium except as specifically allowed in the license or non disclosure agreement No part of this manual may be reproduced or transmitted in any form or by any means electronic or mechanical including photocopying and recording for any purpose without the express written permission of Knowledge Revolution Copyright Knowledge Revolution 1989 1996 All rights reserved Published and printed in the U S A Portions 1992 1996 Summit Software Company Knowledge Revolution the Knowledge Revolution logo Interactive Physics Interactive Physics II Fun Physics Interactive Physics Player Smart Editor and Knowledge Revolution Working Model are trademarks of Knowledge Revolution Working Model is a registered trademark of Knowledge Revolution Working Model Basic and WM Basic are trademarks of Knowledge Revolution Apple and Macintosh
2. Roof2 x 13 Column 75 Ibs 5 5 23 10 x 1 5 Column 50 bs 10 x 1 5 0 17 50 bbs 11 17 Creating the Columns To draw one column rectangle 1 Click the Rectangle tool in the Toolbar 2 Drag outa rectangle To size and position the rectangle 1 Select the column rectangle if it is not already selected 2 Click the X field of the Coordinates bar and enter 0 3 Tab to the Y field of the Coordinates bar and enter 17 4 Tab to the Height field of the Coordinates bar and enter 10 5 Tab to the Width field of the Coordinates bar and enter 1 5 3 14 Exercise 3 An Earthquake Simulation Figure 3 14 Theseconcstorycolumnsrplace To set the mass of the rectangle 1 Choose Properties from the Window menu 2 Click the Mass field and enter the value 50 Because the second story columns are identical the Duplicate command will be used to create the next column To duplicate the rectangle 1 Select the newly created column rectangle if it is not already selected 2 Choose Duplicate from the Edit menu A second rectangle appears Two columns must be placed on opposite ends of the first floor beam The rectangles will be positioned using the Coordinates bar To position the second column 3 Select the second column 4 Click the X field of the Coordinates bar and enter 11 5 Tab to the Y field of the Coordinates bar and enter 17 The column are now in their proper po
3. bution on the box g 0 000 vx 0 000 m s Vy 0 000 m s Ve 0 000 s material Standard bd mass O 015 kg stat fric 0 300 kin fric 0 300 elastic 0 500 charge 1 00e 4 C density 1 000 kg m 2 moment 1 16e 4 kg m 2 and the object list appears Body 1 Circle Body 8 Rectangle Body 9 Rectangle Constraint 3 Pin Joint Constraint 6 Left Follower Slot Constraint 12 Keyed Slot Joint Constraint 15 Keyed Slot Joint Constraint 20 Right Follower Slot Point 2 Point Point 4 Point Point 5 Curved Slot Point 10 Slot Point 11 Square Point Point 13 Slot Point 14 Square Point Point 16 Point Point 17 Point Point 18 Curved Slot t 3 Enter 0 in the x and y fields of the Coordinates bar to align the key point location with the Left Follower Slot The two slots are now positioned at the same location Attaching the Cam Followers to the Slots To attach each cam follower to respective slots 1 Using the Properties window selection pop up menu choose the Left Follower Slot 2 Shift select the point element attached to the left cam follower 3 Click the Join button in the Toolbar The left cam follower is now pinned to the curved slot 4 Choose the Right Follower Slot from the selection pop up 5 Shift select the point element located on the right cam follower 6 Click the Join button in the Toolbar Both followers are now attach
4. The name indicates that the slot is meant for the left cam follower Select the duplicated curved slot and enter Right Follower Slot in the name field of the Appearance window FOR ofa Curved Slot Figure 4 18 Coordinates bar displaying the frame of reference of a curved slot 4A Creating Cam Followers 4 17 In order to align the two curved slots you have to know how Working Model 2D keeps track of the position of slots Each slot has a frame of reference FOR that represents the location of the slot The Coordinates bar for a curved slot shows where the FOR is located Figure 4 18 The coordinates are measured with respect to the center of the body to which the slot is attached To bring the duplicated slot directly over the original slot 1 Verify the FOR coordinates for the original curved slot named Left Follower Slot The coordinates should be 0 0 2 From the selection pop up menu in the Properties window select the constraint named Right Follower Slot Figure 4 19 NOTE The number assignments shown in Figure 4 19 may be different from those in your model In addition on Windows systems the object names are truncated in the selection pop up display 4 18 Figure 4 19 Selection pop up in the Properties window ESS Properties i Body 9 Rec w Exercise 4 A Belt Driven Camshaft HEE BD Rectangle x _ _0 450 m Click and hold the mouse 0 000
5. 5 1 EXERCISE 5 Cruise Control using MATLAB 2 Value of Force X Force of Force XForce Erea 352m 3 932 m s a Value 6 390 6 390 Speed Enor 0128 EEEE FSSR eee abe In this model a control system monitors the speed of a vehicle and adjusts its throttle The above picture represents a vehicle moving over a hill Although the vehicle experiences a gravitational pull on the inclined track the control system attempts to keep the speed of the vehicle constant as specified by the control slider e Since this exercise uses a control system implemented in MATLAB you must have MATLAB version 4 2 or later which supports Dynamic Data Exchange DDE for Windows e The MacOS version of Working Model 2D supports the Apple Events Table Suite which is an external application interface protocol L At press time MATLAB 4 2 does not fully support DDE for Windows NT 3 51 5 2 Exercise 5 Cruise Control using MATLAB e This exercise is designed for use with DDE and Windows 95 If you are a MacOS user however you can still follow along with this exercise up to but not including the section Implementing the Control System on page 5 13 The exercise still contains useful ideas and tips for implementing Working Model 2D simulations You can also implement a similar control system on MacOS or Windows systems using a spreadsheet program such as Microsoft Excel although this methodology is not covered in the exercise The on
6. For now let s reset the vehicle to its original position 9 Click the Reset button in the Toolbar 5 4 Implementing the Control System Any control system can be thought of as a black box with a set of inputs and outputs The objective of any control system is to maintain a set of controlled properties of a dynamic system Typically the inputs to the controller consist of references specified by the user and measurements of the state of the dynamic system The outputs from the controller are fed to the driving components of the dynamic system 5 14 Exercise 5 Cruise Control using MATLAB In this particular example the controlled property is the speed not the velocity but its magnitude of the vehicle The inputs to the controller are the specified speed of the vehicle which is the reference and the speed error which is a signed difference between the reference and the vehicle s current speed The output of the control system is the throttle or the magnitude of the force used to propel the vehicle The flow diagram in Figure 5 12 describes the basic concept of our model Although the implementation will be slightly different the diagram concisely shows the underlying concept Figure 5 12 Flovdiagranotheontro ystem Design Specifics Figure 5 13 Schematic diagram of the control function 5 4 Implementing the Control System 5 15 Inputs Reference Control System Force Current nitude Speed Mag
7. In this case we will use WM Basic to run the simulation 5 times while varying a single parameter and gathering data in each run Automating this process with WM Basic is much more convenient and time effective than repeatedly altering the simulation manually The first thing you need to do is open a new script to write your code in All scripting commands need to be entered on separate lines so each time you re told to enter some text do so on a new line When finished your script should match Figure 6 12 Sub Main Dim Doc as WMDocument Bar as WMBody VelMeter as WMOutput Dim Max1 as Double FName as String Set Doc WM ActiveDocument Set Bar Doc Body CD Set VelMeter Doc Output UMax FName SaveFileName FileName IF FName Empty Then Exit Sub Open FName for Output As 1 For i 3 7 To 4 1 Step 6 1 Doc Reset Bar Height Value i Doc Run 41 Max1 VelMeter Column 2 Cell Value Print 1 Height i Max Velocity Max1 Next i Close 1 Doc Reset End Sub 1 Select Editor from the Script menu This automatically creates a new script for you to edit Before the script can access any of the Working Model 2D objects in your simulation you must specify which objects you want to address You do this by creating variables that hold the names of the objects In this case we re concerned with a Working Model 2D document one rectangle body one output meter that contains the max velocity
8. 2 Click once on the background drag to the right and click again to complete sketching A square appears on the screen To set the size of the piston 1 Click in the Height or Width field of the Coordinates bar and enter 200 Either field changes both the height and the width of the object so that it remains square To set the piston s mass 1 Select the piston if it not already selected 2 Choose Properties from the Window menu 3 Click in the mass field and enter the value 1 2 3 Creating the Components 2 7 Creating the Connecting Rod In this exercise the connecting rod is represented by a rectangle drawn with the Rectangle tool and sized using the Geometry window To approximate an actual connecting rod the rectangle will be given a mass of 2 kg a height of 500 mm and a width of 100 mm To draw the connecting rod 1 Choose the Rectangle tool in the Toolbar On MacOS systems the Square tool used above may have replaced the Rectangle tool in the Toolbar If so the Rectangle tool may be selected from the hidden pop up palette by clicking and holding on the Square tool in the Toolbar 2 Click once on the background drag to the right and click again to complete sketching A rectangle appears on the screen To set the mass of the connecting rod 1 Select the new rectangle if it not already selected 2 Choose Properties from the Window menu 3 Click in the Mass field and enter the value 2 To s
9. 2 Click the background and drag out a large rectangle For this exercise the shake table rectangle must be large Though its exact size is not important we will use a height of 10 and a width of 70 These dimensions will be set using the Coordinates bar To set the size of the rectangle 1 Select the shake table rectangle if it is not already selected 2 Click the Height field of the Coordinates bar and enter 10 3 Tab to the Width field of the Coordinates bar and enter 70 The rectangle is sized accordingly Zooming Out The rectangle will appear large after sizing To make the rectangle appear smaller and easier to manipulate 1 Click the Zoom Out tool in the Toolbar On MacOS systems the Zoom Out tool is hidden in the Zoom pop up palette by default Click and hold on the Zoom In tool to bring the pop up palette in view Figure 3 3 Figure 3 3 Zoonmop upalett VacOSnly Figure 3 4 The shake table after zooming out 3 3 Creating the Shake Table 3 5 2 Click on or near the rectangle You may need to click twice before the rectangle fits in the screen The Zoom Out tool reduces by a factor of two on each mouse click Scroll the window so that the rectangle is in the center of the screen as in Figure 3 4 below a 3 Click the Arrow tool or press the spacebar to deselect the Zoom Out tool Positioning the Shake Table For clarity the shake table will be centered h
10. Creating the Components 2 5 The Coordinates bar is located near the bottom of the window just above the tape player controls The Radius field x 1500 0 mm y 300 000 mr r 250 000 mm g 0 000 rad D C DE Zooming In The circle will appear small after sizing To make the rectangle easier to manipulate and appear larger the workspace will be magnified using the Zoom tool To zoom in 1 2 Click the Zoom In tool in the Toolbar Click near the circle The objects in the window are magnified by a factor of two with each click of the mouse To zoom out while the Zoom In tool is selected hold down the Shift key the magnifying glass pointer changes to and click Your screen should be similar to Figure 2 4 below 3 Click the Arrow tool in the Toolbar or press the spacebar to deselect the Zoom In tool 2 6 Exercise 2 A Piston Engine m Figure 2 5 Rectangle Square pop up palette MacOS only Creating the Piston For this exercise the piston will be modeled as an 200 mm square with the mass of 1 kg The Square tool will be used to draw the piston and the Properties window will be used to set its mass To draw the piston 1 Choose the Square tool in the Toolbar On MacOS systems the Square tool is hidden in the Rectangle Square pop up palette by default Click and hold on the Rectangle tool to bering the pop up palette in view Figure 2 5 below
11. and the file to which data is output 2 6 4 Automating the Process 6 15 Beneath Sub Main indent one tab and enter Dim Doc as WMDocument Bar as WMBody VelMeter as WMOutput The statement defines a variable called Doc of type WMDocument Similarly Bar and VelMeter are defined as variables of types WMBody and WMOutput respectively Later we will assign the bar CD to the variable Bar This way we will be able to modify the length of the bar CD by modifying the corresponding property of the variable Bar Also we will assign the existing meter object to the variable VelMeter Enter Dim Max1 as Double FName as String The statement defines one variable Max1 of type Double and a second FName of type String A double is a double precision floating point number The variable FName will hold the name of the file to which you will output data The types Double and String are standard BASIC types whereas WMDocument WMBody and WMOutput are types specifically defined for WM Basic Enter Set Doc WM ActiveDocument A few lines above we created a variable called Doc Now we assign ita value This assignment tells WM Basic that Doc refers to the currently active document Enter Set Bar Doc Body CD This assignment tells WM Basic that Bar refers to the bar we labeled CD Enter Set VelMeter Doc Output Vmax This tells WM Basic that VelMeter refers to the output meter we named Vmax Enter FNam
12. see Figure 2 2 below The connecting rod will be modeled by a thin rectangle 500 mm in length Its width will be thin 100 mm so it closely resembles the actual connecting rod The crankshaft as stated in the exercise is modeled as a circular disk with a 250 mm 2 4 Exercise 2 A Piston Engine Figure 2 2 The boaies that will be created radius and a mass of 35 kg A 200 mm square object will represent the piston The objects will be created sized and initialized in the following steps Piston mass 1kg height 200 mm Connecting rod width 200 mm A height 500 mm width 100 mm Crankshaft e mass 35 kg radius 250 mm Creating the Crankshaft The crankshaft is represented by a circle with a radius of 250 mm and mass of 35 kg These parameters will be set using the Geometry and Properties utility windows To draw the crankshaft 1 Click the Circle tool in the Toolbar 2 Click once on the background Move the mouse to expand the circle and click again to complete sketching To set the mass of the crankshaft 1 Choose Properties from the Window menu 2 Click the mass field and enter the value 35 To set the size of the crankshaft 1 Select the crankshaft if it not already selected 2 Click the Radius field labeled r of the Coordinates bar and enter the value 250 Figure 2 3 Figure 2 3 Coordinates bar for a circle Figure 2 4 The workspace after zooming in 2 3
13. Dynamic System vehicle moving along the track Working Model 2D The particular specifications of the control system model are that e The user specifies the desired speed in Working Model 2D e Working Model 2D measures the current speed of the vehicle and sends the speed error and the current throttle to a control system implemented in MATLAB e Given the current error and throttle the control system in MATLAB computes the revised throttle and sends it to Working Model 2D The control system which is really a MATLAB function looks like the following Inputs Output Speed Enor Force Current Throttle gt Control Function Magnitude MATLAB The control system is implemented with these concepts in mind 5 16 Exercise 5 Cruise Control using MATLAB Implementing the Control Function This example will build on a well known feedback control scheme called PID control proportional integral derivative The PID control system is a simple yet relatively robust control system because it takes into account not only the magnitude of an error observed but also its derivative and integral The PID control system is typically implemented as u t ket k eats k Lee where e t is the error signal u t is the actuator signal and kp k kq are constants that can be tuned for a particular system You will implement a discrete version of the PID control system in a MATLAB M file If you are a Windo
14. EEE RREA 6 13 Automating the Process seeeseeeeeeseseseeeseressesrrsresterertesresrenteresesrenresrsrrsreet 6 14 Writing a WM Basic SCTipt ee eee ceeeeeeceeeseecnecaeceeceseeeseseeeeeees 6 14 Running the Scripte i nessa ieee sages evi E A R ES 6 17 Modifying the Script nesana ane a tite weuerrene tabs 6 18 1 1 EXERCISE 1 A Double Slotted Rod The slender bar AB weighs 60 lbs and moves in the vertical plane with its ends constrained to follow smooth horizontal and vertical guides The bar is initially at rest in a position such that 8 60 A 30 Ib force in the positive x direction is applied at A Calculate the initial angular acceleration of the bar and the initial forces on the small end rollers at A and B Concepts for Exercise 1 e Utility windows e Changing the unit system e Precise placement of points and slots e Joining points and slots to create slot joints e Creating and scaling forces e Displaying and scaling vectors e Meters 1 2 Exercise 1 A Double Slotted Rod Figure 1 1 Numbers and Units dialog 1 1 Introduction This exercise utilizes three components a rod a horizontal slot and a vertical slot A rectangular body will model the rod two slot joints positioned on the x and y axes will model the horizontal and vertical guides The rectangle will be drawn sized and then joined to the two slots A force will be applied to the rectangle and the resulting angular velocity will be measu
15. Enter 0 002 here Simulation Accuracy Animation Step Integrator Error Automatic Accurate Custom Ol o002 m You can display the simulation time by creating a time meter to observe how the real time corresponds to the state of your mechanism To create the time meter 3 Choose Time from the Measure menu A digital meter showing the elapsed time appears Interested readers should consult Appendix A Technical Information in the Working Model 2D User s Manual for detailed discussions on the numerical method employed by Working Model 2D Now you are ready to run your simulation Starting the Simulation To start your simulation as in previous exercises 1 Click the Run button in the Toolbar 46 Running the Simulation 4 25 Alternatively you can press Command R MacOS or Ctrl R Windows Observe the motion of the cam followers as the motor drives the whole mechanism Modifying the Simulation Depending on your application you might want to e measure the velocity and position of the cam followers e change the speed of the motor e modify the shape of the cam and or e change the animation step size By now you have probably learned enough about Working Model 2D to perform the above tasks We encourage you to consult the Working Model 2D User s Manual for detailed discussions on how Working Model 2D treats and simulates your models 4 26 Exercise 4 A Belt Driven Camshaft
16. Properties from the Window menu 3 Click the Static Friction field and enter the value 1 0 4 Click the Kinetic Friction field and enter the value 1 0 5 Click the Elasticity field and enter 0 3 6 Decreasing the Integrator Error Integrator Error represents the error tolerance or upper bound for numerical errors allowed in the integration process In this simulation the Automatic Integrator Error default is not sufficiently accurate The Simulation Accuracy dialog will be used to decrease the error tolerance To decrease the Integrator Error 1 Choose Accuracy from the World menu 3 7 Running the Simulation 3 17 The Simulation Accuracy dialog appears 2 Click the Integrator Error field and enter the value 0 05 3 7 Running the Simulation The simulation is ready to run To run the simulation 1 Click the Run button in the Toolbar The shake table should move left and right As it does the building begins to topple over When it is done reset the simulation 2 Click the Reset button Now that the simulation has been recorded play it back at full speed 3 Click Run again Try changing the equation in the actuator Add the rand function so that the motion of the shake table is more realistic Also try modifying the masses of the members 3 18 Exercise 3 An Earthquake Simulation EXERCISE 4 A Belt Driven Camshaft 0 800 0 600 0 400 0 200 0 000 0 200 0 400 0 600 In this model a m
17. SI radians 3 Click More Choices to expand the Numbers and Units dialog Figure 3 2 Simulation Accuracy dialog 3 2 Setting Up the Workspace 3 3 4 Click the distance unit pop up menu Change the unit to feet 5 Click OK The Numbers and Units dialog is closed To change the simulation accuracy 1 Choose Accuracy from the World menu The Simulation Accuracy dialog appears 2 Choose Fast in the Simulation Accuracy dialog see Figure 3 2 Since this exercise requires only a qualitative analysis we will use the Fast mode for quicker animation Simulation Accuracy Animation Step Integrator Error Automatic Automatic 0 010 sec Of 0 033 Choose Fast mode 3 Click OK To add the x y axes 1 Choose Workspace from the View menu 2 On MacOS systems choose X Y Axes from the Workspace submenu On Windows systems check the box next to X Y Axes in the Workspace dialog The x and y axes are displayed 3 4 Exercise 3 An Earthquake Simulation 3 3 Creating the Shake Table In this exercise a large shake table is used to simulate the ground motion of an earthquake The shake table will be constructed of a large rectangle which will slide on a keyed slot joint The earthquake motion will be simulated using an actuator Drawing the Shake Table The shake table rectangle will be drawn using the Rectangle tool To draw the shake table rectangle 1 Click the Rectangle tool in the Toolbar
18. Slot In this example the piston slides in a cylinder The cylinder will be modeled as a keyed slot joint The joint is created by joining the square point on the piston to the slot To create the keyed slot joint 1 Select the square point on the piston and while holding down the Shift key select the slot 2 14 Exercise 2 A Piston Engine The word Join of the Join button in the Toolbar changes from gray to black indicating the two points can be joined 7 2 Click the Join button in the Toolbar Join The piston moves to the slot see Figure 2 11 Figure 2 11 Piston joined to the slot Joining the Crankshaft to the Point on the Background The crankshaft main bearing is modeled as a pin joint The pin joint will be created by joining the point at the center of the circle to the point at the origin To join the crankshaft to the origin 1 Choose Properties in the Window menu 2 From the selection pop up menu located at the top of the Properties window choose Base Pin Figure 2 12 The Base Pin is now selected Figure 2 12 Selecting an object in the Properties window 2 5 Creating Joints 2 15 fr Point 10 Base Pin z Paint 6 Point Point Point Point 8 9 Pi Pointj 10 Base Pin Point 11 Slot Connected to Background r Global Coordinates angle p 000 fad E 000 mA y E 000 mm 3 Hold the Shift key down and sel
19. are registered trademarks of Apple Computer Incorporated Mac is a trademark of Apple Computer Incorporated Microsoft and Windows are registered trademarks of Microsoft Corporation Windows NT is a trademark of Microsoft Corporation PowerPC is a trademark of International Business Machines Corporation MATLAB is a registered trademark of the MathWorks Incorporated All other brand or product names are trademarks or registered trademarks of their respective companies or organizations Knowledge Revolution 66 Bovet Road Suite 200 San Mateo California 94402 Contents Exercise 1 Exercise 2 A Double Slotted ROG scsscsscssessessessessessesessessessessessessessessesreseessessessessersens 1 1 Ved Wntrodicthomn sss e052 sssccs ESET sasissieasbasteas 1 2 1 2 Setting Up the Workspace sessecseeceeecensconseneconeconsensvonserssonseonseseessens 1 2 1 3 Creating the Rods scscco sseseupcssascesiges cas oith spusesasetupes cbsckean a Ee E E 1 5 Drawing the ROG e es ese etecs Bevtccete series hs E aides tone ccteeeeaes 1 5 Sizing the RO sss cc s455 eessdisvessveaseasssheassgesiststaaskesssadveshsessseospessgasvenveavyesteess 1 6 ZOOMING Loses chess el sos Make haces etetou teks xe E tus atooden E E ere 1 7 Setting the Weight of the ROd eee eeeesceseeeeceeeeeeeeseeteecneeeneenaes 1 8 1 4 Creating the Slot Joints ee nsir nsi e ria ieai oeni N Eoaea eseis 1 9 Finding Snap Points on the Rod eee cee cee ceseeeeceseeeece
20. around its center until the vehicle is turned about 180 degrees Figure 5 8 Rotating the vehicle 5 3 Creating the Vehicle and Track 5 11 You need not rotate the vehicle exactly 180 degrees Just bring the second Point so that it is somewhat facing forward to the right along the track Move the mouse untithe center idk and drag to rotate the vehicke of rotation snaps to the vehicle s center 4 Click the Join button in the Toolbar The second point reattaches to the slot You did not have to select both the point and the slot to join because Working Model 2D remembered which constraint had been split on the body that was currently selected Implementing the Driving Force To observe how the vehicle moves along the track you will attach a constant force to drive the vehicle Expect the vehicle to accelerate at a flat portion of the track slow down on uphills and accelerate excessively on downhills 1 Click the Force tool in the Toolbar 2 Bring the pointer to the center of the vehicle and find the snap point You will see two snap points near the center of the vehicle one at the geometric center and another at the front point located at 0 1 0 0 Working Model 2D allows you to snap to any existing point element 3 Click once when the center snap point is visible and drag the force vector to the left Click again to complete the force 5 12 Exercise 5 Cruise Control using MATLAB 4 Inthe
21. assembly is 35 kg Given that the red line of the engine is 35 rad sec 340 rpm determine the forces at the crankshaft bearing point A and connection rod point B bearing Assume the crankshaft flywheel assembly can be modeled as a circular disk 2 2 Exercise 2 A Piston Engine Exercise 2 Concepts e Using equations and formulas to control a force e Creating a keyed slot joint e Displaying an x y graph e Increasing the accuracy of a simulation 2 1 Introduction Engines that exceed the manufacture s maximum speed over revving may be subject to excessive wear and possible failure To prevent over revving internal combustion engines are often fitted with a device known as arev limiter When an engine exceeds its red line rev limiters interrupt the ignition system slowing the engine down Once the speed drops below the maximum the ignition system is switched back on In this exercise you will model an internal combustion engine equipped with a rev limiter The engine has three bodies the piston the connecting rod and the crankshaft The piston will be modeled by a square body The connecting rod will be modeled by a rectangular body The crankshaft will be modeled as a circular body The bodies will be drawn sized and joined to each other and the background The piston s cylinder walls will be modeled with a keyed slot joint The force of combustion will be modeled by a force attached to the top of the piston The resulting f
22. control points should suffice After clicking the last control point press the spacebar 5 6 Exercise 5 Cruise Control using MATLAB Figure 5 2 Drawing a curved siot Figure 5 3 Examples of Good and Baa curves for the control system pool in the following order to form a curve positions are approximate f NOTE In this example you can create a curved slot of your favorite shape but make sure that the curve is single valued with respect to the x axis That is the curve cannot go backward You will need this restriction because the control system assumes that the vehicle always moves in the incremental x direction Figure 5 3 shows what you can and cannot do in the cruise control example incremental x direction As shown in the previous exercise you will need to duplicate the curved track since you will attach two pin joints to the vehicle in order to restrict the rotation 3 Select the curved slot you have just drawn and choose Duplicate in the Edit menu An identically shaped curved slot appears slightly offset from the original Figure 5 4 Appearance window for a curved slot Figure 5 5 FOR ofa curved slot as shown in the Coordinates bar 5 3 Creating the Vehicle and Track 5 7 Before aligning the two slots we should name these two elements to identify one from the other 4 Select the duplicated slot if it has not been already selected Choose Appearance in t
23. pound rod which will be modeled as a thin rectangular body It will be sized using the Geometry window and its mass will be set using the Properties window Working Model 2D automatically calculates the moment of inertia of all objects as if they were two dimensional plates of uniform density The rectangle will be made thin so that its moment of inertia approximates that of a rod Drawing the Rod To draw the rod 1 Click the Rectangle tool in the Toolbar The Rectangle tool is selected 2 Position the pointer in the workspace and click to begin drawing Move the mouse to size the rectangle Click again to complete the rectangle A rectangle is created The simulation window should look similar to Figure 1 6 1 6 Exercise 1 A Double Slotted Rod Figure 1 6 Drawing the rod 4 Working Model Untitled1 oj x thy File Edit World View Object Define Measure Script Window Help 8 x Die amp ae al k 9 Aje p Run Stopi Reset ft y 1 750 ft hi9500 ft wi2500 ff loo z gt Friday August 02 96 09 12 AM 7 Sizing the Rod The rectangle must be 4 feet in length and must be thin to approximate the moment of inertia of a rod Dimensions of 4 feet by 0 35 feet will be entered in the Coordinates bar A mass of 60 pounds will be entered in the Properties window 1 Select the rod if it is not already selected by placing the pointer on the object and clicking Four square dots called resi
24. step This step is necessary to synchronize Working Model 2D with the control system to be implemented in MATLAB Read on to Implementing the Control Function on page 5 16 which provides more discussions on this matter Interested readers are encouraged to consult Appendix A Technical Information in the Working Model 2D User s Manual for an informative discussion on the time step size 5 3 Creating the Vehicle and Track The curved track consists of two overlapping curved slots The vehicle is pinned to the two slots using two offset pins and the motion of the vehicle is limited to one degree of freedom along the path In other words the vehicle can only translate back and forth along the path Creating the Track Working Model 2D constructs a curved slot from a series of control points that you specify Simply put you can specify a series of points in the workspace and Working Model 2D connects them with a smooth curve You will not need a numerical geometry of the curve since the precise shape of the curve is not important here Instead you can create your own curve with hills and valleys 1 Click the Curved Slot tool in the Toolbar On MacOS systems the Curved Slot tool is hidden in the Slot pop up palette by default Click and hold on the Slot tool in the Toolbar to bring the Slot pop up palette in view 2 Draw a curved slot by clicking a series of control points as shown in Figure 5 2 Six or seven
25. the position of the circle as 0 3 0 2 Figure 4 21 Drive disk specifications EETA TETT cititi rrera My aude ag ESET EEFI a ETIE Diameter 02in J 3 Click the Motor tool in the Toolbar 4 Click the center snap point of the drive disk to attach the motor 5 In the Properties window of the motor Figure 4 22 select the type Velocity and enter 3600 0 degrees per second which equals the specified velocity of 600 rpm Alternatively you can set the units of angular velocity to be measured in rpm using the Numbers and Units dialog See the Working Model 2D User s Manual for details Figure 4 22 Properties window for a motor 4 5 Constructing the Drive Mechanism 4 21 E Properties 22550 Select Velocity Meter Type 3600 000 2 s Enter 3600 0 7 sec m Base Point Point 22 r Point Point 23 r Active when Always ol Connecting the Drive Motor to the Cam As was discussed in the beginning of the exercise you will use a belt drive to attach the drive motor to the cam disk In Working Model 2D you can use the gear tool to simulate belt drive mechanisms By default Working Model 2D automatically computes the gear ratio for a pair of circular objects based on their radii Interested readers should consult Chapter 4 Constraints in the Working Model 2D User s Manual for detailed information about the gear simulation principles In order
26. to connect the drive disk to the cam disk 1 Choose the Gear tool in the Toolbar On MacOS systems the Gear tool is hidden in the Pulley Gear pop up palette by default Click and hold on the Pulley tool to bring the pop up palette in view Figure 4 23 L Since the gear tool in Working Model 2D simulates the dynamics between two bodies you will not be able to control properties such as the weight or tension of the belt 4 22 Exercise 4 A Belt Driven Camshaft Figure 4 23 Pulley gear pop up palette MacOS only 2 Click anywhere on the cam disk A gear icon is automatically aligned to the center of the cam disk The second gear icon follows the point as you move it 3 Move the pointer to the drive disk and click the mouse button again Again the second gear icon is automatically aligned to the center of the drive disk Your simulation should resemble Figure 4 24 At this point the two disks will behave as if they were spur gears i e the two disks will rotate in opposite directions when the simulation is run To simulate a belt drive mechanism 4 Select the gear constraint by clicking on the rod connecting the two gear icons and open the Properties window if it is not already open Figure 4 24 Selecting the gear constraint Figure 4 25 Properties window for gears 46 Running the Simulation 4 23 5 Check the Internal Gear checkbox Make sure that the first object you selected
27. which matches the one created in this exercise Exercise 6 Concepts e Scripting e Resizing with parametrics e Output to a file 6 1 Introduction Often an engineer needs to test a design for a series of different design parameters An easy way to do this is by running several iterations of analysis with a script in Working Model Basic WM Basic Working Model 2D s embedded scripting language Scripting can automate the process of running simulations changing parameters taking measurements etc Anything that can be done manually in Working Model 2D can also be done with a script Although not addressed in this exercise you can also modify dialog boxes and create custom interfaces with WM Basic This exercise looks at a four bar linkage the simplest closed loop linkage The four bar linkage is common in mechanical engineering and is useful for a wide range of engineering applications from cranes to sprinklers to car hood lifters You will learn to write a simple script in WM Basic that runs through a simulation five times changing one of the components and outputting new data to a file each time There will be two parts to this exercise The first shows you how to set up the four bar linkage interactively The second shows you how to write a script to manipulate this mechanism Figure 6 1 Numbers and Units dialog Figure 6 2 View Size dialog 6 2 Setting Up the Workspace 6 3 6 2 Setting Up the Workspace For this ex
28. will not rotate or move vertically When you are done dragging the rectangle return it to the approximate starting position Creating the Actuator To provide horizontal motion to the shake table an actuator will be attached to the rectangle and to the background The Actuator tool will be used to create the actuator To create the actuator 1 Click the Actuator tool in the Toolbar 2 Click the background to the left of the shake table Move the pointer to the right to extend the actuator Click again when the pointer is over the rectangle see Figure 3 8 An actuator appears and joins to both the background and the rectangle Your window should resemble Figure 3 8 3 8 Exercise 3 An Earthquake Simulation Figure 3 8 The actuator attached Initializing the Actuator For this exercise a Velocity actuator will be used To set the type and speed of the actuator the Properties window will be used To set up the actuator 1 Select the Actuator if it is not already selected 2 Choose Properties from the Window menu 3 Inthe Properties window select Velocity from the Type pop up menu see Figure 3 9 A velocity actuator provides the specified speed regardless of the forces required Figure 3 9 Type pop up menu in the Properties window for an actuator Floor Beam 2 x 13 75 lb ly 2 x 10 75 Ib x Columns 3A Creating the First Story 3 9 Actuator Type Velocity value
29. you move the pointer observe that a line segment extends from the first point You have just established the first control point of the curved slot In addition by clicking the first point on the disk you are specifying that the curved slot is attached to the disk To create a closed curved slot you need at least three points 3 Click again on the disk in a different place As you move the pointer notice that the closed slot shape changes Figure 4 6 Figure 4 6 Closed curved slot in the making 43 CreatingtheCam 4 7 Working Model 2D shows the shape of the closed curve as you move the mouse As you move the cursor the shape of the closed curve changes 4 Click as many times as you like to create more control points Working Model 2D continuously tracks the point sequence and shapes the slot accordingly Even if you click outside the disk Working Model 2D creates a control point as part of the curved slot 5 Double click to create the last control point and finish the curve Alternatively press the space bar after you create single click the last control point NOTE Your slot may not look anything like the slots that appear in the exercise That s okay In the following steps you will learn how to change the shape of a curved slot Changing the Shape of the Curved Slot You can modify the shape of a curved slot in two different ways graphically or numerically The graphical method provides a si
30. 10 cos t sin 3 t ft sec Click here to te the Type pop up menu Active when MV Always Da 4 Click the Value field and enter the following Earthquake equation 10 cos 7 t 7 sin 3 t Testing the Shake Table To test the shake table run the simulation The shake table should move left and right on its slot To run the simulation 1 Click the Run button in the Toolbar The shake table should move left and right If it does not the model was not constructed properly 2 Click the Reset button 3 4 Creating the First Story The first story of the building consists of three components the two columns and the floor beam The columns weigh 100 Ibs and are 10 high and 2 wide The floor beam weighs 75 Ibs and is 2 high and 13 3 10 Exercise 3 An Earthquake Simulation Figure 3 10 First story member sizes and positions wide These members will be modeled by rectangular bodies To simulate simple non earthquake resistant member connections the friction and elasticity coefficients will should be set at 1 0 and 0 respectively You can follow the step by step instructions or you can create the first story yourself Refer to Figure 3 10 for the components data Floor 2x13 75 Ibs Column 5 5 11 Column 10 x 2 10 x2 75 Ibs 11 5 Creating the Columns One column will be created using the Rectangle tool The Geometry window will be used to set its di
31. 3 e establish the specific links between Working Model 2D Control Meter objects and MATLAB variables and e run the simulation 5 2 Setting Up the Workspace You will use the SI unit system in this example To verify the current unit system 1 Choose Numbers and Units from the View menu 2 Select SI degrees from the Unit System selection pop up menu if it is not already selected 3 Click OK Since the data exchange with MATLAB takes place at the animation frame rate the control system running in MATLAB is only able to monitor the speed of the vehicle at that rate In order for our control system to be effective however the default frame rate of Working Model 2D must be increased Therefore to synchronize Working Model 2D with MATLAB you need to adjust the integration time step parameter used by Working Model 2D s simulation To increase this frame rate 4 Choose Accuracy from the World menu The Simulation Accuracy dialog appears 5 Click More Choices The dialog box expands as shown in Figure 5 1 5 4 Exercise 5 Cruise Control using MATLAB Figure 5 1 Simulation Accuracy dialog Expanded Simulation Accuracy xi Animation Step Integrator Error Click here C Fast C Automatic r Accurate Cancel 0 01 inthe oi S E m seconds s C Custom Fewer Choices field Integrator C Fixed Integration step 0 025 Variable Steps per frame f Euler approximat
32. Coordinates bar enter 10 0 for the Fx field and 0 0 for the Fy field 5 Open the Properties window and check the box labeled Rotate with body see Figure 5 9 Figure 5 9 EE Properties window for a force E Constraint 11 Force 7 Force Fxfi0 000 N 0 Check this checkbox Cartesian C Polar M Rotate with body This is the point of application of the force Base Fon Point 10 Active when M Always NOTE The ID numbers of the Force constraint Base Point in your model may be different from the ones shown in Figure 5 9 These numbers are serial counts of all the objects created thus far and they may differ from one model to another The force should be located as shown in Figure 5 10 Figure 5 10 Vehicle with a force attached Figure 5 11 Meter for the vehicle s velocity 5 4 Implementing the Control System 5 13 Before starting the simulation create a meter to measure the speed of the vehicle 6 Select the vehicle Choose Velocity in the Measure menu and All from the Velocity submenu The meter shows the V Vy IVI the speed and V angular velocity of the vehicle 7 Click the buttons shown in Figure 5 11 to disable unnecessary measurements Click here to disable This meter will serve as an input to the control system Do not delete it 8 Click the Run button in the Toolbar Observe that the speed of the vehicle does not remain constant as it moves along the hilly road
33. E 2 19 2 7 Measuring Properties from the Simulation e eesesesseeesessesesererereereresresesee 2 21 Displaying a Graphiscess crs cccosdesh eere vepevag ce eesdhseretye ces E EEE areik 2 21 Displaying Digital Force Meters cesccesccesseceseeceeeecsseeeeeeceeeeeneeeeee 2 21 2 8 Running the Simulation cee as Seea REE ER 2 23 Modifying the Graph Display eee eeeeeeeeceeeeeseeesecesecaeesaeenes 2 23 Modifying the Simulation eee eeeeeseceecseeeceseceeeseceeecaseecsaeaseees 2 24 An Earthquake Sitmulatin ssssssssssssssssssssssesseessesssessssuussnmneneeneeees 3 1 3L Intr duttiON ss ein cysbesescussseat acs efescas Hata cba dig E EA EE as ates 3 2 3 2 Setting Up the Workspace iness essersi isisisi enesik iiis ii as 3 2 3 3 Creating the Shake Tables isisirsi isisisi erresiren oertain oriasit riisi es 3 4 Drawing the Shake Table eee ccs cseeseeseeceeeeeeeeeeeeeeaeeeeeeaeeeeeeneees 3 4 ZOOMING Outi sss rer eee prerie re ee aE EE EEE shied EA aT hese shea 3 4 Positioning the Shake Table sseeseeseeeeseeessssresssreersreerressrrrsseressreerreeee 3 5 Creating the Shake Table Slot ns esseseeeesseeesssesseseeerseresrerssrerssrrrssreeeseeee 3 6 Creating the Actuator nirre renen ase EEE EE E E E REEE E ToS 3 7 Initializing the ACtUatOr si sisirin eneeier ieai a 3 8 Testing the Shake Table n cee ceseesecesecesecneceseeesecnecesecsseesaensees 3 9 3 4 Creating the First Story lt secsc scisscssiessissvessss
34. Exercise 3 An Earthquake Simulation Figure 3 12 The first story completed Creating the Floor Beam The floor beam rectangle will be created with the Rectangle tool To draw the rectangle 1 Click the Rectangle tool in the Toolbar 2 Drag outa rectangle To size and position the rectangle 1 Select the floor beam rectangle if it is not already selected 2 Click the X field of the Coordinates bar and enter 5 5 3 Tabl to the Y field of the Coordinates bar and enter 11 4 Tab to the Height field of the Coordinates bar and enter 2 5 Tab to the Width field of the Coordinates bar and enter 13 To set the mass of the floor beam 1 Choose the Properties from the Window menu 2 Click the Mass field and enter 75 Your screen should resemble Figure 3 12 below E Floor Beam 2 x 13 75 lb Figure 3 13 Second story member sizes and positions 3 5 Creating the Second Story 3 13 3 5 Creating the Second Story The second story of the building in this exercise is similar to the first with the exception that the columns are weigh less and are narrower One column will be created and then duplicated to create the second column The roof beam will be created by duplicating the first story floor beam It will then be positioned on top of the second story columns You can follow the step by step instructions or you can create the second story yourself Refer to Figure 3 13 for the necessary data
35. S S 5 10 Implementing the Driving Force sseesseseeeesereeseeeerrsessesrssreresreersreeres 5 11 5 4 Implementing the Control System sseesseseeeesrseerrsessrsessrrrrsrerrereeresenresesse 5 13 Implementing the Control Function seeeesseseesesrssssrerresrsrreerrresesreeee 5 16 Linking MATLAB with Working Model 2D ssssseseeesesreeeeessreerersrree 5 18 5 5 Running the Simulation seseseseeeeeeeseseeeresresrsresresreersrensrsrenresenrsreeresrreeseeet 5 23 Starting the Simulations sesesstesd Sovsssteeesechvateognaieeson EE SESE 5 23 Repeating the Simulation eee ee eee cesecsseesecesecssecaeecaecaecsaecaeeeneeaes 5 24 Modifying the Simulation eee cee ceseceeceseceecesecaecsaecsaeeneesaeeaee 5 25 Sc 2 3 Lapeer enna nO eo mene NEED pene oe 6 1 6 1 Antroductiom sess ussiss sessasisseepusesestane apes seh atts esc cad senses E EEEE EE ob sven 6 2 6 2 Setting Up the Workspace ee eee cesecesecnsecseeceecneecaeecaeeeaeseaeeseseaeeeeeeeens 6 3 6 3 Creating the Components eee cee cseecneecreeeeeeeeeeeeeeeseneeeesecnseeerenseesees 6 4 vi Creating the Barson uenen ih oa E E RETR 6 4 Connecting the Bars with Pin Joints eeeseseeseeesseeeesesreeiesrsreeresreeresrees 6 6 Adding a Motor rese ie e EE a eE EN see RE EEE 6 9 Testing Parametri S o oere oikee opere oere ech sSeos A OEEO OSEAAN En ea 6 10 Adding an Output Meter eee csecseeeeeeeeeeeeeseeeecesecaecaeenaeenee 6 10 Running the Simulation eneee e R
36. S systems this leads to a submenu of workspace options which can be set Choosing Workspace from this submenu leads to a dialog box which allows you to set multiple options at once On Windows systems there is no Workspace submenu the menu command leads directly to the Workspace dialog 2 On MacOS systems choose X Y Axes from the Workspace submenu Figure 1 3 On Windows systems check the box next to X Y Axes in the Workspace dialog Figure 1 4 The simulation window should look similar to Figure 1 5 1 4 Exercise 1 A Double Slotted Rod Figure 1 3 Workspace submenu MacOS Workspace Rulers f v Grid Snap Grid Lines only v Object Snap H Y Axes System Center of Mass Sardi cack Rolie L v Coordinates v Toolbar v Status Bar v Scroll Bars v Tape Player Controls Lock Controls Numbers and Units View Size Background Color Workspace New Reference Frame Delete Reference Frame P v Home 361 Figure 1 4 Workspace dialog Windows Navigation p Toolbars M Coordinates M Standard J Rulers M Edit I Grid Lines M Run Control MV XY Axes M Join Split M Body gt Scrolling M Points V Tape player controls M Joints M Scroll bars P Chstr I Simple M Status bar Figure 1 5 untitled Empty workspace 1 3 Creating the Rod 1 5 1 3 Creating the Rod This exercise requires a 4 foot long 60
37. ace the cursor over the piston and read the Status bar On MacOS systems the Status bar is located at the top of the simulation window on Windows systems the Status bar is located at the bottom of the window To determine when the engine s speed is greater than 35 rad s use the following formula body d v r lt 35 where d is the crankshaft s object id number Use the Status bar as above to determine the crankshaft s id number The complete equation is and body v y lt 0 body d v r lt 35 The complete equation will be placed in the Active When field in the force s Properties window Gravity will provide the initial downward velocity to start the engine 2 20 Exercise 2 A Piston Engine To set the timing of the force 1 Select the force 2 Choose Properties from the Window menu 3 Click in the Active When field at the bottom of the Properties window On Windows systems you must first un check the Always button before clicking in the Active When field 4 Type the following formula see Figure 2 17 and body v y lt 0 body d v r lt 35 where c and d are the object id numbers of the piston and crankshaft respectively The force s rev limiter equation is designed for counter clockwise positive engine rotation It is important that the engine be started in a position similar to the figure on the first page of this section If you want a rev limiter which works in both directions
38. ape mode Cut eH Copy Paste 3 amp 0 Clear Select All A Duplicate D v Reshape Player Mode Numerical Reshape To construct a cam with precise geometry you need to enter the coordinates of the control points numerically rather than graphically In this section a table of control points is provided for you to enter into Working Model 2D First you will modify a single control point numerically 1 Exit Reshape mode You can exit Reshape mode by selecting the Arrow tool in the Toolbar or by deselecting Reshape in the Edit menu 2 Select the closed curved slot by clicking it The slot appears highlighted 3 Choose Geometry in the Window menu The Geometry window appears Figure 4 9 The bottom part of the window shows the coordinates of the control points It may be necessary to resize the window to see all of the coordinates 4 10 Exercise 4 A Belt Driven Camshaft Figure 4 9 Geometrwindoworurveclot GikeeE Geometry 2 5 E Constraint 6 _ v Curved Slol Joint r Display in O Cartesian coordinates Polar coordinates m Table oO Interpolated pts 10 EA Radius The control points of a closed curved slot are shown in polar coordinates by default For an open curved slot the control points are shown in Cartesian rectangular coordinates by default You can switch between polar and Cartesian coordinate displays by clicking the appropriate button in the Geometry window The origin of th
39. application interface External document 17 Jg engine CAWINDOWS D Document Jengine r Outputs F oupas x Connect Disconnect Variable ferr Initialize fu 0 Execute fu kretr 2ferr u coe fr Input 15 x Connect C Disconnect Variable fu Timeout 30 000 s 5 5 Running the Simulation 5 23 You are almost ready to run the simulation Let s take a break and review what you have done so far You have e set a workspace and accuracy for the simulation e created a curved track and the vehicle e attached the vehicle to the track e implemented the control system and e specified the inter application link between Working Model 2D and MATLAB 5 5 Running the Simulation Starting the Simulation Before you run the simulation you must initialize a global variable in MATLAB In your MATLAB Command window type two commands as follows global el el 0 5 24 Exercise 5 Cruise Control using MATLAB These commands are necessary to initialize the state of a variable before you run the simulation Now you are ready to proceed 1 Adjust the slider bar for the speed control to the desired value 2 Click the Run button in the Toolbar Observe how the vehicle drives along the hill while the force acts to control the speed of the vehicle You can change the speed control and to see how fast the PID control system reacts to your command Repeating the Simu
40. as a gear the cam disk if you followed the steps above is chosen as the internal gear see Figure 4 25 The gear icon on the cam disk turns into an internal gear icon with teeth facing inward Gear r Gear Ratio M Automatically Compute B 000 c M Always Mark the check box M Internal Gear Body 1 r Gear Force Make sure that the first object is ___ Constraint 28 chosen as the intemal gear to p Active when simulate a belt drive mechanism M Always me Now your model is complete Before you click the Run button however please read the following section 4 6 Running the Simulation As it stands the motor is supposed to operate at a relatively high speed 600 rpm The default animation time step is too large for this simulation making the animation frames appear discontinuous You will modify a performance parameter of Working Model 2D to alleviate the problem Setting Animation Step You will adjust the rate at which Working Model 2D refreshes its animation frames 4 24 Exercise 4 A Belt Driven Camshaft Figure 4 26 Simulation Accuracy dialog 1 Choose Accuracy from the World menu The Simulation Accuracy dialog box appears 2 Inthe frame labeled Animation Step click on the radio button located to the left of the two text boxes under Automatic Enter 0 002 in the field labeled seconds Figure 4 26 Each animation frame now represents 0 002 seconds of the simulation
41. city of the point defined by the equation we entered earlier Enter Print 1 Height i Max Velocity Max1 6 4 Automating the Process 6 17 This statement outputs the maximum velocity to the file created in the SaveFileName statement earlier We refer to it here with the ID 1 assigned with the Open statement earlier The variable i is the height of the bar and Max is the maximum velocity The semi colon tells WM Basic to print the value immediately after the previous value a comma says to print in the next field each field is 14 spaces 16 Enter Next i This increments the variable i by one step in this case 0 1 and sends the program back to the start of the for loop 17 Enter Close 1 This closes the data file Again we refer to the file by the ID 1 that we gave it when we opened it 18 Enter Doc Reset This resets the simulation The script is finished but you should save it before you run it 19 Choose Save from the File menu in the Script Editor window Name the file and click OK Running the Script You are now ready to run the script 1 Choose Start from the Run menu in the Script Editor window or click the Start button in the Script Editor Toolbar 6 18 Figure 6 13 Maxvel ixt file Exercise 6 Scripting NOTE The script created in this exercise is included as a file called Ex6 WBS in the Tutorial folder which was installed with Working Model 2D Users of 680x0 based MacOS syste
42. d but not at the edge Figure 4 15 shows the snap point ici a BS i iy a i is a me i lo oi ch a Rare Ratan A ae ion i abies Gabon amie h min wath height Click when the snap point is visible The point element is positioned at the snap point Repeat the process to attach a point element at the left end of the right cam follower Figure 4 16 The snap point appears near ee eaae ee A EEEE the ends of a rectangle Ce ee ere eee eee et eee ee ee ee ee ee ere 4 16 Exercise 4 A Belt Driven Camshaft Figure 4 17 Duplicating a curved slot Each point needs to be attached to the slot on the cam However only one point can be attached to each slot in Working Model 2D In order to accommodate two point elements we will create another slot element by duplicating the existing one 1 Click the Arrow tool in the Toolbar or press the spacebar to deselect the Point tool Select the curved slot currently attached to the disk Select Duplicate in the Edit menu An identically shaped curved slot is created at a slightly offset position Figure 4 17 0 600 0 400 0 200 0 000 0 200 0 400 0 600 x 0 050 m y _ 0 050 m 0 000 Before we align the two slots we will assign names to individual slots 4 Select the original curved slot and choose Appearance from the Window menu The Appearance window appears Enter Left Follower Slot in the name field of the Appearance window
43. d in the problem To create the force 1 Click the Force tool in the Toolbar The Force tool is selected 2 Bring the pointer near the top of the rod and look for the Snap Point where the top slot pin is attached Tf necessary see Finding Snap Points on the Rod on page 1 9 for review 3 When the snap point on the top slot pin is visible click once and move the pointer horizontally to the left Observe that the force vector is sized according to the position of the mouse pointer 4 Click again to finish creating the force Your model should resemble Figure 1 21 5 Click to select the force if it is not already selected Figure 1 22 Coordinates bar for a force 1 6 Positioning the Rod 1 17 The force is highlighted to indicate that it is selected Enter the magnitude of the force oe x 0 0 lft y body 1 ft Fx 30 000 1b Fy 0 000 1b Kua O_o bla 6 Click in the Fy field of the Coordinates bar and type 30 7 Click in the Fy field of the Coordinates bar and enter the value 0 The force now has the magnitude and direction stated in the problem description The arrow representing the force now extends past the left edge of the simulation window to reflect the increased magnitude of the force Do not attempt to scroll or zoom the simulation window to fit the force arrow it will be resized later see Scaling the Vectors on page 1 20 1 6 Positioning the Rod In this ex
44. e SaveFileName Filename 6 16 Exercise 6 Scripting This statement calls up a dialog box that prompts you for a filename to which the Working Model 2D data should be saved The string FName stores the filename you select Enter If FName Empty Then Exit Sub If the file you selected is empty which only happens when you click Cancel in the dialog box then the script terminates Enter Open FName for Output As 1 This statement opens the file you selected in step 11 We will write our data to this file Now you will write a loop that tells Working Model 2D to process the simulation for bar lengths of 3 7 to 4 1 increments of 0 1 10 11 12 13 14 15 Enter For i 3 7 To 4 1 Step 0 1 This creates a loop that starts counting at 3 7 and goes up by 0 1 until it reaches 4 1 The variable i is the counter that keeps track of the loop s progress Indent one tab and enter Doc Reset This resets the simulation prior to each run Enter Bar Height Value i This sets the height of the bar to i which will initially equal 3 7 and go up by 0 1 until it reaches 4 1 Enter Doc Run 41 The statement runs the simulation for 41 frames enough frames so that bar CD completes one full revolution Enter Max1 VelMeter Column 2 Cell Value This assigns the value of the velocity meter s second field the Vmax field to Maxl The velocity meter s Vmax field contains the max velo
45. e fast Integration Step Kutta Merson accurate Automatic Overlap Error A C 0o02 m Warnings T Inaccurate integration G Assembly Error 5 Siomai JV Initial body overlap E 000e 4 m y T Redundant constraints os _ Automatic PM Inconsistent constraints Significant Digits al By default the box titled Animation Step is set to Automatic The numbers below it show the current frame rate You will change the frame rate to 0 01s or 100Hz By making this change you are choosing to send measurements data to MATLAB 100 times per simulated second To change the time step size 6 Click the radio bution by the frame rate numbers and enter 0 01 in the top field or enter 100 in the bottom field see Figure 5 1 In order to simplify Working Model 2D s computational effort you will use a fixed time step for integration By default Working Model 2D may decide to compute one animation frame by subdividing it into smaller frames This feature is useful to ensure accuracy especially when an object is experiencing a high acceleration However in this model the vehicle is unlikely to undergo a high velocity change since its speed is monitored by a control system 7 IMPORTANT In the Integration Step field of the Simulation Accuracy dialog click the radio button labeled Fixed 5 3 Creating the Vehicle and Track 5 5 Working Model 2D will now always perform one animation frame with a single integration
46. e 1 19 Join bution Figure 1 20 Roawithh ointsanclotgoined 1 4 Creating the Slot Joints 1 15 Buttonis INACTIVE ACTIVE Jon Join Selection CANNOT CAN be Joined 2 Click the Join button in the Toolbar The point is joined to the slot The rod moves if necessary to satisfy the constraint To separate the joint you can select the slot or the point and click the Split button in the Toolbar A portion of the rod may have moved out of view If so scroll the window so that the entire rod is visible 3 Select the bottom point and while holding the Shift key down select the vertical slot 4 Click the Join button in the Toolbar Your model should resemble Figure 1 20 The Smart Editor will keep joints together during editing To see this de select everything by clicking once on the background or else points and slots may be dragged Then try dragging the rod The rod will stay constrained to the slots as it is dragged When you are done dragging the rod move it back to the approximate position shown in the problem description on the first page of this exercise 1 16 Exercise 1 A Double Slotted Rod Figure 1 21 Force attached to the rod 1 5 Creating the Force A 30 pound force is applied to the top of the rod The force will be created with the Force tool It will be sized and positioned using the Coordinates bar The following steps demonstrate how to create the force and position it as state
47. e control point coordinates is initially located at the frame of reference FOR of the object to which the slot is attached in our example the center of the disk If you move the curved slot the position of its FOR will change accordingly Reshaping a curved slot does not affect its FOR 4 Select one of the coordinate pairs and type in different values to see how the change affects the shape of the curve Working Model 2D highlights the control point on the slot when you select its coordinates in the Geometry window 5 Select one of the coordinates and click the Delete or Insert button to delete or insert a control point The Insert button clones the selected control point Enter new coordinate values to make the new point distinct from the original To create the precise geometry for your model the Tutorial folder directory contains a text file titled CAMPOINT TXT The file contains the polar coordinates of the 18 control points necessary to generate the shape of the cam you use in this exercise 4 3 Creating the Cam 4 11 6 Open the control points file CAMPOINT TXT located in the Tutorial folder directory in the Working Model 2D installation folder directory You can use a text editor such as Notepad on Windows systems or SimpleText on MacOS systems a spreadsheet program or a word processing program to open the text file If you do not have access to any of the programs mentioned above or do not know how to u
48. e we will not be needing the Appearance window for the rest of the exercise close the window by Windows clicking the box marked X at the top right corner of the window or MacOS clicking the box at the top left corner of the window Attaching a Slot to the Background The cylinder walls of the engine will be modeled with a keyed slot joint The joint will be made by joining the square point on the piston to a slot attached to the background The slot can be located anywhere on the background as long as it is located on the crankshaft s centerline the y axis for this model To create and position the slot on the background Figure 2 10 The points which will be joined 2 5 Creating Joints 2 13 1 Choose the Vertical Slot tool in the Toolbar On MacOS systems the Vertical Slot tool may be hidden in the Slot pop up palette Click and hold on the Slot tool in the Toolbar to bring the pop up palette in view 2 Place the pointer near the point element attached to the origin Find the snap point 3 Click when the snap point is visible A vertical slot appears 2 5 Creating Joints In this exercise there are four joints see Figure 2 10 The joints will connect the piston to the slot the piston to the connecting rod the connecting rod to the crankshaft and the crankshaft to the main bearing The following steps will demonstrate how to make these joints Join Join Join Joining the Piston to the
49. each mouse click To zoom out while the Zoom In tool is selected press the Shift key a will appear in the magnifying glass pointer and click Click the Arrow tool in the Toolbar or press the spacebar to deselect the Zoom In tool The pointer reverts to the standard arrow The simulation window should resemble Figure 1 9 untitled x _ 4 500 ft y 0 500 ft hl 4 000 ft w 0 350 ft Setting the Weight of the Rod The rod in this exercise weighs 60 Ibs To set the rod s weight 1 2 Select the rod Choose Properties from the Window menu Figure 1 10 Properties window for a rectangle 1 4 Creating the Slot Joints 1 9 The Properties window appears Figure 1 10 The window can also be displayed by double clicking on the object or by pressing Command I MacOS or Control I Windows The Properties window shows various editable parameters of the selected object s Some of the parameters such as position and orientation are also shown in the Coordinates bar for quick access operties Body 1 Rectangle Rectangle a70 R yft7s0 apoo Ve poo ft sec Vy Joo ft sec v 0 000 sec material Standard mass 0 287 stat fric Jo300 Kinfric 0 300 elastic psa charge 23985 statcoul density 0 205 Ibeft 2 Planar x moment 0 385 ib ft 2 3 Enter the value 60 in the mass field 1 4 Creating the Slot Joints Joints i
50. ect the center point on the crankshaft circle 4 Click the Join button The crankshaft circle moves to the origin To see how the circle representing the crankshaft is constrained bring the mouse pointer over the circle hold down the mouse button and drag the circle The circle can rotate but is fixed to the Base Pin Joining the Components The piston connecting rod and crankshaft will now be joined together see Figure 2 13 The following steps describe how to join them 2 16 Exercise 2 A Piston Engine Figure 2 13 Joining the components Join To join the piston to the connecting rod 1 Select the round point on the piston and while holding the Shift key down select the top point on the connecting rod 2 Click the Join button Join The two objects will come together To join the connecting rod to the crankshaft 1 Select the bottom point on the connecting rod and while holding the Shift key down select the remaining left point on the crankshaft 2 Click the Join button Join Your screen should resemble Figure 2 14 below Figure 2 14 The completed engine Figure 2 15 Editing the collision property of a pair of bodies 2 5 Creating Joints 2 17 The Smart Editor keeps joints together during editing To see this try dragging the connecting rod The connecting rod will stay joined while it is dragged and the crankshaft and piston will move according
51. ed Figure 1 28 2 Repeat for the vertical slot A meter can be moved to any location on the screen Simply select the meter and drag it to a new location 1 22 Exercise 1 A Double Slotted Rod Figure 1 28 Force meters added to the simulation Figure 1 29 The x y graph of the angular acceleration is displayed Force of Slot Joint 5 Fx Ib Fy Ib FI lb To create the angular acceleration digital meter 1 Select the rod 2 Choose Acceleration from the Measure menu and Rotation Graph from the Acceleration submenu An x y graph of the angular acceleration of the rod will appear see Figure 1 29 Fx DFF Force of Slot Joint 5 Gg Force of Slot Joint 7 Fy Figure 1 30 A digital force meter Figure 1 31 Changing the meter type 1 9 Checking the Answers 1 23 Customizing the Meters This exercise requires only the magnitudes of the forces on the slots Thus some of the properties displayed by the force meters should be hidden For this example the total force on the slots IFI is the only value of interest Fx and Fy will be switched off Also if a numerical value for the angular acceleration is desired rather than a graph it too can be displayed To modify meter displays 1 Click the Fy and Fy buttons on the left side of the Force meters see Figure 1 30 Force of Slot Joint 5 Click here to hide 2 On MacOS systems click and hold the arrow in the top
52. ed to the cam disk Verifying Your Model Figure 4 20 Dragging the cam disk 4A Creating Cam Followers 4 19 To verify the construction of your model rotate the cam disk and make sure the followers indeed follow the cam rotation 1 Click the cam disk away from its center and the slots hold down the mouse button and drag slowly as if you were trying to rotate the disk The cam followers move as the cam rotates see Figure 4 20 Tf you selected slots or the motor by mistake and wound up dragging them simply choose Undo from the Edit menu and start over If the rectangles do not follow the cam they may not have been attached properly to the curved slots Go back to the appropriate sections in this tutorial and review your steps To restore the initial conditions 1 Select the circle 2 Inthe Coordinates bar enter 0 in the field labeled The rotation angle of the disk is reset to 0 and the cam followers are repositioned accordingly 4 20 Exercise 4 A Belt Driven Camshaft 4 5 Constructing the Drive Mechanism You will now construct a motor and drive disk and then attach them to the cam to simulate a belt drive mechanism Creating the Drive Disk You will use the Circle tool to construct a drive disk 1 Click the Circle tool in the Toolbar 2 As you constructed the cam disk create a circle according to the specifications shown in Figure 4 21 The Coordinates bar should indicate
53. eeeeeeeeeeeeeens 1 9 Attaching Points to the ROd ceeeeesceceseceececeeeeeeneceeneecnaeceeeeeeaeeesees 1 11 Naming Key Elements of the Model cece eeeceececeneeesteeeeeeeereeeneeeeees 1 11 Creating the Slots aarin neee eenei E a E EEE e Ee Ee sS 1 13 Joining the Points to the Slots esessseseseeseseeeseseeessreeresreereserrrsresreseees 1 14 1 5 Creat the Force i scies sessed s Ae o a bach cv tess bvtacesete de E EE Sates E ES 1 16 1 6 Positioning the Rod ss casssitsevsescssssdus cssah satan esse sstases sbaas E a ax ee Ee 1 17 1 7 Running the Simulation eee ceececneeceeceeeaeecaeeeaeeeaecaeeeneeeaeeaeeens 1 18 1 8 Measuring Properties from the Simulation eee eeeeseeceeeseeeeeeees 1 18 Displaying Vectors secs ie o cece E RE EEE EEE EE EE NENTE SEEE 1 19 Scaling the Vectors isese ansir E Aee a Es Ee EEEE 1 20 Displaying Digital Meters ecceesccesceceercesceeeeeeesceceeeecsaeeeeeeeeaeeenees 1 21 Customizing the Metersis cisceccssscusstpstevdtesssessnassousesstecssevseedbeeseesonesoes 1 23 1 9 Checking the Answers ss c0scccsiciseh eare reorient e EEEE E E E ES EER 1 23 A Piston EPR aia le ithaca lactacin 2 1 21i WtROUUCH OM k nse o ae EN A E E EE SREE 2 2 2 2 Setting Up the Workspace essseseseeeesereseseeesrsrertsreerssrerrnsesresresenserrrsresrentss 2 2 2 3 Creating the Components eee cee cseeereeeeeeeeeeeeeeeeeesecesecaeceeeeseeaeenaees 2 3 Creating the Crankshaft 0 0 0 0 cece ceee
54. em in the Numbers and Units dialog 3 1 Introduction Structural engineers particularly those in the western United States need to test buildings for their integrity against the forces of earthquakes To test structures they often build a scale model and place it on a specially designed piece of equipment known as a shake table A shake table is often actuated by hydraulic cylinders which are capable of mimicking the lateral motions of an earthquake In this exercise you will build a model structure from rectangular bodies You will create a shake table on which to test the building s integrity The shake table will be composed of a large rectangle attached to the background by a keyed slot joint The earthquake motion will be provided by an actuator 3 2 Setting Up the Workspace For this exercise the workspace needs two changes the units system and the addition of the x y axes Working Model 2D uses SI units kilogram meters seconds by default This exercise uses the English unit system of pounds and feet To change the unit system 1 Choose Numbers and Units from the Views menu The Numbers and Units dialog appears 2 Choose English Pounds from the Units System pop up menu see Figure 3 1 Astronomical Atomic CGS Numbers and Units Custom Numbers Fixed Point Floating Point Auto 13 digits English pounds English slugs v SI degrees
55. ement is sent to the MATLAB variable u In the same fashion establish the links as shown in the following table Make sure you click the Connect radio button for each link Verify the object ID numbers with your model They may differ in your model L For MATLAB this field should always be engine instead of communi cating with a document Working Model 2D needs to establish a link with the MATLAB engine 5 22 Exercise 5 Cruise Control using MATLAB Description Working Model 2D MATLAB object name variable name Meter for x component output 16 y1 of the force u Meter for speed error output 14 y1 err u Control for x input 15 component of the force Next specify the commands to be executed by MATLAB at each simulation step 9 Inthe Initialize and Execute fields of the Properties window for the Application Interface enter for Initialize u 0 This command tells MATLAB that the force measurement is zero to begin with for Execute u krctrl2 err u The function call is the implementation of the control system shown in Figure 5 13 MATLAB will execute this function call at every simulation step Remember krctrl2 is the name of the PID feedback control function mentioned in Implementing the Control Function on page 5 16 Overall your Properties window for the Application Interface should look like the one in Figure 5 17 Figure 5 17 Completed Properties window for the extemal
56. en The Properties window appears Figure 5 16 Click here to specify the aoplicatio slat executable file e g MATLAB BE pplication D t Click here to type the Teen document used in the Outpur 1 2 91 7 application e g engine C Connect Disconnect varane Click here for the pop up menu of Working Model 2D Meter objects Initialize their individual fields y1 y2 y3 y4 Execute coo _ _ g Input 15 x Click here of the pop up menu e Connect Disconnect the Working Model 2D Control vaito objects Timeout 30 000 s 5 4 Implementing the Control System 5 21 To let Working Model 2D know that it is going to exchange data with MATLAB 3 Click the Application button in the Properties window A file dialog box appears Look for your installation of MATLAB and select MATLAB EXE in its bin directory Click OK Enter engine in the Document field You want Working Model 2D to exchange data with the MATLAB engine To link the Controls and Meters of Working Model 2D with MATLAB variables 6 Click on the Output pulldown menu and select the Meter object that measures the value of the Control object for the force The name will be something like output 16 y1 although the number 16 may be different in your model You can find out the ID number using the Status bar Click the Connect radio button and type u in the Variable field The current force measur
57. enote that the point coordinate was generated as a snap point These fields show the coordinates of the Base Point In this example the point is attached to 0 0 of the background nie These fields show the coordinates of the other point of the pin joint In this example the point is attached to 0 0 of the disk 4 6 Exercise 4 A Belt Driven Camshaft Figure 4 5 Slot Pop up palette MacOS only Drawing the Curved Slot For this exercise you will create a closed curved slot that defines the motion of the cam followers First you will create an arbitrarily shaped curved slot on the disk and reshape the slot graphically Then you will define the precise geometry of the curved slot A curved slot consists of a sequence of control points Working Model 2D uses a mathematical algorithm called cubic interpolation or cubic spline to construct smooth curves between the control points The spline algorithm is well known and widely used in the fields of computer aided design and computer graphics To create a curved slot 1 Choose the Closed Curved Slot tool in the Toolbar On MacOS systems the Closed Curved Slot tool is hidden in the Slot pop up palette by default Click and hold on the Slot tool in the Toolbar to bring the Slot pop up palette in view Figure 4 5 Observe that the pointer changes to a crosshair 2 Click once anywhere within the disk As
58. ercise the initial rotation of the long axis of the rod is 60 counterclockwise from the positive x direction The rectangle must be rotated to match the exercise The Rotate tool could be used to graphically rotate the rod when precision is required however the value should be entered in the Properties window To position the rod accurately 1 Click the rod to select it 2 Click the field rotation of the Coordinates bar and enter the value 30 The rod will rotate 30 clockwise Figure 1 23 In Working Model 2D positive rotation is measured counter clockwise from the positive x axis Notice that the x and y positions of the rod change so that the two slot constraints remain satisfied 1 18 Exercise 1 A Double Slotted Rod Figure 1 23 Rod after rotation 1 7 Running the Simulation The simulation is now ready to run To run the simulation 1 Click the Run button in the Toolbar On MacOS systems the Run button changes to a Stop button while the simulation is running The rod oscillates up and down You must always reset the simulation before attempting editing If you do not the initial conditions of the simulation will be affected 2 Click the Reset button in the Toolbar 1 Measurin ropertiefonmhSimulation The initial forces on the joints and the initial angular acceleration of the rod must be measured Working Model 2D allows you to measure and represent physical properties s
59. ercise the units of measurement need to be changed from the default SI unit system to the English unit system and the window re sized to fit the dimensions of our linkage 1 Choose Numbers and Units from the View menu The Numbers and Units dialog appears 2 Choose English pounds from the Unit System pop up menu see Figure 6 1 Numbers and Units x Numbers Unit System Fixed Point SI degrees z C Floating Point 3 Digits Cancel Astronomical e Auto More Choices Atomic Custom Enalish pounds bs SI degrees SI radians 3 Click OK 4 Choose View Size from the View menu The View Size dialog appears 5 Enter 18 in the Window Width field Figure 6 2 You need to change the window width to accommodate the small dimensions of the linkage View Size Objects on screen are o0z times actual size Window width 8 215 in Beene 6 4 Exercise 6 Scripting Because the motion of this linkage is constrained to a horizontal plane we will disregard the effects of gravity 6 Choose Gravity from the World menu The Gravity dialog appears 7 Select None and click OK 6 3 Creating the Components This exercise has three bodies two 6 x 1 steel bars and a 3 7 x 1 bar The objects will be created sized and modified manually in the following steps Then a motor will be added to drive the linkage Finally we will create an output meter t
60. erenced at the end of Appendix A Technical Information in the Working Model 2D User s Manual further covers implementation of the PID control To implement this function 1 Launch MATLAB on your computer Make sure you have MATLAB version 4 2 or greater 2 Load the M file KRCTRL2 M into MATLAB If you do not have access to the file create it by typing the above MATLAB script You should test to see if the function is properly defined and implemented Type the following three lines at the MATLAB command window prompt global el el 1 kretrl12 1 1 and the function should return the value ans 10 8080 5 18 Exercise 5 Cruise Control using MATLAB Linking MATLAB with Working Mode 2D Before establishing the link between Working Model 2D and MATLAB you will create appropriate Control and Meter objects These objects will serve as the inputs and outputs of the control system Creating Inputs and Outputs The first Control object needed is the one that specifies the desired speed of the vehicle The value specified in this Control object will be used to compute the current speed error the difference between the desired speed and the current speed of the vehicle 1 Click once on the background to make sure no object is currently selected 2 Choose New Control from the Define menu and Generic Control from the submenu A slider bar appears 3 Open the Properties window for the Control object and set the min
61. erties window and select Bottom Slot Pin 1 20 Exercise 1 A Double Slotted Rod Figure 1 26 Scaling the veciors 5 Choose Vectors from the Define menu and Total Force from the Vectors submenu 6 Run the simulation Like the force object the vectors do not fit on the screen 7 Click Reset Scaling the Vectors The vectors must be scaled to fit on the screen To scale the vectors 1 Choose Vector Lengths from the Define menu The Vector Length dialog Figure 1 26 appears Vector Lengths Eg Velocity Acceleration Force 24 Se es 1 I Long Cancel IE GE LE Shot fo 067 fo o40 0 040 2 Click in the Force Vector field 3 Enter a smaller value and press Tab to immediately see the change in the simulation window Repeat until the vectors fit nicely into the window try 0 0007 Click OK when done Your model is now complete and should resemble Figure 1 27 Notice that changing the force vector scale affects the displayed length of the force object attached to the top of the rod as well Figure 1 27 Completed mode 1 8 Measuring Properties from the Simulation 1 21 Total Force Vectors Displaying Digital Meters Three digital meters are required for this exercise two force meters for the slots and one angular acceleration meter for the rod To create the slot force digital meters 1 Select the horizontal slot and choose Force from the Measure menu A force meter is creat
62. essssspstsckcossesecsvasuvacaiosssga NSE es 3 9 Creating the ColuM Se a cece E oreo erea E EEEE EEE EEEE EE EEE 3 10 Creating the Floor Beams cs cssessssuspessessesesestyacveassoesvsasteseeaschaueoencbeteoses 3 12 3 5 Creating the Second Story seseesereresesrerersrereseerersreresserersreressenerereresserers 3 13 Creating the Columns sciicccsc ccs sion ese Eiaeai ipere osora Sisir taseh 3 13 Creating the Roof Beams iieo eee rE oeiee E EESE ee 3 15 Modifying Elasticity and Friction sseessseeesseeessseeesreersrrersseseresesreeres 3 16 3 6 Decreasing the Integrator ErfOr esssesesseesesessesreeresersrssrerrsreersseerenresrenreees 3 16 3 7 Running the Simulation eee seeneeeseesseenee sees seeneecneesseeseesneesneenees 3 17 Exercise 4 Exercise 5 Exercise 6 A Belt Drivern Carmshat ssssssssssssssssssssssesssssssessmuusunsusnsssoesseseeseneensuaae 41 AT lt IMthOGUct ons i e ioare r E EEE EE EE EEE EEEE EEEE E REEE EES 4 2 4 2 Setting Up the Workspace srine nere E E ress 4 2 4 3 Creating the Came sci icdes eset bai ites naoek ar a setet DTE e as KE eS EVERE EENS 4 3 Drawing the Disk rne uaa aaraa i iaa EENE a EEr EIS 4 4 Attaching the Disk to the Background sessesseseeeesseeeesresrseerresesesereees 4 5 Drawing the Curved Slotis c sc sesssciscesssssccssiesscoscsegseeobeseacdenassabyepessbosssan ene 4 6 Changing the Shape of the Curved Slot ee ceeeeecseecreeereeeeeeeeees 4 7 4 4 Creating Cam Foll
63. et the size of the rod 1 Click the Height field of the Coordinates bar and enter the value 500 2 Click the Width field of the Coordinates bar and enter the value 100 Your screen should resemble Figure 2 6 2 8 Exercise 2 A Piston Engine Figure 2 6 The piston crankshaft and connecting rod 2 4 Creating the Points for Joining The objects in this exercise are connected to each other and to the background see Figure 2 7 below The connections will be modeled by creating points and joining them These points will be created with the Point tool and accurately positioned using the Properties window Figure 2 7 The points which will be created and their coordinates 0 0 0 250 0 250 0 0 C2500 44 Creating Points on the Connecting Rod To create and position the points of the connecting rod e 1 Double click the Point tool in the Toolbar Figure 2 8 Connecting rod points in position 2 4 Creating the Points for Joining 2 9 Double clicking selects a tool for successive operations On MacOS systems the difference between single and double clicking is indicated in the Toolbar by shading a double clicked item is dark grey while a single clicked item is light grey 2 Place the mouse pointer over the connecting rod rectangle Find the snap point at the top end of the connecting rod An X symbol appears at snap points Find the snap point located at the
64. framef yl It inputi 4 sign body 1 v x lbody 1 vI n Auto Min Max xm foo 000 yi m joo oo y2 N a yala ee y4 el You will create an input control that will act as a throttle for the force The value of this input will be calculated in MATLAB and sent to Working Model 2D over the DDE link 8 Select the force object that is attached to the vehicle Choose New Control from the Define menu and X force from the submenu 5 20 Exercise 5 Cruise Control using MATLAB Establishing DDE Link with MATLAB Figure 5 16 Properties window for an extemal application interface Another slider bar appears You need a meter measuring the force because our PID control system needs to know the up to date magnitude of the force during simulation 9 Select the Control object for the force and choose Conitrol s Value from the Measure menu Both Meter and Control objects are necessary because a Control object in Working Model 2D can only receive data from an external application whereas a Meter object can only send data To establish the link with MATLAB 1 Choose New Application Interface from the Define menu A new icon appears in the Working Model 2D workspace This is an object that specifies a link between the Control Meter objects of Working Model 2D and variables used in another applications such as MATLAB 2 Select the Interface object you just created and open the Properties window if it is not already op
65. gure 4 2 and enter 0 1 in the Objects on screen are X times actual size field Objects on screen are URL ime When you enter a value into one field Working Model 2D Window width 1 425 automatically computes the other Cancel 4 3 Creating the Cam The cam consists of a circular rotating body disk with a curved slot grooved on it The disk is attached to the background with a pin joint 4 4 Exercise 4 A Belt Driven Camshaft Drawing the Disk The disk in this exercise is 40 centimeters in diameter and will be located at the origin Instead of drawing locating and resizing the disk using the Coordinates bar you will directly draw a disk of the desired size located at the origin Ol 1 Click the Circle tool in the Toolbar 2 Move the pointer near the point 0 2 0 2 in the workspace Don t click yet Notice that a snap point symbol an X appears at the grid intersection While the snap point symbols appear at each grid division the dotted lines in the rulers indicating the x y position of the pointer snap precisely to every division of the ruler The numbers shown in the Coordinates bar also snap to each ruler division 3 When the snap point symbol is visible at 0 2 0 2 click the mouse button Move the pointer diagonally down and to the right Observe that the Coordinate bar tracks the information regarding the circle as shown in Figure 4 3 below Figure 4 3 Coordinates bar wh
66. he Window menu The Appearance window appears The name field has the default name Curved Slot Joint as shown in Figure 5 4 Appearance Constraint 6 Culid M Show Curved Slot Joint F Show name Color E M Track 5 Enter Front Point Slot in the name field We will attach the front point of the vehicle to this slot later 6 Select the original slot Enter Center Point Slot in the name field We will attach the center point of the vehicle to this slot later You can align the two slots in one of two ways e You can drag the duplicated curved slot so that the curves match If you have Grid Snap activated you can easily align the two slots e Using the Coordinates bar you can inspect the position of the FOR frame of reference of the original slot it should be 0 0 0 0 Select the duplicate slot and type the identical coordinates in the Coordinates bar as shown in Figure 5 5 Coordinates of the Frame of Reference for the duplicated slot Enter 0 0 in both the x and y fields to align the slot with the original slot 0 200 m y 0 200 m 0 000 5 8 Exercise 5 Cruise Control using MATLAB 7 Align the two slots using one of the two methods described above Creating the Vehicle You will use a square object to model the vehicle a 1 Click the Square tool in the Toolbar On MacOS systems the Square tool may be hidden in the Rectangle Square pop up palette If
67. ile creating a circle yT AEREE TTT TITTY i TTP TTT TT T ARERIA LLES LEREN 0 800 0 600 0 400 0 200 0 000 0 400 0 400 x __0 000 m y 0 000 m r _0 200 m __0 000 Radius of the circle Position of the center of the circle Orientation of the circle Figure 4 4 Coordinates bar for the pin joint 43 CreatingtheCam 4 5 4 When the snap point is visible at 0 2 0 2 the Coordinates bar shows a radius of 0 2 and the center position as 0 0 0 0 as shown in Figure 4 3 Click again to complete the circle You now have a disk with a diameter of precisely 40 centimeters 0 4 meters located at the origin If necessary the Coordinates bar allows you to verify and modify the dimension and position of the disk Attaching the Disk to the Background You will use a pin joint to attach the disk to the background at the origin 1 Click the Pin Joint tool in the Toolbar 2 Move the pointer to the center of the disk Look for the snap point at the center 3 Click when the snap point is visible 4 Verify the location using the Coordinates bar The Coordinates bar should resemble Figure 4 4 The coordinate values for the disk attachment point are given as 0 0 instead of 0 0 because Working Model 2D automatically generates parametric formulas for snap points to maintain their relative positions as objects are resized Since 0 0 is not a formula expression a pair of parentheses is added to d
68. imum and maximum values to 0 1 and 10 0 respectively To name this Control object 4 Open the Appearance window and name the Control object Vehicle Speed Be sure the Show Name option is checked see Figure 5 14 Figure 514 Appearance Appearance window for a control ETERA T Show object Vehicle Speed M Show name Color E You also need to measure the error in vehicle speed 5 Choose Time from the Measure menu A meter showing the time count appears This meter is a clock that shows the elapsed time of the simulation and how each frame corresponds to real time Figure 5 15 Speed Error meter 5 4 Implementing the Control System 5 19 The Time meter in itself is not useful for the control system You will rewrite the definition of the meter so that it measures the speed error 6 Open the Properties window for the Time meter Overwrite the Equation field for y1 as follows input sign body v x body v where is the object ID number of the speed control you just created and is the object ID number of the square object representing the vehicle To find out the ID numbers simply move the pointer over an object and the Status bar shows you the type of the object and its ID number 7 Name the meter Speed Error as you did in step 4 The Properties window should resemble Figure 5 15 enlarge the window for easier viewing Label Equation x frame
69. k the Motor tool 2 Bring the pointer over point D Figure 6 8 and find the snap point o Place motor here 41 750 in y 2500 in 3 Click when the snap point is visible The motor connects the bar CD to the background The exercise calls for a constant velocity of 360 sec to be applied to the linkage To set the motor s velocity 1 Double click on the motor to open the Properties window if it is not already open 2 Enter 360 to set the motor s rotational velocity to 360 sec 6 10 Exercise 6 Scripting Testing Parametrics Working Model 2D s parametrics feature will automatically rebuild a model for you after any change in the design To see how parametrics works we will resize one of the bars and watch Working Model 2D automatically update the design while maintaining all connection and dimension constraints 1 Select bar AB the left bar 2 Change its height to 5 0 in the Coordinates bar and press Return or Enter Working Model 2D automatically rebuilds your model Notice that the relative positions of constraints such as pin joints and motor are preserved 3 Change the height of bar AB back to 6 0 Adding an Output Meter To measure the maximum velocity of point E we need an output meter The output meter will show both the current velocity of the point and the maximum velocity of the point throughout the run Later we will use the script to take the maximum velocit
70. l Force Meters To display the digital force meters 1 Select the crankshaft main bearing joint see Figure 2 19 2 22 Exercise 2 A Piston Engine Figure 2 19 The forces to be measured Crankshaft Connecting rod main bearing crankshaft joint joint 2 Choose Force from the Measure menu A digital meter appears 3 Repeat for the connecting rod crankshaft joint see Figure 2 19 A second digital meter appears You may need to move the meters To move the meters 1 Select a meter 2 Drag it to any position you wish Your window should resemble Figure 2 20 Figure 2 20 w fi Velocity of Circle s The completed workspace Figure 2 21 Appearance window for a meter 2 8 Running the Simulation 2 23 2 8 Running the Simulation Run the simulation Notice that the angular velocity increases until it reaches 35 rad s This is so because we have turned off the force above 35 rad s just as a rev limiter turns off the ignition of an engine above a certain speed Modifying the Graph Display You may notice that the axis labels occlude the numeric labels along the tickmarks of the plot You can modify the display options using the Appearance window For example to turn off axis labels so that the numeric labels clearly appear 1 Select the velocity meter on the screen 2 Choose Appearance in the Window menu Alternatively you could press Control J on Windows systems or Command J on MacOS s
71. lation You can click the Reset button and then click the Run button again to playback what you just saw because Working Model 2D automatically saves the data from the previous simulation You will see the slider bar move up and down on its own completely mimicking the action you have taken in the previous simulation If you change anything in MATLAB you need to erase the simulation history in order to force Working Model 2D to recompute the simulation Working Model 2D has no way of detecting changes that occur in external applications To erase the simulation history 1 Click the Reset button in the Toolbar 2 Choose Start Here from the World menu Alternatively you can press Ctrlt H Windows or Command H MacOS If the option is dimmed the simulation history is already erased or you have not run the simulation 3 Click the Run button again to start over L The variable e1 is recycled in MATLAB as a global variable to store the error term of the previous step in each integration cycle The scheme is necessary for the discrete PID control function 5 5 Running the Simulation 5 25 Modifying the Simulation You may notice that the force initially overcompensates that is the speed may deviate slightly from the speed you specified You can improve the simulation model in several ways as follows e Modify the constants kp k kqin the control function to optimize the PID feedback for the particular geometry
72. left corner of the angular acceleration meter and choose the Digital option from the pop up menu see Figure 1 31 On Windows systems click the arrow in top left corner of the meter With each click the meter type cycles from Digital Graph Bar and Digital again Digital on of Rectangle 1 1 9 Checking the Answers Congratulations Exercise 1 is now completed Run the simulation and reset to check the answers 1 24 Exercise 1 A Double Slotted Rod Figure 1 32 The final screen Your final screen should resemble Figure 1 32 below iw fi Force of Slot Joint 5S Fx FFs 0 000 1b H Fy 68 220 Ib H FI 68 220b f fw Force of Slot Joint 7E Hx Hr 0 000 Ib i Fu Hey 15 763 1b UF Hil 15 763 1b i Ag 252 546 sec H Compare your answers with those below Force at point A eessccssseeessseeenee one Force at point Bowes eee eeeeees Angular Acceleration 250 sec 2 1 EXERCISE 2 A Piston Engine In the two cycle piston engine shown explosive gases are ignited in the combustion chamber above the piston The explosions apply a force of 100 N for the duration of every downward stroke The engine is equipped with a speed limiting device rev limiter which prevents the rotational speed from exceeding a set value red line The masses of the piston and connecting rod are 1 kg and 2 kg respectively The mass of the crankshaft flywheel
73. ly When you are done dragging the rod move it back to the approximate position shown in the problem description on the first page of this exercise Preventing a Collision In Working Model 2D objects which are directly connected to each other never collide Notice that the piston and crankshaft may overlap when they are dragged during editing Since the two objects are not directly connected they will collide when you run the simulation To prevent the collision the Do Not Collide command will be used To prevent a collision 1 Select the piston and while holding the Shift key down select the crankshaft 2 Click and hold on the Object menu title in the menu bar Figure 2 15 Notice that there is a checkmark beside Collide indicating that the pair of selected objects will collide when you run the simulation Object Join Split 3 Mowe To Front F Send To Back 6 v Collide Do Not Collide Font Size Style vvv Attach Picture Attach to Body B Convert Objects 3 Choose Do Not Collide in the Object menu 2 18 Exercise 2 A Piston Engine Figure 2 16 Creating a force 2 6 Creating the Force A 100 N force is applied at the top of the piston in the negative y direction down The force is only active while the piston is traveling with a negative y velocity The force will be drawn using the Force tool and its magnitude and location will be set using the Properties window D
74. ly difference from using MATLAB is that you would be implementing a control function using spreadsheet cells instead of variables Exercise 5 Concepts e Simulating a keyed curved slot using two identical pinned curved slot joints e Using external application interface to exchange data with MATLAB e Implementing a well known control system 5 1 Introduction Modern automobiles often feature a cruise control system The system monitors the actual speed of the vehicle and computes the appropriate throttle setting in order to maintain the constant speed specified by the driver The speed is maintained regardless of wind resistance gravitational pull or curvature of the road In our exercise the vehicle is modeled as a rectangular body sliding ona curved slot under the action of a force The curved slot models a hilly road going up and down The force models the propulsion generated by the vehicle s engine and is controlled by its cruise control system This exercise covers many advanced features implemented in Working Model 2D You will perform the following tasks in order e set up the workspace and accuracy for the simulation e create a curved track and the vehicle e attach the vehicle to the track and apply a force on the vehicle e write the control system function in MATLAB e set up Control Meter objects in Working Model 2D Setting the Unit System SettingintegratioRarameter 5 2 Setting Up the Workspace 5
75. mensions and the Properties window will be used to set its mass It will then be duplicated to create the second column To draw the rectangle 1 Click the Rectangle Tool in the Toolbar 2 Click the background and drag out a rectangle The dimensions of the column are 10 high and 2 wide We will position and size the rectangle exactly using the Coordinates bar 1 Select the rectangle if it is not already selected 2 Click the X field of the Coordinates bar and enter 0 3 Tab to the Y field of the Coordinates bar and enter 5 Figure 3 11 First story columns in place 3 4 Creating the First Story 3 11 4 Tab to the Height field of the Coordinates bar and enter 10 5 Tab to the Width field of the Coordinates bar and enter 2 The rectangle is sized and positioned precisely on the shake table To set the mass of the column rectangle 1 Choose Properties from the Window menu 2 Click the Mass field and enter 75 To duplicate the rectangle 1 Select the column rectangle if it is not already selected 2 Choose Duplicate from the Edit menu The Duplicate command can also be selected by pressing Command D MacOS or Control D Windows To position the duplicated column 3 Select the duplicated column 4 Click the X field of the Coordinates bar and enter 11 5 Tab to the Y field of the Coordinates bar and enter 5 Both columns are positioned precisely on the shake table Figure 3 11 3 12
76. midpoint of the top side of the connecting rod 3 To attach a point element click when the snap point located at the top end is visible Observe that the point element is attached to the top end of the rod 4 Inthe same fashion attach another point element to the bottom end of the connecting rod Your screen should resemble Figure 2 8 below Attaching Points to the Crankshaft The crankshaft needs two points a center point representing the main bearing and an outer point representing the connecting rod bearing These points will be accurately positioned at the center and at 250 mm from the center of the circle To create and position the crankshaft points 2 10 Exercise 2 A Piston Engine Figure 2 9 Snap point at the left quadrant of the circle 1 Make sure the Point tool is still selected Place the mouse pointer over the crankshaft Find the snap point at the center of the circle 2 Click when the snap point at the center is visible A point element is attached to the center of the circle 3 Place the mouse pointer near the left quadrant of the circle Find the snap point at the left quadrant Figure 2 9 As the mouse pointer nears the left quadrant of the circle the snap point appears ee gt 4 Click when the snap point at the left quadrant is visible Another point element is attached to the left quadrant of the circle Attaching Points to the Piston Two points need
77. mple dragging mechanism for changing the slot shape The numerical method allows you to position the control points precisely as well as import numerical curve geometry from another application 4 8 Exercise 4 A Belt Driven Camshaft Graphical Reshape Figure 4 7 Curved slot in reshape mode First you will learn how to change the shape graphically Then you will use the numerical method to design the cam used in this opposing cam motion exercise You can reshape the curved slot s shape simply by dragging the control points 1 Choose Reshape in the Edit menu You are now in Reshape mode The control points of the curved slot are shown see Figure 4 7 a Pointer in feshape mode bse 0 800 0 600 0 400 0 200 0 000 0 200 x 0 000 m y 0 000 m r 0 200 m 0 000 2 Drag the control point you would like to move The slot shape changes accordingly You can add or delete control points as well In either case make sure you are in Reshape mode the pointer should be shaped as a boxed cross hair You can also check the Edit menu as shown in Figure 4 8 e To add a control point click on the slot where you want the new control point to be added e To delete a control point click the point you would like to remove and press the Delete or Backspace key 4 3 Creating the Cam 4 9 Figure 4 8 Reshape mode active ape Check mark appears while ondo you are in Resh
78. ms who cannot use the Script Editor can still follow this exercise by running the script file To run the preinstalled script file 1 Choose Run from the Script menu A file browsing dialog appears 2 Open the Tutorials folder and select the file Ex6 WBS 3 Click Open After you run your script take a look at the output data file using a simple text editor such as Notepad on Windows systems or SimpleText on MacOS systems It should resemble Figure 6 13 Velocity 9553171125919 Velocity 7221514012472 Velocity 5790910099863 Velocity 53457 01026936 Velocity 5981122791143 Modifying the Script Go ahead and experiment with your script Try increasing the range of the bar s height Try modifying two bars instead of one Output other data to the file This exercise should give you a preliminary idea of how WM Basic works For more detailed information consult the Working Model Basic User s Manual
79. n Working Model 2D are created by joining elements with the Join command In this exercise there are two slot joints Slot joints are created by joining points to slots Finding Snap Points on the Rod This exercise has two slot joints one at each end of the rod Each slot joint requires a point on the rod To create the points 1 Double click the Point tool in the Toolbar 1 10 Exercise 1 A Double Slotted Rod Double clicking selects a tool for successive operations On MacOS systems the difference between single and double clicking is indicated in the Toolbar by shading a double clicked item is dark grey while a single clicked item is light grey 2 Move the pointer over either end of the rectangle but do not click yet Notice how a small X appears in some key locations The X symbol indicates the locations of Snap Points Figure I 11 Figure 1 11 Finding snap points As you bring the point tool closer to a comer a snap point X appears Working Model 2D allows you to attach points precisely at certain predefined positions on bodies called snap points A rectangle in Working Model 2D has 11 snap points shown in Figure 1 12 Notice how snap points are arranged at midpoints and corners Once an object is attached to a snap point its position relative to the body is preserved even if the body is subsequently reshaped Figure 1 12 Snap Points for a rectangle ne h min width height We now proceed to attach p
80. ndow actually affect the results of a simulation i Appearance Point 2 Point v A Show Point L Show name 4 Track Figure 1 14 Appearance window for a point g Track connect Default name is Point 3 Click the name field of the Appearance window see Figure 1 14 and type Top Slot Pin 4 Click the point element located at the bottom end of the rod Notice that the Appearance window automatically switches to display information for the bottom point element 5 Click the name field of the Appearance window and type Bottom Slot Pin We will later refer to these names To see the list of all objects names simply click the selection pop up menu located in the Appearance window This selection pop up menu is also available in the Properties and Geometry windows Figure 1 15 Body 1 Rectangle Selection pop up menu e Point 2 Bottom Stat Pin p Point 3 Top Slot Pin ie amp Track Oo Track connect 1 4 Creating the Slot Joints 1 13 Creating the Slots Two slots are required for this exercise one horizontal and one vertical The slots will be created using the Slot tools To create the two slots 1 Click the Horizontal Slot tool in the Toolbar 2 Bring the pointer near the origin and find its snap point Figure 1 16 Click when the snap point is visible The horizontal slot is created perfectly aligned with the x axis Figure 1 16 Snap point at the origin Snap p
81. o measure the maximum velocity of point E Creating the Bars The bars will be drawn with the rectangle tool and then resized using the Coordinates bar along the bottom of the screen To draw the bars 1 Double click on the Rectangle tool Double clicking means that the tool can be used repeatedly without having to re select it 2 Drag out three rectangles one on the left one in the center and one on the right Figure 6 3 Three rectangular bodies the beginnings of the linkage 6 3 Creating the Components 6 5 BarCD Height and Width Fields 4 4250 in y 2375 in 4 750 in w250 in 0 000 To size the bars 1 Select the Arrow tool 2 Click once on bar AB 3 In the Coordinates bar set the height of bar AB to 6 0 and set the width to 1 0 see Figure 6 3 4 Select bar BC Set the height to 1 0 and width to 6 0 5 Select rectangle CD Set the width to 1 0 and height to 3 7 To set the bars material to steel 1 Double click on bar AB to open the Properties window 2 Choose Select All from the Edit menu This highlights all the rectangles so you can edit the properties of all three at once 3 Choose steel from the material pop up menu see Figure 6 4 Steel is one of the several preset materials in Working Model 2D 6 6 Exercise 6 Scripting Figure 6 4 Material pop up menu in the Properties window Figure 6 5 Appearance window fora rectangle apoo i VE foo
82. of the curve or the desired speed e Use smaller time steps or use another integration method to run your simulation see Appendix A in the Working Model 2D User s Manual for more details on integration methods Implement a completely different control system in MATLAB The PID control system is only one example of many well known feedback control laws 5 26 Exercise 5 Cruise Control using MATLAB EXERCISE 6 Scripting 6 1 3 7 4 1 KSSSISS NN For the above four bar linkage determine the maximum velocities of point E for 5 different lengths of bar CD Output this data to a file Bar CD starts at 3 7 and gets incremented by 0 1 each simulation Bars AB and BC measure 6 0 x 1 0 and bar CD initially measures 3 7 x 1 0 All bars are made of steel The motor at point D applies a constant velocity of 360 sec The linkage arms all start at 90 angles to each other The mechanism moves in a horizontal plane so you should discount gravity in your calculations 6 2 Exercise 6 Scripting NOTE On MacOS systems the Script Editor requires a PowerPC processor If you are running Working Model 2D on a 680x0 based computer you will be able to run scripts but will not be able to create or edit them You can still perform this exercise however until the end of 6 3 Creating the Components then skip to the note at the end of the next section to run a preinstalled script file
83. oint Using the selection pop up menu select the Front Point Slot Shift select the front point attached to the vehicle You may find it easier if you zoom into the picture first by using the Magnifying tool in the toolbar The Join button will become active 6 Click the Join button in the Toolbar 5 10 Exercise 5 Cruise Control using MATLAB Figure 5 7 Vehicle attached to the slot with two offset pin joints As shown in Figure 5 7 the vehicle should now be attached to the single track Try dragging the vehicle using the mouse You may find that dragging this vehicle is not as fast as dragging other objects since Working Model 2D is constantly computing to maintain the curved slot constraint Oops My Car is Flipped While attaching the second point to the curved slot you may have accidentally flipped the vehicle 180 degrees along the track That is the pin attached to 0 1 0 0 may have actually ended up facing backwards Should this happen simply follow the steps shown below Otherwise skip ahead to Implementing the Driving Force on page 5 11 1 If your vehicle has flipped select the second point the one located at 0 1 meters in front of the vehicle s center and click Split in the Toolbar You are now free to rotate the vehicle 2 Select the Rotate tool in the Toolbar As a short cut you can press the r key on your keyboard 3 As shown in Figure 5 8 rotate the vehicle
84. oint at the ongin 3 Click the Vertical Slot tool in the Toolbar On MacOS systems the Vertical Slot tool is hidden in the Slot pop up palette by default Click and hold on the Horizontal Slot tool to bring the Slot pop up palette in view Figure 1 16 Figure 1 17 Slot pop up palette MacOS only 4 Find the Snap Point at the origin and click 1 14 Exercise 1 A Double Slotted Rod Figure 1 18 Slots located on the x and y axes The vertical slot is created perfectly aligned with the y axis The slots are now created on the background as shown in Figure 1 18 below Joining the Points to the Slots A joint is made by joining two primitive elements When two elements are joined objects move to satisfy the conditions of the joint Joints never come apart even when you drag bodies with the mouse The Working Model 2D Smart Editor allows you to drag bodies around while still satisfying all joints In this exercise a type of joint called a Slot Joint is created A slot joint is made by joining a slot element and a point element The rod requires two slot joints one for the horizontal slot and one for the vertical slot To join the points to the slots 1 Select the top point and while holding the Shift key down select the horizontal slot The word Join on the Join button now turns from gray to black to indicate that the two items can be joined Figure 1 19 Figur
85. oint elements to the rod Figure 1 13 Accuratelpositionegointathe ends of the rod 1 4 Creating the Slot Joints 1 11 Attaching Points to the Rod We will attach a point element to each end of the rod 1 Select the Point tool if you have not already done so 2 Find the snap point at the center of the bottom end of the rod When the snap point symbol appears click to attach a point element 3 Repeat the previous step for the top end of the rod Your model should look like Figure 1 13 Naming Key Elements of the Model Working Model 2D automatically assigns a default name such as Rectangle and Point to each object you create However you will find it extremely helpful to assign more meaningful names to the key elements of your simulation These names will come in very handy when you try to quickly locate a certain object using the Properties window for example For now we will assign names to the top and bottom point elements attached to the rod To assign a name to the point elements 1 Click the point element located at the top end of the rod 1 12 Exercise 1 A Double Slotted Rod The point becomes highlighted 2 Choose Appearance from the Window menu The Appearance window appears Figure 1 14 The Appearance window provides control of how an object appears on the screen The settings in this window pertain only to the appearance of the object none of the settings in this wi
86. operties window marked by enter the value 1 571 The value of 1 571 radians is equivalent to 90 The value will be displayed in a rounded form but internally the correct value will be used The point s y position is set to 50 so it will not interfere with the connecting rod joint To create the point 1 2 Click the Point tool Place the pointer near the center of the square and find the snap point Click when the snap point at the center is visible The point is created at the center of the piston 2 12 Exercise 2 A Piston Engine Attaching a Point to the Background A point representing the main bearing of the crankshaft must be placed on the background The point can be placed anywhere on the background for clarity it will be placed at the origin 0 0 To create and position the point 1 Click the Point tool 2 Place the mouse pointer near the origin Find the snap point that appears at the origin Make sure that no body is obstructing the origin The snap point does not appear if the origin is covered by a body 3 Click when the snap point at the origin is visible Verify the position of the point by noting the x y position in the Coordinates bar it should be 0 0 We now name this point element so that it becomes easier to select later 4 Choose Appearance from the Window menu The Appearance window appears 5 Inthe name field where it says Point type Base Pin Sinc
87. orces at the bearings will be measured 2 2 Setting Up the Workspace For this exercise three changes in the workspace will be made First for clarity the x y axes will be displayed The unit of distance will also be changed from meters default to millimeters 1 Choose Workspace from the View menu and choose X Y Axes from the Workspace submenu MacOS or the Workspace dialog Windows The x y axes provide a reference frame for building a simulation 2 Choose Numbers and Units from the View menu Figure 2 1 Choosingnillimetersaghainibf distance from the Numbers and Units dialog 2 3 Creating the Components 2 3 The Numbers and Units dialog appears Click the More Choices button The dialog box expands Click and hold in the Distance field Figure 2 1 The pop up menu appears Choose millimeters from the Distance pop up menu Numbers and Units Angstroms Centimeters Feet Inches Kilometers Light years e Meters Force N Micrometers Mass Miles Energy J Time millimeters l Pover w Mils Charge Narometers Freeney Parsecs ity enone o oy i veiocity Cater Betri Pat rt ty Rotation The unit of distance changes to millimeters Click in the Rotation field and choose Radians from the pop up menu Click OK 2 3 Creating the Components This exercise has three objects a 2 kg connecting rod a 1 kg piston and a 35 kg crankshaft
88. orizontally on the y axis and positioned just below the x axis To position the rectangle 1 Select the rectangle if it is not already selected 2 Click the X field of the Coordinates bar and enter 0 3 Tab to the Y field of the Coordinates bar and enter 5 0 3 6 Exercise 3 An Earthquake Simulation Your window should resemble Figure 3 5 below Figure 3 5 The shake table positioned Creating the Shake Table Slot In this exercise the shake table must only move in the horizontal direction To provide this constraint a keyed slot joint will be attached to the shake table rectangle The position of the slot on the rectangle is not critical To create the keyed slot joint 1 Choose the Horizontal Keyed Slot tool in the Toolbar On MacOS systems this tool is hidden in the Slot Joint pop up palette by default Click and hold on the Horizontal Pinned Slot tool to bring the pop up palette in view Figure 3 6 Figure 3 6 Slot joint pop up palette MacOS only 2 Click the shake table rectangle Figure 3 7 The keyed slot connected to the shake table 3 3 Creating the Shake Table 3 7 This tool creates a square point on the object and a slot on the background and then automatically joins them Your window should resemble Figure 3 7 below The Smart Editor will keep joints together during editing To see this try dragging the rectangle The rectangle will stay joined while it is dragged It
89. ot is defined by 18 control points located at every 20 degrees around its circumference This exercise will provide you with the geometry of the slot that defines the opposing motions of the pistons 4 2 Setting Up the Workspace To make drawing and measuring easier you will take advantage of some optional tools available in Working Model 2D namely Rulers Grid Lines and X Y Axes To activate these tools 1 Choose Workspace from the View menu 2 On MacOS systems activate each of these options from the Workspace submenu On Windows systems check the box next to each option in the Workspace dialog Grid Snap should also be activated This feature allows you to draw and move objects precisely since every mouse motion is snapped to every ruler division 3 Pull down the View menu and make sure Grid Snap is active menu option is checked Figure 4 1 Worksheewitvorkspaceptions active Figure 4 2 View Size dialog 43 CreatingtheCam 4 3 Observe the rulers and coordinate boxes in your blank document As shown in Figure 4 1 the coordinate boxes show the cursor location with current units the coordinate boxes show __ location with units in your dive 0 400 0 o0 y __0 000 m 0 200 0 200 0 400 x _0 000 m To make sure that the worksheet scale is appropriate for the simulation you will change the view size 4 Choose View Size from the View menu Fi
90. otor powers a single cam utilizing a belt drive mechanism The cam drives two followers in opposing directions The motor rotates at 600 rpm You will observe the motion of the followers under the given cam geometry Exercise 4 Concepts e Creating cams using curved slots e Using gears to simulate a belt drive mechanism e Using rulers to draw precise shapes For this example you will need the text file that contains the control points necessary to construct the cam geometry The file named Cam Points on MacOS systems and CAMPOINT TXT on Windows systems is located in the Tutorial folder directory in the Working Model 2D 4 2 Exercise 4 A Belt Driven Camshaft installation folder directory If you installed Working Model 2D under Custom Installation and skipped the Tutorial files you need to install the folder or type the points by hand this exercise provides the coordinates 4 1 Introduction A cam translates rotational motion to and from linear motion without elaborate mechanism designs However a cam design on a drawing board may not intuitively suggest the linear motions derived from its rotation In this exercise you will build a belt driven cam mechanism that drives two pistons in opposing directions The motor provides torque to maintain a constant angular velocity The two pistons are attached to the cam slot grooved on a solid disk Working Model 2D simulates the belt drive using internal gears while the curved sl
91. ou will create the cam followers as rectangles Their motion will be restricted to a single degree of freedom by a keyed slot and their horizontal motion will be defined by the cam 1 Click the Rectangle tool in the Toolbar 2 Using the grid lines and Coordinates bar as your guide create a rectangle of the dimensions shown in Figure 4 11 Use the Coordinates bar to verify and modify the shape if necessary 4A Creating Cam Followers 4 13 Figure 4 11 Cam follower dimensions 0 800 0 600 0 400 0 200 0 000 x 0 650 m yL 0 025 m hL 0 050 m w _0 300 m To verify the dimensions of the rectangle use the Coordinates bar while drawing 3 Select the cam follower and choose Duplicate in the Edit menu to create another cam follower of the same dimensions 4 Drag the cam followers in the workspace so that they are on either side of the cam as shown in Figure 4 12 Figure 4 12 Preliminary positioning of the cam followers 0 600 0 400 0 200 0 000 0 200 0 400 0 600 x m y m You will now attach the cam followers to horizontal keyed slots in order to restrict their motion Before the attachment you will make sure the cam followers are aligned to the x axis of the workspace 5 Click on either cam follower and examine the Coordinates bar Figure 4 13 Verify that the y position of each follower is 0 0 For now their x position does not need to be precise 4 14 Exercise 4 A Belt Dri
92. owerss c c cs eccscssssanssscussesnsosacssessddcdssvassosasevessssnssesoseseonse 4 12 Creating Attachment Points on the Cam Followets 0 cece 4 14 Attaching the Cam Followers to the Slots cee eeeeeeeseeeeeeneeeneeees 4 18 4 5 Constructing the Drive Mechanism eee eeeeeeeeeeeeeseeceeeaecseenaeenees 4 20 Creating the Drive Disk i ccsicctsecscctscisgestansesesestesees iidsssasyasvseeddeesebsobasses 4 20 Connecting the Drive Motor to the Cam eee cee eeseeeeeeseeeeeneees 4 21 4 6 Running the Simulation ee snoeien E ae es k aesir 4 23 Setting Animation Step seeessesesseeeseseeeresrsreerrsteeresrerestenrnsrerresesrrereseeet 4 23 Starting the SIMUlAtION sss ssienisoiseisesres ressos i rrsorri esitas sost topit sasor saspi sass at 4 24 Modifying the Simulation sseesseeeesseeseseseseesesressrsreeresreereseerresesreseeen 4 25 Cruise Control using MATLAB s ssssssssssssssssseneseesssesnumssmnmeeeesseessuns 5 1 Dki ATOMUCH OM eenn e Ee N E N E E ESEE 5 2 5 2 Setting Up the Workspace eesesesseeeeeseresesreereserresreerssrerrsserresesrsseerreresenrns 5 3 5 3 Creating the Vehicle and Track sssr peorien enaere oi resiki poi stisni iiye 5 5 Creating the Track 3s snc oe n n ane EEE 5 5 Creating the Vehiclesin enan E E R 5 8 Attaching the Vehicle to the Track essesesesseessereesssrsrrssrsrrerrsreerssreees 5 9 O ps My Garis Flipped nepos ooe poer rosero ip covet serip e Ss pap os seus PSE KEO
93. rawing the Force The force will be drawn in the downward direction using the Force tool To draw the force 1 Click the Force tool in the Toolbar 2 Place the pointer near the midpoint of the top end of the piston Find the snap point 3 Click when the snap point is visible drag the mouse upward and click again to create the force A force attached to the piston appears Figure 2 16 Do not be concerned with the exact direction or magnitude of the force for now Sizing the Force The force s magnitude and direction will be set using the Coordinates bar To size the force 1 Click the force vector to select the force 2 6 Creating the Force 2 19 2 Click the Fy field of the Coordinates bar and type 100 3 Click the Fy field of the Coordinates bar and type 0 The force vector changes in length to reflect its new magnitude Timing the Force The ignition timing of the engine must be simulated The problem states that the force is active only on the downward stroke i e when the piston has a negative velocity The rev limiter cuts off combustion when the rotational velocity is greater than 35 radians second To simulate these conditions the and a b function will be incorporated with the following formulas To determine when the piston has a negative velocity use the following formula body C v y lt 0 where c is the piston s object id number To determine the piston s id number pl
94. red 1 2 Setting Up the Workspace For this exercise the units system will be changed and the x y axes will be displayed Working Model 2D uses SI units meters kilograms seconds by default this exercise uses the English unit system of pounds and feet To change the unit system 1 Choose Numbers and Units from the View menu The Numbers and Units dialog appears Numbers and Units x Numbers Unit System Fixed Point SI degrees z C Floating Point 3 Digits Cancel Auto More Choices 2 Choose English pounds from the Unit System pop up menu Figure 1 1 The default distance unit in the English system is inches To change this to feet 3 Click More Choices The dialog box expands to allow custom settings for various units Figure 1 2 Numbers and Units dialog expanded 1 2 Setting Up the Workspace 1 3 Numbers and Units x Numbers Unit System Fixed Point Engish pounds x Floating Point Bo Digits Cancel Auto Fewer Choices Distance finches z in Force Pounds z b Kilometers a Mass Milimeters b Energy British thermal 7 Btu sec Power Horsepower gt HP Charge Yards Zj statcoul Frequency inone 7 Rotation Degrees x d Velocity Inone 7 Electric Rot Pat Volts y Velocity Inone pa 4 Choose Feet from the Distance pop up menu Figure 1 2 5 Click OK To display the x y axes 1 Choose Workspace from the View menu On MacO
95. se them you can type the coordinates directly into Working Model 2D Shown below is the content of the text file Radius 8 0 100 0 000 0 120 20 000 0 150 40 000 0 170 60 000 0 185 80 000 0 185 100 000 0 170 120 000 0 150 140 000 0 120 160 000 0 100 180 000 0 120 200 000 0 150 220 000 0 170 240 000 0 185 260 000 0 185 280 000 0 170 300 000 0 150 320 000 0 120 340 000 To manually enter the values above click the Insert button in the Geometry window as many times as necessary to create 18 control points and then type in these values Use the Enter or Return key to move from one table cell to the next Make sure that the coordinates shown in the Geometry window are polar coordinates 7 To enter the control points from the file select the control points in your text editor and use the Copy function of the editor to store the numbers on the Clipboard 8 Click the Paste button in the Geometry window 4 12 Exercise 4 A Belt Driven Camshaft Figure 4 10 Numencally reshaped cam The coordinates of the control points are pasted into the table regardless of how many control points were present previously Observe that the curved slot is immediately reshaped to reflect the new coordinates Figure 4 10 0 800 0 600 0 400 0 200 0 000 0 200 0 400 x m y jm Now that you have created the cam you will create the cam followers and attach them to the cam 4 4 Creating Cam Followers In this exercise y
96. sition see Figure 3 14 E Figure 3 15 All the members in place 3 5 Creating the Second Story 3 15 Creating the Roof Beam Since the roof beam rectangle is identical to the first story floor beam it will be created by duplicating the floor beam It will then be placed above the second story column rectangles using the Properties window To duplicate the floor beam 1 Select the floor beam 2 Choose Duplicate from the Edit menu A copy of the floor beam appears The roof beam in this exercise is located on the top of the second story columns at the global coordinates x 5 5 and y 23 To position the beam 1 Select the newly duplicated rectangle roof beam 2 Click the X field of the Coordinates bar and enter 5 5 3 Tab to the Y field of the Coordinates bar and enter 23 The rectangle moves to its proper position Figure 3 15 3 16 Exercise 3 An Earthquake Simulation Figure 3 16 All the rectangles selected Modifying Elasticity and Friction The problem states that the building member connections are not earthquake resistant simple connections The simple connections will be modeled by setting the member s coefficient of friction to 1 and the elasticity to zero To modify these properties 1 Choose Select All from the Edit menu to select all the rectangles see Figure 3 16 All the objects display square resize handles at their corners 2 Choose
97. ssceeceeeeeeeeeeeeeeeseecneesaecaecaeeneesaees 2 4 Zooming oaea a e E E lives teas E eccasteus eas Hatha conseuese 2 5 Creating the Piston ii eee oneee errea oreto ena NRE Ee eras 2 6 Creating the Connecting Rod s seeseseerseseeesssstsrsssrsrtsrrerssrsrenesessesrenresee 2 7 2 4 Creating the Points for Joining eeesesessseeesreresesreeesreersrerreseerrrsrrrrererresee 2 8 Exercise 3 Creating Points on the Connecting Rod eee eeeeceseceeeeseceeenseesees 2 8 Attaching Points to the Crankshaft eee eee eeeeeeeeeeeeeeeeeseeeneenaees 2 9 Attaching Points to the Piston eee csecesecseecsecaeecaeeeseeseecaeeeneeaee 2 10 Attaching a Point to the Background eesceeeeeeseceercenseceeneeenaeeeeees 2 12 Attaching a Slot to the Background eee eecesecesecesecneecsecnaeeaeenes 2 12 2 Dice Creating JOMUS ansis rer Shits vedere didges caste aes R A R AEE ER 2 13 Joining the Piston to the Slot ee cece cseceseceecsseeseceseeeeeeeeeeeeeeeees 2 13 Joining the Crankshaft to the Point on the Background 2 14 Joining the Components eee eeeseecseesseceeceseceeceaeeseenseeecnseeeeeneees 2 15 Preventing a Col sion cisecs is ssrsssenscaceeeeatevenes i E R R R 2 17 2 6 Creating the Force si sce se cis os iestised stestivdestes SEE e rE SE SEEE ESE EE ESS 2 18 Dra wins the FOL Ee ere ree eenean sens oreore oup e EEEE reS REO TAPO Cg EKE Dotie EE oise 2 18 Sizing the Fore e E A A a a Or ee 2 18 Timing the Forte ena e ea nane E E E RR
98. t 1 7 Velocity of F Velocity of Point 13 Label Equation x ft fime si fwi Point 13 v1 y2 Vmax maxfoutput 1 7 y1 0utput 17 y2 G y4 Auto Min Max x fo 000 fi 000 yi M foo f1 000 Close the Properties window If not already open choose Appearance from the Windows menu Enter Vmax in the name field This names the meter Vmax so we can access it conveniently from the script we write later Close the Appearance window Drag the meter to a desired location Your window should now resemble Figure 6 11 Figure 6 11 Completed linkage Run amp Stopi IET 6 3 Creating the Components 6 13 HOO n eO i Running the Simulation To run the simulation 1 Click the Run button in the Toolbar Note when the maximum velocity is attained 2 Click Stop once a complete loop is run On MacOS systems the Run button turns into the Stop button while the simulation is running 3 Click Reset If you are interested use the tape player controls at the bottom of the document window to advance simulation frames Try to find out at which frame the maximum velocity was attained 6 14 Exercise 6 Scripting Figure 6 12 WM Basic scrot 6 4 Automating the Process Writing a WM Basic Script WM Basic allows you to automate any process that you would normally handle manually in Working Model 2D you can also modify dialog boxes and create custom interfaces
99. the Square tool is not visible in the Toolbar click and hold on the Rectangle tool to bring the pop up palette in view 2 Draw a square with the sides approximately 1 meter long The exact size of the square is not important If you wish you can use the Coordinates bar to draw precise shapes While you draw a body the Coordinates bar continuously displays the dimensions of the object You will now create two pins on the vehicle in order to attach the vehicle to the curved tracks e 3 Click the Point tool in the Toolbar 4 Attach a point element to the center of the vehicle Use the snap point at the center of the square 5 Attach another point to the vehicle Use the Coordinates bar to position the point as shown in Figure 5 6 Figure 5 6 Point coordinates on the vehicle 5 3 Creating the Vehicle and Track 5 9 Center Point 0 0 0 0 Front Point 0 1 0 0 Attaching the Vehicle to the Track You will now attach the two point elements located on the vehicle to the curved slots 1 Using the selection pop up menu in any utility window select the Center Point Slot The selection pop up menu is located at the top of the Properties Appearance and Geometry windows Shift select select while pressing down the Shift key the center point on the vehicle The Join button becomes active Click the Join button in the Toolbar The center point is now attached to the slot element to form a curved slot j
100. to be attached to the piston a square point and a point The square point will be joined to the slot on the background to create a keyed slot joint The point will be joined to another point on the connecting rod to form a pin joint The square point will be positioned on the piston at the coordinates of 0 50 The square point will be rotated 90 so that when joined to the slot the piston will not rotate This is because vertical slots are defined as being rotated 90 horizontal slots are defined as having 0 rotation When a square point is joined to a slot the rotations of the two objects are aligned The point will be positioned at 0 0 To create the points 1 Click the Square Point tool The cursor turns into a square point 2 4 Creating the Points for Joining 2 11 Click anywhere on the piston Since the square point will be precisely postion using the Coordinates bar below it is not necessary to find a snap point Click in the X field of the Coordinates bar and enter 0 If you attached the square point on a snap point the x field of the Coordinates bar may contain a formula expression such as body 3 widttor 0 0 Simply overwrite the entire expression and enter 0 Press the tab key to move to the Y field of the Coordinates bar and enter 50 Again simply overwrite the y field with the value 50 Choose the Properties in the Window menu The Properties window appears In the angle field of the Pr
101. try incorporating the abs function into the formula see the Working Model 2D User s Manual for more information on functions You can increase the width of the Active when field to view the entire equation by resizing the Properties window Figure 217 Active when ActiveWVhertieldrtheProperties I Always window for a force Jand body 2 v y lt 0 ody 1 v 1 lt 35 The simulation is ready to run 5 Click the Run button in the Toolbar The engine runs A warning may appear if you run the engine long enough you can ignore the warning for now 6 When you are ready to continue click the Reset button in the Toolbar Figure 2 18 A velocity graph 2 7 Measuring Properties from the Simulation 2 21 2 Measurin ropertiefgonhGSimulation A graph in conjunction with a digital meter is a nice way to illustrate the rotational speed of the engine s crankshaft Two digital meters will be used to display the forces on the bearings Follow the steps below to create these output devices Displaying a Graph The angular velocity of the crankshaft will be displayed by a graph To create the graph 1 Select the crankshaft circle Four square handles will appear around the circle indicating that the circle is selected 2 Choose Velocity from the Measure menu and Rotation Graph from the Velocity submenu A meter resembling Figure 2 18 appears elocity of Circle 1 i We rads 10 400 Displaying Digita
102. tt S in sec Vy foooo in sec VO joon sec material Standard statcoul lt Ib in 2 Planar moment Ib in 2 Now you will set the name of bar CD By naming that bar you can conveniently address it with your script later 1 Select the bar CD the bar on the right side if not already selected 2 Choose Appearance from the Window menu 3 Enter CD in the name field Figure 6 5 Appearance M Show Body 3 Rectan z ee cor I Show name olor em Fil II I Track center of mass Show center of mass LI I Track connect I Show charge Frame M Track outline Show ercle orentation Connecting the Bars with Pin Joints Now you will attach the bars to each other and to the background with pin joints To pin the left bar to the background 1 Click the Pin Joint tool 6 3 Creating the Components 6 7 2 Bring the pointer over point A Figure 6 6 and find the snap point An X appears near the pointer when you have it properly positioned Figure 6 6 Positioning the pin joint Place pin joint here x550 in 3125 in hi3700 in whoo in fooo 3 When the snap point is visible click the mouse button The pin joint attaches the bar to the background To connect the bars to each other e 4 Double click on the Point tool 5 Using snap points to position each point precisely create points 1 through 4 as shown in Figure 6 7 6 8 E
103. uch as force and acceleration using meters and vectors Figure 1 24 Finding theTop Slot Pin Figure 1 25 Choosing veciors 1 8 Measuring Properties from the Simulation 1 19 Displaying Vectors The exercise asks for the initial force on both joints You can display these forces as vectors for qualitative analysis To display vectors 1 Choose Properties in the Window menu The Properties window appears 2 Click the selection pop up menu and select Top Slot Pin Figure 1 24 The custom name you assigned in Naming Key Elements of the Model on page 1 11 comes in very handy in locating the point element The pin becomes highlighted when selected Gis Properties 22555 Body 1 Rectangle Constraint 5 Slot Joint Constraint Slot Joint Constraint 9 Force Point 2 Bottom Slot Pin Point 3 Top Slot Pin N Point 4 Slot Point 6 Slot Point 8 Base Point mass 1b stat fric kin fric elastic charge density 42 857 Ib ft 2 aed fa 3 Choose Vectors from the Define menu and Total Force from the Vectors submenu Figure 1 25 Define Vectors No Vectors Vector Display Vector Lengths Velocity Acceleration Total Force Gravitational Force Electrostatics Force Air Force New Menu Button New Control gt New Application Interface Force Field Contact Force Friction Force 4 Go back to the Prop
104. ven Camshaft Figure 4 13 Coordinatesbaifoioneothecam followers Figure 4 14 Twocanfollowersvittkeyeadslot joints Make sure that the y position shows 0 0 Otherwise enter 0 0 x 0 500 m y 0 000 m h 0 050 m w 0300m 0 000 6 Choose the Horizontal Keyed Slot tool and click one of the cam followers On MacOS systems the Horizontal Keyed Slot tool may be hidden in the Slot Joint pop up palette Click and hold on the displayed Slot Joint tool to bring the pop up palette in view Since you are not interested in torques that may be applied at the joint you do not have to worry about where in the rectangle the keyed slot joint should be located 7 Repeat step 6 for the other cam follower The simulation should resemble Figure 4 14 0 600 0 400 0 200 0 000 0 200 0 400 0 600 x m y im Creating Attachment Points on the Cam Followers First you will use the Point tool to attach two pins to the cam followers Figure 4 15 Snagpoinhearherightenabtthe leftcam follower Figure 4 16 Snap point near the left end of the night cam follower 4A Creating Cam Followers 4 15 Double click the Point tool in the Toolbar Double clicking on the tool allows you to use the tool repeatedly without going back to the tool palette each time You will use the tool twice in a row Place the mouse pointer near the right end of the left cam follower Find the snap point near the right en
105. ws user the MATLAB M file called KRCTRL2 M is already included in the Tutorial folder that came along in the installation disk The following MATLAB script implements the control function shown above in the discrete time domain function u krcetrl2 e ul global el h 0 01 kp 10 ki 8 kd 1 cl kp h 2 ki 1 h kd c2 h 2 ki 1 h kd c3 ki u cl e c2 el c3 ul el e L Tf you chose the Custom Install option you may have decided to skip this directory folder You can install the directory folder using your original installation CD ROM 5 4 Implementing the Control System 5 17 IMPORTANT the variable h included in the script above is the time step equivalent to the integration time step used in Working Model 2D The value of h must match the Animation Step as discussed in Setting Up the Workspace on page 5 3 If you choose to use a time step of a greater size you must match the value of h in the above script as well Recall that you have already set the Animation Step to 0 01 and forced the integration time step to be locked Do not use variable integration time step in this exercise otherwise Working Model 2D may decide to use smaller time steps in which case the PID control system would become out of sync with the computational model Interested users should consult the MATLAB Reference Guide for further discussions on the scripting language used in MATLAB Literature ref
106. xercise 6 Scripting Figure 6 7 Placing the points 3 Box select points 1 and 2 as in Figure 6 7 To box select first select the Arrow tool Then click on the background and drag a box visible as a dashed line around the two points to be selected When the box completely surrounds the points release the mouse button The two points should turn black to indicate that they are selected Also notice that the Join button becomes active Click the Join button in the Toolbar The two points come together to form a pin joint Create another pin joint by performing steps 6 and 7 for points 3 and 4 We need to measure the maximum velocity of point E as the length of the short bar changes To create point E 9 10 11 12 Click the Point tool Move the pointer to the center of bar BC the top bar and click to create point E when the snap point is visible Double click point E to open the Properties window In the Y field enter 2 0 instead of 0 0 Figure 6 8 Placing the motor 6 3 Creating the Components 6 9 This offsets point E vertically 2 inches from bar BC but keeps it attached to the bar The dotted line between the point and the rectangle indicates the connection Adding a Motor To apply a constant torque to our linkage you need a motor If the bars were misaligned during joining you can straighten them by entering 0 in the box on the Coordinates Bar 1 Clic
107. y from the meter and output it to a file 1 Click point E once to select it 2 Choose Velocity from the Measure menu and All from the Velocity submenu A meter appears on the screen see Figure 6 9 6 3 Creating the Components 6 11 Figure 6 9 Creating the meter x 0 0 in y 2 0 in 3 Double click on the meter The Properties window for the meter appears We will now overwrite some of the fields in the meter Delete the label Vx in the row marked y1 and press Return or Enter The equation field disappears along with the label field and the rest of the meter columns shift upward Delete the label Vy and press Return or Enter Change the label field that reads Vo to Vmax Note the output number output N at the top of the Properties window Use this output number N in the next step Delete the equation field for Vmax Now type max output N y1 output N y2 and press return 6 12 Exercise 6 Scripting Figure 6 10 Formula for tracking the max velocity Where you see a N above type the output number you noted in the previous step The max statement you just typed shown in Figure 6 10 tells the output meter to display the maximum value of y1 the current velocity and y2 the previous maximum velocity In other words this statement keeps track of the point s maximum velocity y2 ooo fioo palim 40 ee i 10 11 12 13 14 fr Outpu
108. ystems to open the window 3 Turn off the options titled Labels and Units Figure 2 21 You may wish to try modifying other options and observe the effects on the graph meter Ree a ARSON SOD Ds ee Renee SRR e AEE RRS See oO Output 18 Y v Bd show C ERT Baer ane l 3 Frame Units EK aber A Grid Be L o Axes a Connect points Remove check marks from these options If you wish to show the meter coordinate axes click the check box labeled Axes 2 24 Exercise 2 A Piston Engine Modifying the Simulation Try modifying the masses of the crankshaft and connecting rod and notice how quickly red line is reached Also try changing the length of the connecting rod by repositioning one of the joints 3 1 EXERCISE 3 An Earthquake Simulation 75 lb Roof Beam 2 x 13 50 Ib Columns 1 5 x 10 75 Ib Floor Beam 2 x 13 23 75 lb Columns 2 x 10 The two story building above is to be tested for its earthquake integrity Assume that the beams and columns are not attached by moment resisting earthquake resistant connections or bracing If the building is subjected to earthquake forces qualitatively describe the consequences Assume the earthquake motion follows the formula 10cos 7t 7sin 3r Exercise 3 Concepts e Creating actuators e Modifying the material properties of objects 3 2 Exercise 3 An Earthquake Simulation Figure 3 1 Setting the unit syst
109. ze handles appear at the corners of the rectangle to indicate that the object is selected Notice that the Coordinates bar shows the current position and dimensions of the rectangle The position shown is that of the rectangle s geometric center The numbers are shown in the current unit system Figure 1 7 Coordinates bar for a rectangle Figure 1 8 The sized rod 1 3 Creating the Rod 1 7 x 2 Click the height field of the Coordinates bar labeled h and enter 4 0 Then press Tab The rod s height becomes 4 feet Pressing tab selects the next field in the Coordinates bar in this case the width field 3 Inthe width field enter the value 0 35 and press Return or Enter A value of 0 35 is used for the width so that the rectangle is thin enough to approximate the moment of inertia of a rod The simulation window should resemble Figure 1 8 untitled x _ 4 500 ft y _ 0 500 ft hl 4 000 ft w 0 350 ft a ood Zooming In The rectangle appears small after sizing To make the rectangle rod appear larger 1 Click the Zoom In tool in the Toolbar 1 8 Exercise 1 A Double Slotted Rod 2 3 Figure 1 9 The workspace after zooming in The Zoom In tool is selected and the pointer changes to a magnifying glass marked with a plus sign Place the pointer on or near the rectangle and click The workspace is magnified by a factor of two with

Download Pdf Manuals

image

Related Search

Related Contents

  JVC KW-HDR720 User's Manual  取扱説明書  SERVICE MANUAL  G9 / G9 PowerSet™  fichas técnicas materiales cubierta ajardinada    Manual de instrucciones bilingüe (Español e Inglés)  特定小電力トランシーバー ICB-U650  

Copyright © All rights reserved.
Failed to retrieve file