From b58d7627e4bcc1f473dfdc8967564d71b7429ab8 Mon Sep 17 00:00:00 2001 From: Thomas Dehaeze Date: Mon, 15 Jul 2019 13:36:14 +0200 Subject: [PATCH] Add few comments on simscape multibody --- .../identification.type.File.xml} | 2 +- .../1.type.DIR_SIGNIFIER.xml} | 2 +- ...-44a2-bc58-56fac4006009.type.Reference.xml | 2 - ...-4fcb-8b9b-833180e2f6fc.type.Reference.xml | 2 - ...4897-8adc-0c69dd956059.type.Reference.xml} | 0 ...-46eb-8350-609f08763240.type.Reference.xml | 2 - ...-4e77-b2a4-97d4753c1df9.type.Reference.xml | 2 - ...-4ed4-a859-51e1f5a18637.type.Reference.xml | 2 - identification/index.org | 31 +++++ index.org | 106 +++++++++++++++++- 10 files changed, 133 insertions(+), 18 deletions(-) rename .SimulinkProject/{Root.type.ProjectPath/83f0e724-9931-453a-b699-3bd293db000c.type.Reference.xml => Root.type.Files/identification.type.File.xml} (50%) rename .SimulinkProject/{Root.type.ProjectPath/56b46427-db89-446e-ab1b-3a8188f5e1b3.type.Reference.xml => Root.type.Files/identification.type.File/1.type.DIR_SIGNIFIER.xml} (50%) delete mode 100644 .SimulinkProject/Root.type.ProjectPath/0ae7cdd8-73c1-44a2-bc58-56fac4006009.type.Reference.xml delete mode 100644 .SimulinkProject/Root.type.ProjectPath/1809d361-dc3d-4fcb-8b9b-833180e2f6fc.type.Reference.xml rename .SimulinkProject/Root.type.ProjectPath/{a1959b94-b957-42df-87b8-4945482358a6.type.Reference.xml => 36ca1734-c731-4897-8adc-0c69dd956059.type.Reference.xml} (100%) delete mode 100644 .SimulinkProject/Root.type.ProjectPath/7e53593c-166d-46eb-8350-609f08763240.type.Reference.xml delete mode 100644 .SimulinkProject/Root.type.ProjectPath/a3b2491b-7b63-4e77-b2a4-97d4753c1df9.type.Reference.xml delete mode 100644 .SimulinkProject/Root.type.ProjectPath/d03bc20c-98e3-4ed4-a859-51e1f5a18637.type.Reference.xml diff --git a/.SimulinkProject/Root.type.ProjectPath/83f0e724-9931-453a-b699-3bd293db000c.type.Reference.xml b/.SimulinkProject/Root.type.Files/identification.type.File.xml similarity index 50% rename from .SimulinkProject/Root.type.ProjectPath/83f0e724-9931-453a-b699-3bd293db000c.type.Reference.xml rename to .SimulinkProject/Root.type.Files/identification.type.File.xml index ef68a83..1c0844e 100644 --- a/.SimulinkProject/Root.type.ProjectPath/83f0e724-9931-453a-b699-3bd293db000c.type.Reference.xml +++ b/.SimulinkProject/Root.type.Files/identification.type.File.xml @@ -1,2 +1,2 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/.SimulinkProject/Root.type.ProjectPath/56b46427-db89-446e-ab1b-3a8188f5e1b3.type.Reference.xml b/.SimulinkProject/Root.type.Files/identification.type.File/1.type.DIR_SIGNIFIER.xml similarity index 50% rename from .SimulinkProject/Root.type.ProjectPath/56b46427-db89-446e-ab1b-3a8188f5e1b3.type.Reference.xml rename to .SimulinkProject/Root.type.Files/identification.type.File/1.type.DIR_SIGNIFIER.xml index 702b119..1c0844e 100644 --- a/.SimulinkProject/Root.type.ProjectPath/56b46427-db89-446e-ab1b-3a8188f5e1b3.type.Reference.xml +++ b/.SimulinkProject/Root.type.Files/identification.type.File/1.type.DIR_SIGNIFIER.xml @@ -1,2 +1,2 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/.SimulinkProject/Root.type.ProjectPath/0ae7cdd8-73c1-44a2-bc58-56fac4006009.type.Reference.xml b/.SimulinkProject/Root.type.ProjectPath/0ae7cdd8-73c1-44a2-bc58-56fac4006009.type.Reference.xml deleted file mode 100644 index 8a11a4b..0000000 --- a/.SimulinkProject/Root.type.ProjectPath/0ae7cdd8-73c1-44a2-bc58-56fac4006009.type.Reference.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/.SimulinkProject/Root.type.ProjectPath/1809d361-dc3d-4fcb-8b9b-833180e2f6fc.type.Reference.xml b/.SimulinkProject/Root.type.ProjectPath/1809d361-dc3d-4fcb-8b9b-833180e2f6fc.type.Reference.xml deleted file mode 100644 index 1c14e65..0000000 --- a/.SimulinkProject/Root.type.ProjectPath/1809d361-dc3d-4fcb-8b9b-833180e2f6fc.type.Reference.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/.SimulinkProject/Root.type.ProjectPath/a1959b94-b957-42df-87b8-4945482358a6.type.Reference.xml b/.SimulinkProject/Root.type.ProjectPath/36ca1734-c731-4897-8adc-0c69dd956059.type.Reference.xml similarity index 100% rename from .SimulinkProject/Root.type.ProjectPath/a1959b94-b957-42df-87b8-4945482358a6.type.Reference.xml rename to .SimulinkProject/Root.type.ProjectPath/36ca1734-c731-4897-8adc-0c69dd956059.type.Reference.xml diff --git a/.SimulinkProject/Root.type.ProjectPath/7e53593c-166d-46eb-8350-609f08763240.type.Reference.xml b/.SimulinkProject/Root.type.ProjectPath/7e53593c-166d-46eb-8350-609f08763240.type.Reference.xml deleted file mode 100644 index 04a176b..0000000 --- a/.SimulinkProject/Root.type.ProjectPath/7e53593c-166d-46eb-8350-609f08763240.type.Reference.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/.SimulinkProject/Root.type.ProjectPath/a3b2491b-7b63-4e77-b2a4-97d4753c1df9.type.Reference.xml b/.SimulinkProject/Root.type.ProjectPath/a3b2491b-7b63-4e77-b2a4-97d4753c1df9.type.Reference.xml deleted file mode 100644 index 792160b..0000000 --- a/.SimulinkProject/Root.type.ProjectPath/a3b2491b-7b63-4e77-b2a4-97d4753c1df9.type.Reference.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/.SimulinkProject/Root.type.ProjectPath/d03bc20c-98e3-4ed4-a859-51e1f5a18637.type.Reference.xml b/.SimulinkProject/Root.type.ProjectPath/d03bc20c-98e3-4ed4-a859-51e1f5a18637.type.Reference.xml deleted file mode 100644 index 29ae5de..0000000 --- a/.SimulinkProject/Root.type.ProjectPath/d03bc20c-98e3-4ed4-a859-51e1f5a18637.type.Reference.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/identification/index.org b/identification/index.org index b03c35a..3fbd9ec 100644 --- a/identification/index.org +++ b/identification/index.org @@ -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) + <> +#+end_src + +#+begin_src matlab :exports none :results silent :noweb yes + <> +#+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 diff --git a/index.org b/index.org index 83e7030..446a284 100644 --- a/index.org +++ b/index.org @@ -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 |