#+TITLE: Flexible Joint - Measurement of the Bending Stiffness
:DRAWER:
#+LANGUAGE: en
#+EMAIL: dehaeze.thomas@gmail.com
#+AUTHOR: Dehaeze Thomas

#+HTML_LINK_HOME: ../index.html
#+HTML_LINK_UP:   ../index.html

#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="https://research.tdehaeze.xyz/css/style.css"/>
#+HTML_HEAD: <script type="text/javascript" src="https://research.tdehaeze.xyz/js/script.js"></script>

#+BIND: org-latex-image-default-option "scale=1"
#+BIND: org-latex-image-default-width ""

#+LaTeX_CLASS: scrreprt
#+LaTeX_CLASS_OPTIONS: [a4paper, 10pt, DIV=12, parskip=full]
#+LaTeX_HEADER_EXTRA: \input{preamble.tex}

#+PROPERTY: header-args:matlab  :session *MATLAB*
#+PROPERTY: header-args:matlab+ :comments org
#+PROPERTY: header-args:matlab+ :exports both
#+PROPERTY: header-args:matlab+ :results none
#+PROPERTY: header-args:matlab+ :eval no-export
#+PROPERTY: header-args:matlab+ :noweb yes
#+PROPERTY: header-args:matlab+ :mkdirp yes
#+PROPERTY: header-args:matlab+ :output-dir figs

#+PROPERTY: header-args:latex  :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/Cloud/tikz/org/}{config.tex}")
#+PROPERTY: header-args:latex+ :imagemagick t :fit yes
#+PROPERTY: header-args:latex+ :iminoptions -scale 100% -density 150
#+PROPERTY: header-args:latex+ :imoutoptions -quality 100
#+PROPERTY: header-args:latex+ :results file raw replace
#+PROPERTY: header-args:latex+ :buffer no
#+PROPERTY: header-args:latex+ :tangle no
#+PROPERTY: header-args:latex+ :eval no-export
#+PROPERTY: header-args:latex+ :exports results
#+PROPERTY: header-args:latex+ :mkdirp yes
#+PROPERTY: header-args:latex+ :output-dir figs
#+PROPERTY: header-args:latex+ :post pdf2svg(file=*this*, ext="png")
:END:

* Introduction                                                        :ignore:
The goal is to design a test bench to measure the bending stiffness of a flexible joint with 1% accuracy.

* Finite Element Model
<<sec:fem>>

#+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

From the Finite Element Model, the stiffnesses and strokes of the flexible joint have been computed.

#+begin_src matlab
ka = 94e6; % Axial Stiffness [N/m]
ks = 13e6; % Shear Stiffness [N/m]
kb = 5;    % Bending Stiffness [Nm/rad]
kt = 260;  % Torsional Stiffness [Nm/rad]
#+end_src

#+begin_src matlab
Fa = 469;    % Axial Force before yield [N]
Fs = 242;    % Shear Force before yield [N]
Fb = 0.118;  % Bending Force before yield [Nm]
Ft = 1.508; % Torsional Force before yield [Nm]
#+end_src

#+begin_src matlab
Xa = Fa/ka; % Axial Stroke before yield [m]
Xs = Fs/ks; % Shear Stroke before yield [m]
Xb = Fb/kb; % Bending Stroke before yield [rad]
Xt = Ft/kt; % Torsional Stroke before yield [rad]
#+end_src

#+begin_src matlab :exports results :results value table replace :tangle no :post addhdr(*this*)
data2orgtable([1e-6*ka, Fa, 1e6*Xa; 1e-6*ks, Fs, 1e6*Xs], {'Axial', 'Shear'}, {'Stiffness [N/um]', 'Max Force [N]', 'Stroke [um]'}, ' %.0f ');
#+end_src

#+RESULTS:
|       | Stiffness [N/um] | Max Force [N] | Stroke [um] |
|-------+------------------+---------------+-------------|
| Axial |               94 |           469 |           5 |
| Shear |               13 |           242 |          19 |

#+begin_src matlab :exports results :results value table replace :tangle no :post addhdr(*this*)
data2orgtable([kb, 1e3*Fb, 1e3*Xb; kt, 1e3*Ft, 1e3*Xt], {'Bending', 'Torsional'}, {'Stiffness [Nm/rad]', 'Max Torque [Nmm]', 'Stroke [mrad]'}, ' %.0f ');
#+end_src

#+RESULTS:
|           | Stiffness [Nm/rad] | Max Torque [Nmm] | Stroke [mrad] |
|-----------+--------------------+------------------+---------------|
| Bending   |                  5 |              118 |            24 |
| Torsional |                260 |             1508 |             6 |

* Setup
<<sec:setup>>

Let's say a force is applied on top of the flexible joint with a distance $H_F$ with the joint's center.

The displacement of the flexible joint is also measure at an height $H_D$ from the joint's center.

#+name: fig:flexible_joint_test_bench_bending_setup
#+caption: Figure caption
[[file:figs/flexible_joint_test_bench_bending_setup.png]]

* Effect of Bending
<<sec:bending>>

The torque applied is:
\begin{equation}
  M_b = F \cdot H_F
\end{equation}

The flexible joint is experiencing a rotation $R_b$ due to the torque $M_b$:
\begin{equation}
  R_b = \frac{M_b}{k_b} = \frac{F \cdot H_F}{k_b}
\end{equation}

This rotation is then measured by the displacement sensor.
The measured displacement is:
\begin{equation}
  D_b = H_D \tan(R_b) = H_D \tan\left( \frac{F \cdot H_F}{k_b} \right) \label{eq:bending_meaured_disp}
\end{equation}

* Computation of the bending stiffness
From equation eqref:eq:bending_meaured_disp, we can compute the bending stiffness:
\begin{equation}
  k_b = \frac{\tan^{-1}\left( \frac{D_b}{H_D} \right)}{F \cdot H_F}
\end{equation}

And therefore, to precisely measure $k_b$, we need to:
- precisely measure the motion $D_b$
- precisely measure the applied force $F$
- precisely know the height from the flexible joint's center to the measurement point $H_D$
- precisely know the height from the flexible joint's center to the force application point $H_F$

If there are estimation errors for $H_D$ or $H_F$ as shown in Figure [[fig:bending_effect_error_vertical]], this will induce an error for the estimation of the stiffness.

For 1% accuracy estimation of $k_b$, we can write the following approximate requirements:
|                          | Accuracy |
|--------------------------+----------|
| Force Measurement        |       1% |
| Displacement Measurement |       1% |
| $H_D$                    |       1% |
| $H_F$                    |       1% |


#+name: fig:bending_effect_error_vertical
#+caption: Error in the estimation of the height of the force sensor and displacement sensor
[[file:figs/bending_effect_error_vertical.png]]

* Effect of Shear
<<sec:shear>>

The effect of Shear on the measured displacement is simply:
\begin{equation}
  D_s = \frac{F}{k_s}
\end{equation}

We would like to have this displacement much smaller than the displacement induced by the bending effects:
\begin{equation}
  D_b \gg D_s
\end{equation}

Which is equivalent as to have:
\begin{equation}
  H_D \tan\left( \frac{F \cdot H_F}{k_b} \right) \gg \frac{F}{k_s}
\end{equation}

Here to simplify, we suppose $FH_F/k_b \ll 1$ (which is the case in practice), and we suppose $H_D = H_F = H$.

The obtained condition is then:
\begin{equation}
  H \gg \frac{k_b}{k_s}
\end{equation}

#+begin_src matlab :exports results :results value table replace :tangle no :post addhdr(*this*)
data2orgtable(1e3*[1e1*sqrt(kb/ks), 1e2*sqrt(kb/ks), 1e3*sqrt(kb/ks)], {'$H\,[mm]$'}, {'10% error', '1% error', '0.1% error'}, ' %.0f ');
#+end_src

#+name: tab:effect_shear
#+caption: Height $H$ to have less than certain amount of error due to shear effects
#+attr_latex: :environment tabularx :width \linewidth :align lXXX
#+attr_latex: :center t :booktabs t :float t
#+RESULTS:
|           | 10% error | 1% error | 0.1% error |
|-----------+-----------+----------+------------|
| $H\,[mm]$ |         6 |       62 |        620 |

In order to limit the effect of shear of less than 1%, the height from the joint's center to the force application point and to the measurement point should be larger than 62mm.

#+begin_src matlab
H = 62e-3; % [m]
#+end_src

* Effect of Torsion
<<sec:torsion>>

If the application force is not aligned with the vertical axis of the flexible joint, this will induce a torsion motion that will induce a measurement error (Figure [[fig:bending_effect_torsion]]).

#+name: fig:bending_effect_torsion
#+caption: Horizontal position error of the force sensor and displacement sensor
[[file:figs/bending_effect_torsion.png]]

Let's note the offset of the force sensor $\epsilon_{F,y}$ and the offset of the measurement point $\epsilon_{D,y}$.
The vertical torque (torsion) will be equal to:
\begin{equation}
  M_t = F \cdot \epsilon_{F,y}
\end{equation}

And the induced torsion:
\begin{equation}
  R_t = \frac{M_t}{k_t} = \frac{F \cdot \epsilon_{F,y}}{k_t}
\end{equation}

The effect on the measured displacement is:
\begin{equation}
  D_t = \epsilon_{D,y} \tan \left( R_t \right) = \epsilon_{D,y} \tan\left( \frac{F \cdot \epsilon_{F,y}}{k_t} \right)
\end{equation}

And we would like to have:
\begin{equation}
  D_b \gg D_t
\end{equation}

Which is equivalent as to have:
\begin{equation}
  H_D \tan\left( \frac{F \cdot H_F}{k_b} \right) \gg \epsilon_{D,y} \tan\left( \frac{F \cdot \epsilon_{F,y}}{k_t} \right)
\end{equation}

Supposing $H_F = H_D = H$ and $\epsilon_{F,y} = \epsilon_{D,y} = \epsilon_{y}$, the condition becomes:
\begin{equation}
   \epsilon_{y} \ll H \sqrt{\frac{k_t}{k_b}}
\end{equation}

#+begin_src matlab :exports results :results value table replace :tangle no :post addhdr(*this*)
H = 62e-3; % [m]
data2orgtable(1e3*[1e-1*H*sqrt(kt/kb), 1e-2*H*sqrt(kt/kb), 1e-3*H*sqrt(kt/kb)], {'$\epsilon_y\,[mm]$'}, {'10% error', '1% error', '0.1% error'}, ' %.1f ');
#+end_src

#+name: tab:effect_torsion
#+caption: Maximum lateral position error $\epsilon_y$ to have less than certain amount of error due to torsion effects
#+attr_latex: :environment tabularx :width \linewidth :align lXXX
#+attr_latex: :center t :booktabs t :float t
#+RESULTS:
|                    | 10% error | 1% error | 0.1% error |
|--------------------+-----------+----------+------------|
| $\epsilon_y\,[mm]$ |      44.7 |      4.5 |        0.4 |

For 1% error, the lateral positioning errors $\epsilon_y$ for both the force sensor and the displacement sensor should be less than 4.5mm.

* Full stroke measured displacement and applied force as a function of $H$

Applying a force with a large height $H$ means the induced rotation (for constant force) will be larger.
This also means that the measured displacement $D_b$ will also be larger.

Note that we here suppose the force axis is co-linear with the measurement axis ($H_F = H_D = H$).

Let's compute:
- $D_b$ as a function of $H$
  \[ D_b \approx H \tan (R_b) \]
- the applied force $F_{\text{max}}$ to induce the maximum rotation as a function of $H$
  \[ F_{\text{max}} \approx \frac{X_b \cdot k_b}{H} \]

#+begin_src matlab :exports none
H = linspace(0, 100e-3, 1000);

Db = H*tan(Xb);
Fmax = Xb*kb./H;
#+end_src

#+begin_src matlab :exports none
figure;
yyaxis left
plot(1e3*H, Fmax);
ylabel('Maximum Force [$N$]');
ylim([0, 100]);

yyaxis right
plot(1e3*H, 1e6*Db);
ylabel('Measurement Range [$\mu m$]');

xlabel('Offset $H$ [$mm$]');
#+end_src

#+begin_src matlab :tangle no :exports results :results file replace
exportFig('figs/force_motion_function_H.pdf', 'width', 'wide', 'height', 'normal');
#+end_src

#+name: fig:force_motion_function_H
#+caption: Applied force $F_{\text{max}}$ and measured displacement $D_b$ as a function of $H$
#+RESULTS:
[[file:figs/force_motion_function_H.png]]

With an offset of 62mm, we obtained values shown in Table [[tab:disp_force_range]].
#+begin_src matlab :exports none
H = 62e-3; % [m]
Db = H*tan(Xb); % [m]
Fmax = Xb*kb./H; % [N]
#+end_src

#+begin_src matlab :exports results :results value table replace :tangle no :post addhdr(*this*)
data2orgtable([1e3*Db, Fmax], {}, {'$D_b\,[mm]$', '$F_m\,[N]$'}, ' %.1f ');
#+end_src

#+name: tab:disp_force_range
#+caption: Maximum displacement and maximum applied force for $H = 62\,[mm]$
#+attr_latex: :environment tabularx :width 0.3\linewidth :align lX
#+attr_latex: :center t :booktabs t :float t
#+RESULTS:
| $D_b\,[mm]$ | $F_m\,[N]$ |
|-------------+------------|
|         1.5 |        1.9 |

* Negligible bending of the supporting bar

This should be confirmed with FEM.

* Conclusion

#+name: tab:conclusion_force_disp
#+caption: Conclusions in terms of forces and displacement measurements
#+attr_latex: :environment tabularx :width \linewidth :align lXX
#+attr_latex: :center t :booktabs t :float t
|                          | Range  | Accuracy    |
|--------------------------+--------+-------------|
| Force Measurement        | 2 N    | 1% = 0.02 N |
| Displacement Measurement | 1.5 mm | 1% = 15 um  |

#+name: tab:conclusion_positioning
#+caption: Conclusions in terms of required positioning accuracy
#+attr_latex: :environment tabularx :width \linewidth :align lXXX
#+attr_latex: :center t :booktabs t :float t
|              | Value | Precision  | Comment                         |
|--------------+-------+------------+---------------------------------|
| $H_D$        | 62mm  |            | For negligible Shear            |
| $H_F$        | 62mm  |            | Same                            |
| $\epsilon_y$ | 0     | 4.5mm      | For negligible Torsion          |
| $\epsilon_z$ | 0     | 1% = 0.6mm | For torque estimation precision |

Load cells:
- https://www.te.com/usa-en/product-CAT-FLS0020.html?q=&n=510872&d=681051%20564247&type=products&samples=N&inStoreWithoutPL=false&instock=N#mdp-tabs-content
- https://www.digikey.com/en/products/detail/honeywell-sensing-and-productivity-solutions/FSS005WNSB/6056404

Displacement sensors:
- http://www.vaco-france.com/outillage-de-metrologie/comparateur-a-cadran-de-precision.htm
- https://fr.rs-online.com/web/p/comparateurs/1940101/
