User Tools

Site Tools


faq

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
faq [2021/06/07 15:51]
marijn.nijenhuis [3. Bode plots]
faq [2023/11/09 22:30] (current)
marijn.nijenhuis [3. Changing units]
Line 18: Line 18:
   * For motion in the DOF (the actuation direction of the mechanism), it is likely that the deformation, stiffness, stress and eigenfrequency can be predicted sufficiently accurately with a single beam per flexible element. (You can investigate this using the approach described above.)   * For motion in the DOF (the actuation direction of the mechanism), it is likely that the deformation, stiffness, stress and eigenfrequency can be predicted sufficiently accurately with a single beam per flexible element. (You can investigate this using the approach described above.)
   * For higher mode shapes, associated with motion in a constrained direction of the mechanism, it is likely that multiple beams are needed per flexible element. A good starting point would be to use ''eprops(i).nbeams = 3'' and investigate if this is enough (i.e. check if the eigenfrequency of interest doesn’t change when further increasing the number).   * For higher mode shapes, associated with motion in a constrained direction of the mechanism, it is likely that multiple beams are needed per flexible element. A good starting point would be to use ''eprops(i).nbeams = 3'' and investigate if this is enough (i.e. check if the eigenfrequency of interest doesn’t change when further increasing the number).
-  * By default, Spavisual only shows the first 10 mode shapes of the mechanism. To increase this number, see the use of the ''opt.custom'' field in the [[full_syntax|full syntax list]].+  * By default, Spavisual only shows the first 10 mode shapes of the mechanism. To increase this number, see the use of the ''opt.customvis'' field in the [[full_syntax|full syntax list]].
   * Increasing the number of beams leads to more degrees of freedom and more eigenmodes (with generally higher eigenfrequencies). The state space and transfer function representations will contain many states. If possible, avoid unnecessary conversions from state space to transfer functions.   * Increasing the number of beams leads to more degrees of freedom and more eigenmodes (with generally higher eigenfrequencies). The state space and transfer function representations will contain many states. If possible, avoid unnecessary conversions from state space to transfer functions.
   * To use such a detailed model in Simulink, pre-process the state space representation to discard eigenfrequencies higher than the Nyquist frequency. See the project lectures for details.   * To use such a detailed model in Simulink, pre-process the state space representation to discard eigenfrequencies higher than the Nyquist frequency. See the project lectures for details.
Line 45: Line 45:
 **Manual releases**: An alternative solution is to provide appropriate releases for the deformations in the ''opt.rls'' field. This way, you can have loops of rigid elements. A future article may detail how to do that exactly … **Manual releases**: An alternative solution is to provide appropriate releases for the deformations in the ''opt.rls'' field. This way, you can have loops of rigid elements. A future article may detail how to do that exactly …
  
-===== 3. Bode plots =====+===== 3. Changing units ===== 
 +When the system parameters are expressed with very small numbers, you may receive the warning "Mass coefficients turn out to be very small" or the related error "Singular mass matrix". Changing the units of the parameters involving the length dimension may help. 
 + 
 +The example file that comes with SPACAR Light assumes meters as the default unit for length. To change to other units, your script should be adjusted in several places, depending on how each physical quantity scales with the length L: 
 +  * coordinates of the nodes (''nodes''): default unit is m so the coordinates scale as L. 
 +  * input displacements (''nprops(i).displ_*'', ''nprops(i).displ_initial_*''): default unit is m so the displacements scale as L. 
 +  * (rotations in radians are independent of length) 
 +  * moment of inertia (''nprops(i).mominertia''): default unit is kg*m^2, so moment of inertia scales as L^2. 
 +  * forces (''nprops(i).force'', ''nprops(i).force_initial''): default unit is N = kg*m/s^2 so force scales as L. 
 +  * moments (''nprops(i).moment'', ''nprops(i).moment_initial''): default unit is N*m = kg*m^2/s^2 so moment scales as L^2. 
 +  * material stiffness properties (''eprops(i).emod'', ''eprops(i).smod''): default unit is Pa = N/m^2 = kg/(m*s^2) so these scale as 1/L. 
 +  * material density (''eprops(i).dens''): default unit is kg/m^3 so density scales as 1/L^3. 
 +  * cross-sectional dimensions (''eprops(i).dim''): default unit is m so these dimensions scale as L. 
 +  * gravitational acceleration (''opt.gravity''): default unit is m/s^2 so acceleration scales as L. 
 + 
 +In other words, if your script assumes meters as the unit for length, and you want to go to millimeters, the ''nodes'' matrix should be multiplied by 10^3. Likewise, the forces should be multiplied by 10^3, the moments by 10^6, the elasticity and shear modulus by 10^(-3), and all other quantities according to the list above. 
 + 
 +Note that output values, so numbers you see in the ''out'' structure and in Spavisual, are affected similarly. 
 +===== 4. Bode plots =====
 When making Bode plots of the system, in particular with a lot degrees of freedom (e.g. when ''eprops(i).nbeams'' is greater than 1), the default phase plot after doing ''bode(out.statespace)'' can be hard to interpret: When making Bode plots of the system, in particular with a lot degrees of freedom (e.g. when ''eprops(i).nbeams'' is greater than 1), the default phase plot after doing ''bode(out.statespace)'' can be hard to interpret:
  
Line 61: Line 79:
  
 Also see the [[parallel_flexure_guide_transfer|example on producing transfer functions]] for tips on making Bode plots that look nicer. Also see the [[parallel_flexure_guide_transfer|example on producing transfer functions]] for tips on making Bode plots that look nicer.
-===== 4. Animated GIFs of mode shapes =====+===== 5. Animated GIFs of mode shapes =====
 For presentation purposes, it can be helpful to create an animated GIF of a visualization in Spavisual. You can make a GIF for a particular mode shape or for the general motion of the system. In the Spavisual window, deselect the 'Auto' checkbox for 'Movie name' in the left bottom corner. Select the 'Record movie' checkbox and enter a filename with the extension '.gif'. Then, after clicking the play button for the relevant slider, the animated GIF will be created in the current folder. For presentation purposes, it can be helpful to create an animated GIF of a visualization in Spavisual. You can make a GIF for a particular mode shape or for the general motion of the system. In the Spavisual window, deselect the 'Auto' checkbox for 'Movie name' in the left bottom corner. Select the 'Record movie' checkbox and enter a filename with the extension '.gif'. Then, after clicking the play button for the relevant slider, the animated GIF will be created in the current folder.
  
faq.1623073894.txt.gz · Last modified: 2021/06/07 15:51 by marijn.nijenhuis