Update CSS
This commit is contained in:
parent
054ae6e094
commit
2a0b6be82f
49
css/custom.css
Normal file
49
css/custom.css
Normal file
@ -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'; }
|
@ -513,7 +513,7 @@ legend{
|
||||
padding:0;
|
||||
white-space:normal}
|
||||
|
||||
.fa:before,#content .admonition-title:before,#content h1 .headerlink:before,#content h2 .headerlink:before,#content h3 .headerlink:before,#content h4 .headerlink:before,#content h5 .headerlink:before,#content h6 .headerlink:before,#content dl dt .headerlink:before,.icon:before,.wy-dropdown .caret:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-alert,#content .note,#content .attention,#content .caution,#content .danger,#content .error,#content .hint,#content .important,#content .tip,#content .warning,#content .seealso,#content .admonitiontodo,.btn,input[type="text"],input[type="password"],input[type="email"],input[type="url"],input[type="date"],input[type="month"],input[type="time"],input[type="datetime"],input[type="datetime-local"],input[type="week"],input[type="number"],input[type="search"],input[type="tel"],input[type="color"],select,textarea,#table-of-contents li.on a,#table-of-contents li.current>a,.wy-side-nav-search>a,.wy-side-nav-search .wy-dropdown>a,.wy-nav-top a{
|
||||
.fa:before,#content .admonition-title:before,#content h1 .headerlink:before,#content h2 .headerlink:before,#content h3 .headerlink:before,#content h4 .headerlink:before,#content h5 .headerlink:before,#content h6 .headerlink:before,#content dl dt .headerlink:before,.icon:before,.wy-dropdown .caret:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-alert,#content .note,#content .attention,#content .caution,#content .danger,#content .error,#content .summary,#content .hint,#content .important,#content .tip,#content .warning,#content .question,#content .seealso,#content .admonitiontodo,.btn,input[type="text"],input[type="password"],input[type="email"],input[type="url"],input[type="date"],input[type="month"],input[type="time"],input[type="datetime"],input[type="datetime-local"],input[type="week"],input[type="number"],input[type="search"],input[type="tel"],input[type="color"],select,textarea,#table-of-contents li.on a,#table-of-contents li.current>a,.wy-side-nav-search>a,.wy-side-nav-search .wy-dropdown>a,.wy-nav-top a{
|
||||
-webkit-font-smoothing:antialiased}
|
||||
|
||||
/*!
|
||||
@ -576,7 +576,7 @@ a .fa,a #content .admonition-title,#content a .admonition-title{
|
||||
.nav #content .admonition-title,#content .nav .admonition-title,.nav .icon{
|
||||
display:inline}
|
||||
|
||||
.wy-alert,#content .note,#content .attention,#content .caution,#content .danger,#content .error,#content .hint,#content .important,#content .tip,#content .warning,#content .seealso,#content .admonitiontodo{
|
||||
.wy-alert,#content .note,#content .attention,#content .caution,#content .danger,#content .error,#content .summary,#content .hint,#content .important,#content .tip,#content .warning,#content .question,#content .seealso,#content .admonitiontodo{
|
||||
padding:12px;
|
||||
line-height:24px;
|
||||
margin-bottom:24px;
|
||||
@ -596,32 +596,45 @@ a .fa,a #content .admonition-title,#content a .admonition-title{
|
||||
#content .danger,#content .error{
|
||||
background:#fdf3f2}
|
||||
|
||||
.wy-alert.wy-alert-warning,#content .wy-alert-warning.note,#content .attention,#content .caution,#content .wy-alert-warning.danger,#content .wy-alert-warning.error,#content .wy-alert-warning.hint,#content .wy-alert-warning.important,#content .wy-alert-warning.tip,#content .warning,#content .wy-alert-warning.seealso,#content .admonitiontodo{
|
||||
.wy-alert.wy-alert-warning,#content .wy-alert-warning.note,#content .attention,#content .caution,#content .wy-alert-warning.danger,#content .wy-alert-warning.error,#content .wy-alert-warning.summary,#content .wy-alert-warning.hint,#content .wy-alert-warning.important,#content .wy-alert-warning.tip,#content .warning,#content .wy-alert-warning.seealso,#content .admonitiontodo{
|
||||
background:#ffedcc}
|
||||
|
||||
#content .admonition-title.note:before, #content .admonition-title.seealso:before,
|
||||
#content .admonition-title.warning:before, #content .admonition-title.caution:before,
|
||||
#content .admonition-title.warning:before,
|
||||
#content .admonition-title.caution:before,
|
||||
#content .admonition-title.attention:before,
|
||||
#content .admonition-title.tip:before, #content .admonition-title.hint:before,
|
||||
#content .admonition-title.important:before,
|
||||
#content .admonition-title.error:before, #content .admonition-title.danger:before{
|
||||
#content .admonition-title.error:before,
|
||||
#content .admonition-title.danger:before{
|
||||
font-family:FontAwesome;
|
||||
content: "";}
|
||||
|
||||
#content .note,#content .seealso{
|
||||
#content .admonition-title.question:before{
|
||||
font-family:FontAwesome;
|
||||
content: "";}
|
||||
|
||||
#content .admonition-title.note:before,
|
||||
#content .admonition-title.seealso:before,
|
||||
#content .admonition-title.tip:before,
|
||||
#content .admonition-title.summary:before,
|
||||
#content .admonition-title.hint:before{
|
||||
font-family:FontAwesome;
|
||||
content: "";}
|
||||
|
||||
|
||||
#content .note,#content .question,#content .seealso{
|
||||
background:#e7f2fa}
|
||||
|
||||
.wy-alert p:last-child,#content .note p:last-child,#content .attention p:last-child,#content .caution p:last-child,#content .danger p:last-child,#content .error p:last-child,#content .hint p:last-child,#content .important p:last-child,#content .tip p:last-child,#content .warning p:last-child,#content .seealso p:last-child,#content .admonitiontodo p:last-child{
|
||||
.wy-alert p:last-child,#content .note p:last-child,#content .attention p:last-child,#content .caution p:last-child,#content .danger p:last-child,#content .error p:last-child,#content .summary p:last-child,#content .hint p:last-child,#content .important p:last-child,#content .tip p:last-child,#content .warning p:last-child,#content .question p:last-child,#content .seealso p:last-child,#content .admonitiontodo p:last-child{
|
||||
margin-bottom:0}
|
||||
|
||||
#content .admonition-title.tip,#content .admonition-title.important,#content .admonition-title.hint{
|
||||
#content .admonition-title.tip,#content .admonition-title.important,#content .admonition-title.summary,#content .admonition-title.hint{
|
||||
line-height: 1;
|
||||
background:#1abc9c}
|
||||
|
||||
#content .important,#content .tip,#content .hint{
|
||||
#content .important,#content .tip,#content .summary,#content .hint{
|
||||
background:#dbfaf4}
|
||||
|
||||
#content .admonition-title.note,#content .admonition-title.seealso{
|
||||
#content .admonition-title.note,#content .admonition-title.question,#content .admonition-title.seealso{
|
||||
line-height: 1;
|
||||
background:#6ab0de}
|
||||
|
||||
@ -938,7 +951,7 @@ footer p{
|
||||
font-style:italic;
|
||||
}
|
||||
|
||||
#content .note .last,#content .attention .last,#content .caution .last,#content .danger .last,#content .error .last,#content .hint .last,#content .important .last,#content .tip .last,#content .warning .last,#content .seealso .last,#content .admonitiontodo .last{
|
||||
#content .note .last,#content .attention .last,#content .caution .last,#content .danger .last,#content .error .last,#content .hint .summary,#content .hint .last,#content .important .last,#content .tip .last,#content .warning .last,#content .question .last,#content .seealso .last,#content .admonitiontodo .last{
|
||||
margin-bottom:0}
|
||||
|
||||
#content .admonition-title:before{
|
||||
|
315
index.html
315
index.html
@ -3,17 +3,16 @@
|
||||
"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-03 mar. 10:11 -->
|
||||
<!-- 2020-11-12 jeu. 09:18 -->
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<title>Test Bench APA95ML</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/zenburn.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/jquery.stickytableheaders.min.js"></script>
|
||||
<script type="text/javascript" src="./js/readtheorg.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
@ -27,50 +26,42 @@
|
||||
<h2>Table of Contents</h2>
|
||||
<div id="text-table-of-contents">
|
||||
<ul>
|
||||
<li><a href="#orgdcc1f5c">1. Setup</a>
|
||||
<li><a href="#orge1ce8ff">1. Setup</a>
|
||||
<ul>
|
||||
<li><a href="#orgf7defdc">1.1. Parameters</a></li>
|
||||
<li><a href="#org6e2beab">1.2. Filter White Noise</a></li>
|
||||
<li><a href="#org4f8d088">1.1. Parameters</a></li>
|
||||
<li><a href="#org92bcdf4">1.2. Filter White Noise</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org6fb223c">2. Run Experiment and Save Data</a>
|
||||
<li><a href="#org17a026f">2. Run Experiment and Save Data</a>
|
||||
<ul>
|
||||
<li><a href="#orge108931">2.1. Load Data</a></li>
|
||||
<li><a href="#org4c370ec">2.2. Save Data</a></li>
|
||||
<li><a href="#org1b14494">2.1. Load Data</a></li>
|
||||
<li><a href="#org59026b4">2.2. Save Data</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org78464fb">3. Huddle Test</a>
|
||||
<li><a href="#org1758121">3. Huddle Test</a>
|
||||
<ul>
|
||||
<li><a href="#org1d3dde0">3.1. Time Domain Data</a></li>
|
||||
<li><a href="#org01c740a">3.2. PSD of Measurement Noise</a></li>
|
||||
<li><a href="#org7fcc745">3.1. Time Domain Data</a></li>
|
||||
<li><a href="#org67ec115">3.2. PSD of Measurement Noise</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgf4b384a">4. Transfer Function Estimation using the DAC as the driver</a>
|
||||
<li><a href="#org3be6abe">4. Transfer Function Estimation using the PI Amplifier</a>
|
||||
<ul>
|
||||
<li><a href="#orgc3e175d">4.1. Time Domain Data</a></li>
|
||||
<li><a href="#orge6e7a4a">4.2. Comparison of the PSD with Huddle Test</a></li>
|
||||
<li><a href="#org4fe238a">4.3. Compute TF estimate and Coherence</a></li>
|
||||
<li><a href="#orgdfa1999">4.4. Comparison with the FEM model</a></li>
|
||||
<li><a href="#orgd263f64">4.1. Load Data</a></li>
|
||||
<li><a href="#orga450ffc">4.2. Comparison of the PSD with Huddle Test</a></li>
|
||||
<li><a href="#orgc964fb2">4.3. Compute TF estimate and Coherence</a></li>
|
||||
<li><a href="#orge2ba96a">4.4. Comparison with the FEM model</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org3a522d2">5. Transfer Function Estimation using the PI Amplifier</a>
|
||||
<li><a href="#org1988c0d">5. Transfer function from force actuator to force sensor</a>
|
||||
<ul>
|
||||
<li><a href="#org37ebc58">5.1. Load Data</a></li>
|
||||
<li><a href="#org96481d0">5.2. Comparison of the PSD with Huddle Test</a></li>
|
||||
<li><a href="#org0d0f5af">5.3. Compute TF estimate and Coherence</a></li>
|
||||
<li><a href="#org3e6bc68">5.4. Comparison with the FEM model</a></li>
|
||||
<li><a href="#org037188e">5.1. System Identification</a></li>
|
||||
<li><a href="#org0a38226">5.2. Integral Force Feedback</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#org97bbea0">6. Transfer function from force actuator to force sensor</a>
|
||||
<li><a href="#org5df0163">6. IFF Tests</a>
|
||||
<ul>
|
||||
<li><a href="#org89a469b">6.1. System Identification</a></li>
|
||||
<li><a href="#org5101bab">6.2. Integral Force Feedback</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#orgea75537">7. IFF Tests</a>
|
||||
<ul>
|
||||
<li><a href="#orgd2939f8">7.1. First tests with few gains</a></li>
|
||||
<li><a href="#org7987703">7.2. Second test with many Gains</a></li>
|
||||
<li><a href="#org26f64e8">6.1. First tests with few gains</a></li>
|
||||
<li><a href="#orgda4dc48">6.2. Second test with many Gains</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@ -78,26 +69,26 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div id="orgf074020" class="figure">
|
||||
<div id="orgf655a68" class="figure">
|
||||
<p><img src="figs/setup_picture.png" alt="setup_picture.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 1: </span>Picture of the Setup</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="org3fc88d7" class="figure">
|
||||
<div id="org9083f49" class="figure">
|
||||
<p><img src="figs/setup_zoom.png" alt="setup_zoom.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 2: </span>Zoom on the APA</p>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgdcc1f5c" class="outline-2">
|
||||
<h2 id="orgdcc1f5c"><span class="section-number-2">1</span> Setup</h2>
|
||||
<div id="outline-container-orge1ce8ff" class="outline-2">
|
||||
<h2 id="orge1ce8ff"><span class="section-number-2">1</span> Setup</h2>
|
||||
<div class="outline-text-2" id="text-1">
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf7defdc" class="outline-3">
|
||||
<h3 id="orgf7defdc"><span class="section-number-3">1.1</span> Parameters</h3>
|
||||
<div id="outline-container-org4f8d088" class="outline-3">
|
||||
<h3 id="org4f8d088"><span class="section-number-3">1.1</span> Parameters</h3>
|
||||
<div class="outline-text-3" id="text-1-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">Ts = 1e<span class="org-type">-</span>4;
|
||||
@ -106,8 +97,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org6e2beab" class="outline-3">
|
||||
<h3 id="org6e2beab"><span class="section-number-3">1.2</span> Filter White Noise</h3>
|
||||
<div id="outline-container-org92bcdf4" class="outline-3">
|
||||
<h3 id="org92bcdf4"><span class="section-number-3">1.2</span> Filter White Noise</h3>
|
||||
<div class="outline-text-3" id="text-1-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">Glpf = 1<span class="org-type">/</span>(1 <span class="org-type">+</span> s<span class="org-type">/</span>2<span class="org-type">/</span><span class="org-constant">pi</span><span class="org-type">/</span>500);
|
||||
@ -119,13 +110,13 @@ Gz = c2d(Glpf, Ts, <span class="org-string">'tustin'</span>);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org6fb223c" class="outline-2">
|
||||
<h2 id="org6fb223c"><span class="section-number-2">2</span> Run Experiment and Save Data</h2>
|
||||
<div id="outline-container-org17a026f" class="outline-2">
|
||||
<h2 id="org17a026f"><span class="section-number-2">2</span> Run Experiment and Save Data</h2>
|
||||
<div class="outline-text-2" id="text-2">
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orge108931" class="outline-3">
|
||||
<h3 id="orge108931"><span class="section-number-3">2.1</span> Load Data</h3>
|
||||
<div id="outline-container-org1b14494" class="outline-3">
|
||||
<h3 id="org1b14494"><span class="section-number-3">2.1</span> Load Data</h3>
|
||||
<div class="outline-text-3" id="text-2-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">data = SimulinkRealTime.utils.getFileScopeData(<span class="org-string">'data/apa95ml.dat'</span>).data;
|
||||
@ -134,8 +125,8 @@ Gz = c2d(Glpf, Ts, <span class="org-string">'tustin'</span>);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org4c370ec" class="outline-3">
|
||||
<h3 id="org4c370ec"><span class="section-number-3">2.2</span> Save Data</h3>
|
||||
<div id="outline-container-org59026b4" class="outline-3">
|
||||
<h3 id="org59026b4"><span class="section-number-3">2.2</span> Save Data</h3>
|
||||
<div class="outline-text-3" id="text-2-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">u = data(<span class="org-type">:</span>, 1); <span class="org-comment">% Input Voltage [V]</span>
|
||||
@ -152,16 +143,16 @@ t = data(<span class="org-type">:</span>, 3); <span class="org-comment">% Time [
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org78464fb" class="outline-2">
|
||||
<h2 id="org78464fb"><span class="section-number-2">3</span> Huddle Test</h2>
|
||||
<div id="outline-container-org1758121" class="outline-2">
|
||||
<h2 id="org1758121"><span class="section-number-2">3</span> Huddle Test</h2>
|
||||
<div class="outline-text-2" id="text-3">
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org1d3dde0" class="outline-3">
|
||||
<h3 id="org1d3dde0"><span class="section-number-3">3.1</span> Time Domain Data</h3>
|
||||
<div id="outline-container-org7fcc745" class="outline-3">
|
||||
<h3 id="org7fcc745"><span class="section-number-3">3.1</span> Time Domain Data</h3>
|
||||
<div class="outline-text-3" id="text-3-1">
|
||||
|
||||
<div id="orgc626b0d" class="figure">
|
||||
<div id="orge79b739" class="figure">
|
||||
<p><img src="figs/huddle_test_time_domain.png" alt="huddle_test_time_domain.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 3: </span>Measurement of the Mass displacement during Huddle Test</p>
|
||||
@ -169,8 +160,8 @@ t = data(<span class="org-type">:</span>, 3); <span class="org-comment">% Time [
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org01c740a" class="outline-3">
|
||||
<h3 id="org01c740a"><span class="section-number-3">3.2</span> PSD of Measurement Noise</h3>
|
||||
<div id="outline-container-org67ec115" class="outline-3">
|
||||
<h3 id="org67ec115"><span class="section-number-3">3.2</span> PSD of Measurement Noise</h3>
|
||||
<div class="outline-text-3" id="text-3-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">Ts = t(end)<span class="org-type">/</span>(length(t)<span class="org-type">-</span>1);
|
||||
@ -186,7 +177,7 @@ win = hanning(ceil(1<span class="org-type">*</span>Fs));
|
||||
</div>
|
||||
|
||||
|
||||
<div id="orgca5cf6e" class="figure">
|
||||
<div id="org8f41c21" class="figure">
|
||||
<p><img src="figs/huddle_test_pdf.png" alt="huddle_test_pdf.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 4: </span>Amplitude Spectral Density of the Displacement during Huddle Test</p>
|
||||
@ -195,123 +186,13 @@ win = hanning(ceil(1<span class="org-type">*</span>Fs));
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgf4b384a" class="outline-2">
|
||||
<h2 id="orgf4b384a"><span class="section-number-2">4</span> Transfer Function Estimation using the DAC as the driver</h2>
|
||||
<div id="outline-container-org3be6abe" class="outline-2">
|
||||
<h2 id="org3be6abe"><span class="section-number-2">4</span> Transfer Function Estimation using the PI Amplifier</h2>
|
||||
<div class="outline-text-2" id="text-4">
|
||||
<div class="important" id="org6ea9dc1">
|
||||
<p>
|
||||
Results presented in this sections are wrong as the ADC cannot deliver enought current to the piezoelectric actuator.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgc3e175d" class="outline-3">
|
||||
<h3 id="orgc3e175d"><span class="section-number-3">4.1</span> Time Domain Data</h3>
|
||||
<div id="outline-container-orgd263f64" class="outline-3">
|
||||
<h3 id="orgd263f64"><span class="section-number-3">4.1</span> Load Data</h3>
|
||||
<div class="outline-text-3" id="text-4-1">
|
||||
|
||||
<div id="org45e7018" class="figure">
|
||||
<p><img src="figs/apa95ml_5kg_10V_time_domain.png" alt="apa95ml_5kg_10V_time_domain.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 5: </span>Time domain signals during the test</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orge6e7a4a" class="outline-3">
|
||||
<h3 id="orge6e7a4a"><span class="section-number-3">4.2</span> Comparison of the PSD with Huddle Test</h3>
|
||||
<div class="outline-text-3" id="text-4-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">Ts = t(end)<span class="org-type">/</span>(length(t)<span class="org-type">-</span>1);
|
||||
Fs = 1<span class="org-type">/</span>Ts;
|
||||
|
||||
win = hanning(ceil(1<span class="org-type">*</span>Fs));
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">[pxx, f] = pwelch(y, win, [], [], Fs);
|
||||
[pht, <span class="org-type">~</span>] = pwelch(ht.y, win, [], [], Fs);
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="org2f464a0" class="figure">
|
||||
<p><img src="figs/apa95ml_5kg_10V_pdf_comp_huddle.png" alt="apa95ml_5kg_10V_pdf_comp_huddle.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 6: </span>Comparison of the ASD for the identification test and the huddle test</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org4fe238a" class="outline-3">
|
||||
<h3 id="org4fe238a"><span class="section-number-3">4.3</span> Compute TF estimate and Coherence</h3>
|
||||
<div class="outline-text-3" id="text-4-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">Ts = t(end)<span class="org-type">/</span>(length(t)<span class="org-type">-</span>1);
|
||||
Fs = 1<span class="org-type">/</span>Ts;
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">win = hann(ceil(1<span class="org-type">/</span>Ts));
|
||||
|
||||
[tf_est, f] = tfestimate(u, <span class="org-type">-</span>y, win, [], [], 1<span class="org-type">/</span>Ts);
|
||||
[co_est, <span class="org-type">~</span>] = mscohere( u, <span class="org-type">-</span>y, win, [], [], 1<span class="org-type">/</span>Ts);
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="org81de8a0" class="figure">
|
||||
<p><img src="figs/apa95ml_5kg_10V_coh.png" alt="apa95ml_5kg_10V_coh.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 7: </span>Coherence</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="org297b2fb" class="figure">
|
||||
<p><img src="figs/apa95ml_5kg_10V_tf.png" alt="apa95ml_5kg_10V_tf.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 8: </span>Estimation of the transfer function from input voltage to displacement</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgdfa1999" class="outline-3">
|
||||
<h3 id="orgdfa1999"><span class="section-number-3">4.4</span> Comparison with the FEM model</h3>
|
||||
<div class="outline-text-3" id="text-4-4">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">load(<span class="org-string">'mat/fem_model_5kg.mat'</span>, <span class="org-string">'Ghm'</span>);
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="org4247213" class="figure">
|
||||
<p><img src="figs/apa95ml_5kg_comp_fem.png" alt="apa95ml_5kg_comp_fem.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 9: </span>Comparison of the identified transfer function and the one estimated from the FE model</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="outline-text-2" id="text-4">
|
||||
<div class="important" id="orgf487d60">
|
||||
<p>
|
||||
The problem comes from the fact that the piezo is driven directly by the DAC that cannot deliver enought current.
|
||||
In the next section, a current amplifier is used.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org3a522d2" class="outline-2">
|
||||
<h2 id="org3a522d2"><span class="section-number-2">5</span> Transfer Function Estimation using the PI Amplifier</h2>
|
||||
<div class="outline-text-2" id="text-5">
|
||||
</div>
|
||||
<div id="outline-container-org37ebc58" class="outline-3">
|
||||
<h3 id="org37ebc58"><span class="section-number-3">5.1</span> Load Data</h3>
|
||||
<div class="outline-text-3" id="text-5-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">ht = load(<span class="org-string">'./mat/huddle_test.mat'</span>, <span class="org-string">'t'</span>, <span class="org-string">'u'</span>, <span class="org-string">'y'</span>);
|
||||
load(<span class="org-string">'./mat/apa95ml_5kg_Amp_E505.mat'</span>, <span class="org-string">'t'</span>, <span class="org-string">'u'</span>, <span class="org-string">'um'</span>, <span class="org-string">'y'</span>);
|
||||
@ -330,9 +211,9 @@ ht.y = ht.y <span class="org-type">-</span> mean(ht.y);
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org96481d0" class="outline-3">
|
||||
<h3 id="org96481d0"><span class="section-number-3">5.2</span> Comparison of the PSD with Huddle Test</h3>
|
||||
<div class="outline-text-3" id="text-5-2">
|
||||
<div id="outline-container-orga450ffc" class="outline-3">
|
||||
<h3 id="orga450ffc"><span class="section-number-3">4.2</span> Comparison of the PSD with Huddle Test</h3>
|
||||
<div class="outline-text-3" id="text-4-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">Ts = t(end)<span class="org-type">/</span>(length(t)<span class="org-type">-</span>1);
|
||||
Fs = 1<span class="org-type">/</span>Ts;
|
||||
@ -348,17 +229,17 @@ win = hanning(ceil(1<span class="org-type">*</span>Fs));
|
||||
</div>
|
||||
|
||||
|
||||
<div id="orgdd13db1" class="figure">
|
||||
<div id="orge6cd415" class="figure">
|
||||
<p><img src="figs/apa95ml_5kg_PI_pdf_comp_huddle.png" alt="apa95ml_5kg_PI_pdf_comp_huddle.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 10: </span>Comparison of the ASD for the identification test and the huddle test</p>
|
||||
<p><span class="figure-number">Figure 5: </span>Comparison of the ASD for the identification test and the huddle test</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org0d0f5af" class="outline-3">
|
||||
<h3 id="org0d0f5af"><span class="section-number-3">5.3</span> Compute TF estimate and Coherence</h3>
|
||||
<div class="outline-text-3" id="text-5-3">
|
||||
<div id="outline-container-orgc964fb2" class="outline-3">
|
||||
<h3 id="orgc964fb2"><span class="section-number-3">4.3</span> Compute TF estimate and Coherence</h3>
|
||||
<div class="outline-text-3" id="text-4-3">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">Ts = t(end)<span class="org-type">/</span>(length(t)<span class="org-type">-</span>1);
|
||||
Fs = 1<span class="org-type">/</span>Ts;
|
||||
@ -375,42 +256,42 @@ Fs = 1<span class="org-type">/</span>Ts;
|
||||
</div>
|
||||
|
||||
|
||||
<div id="orga4ba98f" class="figure">
|
||||
<div id="orgc5081fd" class="figure">
|
||||
<p><img src="figs/apa95ml_5kg_PI_coh.png" alt="apa95ml_5kg_PI_coh.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 11: </span>Coherence</p>
|
||||
<p><span class="figure-number">Figure 6: </span>Coherence</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="org565db50" class="figure">
|
||||
<div id="orgef956d1" class="figure">
|
||||
<p><img src="figs/apa95ml_5kg_PI_tf.png" alt="apa95ml_5kg_PI_tf.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 12: </span>Estimation of the transfer function from input voltage to displacement</p>
|
||||
<p><span class="figure-number">Figure 7: </span>Estimation of the transfer function from input voltage to displacement</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org3e6bc68" class="outline-3">
|
||||
<h3 id="org3e6bc68"><span class="section-number-3">5.4</span> Comparison with the FEM model</h3>
|
||||
<div class="outline-text-3" id="text-5-4">
|
||||
<div id="outline-container-orge2ba96a" class="outline-3">
|
||||
<h3 id="orge2ba96a"><span class="section-number-3">4.4</span> Comparison with the FEM model</h3>
|
||||
<div class="outline-text-3" id="text-4-4">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">load(<span class="org-string">'mat/fem_model_5kg.mat'</span>, <span class="org-string">'G'</span>);
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="org9580a6b" class="figure">
|
||||
<div id="org5df5018" class="figure">
|
||||
<p><img src="figs/apa95ml_5kg_pi_comp_fem.png" alt="apa95ml_5kg_pi_comp_fem.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 13: </span>Comparison of the identified transfer function and the one estimated from the FE model</p>
|
||||
<p><span class="figure-number">Figure 8: </span>Comparison of the identified transfer function and the one estimated from the FE model</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org97bbea0" class="outline-2">
|
||||
<h2 id="org97bbea0"><span class="section-number-2">6</span> Transfer function from force actuator to force sensor</h2>
|
||||
<div class="outline-text-2" id="text-6">
|
||||
<div id="outline-container-org1988c0d" class="outline-2">
|
||||
<h2 id="org1988c0d"><span class="section-number-2">5</span> Transfer function from force actuator to force sensor</h2>
|
||||
<div class="outline-text-2" id="text-5">
|
||||
<p>
|
||||
Two measurements are performed:
|
||||
</p>
|
||||
@ -456,7 +337,7 @@ Gfem_a_ss = exp(<span class="org-type">-</span>s<span class="org-type">/</span>1
|
||||
</pre>
|
||||
</div>
|
||||
<p>
|
||||
The transfer function from input voltage to output voltage are computed and shown in Figure <a href="#org23238ab">14</a>.
|
||||
The transfer function from input voltage to output voltage are computed and shown in Figure <a href="#orge6ce288">9</a>.
|
||||
</p>
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">Ts = a_ss.t(end)<span class="org-type">/</span>(length(a_ss.t)<span class="org-type">-</span>1);
|
||||
@ -473,16 +354,16 @@ win = hann(ceil(10<span class="org-type">/</span>Ts));
|
||||
</div>
|
||||
|
||||
|
||||
<div id="org23238ab" class="figure">
|
||||
<div id="orge6ce288" class="figure">
|
||||
<p><img src="figs/bode_plot_force_sensor_voltage_comp_fem.png" alt="bode_plot_force_sensor_voltage_comp_fem.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 14: </span>Comparison of the identified dynamics from voltage output to voltage input and the FEM</p>
|
||||
<p><span class="figure-number">Figure 9: </span>Comparison of the identified dynamics from voltage output to voltage input and the FEM</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org89a469b" class="outline-3">
|
||||
<h3 id="org89a469b"><span class="section-number-3">6.1</span> System Identification</h3>
|
||||
<div class="outline-text-3" id="text-6-1">
|
||||
<div id="outline-container-org037188e" class="outline-3">
|
||||
<h3 id="org037188e"><span class="section-number-3">5.1</span> System Identification</h3>
|
||||
<div class="outline-text-3" id="text-5-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">w_z = 2<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">*</span>111; <span class="org-comment">% Zeros frequency [rad/s]</span>
|
||||
w_p = 2<span class="org-type">*</span><span class="org-constant">pi</span><span class="org-type">*</span>255; <span class="org-comment">% Pole frequency [rad/s]</span>
|
||||
@ -495,35 +376,35 @@ Gi = G_inf<span class="org-type">*</span>(s<span class="org-type">^</span>2 <spa
|
||||
</div>
|
||||
|
||||
|
||||
<div id="org506d2b4" class="figure">
|
||||
<div id="orged1dc40" class="figure">
|
||||
<p><img src="figs/iff_plant_identification_apa95ml.png" alt="iff_plant_identification_apa95ml.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 15: </span>Identification of the IFF plant</p>
|
||||
<p><span class="figure-number">Figure 10: </span>Identification of the IFF plant</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="outline-container-org5101bab" class="outline-3">
|
||||
<h3 id="org5101bab"><span class="section-number-3">6.2</span> Integral Force Feedback</h3>
|
||||
<div class="outline-text-3" id="text-6-2">
|
||||
<div id="outline-container-org0a38226" class="outline-3">
|
||||
<h3 id="org0a38226"><span class="section-number-3">5.2</span> Integral Force Feedback</h3>
|
||||
<div class="outline-text-3" id="text-5-2">
|
||||
|
||||
<div id="orga196955" class="figure">
|
||||
<div id="org86c0c5b" class="figure">
|
||||
<p><img src="figs/root_locus_iff_apa95ml_identification.png" alt="root_locus_iff_apa95ml_identification.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 16: </span>Root Locus for IFF</p>
|
||||
<p><span class="figure-number">Figure 11: </span>Root Locus for IFF</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-orgea75537" class="outline-2">
|
||||
<h2 id="orgea75537"><span class="section-number-2">7</span> IFF Tests</h2>
|
||||
<div class="outline-text-2" id="text-7">
|
||||
<div id="outline-container-org5df0163" class="outline-2">
|
||||
<h2 id="org5df0163"><span class="section-number-2">6</span> IFF Tests</h2>
|
||||
<div class="outline-text-2" id="text-6">
|
||||
</div>
|
||||
<div id="outline-container-orgd2939f8" class="outline-3">
|
||||
<h3 id="orgd2939f8"><span class="section-number-3">7.1</span> First tests with few gains</h3>
|
||||
<div class="outline-text-3" id="text-7-1">
|
||||
<div id="outline-container-org26f64e8" class="outline-3">
|
||||
<h3 id="org26f64e8"><span class="section-number-3">6.1</span> First tests with few gains</h3>
|
||||
<div class="outline-text-3" id="text-6-1">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">iff_g10 = load(<span class="org-string">'./mat/apa95ml_iff_g10_res.mat'</span>, <span class="org-string">'u'</span>, <span class="org-string">'t'</span>, <span class="org-string">'y'</span>, <span class="org-string">'v'</span>);
|
||||
iff_g100 = load(<span class="org-string">'./mat/apa95ml_iff_g100_res.mat'</span>, <span class="org-string">'u'</span>, <span class="org-string">'t'</span>, <span class="org-string">'y'</span>, <span class="org-string">'v'</span>);
|
||||
@ -547,25 +428,25 @@ win = hann(ceil(10<span class="org-type">/</span>Ts));
|
||||
</div>
|
||||
|
||||
|
||||
<div id="org6ca73df" class="figure">
|
||||
<div id="org01c9bde" class="figure">
|
||||
<p><img src="figs/iff_first_test_coherence.png" alt="iff_first_test_coherence.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 17: </span>Coherence</p>
|
||||
<p><span class="figure-number">Figure 12: </span>Coherence</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="orgb430e51" class="figure">
|
||||
<div id="orgdcd9122" class="figure">
|
||||
<p><img src="figs/iff_first_test_bode_plot.png" alt="iff_first_test_bode_plot.png" />
|
||||
</p>
|
||||
<p><span class="figure-number">Figure 18: </span>Bode plot for different values of IFF gain</p>
|
||||
<p><span class="figure-number">Figure 13: </span>Bode plot for different values of IFF gain</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="outline-container-org7987703" class="outline-3">
|
||||
<h3 id="org7987703"><span class="section-number-3">7.2</span> Second test with many Gains</h3>
|
||||
<div class="outline-text-3" id="text-7-2">
|
||||
<div id="outline-container-orgda4dc48" class="outline-3">
|
||||
<h3 id="orgda4dc48"><span class="section-number-3">6.2</span> Second test with many Gains</h3>
|
||||
<div class="outline-text-3" id="text-6-2">
|
||||
<div class="org-src-container">
|
||||
<pre class="src src-matlab">load(<span class="org-string">'./mat/apa95ml_iff_test.mat'</span>, <span class="org-string">'results'</span>);
|
||||
</pre>
|
||||
@ -593,7 +474,7 @@ g_iff = [0, 1, 5, 10, 50, 100];
|
||||
</div>
|
||||
|
||||
|
||||
<div id="orgb6055a9" class="figure">
|
||||
<div id="org52a1b9d" class="figure">
|
||||
<p><img src="figs/iff_results_bode_plots.png" alt="iff_results_bode_plots.png" />
|
||||
</p>
|
||||
</div>
|
||||
@ -615,13 +496,13 @@ f_end = 500; <span class="org-comment">% [Hz]</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="orgf5bb2b0" class="figure">
|
||||
<div id="orga4ab0d0" class="figure">
|
||||
<p><img src="figs/iff_results_bode_plots_identification.png" alt="iff_results_bode_plots_identification.png" />
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="org4ef9435" class="figure">
|
||||
<div id="org9a011df" class="figure">
|
||||
<p><img src="figs/iff_results_root_locus.png" alt="iff_results_root_locus.png" />
|
||||
</p>
|
||||
</div>
|
||||
@ -631,7 +512,7 @@ f_end = 500; <span class="org-comment">% [Hz]</span>
|
||||
</div>
|
||||
<div id="postamble" class="status">
|
||||
<p class="author">Author: Dehaeze Thomas</p>
|
||||
<p class="date">Created: 2020-11-03 mar. 10:11</p>
|
||||
<p class="date">Created: 2020-11-12 jeu. 09:18</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -11,10 +11,9 @@
|
||||
|
||||
#+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/zenburn.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/jquery.stickytableheaders.min.js"></script>
|
||||
#+HTML_HEAD: <script type="text/javascript" src="./js/readtheorg.js"></script>
|
||||
|
||||
#+HTML_MATHJAX: align: center tagside: right font: TeX
|
||||
@ -160,7 +159,7 @@
|
||||
#+RESULTS:
|
||||
[[file:figs/huddle_test_pdf.png]]
|
||||
|
||||
* Transfer Function Estimation using the DAC as the driver
|
||||
* Transfer Function Estimation using the DAC as the driver :noexport:
|
||||
:PROPERTIES:
|
||||
:header-args:matlab+: :tangle matlab/tf_estimation.m
|
||||
:header-args:matlab+: :comments org :mkdirp yes
|
||||
|
1
js/jquery.stickytableheaders.min.js
vendored
1
js/jquery.stickytableheaders.min.js
vendored
@ -1 +0,0 @@
|
||||
!function(a,b){"use strict";function c(c,g){var h=this;h.$el=a(c),h.el=c,h.id=e++,h.$window=a(b),h.$document=a(document),h.$el.bind("destroyed",a.proxy(h.teardown,h)),h.$clonedHeader=null,h.$originalHeader=null,h.isSticky=!1,h.hasBeenSticky=!1,h.leftOffset=null,h.topOffset=null,h.init=function(){h.$el.each(function(){var b=a(this);b.css("padding",0),h.$originalHeader=a("thead:first",this),h.$clonedHeader=h.$originalHeader.clone(),b.trigger("clonedHeader."+d,[h.$clonedHeader]),h.$clonedHeader.addClass("tableFloatingHeader"),h.$clonedHeader.css("display","none"),h.$originalHeader.addClass("tableFloatingHeaderOriginal"),h.$originalHeader.after(h.$clonedHeader),h.$printStyle=a('<style type="text/css" media="print">.tableFloatingHeader{display:none !important;}.tableFloatingHeaderOriginal{position:static !important;}</style>'),a("head").append(h.$printStyle)}),h.setOptions(g),h.updateWidth(),h.toggleHeaders(),h.bind()},h.destroy=function(){h.$el.unbind("destroyed",h.teardown),h.teardown()},h.teardown=function(){h.isSticky&&h.$originalHeader.css("position","static"),a.removeData(h.el,"plugin_"+d),h.unbind(),h.$clonedHeader.remove(),h.$originalHeader.removeClass("tableFloatingHeaderOriginal"),h.$originalHeader.css("visibility","visible"),h.$printStyle.remove(),h.el=null,h.$el=null},h.bind=function(){h.$scrollableArea.on("scroll."+d,h.toggleHeaders),h.isWindowScrolling||(h.$window.on("scroll."+d+h.id,h.setPositionValues),h.$window.on("resize."+d+h.id,h.toggleHeaders)),h.$scrollableArea.on("resize."+d,h.toggleHeaders),h.$scrollableArea.on("resize."+d,h.updateWidth)},h.unbind=function(){h.$scrollableArea.off("."+d,h.toggleHeaders),h.isWindowScrolling||(h.$window.off("."+d+h.id,h.setPositionValues),h.$window.off("."+d+h.id,h.toggleHeaders)),h.$scrollableArea.off("."+d,h.updateWidth)},h.toggleHeaders=function(){h.$el&&h.$el.each(function(){var b,c=a(this),d=h.isWindowScrolling?isNaN(h.options.fixedOffset)?h.options.fixedOffset.outerHeight():h.options.fixedOffset:h.$scrollableArea.offset().top+(isNaN(h.options.fixedOffset)?0:h.options.fixedOffset),e=c.offset(),f=h.$scrollableArea.scrollTop()+d,g=h.$scrollableArea.scrollLeft(),i=h.isWindowScrolling?f>e.top:d>e.top,j=(h.isWindowScrolling?f:0)<e.top+c.height()-h.$clonedHeader.height()-(h.isWindowScrolling?0:d);i&&j?(b=e.left-g+h.options.leftOffset,h.$originalHeader.css({position:"fixed","margin-top":h.options.marginTop,left:b,"z-index":3}),h.leftOffset=b,h.topOffset=d,h.$clonedHeader.css("display",""),h.isSticky||(h.isSticky=!0,h.updateWidth()),h.setPositionValues()):h.isSticky&&(h.$originalHeader.css("position","static"),h.$clonedHeader.css("display","none"),h.isSticky=!1,h.resetWidth(a("td,th",h.$clonedHeader),a("td,th",h.$originalHeader)))})},h.setPositionValues=function(){var a=h.$window.scrollTop(),b=h.$window.scrollLeft();!h.isSticky||0>a||a+h.$window.height()>h.$document.height()||0>b||b+h.$window.width()>h.$document.width()||h.$originalHeader.css({top:h.topOffset-(h.isWindowScrolling?0:a),left:h.leftOffset-(h.isWindowScrolling?0:b)})},h.updateWidth=function(){if(h.isSticky){h.$originalHeaderCells||(h.$originalHeaderCells=a("th,td",h.$originalHeader)),h.$clonedHeaderCells||(h.$clonedHeaderCells=a("th,td",h.$clonedHeader));var b=h.getWidth(h.$clonedHeaderCells);h.setWidth(b,h.$clonedHeaderCells,h.$originalHeaderCells),h.$originalHeader.css("width",h.$clonedHeader.width())}},h.getWidth=function(c){var d=[];return c.each(function(c){var e,f=a(this);if("border-box"===f.css("box-sizing"))e=f[0].getBoundingClientRect().width;else{var g=a("th",h.$originalHeader);if("collapse"===g.css("border-collapse"))if(b.getComputedStyle)e=parseFloat(b.getComputedStyle(this,null).width);else{var i=parseFloat(f.css("padding-left")),j=parseFloat(f.css("padding-right")),k=parseFloat(f.css("border-width"));e=f.outerWidth()-i-j-k}else e=f.width()}d[c]=e}),d},h.setWidth=function(a,b,c){b.each(function(b){var d=a[b];c.eq(b).css({"min-width":d,"max-width":d})})},h.resetWidth=function(b,c){b.each(function(b){var d=a(this);c.eq(b).css({"min-width":d.css("min-width"),"max-width":d.css("max-width")})})},h.setOptions=function(c){h.options=a.extend({},f,c),h.$scrollableArea=a(h.options.scrollableArea),h.isWindowScrolling=h.$scrollableArea[0]===b},h.updateOptions=function(a){h.setOptions(a),h.unbind(),h.bind(),h.updateWidth(),h.toggleHeaders()},h.init()}var d="stickyTableHeaders",e=0,f={fixedOffset:0,leftOffset:0,marginTop:0,scrollableArea:b};a.fn[d]=function(b){return this.each(function(){var e=a.data(this,"plugin_"+d);e?"string"==typeof b?e[b].apply(e):e.updateOptions(b):"destroy"!==b&&a.data(this,"plugin_"+d,new c(this,b))})}}(jQuery,window);
|
@ -9,6 +9,8 @@ $(function() {
|
||||
$('.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() {
|
||||
|
Loading…
Reference in New Issue
Block a user