Initial Commit
No files matched your search
@@ -0,0 +1,49 @@
|
||||
.figure p{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.figure img{
|
||||
max-width:100%;
|
||||
display: block;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
table {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.org-src-container > pre.src:before {
|
||||
display: inline;
|
||||
position: absolute;
|
||||
color: #808080;
|
||||
background-color: white;
|
||||
top: -10px;
|
||||
left: 10px;
|
||||
padding: 0px 4px;
|
||||
border: 1px solid #d0d0d0;
|
||||
font-size: 80%;
|
||||
}
|
||||
.org-src-container > pre {
|
||||
margin-top: 1.5em;
|
||||
position: relative;
|
||||
overflow: visible;
|
||||
}
|
||||
.org-src-container > pre > code.src:before {
|
||||
display: inline;
|
||||
position: absolute;
|
||||
color: #808080;
|
||||
background-color: white;
|
||||
top: -10px;
|
||||
left: 10px;
|
||||
padding: 0px 4px;
|
||||
border: 1px solid #d0d0d0;
|
||||
font-size: 80%;
|
||||
}
|
||||
.org-src-container > pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
|
||||
.org-src-container > pre.src-elisp:before { content: 'Emacs Lisp'; }
|
||||
.org-src-container > pre.src-sh:before { content: 'shell'; }
|
||||
.org-src-container > pre.src-bash:before { content: 'bash'; }
|
||||
.org-src-container > pre.src-org:before { content: 'Org mode'; }
|
||||
.org-src-container > pre.src-python:before { content: 'Python'; }
|
||||
.org-src-container > pre.src-matlab:before { content: 'Matlab'; }
|
||||
@@ -0,0 +1,145 @@
|
||||
.org-bold { /* bold */ font-weight: bold; }
|
||||
.org-bold-italic { /* bold-italic */ font-weight: bold; font-style: italic; }
|
||||
.org-buffer-menu-buffer { /* buffer-menu-buffer */ font-weight: bold; }
|
||||
.org-builtin { /* font-lock-builtin-face */ color: #7a378b; }
|
||||
.org-button { /* button */ text-decoration: underline; }
|
||||
.org-calendar-today { /* calendar-today */ text-decoration: underline; }
|
||||
.org-change-log-acknowledgement { /* change-log-acknowledgement */ color: #b22222; }
|
||||
.org-change-log-conditionals { /* change-log-conditionals */ color: #a0522d; }
|
||||
.org-change-log-date { /* change-log-date */ color: #8b2252; }
|
||||
.org-change-log-email { /* change-log-email */ color: #a0522d; }
|
||||
.org-change-log-file { /* change-log-file */ color: #0000ff; }
|
||||
.org-change-log-function { /* change-log-function */ color: #a0522d; }
|
||||
.org-change-log-list { /* change-log-list */ color: #a020f0; }
|
||||
.org-change-log-name { /* change-log-name */ color: #008b8b; }
|
||||
.org-comint-highlight-input { /* comint-highlight-input */ font-weight: bold; }
|
||||
.org-comint-highlight-prompt { /* comint-highlight-prompt */ color: #00008b; }
|
||||
.org-comment { /* font-lock-comment-face */ color: #999988; font-style: italic; }
|
||||
.org-comment-delimiter { /* font-lock-comment-delimiter-face */ color: #999988; font-style: italic; }
|
||||
.org-completions-annotations { /* completions-annotations */ font-style: italic; }
|
||||
.org-completions-common-part { /* completions-common-part */ color: #000000; background-color: #ffffff; }
|
||||
.org-completions-first-difference { /* completions-first-difference */ font-weight: bold; }
|
||||
.org-constant { /* font-lock-constant-face */ color: #008b8b; }
|
||||
.org-diary { /* diary */ color: #ff0000; }
|
||||
.org-diff-context { /* diff-context */ color: #7f7f7f; }
|
||||
.org-diff-file-header { /* diff-file-header */ background-color: #b3b3b3; font-weight: bold; }
|
||||
.org-diff-function { /* diff-function */ background-color: #cccccc; }
|
||||
.org-diff-header { /* diff-header */ background-color: #cccccc; }
|
||||
.org-diff-hunk-header { /* diff-hunk-header */ background-color: #cccccc; }
|
||||
.org-diff-index { /* diff-index */ background-color: #b3b3b3; font-weight: bold; }
|
||||
.org-diff-nonexistent { /* diff-nonexistent */ background-color: #b3b3b3; font-weight: bold; }
|
||||
.org-diff-refine-change { /* diff-refine-change */ background-color: #d9d9d9; }
|
||||
.org-dired-directory { /* dired-directory */ color: #0000ff; }
|
||||
.org-dired-flagged { /* dired-flagged */ color: #ff0000; font-weight: bold; }
|
||||
.org-dired-header { /* dired-header */ color: #228b22; }
|
||||
.org-dired-ignored { /* dired-ignored */ color: #7f7f7f; }
|
||||
.org-dired-mark { /* dired-mark */ color: #008b8b; }
|
||||
.org-dired-marked { /* dired-marked */ color: #ff0000; font-weight: bold; }
|
||||
.org-dired-perm-write { /* dired-perm-write */ color: #b22222; }
|
||||
.org-dired-symlink { /* dired-symlink */ color: #a020f0; }
|
||||
.org-dired-warning { /* dired-warning */ color: #ff0000; font-weight: bold; }
|
||||
.org-doc { /* font-lock-doc-face */ color: #8b2252; }
|
||||
.org-escape-glyph { /* escape-glyph */ color: #a52a2a; }
|
||||
.org-file-name-shadow { /* file-name-shadow */ color: #7f7f7f; }
|
||||
.org-flyspell-duplicate { /* flyspell-duplicate */ color: #cdad00; font-weight: bold; text-decoration: underline; }
|
||||
.org-flyspell-incorrect { /* flyspell-incorrect */ color: #ff4500; font-weight: bold; text-decoration: underline; }
|
||||
.org-fringe { /* fringe */ background-color: #f2f2f2; }
|
||||
.org-function-name { /* font-lock-function-name-face */ color: teal; }
|
||||
.org-header-line { /* header-line */ color: #333333; background-color: #e5e5e5; }
|
||||
.org-help-argument-name { /* help-argument-name */ font-style: italic; }
|
||||
.org-highlight { /* highlight */ background-color: #b4eeb4; }
|
||||
.org-holiday { /* holiday */ background-color: #ffc0cb; }
|
||||
.org-isearch { /* isearch */ color: #b0e2ff; background-color: #cd00cd; }
|
||||
.org-isearch-fail { /* isearch-fail */ background-color: #ffc1c1; }
|
||||
.org-italic { /* italic */ font-style: italic; }
|
||||
.org-keyword { /* font-lock-keyword-face */ color: #0086b3; }
|
||||
.org-lazy-highlight { /* lazy-highlight */ background-color: #afeeee; }
|
||||
.org-link { /* link */ color: #0000ff; text-decoration: underline; }
|
||||
.org-link-visited { /* link-visited */ color: #8b008b; text-decoration: underline; }
|
||||
.org-log-edit-header { /* log-edit-header */ color: #a020f0; }
|
||||
.org-log-edit-summary { /* log-edit-summary */ color: #0000ff; }
|
||||
.org-log-edit-unknown-header { /* log-edit-unknown-header */ color: #b22222; }
|
||||
.org-match { /* match */ background-color: #ffff00; }
|
||||
.org-next-error { /* next-error */ background-color: #eedc82; }
|
||||
.org-nobreak-space { /* nobreak-space */ color: #a52a2a; text-decoration: underline; }
|
||||
.org-org-archived { /* org-archived */ color: #7f7f7f; }
|
||||
.org-org-block { /* org-block */ color: #7f7f7f; }
|
||||
.org-org-block-begin-line { /* org-block-begin-line */ color: #b22222; }
|
||||
.org-org-block-end-line { /* org-block-end-line */ color: #b22222; }
|
||||
.org-org-checkbox { /* org-checkbox */ font-weight: bold; }
|
||||
.org-org-checkbox-statistics-done { /* org-checkbox-statistics-done */ color: #228b22; font-weight: bold; }
|
||||
.org-org-checkbox-statistics-todo { /* org-checkbox-statistics-todo */ color: #ff0000; font-weight: bold; }
|
||||
.org-org-clock-overlay { /* org-clock-overlay */ background-color: #ffff00; }
|
||||
.org-org-code { /* org-code */ color: #7f7f7f; }
|
||||
.org-org-column { /* org-column */ background-color: #e5e5e5; }
|
||||
.org-org-column-title { /* org-column-title */ background-color: #e5e5e5; font-weight: bold; text-decoration: underline; }
|
||||
.org-org-date { /* org-date */ color: #a020f0; text-decoration: underline; }
|
||||
.org-org-document-info { /* org-document-info */ color: #191970; }
|
||||
.org-org-document-info-keyword { /* org-document-info-keyword */ color: #7f7f7f; }
|
||||
.org-org-document-title { /* org-document-title */ color: #191970; font-size: 144%; font-weight: bold; }
|
||||
.org-org-done { /* org-done */ color: #228b22; font-weight: bold; }
|
||||
.org-org-drawer { /* org-drawer */ color: #0000ff; }
|
||||
.org-org-ellipsis { /* org-ellipsis */ color: #b8860b; text-decoration: underline; }
|
||||
.org-org-footnote { /* org-footnote */ color: #a020f0; text-decoration: underline; }
|
||||
.org-org-formula { /* org-formula */ color: #b22222; }
|
||||
.org-org-headline-done { /* org-headline-done */ color: #bc8f8f; }
|
||||
.org-org-hide { /* org-hide */ color: #ffffff; }
|
||||
.org-org-latex-and-export-specials { /* org-latex-and-export-specials */ color: #8b4513; }
|
||||
.org-org-level-1 { /* org-level-1 */ color: #0000ff; }
|
||||
.org-org-level-2 { /* org-level-2 */ color: #a0522d; }
|
||||
.org-org-level-3 { /* org-level-3 */ color: #a020f0; }
|
||||
.org-org-level-4 { /* org-level-4 */ color: #b22222; }
|
||||
.org-org-level-5 { /* org-level-5 */ color: #228b22; }
|
||||
.org-org-level-6 { /* org-level-6 */ color: #008b8b; }
|
||||
.org-org-level-7 { /* org-level-7 */ color: #7a378b; }
|
||||
.org-org-level-8 { /* org-level-8 */ color: #8b2252; }
|
||||
.org-org-link { /* org-link */ color: #0000ff; text-decoration: underline; }
|
||||
.org-org-meta-line { /* org-meta-line */ color: #b22222; }
|
||||
.org-org-mode-line-clock { /* org-mode-line-clock */ color: #000000; background-color: #bfbfbf; }
|
||||
.org-org-mode-line-clock-overrun { /* org-mode-line-clock-overrun */ color: #000000; background-color: #ff0000; }
|
||||
.org-org-quote { /* org-quote */ color: #7f7f7f; }
|
||||
.org-org-scheduled { /* org-scheduled */ color: #006400; }
|
||||
.org-org-scheduled-previously { /* org-scheduled-previously */ color: #b22222; }
|
||||
.org-org-scheduled-today { /* org-scheduled-today */ color: #006400; }
|
||||
.org-org-sexp-date { /* org-sexp-date */ color: #a020f0; }
|
||||
.org-org-special-keyword { /* org-special-keyword */ color: #a020f0; }
|
||||
.org-org-table { /* org-table */ color: #0000ff; }
|
||||
.org-org-tag { /* org-tag */ font-weight: bold; }
|
||||
.org-org-target { /* org-target */ text-decoration: underline; }
|
||||
.org-org-time-grid { /* org-time-grid */ color: #b8860b; }
|
||||
.org-org-todo { /* org-todo */ color: #ff0000; font-weight: bold; }
|
||||
.org-org-upcoming-deadline { /* org-upcoming-deadline */ color: #b22222; }
|
||||
.org-org-verbatim { /* org-verbatim */ color: #7f7f7f; }
|
||||
.org-org-verse { /* org-verse */ color: #7f7f7f; }
|
||||
.org-org-warning { /* org-warning */ color: #ff0000; font-weight: bold; }
|
||||
.org-outline-1 { /* outline-1 */ color: #0000ff; }
|
||||
.org-outline-2 { /* outline-2 */ color: #a0522d; }
|
||||
.org-outline-3 { /* outline-3 */ color: #a020f0; }
|
||||
.org-outline-4 { /* outline-4 */ color: #b22222; }
|
||||
.org-outline-5 { /* outline-5 */ color: #228b22; }
|
||||
.org-outline-6 { /* outline-6 */ color: #008b8b; }
|
||||
.org-outline-7 { /* outline-7 */ color: #7a378b; }
|
||||
.org-outline-8 { /* outline-8 */ color: #8b2252; }
|
||||
.org-preprocessor { /* font-lock-preprocessor-face */ color: #7a378b; }
|
||||
.org-query-replace { /* query-replace */ color: #b0e2ff; background-color: #cd00cd; }
|
||||
.org-regexp-grouping-backslash { /* font-lock-regexp-grouping-backslash */ font-weight: bold; }
|
||||
.org-regexp-grouping-construct { /* font-lock-regexp-grouping-construct */ font-weight: bold; }
|
||||
.org-region { /* region */ background-color: #eedc82; }
|
||||
.org-secondary-selection { /* secondary-selection */ background-color: #ffff00; }
|
||||
.org-shadow { /* shadow */ color: #7f7f7f; }
|
||||
.org-show-paren-match { /* show-paren-match */ background-color: #40e0d0; }
|
||||
.org-show-paren-mismatch { /* show-paren-mismatch */ color: #ffffff; background-color: #a020f0; }
|
||||
.org-string { /* font-lock-string-face */ color: #dd1144; }
|
||||
.org-tool-bar { /* tool-bar */ color: #000000; background-color: #bfbfbf; }
|
||||
.org-tooltip { /* tooltip */ color: #000000; background-color: #ffffe0; }
|
||||
.org-trailing-whitespace { /* trailing-whitespace */ background-color: #ff0000; }
|
||||
.org-type { /* font-lock-type-face */ color: #228b22; }
|
||||
.org-underline { /* underline */ text-decoration: underline; }
|
||||
.org-variable-name { /* font-lock-variable-name-face */ color: teal; }
|
||||
.org-warning { /* font-lock-warning-face */ color: #ff0000; font-weight: bold; }
|
||||
.org-widget-button { /* widget-button */ font-weight: bold; }
|
||||
.org-widget-button-pressed { /* widget-button-pressed */ color: #ff0000; }
|
||||
.org-widget-documentation { /* widget-documentation */ color: #006400; }
|
||||
.org-widget-field { /* widget-field */ background-color: #d9d9d9; }
|
||||
.org-widget-inactive { /* widget-inactive */ color: #7f7f7f; }
|
||||
.org-widget-single-line-field { /* widget-single-line-field */ background-color: #d9d9d9; }
|
||||
|
After Width: | Height: | Size: 2.7 MiB |
|
After Width: | Height: | Size: 2.9 MiB |
|
After Width: | Height: | Size: 76 KiB |
|
After Width: | Height: | Size: 225 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 132 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 130 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 134 KiB |
|
After Width: | Height: | Size: 92 KiB |
|
After Width: | Height: | Size: 56 KiB |
@@ -0,0 +1,637 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<!-- 2020-11-10 mar. 12:55 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<title>Piezoelectric Force Sensor - Test Bench</title>
|
||||
<meta name="generator" content="Org mode" />
|
||||
<meta name="author" content="Dehaeze Thomas" />
|
||||
<link rel="stylesheet" type="text/css" href="./css/htmlize.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="./css/readtheorg.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="./css/custom.css"/>
|
||||
<script type="text/javascript" src="./js/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="./js/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="./js/readtheorg.js"></script>
|
||||
<script>MathJax = {
|
||||
tex: {
|
||||
tags: 'ams',
|
||||
macros: {bm: ["\\boldsymbol{#1}",1],}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="org-div-home-and-up">
|
||||
<a accesskey="h" href="../index.html"> UP </a>
|
||||
|
|
||||
<a accesskey="H" href="../index.html"> HOME </a>
|
||||
</div><div id="content">
|
||||
<h1 class="title">Piezoelectric Force Sensor - Test Bench</h1>
|
||||
<div id="table-of-contents">
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#orga1465ad">1. Change of Stiffness due to Sensors stack being open/closed circuit</a>
|
||||
<ul>
|
||||
<li><a href="#orgd924c73">1.1. Load Data</a></li>
|
||||
<li><a href="#org59cc20a">1.2. Transfer Functions</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org76a1832">2. Generated Number of Charge / Voltage</a>
|
||||
<ul>
|
||||
<li><a href="#org1fa991d">2.1. Steps</a></li>
|
||||
<li><a href="#org5e9eb44">2.2. Add Parallel Resistor</a></li>
|
||||
<li><a href="#org15676e1">2.3. Sinus</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
In this document is studied how a piezoelectric stack can be used to measured the force.
|
||||
</p>
|
||||
|
||||
<ul class="org-ul">
|
||||
<li>Section <a href="#org887b61a">1</a>: the effect of the input impedance of the electronics connected to the force sensor stack on the stiffness of the stack is studied</li>
|
||||
<li>Section <a href="#org2b5f630">2</a>:</li>
|
||||
</ul>
|
||||
|
||||
<div id="outline-container-orga1465ad" class="outline-2">
|
||||
<h2 id="orga1465ad"><span class="section-number-2">1</span> Change of Stiffness due to Sensors stack being open/closed circuit</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
<p>
|
||||
<a id="org887b61a"></a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgd924c73" class="outline-3">
|
||||
<h3 id="orgd924c73"><span class="section-number-3">1.1</span> Load Data</h3>
|
||||
<div class="outline-text-3" id="text-1-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">oc = load(<span class="org-string">'identification_open_circuit.mat'</span>, <span class="org-string">'t'</span>, <span class="org-string">'encoder'</span>, <span class="org-string">'u'</span>);
|
||||
sc = load(<span class="org-string">'identification_short_circuit.mat'</span>, <span class="org-string">'t'</span>, <span class="org-string">'encoder'</span>, <span class="org-string">'u'</span>);
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org59cc20a" class="outline-3">
|
||||
<h3 id="org59cc20a"><span class="section-number-3">1.2</span> Transfer Functions</h3>
|
||||
<div class="outline-text-3" id="text-1-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">Ts = 1e<span class="org-type">-</span>4; <span class="org-comment">% Sampling Time [s]</span>
|
||||
win = hann(ceil(10<span class="org-type">/</span>Ts));
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">[tf_oc_est, f] = tfestimate(oc.u, oc.encoder, win, [], [], 1<span class="org-type">/</span>Ts);
|
||||
[co_oc_est, <span class="org-type">~</span>] = mscohere( oc.u, oc.encoder, win, [], [], 1<span class="org-type">/</span>Ts);
|
||||
|
||||
[tf_sc_est, <span class="org-type">~</span>] = tfestimate(sc.u, sc.encoder, win, [], [], 1<span class="org-type">/</span>Ts);
|
||||
[co_sc_est, <span class="org-type">~</span>] = mscohere( sc.u, sc.encoder, win, [], [], 1<span class="org-type">/</span>Ts);
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="org3c75143" class="figure">
|
||||
<p><img src="figs/stiffness_force_sensor_coherence.png" alt="stiffness_force_sensor_coherence.png" />
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="org4424b1c" class="figure">
|
||||
<p><img src="figs/stiffness_force_sensor_bode.png" alt="stiffness_force_sensor_bode.png" />
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="org216fcc3" class="figure">
|
||||
<p><img src="figs/stiffness_force_sensor_bode_zoom.png" alt="stiffness_force_sensor_bode_zoom.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 3: </span>Zoom on the change of resonance</p>
|
||||
</div>
|
||||
|
||||
<div class="important" id="org9ea3712">
|
||||
<p>
|
||||
The change of resonance frequency / stiffness is very small and is not important here.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org76a1832" class="outline-2">
|
||||
<h2 id="org76a1832"><span class="section-number-2">2</span> Generated Number of Charge / Voltage</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
<p>
|
||||
<a id="org2b5f630"></a>
|
||||
</p>
|
||||
<p>
|
||||
Two stacks are used as actuator (in parallel) and one stack is used as sensor.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The amplifier gain is 20V/V (Cedrat LA75B).
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org1fa991d" class="outline-3">
|
||||
<h3 id="org1fa991d"><span class="section-number-3">2.1</span> Steps</h3>
|
||||
<div class="outline-text-3" id="text-2-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">load(<span class="org-string">'force_sensor_steps.mat'</span>, <span class="org-string">'t'</span>, <span class="org-string">'encoder'</span>, <span class="org-string">'u'</span>, <span class="org-string">'v'</span>);
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab"><span class="org-type">figure</span>;
|
||||
tiledlayout(2, 1, <span class="org-string">'TileSpacing'</span>, <span class="org-string">'None'</span>, <span class="org-string">'Padding'</span>, <span class="org-string">'None'</span>);
|
||||
nexttile;
|
||||
plot(t, v);
|
||||
xlabel(<span class="org-string">'Time [s]'</span>); ylabel(<span class="org-string">'Measured voltage [V]'</span>);
|
||||
nexttile;
|
||||
plot(t, u);
|
||||
xlabel(<span class="org-string">'Time [s]'</span>); ylabel(<span class="org-string">'Actuator Voltage [V]'</span>);
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="orgf889803" class="figure">
|
||||
<p><img src="figs/force_sen_steps_time_domain.png" alt="force_sen_steps_time_domain.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 4: </span>Time domain signal during the 3 actuator voltage steps</p>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Three steps are performed at the following time intervals:
|
||||
</p>
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">t_s = [ 2.5, 23;
|
||||
23.8, 35;
|
||||
35.8, 50];
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Fit function:
|
||||
</p>
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">f = @(b,x) b(1)<span class="org-type">.*</span>exp(b(2)<span class="org-type">.*</span>x) <span class="org-type">+</span> b(3);
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
We are interested by the <code>b(2)</code> term, which is the time constant of the exponential.
|
||||
</p>
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">tau = zeros(size(t_s, 1),1);
|
||||
V0 = zeros(size(t_s, 1),1);
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab"><span class="org-keyword">for</span> <span class="org-variable-name">t_i</span> = <span class="org-constant">1:size(t_s, 1)</span>
|
||||
t_cur = t(t_s(t_i, 1) <span class="org-type"><</span> t <span class="org-type">&</span> t <span class="org-type"><</span> t_s(t_i, 2));
|
||||
t_cur = t_cur <span class="org-type">-</span> t_cur(1);
|
||||
y_cur = v(t_s(t_i, 1) <span class="org-type"><</span> t <span class="org-type">&</span> t <span class="org-type"><</span> t_s(t_i, 2));
|
||||
|
||||
nrmrsd = @(b) norm(y_cur <span class="org-type">-</span> f(b,t_cur)); <span class="org-comment">% Residual Norm Cost Function</span>
|
||||
B0 = [0.5, <span class="org-type">-</span>0.15, 2.2]; <span class="org-comment">% Choose Appropriate Initial Estimates</span>
|
||||
[B,rnrm] = fminsearch(nrmrsd, B0); <span class="org-comment">% Estimate Parameters ‘B’</span>
|
||||
|
||||
tau(t_i) = 1<span class="org-type">/</span>B(2);
|
||||
V0(t_i) = B(3);
|
||||
<span class="org-keyword">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
<col class="org-right" />
|
||||
|
||||
<col class="org-right" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="org-right">\(tau\) [s]</th>
|
||||
<th scope="col" class="org-right">\(V_0\) [V]</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="org-right">6.47</td>
|
||||
<td class="org-right">2.26</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-right">6.76</td>
|
||||
<td class="org-right">2.26</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-right">6.49</td>
|
||||
<td class="org-right">2.25</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p>
|
||||
With the capacitance being \(C = 4.4 \mu F\), the internal impedance of the Speedgoat ADC can be computed as follows:
|
||||
</p>
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">Cp = 4.4e<span class="org-type">-</span>6; <span class="org-comment">% [F]</span>
|
||||
Rin = abs(mean(tau))<span class="org-type">/</span>Cp;
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<pre class="example">
|
||||
1494100.0
|
||||
</pre>
|
||||
|
||||
|
||||
<p>
|
||||
The input impedance of the Speedgoat’s ADC should then be close to \(1.5\,M\Omega\) (specified at \(1\,M\Omega\)).
|
||||
</p>
|
||||
|
||||
<div class="important" id="org572654b">
|
||||
<p>
|
||||
How can we explain the voltage offset?
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
<p>
|
||||
As shown in Figure <a href="#org7c2c57f">5</a> (taken from (<a href="#citeproc_bib_item_1">Reza and Andrew 2006</a>)), an input voltage offset is due to the input bias current \(i_n\).
|
||||
</p>
|
||||
|
||||
|
||||
<div id="org7c2c57f" class="figure">
|
||||
<p><img src="figs/force_sensor_model_electronics.png" alt="force_sensor_model_electronics.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 5: </span>Model of a piezoelectric transducer (left) and instrumentation amplifier (right)</p>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
The estimated input bias current is then:
|
||||
</p>
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">in = mean(V0)<span class="org-type">/</span>Rin;
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<pre class="example">
|
||||
1.5119e-06
|
||||
</pre>
|
||||
|
||||
|
||||
<p>
|
||||
An additional resistor in parallel with \(R_{in}\) would have two effects:
|
||||
</p>
|
||||
<ul class="org-ul">
|
||||
<li>reduce the input voltage offset
|
||||
\[ V_{off} = \frac{R_a R_{in}}{R_a + R_{in}} i_n \]</li>
|
||||
<li>increase the high pass corner frequency \(f_c\)
|
||||
\[ C_p \frac{R_{in}R_a}{R_{in} + R_a} = \tau_c = \frac{1}{f_c} \]
|
||||
\[ R_a = \frac{R_i}{f_c C_p R_i - 1} \]</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<p>
|
||||
If we allow the high pass corner frequency to be equals to 3Hz:
|
||||
</p>
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">fc = 3;
|
||||
Ra = Rin<span class="org-type">/</span>(fc<span class="org-type">*</span>Cp<span class="org-type">*</span>Rin <span class="org-type">-</span> 1);
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<pre class="example">
|
||||
79804
|
||||
</pre>
|
||||
|
||||
|
||||
<p>
|
||||
With this parallel resistance value, the voltage offset would be:
|
||||
</p>
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">V_offset = Ra<span class="org-type">*</span>Rin<span class="org-type">/</span>(Ra <span class="org-type">+</span> Rin) <span class="org-type">*</span> in;
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<pre class="example">
|
||||
0.11454
|
||||
</pre>
|
||||
|
||||
|
||||
<p>
|
||||
Which is much more acceptable.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org5e9eb44" class="outline-3">
|
||||
<h3 id="org5e9eb44"><span class="section-number-3">2.2</span> Add Parallel Resistor</h3>
|
||||
<div class="outline-text-3" id="text-2-2">
|
||||
<p>
|
||||
A resistor \(R_p \approx 100\,k\Omega\) is added in parallel with the force sensor as shown in Figure <a href="#org1fac5a7">6</a>.
|
||||
</p>
|
||||
|
||||
|
||||
<div id="org1fac5a7" class="figure">
|
||||
<p><img src="figs/force_sensor_model_electronics_without_R.png" alt="force_sensor_model_electronics_without_R.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 6: </span>Model of a piezoelectric transducer (left) and instrumentation amplifier (right) with added resistor \(R_p\)</p>
|
||||
</div>
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">load(<span class="org-string">'force_sensor_steps_R_82k7.mat'</span>, <span class="org-string">'t'</span>, <span class="org-string">'encoder'</span>, <span class="org-string">'u'</span>, <span class="org-string">'v'</span>);
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab"><span class="org-type">figure</span>;
|
||||
tiledlayout(2, 1, <span class="org-string">'TileSpacing'</span>, <span class="org-string">'None'</span>, <span class="org-string">'Padding'</span>, <span class="org-string">'None'</span>);
|
||||
nexttile;
|
||||
plot(t, v);
|
||||
xlabel(<span class="org-string">'Time [s]'</span>); ylabel(<span class="org-string">'Measured voltage [V]'</span>);
|
||||
nexttile;
|
||||
plot(t, u);
|
||||
xlabel(<span class="org-string">'Time [s]'</span>); ylabel(<span class="org-string">'Actuator Voltage [V]'</span>);
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="org29964b5" class="figure">
|
||||
<p><img src="figs/force_sen_steps_time_domain_par_R.png" alt="force_sen_steps_time_domain_par_R.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 7: </span>Time domain signal during the actuator voltage steps</p>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Three steps are performed at the following time intervals:
|
||||
</p>
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">t_s = [1.9, 6;
|
||||
8.5, 13;
|
||||
15.5, 21;
|
||||
22.6, 26;
|
||||
30.0, 36;
|
||||
37.5, 41;
|
||||
46.2, 49.5]
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Fit function:
|
||||
</p>
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">f = @(b,x) b(1)<span class="org-type">.*</span>exp(b(2)<span class="org-type">.*</span>x) <span class="org-type">+</span> b(3);
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
We are interested by the <code>b(2)</code> term, which is the time constant of the exponential.
|
||||
</p>
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">tau = zeros(size(t_s, 1),1);
|
||||
V0 = zeros(size(t_s, 1),1);
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab"><span class="org-keyword">for</span> <span class="org-variable-name">t_i</span> = <span class="org-constant">1:size(t_s, 1)</span>
|
||||
t_cur = t(t_s(t_i, 1) <span class="org-type"><</span> t <span class="org-type">&</span> t <span class="org-type"><</span> t_s(t_i, 2));
|
||||
t_cur = t_cur <span class="org-type">-</span> t_cur(1);
|
||||
y_cur = v(t_s(t_i, 1) <span class="org-type"><</span> t <span class="org-type">&</span> t <span class="org-type"><</span> t_s(t_i, 2));
|
||||
|
||||
nrmrsd = @(b) norm(y_cur <span class="org-type">-</span> f(b,t_cur)); <span class="org-comment">% Residual Norm Cost Function</span>
|
||||
B0 = [0.5, <span class="org-type">-</span>0.2, 0.2]; <span class="org-comment">% Choose Appropriate Initial Estimates</span>
|
||||
[B,rnrm] = fminsearch(nrmrsd, B0); <span class="org-comment">% Estimate Parameters ‘B’</span>
|
||||
|
||||
tau(t_i) = 1<span class="org-type">/</span>B(2);
|
||||
V0(t_i) = B(3);
|
||||
<span class="org-keyword">end</span>
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
And indeed, we obtain a much smaller offset voltage and a much faster time constant.
|
||||
</p>
|
||||
|
||||
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
||||
|
||||
|
||||
<colgroup>
|
||||
<col class="org-right" />
|
||||
|
||||
<col class="org-right" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="org-right">\(tau\) [s]</th>
|
||||
<th scope="col" class="org-right">\(V_0\) [V]</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="org-right">0.43</td>
|
||||
<td class="org-right">0.15</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-right">0.45</td>
|
||||
<td class="org-right">0.16</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-right">0.43</td>
|
||||
<td class="org-right">0.15</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-right">0.43</td>
|
||||
<td class="org-right">0.15</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-right">0.45</td>
|
||||
<td class="org-right">0.15</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-right">0.46</td>
|
||||
<td class="org-right">0.16</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="org-right">0.48</td>
|
||||
<td class="org-right">0.16</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p>
|
||||
Knowing the capacitance value, we can estimate the value of the added resistor (neglecting the input impedance of \(\approx 1\,M\Omega\)):
|
||||
</p>
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">Cp = 4.4e<span class="org-type">-</span>6; <span class="org-comment">% [F]</span>
|
||||
Rin = abs(mean(tau))<span class="org-type">/</span>Cp;
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<pre class="example">
|
||||
101200.0
|
||||
</pre>
|
||||
|
||||
|
||||
<p>
|
||||
And we can verify that the bias current estimation stays the same:
|
||||
</p>
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">in = mean(V0)<span class="org-type">/</span>Rin;
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<pre class="example">
|
||||
1.5305e-06
|
||||
</pre>
|
||||
|
||||
|
||||
<p>
|
||||
This validates the model of the ADC and the effectiveness of the added resistor.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org15676e1" class="outline-3">
|
||||
<h3 id="org15676e1"><span class="section-number-3">2.3</span> Sinus</h3>
|
||||
<div class="outline-text-3" id="text-2-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">load(<span class="org-string">'force_sensor_sin.mat'</span>, <span class="org-string">'t'</span>, <span class="org-string">'encoder'</span>, <span class="org-string">'u'</span>, <span class="org-string">'v'</span>);
|
||||
|
||||
u = u(t<span class="org-type">></span>25);
|
||||
v = v(t<span class="org-type">></span>25);
|
||||
encoder = encoder(t<span class="org-type">></span>25) <span class="org-type">-</span> mean(encoder(t<span class="org-type">></span>25));
|
||||
t = t(t<span class="org-type">></span>25);
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
The driving voltage is a sinus at 0.5Hz centered on 3V and with an amplitude of 3V (Figure <a href="#org1fbf89d">8</a>).
|
||||
</p>
|
||||
|
||||
|
||||
<div id="org1fbf89d" class="figure">
|
||||
<p><img src="figs/force_sensor_sin_u.png" alt="force_sensor_sin_u.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 8: </span>Driving Voltage</p>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
The full stroke as measured by the encoder is:
|
||||
</p>
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">max(encoder)<span class="org-type">-</span>min(encoder)
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<pre class="example">
|
||||
5.005e-05
|
||||
</pre>
|
||||
|
||||
|
||||
<p>
|
||||
Its signal is shown in Figure <a href="#org1d74efa">9</a>.
|
||||
</p>
|
||||
|
||||
|
||||
<div id="org1d74efa" class="figure">
|
||||
<p><img src="figs/force_sensor_sin_encoder.png" alt="force_sensor_sin_encoder.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 9: </span>Encoder measurement</p>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
The generated voltage by the stack is shown in Figure
|
||||
</p>
|
||||
|
||||
|
||||
<div id="org077a6d7" class="figure">
|
||||
<p><img src="figs/force_sensor_sin_stack.png" alt="force_sensor_sin_stack.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 10: </span>Voltage measured on the stack used as a sensor</p>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
The capacitance of the stack is
|
||||
</p>
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">Cp = 4.4e<span class="org-type">-</span>6; <span class="org-comment">% [F]</span>
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
The corresponding generated charge is then shown in Figure <a href="#org4baf062">11</a>.
|
||||
</p>
|
||||
|
||||
<div id="org4baf062" class="figure">
|
||||
<p><img src="figs/force_sensor_sin_charge.png" alt="force_sensor_sin_charge.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 11: </span>Generated Charge</p>
|
||||
</div>
|
||||
|
||||
|
||||
<p>
|
||||
The relation between the generated voltage and the measured displacement is almost linear as shown in Figure <a href="#org8b9df34">12</a>.
|
||||
</p>
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">b1 = encoder<span class="org-type">\</span>(v<span class="org-type">-</span>mean(v));
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="org8b9df34" class="figure">
|
||||
<p><img src="figs/force_sensor_linear_relation.png" alt="force_sensor_linear_relation.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 12: </span>Almost linear relation between the relative displacement and the generated voltage</p>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
With a 16bits ADC, the resolution will then be equals to (in [nm]):
|
||||
</p>
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">abs((20<span class="org-type">/</span>2<span class="org-type">^</span>16)<span class="org-type">/</span>(b1<span class="org-type">/</span>1e9))
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<pre class="example">
|
||||
3.9838
|
||||
</pre>
|
||||
|
||||
|
||||
<style>.csl-entry{text-indent: -1.5em; margin-left: 1.5em;}</style><h2 class='citeproc-org-bib-h2'>Bibliography</h2>
|
||||
<div class="csl-bib-body">
|
||||
<div class="csl-entry"><a name="citeproc_bib_item_1"></a>Reza, Moheimani, and Fleming Andrew. 2006. <i>Piezoelectric Transducers for Vibration Control and Damping</i>. London: Springer.</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: Dehaeze Thomas</p>
|
||||
<p class="date">Created: 2020-11-10 mar. 12:55</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,568 @@
|
||||
#+TITLE: Piezoelectric Force Sensor - Test Bench
|
||||
: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="./css/htmlize.css"/>
|
||||
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="./css/readtheorg.css"/>
|
||||
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="./css/custom.css"/>
|
||||
#+HTML_HEAD: <script type="text/javascript" src="./js/jquery.min.js"></script>
|
||||
#+HTML_HEAD: <script type="text/javascript" src="./js/bootstrap.min.js"></script>
|
||||
#+HTML_HEAD: <script type="text/javascript" src="./js/readtheorg.js"></script>
|
||||
|
||||
#+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 raw replace :buffer no
|
||||
#+PROPERTY: header-args:latex+ :eval no-export
|
||||
#+PROPERTY: header-args:latex+ :exports both
|
||||
#+PROPERTY: header-args:latex+ :mkdirp yes
|
||||
#+PROPERTY: header-args:latex+ :output-dir figs
|
||||
#+PROPERTY: header-args:latex+ :post pdf2svg(file=*this*, ext="png")
|
||||
|
||||
#+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
|
||||
:END:
|
||||
|
||||
* Introduction :ignore:
|
||||
In this document is studied how a piezoelectric stack can be used to measured the force.
|
||||
|
||||
- Section [[sec:open_closed_circuit]]: the effect of the input impedance of the electronics connected to the force sensor stack on the stiffness of the stack is studied
|
||||
- Section [[sec:charge_voltage_estimation]]:
|
||||
|
||||
* Change of Stiffness due to Sensors stack being open/closed circuit
|
||||
:PROPERTIES:
|
||||
:header-args:matlab+: :tangle matlab/open_closed_circuit.m
|
||||
:END:
|
||||
<<sec:open_closed_circuit>>
|
||||
|
||||
** Introduction :ignore:
|
||||
|
||||
** 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
|
||||
|
||||
#+begin_src matlab :tangle no
|
||||
addpath('./matlab/mat/');
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :eval no
|
||||
addpath('./mat/');
|
||||
#+end_src
|
||||
|
||||
** Load Data
|
||||
#+begin_src matlab
|
||||
oc = load('identification_open_circuit.mat', 't', 'encoder', 'u');
|
||||
sc = load('identification_short_circuit.mat', 't', 'encoder', 'u');
|
||||
#+end_src
|
||||
|
||||
** Transfer Functions
|
||||
#+begin_src matlab
|
||||
Ts = 1e-4; % Sampling Time [s]
|
||||
win = hann(ceil(10/Ts));
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab
|
||||
[tf_oc_est, f] = tfestimate(oc.u, oc.encoder, win, [], [], 1/Ts);
|
||||
[co_oc_est, ~] = mscohere( oc.u, oc.encoder, win, [], [], 1/Ts);
|
||||
|
||||
[tf_sc_est, ~] = tfestimate(sc.u, sc.encoder, win, [], [], 1/Ts);
|
||||
[co_sc_est, ~] = mscohere( sc.u, sc.encoder, win, [], [], 1/Ts);
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
figure;
|
||||
hold on;
|
||||
plot(f, co_oc_est, '-')
|
||||
plot(f, co_sc_est, '-')
|
||||
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'lin');
|
||||
ylabel('Coherence'); xlabel('Frequency [Hz]');
|
||||
hold off;
|
||||
xlim([0.5, 5e3]);
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :tangle no :exports results :results file replace
|
||||
exportFig('figs/stiffness_force_sensor_coherence.pdf', 'width', 'wide', 'height', 'normal');
|
||||
#+end_src
|
||||
|
||||
#+name: fig:stiffness_force_sensor_coherence
|
||||
#+caption:
|
||||
#+RESULTS:
|
||||
[[file:figs/stiffness_force_sensor_coherence.png]]
|
||||
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
figure;
|
||||
tiledlayout(2, 1, 'TileSpacing', 'None', 'Padding', 'None');
|
||||
|
||||
ax1 = nexttile;
|
||||
hold on;
|
||||
plot(f, abs(tf_oc_est), '-', 'DisplayName', 'Open-Circuit')
|
||||
plot(f, abs(tf_sc_est), '-', 'DisplayName', 'Short-Circuit')
|
||||
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
|
||||
ylabel('Amplitude'); set(gca, 'XTickLabel',[]);
|
||||
hold off;
|
||||
ylim([1e-7, 3e-4]);
|
||||
legend('location', 'southwest');
|
||||
|
||||
ax2 = nexttile;
|
||||
hold on;
|
||||
plot(f, 180/pi*angle(tf_oc_est), '-')
|
||||
plot(f, 180/pi*angle(tf_sc_est), '-')
|
||||
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'lin');
|
||||
ylabel('Phase'); xlabel('Frequency [Hz]');
|
||||
hold off;
|
||||
yticks(-360:90:360);
|
||||
axis padded 'auto x'
|
||||
|
||||
linkaxes([ax1,ax2], 'x');
|
||||
xlim([0.5, 5e3]);
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :tangle no :exports results :results file replace
|
||||
exportFig('figs/stiffness_force_sensor_bode.pdf', 'width', 'wide', 'height', 'tall');
|
||||
#+end_src
|
||||
|
||||
#+name: fig:stiffness_force_sensor_bode
|
||||
#+caption:
|
||||
#+RESULTS:
|
||||
[[file:figs/stiffness_force_sensor_bode.png]]
|
||||
|
||||
#+begin_src matlab :tangle no :exports results :results file replace
|
||||
xlim([180, 280]);
|
||||
exportFig('figs/stiffness_force_sensor_bode_zoom.pdf', 'width', 'small', 'height', 'tall');
|
||||
#+end_src
|
||||
|
||||
#+name: fig:stiffness_force_sensor_bode_zoom
|
||||
#+caption: Zoom on the change of resonance
|
||||
#+RESULTS:
|
||||
[[file:figs/stiffness_force_sensor_bode_zoom.png]]
|
||||
|
||||
#+begin_important
|
||||
The change of resonance frequency / stiffness is very small and is not important here.
|
||||
#+end_important
|
||||
|
||||
* Generated Number of Charge / Voltage
|
||||
:PROPERTIES:
|
||||
:header-args:matlab+: :tangle matlab/charge_voltage_estimation.m
|
||||
:END:
|
||||
<<sec:charge_voltage_estimation>>
|
||||
|
||||
** Introduction :ignore:
|
||||
|
||||
|
||||
Two stacks are used as actuator (in parallel) and one stack is used as sensor.
|
||||
|
||||
The amplifier gain is 20V/V (Cedrat LA75B).
|
||||
|
||||
** 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
|
||||
|
||||
#+begin_src matlab :tangle no
|
||||
addpath('./matlab/mat/');
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :eval no
|
||||
addpath('./mat/');
|
||||
#+end_src
|
||||
|
||||
** Steps
|
||||
#+begin_src matlab
|
||||
load('force_sensor_steps.mat', 't', 'encoder', 'u', 'v');
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab
|
||||
figure;
|
||||
tiledlayout(2, 1, 'TileSpacing', 'None', 'Padding', 'None');
|
||||
nexttile;
|
||||
plot(t, v);
|
||||
xlabel('Time [s]'); ylabel('Measured voltage [V]');
|
||||
nexttile;
|
||||
plot(t, u);
|
||||
xlabel('Time [s]'); ylabel('Actuator Voltage [V]');
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :tangle no :exports results :results file replace
|
||||
exportFig('figs/force_sen_steps_time_domain.pdf', 'width', 'wide', 'height', 'tall');
|
||||
#+end_src
|
||||
|
||||
#+name: fig:force_sen_steps_time_domain
|
||||
#+caption: Time domain signal during the 3 actuator voltage steps
|
||||
#+RESULTS:
|
||||
[[file:figs/force_sen_steps_time_domain.png]]
|
||||
|
||||
Three steps are performed at the following time intervals:
|
||||
#+begin_src matlab
|
||||
t_s = [ 2.5, 23;
|
||||
23.8, 35;
|
||||
35.8, 50];
|
||||
#+end_src
|
||||
|
||||
Fit function:
|
||||
#+begin_src matlab
|
||||
f = @(b,x) b(1).*exp(b(2).*x) + b(3);
|
||||
#+end_src
|
||||
|
||||
We are interested by the =b(2)= term, which is the time constant of the exponential.
|
||||
#+begin_src matlab
|
||||
tau = zeros(size(t_s, 1),1);
|
||||
V0 = zeros(size(t_s, 1),1);
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab
|
||||
for t_i = 1:size(t_s, 1)
|
||||
t_cur = t(t_s(t_i, 1) < t & t < t_s(t_i, 2));
|
||||
t_cur = t_cur - t_cur(1);
|
||||
y_cur = v(t_s(t_i, 1) < t & t < t_s(t_i, 2));
|
||||
|
||||
nrmrsd = @(b) norm(y_cur - f(b,t_cur)); % Residual Norm Cost Function
|
||||
B0 = [0.5, -0.15, 2.2]; % Choose Appropriate Initial Estimates
|
||||
[B,rnrm] = fminsearch(nrmrsd, B0); % Estimate Parameters ‘B’
|
||||
|
||||
tau(t_i) = 1/B(2);
|
||||
V0(t_i) = B(3);
|
||||
end
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports results :results value table replace :tangle no :post addhdr(*this*)
|
||||
data2orgtable([abs(tau), V0], {}, {'$tau$ [s]', '$V_0$ [V]'}, ' %.2f ');
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
| $tau$ [s] | $V_0$ [V] |
|
||||
|-----------+-----------|
|
||||
| 6.47 | 2.26 |
|
||||
| 6.76 | 2.26 |
|
||||
| 6.49 | 2.25 |
|
||||
|
||||
With the capacitance being $C = 4.4 \mu F$, the internal impedance of the Speedgoat ADC can be computed as follows:
|
||||
#+begin_src matlab
|
||||
Cp = 4.4e-6; % [F]
|
||||
Rin = abs(mean(tau))/Cp;
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :results value replace :exports results
|
||||
ans = Rin
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
: 1494100.0
|
||||
|
||||
The input impedance of the Speedgoat's ADC should then be close to $1.5\,M\Omega$ (specified at $1\,M\Omega$).
|
||||
|
||||
#+begin_important
|
||||
How can we explain the voltage offset?
|
||||
#+end_important
|
||||
|
||||
As shown in Figure [[fig:force_sensor_model_electronics]] (taken from cite:reza06_piezoel_trans_vibrat_contr_dampin), an input voltage offset is due to the input bias current $i_n$.
|
||||
|
||||
#+name: fig:force_sensor_model_electronics
|
||||
#+caption: Model of a piezoelectric transducer (left) and instrumentation amplifier (right)
|
||||
[[file:figs/force_sensor_model_electronics.png]]
|
||||
|
||||
The estimated input bias current is then:
|
||||
#+begin_src matlab
|
||||
in = mean(V0)/Rin;
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :results value replace :exports results
|
||||
ans = in
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
: 1.5119e-06
|
||||
|
||||
An additional resistor in parallel with $R_{in}$ would have two effects:
|
||||
- reduce the input voltage offset
|
||||
\[ V_{off} = \frac{R_a R_{in}}{R_a + R_{in}} i_n \]
|
||||
- increase the high pass corner frequency $f_c$
|
||||
\[ C_p \frac{R_{in}R_a}{R_{in} + R_a} = \tau_c = \frac{1}{f_c} \]
|
||||
\[ R_a = \frac{R_i}{f_c C_p R_i - 1} \]
|
||||
|
||||
|
||||
If we allow the high pass corner frequency to be equals to 3Hz:
|
||||
#+begin_src matlab
|
||||
fc = 3;
|
||||
Ra = Rin/(fc*Cp*Rin - 1);
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :results value replace :exports results
|
||||
ans = Ra
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
: 79804
|
||||
|
||||
With this parallel resistance value, the voltage offset would be:
|
||||
#+begin_src matlab
|
||||
V_offset = Ra*Rin/(Ra + Rin) * in;
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :results value replace :exports results
|
||||
ans = V_offset
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
: 0.11454
|
||||
|
||||
Which is much more acceptable.
|
||||
|
||||
** Add Parallel Resistor
|
||||
A resistor $R_p \approx 100\,k\Omega$ is added in parallel with the force sensor as shown in Figure [[fig:force_sensor_model_electronics_without_R]].
|
||||
|
||||
#+name: fig:force_sensor_model_electronics_without_R
|
||||
#+caption: Model of a piezoelectric transducer (left) and instrumentation amplifier (right) with added resistor $R_p$
|
||||
[[file:figs/force_sensor_model_electronics_without_R.png]]
|
||||
|
||||
#+begin_src matlab
|
||||
load('force_sensor_steps_R_82k7.mat', 't', 'encoder', 'u', 'v');
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab
|
||||
figure;
|
||||
tiledlayout(2, 1, 'TileSpacing', 'None', 'Padding', 'None');
|
||||
nexttile;
|
||||
plot(t, v);
|
||||
xlabel('Time [s]'); ylabel('Measured voltage [V]');
|
||||
nexttile;
|
||||
plot(t, u);
|
||||
xlabel('Time [s]'); ylabel('Actuator Voltage [V]');
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :tangle no :exports results :results file replace
|
||||
exportFig('figs/force_sen_steps_time_domain_par_R.pdf', 'width', 'wide', 'height', 'tall');
|
||||
#+end_src
|
||||
|
||||
#+name: fig:force_sen_steps_time_domain_par_R
|
||||
#+caption: Time domain signal during the actuator voltage steps
|
||||
#+RESULTS:
|
||||
[[file:figs/force_sen_steps_time_domain_par_R.png]]
|
||||
|
||||
Three steps are performed at the following time intervals:
|
||||
#+begin_src matlab
|
||||
t_s = [1.9, 6;
|
||||
8.5, 13;
|
||||
15.5, 21;
|
||||
22.6, 26;
|
||||
30.0, 36;
|
||||
37.5, 41;
|
||||
46.2, 49.5]
|
||||
#+end_src
|
||||
|
||||
Fit function:
|
||||
#+begin_src matlab
|
||||
f = @(b,x) b(1).*exp(b(2).*x) + b(3);
|
||||
#+end_src
|
||||
|
||||
We are interested by the =b(2)= term, which is the time constant of the exponential.
|
||||
|
||||
#+begin_src matlab
|
||||
tau = zeros(size(t_s, 1),1);
|
||||
V0 = zeros(size(t_s, 1),1);
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab
|
||||
for t_i = 1:size(t_s, 1)
|
||||
t_cur = t(t_s(t_i, 1) < t & t < t_s(t_i, 2));
|
||||
t_cur = t_cur - t_cur(1);
|
||||
y_cur = v(t_s(t_i, 1) < t & t < t_s(t_i, 2));
|
||||
|
||||
nrmrsd = @(b) norm(y_cur - f(b,t_cur)); % Residual Norm Cost Function
|
||||
B0 = [0.5, -0.2, 0.2]; % Choose Appropriate Initial Estimates
|
||||
[B,rnrm] = fminsearch(nrmrsd, B0); % Estimate Parameters ‘B’
|
||||
|
||||
tau(t_i) = 1/B(2);
|
||||
V0(t_i) = B(3);
|
||||
end
|
||||
#+end_src
|
||||
|
||||
And indeed, we obtain a much smaller offset voltage and a much faster time constant.
|
||||
|
||||
#+begin_src matlab :exports results :results value table replace :tangle no :post addhdr(*this*)
|
||||
data2orgtable([abs(tau), V0], {}, {'$tau$ [s]', '$V_0$ [V]'}, ' %.2f ');
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
| $tau$ [s] | $V_0$ [V] |
|
||||
|-----------+-----------|
|
||||
| 0.43 | 0.15 |
|
||||
| 0.45 | 0.16 |
|
||||
| 0.43 | 0.15 |
|
||||
| 0.43 | 0.15 |
|
||||
| 0.45 | 0.15 |
|
||||
| 0.46 | 0.16 |
|
||||
| 0.48 | 0.16 |
|
||||
|
||||
Knowing the capacitance value, we can estimate the value of the added resistor (neglecting the input impedance of $\approx 1\,M\Omega$):
|
||||
|
||||
#+begin_src matlab
|
||||
Cp = 4.4e-6; % [F]
|
||||
Rin = abs(mean(tau))/Cp;
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :results value replace :exports results
|
||||
ans = Rin
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
: 101200.0
|
||||
|
||||
And we can verify that the bias current estimation stays the same:
|
||||
#+begin_src matlab
|
||||
in = mean(V0)/Rin;
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :results value replace :exports results
|
||||
ans = in
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
: 1.5305e-06
|
||||
|
||||
This validates the model of the ADC and the effectiveness of the added resistor.
|
||||
|
||||
** Sinus
|
||||
#+begin_src matlab
|
||||
load('force_sensor_sin.mat', 't', 'encoder', 'u', 'v');
|
||||
|
||||
u = u(t>25);
|
||||
v = v(t>25);
|
||||
encoder = encoder(t>25) - mean(encoder(t>25));
|
||||
t = t(t>25);
|
||||
#+end_src
|
||||
|
||||
The driving voltage is a sinus at 0.5Hz centered on 3V and with an amplitude of 3V (Figure [[fig:force_sensor_sin_u]]).
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
figure;
|
||||
plot(t, u)
|
||||
xlabel('Time [s]'); ylabel('Control Voltage [V]');
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :tangle no :exports results :results file replace
|
||||
exportFig('figs/force_sensor_sin_u.pdf', 'width', 'normal', 'height', 'small');
|
||||
#+end_src
|
||||
|
||||
#+name: fig:force_sensor_sin_u
|
||||
#+caption: Driving Voltage
|
||||
#+RESULTS:
|
||||
[[file:figs/force_sensor_sin_u.png]]
|
||||
|
||||
The full stroke as measured by the encoder is:
|
||||
#+begin_src matlab :results value replace
|
||||
max(encoder)-min(encoder)
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
: 5.005e-05
|
||||
|
||||
Its signal is shown in Figure [[fig:force_sensor_sin_encoder]].
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
figure;
|
||||
plot(t, encoder)
|
||||
xlabel('Time [s]'); ylabel('Encoder [m]');
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :tangle no :exports results :results file replace
|
||||
exportFig('figs/force_sensor_sin_encoder.pdf', 'width', 'normal', 'height', 'small');
|
||||
#+end_src
|
||||
|
||||
#+name: fig:force_sensor_sin_encoder
|
||||
#+caption: Encoder measurement
|
||||
#+RESULTS:
|
||||
[[file:figs/force_sensor_sin_encoder.png]]
|
||||
|
||||
The generated voltage by the stack is shown in Figure
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
figure;
|
||||
plot(t, v)
|
||||
xlabel('Time [s]'); ylabel('Force Sensor Output [V]');
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :tangle no :exports results :results file replace
|
||||
exportFig('figs/force_sensor_sin_stack.pdf', 'width', 'normal', 'height', 'small');
|
||||
#+end_src
|
||||
|
||||
#+name: fig:force_sensor_sin_stack
|
||||
#+caption: Voltage measured on the stack used as a sensor
|
||||
#+RESULTS:
|
||||
[[file:figs/force_sensor_sin_stack.png]]
|
||||
|
||||
The capacitance of the stack is
|
||||
#+begin_src matlab
|
||||
Cp = 4.4e-6; % [F]
|
||||
#+end_src
|
||||
|
||||
The corresponding generated charge is then shown in Figure [[fig:force_sensor_sin_charge]].
|
||||
#+begin_src matlab :exports none
|
||||
figure;
|
||||
plot(t, 1e6*Cp*(v-mean(v)))
|
||||
xlabel('Time [s]'); ylabel('Generated Charge [$\mu C$]');
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :tangle no :exports results :results file replace
|
||||
exportFig('figs/force_sensor_sin_charge.pdf', 'width', 'normal', 'height', 'small');
|
||||
#+end_src
|
||||
|
||||
#+name: fig:force_sensor_sin_charge
|
||||
#+caption: Generated Charge
|
||||
#+RESULTS:
|
||||
[[file:figs/force_sensor_sin_charge.png]]
|
||||
|
||||
|
||||
The relation between the generated voltage and the measured displacement is almost linear as shown in Figure [[fig:force_sensor_linear_relation]].
|
||||
|
||||
#+begin_src matlab
|
||||
b1 = encoder\(v-mean(v));
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :exports none
|
||||
figure;
|
||||
hold on;
|
||||
plot(encoder, v-mean(v), 'DisplayName', 'Measured Voltage');
|
||||
plot(encoder, encoder*b1, 'DisplayName', sprintf('Linear Fit: $U_s \\approx %.3f [V/\\mu m] \\cdot d$', 1e-6*abs(b1)));
|
||||
hold off;
|
||||
xlabel('Measured Displacement [m]'); ylabel('Generated Voltage [V]');
|
||||
legend();
|
||||
#+end_src
|
||||
|
||||
#+begin_src matlab :tangle no :exports results :results file replace
|
||||
exportFig('figs/force_sensor_linear_relation.pdf', 'width', 'normal', 'height', 'small');
|
||||
#+end_src
|
||||
|
||||
#+name: fig:force_sensor_linear_relation
|
||||
#+caption: Almost linear relation between the relative displacement and the generated voltage
|
||||
#+RESULTS:
|
||||
[[file:figs/force_sensor_linear_relation.png]]
|
||||
|
||||
With a 16bits ADC, the resolution will then be equals to (in [nm]):
|
||||
#+begin_src matlab :results value replace
|
||||
abs((20/2^16)/(b1/1e9))
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
: 3.9838
|
||||
@@ -0,0 +1,7 @@
|
||||
/*!
|
||||
* Bootstrap v3.3.4 (http://getbootstrap.com)
|
||||
* Copyright 2011-2015 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.4",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.4",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active"));a&&this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.4",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parLine truncated
|
||||
var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.4",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=a(document.body).height();"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
|
||||
@@ -0,0 +1,4 @@
|
||||
/*! jQuery v2.1.3 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
|
||||
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.3",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=hb(),z=hb(),A=hb(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),Line truncated
|
||||
},removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=l.createDocumentFragment(),b=a.appendChild(l.createElement("div")),c=l.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join(".Line truncated
|
||||
},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Zb={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=$b[b]||n.find.attr;$b[b]=function(a,b,d){var e,f;return d||(f=$b[b],$b[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$b[b]=f),e}});var _b=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ac=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ac," ").indexOf(b)>=0)return!0;return!1}});var bc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||Line truncated
|
||||
@@ -0,0 +1,87 @@
|
||||
$(function() {
|
||||
$('.note').before("<p class='admonition-title note'>Note</p>");
|
||||
$('.seealso').before("<p class='admonition-title seealso'>See also</p>");
|
||||
$('.warning').before("<p class='admonition-title warning'>Warning</p>");
|
||||
$('.caution').before("<p class='admonition-title caution'>Caution</p>");
|
||||
$('.attention').before("<p class='admonition-title attention'>Attention</p>");
|
||||
$('.tip').before("<p class='admonition-title tip'>Tip</p>");
|
||||
$('.important').before("<p class='admonition-title important'>Important</p>");
|
||||
$('.hint').before("<p class='admonition-title hint'>Hint</p>");
|
||||
$('.error').before("<p class='admonition-title error'>Error</p>");
|
||||
$('.danger').before("<p class='admonition-title danger'>Danger</p>");
|
||||
$('.question').before("<p class='admonition-title question'>Question</p>");
|
||||
$('.summary').before("<p class='admonition-title hint'>Summary</p>");
|
||||
});
|
||||
|
||||
$( document ).ready(function() {
|
||||
|
||||
// Shift nav in mobile when clicking the menu.
|
||||
$(document).on('click', "[data-toggle='wy-nav-top']", function() {
|
||||
$("[data-toggle='wy-nav-shift']").toggleClass("shift");
|
||||
$("[data-toggle='rst-versions']").toggleClass("shift");
|
||||
});
|
||||
// Close menu when you click a link.
|
||||
$(document).on('click', ".wy-menu-vertical .current ul li a", function() {
|
||||
$("[data-toggle='wy-nav-shift']").removeClass("shift");
|
||||
$("[data-toggle='rst-versions']").toggleClass("shift");
|
||||
});
|
||||
$(document).on('click', "[data-toggle='rst-current-version']", function() {
|
||||
$("[data-toggle='rst-versions']").toggleClass("shift-up");
|
||||
});
|
||||
// Make tables responsive
|
||||
$("table.docutils:not(.field-list)").wrap("<div class='wy-table-responsive'></div>");
|
||||
});
|
||||
|
||||
$( document ).ready(function() {
|
||||
$('#text-table-of-contents ul').first().addClass('nav');
|
||||
// ScrollSpy also requires that we use
|
||||
// a Bootstrap nav component.
|
||||
$('body').scrollspy({target: '#text-table-of-contents'});
|
||||
|
||||
// add sticky table headers
|
||||
$('table').stickyTableHeaders();
|
||||
|
||||
// set the height of tableOfContents
|
||||
var $postamble = $('#postamble');
|
||||
var $tableOfContents = $('#table-of-contents');
|
||||
$tableOfContents.css({paddingBottom: $postamble.outerHeight()});
|
||||
|
||||
// add TOC button
|
||||
var toggleSidebar = $('<div id="toggle-sidebar"><a href="#table-of-contents"><h2>Table of Contents</h2></a></div>');
|
||||
$('#content').prepend(toggleSidebar);
|
||||
|
||||
// add close button when sidebar showed in mobile screen
|
||||
var closeBtn = $('<a class="close-sidebar" href="#">Close</a>');
|
||||
var tocTitle = $('#table-of-contents').find('h2');
|
||||
tocTitle.append(closeBtn);
|
||||
});
|
||||
|
||||
window.SphinxRtdTheme = (function (jquery) {
|
||||
var stickyNav = (function () {
|
||||
var navBar,
|
||||
win,
|
||||
stickyNavCssClass = 'stickynav',
|
||||
applyStickNav = function () {
|
||||
if (navBar.height() <= win.height()) {
|
||||
navBar.addClass(stickyNavCssClass);
|
||||
} else {
|
||||
navBar.removeClass(stickyNavCssClass);
|
||||
}
|
||||
},
|
||||
enable = function () {
|
||||
applyStickNav();
|
||||
win.on('resize', applyStickNav);
|
||||
},
|
||||
init = function () {
|
||||
navBar = jquery('nav.wy-nav-side:first');
|
||||
win = jquery(window);
|
||||
};
|
||||
jquery(init);
|
||||
return {
|
||||
enable : enable
|
||||
};
|
||||
}());
|
||||
return {
|
||||
StickyNav : stickyNav
|
||||
};
|
||||
}($));
|
||||
@@ -0,0 +1,330 @@
|
||||
%% Clear Workspace and Close figures
|
||||
clear; close all; clc;
|
||||
|
||||
%% Intialize Laplace variable
|
||||
s = zpk('s');
|
||||
|
||||
addpath('./mat/');
|
||||
|
||||
% Steps
|
||||
|
||||
load('force_sensor_steps.mat', 't', 'encoder', 'u', 'v');
|
||||
|
||||
figure;
|
||||
tiledlayout(2, 1, 'TileSpacing', 'None', 'Padding', 'None');
|
||||
nexttile;
|
||||
plot(t, v);
|
||||
xlabel('Time [s]'); ylabel('Measured voltage [V]');
|
||||
nexttile;
|
||||
plot(t, u);
|
||||
xlabel('Time [s]'); ylabel('Actuator Voltage [V]');
|
||||
|
||||
|
||||
|
||||
% #+name: fig:force_sen_steps_time_domain
|
||||
% #+caption: Time domain signal during the 3 actuator voltage steps
|
||||
% #+RESULTS:
|
||||
% [[file:figs/force_sen_steps_time_domain.png]]
|
||||
|
||||
% Three steps are performed at the following time intervals:
|
||||
|
||||
t_s = [ 2.5, 23;
|
||||
23.8, 35;
|
||||
35.8, 50];
|
||||
|
||||
|
||||
|
||||
% Fit function:
|
||||
|
||||
f = @(b,x) b(1).*exp(b(2).*x) + b(3);
|
||||
|
||||
|
||||
|
||||
% We are interested by the =b(2)= term, which is the time constant of the exponential.
|
||||
|
||||
tau = zeros(size(t_s, 1),1);
|
||||
V0 = zeros(size(t_s, 1),1);
|
||||
|
||||
for t_i = 1:size(t_s, 1)
|
||||
t_cur = t(t_s(t_i, 1) < t & t < t_s(t_i, 2));
|
||||
t_cur = t_cur - t_cur(1);
|
||||
y_cur = v(t_s(t_i, 1) < t & t < t_s(t_i, 2));
|
||||
|
||||
nrmrsd = @(b) norm(y_cur - f(b,t_cur)); % Residual Norm Cost Function
|
||||
B0 = [0.5, -0.15, 2.2]; % Choose Appropriate Initial Estimates
|
||||
[B,rnrm] = fminsearch(nrmrsd, B0); % Estimate Parameters ‘B’
|
||||
|
||||
tau(t_i) = 1/B(2);
|
||||
V0(t_i) = B(3);
|
||||
end
|
||||
|
||||
|
||||
|
||||
% #+RESULTS:
|
||||
% | $tau$ [s] | $V_0$ [V] |
|
||||
% |-----------+-----------|
|
||||
% | 6.47 | 2.26 |
|
||||
% | 6.76 | 2.26 |
|
||||
% | 6.49 | 2.25 |
|
||||
|
||||
% With the capacitance being $C = 4.4 \mu F$, the internal impedance of the Speedgoat ADC can be computed as follows:
|
||||
|
||||
Cp = 4.4e-6; % [F]
|
||||
Rin = abs(mean(tau))/Cp;
|
||||
|
||||
ans = Rin
|
||||
|
||||
|
||||
|
||||
% #+RESULTS:
|
||||
% : 1494100.0
|
||||
|
||||
% The input impedance of the Speedgoat's ADC should then be close to $1.5\,M\Omega$ (specified at $1\,M\Omega$).
|
||||
|
||||
% #+begin_important
|
||||
% How can we explain the voltage offset?
|
||||
% #+end_important
|
||||
|
||||
% As shown in Figure [[fig:force_sensor_model_electronics]] (taken from cite:reza06_piezoel_trans_vibrat_contr_dampin), an input voltage offset is due to the input bias current $i_n$.
|
||||
|
||||
% #+name: fig:force_sensor_model_electronics
|
||||
% #+caption: Model of a piezoelectric transducer (left) and instrumentation amplifier (right)
|
||||
% [[file:figs/force_sensor_model_electronics.png]]
|
||||
|
||||
% The estimated input bias current is then:
|
||||
|
||||
in = mean(V0)/Rin;
|
||||
|
||||
ans = in
|
||||
|
||||
|
||||
|
||||
% #+RESULTS:
|
||||
% : 1.5119e-06
|
||||
|
||||
% An additional resistor in parallel with $R_{in}$ would have two effects:
|
||||
% - reduce the input voltage offset
|
||||
% \[ V_{off} = \frac{R_a R_{in}}{R_a + R_{in}} i_n \]
|
||||
% - increase the high pass corner frequency $f_c$
|
||||
% \[ C_p \frac{R_{in}R_a}{R_{in} + R_a} = \tau_c = \frac{1}{f_c} \]
|
||||
% \[ R_a = \frac{R_i}{f_c C_p R_i - 1} \]
|
||||
|
||||
|
||||
% If we allow the high pass corner frequency to be equals to 3Hz:
|
||||
|
||||
fc = 3;
|
||||
Ra = Rin/(fc*Cp*Rin - 1);
|
||||
|
||||
ans = Ra
|
||||
|
||||
|
||||
|
||||
% #+RESULTS:
|
||||
% : 79804
|
||||
|
||||
% With this parallel resistance value, the voltage offset would be:
|
||||
|
||||
V_offset = Ra*Rin/(Ra + Rin) * in;
|
||||
|
||||
ans = V_offset
|
||||
|
||||
% Add Parallel Resistor
|
||||
% A resistor $R_p \approx 100\,k\Omega$ is added in parallel with the force sensor as shown in Figure [[fig:force_sensor_model_electronics_without_R]].
|
||||
|
||||
% #+name: fig:force_sensor_model_electronics_without_R
|
||||
% #+caption: Model of a piezoelectric transducer (left) and instrumentation amplifier (right) with added resistor $R_p$
|
||||
% [[file:figs/force_sensor_model_electronics_without_R.png]]
|
||||
|
||||
|
||||
load('force_sensor_steps_R_82k7.mat', 't', 'encoder', 'u', 'v');
|
||||
|
||||
figure;
|
||||
tiledlayout(2, 1, 'TileSpacing', 'None', 'Padding', 'None');
|
||||
nexttile;
|
||||
plot(t, v);
|
||||
xlabel('Time [s]'); ylabel('Measured voltage [V]');
|
||||
nexttile;
|
||||
plot(t, u);
|
||||
xlabel('Time [s]'); ylabel('Actuator Voltage [V]');
|
||||
|
||||
|
||||
|
||||
% #+name: fig:force_sen_steps_time_domain_par_R
|
||||
% #+caption: Time domain signal during the actuator voltage steps
|
||||
% #+RESULTS:
|
||||
% [[file:figs/force_sen_steps_time_domain_par_R.png]]
|
||||
|
||||
% Three steps are performed at the following time intervals:
|
||||
|
||||
t_s = [1.9, 6;
|
||||
8.5, 13;
|
||||
15.5, 21;
|
||||
22.6, 26;
|
||||
30.0, 36;
|
||||
37.5, 41;
|
||||
46.2, 49.5]
|
||||
|
||||
|
||||
|
||||
% Fit function:
|
||||
|
||||
f = @(b,x) b(1).*exp(b(2).*x) + b(3);
|
||||
|
||||
|
||||
|
||||
% We are interested by the =b(2)= term, which is the time constant of the exponential.
|
||||
|
||||
|
||||
tau = zeros(size(t_s, 1),1);
|
||||
V0 = zeros(size(t_s, 1),1);
|
||||
|
||||
for t_i = 1:size(t_s, 1)
|
||||
t_cur = t(t_s(t_i, 1) < t & t < t_s(t_i, 2));
|
||||
t_cur = t_cur - t_cur(1);
|
||||
y_cur = v(t_s(t_i, 1) < t & t < t_s(t_i, 2));
|
||||
|
||||
nrmrsd = @(b) norm(y_cur - f(b,t_cur)); % Residual Norm Cost Function
|
||||
B0 = [0.5, -0.2, 0.2]; % Choose Appropriate Initial Estimates
|
||||
[B,rnrm] = fminsearch(nrmrsd, B0); % Estimate Parameters ‘B’
|
||||
|
||||
tau(t_i) = 1/B(2);
|
||||
V0(t_i) = B(3);
|
||||
end
|
||||
|
||||
|
||||
|
||||
% #+RESULTS:
|
||||
% | $tau$ [s] | $V_0$ [V] |
|
||||
% |-----------+-----------|
|
||||
% | 0.43 | 0.15 |
|
||||
% | 0.45 | 0.16 |
|
||||
% | 0.43 | 0.15 |
|
||||
% | 0.43 | 0.15 |
|
||||
% | 0.45 | 0.15 |
|
||||
% | 0.46 | 0.16 |
|
||||
% | 0.48 | 0.16 |
|
||||
|
||||
% Knowing the capacitance value, we can estimate the value of the added resistor (neglecting the input impedance of $\approx 1\,M\Omega$):
|
||||
|
||||
|
||||
Cp = 4.4e-6; % [F]
|
||||
Rin = abs(mean(tau))/Cp;
|
||||
|
||||
ans = Rin
|
||||
|
||||
|
||||
|
||||
% #+RESULTS:
|
||||
% : 101200.0
|
||||
|
||||
% And we can verify that the bias current estimation stays the same:
|
||||
|
||||
in = mean(V0)/Rin;
|
||||
|
||||
ans = in
|
||||
|
||||
% Sinus
|
||||
|
||||
load('force_sensor_sin.mat', 't', 'encoder', 'u', 'v');
|
||||
|
||||
u = u(t>25);
|
||||
v = v(t>25);
|
||||
encoder = encoder(t>25) - mean(encoder(t>25));
|
||||
t = t(t>25);
|
||||
|
||||
|
||||
|
||||
% The driving voltage is a sinus at 0.5Hz centered on 3V and with an amplitude of 3V (Figure [[fig:force_sensor_sin_u]]).
|
||||
|
||||
|
||||
figure;
|
||||
plot(t, u)
|
||||
xlabel('Time [s]'); ylabel('Control Voltage [V]');
|
||||
|
||||
|
||||
|
||||
% #+name: fig:force_sensor_sin_u
|
||||
% #+caption: Driving Voltage
|
||||
% #+RESULTS:
|
||||
% [[file:figs/force_sensor_sin_u.png]]
|
||||
|
||||
% The full stroke as measured by the encoder is:
|
||||
|
||||
max(encoder)-min(encoder)
|
||||
|
||||
|
||||
|
||||
% #+RESULTS:
|
||||
% : 5.005e-05
|
||||
|
||||
% Its signal is shown in Figure [[fig:force_sensor_sin_encoder]].
|
||||
|
||||
|
||||
figure;
|
||||
plot(t, encoder)
|
||||
xlabel('Time [s]'); ylabel('Encoder [m]');
|
||||
|
||||
|
||||
|
||||
% #+name: fig:force_sensor_sin_encoder
|
||||
% #+caption: Encoder measurement
|
||||
% #+RESULTS:
|
||||
% [[file:figs/force_sensor_sin_encoder.png]]
|
||||
|
||||
% The generated voltage by the stack is shown in Figure
|
||||
|
||||
|
||||
figure;
|
||||
plot(t, v)
|
||||
xlabel('Time [s]'); ylabel('Force Sensor Output [V]');
|
||||
|
||||
|
||||
|
||||
% #+name: fig:force_sensor_sin_stack
|
||||
% #+caption: Voltage measured on the stack used as a sensor
|
||||
% #+RESULTS:
|
||||
% [[file:figs/force_sensor_sin_stack.png]]
|
||||
|
||||
% The capacitance of the stack is
|
||||
|
||||
Cp = 4.4e-6; % [F]
|
||||
|
||||
|
||||
|
||||
% The corresponding generated charge is then shown in Figure [[fig:force_sensor_sin_charge]].
|
||||
|
||||
figure;
|
||||
plot(t, 1e6*Cp*(v-mean(v)))
|
||||
xlabel('Time [s]'); ylabel('Generated Charge [$\mu C$]');
|
||||
|
||||
|
||||
|
||||
% #+name: fig:force_sensor_sin_charge
|
||||
% #+caption: Generated Charge
|
||||
% #+RESULTS:
|
||||
% [[file:figs/force_sensor_sin_charge.png]]
|
||||
|
||||
|
||||
% The relation between the generated voltage and the measured displacement is almost linear as shown in Figure [[fig:force_sensor_linear_relation]].
|
||||
|
||||
|
||||
b1 = encoder\(v-mean(v));
|
||||
|
||||
figure;
|
||||
hold on;
|
||||
plot(encoder, v-mean(v), 'DisplayName', 'Measured Voltage');
|
||||
plot(encoder, encoder*b1, 'DisplayName', sprintf('Linear Fit: $U_s \\approx %.3f [V/\\mu m] \\cdot d$', 1e-6*abs(b1)));
|
||||
hold off;
|
||||
xlabel('Measured Displacement [m]'); ylabel('Generated Voltage [V]');
|
||||
legend();
|
||||
|
||||
|
||||
|
||||
% #+name: fig:force_sensor_linear_relation
|
||||
% #+caption: Almost linear relation between the relative displacement and the generated voltage
|
||||
% #+RESULTS:
|
||||
% [[file:figs/force_sensor_linear_relation.png]]
|
||||
|
||||
% With a 16bits ADC, the resolution will then be equals to (in [nm]):
|
||||
|
||||
abs((20/2^16)/(b1/1e9))
|
||||
@@ -0,0 +1,67 @@
|
||||
%% Clear Workspace and Close figures
|
||||
clear; close all; clc;
|
||||
|
||||
%% Intialize Laplace variable
|
||||
s = zpk('s');
|
||||
|
||||
addpath('./mat/');
|
||||
|
||||
% Load Data
|
||||
|
||||
oc = load('identification_open_circuit.mat', 't', 'encoder', 'u');
|
||||
sc = load('identification_short_circuit.mat', 't', 'encoder', 'u');
|
||||
|
||||
% Transfer Functions
|
||||
|
||||
Ts = 1e-4; % Sampling Time [s]
|
||||
win = hann(ceil(10/Ts));
|
||||
|
||||
[tf_oc_est, f] = tfestimate(oc.u, oc.encoder, win, [], [], 1/Ts);
|
||||
[co_oc_est, ~] = mscohere( oc.u, oc.encoder, win, [], [], 1/Ts);
|
||||
|
||||
[tf_sc_est, ~] = tfestimate(sc.u, sc.encoder, win, [], [], 1/Ts);
|
||||
[co_sc_est, ~] = mscohere( sc.u, sc.encoder, win, [], [], 1/Ts);
|
||||
|
||||
figure;
|
||||
hold on;
|
||||
plot(f, co_oc_est, '-')
|
||||
plot(f, co_sc_est, '-')
|
||||
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'lin');
|
||||
ylabel('Coherence'); xlabel('Frequency [Hz]');
|
||||
hold off;
|
||||
xlim([0.5, 5e3]);
|
||||
|
||||
|
||||
|
||||
% #+name: fig:stiffness_force_sensor_coherence
|
||||
% #+caption:
|
||||
% #+RESULTS:
|
||||
% [[file:figs/stiffness_force_sensor_coherence.png]]
|
||||
|
||||
|
||||
|
||||
figure;
|
||||
tiledlayout(2, 1, 'TileSpacing', 'None', 'Padding', 'None');
|
||||
|
||||
ax1 = nexttile;
|
||||
hold on;
|
||||
plot(f, abs(tf_oc_est), '-', 'DisplayName', 'Open-Circuit')
|
||||
plot(f, abs(tf_sc_est), '-', 'DisplayName', 'Short-Circuit')
|
||||
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
|
||||
ylabel('Amplitude'); set(gca, 'XTickLabel',[]);
|
||||
hold off;
|
||||
ylim([1e-7, 3e-4]);
|
||||
legend('location', 'southwest');
|
||||
|
||||
ax2 = nexttile;
|
||||
hold on;
|
||||
plot(f, 180/pi*angle(tf_oc_est), '-')
|
||||
plot(f, 180/pi*angle(tf_sc_est), '-')
|
||||
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'lin');
|
||||
ylabel('Phase'); xlabel('Frequency [Hz]');
|
||||
hold off;
|
||||
yticks(-360:90:360);
|
||||
axis padded 'auto x'
|
||||
|
||||
linkaxes([ax1,ax2], 'x');
|
||||
xlim([0.5, 5e3]);
|
||||
@@ -0,0 +1,17 @@
|
||||
tg = slrt;
|
||||
|
||||
%%
|
||||
f = SimulinkRealTime.openFTP(tg);
|
||||
mget(f, 'int_enc.dat', 'data');
|
||||
close(f);
|
||||
|
||||
%% Convert the Data
|
||||
data = SimulinkRealTime.utils.getFileScopeData('data/int_enc.dat').data;
|
||||
|
||||
interferometer = data(:, 1);
|
||||
encoder = data(:, 2);
|
||||
u = data(:, 3);
|
||||
t = data(:, 4);
|
||||
|
||||
save('./mat/int_enc_id_noise_bis.mat', 'interferometer', 'encoder', 'u' , 't');
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
%%
|
||||
s = tf('s');
|
||||
Ts = 1e-4; % [s]
|
||||
|
||||
%% Pre-Filter
|
||||
G_pf = 1/(1 + s/2/pi/20);
|
||||
G_pf = c2d(G_pf, Ts, 'tustin');
|
||||
|
||||
% %% Force Sensor Filter (HPF)
|
||||
% Gf_hpf = s/(s + 2*pi*2);
|
||||
% Gf_hpf = tf(1);
|
||||
% Gf_hpf = c2d(Gf_hpf, Ts, 'tustin');
|
||||
%
|
||||
% %% IFF Controller
|
||||
% Kiff = 1/(s + 2*pi*2);
|
||||
% Kiff = c2d(Kiff, Ts, 'tustin');
|
||||
%
|
||||
% %% Excitation Signal
|
||||
Tsim = 100; % Excitation time + Measurement time [s]
|
||||
|
||||
t = 0:Ts:Tsim;
|
||||
u_exc = timeseries(chirp(t, 10, Tsim, 40, 'logarithmic'), t);
|
||||
% u_exc = timeseries(y_v, t);
|
||||