Skip to content

Commit

Permalink
Add: descriptions on computational framework
Browse files Browse the repository at this point in the history
Update: adding the links in the APIs doc
  • Loading branch information
Suke0811 committed Oct 1, 2024
1 parent e377867 commit 0b5d855
Show file tree
Hide file tree
Showing 11 changed files with 118 additions and 9 deletions.
3 changes: 2 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Mechanisms and Computational Design of Multi-Modal End-Effector with Force Sensing using Gated Networks
# Multi-Modal End-Effector
## Mechanisms and Computational Design of Multi-Modal End-Effector with Force Sensing using Gated Networks


<div style="text-align: center">
Expand Down
27 changes: 21 additions & 6 deletions docs/md/api/apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,30 @@

## How to Use the `BeamSensorTrajectory` and `MagnetSensorSimulation` Classes

This guide explains how to use the `BeamSensorTrajectory` class in conjunction with the `MagnetSensorSimulation` class for simulating beam and magnetic sensor interactions. The example provided runs a full simulation of sensor and magnet trajectories using beam deformation models and magnet configurations.
This guide explains how to use the `BeamSensorTrajectory` class in conjunction with the `MagnetSensorSimulation` class for simulating beam and magnetic sensor interactions.
The example provided runs a full simulation of sensor and magnet trajectories using beam deformation models and magnet configurations.

For the APIs, please see the following links.

::cards:: image-tags cols="3" class_name="bigger"
- title: Beam Deformation
content: • Von Karaman Beam Solver <br> • Beam deformation in $x$, $y$ and $\theta$
url: ../beam
- title: Magnetic Simulation
content: • Magnetic field simulation <br> • Sensor plots <br> • stream plots
url: ../mag
- title: Trajectory Generator
content: • handle sequential trajectory generation
url: ../traj
::/cards::

---

## Prerequisites
Before running the code, make sure you have the following packages installed:
- `numpy`
- `scipy`
- `plotly`
- `pandas`
- `MagPyLib`
```bash
pip install -r requirements.txt
```

## Example Usage

Expand Down
26 changes: 26 additions & 0 deletions docs/md/sim/beam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

# Beam Simulation

The flexure-based design of MAGPIE's sensing mechanism is simulated using Von Kármán beam theory to account for large deflections. This model is vital for predicting how the flexure will deform under applied forces.

**Mathematical Model:**

The vertical force balance (bending equation):

$$
EI \frac{d^4 w(x)}{dx^4} = q(x) - \frac{d}{dx} \left( N(x) \frac{dw(x)}{dx} \right)
$$

Where
- $E I$ is the flexural rigidity
- $w(x)$ is the vertical deflection
- $N(x)$ is the axial force
- $q(x)$ is the distributed transverse load

For horizontal force balance (stretching equation):

$$
\frac{d}{d x}\left(E A \frac{d u(x)}{d x}\right)=\frac{1}{2} E I\left(\frac{d w(x)}{d x}\right)^2
$$

This model helps ensure that the flexure design can withstand large deformations without failure while maintaining accurate force sensing.
20 changes: 20 additions & 0 deletions docs/md/sim/gru.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# GRU and GRBF Models for Force Estimation
The framework employs machine learning models to enhance the accuracy of force estimation and handle nonlinearity in sensor measurements:

---
## GRBF (Gaussian Radial Basis Functions)
An ideal model is generated using GRBF to estimate forces based on simulated sensor readings. This model assumes ideal conditions without accounting for real-world uncertainties like hysteresis and interference.
However, this provides a very quick solutions for your sensor designs.
Further tuning, such as bias compensations can improve the mean force estimation error.

!!! note

GRBF is nonlinear model here. Linear interporation may work much faster if the sensitivity is designed to be a constant, aka linear force-sensor relationship.

---
## GRU (Gated Recurrent Unit)
To address real-world uncertainties, a GRU-based model is trained with hardware data. The GRU model takes sensor inputs and outputs both mean force estimates and their associated uncertainties. This is essential for detecting anomalies, such as interference from external magnetic fields.



![gru.png](gru.png)
Binary file added docs/md/sim/gru.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/md/sim/interference.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions docs/md/sim/mag.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Magnetic Simulation
The Hall effect sensors detect force through magnetic field changes caused by the motion of a nearby magnet. The sensitivity of the magnetic field changes with respect to sensor positioning is critical to the design.

## Magnetic Field Sensitivity:

The magnetic sensitivity is modeled as:

$$
\mathcal{S}=\frac{\delta \mathcal{B}}{\delta X}
$$


Where:
- $\mathcal{B}$ is the magnetic field strength
- $X$ is the relative distance between the sensor and magnet

![sensitivity.png](sensitivity.png)

## Interference Analysis

Magnetic sensors are highly sensitive to interference from external magnetic fields, such as those from neighboring magnets or nearby motors. The framework includes an analysis of possible interference sources:
- Earth's Magnetic Field: Typically negligible due to the proximity of stronger magnets.
- Neighboring Magnets: Nearby magnets, especially when the gripper is closed, can interfere with measurements. The framework designs the sensing mechanism to minimize this interference.


![interference.png](interference.png)
17 changes: 17 additions & 0 deletions docs/md/sim/overall.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Computational Design Framework for MAGPIE

## Overview

MAGPIE (Multi-modal Adaptive Gripper for multi-Pedal Impact-resilient End-effector) is designed to serve as both a foot and a gripper in limbed robotics. The end-effector integrates 8-axis force sensing, which is achieved through Hall effect sensors and compliant mechanisms, providing measurements for both ground contact and grasping forces.

To optimize the design of MAGPIE's sensing mechanism, a computational design framework has been developed. This framework simulates various configurations of sensors, magnets, and flexures to achieve the desired force range, sensitivity, and robustness against interference.

---

## Framework Components

The computational design framework is divided into several key components: beam simulation, magnetic simulation, and interference analysis. These components interact to generate an optimal design for the force sensing mechanism.



![overall.png](overall.png)
Binary file added docs/md/sim/overall.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/md/sim/sensitivity.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ theme:
features:
- navigation.tabs
- navigation.sections
- toc.integrate
# - toc.integrate
- navigation.top
- navigation.footer
- navigation.instant
Expand Down Expand Up @@ -125,7 +125,11 @@ extra_css:
nav:
- Home:
- index.md
- howto/mkdocs.md
- Framework:
- md/sim/overall.md
- md/sim/beam.md
- md/sim/mag.md
- md/sim/gru.md
- Data:
- md/data/material.md
- APIs:
Expand Down

0 comments on commit 0b5d855

Please sign in to comment.