Add few comments on simscape multibody

This commit is contained in:
Thomas Dehaeze 2019-07-15 13:36:14 +02:00
parent 714225ef96
commit b58d7627e4
10 changed files with 133 additions and 18 deletions

View File

@ -1,2 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info Ref="hac_lac" Type="Relative" />
<Info />

View File

@ -1,2 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info Ref="nass_library" Type="Relative" />

View File

@ -1,2 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info Ref="active_damping" Type="Relative" />

View File

@ -1,2 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info Ref="analysis" Type="Relative" />

View File

@ -1,2 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info Ref="initialize" Type="Relative" />

View File

@ -1,2 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info Ref="demonstration" Type="Relative" />

View File

@ -41,6 +41,21 @@
#+PROPERTY: header-args:latex+ :output-dir figs
:END:
* Introduction :ignore:
The goal here is to make an identification of the micro-station in order to compare the model with the measurements on the real micro-station.
In order to do so:
- Decide where to virtually excite the station and where to measure its motion
- Extract transfer functions from the excitation forces to the measured motion
- Compare those transfer functions with the modal analysis
For the excitation, we can choose the same excitation points as the one used for the modal test.
For the measurement points, we can choose the Center of Mass of each solid body.
The center of mass of each solid body is not easily defined using Simscape.
Indeed, we can define the center of mass of any solid body but not of multiple solid bodies. However, one solid body is composed of multiple STEP files.
One solution could be to use one STEP file for one solid body.
However, the position of the center of mass can be exported using simulink and then defined on Simscape.
* ZIP file containing the data and matlab files :ignore:
#+begin_src bash :exports none :results none
if [ matlab/identification_micro_station.m -nt data/identification_micro_station.zip ]; then
@ -56,9 +71,25 @@
All the files (data and Matlab scripts) are accessible [[file:data/identification_micro_station.zip][here]].
#+end_note
* Matlab Init :noexport:ignore:
#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
<<matlab-dir>>
#+end_src
#+begin_src matlab :exports none :results silent :noweb yes
<<matlab-init>>
#+end_src
* Identification of the micro-station
#+begin_src matlab
simulinkproject('../');
#+end_src
#+begin_src matlab
open sim_micro_station_id.slx
#+end_src
* Plot the obtained transfer functions
* Compare with the modal measurements
* Modal Identification of the micro station

106
index.org
View File

@ -64,12 +64,10 @@ The project can be opened using the =simulinkproject= function:
When the project opens, a startup script is ran.
The startup script is defined below and is exported to the =project_startup.m= script.
#+begin_src matlab :eval no :tangle src/project_startup.m
%%
freqs = logspace(-1, 3, 1000);
save_fig = false;
save('./mat/config.mat', 'freqs', 'save_fig');
%%
project = simulinkproject;
projectRoot = project.RootFolder;
@ -89,11 +87,107 @@ When the project closes, it runs the =project_shutdown.m= script defined below.
The project also permits to automatically add defined folder to the path when the project is opened.
* Notes
Step files are exported from SolidWorks and imported into Simscape.
Each step file is then considered as a solid body.
Inertia and mass matrices are computed from the density of the material and the geometry as defined by the step file.
* Simscape Model
A [[https://.mathworks.com/products/simscape.html][simscape]] model permits to model multi-physics systems.
[[https://mathworks.com/products/simmechanics.html][Simscape Multibody]] permits to model multibody systems using blocks representing bodies, joints, constraints, force elements, and sensors.
** Solid bodies
Each solid body is represented by a [[https://mathworks.com/help/physmod/sm/ref/solid.html][solid block]].
The geometry of the solid body can be imported using a =step= file. The properties of the solid body such as its mass, center of mass and moment of inertia can be derived from its density and its geometry as defined by the =step= file. They also can be set by hand.
** Frames
Frames are very important in simscape multibody, they defined where the forces are applied, where the joints are located and where the measurements are made.
They can be defined from the solid body geometry, or using the [[https://mathworks.com/help/physmod/sm/ref/rigidtransform.html][rigid transform block]].
** Joints
Solid Bodies are connected with joints (between frames of the two solid bodies).
There are various types of joints that are all described [[https://mathworks.com/help/physmod/sm/ug/joints.html][here]].
#+name: tab:joint_dof
#+caption: Degrees of freedom associated with each joint
| Joint Block | Translational DOFs | Rotational DOFs |
|-------------------+--------------------+-----------------|
| 6-DOF | 3 | 3 |
| Bearing | 1 | 3 |
| Bushing | 3 | 3 |
| Cartesian | 3 | 0 |
| Constant Velocity | 0 | 2 |
| Cylindrical | 1 | 1 |
| Gimbal | 0 | 3 |
| Leadscrew | 1 (coupled) | 1 (coupled) |
| Pin Slot | 1 | 1 |
| Planar | 2 | 1 |
| Prismatic | 1 | 0 |
| Rectangular | 2 | 0 |
| Revolute | 0 | 1 |
| Spherical | 1 | 3 |
| Telescoping | 1 | 3 |
| Universal | 0 | 2 |
| Weld | 0 | 0 |
Joint blocks are assortments of joint primitives:
- *Prismatic*: allows translation along a single standard axis: =Px=, =Py=, =Pz=
- *Revolute*: allows rotation about a single standard axis: =Rx=, =Ry=, =Rz=
- *Spherical*: allow rotation about any 3D axis: =S=
- *Lead Screw*: allows coupled rotation and translation on a standard axis: =LSz=
- *Constant Velocity*: Allows rotation at constant velocity between intersection through arbitrarily aligned shafts: =CV=
#+name: tab:joint_primitive
#+caption: Joint primitives for each joint type
| Joint Block | Px | Py | Pz | Rx | Ry | Rz | S | CV | LSz |
|-------------------+----+----+----+----+----+----+---+----+-----|
| 6-DOF | x | x | x | | | | x | | |
| Bearing | | | x | x | x | x | | | |
| Bushing | x | x | x | x | x | x | | | |
| Cartesian | x | x | x | | | | | | |
| Constant Velocity | | | | | | | | x | |
| Cylindrical | | | x | | | x | | | |
| Gimbal | | | | x | x | x | | | |
| Leadscrew | | | | | | | | | x |
| Pin Slot | x | | | | | x | | | |
| Planar | x | x | | | | x | | | |
| Prismatic | | | x | | | | | | |
| Rectangular | x | x | | | | | | | |
| Revolute | | | | | | x | | | |
| Spherical | | | | | | | x | | |
| Telescoping | | | x | | | | x | | |
| Universal | | | | x | x | | | | |
| Weld | | | | | | | | | |
For each of the joint primitive, we can specify the dynamical properties:
- The *spring stiffness*: either linear or rotational one
- The *damping coefficient*
For the actuation, we can either specify the motion or the force:
- the force applied in the corresponding DOF is provided by the input
- the motion is provided by the input
A sensor can be added to measure either the position, velocity or acceleration of the joint DOF.
Composite Force/Torque sensing:
- Constraint force
- Total force: gives the sum across all joint primitives over all sources: actuation inputs, internal springs and dampers.
** Measurements
A transform sensor block measures the spatial relationship between two frames: the base =B= and the follower =F=.
It can give the rotational and translational position, velocity and acceleration.
The measurement frame should be specified: it corresponds to the frame in which to resolve the selected spatial measurements. The default is =world=.
If we want to simulate an *inertial sensor*, we just have to choose =B= to be the =world= frame.
*Force sensors* are included in the joints blocks.
** Excitation
We can apply *external forces* to the model by using an [[https://mathworks.com/help/physmod/sm/ref/externalforceandtorque.html][external force and torque block]].
Internal force, acting reciprocally between base and following origins is implemented using the [[https://mathworks.com/help/physmod/sm/ref/internalforce.html][internal force block]] even though it is usually included in one joint block.
* Notes
** Simscape files for identification
|------------------------+----+----+----+------+------|
| Simscape Name | Ty | Ry | Rz | Hexa | NASS |