Home

SPACAR User Manual

image

Contents

1. node type and type number DOF translation alonga 2 D position 2 TRANS gis straight line 3 D position 3 7 translation along a 2 D position 2 TRCIRL aa circle segment 3 D position 3 1 2 T3 For the administration of trajectories two numbers are of main importance the trajectory number and the node or element number The trajectory number has to be given once after TRAJECT node numbers or element numbers follow immediately after all other keywords In this way information about the path the velocity profile and additional loads can be grouped and worked up by node element number Taking as starting point the type of DOF the picture becomes PATH VELOCITY PROFILE LOADS ELEMENT e TRE TREPMAx TRERONT TRVMAX TRFRONT TRM NODE TRVMAX TRFRONT TRM TRF TRVMAX TRFRONT TRM TRF 32 Chapter 2 Keywords The parameters required with these keywords are listed below xi refers to note 7 listed at the end of the keywords TRAJECT 1 trajectory number TRE U TRIIME TREPMAX TRM name of M script x2 23 4 5 DA 5 7 1 2 1 node number orientation node total angle in rad h coordinate of fixed rotation axis hy coordinate h3 coordinate node number position node x coordinate of end position Y coordinate x3 coordinate node number position node 2D c and cp coordinates of circle center point 1 2D b and bz coordinat
2. PINBODY elements and cognates OUTLEVEL Sets the level of output generated in the log file and in the SPACAR Binary Data sbd file The parameters for these keywords are listed below xi refers to note i listed at the end of the keywords Section 2 2 Kinematics PLBEAM PLTRUSS PLTOR PLPINBOD PLRBEAM BEAM TRUSS HINGE 19 element number first position node first orientation node second position node second orientation node element number first position node second position node element number first orientation node second orientation node element number first position node first orientation node second position node element number first position node first orientation node second position node element number first position node first orientation node second position node second orientation node initial direction of the principal y axis of the beam cross section 1 element number first position node second position node element number first orientation node second orientation node initial direction of the x axis of rotation 2 element number first position node first orientation node second position node initial direction of the principal y axis of the beam cross section 3 element number first position node first orientation node second position node initial direction of the principal y axis of the beam cross section 1
3. Section 3 11 Rigid spatial manipulator mechanism 83 Open loop simulation The behaviour of the manipulator mechanism without feed back control is simulated using SIMULINK for the open loop configuration of Fig Two blocks from the SPACAR library spacar_1lib are used to read the Setpoint UO and Reference YO data respectively from the inverse dynamics run file name robotinv In this open loop configuration the nominal input is fed directly into the SPASIM block also available in the library In the in put file robot sim for this block the actual inputs and outputs are identical to the previously defined inputs and outputs HINGE 11 2 0O 0 1 INPUTS 11 1 HINGE 2 2 3 0 0 INPUTS 2 2 1 BEAM 44356 0 1 0 INPUTS 3 3 1 HINGE 3 6 7 0 0 OUTE 1 1 1 BEAM 55789 0 1 0 OUTE 22 1 OUTE 33 1 x 4 0 0 0 OUTEP 41 1 X 5 0 268 0 0 6467 OUTEP 5 2 X 8 0 536 0 0 OUTEP 6 3 1 OUTEDP 7 1 1 FIX 1 OUTEDP 8 2 1 FIX 4 OUTEDP 9 3 1 DYNE 1 1 OUTX 10 8 1 DYNE 21 OUTX 11 8 2 DYNE 3 OUTX 12 8 3 OUTXP 13 8 1 END OUTXP 14 8 2 HALT OUTXP 15 8 3 XM 5 10 END XM 8 30 END EM 4 4 EM 5 2 XF 1 0 0 14 XF 5 0s Us N XF 8 03 Os 307 END HALT The other blocks in the block diagram are standard SIMULINK blocks and are used to export data to workspace and to display results on the screen The Selector blocks select only specified components from an input vector They are
4. kiko ro m kolz kik l l2 r r 3 10 MimQ k ma kgm k m k kz To2 This result can also be obtained numerically from a SPACAR analysis E g with the following numerical values lL 010m ky 1 3 kN m l 0 15m ko 0 7kN m m 0 80kg 10rad s m 0 50kg A SPACAR input file massspring dat describing this case is 62 Chapter 3 Examples PLBEAM 1 PLBEAM 2 3 PLTRUSS 3 1 OW N o w O A x OX X OW he OO N He 3 tj a INPUTX 2 1 DYNE 1 DYNE S H RLSE 2 1 END HALT XM 2 1 XM 3 0 8 XM 5 0 5 ESTIFF 1 130 ESTIFF 2 105 INPUTX 2 1 0 0 10 0 END END In a MATLAB session we find for the stationary configuration ro1 and ro2 in agreement with Eqs and G 10 gt gt spacar 7 massspring gt gt x lnp 3 1 ans 0 1184 gt gt x lnp 5 1 ans 0 2891 The linearized equations of motion in terms of the dynamic degrees of freedom are m 0 or ky k m k r _ 0 A pee ee rea n Section 3 5 Rotating mass spring system 63 The associated frequency equation is given by det A ka k 0 3 12 0 mg ko ko m2 where the quantities w are the natural frequencies of the system In a MATLAB session we obtain gt gt spacar 7 massspring gt gt m0 m0 0 8000 0 0 0 5000 gt gt k0 k0 2000 700 700 700 g
5. ret 255 E 04 ne a8 i 12 1 4 time s Figure 3 51 hinges of spatial manipulator mechanism in a Error in the deformation of the closed loop simulation 600 500 400 300 u0 1 2 3 N m 0 6 0 8 time s Figure 3 53 Input applied to the manipulator feedforward part 29 Chapter 3 Examples x xref y yref z zref 8 m i i n i i i 0 0 2 0 4 0 6 0 8 1 t2 1 4 time s Figure 3 52 Position error of the end effector of spatial manipulator mechanism in a closed loop simulation 40 1 ud uf 30 4 20 z A F tok 0 a 3 3 2 u ug u uf 5 3 0 0 2 0 4 0 6 0 8 1 12 1 4 time s Figure 3 54 Input applied to the manipulator feedback part u uo Section 3 12 Flexible spatial manipulator mechanism 3 12 Flexible spatial manipulator mechanism To be added 87 88 Chapter 3 Examples SPACAR installation Prerequisites Before installing SPACAR on a computer system it is advisable to check that the system is suitable of running the software and to have MATLAB installed This SPACAR version has been developed and tested with MATLAB 7 0 4 and SIMULINK 6 2 Release 14SP2 It is expected to work with any modern version of MATLAB SIMULINK since R12 but in case of problems we can offer only limited support The system requirements depend heavily on the version of MATLAB you ar
6. the largest angle with the hinge axis is chosen in case of a draw the vector with the highest index is chosen Then the local y is chosen in the direction of the cross product of the local x direction with this basis vector The local z direction is chosen so as to complete an orthogonal right handed coordinate system 3 If no direction is specified directions initially aligned with the global coordinate axes are chosen otherwise the line connecting the translational node is chosen as the local direction the specified vector is in the local x y plane The directions used are made orthonormal 4 The specification of the initial positions with the keyword X is only required for non zero position coordinates The initial orientations cannot be chosen freely x5 If the keywords INPUTX DYNX and FIX are used without an explicit specification of the coordinate all independent coordinates will be marked as degrees of freedom or sup ports This means that x1 x2 and x3 are marked for position nodes and or A1 A2 and A3 for orientation nodes If more than one coordinate is specified each of the specified coordinates is chosen as a degree of freedom or a support 6 If the keywords INPUTE DYNE and RLSE are used without an explicit specification of the deformation mode coordinate all deformation mode coordinates will be marked as de grees of freedom or released If more than one deformati
7. MATLAB analyses SIMULINK simulation lt t _ Figure 1 2 Typical overview with MATLAB analyses and a SIMULINK simulation read setpoints amp i coeff matrices i S function GOMUON Lara NI rn a a __ parameters Read uo e ee iat sieve a a i Unom i SPASIM i q fi em fi M S Read Yo control u actuator 0 mechanism sensor y gt O gt gt O gt gt e Yref y system model model gt model e g M function Figure 1 3 Block diagram of a typical closed loop simulation in SIMULINK The left blocks read setpoints and coefficient matrices stored in data files during previous SPACAR analyses Fig LI 1 SPAS M The non linear open loop model of the manipulator with its actuators and sen sors It operates comparable to the forward dynamic mode in SPACAR as discussed for the MATLAB interface in Sect The mechanism is defined in an input data file of file type dat The filename of the input file must be specified An output Log file is written Note that in a SIMULINK simulation the integration is determined by the SIMULINK envi ronment e g the kind of solver the step size and tolerances The degrees of freedom of the mechanism and their first time derivatives are the states of the SPACAR S function The dimensions of the input and output vectors are determined from the input fi
8. e The numbers NEO NEMM NEM and NEC indicate the numbers of deformations in each class as explained in the lecture notes I 8 Chapter 1 The SPACAR program e The numbers NXO NXC NXMM and NXM indicate the numbers of position coordinates in each class as explained in the lecture notes I e The stiffness damping and mass of the elements e The nodal point forces mass and gyroscopic terms e The total mass of the system The zeroth first second and third order transfer functions are shown next each for the position parameters and deformation parameters respectively The amount of output can be controlled by the keyword OUTLEVEL in the input file Next for a forward analysis node 1 and mode 4 the name of the integrator and accuracy settings are shown Finally a list with all time steps and the number of internal iterations are given For an inverse dynamics analysis the trajectories and input output definitions see also Sect are read and analysed In case of mode 3 the name of the data file of the previous mode z2 is shown In case of mode 7 the eigen values frequencies and normalized eigenvec tors of the state system matrix are shown In case of mode 8 load multipliers and normalized buckling modes are presented In addition the vector of directional nodal compliances is shown SPACAR Binary data Files Some utilities are available to show check load or replace the data in SPACAR Binary data Files SBF files These are f
9. 24 6 44 9 e 1 6 2 0 4 90 amp 4 and os _ S4 4 2 8 5 y Saa 4 2 5 06 14 2 0 444 amp 14 2 444 6 where 53 Ely 1 12E ly GAk 12 Sa3 Balle Sa Elp l a 12E 1 GAkyl2 and Saa Ealo ile 28 Chapter 2 Keywords x5 In amode 7 8 or 9 run a deformed mechanism configuration is computed which corre sponds with the specified nodal position 6 Stiffness and damping properties of the corresponding element are not used for the dynamic computations In a mode 7 8 or 9 run a deformed mechanism configuration is computed which corresponds with the specified element deformation x7 Rotational deformations are defined in radians 8 Note that the keyword X defines an initial configuration in which the deformations are zero A start value defined with INPUTE or STARTDE defines a deformation with respect to the initial configuration 9 The required parameter of the USERINP keyword is the name of a MATLAB M file without the extension m and with a maximum filename length of 8 characters The calling syntax of the M script is function t e x mymotion t is The input parameters are the time t and time step number is The script should return again time t prescribed deformations e and prescribed coordinates x Either e or x may be empty in the case no deformations or coordinates are presc
10. An input file shear2 dat in this case is PLBEAM 1 1 PLBEAM 2 3 23 4 45 6 Xal X x U w O OO ouno O O O O00 be be RY RY RY Ry U oy N RLSE RLSE DYNX DYNX A wN 70 DYNX 5 END HALT EM 1 1 EM 2 1 ESTIFF ESTIFF ITERST EP 10 1 END END 0 0 0833333333 x0 0 0833333333 1 2 1 0 0 0833333333 0 2495 1 0 0 0833333333 0 2495 0 000000000001 Chapter 3 Examples In a MATLAB session the compliances and eigenfrequencies can be found as follows gt gt spacar 8 shear2 gt gt xcompl lnp 5 2 ans 329 940 gt gt spacar 7 shear2 gt gt type shear2 log Eigenvalue numbers 5 to 8 0 00000E 00 2 54107E 00 Eigenvector numbers 5 to 8 0 0000000 0 0000000 0 1544078 0 0000000 0 2825588 0 0000000 0 1744141 0 0000000 0 0000000 0 0000000 0 0000000 0 43923612 0 0000000 0 7180016 0 0000000 0 4431985 0 Yet a Le ee be ee ee N oOo OOOO 0 0 CO 00000E 00 0000000 4065978 2566711 6173727 0000000 0000000 0000000 0000000 7 95645E 01 oO OOOO 0 0 CO DG OO Or OrO 000 000 000 000 000 235 042 4912 000 000 000 000 000 074 190 094 The compliance based on thin plate theory is 3 8822 m N so the approximation with a short beam overrates the compliance by about 3 If the shear
11. Figure 3 7 Case 1 Horizontal velocity of the sliding block 40 TA 20 ri M 2 Nm o T PE a i ye ta i fi fi fi fi fi fi fi fi 0 01 0 02 0 03 0 04 0 05 0 06 0 07 0 08 0 09 0 1 time s Figure 3 9 Case 1 Driving moment in rotational node 2 49 x 6 m o i i i i i i i i i i 0 0 01 0 02 0 03 0 04 0 05 0 06 0 07 0 08 0 09 0 1 time s Figure 3 6 Case 1 Horizontal position of the sliding block 3000 T T T T T T T T T 2000 H p lt 7 1000 l 4 1000 d at x 6 m s 8 8 1 3000 F 4000 F 5000 6000 f f L f n L 1 1 L 0 0 01 0 02 0 03 0 04 0 05 0 06 0 07 0 08 0 09 0 1 time s Figure 3 8 Case 1 Horizontal acceleration of the sliding block 80 N l 4 i h eot J Pe sal kd 4 AA Fx 6 Fy 6 N o 0l sory Bay y i i i i i i i i i 0 0 01 0 02 0 03 0 04 0 05 0 06 0 07 0 08 0 09 0 1 time s Figure 3 10 Case 1 Supporting forces on the sliding block 50 Chapter 3 Examples gt gt plot time xdd 1lnp 6 1 gt gt grid gt gt xlabel time s gt gt ylabel d dt 2 x 6 m s 2 gt gt gt gt plot time fxtot 1lnp 2 1 gt gt grid gt gt xlabel time s gt gt ylabel M 2 Nm gt gt gt gt plot time fxtot 1lnp 6 1 2 gt gt g
12. first time derivative Ibid second time derivative see note Note Specifying second derivatives in the output vector implies an algebraic coupling between input and output i e a non zero state space matrix D This is currently not implemented and the keywords REFEDP and REFXDP are ignored for the linearization The parameters for these keywords are listed below xi refers to note i listed at the end of the keywords nominal input number 1 element number deformation parameter number 1 2 3 4 5 or 6 nominal input number 1 node number coordinate number 1 2 3 or 4 reference output number 1 element number deformation parameter number 1 2 3 4 5 or 6 reference output number 1 node number coordinate number 1 2 3 or 4 NOTES x1 The nominal input numbers and output output numbers are the positions of the specified input or output in the input and output vectors respectively 38 Chapter 2 Keywords KEYWORDS INPUT VECTOR u mode 4 9 Specification of input deformation parameters Ibid first time derivative Ibid second time derivative Specification of input nodal coordinates Ibid first time derivative Ibid second time derivative Specification of output deformation parameters Ibid first time derivative Ibid second time derivative Specification of output nodal coordinates Ibid first time derivative Ibid s
13. forces To solve the linearized equations of motion LL these are expressed as a Linear Time Varying LTV system A SPACAR mode 3 run generates time varying state space matrices that are well suited for this purpose Then a typical SPACAR analysis and linearized simulation procedure is as follows e Use e g an inverse dynamics run mode 2 to define the nominal motion for the rigidified manipulator Inputs and outputs of the system may be specified e Next the system is linearized with a mode 3 call The system is analysed along the nominal path computed previously The elastic deformations are defined with INPUTE commands Inputs and outputs must be specified e Finally the linearized simulation can be run with a SIMULINK model of which a typical example is shown in Fig L 4 In comparison with the non linear simulation of Fig L3 the spasim block is replaced by an LTV block that uses the linearized equations of motion Note that now only the differences compared to the nominal motion are computed Only the difference dw of the manipulator s input compared to the nominal input is needed In addition the generalized stress resultants a are part of the input of the LTV block Section 1 5 Perturbation method and modal techniques 13 u uot mo O controller Figure 1 4 Block diagram of a typical closed loop simulation in SIMULINK based on the perturbation method In addition to the above outlined standard imple
14. 0 6 TRANS 8 0 536 0 0 TRAJECT 1 TRTIME 0 2 20 TRAJECTNODE 8 TRAJECT 2 TRANS 8 0 Mes TP TRVMAX 8 0 2 1 76 TRFRONT 8 0 TRTIME 1 0 100 1 0 03 0 03 0 03 The inverse dynamics analysis yields the stresses that have to be applied at the hinges and the deformations of the hinges Fig shows the stresses Figures and show the deformations which are the relative rotations of the hinges and the first time derivatives respectively Clearly to accomplish the quite simple trajectory of the end effector of this non Section 3 11 Rigid spatial manipulator mechanism 79 Figure 3 40 SPAVISUAL output for the spatial manipulator mechanism linear mechanism rather complicated functions for the rotation of the hinges are needed Note that the input files defines the inputs and outputs that will be used in a SIMULINK sim ulation The nominal inputs are computed to accomplish the deformations of the hinges The outputs include the six sensor signals with the rotations and the speed of rotation of the hinges Nine more outputs are defined to obtain extra information on the performance of the manipula tor the acceleration of the rotation of the hinges and position and velocity of the end effector At the end of the file visualization settings for SPAVISUAL are defined In figure B 40 the output of SPAVISUAL is presented 80 Chapter 3 Examples 600 r 7 T T r 7 1 4 r r r r r r L Jd 500 fe i tak 4 f
15. 355131 rad s the oretically 0 355100 rad s oo Nowe ae Figure 3 32 Second vibration mode for a can tilever beam with 5 elements wo 2 2266 rad s theoretically 2 22537 rad s eso RRON g l Figure 3 34 Third vibration mode for a cantilever beam with 5 elements w3 6 25198 rad s theo retically 6 23111 rad s Figure 3 31 First buckling mode for a cantilever beam with 5 elements Fer 2 516776 N theo retically 2 516749 N Figure 3 33 Second buckling mode for a can tilever beam with 5 elements Fero 22 715 N theoretically 22 651 N Figure 3 35 Third buckling mode for a cantilever beam with 5 elements Fer3 64 798 N theoreti cally 62 919 N Section 3 8 Short beam 69 3 8 Short beam Figure 3 36 Short Timoshenko beam loaded in shear In this example the influence of shear deformation on the behaviour of short beams is studied A square plate is loaded in shear in its plane as shown in Figure3 36 The beam has unit height h length l and Young s modulus and a small unit width t With Poisson s ratio v 0 27 the shear correction value is k 10 1 v 12 11v 0 8484 The deflection if shear deflection is taken into account is FR W1 v Fl 2 1 I EI kEth ee with I th 12 So the compliance is B 140 1 Y DE opge AT aoa 3 14 F 12EI kEth The moment of inertia per unit of length is J pth 12
16. 400 4 ab P E 300 Ss 08 4 Ss E i L fo i a 200 PS g s gt e f os 4 S 100 4 _ a b 0 4 H 0 f L 4 100l J 0 2 O 200 i i o i i i 0 0 2 0 4 0 6 0 8 1 12 14 0 0 2 0 4 0 6 0 8 1 1 2 14 time s time s Figure 3 41 Stresses to be applied at the hinges Figure 3 42 Position coordinates of the end 2 7 7 r 7 1 r 10 7 7 7 7 1 1 8L 4 1 5 4 6l 4 ab J tb J g Y aL F 4 amp S amp X o5 4 X o x x g s 3 z 2 3 0 J 4k A 6b a 0 5 4 ef 4 4 i i i i fi i 10 i i i i i i o 0 2 0 4 0 6 0 8 1 1 2 1 4 0 02 0 4 0 6 0 8 1 1 2 1 4 time s time s Figure 3 43 Velocity components of the end Figure 3 44 Acceleration components of the end effector effector 2 T T T T T T 14 5 1 T F 5 eo a cy a a 0 5 gt 3 Kj 0 3 0 5 0 0 2 0 4 0 6 0 8 1 12 14 0 0 2 04 0 6 0 8 1 1 2 1 4 time s time s Figure 3 45 Deformations relative rotations of Figure 3 46 Velocities of deformation of hinges hinges 1 2 and 3 1 2 and 3 Section 3 11 Rigid spatial manipulator mechanism Rotational nodes for the spatial manipulator node1 node2 node3 node6 node7 node 9 type x coordinate y coordinate z coordinate BC type x To Xo BC type y Yo Yo BC type z 20 Zo force x 0 force y 0 force z x 14 121 mass 0 10 element type hinge h
17. case as is illustrated in Figs B 51 and 8 52 The maximum error of the tip position is less than 1 mm which is better than 0 1 Figs B 53 and 3 54 show the feedforward part uo and feedback part u uo of the input applied to the manipulator respectively Clearly the larger contribution is from the feedforward part The size of the feedback part is smaller and relatively large correction are only applied during limited periods of time However as is clear from this example this feedback is essential to keep the manipulator on track The simulation for 1 5 s now requires 182 time steps which is only slightly more than in the open loop simulation However the simulation takes much more time which is caused by the occurrence of a so called algebraic loop in the block diagram The reason for this algebraic loop is the presence of the joint accelerations in the output vector of the spasim block as accelerations depend algebraically on the input torques These accelerations are only exported to the workspace and are not used in the feedback loop so there is no real algebraic loop Unfor tunately SIMULINK has no means to detect this If you are not interested in the accelerations they can easily be removed from the output vector and the simulation speed will increase sig nificantly 86 ae I Q 2 2 2 E e osl 1 1 ref J a i wear 0 5 3 1 4 pi i Ci ref ae 3 3 mk Cj
18. freedom and there is only one element This is the planar truss element denoted by 1 that connects nodal points 1 and 2 in the following SPACAR input file slider dat PLTRUSS 1 1 2 X 1 OQ 0 X 2 1 7321 T FIX 1 2 FIX 2 1 INPUTX iL 1 END HALT INPUTX 1 1 0 T O TIMESTEP 3 4641 100 END END Both symbolic and numeric results are shown in Figs 3 2 andB 3 with the Matlab commands gt gt t time k 1 5 time s time s Figure 3 2 Vertical velocity y of the sliding bar Figure 3 3 Acceleration of the sliding bar Section 3 2 Planar slider crank mechanism 47 gt gt plot t xd l1np 2 2 3 1 2 6 a 142 37 1 2 t t 72 7 17 2 gt gt grid gt gt xlabel time s gt gt ylabel d dt y 2 m s gt gt figure gt gt plot t xdd lnp 2 2 4 1 2 37 1 2 tt t 72 142 37 1 2 t t 72 2 7 1 2 gt gt grid gt gt xlabel time s gt gt ylabel d dt 2 y 2 m s 2 Obviously in both graphs the symbolic and numeric are practically identical which illustrates the good agreement between both solutions Note that in this example no masses are defined There are also no dynamic degrees of freedom so effectively only a kinematic problem is solved 3 2 Planar slider crank mechanism The slider crank mechanism is a frequently ap
19. in Kelvin Voigt model Ga shear damping modulus in Kelvin Voigt model A cross sectional area I ly Ix second area moment about y axis and z axis J Saint Venant s torsion constant k ky and kx shear correction factor in y direction and z direction The shear correction nfactors are about 0 85 a table of values for various cross sections can be found in 5 The generalized stresses are calculated according to the Kelvin Voigt model as follows All first stresses are calculated as o Sye Sai i co where S EA lo and Sa Ea A lo for the truss and beam elements where lo is the undeformed length of the element and the first stiffness and damping coefficients as defined in the input for the other types of elements oo is the preload defined by the keyword ESIG For hinge and pinbody elements the other stresses are calculated in an analogous way but without the preload For a planar beam element the bending stresses are calculated as o amp 4 0 240 e 4 Sa2 4 0 24 o3 1 6 2 0 4494 Je 14 2 0 446 3 where S EI R 12EI GAkI2 and Saz Eal For a spatial beam element the torsional stress is calculated as o2 Sg 2 Sas g co where Sp GI i and Sa2 Gal R note the wacky occurrence of co here For bending along the local y and z axes the stresses are analogous to the planar case o3 S3 440 2 3 4 S43 440 2 3 o4 1 4 0
20. of motion Eq B2 gives z 2V 26 3 1 10V2 2 2 10 V2 5 de3 0 3 3 or 6 3 2 83 d 3 16 14 ez 0 3 4 The stiffness term is a combination of Ko k 1 Go V2ke3 0 83 5 No V2g 3 k m e3 15 14 where the solution of Eq B1 s g V 2 3 k m es 3 6 has been used In a MATLAB session we get 60 gt gt gt gt mO gt gt co gt gt k0 gt gt no gt gt gO spacar 4 fourbar moO 1 0000 15 1423 Chapter 3 Examples Section 3 5 Rotating mass spring system 61 3 5 Rotating mass spring system Figure 3 27 Rotating mass spring system Consider the system shown in Fig A smooth horizontal tube containing masses m and mz connected with springs k EA l and ky EA lz is mounted on a rotating shaft The shaft rotates at constant angular speed The unstretched length of the springs is denoted by l and l2 The equations of motion in terms of the generalized coordinates r and rz are Ki 0 i _ lias ki r l ka r2 r B 8 7 0 m l Te M ra k r2 r l The stationary solution ro1 ro2 is obtained by substituting 7 rg 7 f2 0 li ky mig ky l _ le 3 8 ko ko moe To2 Kole from which the stationary configuration 191 792 is obtained analytically as Mokily makala kykoly L a ae 4 a a 3 9 mim2 kama kom k m
21. output of the third order geometric transfer functions in d3e and d3x for mode 4 7 8 and 9 Additional output of the derivative of the global deformation function for mode 4 7 8 and 9 For the second parameter SPACAR Binary Data sbd file are defined 0 1 2 Default for all modes except mode 7 8 and 9 All normal output Default for mode 7 8 and 9 Additional output of the first order geometric transfer functions in de and dx Additional output of the second order geometric transfer functions in d2e and d2x Additional output of the first and second order geometric transfer functions a combination of 1 and 2 Section 2 3 Dynamics 23 2 3 Dynamics With the keywords of the dynamics module the following blocks of information can be supplied Blocks 1 and 2 are optional If deformable elements have been defined in the kinematics block 3 has to be filled lest the stiffness and damping are zero If the motion is not prescribed by trajectories block 4 has to be used to define the input motion Finally with the keywords from the 5 block miscellaneous settings can be adjusted KEYWORDS DYNAMICS Inertia specification of lumped masses Inertia specification of distributed element masses Specification of inertia terms for rigid spatial beam elements with uniform mass distribution no longer supported Inertia specification of gyrostat User defined mass put into M External force specification of the
22. represented by the nominal input vector wo are to be varied by the control system actuators The system outputs represented by the reference output vector Yo consist of the coordinates to be monitored by control sensors Coordinates that are not measured may be added to check the performance of the manipulator in the simulation STATIO computes stationary solutions of autonomous systems Stationary solutions are solu tions in which the vector of dynamic degrees of freedom qf has a constant value This can represent a static equilibrium configuration or a state of steady motion LINEAR is a forward dynamics stage for the generation of linearized equations and state space matrices It can be used in different modes as described below Section 1 2 SPACAR amp MATLAB 3 In mode 4 the LINEAR module is an extension of the forward dynamic analysis node 1 where coefficient matrices of the linearized equations are calculated as functions of the set of degrees of freedom q The linearized equations are generated in the form M6q Co Do 6g Ko No Gol 6q DFS 5 Ff DFO 5a 1 1 where Mo is the reduced mass matrix Co the velocity sensitivity matrix Do the damping matrix Ko denotes the structural stiffness matrix No and Gp are the dynamic and geometric stiffness matrices respectively External and internal driving forces are represented by the vec tors f and a respectively In addition if input and output vectors du and dy ar
23. state space system which has a state vector z an input vector u and an output vector y Each of these vectors has a well defined meaning in the SPACAR block The states correspond to the degrees of freedom and their first time derivatives The input and output are coupled to actuators and coordinates as specified by keywords in the SPACAR input data file see below In the SIMULINK graphical user interface the input and output vectors must be coupled to other blocks like the control system The states are used internally in SIMULINK and are usually not available to the user That implies that any coordinate or deformation parameter that is used for control purposes or is monitored in a graph must be included in the output vector y block 2 KEYWORDS INPUT VECTOR u SPASIM 1 INPUTS Specification of actuator elements INPUTF Specification of actuated nodes KEYWORDS OUTPUT VECTOR y SPASIM 2 Specification of the deformation parameters to be sensed Ibid first time derivative Ibid second time derivative Specification of the nodal coordinates to be sensed Ibid first time derivative Ibid second time derivative Section 2 6 Non linear simulation of manipulator control 41 The parameters for these keywords are listed below xi refers to note 7 listed at the end of the keywords input number 1 element number deformation parameter number 1 2 3 4 5 or 6 input number 1 node number c
24. the MATLAB prompt Section 1 3 SPAVISUAL 9 Limitations The SPACAR package has some built in limitations on the size of the manipulators that can be analysed Table l I shows the limits for the so called Student version that can be downloaded as describes in Appendix A In case your requirements are larger you need to contact the authors The licence for the freely downloadable software is time limited Maximum number of coordinates deformations 175 Maximum number of DOFs 20 Maximum number of elements nodal points 50 Maximum number of inputs 12 Maximum number of outputs 25 Table 1 1 Built in limitations of the Student version of the SPACAR package 1 3 SPAVISUAL SPAVISUAL is the visualization tool for SPACAR It can visualize deformation vibration and buckling modes SPAVISUAL shows beams trusses and hinges in 2 D as well as in 3 D It works with default settings which can be adjusted by the user The only input of SPAVISUAL is a filename This file has to be a dat file which has been analysed with SPACAR This is necessary because SPAVISUAL needs the sbd files for the deformation modes and also the sbm files for the vibration and the buckling modes There are a couple of keywords that can adjust the default settings These keywords are listed in section 2 7 SPAVISUAL is a Stand alone function in MATLAB To run SPAVISUAL the user has to type the next command gt gt spavisual filename Here file
25. the reference output vector Yo are defined in the following blocks These blocks are optional but omitting one or both blocks means that no input and or output vectors are defined and hence no setpoints for that input and or output vector are gener ated and written to the Lt v file KEYWORDS NOMINAL INPUT VECTOR uy mode 2 1 NOMS Specification of actuator elements NOMF Specification of actuated nodes KEYWORDS REFERENCE OUTPUT VECTOR y mode 2 2 Specification of the deformation parameters to be sensed Ibid first time derivative Ibid second time derivative Specification of the nodal coordinates to be sensed Ibid first time derivative Ibid second time derivative The parameters for these keywords are listed below 7 refers to note i listed at the end of the keywords nominal input number 1 element number deformation parameter number 1 2 3 4 5 or 6 nominal input number 1 node number coordinate number 1 2 3 or 4 reference output number 1 2 element number deformation parameter number 1 2 3 4 5 or 6 reference output number 1 2 node number coordinate number 1 2 3 or 4 NOTES x1 The nominal input numbers and reference output numbers are the positions of the specified input or output in the input and output vectors respectively Section 2 4 Inverse dynamics setpoint generation 35 2 The keywords REFES and REFXS that are defined for the l
26. 0 0033 EM 4 1 0 0 0033 ESTIFF 1 0 0 2 0 0 0 1 0 ESTIFF 2 0 0 2 0 0 0 1 0 ESTIFF 3 0 0 2 0 0 0 1 0 ESTIFF 4 0 0 2 0 0 0 1 0 72 Chapter 3 Examples XF 9 0 0 0 0 1 0 END END VISUALIZATION BUCKLINGMODE 1 TRANSPERANCY 0 9 BEAMVIS 0 01 0 1 LIGHT 1 STEPLINE 0 01 ENLARGEFACTOR 0 04 The 3D visualization of this file is presented in figureB 37 The buckling load found is 5 7619 N whereas the theoretical value is 5 6752N If the warping is constrained at the clamped end the first element is effectively shorter for torsion by a distance b 1 v 24 where b is the height of the beam here b 0 2m and v is Poisson s ratio here v 0 The torsional stiffness of the first beam element now increases with a factor by 2 3 1 19517 The input line for the stiffness of the first beam element now becomes ESTIFF 1 0 0 2 39034 0 0 1 0 The critical load is now increased to 6 1694 N Section 3 9 Lateral buckling of cantilever beam 73 0 15 0 1 0 05 0 05 0 1 0 15 Figure 3 37 Cantilever beam lateral buckling buckling mode 1 74 Chapter 3 Examples 3 10 State variable and output equations Figure 3 38 Lever system Find the state space variable and output equations for the system shown in Fig B 38 The input is the displacement x of the left end of spring kz F As l it affects the mass m through spring ks EA ls and the lever w
27. 0 01 008 008 004 os 0 06 0 07 008 008 0 1 Figure 3 15 Case 2 Driving moment in rota tional node 2 51l x 6 m an o a io T T re Figure 3 12 Case 2 Horizontal position of the sliding block 6000 4000 2000 T l 6000 0 d at x 6 m s o Figure 3 14 Case 2 Horizontal acceleration of the sliding block Fx 6 Fy 6 N 3 o a Figure 3 16 Case 2 Supporting forces on the sliding block 52 Chapter 3 Examples PLBEAM L I 2 3 4 PLBEAM 2 3 5 6 7 PLBEAM 3 6 l 8 9 X 1 0 000 0 000 X 3 0 150 0 000 X 6 0 300 0 000 X 8 0 450 0 000 FIX 1 FIX 8 2 INPUTX 2 1 DYNE 2 2 3 DYNE 3 2 3 END HALT XM 8 0 033375 EM 2 0 2225 EM 3 0 2225 ESTIFF 2 0 000000 13 359623 ESTIFF 3 0 000000 13 359623 INPUTX 2 1 0 000000 150 000000 0 000000 TIMESTEP 0 100000 100 STARTDE 2 2 0 000000 0 000000 STARTDE 2 3 0 000000 0 000000 STARTDE 3 2 0 000000 0 000000 STARTDE 3 3 0 000000 0 000000 END END The second order contributions of the bending deformations on the elongation Eq 6 4 22 in the lecture notes are taken into account The initial configuration of case 3 is depicted in Fig The horizontal acceleration of the sliding block as function of time is given in Fig B 18 The bending of the slider given by y TOS lt as function of the crank angle is presented in
28. 000 0 gt gt D getfrsbf lever ltv D 1 6000 Chapter 3 Examples Section 3 11 Rigid spatial manipulator mechanism 77 3 11 Rigid spatial manipulator mechanism Figure gives an example of a simplified manipulator The prescribed motion of the end effector C is represented by the coordinates x y and z as functions of time z v 1 76 m s 1 2 y i 0 0 0 2 0 4 10 12 14 Cc t Figure 3 39 Spatial manipulator mechanism trajectory and velocity profile of the end effector The end effector must follow the straight trajectory from point I to point II Three trajectories are distinguished Initially the manipulator is at rest for 0 2 s Next during 1 0 s the motion is carried out according to the velocity profile in Fig with constant acceleration and deceleration during the first and final 0 2 s Finally the manipulator is at rest again The motion of manipulator is determined by the rotation of three hinges Hinge 1 enables rotations about the z axis while hinge 2 enables motions perpendicular to the xy plane Hinge 3 takes care of motions in the same plane wherein hinge 2 is active The hinges are driven by internal actuators For control purposes we assume that sensors are available that measure the rotations and the speed of rotation of the hinges The manipulator consists of two beams elements 4 and 5 which are equal in length l4 ls 0 7m The distributed mass per length is p4 4 kg m for e
29. 20 Chapter 2 Keywords position node number x1 coordinate Y coordinate x3 coordinate 4 node number coordinate number 1 2 3 or 4 5 element number deformation mode coordinate number 1 2 3 4 5 or 6 6 node number coordinate number 1 2 3 or 4 x5 element number deformation mode coordinate number 1 2 3 4 5 or 6 x6 node number coordinate number 1 2 3 or 4 x5 element number deformation mode coordinate number 1 2 3 4 5 or 6 x6 INBODY RBEAM PLPI D or PLRBEAM element number 2 10 direction vectors 7 INBODY RBEAM PLPINBOD or PLRBEAM element number undeformed projection of x x on the first direction vec tor undeformed projection of x1 x on the second direction vector undeformed projection of x x on the third direction vector for spatial elements OUTLEVEL 1 level of output in log file x8 2 level of output in the SPACAR Binary Data sbd file 8 NOTES x1 The direction vector lies in the local x y plane of the beam element If no direction is specified the local direction vector is chosen as the standard basis vector that makes the largest angle with axis of the beam in case of a draw the vector with the highest index is chosen Section 2 2 Kinematics 21 x2 The local y and z unit vectors are chosen as follows First the standard basis vector with
30. 3 94 Appendix C MATLAB tutorial Creating a plot If y is a vector plot y produces a linear graph of the elements of y versus the index of the elements of y If you specify two vectors as arguments plot x y produces a graph of y versus x Line styles markers and color You can pass a character string as an argument to the plot function in order to specify various line styles plot symbols and colors In the statement plot x y s s is a l 2 or 3 character string delineated by single quotes constructed from the characters in the following table Symbol Color Symbol Linestyle yellow point magenta circle cyan x mark red plus green star blue solid white dotted black dashdot dashed Y m c g b w k For example plot x y c plots a cyan plus symbol at each data point If you do not specify a color the plot function automatically uses the colors in the above table For one line the default is yellow because this is the most visible color on a black background For multiple lines the plot function cycles through the first six colors in the table Adding lines to an existing graph You can add lines to an existing graph using the hold command When you set hold to on MATLAB does not remove the existing lines instead it adds the new lines to the current axes It may however rescale the axes if the new data fall outside the range of the previous data For example plot f1 ho
31. Fig B19 The MATLAB commands used to plot these results are gt gt plot time xdd 1lnp 8 1 gt gt grid gt gt xlabel time s gt gt ylabel d dt 2 x 8 m s 2 gt gt Section 3 2 Planar slider crank mechanism 53 ail oa l i ro sisi erin E be L Eig 6000 0 d dt x 8 m s Figure 3 17 Case 3 Initial configuration of the Figure 3 18 Case 3 Horizontal acceleration of slider crank mechanism the sliding block ij T WEN H My Tl fol an ieee etl ly F 1 aE a Br T 1 A A P E eps 2 3 o na ee ae 8 x0 6 m 3 amp ee SS i i i i i i i i i i i i i i i 0 2 4 6 8 10 12 14 16 0 0 01 0 02 0 03 0 04 0 05 0 06 0 07 0 08 0 09 0 1 phi 2 rad time s Figure 3 19 Case 3 Bending of the flexible con Figure 3 20 Case 3 Difference in the horizontal necting rod elements 2 and 3 position of the sliding block compared to case 1 gt gt gt gt gt gt gt gt lot x 1lnp 2 1 e le 2 3 e 1e 3 2 2 rid label phi 2 rad label v eps 2 3 eps 3 2 2 m K x OD Figure B 20 shows the small vibration of the sliding block due to the bending by comparing its position with the rigid simulation of case 1 Fig B 6 Chapter 3 Examples Nodal points for the planar slider crank mechanism f node
32. In the block diagram in Fig L3 the output vector y of the SPAS IM block is compared to the ref erence output vector Y The difference of these vectors is the input of the control system The state matrices can be used to develop and tune a controller of any type e g linear non linear discrete continuous by means of the available software tools in MATLAB and SIMULINK The output of the controller u is added to the nominal input vector uo to actuate the mechanism An example is discussed in Sect When using blocks from the SPACAR SIMULINK library spacar_1ib note the following e Using any of the LTV Setpoint U0 Setpoint Sigma0 Reference YO and Times MO blocks at times beyond the last time step found in the data file may lead to unexpected results e In the current version of the software all spasim blocks in a block diagram should refer to the same input filename Analogously all LTV Setpoint U0 Setpoint Sigma0 Reference YO and Times MO must use the same 1tv file 1 5 Perturbation method and modal techniques For systems with a larger number of degrees of freedom the required computer time for a SPASIM simulation may be unacceptable in particular when high frequency eigenfrequencies play a role Then the perturbation method may provide a numerical efficient solution strategy Consider e g the motion of the flexible manipulator depicted in Fig In the case the flex ibility is taken into account the generalized coordinates or deg
33. NX keyword specifies otherwise With the keywords of the fourth optional block the calculation of some non linear terms in the expressions for the deformations of planar or spatial beams can be suppressed and geometric properties for PINBODY elements and their cognates rigid beam planar pinbody planar rigid beam can be specified The keyword in the fifth section is not really a kinematic keyword as it sets the level of output from the program 18 PLBEAM PLTRUSS PLTOR PLBEAR PLPINBO PLRBEAM BEAM TRUSS HI PI NGE NBO RBEAM Chapter 2 Keywords KEYWORDS KINEMATICS Planar beam element Planar truss element Planar hinge element Planar bearing element not supported Planar pinbody element Planar rigid beam element Beam element Truss element Hinge element Spatial pinbody element Spatial rigid beam element Specification of the initial Cartesian nodal positions 1 2 3 4 5 DEFORM Support coordinates x Calculable deformations e Prescribed DOF x Prescribed DOF e Dynamic DOF 2 Dynamic DOF e Suppresses the calculation of non linear elastic strains of a beam element due to possibly large curvatures of the elastic line Defines the orientations of the generalized deforma tions for the PI NBO DY elements and cognates Defines the undeformed reference distances for the
34. SPACAR User Manual dr ir R G K M Aarts dr ir J P Meijaard and prof dr ir J B Jonker 2008 Edition March 20 2008 Report No WA 1138 Table of contents iii 1 1 1 Introduction 0 0 0 00 00 0000 0002 ee ee 1 ot ay be bed bok be oe bee bes 1 L SPAVISUAL ww aaa a 9 SPAS IM and SIMULINK 2 a 9 echnique 11 15 l Introduction oo e a 15 a a a a a 16 i 23 29 29 34 36 40 42 45 45 i i 47 Sain amp Gute Sn Put Go ponte ee be ed 55 Ee Pe ee er ra ee 58 Rotating m mass spring system 61 e e i 64 66 69 71 74 ii Table of contents 77 87 89 91 MATLAB pria 93 C l Basic MATLAB graphics commandg a aoa a 93 C 2 Quitting and saving the workspacg a a eee a 95 97 Preface This is the 2008 edition of the manual that describes the use of the SPACAR package in a MAT LAB SIMULINK environment This software is being developed at the Laboratory of Mechanical Automation of the Department of Engineering Technology University of Twente and is partly based on work carried out at the Department of Engineering Mechanics Delft University of Technology This manual accompanies the 2008 UT release of SPACAR With respect to the previous editions of this manual new keywords have been included reflecting changes in the software Further more the specification of element stiffnesses and damping has been changed which makes o
35. T TRANS and TRCIRL for nodes and TRE for elements maximum of 6 USERTRAJ Trajectory defined by a user function TRTIME Definition of trajectory time and number of time Steps And there are two blocks of optional keywords 1 TREPMAX Specification of velocity profile rise time TRVMAX and maximum velocity TRFRONT Specification of acceleration front for each velocity profile 2 TRM Specification of extra masses and TRF forces on the end effector 30 Chapter 2 Keywords The trajectories can be constructed in two ways with a user function or with built in profiles The latter are defined below and are of course limited to combinations of the built in profiles On the other hand practically any input can be generated with user functions This feature is activated by defining exactly one TRAJECT with the USERTRAJ keyword The required parameter is the name of an MATLAB M script that is to be called With TRTIME the total trajectory time and the number of time steps must be specified The calling syntax of the M script is exactly equal to that of the M script for the USERINP keyword see page 28 Alternatively one can use the built in trajectory profiles The next scheme shows in more detail the combination possibilities of the setpoint generation keywords Essential keywords are accompanied by a number of optional keywords placed between brackets Other optional keywords than mentioned are not allowed for that spec
36. TLAB or a simulation with SPASIM in SIMULINK can suffer from errors These errors can be divided into fatal errors that cause an immediate terminations and less severe errors which may report unexpected conditions in the 1og file while the calculation continues Most fatal error have a clear error message e SPACAR requires 2 or 3 input arguments SPACAR requires no output argument CCONST must be 1 x N or N x 1 vector CCONST contains too many parameters MODE has an invalid value and FILENAME contains illegal characters indicate an incorrect call of SPACAR from MATLAB The last error can also occur in SPASIM SIMULINK e Wrong number of input arguments Flag must be a scalar variable Too many output arguments Time must be a scalar variable State vector of wrong size Input vector of wrong sizeand Not a valid flag number indicate an incorrect call of SPASIM from SIMULINK and should not occur during normal operation e ERROR opening file means that SPACAR can not open the specified file for output e ERROR opening existing file means that a file froma previous run is not found e ERROR in subroutine DINVOE is caused by an error in the dynamics input see Sect 2 3 91 92 Appendix B SPACAR error messages PREPTR Illegal velocity profile is reported when no valid velocity profile can be determined Can not determine valid and existing input file names from mea
37. aw can also be used after the simulation to visualize the results see page B During the computations the results are stored in one or more data files and in MATLAB arrays A log file is always created when SPACAR starts processing the input dat file This log file contains an analysis of the input and possible errors and warnings It is described in more detail on page Some errors in the input file do not lead to an early termination of the SPACAR computation but nevertheless give unusable results Therefore it is advisable to check the Log file for unexpected messages Section 1 2 SPACAR amp MATLAB 5 All other data files are so called SPACAR Binary data Files SBF which implies that these are in a binary format and cannot be read easily by a user Therefore utilities are provided to read and modify data in these files see page 8 Depending on the mode up to three binary output files may be created For all modes a SPACAR Binary Data file with filename identical to the input file and extension sbd is written The contents of this file are also stored in MATLAB arrays that are of course immediately available in the MATLAB workspace e g to be visualized with the standard MAT LAB graphics commands such as plot see e g ChapterB and Appendix C The following variables are created or overwritten mode SPACAR mode number ndof number of kinematic DOFs nddof number of dynamic DOFs nx number of coordinates ne number of defor
38. coefficient for pinbody and cognates Gal torsional damping for beam elements Eal bending damping for planar beams Sa2 second damping coefficient for pinbody and cognates x4 Ealy bending damping in y direction for spatial beams Saz third damping coefficient for pinbody and cognates x4 Eql bending damping in z direction for spatial beam 4 26 Chapter 2 Keywords TIMESTEP length of time period onune o o I node number position or orientation node 5 coordinate number 1 2 3 or 4 start value start rate acceleration constant element number x6 deformation mode coordinate number 1 2 3 4 5 or 6 x7 start value x8 start rate acceleration constant node number coordinate number 1 2 3 or 4 start value start rate element number deformation mode coordinate number 1 2 3 4 5 or 6 start value x8 start rate USERINP Name of the MATLAB M file with user defined input func tions 9 ERROR 1 Absolute error for the integrator pret a ITERSTEP maximal number of iterations in calculating a stationary so lution default value 10 number of load steps default value 4 error tolerance default value 5 0E 7 N e Nen BWN 3 4 5 1 2 3 4 1 2 3 4 NOTES x1 The inertia components are related to the global coordinate system x y z in the initial configuration 2 The keyword MEE is used to add a fixed mass coupled to deformation mod
39. combined damping matrix Cp Do KOB combined stiffness matrix Ko No Go SIGO generalized stress resultants The get ss tool can be used to read the state space matrices from the 1tv file see page 8 Other utilities are available to use parts of these data in a SIMULINK environment e g to read setpoints or to simulate a Linear Time Varying LTV system see Sect L4 amp KF iF KF The log file The log file contains an analysis of the input and possible errors and warnings that are encoun tered The error and warning messages are explained in more detail in Appendix B The other output can be separated into a number of blocks The first lines indicate the version and release date of the software and a copyright note Next the lines from the input file read by the KIN module are shown not showing comments present in the input file see also Sect 2 2 From the analysis is written e The elements used in this model The deformations of all elements are shown with the internal numbers according to the le array and the classification of each deformation O fixed C calculable and M DOF e The nodal point information with the internal numbers of the coordinates according to the lnp array and the classification as above e Finally a list shows the degrees of freedom Dynamic degrees of freedom are indicated The DYN module reads the next data block and processed input lines are shown From the analysis we get
40. de and a double rotational node since the rotations of the slider and the crank are not the same The mass of the crank is taken as zero An input file crank dat describing this case is PLBEAM 1 1 2 3 4 PLBEAM 2 3 5 6 7 X 1 0 00 0 X 3 0 15 0 X 6 0 45 0 FIX 1 tj x lt fon N END HALT XM 6 0 033375 EM 2 0 2225 INPUTX 2 1 0 150 0 TIMESTEP 0 1 100 END END The initial configuration of case 1 is depicted in Fig B 5 The horizontal position velocity and acceleration of the sliding block as function of time are given in Figs The driving moment in node 2 versus time is shown in Fig B 9 and the supporting forces acting on the sliding block are presented in Fig The MATLAB commands used to plot these results are gt gt plot time x 1lnp 6 1 gt gt grid gt gt xlabel time s gt gt ylabel x 6 m gt gt gt gt plot time xd 1lnp 6 1 gt gt grid gt gt xlabel time s gt gt ylabel d dt x 6 m s gt gt Section 3 2 Planar slider crank mechanism 0 2 0 157 0i F 0 05 fi 0 0 05 0 1 0 15 0 2 0 25 0 3 0 35 0 4 0 45 Figure 3 5 Case 1 Initial configuration of the slider crank mechanism 30 T T T T T T T T T 20 a 10 4 g E x Of 5 2 10F 20b x 30 i i i i i i i i i 0 0 01 0 02 0 03 0 04 0 05 0 06 0 07 0 08 0 09 0 1 time s
41. e ee xt 5 mode 1 KIN gt DYN gt DOF s q 4 mode 2 joint variables eg og INVDYN gt lt nominal inputs uo reference outputs Yo mode 3 pd State space matrices mode 4 i LINEAR Linearized equation aS mode 7 gt Eigen frequencies L gt STATIO gt LINEAR mode S Buckling loads mode 9 State space matrices Figure 1 1 Functional relations between modules in SPACAR The indicated modes are available in the MATLAB environment KIN is the kinematics module that analyses the geometry of the mechanism The kinematic properties of the motion are specified by the geometric transfer functions The following steps are provided by the KIN module 1 Definition of the mechanism topology the geometry and the degrees of freedom DOFs q a e 2 System preparation 3 Calculation of the geometric transfer functions DYN is the dynamics module that generates the equations of motion and performs numerical integration in the forward dynamic analysis in the so called mode 1 of SPACAR Fur thermore it generates and solves the equations for the kinetostatic analysis INVDYN is the inverse manipulator dynamics module that performs the inverse kinematics and dynamics mode 2 and generates the setpoints for the simulation of manipulator motion with closed loop control in SIMULINK see Sect L 4 The system inputs
42. e coordinates If all five numbers are specified the mass is placed as a coupling between the two de formation mode coordinates if three numbers are specified the mass is placed on the diagonal 3 The required parameter of the USERS IG keyword is the name of a MATLAB M file without the extension m and with a maximum filename length of 8 characters The calling syntax of the M script is Section 2 3 Dynamics 27 function time sig f pushsig t ne le e ep nx 1np xX xp The input parameters are the time t and a list of variables that store the instantaneous values of the same quantities as are represented by the corresponding variables in the SPACAR Binary Data see the overview on page 5 The script should return again time t user defined stressed sig and user defined nodal forces fx Either sig or fx or both may be empty in the case no stresses and or forces are prescribed Otherwise each row in sig and or fx should define one stress value or force component at the specified time t Three columns should be provided with 1 The element number e or the node number x 2 The deformation mode number e or the coordinate number x 3 The current value of the stress or force component 4 Unspecified values for the stiffness and damping are assumed to be zero by default The meaning of the variables is elasticity modulus Young s modulus G E 2 2v shear modulus v Poisson s ratio Ea damping modulus
43. e defined also the linearized state equations and output equations are computed see mode 9 In mode 3 locally linearized models are generated about a predefined nominal trajectory where the output data setpoints from the inverse dynamics module i e a previous mode 2 run are used In addition to the coefficient matrices a complete state space system is generated and written to a so called 1tv file see Sect L5 In the case of a flexible mechanism additional degrees of freedom describing the elastic behaviour of the mechanism have to be included in the dynamic models both mode 2 and 3 At this stage in the so called rigidified model these flexibilities are prescribed zero i e In mode 7 eigenvalues frequencies and corresponding eigenvectors of the state space ma trix A are computed for a static equilibrium configuration or a state of steady motion The associated frequency equation of the undamped system is given by det w Mo K NG Gg 0 1 2 where the quantities w are the natural frequencies of the system In mode 8 a linear buckling analysis is carried out for a static equilibrium configuration or a state of steady motion Critical load parameters are determined by solving the eigenvalue problem det Ke 4 44 0 1 3 where i fil fo 1 4 Here K aa is the structural stiffness matrix and Gi is the geometric stiffness matrix due to the reference load f giving rise to the reference stresses
44. e g used to select only the first three components of the output vector deformations of the hinges as displaying all components makes the graphs unreadable SIMULINK s ode45 solver is used with a relative tolerance of 1075 an absolute tolerance of 1078 and a maximum time step of 0 01 s With these parameters the simulation of the motion from t 0 0s tot 1 5s is completed after 172 time steps The size of many time steps is 84 Chapter 3 Examples SPASIM robotinvlin 2 5 i Vas 15 z P Selector H Setpoint UO robotsim Selector E Scope E 3 y unom 15 Unom To Workspace Y To Workspace 15 mal Selector P Selector Ytip Scope dYtip robotinvlin H5 4 75 P Selector 3 Reference YO Selector Eref Scope Eref Display Time t 5 gt ye Yref To Workspace Clock Time To Workspace Figure 3 47 Block diagram for an open loop simulation of the motion of the manipulator mechanism using SIMULINK 0 24 f fi fi fi L fi 0 2 f fi L fi L fi 0 0 2 0 4 0 6 0 8 1 1 2 1 4 0 0 2 0 4 0 6 0 8 1 1 2 1 4 time s time s Figure 3 48 Deformation of the hinges of spatial Figure 3 49 Position of the end effector of spa manipulator mechanism in an open loop simula tial manipulator mechanism in an open loop sim tion ulation dictated b
45. e keywords REFES and REF XS The use of these keywords will generate elements in the output reference vector that are the same like the elements from REFE and REFX respectively Also the associated row in the output matrix C is the same but in addition a tensor denoted G in the 1tv file is computed with the second order geometric transfer function Linearization in mode 7 8 and 9 is around a pre computed static equilibrium configuration or a state of steady motion In addition in mode 9 the state space matrix A the input matrices By and B the output matrix C and the feed through matrix D are calculated Obviously the matrices By B C and D depend on the chosen input and output vectors du and dy respec tively These vectors are again defined in the blocks on page 38 These blocks are optional but as before omitting one or both blocks means that no input and or output vectors are defined and hence no state space matrices can be generated and written to the Itv file Section 2 5 Linearization 37 KEYWORDS NOMINAL INPUT VECTOR uo mode 3 1 NOMS Specification of actuator elements NOMF Specification of actuated nodes KEYWORDS REFERENCE OUTPUT VECTOR y mode 3 2 Specification of the deformation parameters to be sensed Ibid with second order expression Ibid first time derivative Ibid second time derivative see note Specification of the nodal coordinates to be sensed Ibid with second order expression Ibid
46. e last two arguments In intermediate points a standard analysis is done 4 The keywords TRVMAX and TREPMAX have an optional third argument to express the ex treme velocity creation of a zero acceleration period If no extreme is given it can be calculated from the total time and path length The second argument contains the rise time The period of deceleration is calculated from the a total time b rise time c total path length d extreme velocity In this way the velocity profile is fully determined For asymmetrical velocity profiles the rise time can be calculated too To indicate the symmetry of the profile the second argument is given a dummy argument a non positive value The default velocity profile is symmetrical without constant velocity period x5 The keyword TRFRONT has a second argument for the type of acceleration and deceleration function of time There are three types of fronts 0 constant acceleration 1 sine function half period 2 quadratic sine function half period The default velocity front has a constant acceleration type 0 6 The keyword TRM has only for 3 D orientation nodes a real list of parameters For 2 D orientation and position nodes one mass parameter is sufficient In the 3 D case six values determine the symmetric rotational inertia matrix Ide de 123 Ladu 45 da 6 34 Chapter 2 Keywords 2 4 2 Nominal inputs uo and reference outputs yo The nominal input vector wo and
47. e the workspace from mat lab mat You can use save and load with other filenames or to save only selected variables The com mand save temp stores the current variables in the file named temp mat The command save temp X saves only variable X while save temp X Y Z saves X Y and Z load temp retrieves all the variables from the file named temp mat 96 Appendix C MATLAB tutorial 1 2 3 4 5 References Jonker J B Dynamics of Machines and Mechanisms A Finite Element Approach Lecture notes Department of Mechanical Engineering University of Twente vakcode 113130 October 2001 The Math Works Inc Getting Started with MATLAB version 7 Revised for MATLAB 7 1 Release 14SP3 September 2005 The Math Works Inc SIMULINK Getting Started version 6 New for SIMULINK 6 3 Release 14SP3 September 2005 SAM Version 4 2 5 0 or 5 1 ARTAS Engineering Software The Netherlands http www artas nl 2001 2005 Cowper G R The shear coefficient in Timoshenko s beam theory ASME Journal of Applied Mechanics 33 1966 pp 335 340 97
48. e using Consult the accompanying Installation Guide or check The Mathworks You may expect that SPACAR will run on any Microsoft 32 bit Windows PC on which MATLAB SIMULINK are running Only the base systems of MATLAB and SIMULINK are required to run SPACAR but additional toolboxes like the Control System Toolbox may be helpful to develop and analyse control systems The installation of SPACAR uses less than 4 MB extra disk space The SPACAR files are stored in ZIP archives or in Microsoft Windows XP a compressed folder In Windows XP you can easily open such archives but of course you may chose to use your favourite unzipper The ZIP archives can be downloaded from http www wa ctw utwente nl Software SPACAR In addition to the software there is a ZIP archive with the data files that are used for the examples in Chapter B Installation First of all you should create a subdirectory e g Matlab Toolbox Spacar Next you extract the files from the SPACAR software ZIP archive spacar2007_bin zip into this subdirectory There are three types of files e Files with the extension d11 are the actual executables of the SPACAR package The original SPACAR code not provided is written in C and FORTRAN77 compiled and linked into so called MEX modules that are executables for use within the MATLAB environment The following files must exist 89 90 Appendix A SPACAR installation checksbf dll combsbd d1ll getfrsbf dll loadsbd d
49. econd time derivative see note The parameters for these keywords are listed below 7 refers to note 7 listed at the end of the keywords OOO CO O O00 0 INPUTS x2 INE INEP gt x3 INEDP INPUTF x4 INX INXP x 5 INXDP input number 1 element number deformation parameter number 1 2 3 4 5 or 6 input number 1 node number coordinate number 1 2 3 or 4 output number 1 element number deformation parameter number 1 2 3 4 5 or 6 output number 1 node number coordinate number 1 2 3 or 4 Section 2 5 Linearization 39 NOTES x1 The input numbers and output numbers are the positions of the specified inputs or outputs in the input and output vectors respectively 2 Associated with dynamic DOFs e 3 Associated with prescribed deformations e x4 Associated with calculable coordinates x and or dynamic DOFs a 5 Associated with prescribed nodal coordinates 2 x6 Associated with prescribed deformations e and or e 7 Associated with calculable deformations e and or dynamic DOFs e m r x8 Associated with prescribed nodal coordinates 2 and or a 40 Chapter 2 Keywords 2 6 Non linear simulation of manipulator control To simulate the behaviour of a manipulator with a control system the SPACAR program is also accessible as an S function block SPASIM from SIMULINK SIMULINK treats this block like a non linear
50. ed coordinates and deformations equal zero 6 Chapter 1 The SPACAR program For example the x and y coordinates of node 7 can be shown as function of time in a graph by typing gt gt plot time x lnp 7 1 2 and the first generalized stresses in elements 1 2 and 3 can be plotted by typing gt gt plot Lime ig sy le 12374 Obviously storage in the x xd xdd fx e ed edd and sig matrices is like x t k where t is the time step and k ranges from 1 to nx for x xd xdd and fx fxtot and from 1 to ne for e ed edd and sig respectively 2 The variables 1n it and rxyz are mainly intended for internal use in the drawing tool spadraw More user friendly information is available in the 1og file page Z 3 The large variables de dx d2e and d2x are only created if the parameters of the LEVELLOG are set accordingly Sect 2 2 x4 After a linearization run node 8 directional nodal compliances inverse stiffnesses are computed Using the location matrix xcomp1 lnp i j gives this quantity for the jt coordinate j 1 4 of node i After a linearization run mode 3 4 7 8 or 9 the coefficient matrices are stored in a SPACAR Binary Matrix file with extension sbm The accompanying MATLAB matrices are mO reduced mass matrix Mo 5 b0 input matrix Bo 5 6 co velocity sensitivity matrix Co 5 do damping matrix Do 5 kO structural stiffness matrix Ko 5 no geometric stiffness matrix No 5 gO geometric stif
51. elastic deformation as shown in the figure The deformation is reached in ten steps of loading For each step the residual vector converges in 4 Newton Raphson iterations with an accuracy equal to 0 5K 6 A SPACAR input file op lbeam5 dat for this case is PLBFAM 112 3 4 PLBEAM 23 4 5 6 PLBEAM 356 7 8 PLBEAM 4 7 8 9 10 PLBEAM 5 9 10 11 12 xX I 0 0 X 3 1 666 0 X Dr 8433304 Section 3 7 Cantilever beam subject to concentrated end force XM Oe 0 X 9 6 666 0 x 11 10 00 0 FIX 1 FIX 2 DYNE 1 2 3 DYNE 2 2 3 DYNE 3 2 3 DYNE 4 2 3 DYNE 5 2 3 END HALT EM 1 1 EM 2 1 EM 3 1 EM 4 EM 5 J ESTIFF 1 0 0 102 0 ESTIFF 2 0 0 102 0 ESTIFF 3 0 0 102 0 ESTIFF 4 0 0 102 0 ESTIFF 5 0 0 102 0 XF 11 0 0 14 END END In a MATLAB session we get gt gt spacar 8 plbeam 5d inp 11 1 w IL AR 5402 theoretically 3 8109 8 5774 theoretically 8 4044 gt gt xcompl inp 11 1 ans 67 68 0 5111 gt gt xcompl lnp 11 2 ans 0 0662 undeformed configuration Chapter 3 Examples undeformed configuration 0 3 268 To show the usefulness of SPAVISUAL the first three free vibration modes no external loads and buckling modes axially loaded by an end force are displayed for the cantilever beam of this example in figuresB 30 toB 35 S665 Figure 3 30 First vibration mode for a cantilever beam with 5 elements w 0
52. es K and K see e g the lecture notes I This output is multiplied with the time dependent 3 x 3 reduced mass matrix Mo using a block from the spacar_lib library Finally the nominal input vector up is added as a feedforward signal robotinvlin 3 Unom 3 gt Son Setpoint UO Unom To Workspace Omega 28 beta 0 85 L3 robotinvlin 7 Pj Selector 3 gt T P Selector robotsim S E times MO SPASIM Selector E Ed Selector E cops Kp Kv control yref 15 Yref To Workspace Display Time 1 6 robotinvlin ig P Selector 5 Pj Selector 3 Reference YO Scope Eref Selector Eref Edref Selector Eref L t samp Clock Selector Ytip Scope dYtip Time To Workspace Figure 3 50 Block diagram for a closed loop simulation of the motion of the manipulator mechanism using SIMULINK Most signals are vectors and the numbers indicate the size of the vectors The motion is simulated with the same parameters as in the open loop simulation see page 83 In this case the actual size of the variable time step is somewhat smaller and after 183 time steps the simulation is completed The differences between the prescribed and actual trajectory is much smaller in this
53. es of circle end point 1 3D c1 C2 and c3 coordinates of circle center point 1 3D b b2 and bz coordinates of circle end point 1 element number total displacement relative angle or elongation total time for the trajectory number of time steps number of intermediate time steps 3 element number rise time period of acceleration extreme velocity 4 node number position or orientation node rise time period of acceleration extreme value of the velocity 4 node number position or orientation node extra mass m J or Lyg node number position node fi coordinate of external force f2 coordinate f3 coordinate Section 2 4 Inverse dynamics setpoint generation 33 NOTES 1 The positions of the parameters of keyword TRCIRL are different in 2 D and in 3 D cases Places 2 5 are used for 2 D places 2 7 for 3 D Note that the endpoint of the circle cannot be taken literally as it is over determined The second point defines a line through the center on which the circle ends 2 See the note for the USERINP keyword on page 28 3 The keyword TRTIME has an optional third argument that influences the meaning of the second argument total trajectory time total trajectory time 2 number of time steps number of time steps for an extended analysis number of time steps within the previous step For three arguments the total number of time steps is a multiplication of th
54. espectively The MATLAB commands to plot these data are gt gt plot e le 1 1 e le 1 1 e le 1 1 e le 4 1 Section 3 3 Cardan joint mechanism o Figure 3 22 Initial configuration of the cardan joint 3 el rad Figure 3 24 First order geometric transfer func tion for the cardan joint gt gt grid gt gt xlabel e_1 1 rad gt gt ylabel e_4 1 rad gt gt gt gt plot e le 1 1 ed le gt gt grid gt gt xlabel e_17 1 rad gt gt ylabel DF e_17 1 7 gt gt gt gt plot e le 1 1 edd 1 gt gt grid gt gt xlabel e_1 1 rad gt gt ylabel D 2F e_17 1 7 57 i i i 3 4 5 6 ef rad Figure 3 23 Zeroth order geometric transfer function for the cardan joint ef rad Figure 3 25 Second order geometric transfer function for the cardan joint 4 1 ed 1e 1 1 e 4 1 ed le 1 1 2 58 Chapter 3 Examples 3 4 Planar four bar mechanism In examples 5 7 1 and 12 4 1 of the lecture notes I the planar four bar mechanism of Fig B 26 is analysed analytically The mechanism has one degree of freedom The mechanism is mod elled by four rigid truss elements denoted by 1 2 4 and 5 which are joined together at their nodal points to form a rhombus As Fig B 26 implies these four bar
55. f intermediate steps in the vibration To 1 3 visualization 1 sets the light source on 1 or off 0 JOINTS Notes x1 The BEAMVIS command has two variations The one with only two parameters adjusts all beam elements The variant with three parameters can be used to adjust only a single beam element 2 Only the lowest vibration and buckling modes are available with a maximum of 10 modes 3 Only numerical values are allowed no symbols or functions 44 Chapter 2 Keywords Examples The data files used to run the examples in this chapter can be downloaded from the SPACAR web site see Appendix A 3 1 Planar sliding bar In example 4 3 1 of the lecture notes I the sliding bar of Fig B Ilis described A rigid bar pq of length 2 m is suspended from two sliders The bar is driven by the condition x vt 0 where v v is the constant horizontal velocity component of point p Thus lt v and 0 We want to compute 7 and 2 for 0 lt t lt 2V3 s and v 1 m s The position y can be computed easily from the symbolic expression y y4 v3 x SO B 30 V3 Figure 3 1 Sliding bar 45 46 Chapter 3 Examples Differentiating once and twice with respect to the time yields og V3 t m 1 yo a a e V1 2 vV3t 1 23t V1 2V3t t The mechanism has one degree of
56. f relative DOFs TRE the list of keywords is identical with those used in the inverse dynamics run mode 2 If the manipulation task is prescribed as a motion of some nodal points triads TROT TRANS TRCIRL then the corresponding RLSE command of the actuators should be replaced by INPUTE commands in the kinematic block In the software some checks are carried out to verify that data from the inverse dynamics run can be reasonably used during the linearization The nominal input vector wo and the reference output vector y are again defined in the fol lowing blocks These blocks are optional but as before omitting one or both blocks means that no input and or output vectors are defined and hence no state space matrices can be gen erated and written to the 1tv file The keywords are similar to the input and output keywords in Sect In the output 1tv file of a mode 3 run the setpoints of the input and output vector are stored identically as for a mode 2 run In addition the state space matrices for the linearized equations of motion Sect L 5 are generated Obviously the input matrix B and output matrix C depend on the chosen input and output vectors In a usual state space system the output vector is computed from a linear expression In the case a larger accuracy is required SPACAR can be instructed to use a second order expression This feature is available for all de formation parameters and coordinates not for the time derivatives with th
57. flexibility were nor included the compliance would be 1 0 m N The lowest numerical eigenfrequency w 0 795645 rad s compares well with a value from plate theory w 0 7987 rad s If shear flexibility nor rotational inertia is included the first numerical eigenfrequency is 1 6168 rad s Section 3 9 Lateral buckling of cantilever beam 71 3 9 Lateral buckling of cantilever beam In this example lateral buckling is considered of a cantilever beam with a narrow rectangular cross section which is loaded by a transverse force Fkipp at its free end in the direction of the larger flexural rigidity The theoretical buckling load is Fy 4 013 EIS l where ET is the smaller flexural rigidity S the torsional rigidity and the length of the beam For numerical analysis the beam is divided into four equal spatial beam elements in which the second order terms in the bending deformations are included in the analysis In a MATLAB session we get gt gt spacar 8 lateral4 gt gt spavisual lateral4 An input file lateral4 dat describing this case is BEAM 1 1 2 3 4 0 1 0 BEAM 2 3 4 5 6 On Le 0 BEAM 3 5 6 7 8 Os 1 0 BEAM 4 7 8 9 10 Os olse 10 x 1 0 00 0 00 0 00 X 3 0 25 0 00 0 00 x 5 0 50 0 00 0 00 X 7 0 75 0 00 0 00 x 9 1 00 0 00 0 00 DYNE 1 2 5 6 DYNE 2 2 5 6 DYNE 3 2 5 6 DYNE 4 2 5 6 FIX 1 FIX 2 OUTLEVEL 0 1 END HALT EM 1 1 0 0 0033 EM 2 1 0 0 0033 EM 3 1 0
58. fness matrix Go 5 Notes 5 Storage of the time varying matrices is in a row for each time step so in mO t k index t is the time step and k ranges from 1 to ndof xndof To restore the matrix structure at some time step type e g reshape m0 t ndof ndof 6 Only available for mode 4 and 9 In mode 2 3 4 and 9 a so called 1tv file is created The contents of this file varies and is not automatically imported to the MATLAB workspace From a mode 2 run the following data is available the names indicate the identities of the data used in the file identities marked with are available at each time step NNOM number of actuator inputs NY number of outputs a time j Section 1 2 SPACAR amp MATLAB 7 U0 nominal input for the desired motion a YO reference output of the desired motion In the addition the linearization runs yield additional setpoints state space matrices and other data in the 1t v file not all identities are always present NNOM number of actuator inputs NX number of states 2xndof NU number of inputs length of UO NY number of outputs length of Y0 NRBM number of rigid body DOF s NYS number of outputs with 2 order expression DFT direct feedthrough flag D0 X0 initial state vector T time A state space system matrix B state space input matrix C state space output matrix D state space direct feedthrough matrix G second order output tensor MO mass matrix Mo COB
59. guments have to be specified Default values are zero unless otherwise specified 2 2 Kinematics A kinematic mechanism model can be built up with finite elements by letting them have nodal points in common The nodal coordinates of the finite elements are described by position and orientation coordinates Therefore two types of nodes are distinguished position or transla tional nodes denoted by p for node p and orientation or rotational nodes denoted by p The nodes nodal coordinates and deformation parameters for the truss beam planar bearing hinge and pinbody rigid beam element are summarized in Table P I keyword type end node le p end node leq deformation parameters PLBEAM planar beam PLTRUSS planar truss PLTOR planar hinge PLBEAR planar bearing PLP INBO planar pinbody PLRBEAM planar rigid beam spatial beam spatial truss spatial hinge spatial pinbody spatial rigid beam 1 E2 E3 ey ey 1 E2 E3 E4 E5 E6 ei 1 E2 E3 E1 E2 E3 E1 E2 E3 Table 2 1 Nodes nodal coordinates and deformation parameters for the planar and spatial truss beam bearing hinge and pinbody elements Usually the convention is made that node p of an element is assigned to the lower number of the element nodes and that node q is assigned to the higher node number The interconnections Section 2 2 Kinematics 17 between the elements are accomplished by ind
60. hich is modelled by the planar beam elements 3 and 4 The lever has a fixed pivot at node 5 and is assumed to be massless yet rigid Its angular orientation is small so that only horizontal motion need be considered We will select dx and t as state variables with 6x being the input and reaction force f as output With these definitions the state variable and output equations are then bx 0 1 jx 0 52 e m toa 2 eam 5 6 15 e E 8 10 ts 4 0 H kels la 1 l3 4 627 616 G D which have the desired form These results can also be obtained numerically from a SPACAR analysis E g with numerical values for m2 1 b EaA h 5 kg ks 1000 and l4 l3 2 A SPACAR input file Lever dat for this case is PLTRUSS 1 1 2 PLTRUSS 2 2 3 PLBEAM 3 3 4 5 6 PLBEAM 45 6 7 8 PLTRUSS 5 7 9 X 10 0 0 0 Section 3 10 State variable and output equations x x KM MK X oO WI oO WD WNHNNE So e666 WWN OO S0000 Hj RY RY Ry x x x WO ON FR DYNX 2 1 INPUTX 7 1 RLSE 1 1 RLSE 2 1 RLSE 5 1 END HALT XM 2 1 0 ESTIFF 2 1000 ESTIFF 5 1000 EDAMP 1 END HALT INX 17 1 OUTF 15 1 END END In a MATLAB session we get gt gt spacar 9 lever gt gt A getfrsbf lever ltv A 1 A 0 1 1000 ae gt gt B getfrsbf lever ltv B 1 75 76 0 2000 gt gt C getfrsbf lever ltv C 1 3
61. icating common nodes between the elements For instance with a pin joint connection only the translational nodes are shared In case of a hinge joint connection only the rotational nodes are shared whereas translational coordinates can either be shared or unshared When elements are rigidly connected to each other both the translational and rotational nodes are shared see Fig It can be observed from Table P I that a truss element and a hinge element do not have common nodal types and therefore cannot be connected to each other gt gt gt pin joint hinge joint rigid joint Figure 2 1 Joint connections between finite elements In the first block of the kinematics module either two dimensional planar or three dimensional spatial elements can be specified In the second block the initial configuration of the mecha nism is specified In the third block the coordinates and generalized deformations are divided into four groups depending on the boundary conditions fixed prescribed coordinates supports dependent calculable deformations prescribed time dependent coordinates dynamic degrees of freedom hae te a For the keywords in the third block it is important to remark that there are no keywords to fix a deformation or to release a coordinate These are the default settings So a deformation is fixed unless a RLSE INPUTE or DYNE keyword specifies otherwise Similarly a coordinate is calculable unless a FIX INPUTX or DY
62. ific essential keyword TRAJECT TRE TREPMAX TRFRONT TROT TRVMAX TRM TRFRONT TRANS TRVMAX TRM TRF TRFRONT TRCIRL TRVMAX TRM TRF TRFRONT The way to follow through the scheme is almost fully dictated by the number and type of degrees of freedom Each trajectory is defined for the same DOF and therefore runs through the same branch of the scheme Only TRANS and TRCIRL may be changed into one another after each trajectory Section 2 4 Inverse dynamics setpoint generation 31 At this stage it is useful to mention the way in which degrees of freedom are declared Position and orientation coordinates are declared as DOF by input command INPUTX node number component number Deformation mode coordinates are declared as DOF by input command INPUTE element number component number INPUTX and INPUTE are kinematic keywords Sect 2 2 So degrees of freedom are declared separately For generation of setpoints in relative coor dinates such as joint angles each INPUTE in the kinematics input prepares one TRE in the setpoint generation input only the first relative coordinate per element is allowed as input for the setpoint generation For the positions and orientations the situation is more complex be cause a trajectory in two or three dimensions is defined on node level not on coordinate level The keywords TROT TRANS and TRCIRL prescribe the motion of one node
63. iles with extensions sbd sbm and ltv checksbf check and shows the contents of a SPACAR Binary data File The output for each variable is the name Id the type 1 for integer 2 for real 3 for text and the size number of rows and columns First the header variables are shown with their value Long vectors may be truncated Between TDEF and TDAT the time varying data is given The number of time steps equals the number of rows specified for TDEF getfrsbf extract a variable from a SPACAR Binary data File The Id must be specified and for time varying data the time step as well repinsbf replaces the value of a variable in a SPACAR Binary data File The Id must be specified and for time varying data the time step as well loadsbd loads all data from a SPACAR Binary Data sbd file into MATLAB s workspace loadsbm loads all data from a SPACAR Binary Matrix data sbm file into MATLAB s workspace getss loads the state space matrices at one time instant from a SPACAR 1tv file into a state space system in MATLAB s workspace combsbd combines data from two or more SPACAR Binary Data sbd files into a single output file The specified output file is overwritten without a warning spadraw is the plotting utility used internally by SPACAR It can also be used to visualize results after a simulation has been completed For all utilities additional online help is available by typing help command at
64. inearization module Sect are accepted as well and do not give errors Their meaning and usage is identical to the normal keywords REFE and REFX respectively 36 Chapter 2 Keywords 2 5 Linearization As mentioned in Sect 2 the module LINEAR is a forward dynamics stage for the generation of linearized equations of motion and state space matrices that can be used in two different modes mode 4 is basically an extension of the forward dynamic analysis of mode 1 No further keywords are required to obtain the coefficient matrices of the linearized equations as functions of the set of dynamic degrees of freedom gq These matrices are stored in a SPACAR Binary Matrix data file with extension sbm This file can be loaded with the utility Loadsbm If input and output vectos du and dy are defined also the linearized state equations and output equations are computed see mode 9 Linearization in mode 3 is around a predefined nominal trajectory and takes place after that trajectory has been generated in an inverse dynamics run mode 2 The set of DOFs used in the inverse dynamics computation represent the actuator joint coordinates e In case of a flexible manipulator mechanism additional DOFs 0 describing the elastic behaviour of the mechanism links should be included in the dynamic model both in mode 2 and mode 3 Clearly the mechanisms used in both runs have to be closely related If the manipulation task is prescribed in terms o
65. inge hinge beam beam T nodes 4 5 5 8 R nodes 3 6 7 9 x local y axis y local y axis z local z axis type e1 type e2 type e3 type e4 type es type es T translational R rotational ee a a ee le oe a a 82 Chapter 3 Examples Linearization In one of the next sections the design of a closed loop controller for this manipulator will be discussed This controller depends on parameters derived from the linearized equations of mo tion Therefore a linearization is needed in terms of the DOF s corresponding to the actuator joints An input file robot invlin dat for this analysis SPACAR mode 3 is HINGE 1 1 2 Ov O T NOMS Pe ST HINGE 2 2 3 0 1 0 NOMS 2 2 1 BEAM 4 4 39 6 0 n 0 NOMS 3 Sd HINGE 3 6 7 0 1 0 BEAM 55789 0 1 0 REFE ee ewe REFE 2 22 X Ae Ox 0 0 REFE B ioi X 5 0 268 0 0 6467 REFEP 4 1 x 8 O30 0 REFEP 5 2 REFEP 6 3 FIX i REFEDP 7 1 1 FIX 4 REFEDP 8 2 INPUTE 1 1 REFEDP 9 3 INPUTE 2 1 REFX 10 8 INPUTE 3 1 REFX 11 8 2 REFX 12 8 3 END REFXP 13 8 1 HALT REFXP 14 8 2 REFXP 15 8 3 XM 5 10 XM 8 30 END EM 4 4 END EM 5 2 XF 1 O s Qian LA XF 5 0 0m as XF 8 0 OEN END HALT Note that the setpoints are read from the sbd data file of which the name is the longest substring of the name of the input file name robotinv1lin The file from the previous inverse dynamics run robotinvisa likely candidate
66. l node2 node3 node 4 5 7 node6 node8 node 9 T R node type T x coordinate y coordinate BC type x BC type y BC type bo wo o Ww forces moment mass inertia T translational R rotational BC boundary condition The numbers of the BC type refers to the numbers of the groups mentioned on page I7 Elements for the planar slider crank mechanism J element element 2 element type T nodes R nodes type e1 type e2 2 o 2 o type e3 1 1 4 mass per length 0 2225 0 2225 0 2225 EA 5 65 10 5 65 10 5 65 10 EI 13 4 13 4 13 4 damping 0 0 0 T translational R rotational Section 3 3 Cardan joint mechanism 55 3 3 Cardan joint mechanism In section 11 1 of the lecture notes a cardan joint is described Cardan joints also known as Hooke s joints have been used as a shaft coupling in a wide range of machinery which includes locomotive as well as automotive drive lines A drive line connected by a Cardan joint may exhibit torsional oscillations due to fluctuating angular velocity ratios inherent in such systems 4 a b Figure 3 21 Schematic of Cardan joint system Figure B 21h shows a one degree of freedom shaft system incorporating a Cardan joint The Cardan joint is modelled by four spatial hinge elements as shown in Figure B 2Ib The ro tating shaft axes having an angular misalignment of 45 is driven at a constant angular speed Qin The quantities e and el represent
67. ld input files for flexible systems incompatable As before the SPAVISUAL manual is now integrated The examples are updated to show the use of SPAVISUAL The references to sections and examples in the lecture notes 1 are updated for the 2005 edition of these lecture notes They may be only approximate for other editions The visualisation tool SPAVISUAL has been implemented by Jan Bennik who also provided the description of the keywords and the examples for the part of the manual related to this tool Corrections of errors suggestions for improvements and other comments are welcome March 20 2008 dr ir R G K M Aarts Email R G K M Aarts utwente n1 dr ir J P Meijaard and prof dr ir J B Jonker iii iv Preface The SPACAR program 1 1 Introduction The computer program SPACAR is based on the non linear finite element theory for multi degree of freedom mechanisms as described in Jonker s lecture notes on the Dynamics of Machines and Mechanisms I The program is capable of analysing the dynamics of planar and spatial mechanisms and manipulators with flexible links and treats the general case of coupled large displacement motion and small elastic deformation The motion can be simulated by solving the complete set of non linear equations of motion or by using the so called perturbation method The computational efficiency of the latter method can be improved further by applying modal techniques In this chapter an outli
68. ld on plot f2 AEs ES peau hold off These statements produce a graph displaying three plots Appendix C MATLAB tutorial 95 Creating hardcopy of MATLAB figures You can make a hardcopy of a figure from the figure s menu File Print or by pressing Ctrl P Output to several graphics formats can be carried out as well Eile Export Alternatively MATLAB s print command can be used at the MATLAB command prompt E g you can generate PostScript output of the contents the current MATLAB figure window The print command sends the output directly to your default printer or writes it to the specified file if you supply a filename You can also specify the type of PostScript file Supported types include e PostScript dps e Color PostScript dpsc e Encapsulated PostScript deps e Encapsulated color PostScript depsc For example the statement print dataplot deps saves the contents of the current figure window as Encapsulated PostScript in the file called dataplot eps Depending on your MATLAB installation other graphics formats are sup ported try help print C 2 Quitting and saving the workspace To quit MATLAB type quit or exit Terminating a MATLAB session deletes the variables in the workspace Before quitting you can save the workspace for later use by typing save This command saves all variables in a file on disk named mat lab mat The next time MAT LAB is invoked you can execute load to restor
69. le and should match the requirements of the other SIMULINK blocks they are connected to 2 LTV simulation of a Linear Time Varying system as defined in an 1t v file see Sect L5 3 Setpoint UO Reads the nominal input from an 1t v file with setpoints generated e g Section 1 5 Perturbation method and modal techniques 11 with mode 2 or 3 The filename must be specified The setpoints are interpolated between the specified time steps The interpolation method can be chosen from Stepwise Linear default and Spline The block has no input and the dimension of the output vector equals the number of nominal inputs found in the file 4 Setpoint Sigma0 Reads go from an 1tv file generated with e g mode 3 see Sect 5 Reference YO Reads the reference output from an 1tv data file with setpoints The filename must be specified Interpolation is as above This block has no input and the dimension of the output vector equals the number of reference outputs found in the file 6 Times MO Reads the square reduced mass matrix Mo from an 1tv file generated with e g mode 3 The output of the block equals the input of the block is multiplied with the mass matrix The filename must be specified In the case not the full dimension of Mo in the 1tv is used the reduced dimension has to be specified All elements of Mo are interpolated linearly default or stepwise The dimension of the output vector equals the dimension of the input vector
70. lects the vibration modes Selects the buckling modes Sets the amplitude of the vibration or buckling modes Sets recordmovie on or off the movie is saved as an avi file in the workspace Sets the name of the recorded movie Sets the visualization of the un deformed mechanism on or off Sets the period of the sine function for the vibration mode Sets the size of the line elements that are used to draw the elements Sets the number of steps in the vibration visualization Sets the light on or off Sets the joints on or off Sets the trajectory on or off Selects the node for the trajectory Section 2 7 Visualization and animation 43 The parameters for these keywords are listed below KEYWORD DESCRIPTION DEFAULT BEAMVIS x1 1 size of all beam elements in the local y direction 0 006 1 element number 2 size of the element for the local y direction 0 006 3 size of the element for the local z direction 0 006 1 element number 2 length of the hinge 0 003 3 radius of the hinge 0 009 on TRANSPARENCY 1 adjusts the transparency Between Oad I I VEBRATTONNODE 1 amplitude of the vibration or buckling modes Alena UNDEFORMED 1 sets the visualization of the initial n eea un deformed mechanism configuration on 1 or off 0 VIBREND 1 sets the period of the sin function for the 2r x3 STEPLINE 1 sets the size of the line elements that are used 0 2 eo to draw the elements ne STEPVIBRATION 1 sets the number o
71. lement 4 and p 2kg m for element 5 The concentrated masses in nodes B and C are 10 kg and 30kg respectively The effect of gravity is accounted for by applying external forces m g in negative z direction where g 10 m s Inverse dynamics problem First the inverse dynamics problem is analysed Figure B 43 shows the velocity components of the end effector that are computed for the trajectory defined in the input file The position and acceleration components of the end effector are shown Fig B 42 and Fig B 44 respectively The following input file robot inv dat is used SPACAR mode 2 78 Chapter 3 Examples HINGE 11 2 0O 0 1 TRAJECT 3 HINGE 2 2 3 0 1 0 TRANS 8 0 BEAM 44356 0 1 0 TRTIME 0 2 20 HINGE 3 6 7 O 1 0 BEAM 55789 Q 1 Q NOMS 11 1 NOMS 22 x 4 0 0 0 NOMS 3 3 J x 5 0 268 0 0 6467 X 8 0 536 0 O REFE 111 REFE Zo FIX 1 REFE 3 3 1 FIX 4 REFEP 41 1 INPUTX 8 1 REFEP 5 2 1 INPUTX 8 2 REFEP 6 3 1 INPUTX 8 3 REFEDP 7 1 1 RLSE pl REFEDP 8 2 1 RLSE 2 REFEDP 9 3 1 RLSE 3 1 REFX 10 8 1 REFX 11 8 2 END REFX 12 8 3 HALT REFXP 13 8 1 REFXP 14 8 2 XM 5 10 REFXP 15 8 3 XM 8 30 EM 4 4 END EM 5 2x END XF 1 0 0 14 XF 5 0 O 121 VISUALIZATION XF 8 0 O 3 0 7 BEAMVIS 0 01 0 0 HINGEVIS 1 0 01 END HINGEVIS 2 0 01 HALT HINGEVIS 3 0 01 LIGHT 1 TRAJECT 1 TRANSPARENCY
72. ll loadsbm dl ltv dll mritv dll repinsbf dll spacar dll spacntrl dll spasim dll Files with extension m are the MATLAB files necessary to use the SPACAR program The following file must exist spadraw m Other m files provide help text for the MEX modules These files are checksbf m combsbd m getfrsbf m getss m loadsbd m loadsbm m ltv m mrltv m repinsbf m spacar m spacntrl m spasim m Files with extension md1 are SIMULINK models There is only one file which is actually a library from which the SPACAR modules for use in SIMULINK can be copied spacar_lib mdl The optional data files from spadata zip can be extracted in a separate working directory The files in the SPACAR subdirectory should be in the MATLAB path when MATLAB is running There are two ways to accomplish this 1 Make sure that the SPACAR subdirectory is the local directory You can verify this by typing pwd If necessary change your local directory by typing cd Matlab Toolbox Spacar or whatever directory you chose to store your files Another possibility is to change the settings of the MATLAB environment by adding the SPACAR subdirectory to the MATLAB path This modification is either temporary or per manent The path can be modified from the pulldown menu with File Set Path or by using the MATLAB commands path or addpath Now you are ready to run SPACAR in MATLAB and SIMULINK SPACAR error messages An analysis with SPACAR in MA
73. mation parameters nxp number of fixed calculable input and dynamic coordinates nep number of fixed calculable input and dynamic deformation parameters lnp location matrix for the nodes sa le location matrix for the elements 1 In connection matrix for the nodes in the elements E2 it list of element types 2 time time column vector x coordinates nodal displacements xd nodal velocities xdd nodal accelerations fX prescribed nodal forces moments fxtot reaction forces moments e generalized deformations ed velocities of generalized deformations edd accelerations of generalized deformations sig generalized stress resultants de first order geometric transfer function for the deformations DF 3 dx first order geometric transfer function for the coordinates DF d2e second order geometric transfer function for the deformations D F 3 d2x second order geometric transfer function for the coordinates DPF 3 xcomp1 location vector for directional nodal compliances 4 rxyz initial orientations of elements 2 Notes 1 The two location matrices provide information to find the location of a specific quantity in the data matrices lnp location matrix for the nodes The matrix element 1np i J denotes the location of the jt coordinate j 1 4 of node i le location matrix for the elements The matrix element le i j denotes the location of the jt generalized deformation j 1 6 of element i The locations of undefined or unus
74. mechanism in nodes Specification of MATLAB M file for user functions with input for forces and stresses Specification of elastic constants Specification of preloaded state Specification of viscous damping coefficients TIMESTEP Duration and number of time steps INPUTX Specification of simple time functions for the INPUTE prescribed degrees of freedom STARTDX Specification of initial values for the dynamic degrees STARTDE of freedom USERINP Specification of MATLAB M file for user functions with input for the degrees of freedom INTEGRAT Select integrator ERROR Specification of error tolerances for the integrator ITERSTEP Specification of number of iterations and steps and error tolerance for static calculations in modes 7 8 and 9 24 Chapter 2 Keywords The parameters required with these keywords are listed below i refers to note 7 listed at the end of the keywords node number concentrated mass for position nodes rotational inertia J for plane orientation nodes for spatial orientation nodes the inertia components Toy 1 dive 1 Jyy 1 Jyz 1 Jzz 1 element number mass per unit of length rotational inertia Jy per unit of length for spatial beam rotational inertia J per unit of length for planar beam rotational inertia Jy per unit of length for spatial beam rotational inertia J per unit of length for spatial beam rotational inertia Jy per u
75. mentation some further extensions are provided It is possible to include the effect of proportional controller gain i e a proportional control matrix K into the stiffness matrix Ko Of course in that case this part of the control action should no longer be included in the controller in the block scheme This approach offers advantages when subsequently a modal analysis is applied to the linear time varying state space system Such an analysis discriminates quasi static behaviour of the system low frequent vibrational modes and high frequent vibrational modes Mostly the latter do not significantly affect the output of the system while they can have a detrimental effect on the computational efficiency even for a linearized system With a modal analysis it is possible to eliminate these high frequency modes A more profound description of the latter two techniques is currently outside the scope of this manual 14 Chapter 1 The SPACAR program Keywords 2 1 Introduction In this chapter the user is informed about the creation of correct input data for the software package SPACAR The input must have a specific form Behind a number of permitted keywords the user supplies a list of arguments The arguments behind a keyword are well defined Each module of SPACAR except mode 4 of LINEAR has its own list of available keywords They form blocks that are separated by the following pair of keywords END HALT The final closure of the in
76. name refers to the dat file that is executed by SPACAR 1 4 SPASIM and SIMULINK The behaviour of a manipulator mechanism with e g closed loop control can be simulated using SIMULINK The closed loop simulation is defined as the problem of computing the actual trajectory of e g the manipulator tip with controlled actuation of the motion Tracking errors with respect to a nominal prescribed trajectory can be calculated Figure 1 2 shows an overview of a typical simulation scheme The simulation is characterized by the inverse dynamics stage based on a rigid link model and a forward dynamic stage At the forward dynamics stage the tracking behaviour of the manipulator system is studied In the case of flexible manipulators additional generalized coordinates describing the elastic behaviour of the manipulator links can be used in the dynamic system The block diagram in Fig lL 3 shows a typical closed loop simulation in more detail Blocks are used from the SPACAR SIMULINK library spacar_1ib that is part of the SPACAR package These blocks are front ends to so called S functions in SIMULINK 3 The following blocks are provided 10 Rigid or rigidified link model prescribed trajectory Chapter 1 The SPACAR program Flexible link model actual trajectory Uo y H a INVDYN A M Ya c simulation LINEAR gt read coeff Mo Co Ko control matrices parameters
77. ne of the SPACAR package for use with MATLAB and SIMULINK is given in the next sections E g for the design mechanical systems involving automatic controls like robotic manipulators interfaces with MATLAB 2 are provided for open loop system analyses Section L2 Open loop and closed loop simulations can be carried out with blocks from a SIMULINK library Section L4 A special visualization tool SPAVISUAL is described in Section Additional tools are available for using the perturbation method and the modal techniques in SIMULINK Section L_5 Installation notes for SPACAR are given in Appendix A A graphical user interface GUI for generating input files for spatial systems is in preparation and as we hope will be available in near future People interested in rigid planar mechanisms may consider the use of the commercially available package SAM by ARTAS 4 It has a nice graphical interface for the definition of mechanisms and it provides more elements than SPACAR 1 2 SPACAR amp MATLAB The SPACAR program system for use in the MATLAB environment contains five modules which obtain their input from format free user supplied data In the following a short description of every module will be given The functional connections between the modules are illustrated in Fig 2 Chapter 1 The SPACAR program mechanism topology dynamic geometry properties trajectory path DOF s q forces velocity profile
78. ng of the keywords and their parameters is discussed in detail In the examples in ChapterB complete input files are presented Running SPACAR in the MATLAB environment Once the mechanism is defined and this information is saved to a dat input file SPACAR can be activated with the MATLAB command gt gt spacar mode filename Here mode indicates the type of computation as shown in Fig filename is the name of the input file without the extension dat The filename is limited to 20 characters from the set 0 9 a z A Z and _ so it can not include drive or path specifications The linearization with mode 3 needs data from a previous inverse dynamics computation To that order the specified filename is truncated with at least one character at the right until a valid output data file is found So e g spacar 3 testlin can use data from an earlier spacar 2 test computation If no data file can be found this way the linearization is aborted During the computation a plot of the mechanism is shown in a separate window While the simulation is running an Abort button is activated in the plot area Pressing this button will terminate the simulation possibly after some delay To speed up the computation the plot can be disabled by specifying the mode with a minus sign e g mode 2 for an inverse dynamics computation without a continuously updated plot The plotting utility spadr
79. nit of length for spatial beam node number Q components of absolute angular rotor velocity free Q rotor motion or components of constant angular rotor Qs J velocity relative to the carrier body prescribed rotor motion rotor inertia J type of rotor motion 0 free 1 prescribed first element number deformation coordinate of first element second element number deformation coordinate of second element 3 5 entry in the mass matrix M x2 WN RIN DW NH BW 4 5 6 1 2 3 4 BRWNHKIAMN node number forces dual with the 1 node coordinate forces dual with the 2 4 3 and 4 node coordinate Name of the MATLAB M file with user functions with forces and stresses 3 Section 2 3 Dynamics 23 element number EA for beam and truss elements S1 S for hinge elements S1 first stiffness coefficient for pinbody and cognates GI for spatial beam EI for planar beam Sy second stiffness coefficient for pinbody and cognates 4 EI for spatial beam EI GAk for planar beam S3 third stiffness coefficient for pinbody and cognates 4 EI for spatial beam 4 EI GAk for spatial beam 4 EI GAk for spatial beam 4 element number preloaded force in beam pinbody and truss elements and torque in hinge elements element number E44 longitudinal damping for beam and truss elements Sai torsional damping for hinge elements Sai first damping
80. ns that no mode 2 output data file with extension sbd matching the current mode 3 data file can be found Mechanisms are different Configuration mismatch LE and Configuration mismatch LNP arise from an error during the comparison between a the configuration used in a previous mode 2 run and the current mode 3 run ERROR in subroutine ORDEO IFLAG 2 and ERROR in subroutine ORDEO No convergence indicate problems with the zeroth order iteration In SPASIM this may be avoided by setting or decreasing the maximum time step of SIMULINK s solver ERROR in subroutine SOLDYN is usually caused by a singular mass matrix PRPARE NUMBER OF NXC NOT EQUAL TO NEO NEMis caused by an ill defined mechanism ERROR in subroutine PRPARE Too many means that the mechanism that is defined is too large to be handled by the SPACAR version you are using see Ta ble LI on page Simplify the mechanism or contact the authors The messages written to the log file may be self explanatory but also a somewhat cryptic messages ERROR OR POSSIBLE ERROR CODED lt code gt ITEM lt number gt can occur The lt code gt is related to a procedure in the software Typical examples are INVOERi input for the kinematics Sect 2 2 SINVOERi input for the inverse dynamics setpoint generation Sect 2 4 LIMVOEi input for the linearization Sect 2 5 SIMVOEi input for the non linear simulation of manipulato
81. on mode coordinate is specified each of the specified coordinates is chosen as a degree of freedom or as released 7 There are four distinct cases two for the planar elements and two for the spatial elements For the planar elements if two numbers are specified this is the direction of the local x axis and an orthogonal y direction is found by rotating by a right angle in the positive direction and the directions are normalized if four numbers are specified these are taken as the direction vectors in the local x and y directions as they are For the spatial elements if six numbers are specified these are taken as the direction of the x axis and a direction in the local x y plane which are made orthonormal and completed by a local z axis if nine numbers are specified these are taken as the three direction vectors as they are 8 Both parameters for the outputs level are integers of which the values are the sum of the desired outputs A value of 0 implies the least output an output level of 1 means maxi mum output to obtain multiple outputs the specified values for the parameters should be added For the first parameter for the Log file are defined 22 Neo Chapter 2 Keywords Default All normal output Additional output of the first order geometric transfer functions in de and dx Additional output of the second order geometric transfer functions in d2e and d2x for mode 4 7 8 and 9 Additional
82. oo f represents the bucking load that corresponds with A In addition directional nodal compliances are computed In mode 9 linearized equations for control system analysis are computed for a static equilib rium configuration or a state of steady motion and are generated in the form Mo sgt CE DE ddt KE NG GE q Bodu 1 5 where By Du F Da Fy Ml Cor D5 Kt NG Get ao is the input matrix and u 5f07 50 64 64 5a 1 7 4 Chapter 1 The SPACAR program is the input vector The vectors 6g dq dq represent the prescribed input accelerations velocities and displacements respectively The linearized equations can be transformed into the linearized state space form z Adz Bou 1 sy Coz Dou ee where A is the state matrix B the input matrix C the output matrix and D the feed through matrix The state vector Jz is defined by 6z 5q 5q where dq is the vector of dynamic degrees of freedom The matrices B C and D depend on the chosen input vector du and the output vector dy Details of the linearization are discussed in Chapter 12 of the lecture notes Definition of a mechanism model A model of a mechanism must be defined in an input file of file type or file name extension dat This input file consists of a number of keywords with essential and optional parameters The input file can be generated with any text editor In Chapter 2 the meani
83. oordinate number 1 2 3 or 4 output number x1 element number deformation parameter number 1 2 3 4 5 or 6 output number 1 node number coordinate number 1 2 3 or 4 NOTES 1 The input numbers and output numbers are the positions of the specified input or output in the input and output vectors respectively They need not be identical to the nominal input vector and reference output vector specified during the generation of setpoints see Sect 2 4 2 and or Sect 2 5 but for a quite straightforward comparison it is convenient to use at least partially the same numbering scheme 42 Chapter 2 Keywords 2 7 Visualization and animation To adjust the default settings of SPAVISUAL the user can type VISUALIZATION after the last two END commands in the dat file All commands after the command VISUALIZATION are read by SPAVISUAL as an adjustment on the default settings BEAMVIS HINGEVIS TRUSSVIS TRANSPARENCY VIBRATIONMODE BUCKLINGMODE ENLARGEFACTOR RECORDMOVIE MOV IENAME UNDEFORME VIBREND STEPLINE STEPVIBRAT LIGHT JOINTS TRAJECTVIS TRAJECTNODE Adjusts the height and the width of a beam element Adjusts the radius and the length of the hinge element Sets the visualization of the truss element on or off Adjusts the transparency of the elements Se
84. plied subsystem in the design of a mechanism It finds its applications in combustion engines compressors and regulators FigureB 4 presents a slider crank mechanism for which three dynamics computations have to be carried out In the first problem case 1 see also example 5 7 2 in the lecture notes 1 the crank and the connecting rod are assumed to be rigid In the second computation case 2 the connecting rod is shorter but still somewhat longer than the crank In case 3 the flexibility of the connecting rod in the geometry of case 1 is taken into account see also example 8 3 1 in the lecture notes I Case 1 First of all the nodal coordinates must be specified In the initial configuration the crank and the connecting rod are horizontal The crank length is 0 15 m the length of the connecting rod is 0 30m For the dynamic analysis the following parameters are needed The connecting rod Figure 3 4 Planar slider crank mechanism 48 Chapter 3 Examples has a circular cross section with diameter d 6mm The mass density is p 7 87 10 kg m and the Young s modulus is 2 1 10 N m Consequently the mass per unit length is 0 2225 kg m and its total mass m 0 06675 kg The mass of the sliding block or plunger C is given by mo im 0 033375 kg The crank is driven at a constant angular velocity wo 150rad s The total simulation should comprise two crank rotations Node B must be defined as a single translational no
85. put is effected by END END The first block contains the kinematic data The input of the mechanism model by means of keywords is treated in the Kinematics section 2 2 A second block of input is reserved for the dynamics module The keywords for this block are presented in the Dynamics sec tion 2 3 The solution of inverse dynamics problems demands additional input for the trajectory description and for the definition of the input and output vectors uo and y Trajectory key words and system keywords are treated in the Inverse dynamics section 2 4 The keywords for the linearization of mode 3 are given in the Linearization section2 5 At the end of the file custom settings for SPAVISUAL can be added The keywords for SPAVISUAL are presented in section The simulation of mechanisms using SIMULINK is controlled by the keywords described in the Simulation section 2 6 Some general remarks e Keywords and arguments can be separated by one or more spaces tabs or line breaks e Lines must not contain more than 160 characters 15 16 Chapter 2 Keywords e Any text in a line following a or is treated as a comment e All input is case insensitive e Data read from the input file are echoed in the log file after the comments have been removed and all text is transformed into upper case capitals e Angles are always specified in radians e For commands like XF and START DE not all ar
86. r control Sect 2 6 PREPTR trajectory data processing Note that errors in the input file are often reported one line later than the actual error position MATLAB tutorial C 1 Basic MATLAB graphics commands MATLAB provides a variety of functions for displaying data This section describes some of these functions For a complete survey of graphics functions available in MATLAB we refer to the official MATLAB documentation 2 or to the online help utility Elementary plotting functions The following list summarizes the functions that produce basic line plots of data These func tions differ only in the way they scale the plot axes Each accepts input in the form of vectors or matrices and automatically scales the axes to accommodate the input data plot creates a plot of vectors or columns of matrices loglog creates a plot using logarithmic scales for both axes semilogx creates a plot using a logarithmic scale for the x axis and a linear scale for the y axis semilogy creates a plot using a linear scale for the x axis and a logarithmic scale for the y axis You can add titles axis labels grid lines and text to your graph using e title adds a title to the graph xlabel adds a label to the z axis y Label adds a label to the y axis text displays a text string at a specified location gtext places text on the graph using the mouse grid turns on off grid lines 9
87. rees of freedom can be written as e q ee 1 9 where e represent the large relative displacements and rotations and are the flexible de formation parameters Due to the flexibility the actual trajectory motion will deviate from the 12 Chapter 1 The SPACAR program prescribed motion If the deviations are small compared to the large scale motion then the small vibrational motion of the manipulator can be modelled as a first order perturbation q of the nominal rigid link motion q by writing for the degrees of freedom q qo q 1 10 The perturbation method involves two steps 1 Compute nominal rigid link motion qo from the non linear equations of motion with all flexible deformation parameters 0 This analysis will also provide the nominal input ug of the manipulator necessary to carry out the nominal motion and the generalized stress resultants Langrange multipliers o of the rigidified deformations i e the flexible deformations that are prescribed zero 2 Compute the vibrational motion q from linearized equations of motion where Mo is the reduced mass matrix Co includes the velocity sensitivity and damping matrices and all stiffness matrices are combined into Ko The righthand side equals oo peak 1 12 where u u Uo is the actual control action u minus the nominal input uo The pre viously computed generalized stress resultants o5 are now applied as internal excitation
88. ribed Otherwise each row in e and or x should define one deformation or coordinate at the specified time t Five columns should be provided with The element number e or the node number x The deformation mode number e or the coordinate number x The current value of the deformation e or coordinate x The current rate of the deformation or velocity The current acceleration of the deformation or coordinate 2 The user has to assure the correctness of the derivatives SPACAR does not carry out any checks but the results depend heavily on these derivatives x10 Available integrator types are 0 Default Shampine Gordon 1 Runge Kutta 2 2 4 order Runge Kutta Change this only if you know what you are doing Section 2 4 Inverse dynamics setpoint generation 29 2 4 Inverse dynamics setpoint generation For clarity the keywords for the inverse dynamics including the generation of setpoints are dis cussed in two subsections In the input file keywords from both subsections must be combined into one part so there should be no END HALT pair in between 2 4 1 Trajectory generation There are three essential keywords blocks KEYWORDS TRAJECTORY GENERATION TRAJECT Trajectory header the given trajectory number is valid for all keywords before the next TRAJECT Definition of the actual trajectory the number and type of DOFs determine which and how many keywords have to be specified TRO
89. rid gt gt xlabel time s gt gt ylabel Fx 6 Fy 6 N Case 2 The input file of case 1 page 48 is modified to account for the shortened connecting rod Only the initial position of node 6 in the second block of the kinematic definition has to be changed X 6 0 35 0 The initial configuration of case 2 is depicted in Fig B 11 The horizontal position velocity and acceleration of the sliding block as a function of time are given in Figs The driving moment in node 2 versus time is shown in Fig 3 15 and the supporting forces acting on the sliding block are presented in Fig 3 16 The MATLAB commands used to plot these results are identical as in case 1 page 48 Case 3 To take the flexibility of the connecting rod into account with a reasonable accuracy the planar beam element used for this rod see Fig B 4 is split into two parts One translational node and one rotational node are inserted and the numbers of the nodes in the sliding block C are changed The bending stiffness of the connecting rod is computed using the moment of inertia I rd 64 The input file crankf1 dat is now Section 3 2 Planar slider crank mechanism Figure 3 11 Case 2 Initial configuration of the slider crank mechanism didt x 6 m s o nunes Figure 3 13 Case 2 Horizontal velocity of the sliding block 5 g i rol Lf ere 20 i Je 4 L A Uta al lo 0
90. s are set at right angles Figure 3 26 Four bar mechanism to one another The diagonal element 3 represents a spring with stiffness k EA lo A con centrated mass m is attached at node 4 The deformation parameter e3 has been chosen as the generalized coordinate The equation of motion is m s V2m 3 kez mg 3 1 Using the coefficient matrices from the lecture notes the linearized equation of motion is mo 3 2V 2m s s k V2mg 2V2m 3 5m 3 de3 0 3 2 These results can also be obtained numerically from a SPACAR analysis E g with numerical values for m 1 g 10 and k 1 and initial conditions e3 0 and g 1 the acceleration is according to Eq s 10 V2 8 59 A SPACAR input file Eourbar dat for this case is PLTRUSS 1 1 2 PLTRUSS 2 1 3 PLTRUSS 3 2 3 PLTRUSS 4 2 4 PLTRUSS 5 3 4 X 1 0 0 Section 3 4 Planar four bar mechanism 59 X 2 0 7071 0 7071 X 3 0 7071 0 7071 X 4 Q 1 4142 FIX 1 FIX 4 DYNE 3 l END HALT XM 4 Le XF 4 0 10 ESTIFF 3 1 4142 STARTDE 3 1 0 il END END In a MATLAB session we get the literal text of the session is modified somewhat to get a more compact presentation gt gt spacar l1 fourbar gt gt e le 3 1 ans 0 gt gt ed le 3 1 ans 1 gt gt edd le 3 1 ans 8 5858 Substituting the numerical values of the parameters into the linearized equation
91. s modelled by two equal planar beam elements as shown in FigureB 28 A SPACAR input file column2 dat for this case is PLBEAM 112 3 4 PLBEAM 2 3 4 5 6 xX 1 X X5 l Ww O O ouno O OoOO ooo FIX 1 FIX 2 FIX 6 DYNX DYNX DYNX RLSE RLSE Nr OP W NM NMN FEF NY END HALT EM 1 1 EM 2 1 Section 3 6 Cantilever beam in Euler buckling 65 ESTIFF 1 0 1 ESTIFF 2 0 XF 5 1 0 0 0 END END In a MATLAB session we obtain gt gt spacar 8 column2 gt gt edit column2 log Load multipliers and normalized buckling modes Load multiplier no Tf EO 3 9 94384680E 00 4 00000000E 01 1 28722820E 02 Buckling mode nro 1 to 3 0 2596610869 1 0000000000 0 0519056301 0 8141747968 0 0000000000 0 9932416764 0 5193221738 0 0000000000 0 1038112603 Hence we find a load multiplier Ay Fer Fo 9 944 Since Fo 1 we have F Fin 9 944 7 1 0075 66 Chapter 3 Examples 3 7 Cantilever beam subject to concentrated end force 4 Figure 3 29 Cantilever beam loaded by a concentrated force at the free end Consider a slender cantilever beam with a circular cross section of diameter d 1cm and length l 10m The material properties for this example are EJ 102Nm The beam is subdivided into 5 planar finite elements as shown in Fig A point force F of 14N is applied along the vertical axis at the free end of the beam It generates an
92. t gt nod n0 80 0000 0 0 0000 50 0000 The complex eigenvalues and associated eigenvectors can be found in the log file Complex eigenvalues and normalised eigenvectors of the state spac system matrix Notation real imaginary Eigenvalue numbers 1 to 4 0 00000E 00 5 55511E 01 0 00000E 00 2 47806E 01 Eigenvector numbers 1 to 4 0 0141650 0 0000000 0 0177403 0 0000000 0 0111041 0 0000000 0 0362089 0 0000000 0 0000000 0 7868804 0 0000000 0 4396164 0 0000000 0 6168430 0 0000000 0 8972801 From the eigenvalues numbers in this table we find w 24 78 rad s and wy 55 55 rad s 64 Chapter 3 Examples 3 6 Cantilever beam in Euler buckling Figure 3 28 Cantilever beam loaded axially by a force F at the free end Consider a slender cantilever beam or column with suppressed rotation of the free end loaded axially by a force F The smallest load that produces buckling is called the critical or Euler load Fa For a load equal to or greater than the critical load the beam is unstable The bent shape shape shown represents the buckling mode Euler s theoretical buckling load for the above beam end conditions is Fin 7 EI I where ET is the flexural rigidity and the length of the beam This result can also be obtained numerically from a SPACAR analysis e g with the following numerical values 1 EJ 1 F 1 The beam i
93. the input and output angles of the hinge elements D and 4 respectively The essential behaviour of the joint can be simulated with the following input file cardansimp dat dls 0 0 0 alos 0 0 Ois ils 0 707 O 707 Qz INGE INGE INGE INGE Oe W NY D D E DUNE DUNE FIX 1 FIX INPUTE 1 1 RLSE RLSE RLSE A w N END HALT INPUTE TIMESTEP 1 0 100 END END 56 Chapter 3 Examples Note that in the initial configuration the input shaft is rotated by a right angle with respect to the configuration in Figure B 21 However the visualization of this simulation is quite poor This can be improved by adding some beams to the input and output rotational nodes numbers 2 and 4 respectively The com plete input file cardan dat becomes INGE INGE INGE INGE on oe maa BEAM BEAM BEAM BEAM tj s tj s KOK K MX INPUTE UI H O l D s O Oo w u H O1 F B WN EF Owe W NY Fon Dd N B amp B CO N Wr wo 707 707 0 707 0 707 RLSE RLSE RLSE END HALT INPUTE W TIMESTEP 100 END END oO 0 CO 0 1 0 s707 0 707 707 707 0 0 Sling 0 0 707 0 707 The initial configuration of this mechanism is shown in Fig Figures and show the zeroth first and second order geometric transfer functions from input ef to output 4 e r
94. y the specified maximum value The results from the simulation are plotted using the MATLAB commands gt gt plot t yref 1 r t yref 2 eae t yret 3 b try a nys t y 2 9 t y ea Bes gt gt plot t yref 10 py pens 5 ply OOS qee x t yref 22572 yll ta try tell qe Ae play bs Figures 3 48 and B 49 show the deformation of the hinges and the position coordinates of the end effector from this simulation The solid lines are the reference data yref and the dotted lines are from the actual simulation y Clearly small errors during the integration lead to relatively large position errors at the end of the motion The error can be decreased by increasing the integration accuracy e g by enlarging the number of computed setpoints More reliable results can be obtained by applying feedback control as will be discussed next Section 3 11 Rigid spatial manipulator mechanism 85 Closed loop simulation The block diagram of Fig 3 47 is extended with a feedback controller as shown in Fig 33 50 A feedback signal is computed by a controller that is implemented as a subsystem block and a multiplication with the reduced mass matrix Mo The subsystem assumes that the input is a vector with both de and d These are the differences in joint positions and velocities which are computed by comparing the actual motion and the nominal output The output of the subsystem is K e K 0e with well chosen matric

Download Pdf Manuals

image

Related Search

Related Contents

  AirSep Quietlife User Manual - Altra Service Professionals  Transport externe héliporté  オシロスコープ 1-4105  GAS FREESTANDING OVEN USER`S MANUAL  

Copyright © All rights reserved.
Failed to retrieve file