Compare commits
5 Commits
2a0b6be82f
...
c4584ed06e
Author | SHA1 | Date | |
---|---|---|---|
c4584ed06e | |||
acae193de0 | |||
9677b4d3c4 | |||
f32ff33474 | |||
7b5a3c521f |
@ -1,49 +0,0 @@
|
|||||||
.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'; }
|
|
145
css/htmlize.css
145
css/htmlize.css
@ -1,145 +0,0 @@
|
|||||||
.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; }
|
|
1108
css/readtheorg.css
1108
css/readtheorg.css
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 44 KiB |
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 118 KiB |
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 115 KiB |
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 37 KiB |
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 111 KiB |
265
index.html
265
index.html
@ -3,17 +3,17 @@
|
|||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||||
<head>
|
<head>
|
||||||
<!-- 2020-11-12 jeu. 09:18 -->
|
<!-- 2020-11-12 jeu. 09:29 -->
|
||||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||||
<title>Test Bench APA95ML</title>
|
<title>Test Bench APA95ML</title>
|
||||||
<meta name="generator" content="Org mode" />
|
<meta name="generator" content="Org mode" />
|
||||||
<meta name="author" content="Dehaeze Thomas" />
|
<meta name="author" content="Dehaeze Thomas" />
|
||||||
<link rel="stylesheet" type="text/css" href="./css/htmlize.css"/>
|
<link rel="stylesheet" type="text/css" href="https://research.tdehaeze.xyz/css/htmlize.css"/>
|
||||||
<link rel="stylesheet" type="text/css" href="./css/readtheorg.css"/>
|
<link rel="stylesheet" type="text/css" href="https://research.tdehaeze.xyz/css/readtheorg.css"/>
|
||||||
<link rel="stylesheet" type="text/css" href="./css/custom.css"/>
|
<link rel="stylesheet" type="text/css" href="https://research.tdehaeze.xyz/css/custom.css"/>
|
||||||
<script type="text/javascript" src="./js/jquery.min.js"></script>
|
<script type="text/javascript" src="https://research.tdehaeze.xyz/js/jquery.min.js"></script>
|
||||||
<script type="text/javascript" src="./js/bootstrap.min.js"></script>
|
<script type="text/javascript" src="https://research.tdehaeze.xyz/js/bootstrap.min.js"></script>
|
||||||
<script type="text/javascript" src="./js/readtheorg.js"></script>
|
<script type="text/javascript" src="https://research.tdehaeze.xyz/js/readtheorg.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="org-div-home-and-up">
|
<div id="org-div-home-and-up">
|
||||||
@ -26,42 +26,30 @@
|
|||||||
<h2>Table of Contents</h2>
|
<h2>Table of Contents</h2>
|
||||||
<div id="text-table-of-contents">
|
<div id="text-table-of-contents">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#orge1ce8ff">1. Setup</a>
|
<li><a href="#org90a334e">1. Huddle Test</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#org4f8d088">1.1. Parameters</a></li>
|
<li><a href="#org285da21">1.1. Time Domain Data</a></li>
|
||||||
<li><a href="#org92bcdf4">1.2. Filter White Noise</a></li>
|
<li><a href="#org5e1c721">1.2. PSD of Measurement Noise</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="#org17a026f">2. Run Experiment and Save Data</a>
|
<li><a href="#orgd37467e">2. Identification of the dynamics from actuator to displacement</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#org1b14494">2.1. Load Data</a></li>
|
<li><a href="#org9434b07">2.1. Load Data</a></li>
|
||||||
<li><a href="#org59026b4">2.2. Save Data</a></li>
|
<li><a href="#org1eba886">2.2. Comparison of the PSD with Huddle Test</a></li>
|
||||||
|
<li><a href="#orgcfe0cb7">2.3. Compute TF estimate and Coherence</a></li>
|
||||||
|
<li><a href="#org1cdc3bc">2.4. Comparison with the FEM model</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="#org1758121">3. Huddle Test</a>
|
<li><a href="#orgcce11f7">3. Identification of the dynamics from actuator to force sensor</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#org7fcc745">3.1. Time Domain Data</a></li>
|
<li><a href="#org48d4bd0">3.1. System Identification</a></li>
|
||||||
<li><a href="#org67ec115">3.2. PSD of Measurement Noise</a></li>
|
<li><a href="#orge58d929">3.2. Integral Force Feedback</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="#org3be6abe">4. Transfer Function Estimation using the PI Amplifier</a>
|
<li><a href="#orgfe5bc71">4. Integral Force Feedback</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#orgd263f64">4.1. Load Data</a></li>
|
<li><a href="#orgd854491">4.1. First tests with few gains</a></li>
|
||||||
<li><a href="#orga450ffc">4.2. Comparison of the PSD with Huddle Test</a></li>
|
<li><a href="#org899fef5">4.2. Second test with many Gains</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="#org1988c0d">5. Transfer function from force actuator to force sensor</a>
|
|
||||||
<ul>
|
|
||||||
<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="#org5df0163">6. IFF Tests</a>
|
|
||||||
<ul>
|
|
||||||
<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>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -69,90 +57,31 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="orgf655a68" class="figure">
|
<div id="org392f56d" class="figure">
|
||||||
<p><img src="figs/setup_picture.png" alt="setup_picture.png" />
|
<p><img src="figs/setup_picture.png" alt="setup_picture.png" />
|
||||||
</p>
|
</p>
|
||||||
<p><span class="figure-number">Figure 1: </span>Picture of the Setup</p>
|
<p><span class="figure-number">Figure 1: </span>Picture of the Setup</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="org9083f49" class="figure">
|
<div id="org6970f6d" class="figure">
|
||||||
<p><img src="figs/setup_zoom.png" alt="setup_zoom.png" />
|
<p><img src="figs/setup_zoom.png" alt="setup_zoom.png" />
|
||||||
</p>
|
</p>
|
||||||
<p><span class="figure-number">Figure 2: </span>Zoom on the APA</p>
|
<p><span class="figure-number">Figure 2: </span>Zoom on the APA</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-orge1ce8ff" class="outline-2">
|
<div id="outline-container-org90a334e" class="outline-2">
|
||||||
<h2 id="orge1ce8ff"><span class="section-number-2">1</span> Setup</h2>
|
<h2 id="org90a334e"><span class="section-number-2">1</span> Huddle Test</h2>
|
||||||
<div class="outline-text-2" id="text-1">
|
<div class="outline-text-2" id="text-1">
|
||||||
|
<p>
|
||||||
|
<a id="orga0e8ba1"></a>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="outline-container-org285da21" class="outline-3">
|
||||||
<div id="outline-container-org4f8d088" class="outline-3">
|
<h3 id="org285da21"><span class="section-number-3">1.1</span> Time Domain Data</h3>
|
||||||
<h3 id="org4f8d088"><span class="section-number-3">1.1</span> Parameters</h3>
|
|
||||||
<div class="outline-text-3" id="text-1-1">
|
<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;
|
|
||||||
</pre>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="outline-container-org92bcdf4" class="outline-3">
|
<div id="orgde9f524" class="figure">
|
||||||
<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);
|
|
||||||
|
|
||||||
Gz = c2d(Glpf, Ts, <span class="org-string">'tustin'</span>);
|
|
||||||
</pre>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<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-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;
|
|
||||||
</pre>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<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>
|
|
||||||
y = data(<span class="org-type">:</span>, 2); <span class="org-comment">% Output Displacement [m]</span>
|
|
||||||
t = data(<span class="org-type">:</span>, 3); <span class="org-comment">% Time [s]</span>
|
|
||||||
</pre>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="org-src-container">
|
|
||||||
<pre class="src src-matlab">save(<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>, <span class="org-string">'Glpf'</span>);
|
|
||||||
</pre>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<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-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="orge79b739" class="figure">
|
|
||||||
<p><img src="figs/huddle_test_time_domain.png" alt="huddle_test_time_domain.png" />
|
<p><img src="figs/huddle_test_time_domain.png" alt="huddle_test_time_domain.png" />
|
||||||
</p>
|
</p>
|
||||||
<p><span class="figure-number">Figure 3: </span>Measurement of the Mass displacement during Huddle Test</p>
|
<p><span class="figure-number">Figure 3: </span>Measurement of the Mass displacement during Huddle Test</p>
|
||||||
@ -160,9 +89,9 @@ t = data(<span class="org-type">:</span>, 3); <span class="org-comment">% Time [
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-org67ec115" class="outline-3">
|
<div id="outline-container-org5e1c721" class="outline-3">
|
||||||
<h3 id="org67ec115"><span class="section-number-3">3.2</span> PSD of Measurement Noise</h3>
|
<h3 id="org5e1c721"><span class="section-number-3">1.2</span> PSD of Measurement Noise</h3>
|
||||||
<div class="outline-text-3" id="text-3-2">
|
<div class="outline-text-3" id="text-1-2">
|
||||||
<div class="org-src-container">
|
<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);
|
<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;
|
Fs = 1<span class="org-type">/</span>Ts;
|
||||||
@ -177,7 +106,7 @@ win = hanning(ceil(1<span class="org-type">*</span>Fs));
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="org8f41c21" class="figure">
|
<div id="org71c1833" class="figure">
|
||||||
<p><img src="figs/huddle_test_pdf.png" alt="huddle_test_pdf.png" />
|
<p><img src="figs/huddle_test_pdf.png" alt="huddle_test_pdf.png" />
|
||||||
</p>
|
</p>
|
||||||
<p><span class="figure-number">Figure 4: </span>Amplitude Spectral Density of the Displacement during Huddle Test</p>
|
<p><span class="figure-number">Figure 4: </span>Amplitude Spectral Density of the Displacement during Huddle Test</p>
|
||||||
@ -186,16 +115,19 @@ win = hanning(ceil(1<span class="org-type">*</span>Fs));
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-org3be6abe" class="outline-2">
|
<div id="outline-container-orgd37467e" class="outline-2">
|
||||||
<h2 id="org3be6abe"><span class="section-number-2">4</span> Transfer Function Estimation using the PI Amplifier</h2>
|
<h2 id="orgd37467e"><span class="section-number-2">2</span> Identification of the dynamics from actuator to displacement</h2>
|
||||||
<div class="outline-text-2" id="text-4">
|
<div class="outline-text-2" id="text-2">
|
||||||
|
<p>
|
||||||
|
<a id="org7bb414b"></a>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div id="outline-container-orgd263f64" class="outline-3">
|
<div id="outline-container-org9434b07" class="outline-3">
|
||||||
<h3 id="orgd263f64"><span class="section-number-3">4.1</span> Load Data</h3>
|
<h3 id="org9434b07"><span class="section-number-3">2.1</span> Load Data</h3>
|
||||||
<div class="outline-text-3" id="text-4-1">
|
<div class="outline-text-3" id="text-2-1">
|
||||||
<div class="org-src-container">
|
<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>);
|
<pre class="src src-matlab">ht = load(<span class="org-string">'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>);
|
load(<span class="org-string">'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>);
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -211,9 +143,9 @@ ht.y = ht.y <span class="org-type">-</span> mean(ht.y);
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-orga450ffc" class="outline-3">
|
<div id="outline-container-org1eba886" class="outline-3">
|
||||||
<h3 id="orga450ffc"><span class="section-number-3">4.2</span> Comparison of the PSD with Huddle Test</h3>
|
<h3 id="org1eba886"><span class="section-number-3">2.2</span> Comparison of the PSD with Huddle Test</h3>
|
||||||
<div class="outline-text-3" id="text-4-2">
|
<div class="outline-text-3" id="text-2-2">
|
||||||
<div class="org-src-container">
|
<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);
|
<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;
|
Fs = 1<span class="org-type">/</span>Ts;
|
||||||
@ -229,7 +161,7 @@ win = hanning(ceil(1<span class="org-type">*</span>Fs));
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="orge6cd415" class="figure">
|
<div id="orgd9832c1" class="figure">
|
||||||
<p><img src="figs/apa95ml_5kg_PI_pdf_comp_huddle.png" alt="apa95ml_5kg_PI_pdf_comp_huddle.png" />
|
<p><img src="figs/apa95ml_5kg_PI_pdf_comp_huddle.png" alt="apa95ml_5kg_PI_pdf_comp_huddle.png" />
|
||||||
</p>
|
</p>
|
||||||
<p><span class="figure-number">Figure 5: </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>
|
||||||
@ -237,9 +169,9 @@ win = hanning(ceil(1<span class="org-type">*</span>Fs));
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-orgc964fb2" class="outline-3">
|
<div id="outline-container-orgcfe0cb7" class="outline-3">
|
||||||
<h3 id="orgc964fb2"><span class="section-number-3">4.3</span> Compute TF estimate and Coherence</h3>
|
<h3 id="orgcfe0cb7"><span class="section-number-3">2.3</span> Compute TF estimate and Coherence</h3>
|
||||||
<div class="outline-text-3" id="text-4-3">
|
<div class="outline-text-3" id="text-2-3">
|
||||||
<div class="org-src-container">
|
<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);
|
<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;
|
Fs = 1<span class="org-type">/</span>Ts;
|
||||||
@ -256,14 +188,14 @@ Fs = 1<span class="org-type">/</span>Ts;
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="orgc5081fd" class="figure">
|
<div id="orgcd90594" class="figure">
|
||||||
<p><img src="figs/apa95ml_5kg_PI_coh.png" alt="apa95ml_5kg_PI_coh.png" />
|
<p><img src="figs/apa95ml_5kg_PI_coh.png" alt="apa95ml_5kg_PI_coh.png" />
|
||||||
</p>
|
</p>
|
||||||
<p><span class="figure-number">Figure 6: </span>Coherence</p>
|
<p><span class="figure-number">Figure 6: </span>Coherence</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="orgef956d1" class="figure">
|
<div id="org55f5177" class="figure">
|
||||||
<p><img src="figs/apa95ml_5kg_PI_tf.png" alt="apa95ml_5kg_PI_tf.png" />
|
<p><img src="figs/apa95ml_5kg_PI_tf.png" alt="apa95ml_5kg_PI_tf.png" />
|
||||||
</p>
|
</p>
|
||||||
<p><span class="figure-number">Figure 7: </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>
|
||||||
@ -271,16 +203,16 @@ Fs = 1<span class="org-type">/</span>Ts;
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-orge2ba96a" class="outline-3">
|
<div id="outline-container-org1cdc3bc" class="outline-3">
|
||||||
<h3 id="orge2ba96a"><span class="section-number-3">4.4</span> Comparison with the FEM model</h3>
|
<h3 id="org1cdc3bc"><span class="section-number-3">2.4</span> Comparison with the FEM model</h3>
|
||||||
<div class="outline-text-3" id="text-4-4">
|
<div class="outline-text-3" id="text-2-4">
|
||||||
<div class="org-src-container">
|
<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 class="src src-matlab">load(<span class="org-string">'fem_model_5kg.mat'</span>, <span class="org-string">'G'</span>);
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="org5df5018" class="figure">
|
<div id="org7e7ad3c" class="figure">
|
||||||
<p><img src="figs/apa95ml_5kg_pi_comp_fem.png" alt="apa95ml_5kg_pi_comp_fem.png" />
|
<p><img src="figs/apa95ml_5kg_pi_comp_fem.png" alt="apa95ml_5kg_pi_comp_fem.png" />
|
||||||
</p>
|
</p>
|
||||||
<p><span class="figure-number">Figure 8: </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>
|
||||||
@ -289,9 +221,12 @@ Fs = 1<span class="org-type">/</span>Ts;
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-org1988c0d" class="outline-2">
|
<div id="outline-container-orgcce11f7" class="outline-2">
|
||||||
<h2 id="org1988c0d"><span class="section-number-2">5</span> Transfer function from force actuator to force sensor</h2>
|
<h2 id="orgcce11f7"><span class="section-number-2">3</span> Identification of the dynamics from actuator to force sensor</h2>
|
||||||
<div class="outline-text-2" id="text-5">
|
<div class="outline-text-2" id="text-3">
|
||||||
|
<p>
|
||||||
|
<a id="org7d9ec69"></a>
|
||||||
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Two measurements are performed:
|
Two measurements are performed:
|
||||||
</p>
|
</p>
|
||||||
@ -307,9 +242,9 @@ The obtained dynamics from force actuator to force sensor are compare with the F
|
|||||||
The data are loaded:
|
The data are loaded:
|
||||||
</p>
|
</p>
|
||||||
<div class="org-src-container">
|
<div class="org-src-container">
|
||||||
<pre class="src src-matlab">a_ss = load(<span class="org-string">'mat/apa95ml_5kg_1a_2s.mat'</span>, <span class="org-string">'t'</span>, <span class="org-string">'u'</span>, <span class="org-string">'y'</span>, <span class="org-string">'v'</span>);
|
<pre class="src src-matlab">a_ss = load(<span class="org-string">'apa95ml_5kg_1a_2s.mat'</span>, <span class="org-string">'t'</span>, <span class="org-string">'u'</span>, <span class="org-string">'y'</span>, <span class="org-string">'v'</span>);
|
||||||
aa_s = load(<span class="org-string">'mat/apa95ml_5kg_2a_1s.mat'</span>, <span class="org-string">'t'</span>, <span class="org-string">'u'</span>, <span class="org-string">'y'</span>, <span class="org-string">'v'</span>);
|
aa_s = load(<span class="org-string">'apa95ml_5kg_2a_1s.mat'</span>, <span class="org-string">'t'</span>, <span class="org-string">'u'</span>, <span class="org-string">'y'</span>, <span class="org-string">'v'</span>);
|
||||||
load(<span class="org-string">'mat/G_force_sensor_5kg.mat'</span>, <span class="org-string">'G'</span>);
|
load(<span class="org-string">'G_force_sensor_5kg.mat'</span>, <span class="org-string">'G'</span>);
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
<p>
|
<p>
|
||||||
@ -337,7 +272,7 @@ Gfem_a_ss = exp(<span class="org-type">-</span>s<span class="org-type">/</span>1
|
|||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
<p>
|
<p>
|
||||||
The transfer function from input voltage to output voltage are computed and shown in Figure <a href="#orge6ce288">9</a>.
|
The transfer function from input voltage to output voltage are computed and shown in Figure <a href="#org93e238f">9</a>.
|
||||||
</p>
|
</p>
|
||||||
<div class="org-src-container">
|
<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);
|
<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);
|
||||||
@ -354,16 +289,15 @@ win = hann(ceil(10<span class="org-type">/</span>Ts));
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="orge6ce288" class="figure">
|
<div id="org93e238f" class="figure">
|
||||||
<p><img src="figs/bode_plot_force_sensor_voltage_comp_fem.png" alt="bode_plot_force_sensor_voltage_comp_fem.png" />
|
<p><img src="figs/bode_plot_force_sensor_voltage_comp_fem.png" alt="bode_plot_force_sensor_voltage_comp_fem.png" />
|
||||||
</p>
|
</p>
|
||||||
<p><span class="figure-number">Figure 9: </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>
|
</div>
|
||||||
|
<div id="outline-container-org48d4bd0" class="outline-3">
|
||||||
<div id="outline-container-org037188e" class="outline-3">
|
<h3 id="org48d4bd0"><span class="section-number-3">3.1</span> System Identification</h3>
|
||||||
<h3 id="org037188e"><span class="section-number-3">5.1</span> System Identification</h3>
|
<div class="outline-text-3" id="text-3-1">
|
||||||
<div class="outline-text-3" id="text-5-1">
|
|
||||||
<div class="org-src-container">
|
<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>
|
<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>
|
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>
|
||||||
@ -376,7 +310,7 @@ Gi = G_inf<span class="org-type">*</span>(s<span class="org-type">^</span>2 <spa
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="orged1dc40" class="figure">
|
<div id="orga3e3e7b" class="figure">
|
||||||
<p><img src="figs/iff_plant_identification_apa95ml.png" alt="iff_plant_identification_apa95ml.png" />
|
<p><img src="figs/iff_plant_identification_apa95ml.png" alt="iff_plant_identification_apa95ml.png" />
|
||||||
</p>
|
</p>
|
||||||
<p><span class="figure-number">Figure 10: </span>Identification of the IFF plant</p>
|
<p><span class="figure-number">Figure 10: </span>Identification of the IFF plant</p>
|
||||||
@ -385,11 +319,11 @@ Gi = G_inf<span class="org-type">*</span>(s<span class="org-type">^</span>2 <spa
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="outline-container-org0a38226" class="outline-3">
|
<div id="outline-container-orge58d929" class="outline-3">
|
||||||
<h3 id="org0a38226"><span class="section-number-3">5.2</span> Integral Force Feedback</h3>
|
<h3 id="orge58d929"><span class="section-number-3">3.2</span> Integral Force Feedback</h3>
|
||||||
<div class="outline-text-3" id="text-5-2">
|
<div class="outline-text-3" id="text-3-2">
|
||||||
|
|
||||||
<div id="org86c0c5b" class="figure">
|
<div id="org55e0695" class="figure">
|
||||||
<p><img src="figs/root_locus_iff_apa95ml_identification.png" alt="root_locus_iff_apa95ml_identification.png" />
|
<p><img src="figs/root_locus_iff_apa95ml_identification.png" alt="root_locus_iff_apa95ml_identification.png" />
|
||||||
</p>
|
</p>
|
||||||
<p><span class="figure-number">Figure 11: </span>Root Locus for IFF</p>
|
<p><span class="figure-number">Figure 11: </span>Root Locus for IFF</p>
|
||||||
@ -398,17 +332,20 @@ Gi = G_inf<span class="org-type">*</span>(s<span class="org-type">^</span>2 <spa
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-org5df0163" class="outline-2">
|
<div id="outline-container-orgfe5bc71" class="outline-2">
|
||||||
<h2 id="org5df0163"><span class="section-number-2">6</span> IFF Tests</h2>
|
<h2 id="orgfe5bc71"><span class="section-number-2">4</span> Integral Force Feedback</h2>
|
||||||
<div class="outline-text-2" id="text-6">
|
<div class="outline-text-2" id="text-4">
|
||||||
|
<p>
|
||||||
|
<a id="org9e016b1"></a>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div id="outline-container-org26f64e8" class="outline-3">
|
<div id="outline-container-orgd854491" class="outline-3">
|
||||||
<h3 id="org26f64e8"><span class="section-number-3">6.1</span> First tests with few gains</h3>
|
<h3 id="orgd854491"><span class="section-number-3">4.1</span> First tests with few gains</h3>
|
||||||
<div class="outline-text-3" id="text-6-1">
|
<div class="outline-text-3" id="text-4-1">
|
||||||
<div class="org-src-container">
|
<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>);
|
<pre class="src src-matlab">iff_g10 = load(<span class="org-string">'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>);
|
iff_g100 = load(<span class="org-string">'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>);
|
||||||
iff_of = load(<span class="org-string">'./mat/apa95ml_iff_off_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_of = load(<span class="org-string">'apa95ml_iff_off_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>);
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -428,7 +365,7 @@ win = hann(ceil(10<span class="org-type">/</span>Ts));
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="org01c9bde" class="figure">
|
<div id="org2c6892b" class="figure">
|
||||||
<p><img src="figs/iff_first_test_coherence.png" alt="iff_first_test_coherence.png" />
|
<p><img src="figs/iff_first_test_coherence.png" alt="iff_first_test_coherence.png" />
|
||||||
</p>
|
</p>
|
||||||
<p><span class="figure-number">Figure 12: </span>Coherence</p>
|
<p><span class="figure-number">Figure 12: </span>Coherence</p>
|
||||||
@ -436,7 +373,7 @@ win = hann(ceil(10<span class="org-type">/</span>Ts));
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div id="orgdcd9122" class="figure">
|
<div id="org91fa41a" class="figure">
|
||||||
<p><img src="figs/iff_first_test_bode_plot.png" alt="iff_first_test_bode_plot.png" />
|
<p><img src="figs/iff_first_test_bode_plot.png" alt="iff_first_test_bode_plot.png" />
|
||||||
</p>
|
</p>
|
||||||
<p><span class="figure-number">Figure 13: </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>
|
||||||
@ -444,11 +381,11 @@ win = hann(ceil(10<span class="org-type">/</span>Ts));
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="outline-container-orgda4dc48" class="outline-3">
|
<div id="outline-container-org899fef5" class="outline-3">
|
||||||
<h3 id="orgda4dc48"><span class="section-number-3">6.2</span> Second test with many Gains</h3>
|
<h3 id="org899fef5"><span class="section-number-3">4.2</span> Second test with many Gains</h3>
|
||||||
<div class="outline-text-3" id="text-6-2">
|
<div class="outline-text-3" id="text-4-2">
|
||||||
<div class="org-src-container">
|
<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 class="src src-matlab">load(<span class="org-string">'apa95ml_iff_test.mat'</span>, <span class="org-string">'results'</span>);
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -474,7 +411,7 @@ g_iff = [0, 1, 5, 10, 50, 100];
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="org52a1b9d" class="figure">
|
<div id="orgcf10be1" class="figure">
|
||||||
<p><img src="figs/iff_results_bode_plots.png" alt="iff_results_bode_plots.png" />
|
<p><img src="figs/iff_results_bode_plots.png" alt="iff_results_bode_plots.png" />
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -496,13 +433,13 @@ f_end = 500; <span class="org-comment">% [Hz]</span>
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="orga4ab0d0" class="figure">
|
<div id="orgda781ba" class="figure">
|
||||||
<p><img src="figs/iff_results_bode_plots_identification.png" alt="iff_results_bode_plots_identification.png" />
|
<p><img src="figs/iff_results_bode_plots_identification.png" alt="iff_results_bode_plots_identification.png" />
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="org9a011df" class="figure">
|
<div id="org473937a" class="figure">
|
||||||
<p><img src="figs/iff_results_root_locus.png" alt="iff_results_root_locus.png" />
|
<p><img src="figs/iff_results_root_locus.png" alt="iff_results_root_locus.png" />
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -512,7 +449,7 @@ f_end = 500; <span class="org-comment">% [Hz]</span>
|
|||||||
</div>
|
</div>
|
||||||
<div id="postamble" class="status">
|
<div id="postamble" class="status">
|
||||||
<p class="author">Author: Dehaeze Thomas</p>
|
<p class="author">Author: Dehaeze Thomas</p>
|
||||||
<p class="date">Created: 2020-11-12 jeu. 09:18</p>
|
<p class="date">Created: 2020-11-12 jeu. 09:29</p>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
316
index.org
316
index.org
@ -7,14 +7,14 @@
|
|||||||
#+AUTHOR: Dehaeze Thomas
|
#+AUTHOR: Dehaeze Thomas
|
||||||
|
|
||||||
#+HTML_LINK_HOME: ../index.html
|
#+HTML_LINK_HOME: ../index.html
|
||||||
#+HTML_LINK_UP: ../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="https://research.tdehaeze.xyz/css/htmlize.css"/>
|
||||||
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="./css/readtheorg.css"/>
|
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="https://research.tdehaeze.xyz/css/readtheorg.css"/>
|
||||||
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="./css/custom.css"/>
|
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="https://research.tdehaeze.xyz/css/custom.css"/>
|
||||||
#+HTML_HEAD: <script type="text/javascript" src="./js/jquery.min.js"></script>
|
#+HTML_HEAD: <script type="text/javascript" src="https://research.tdehaeze.xyz/js/jquery.min.js"></script>
|
||||||
#+HTML_HEAD: <script type="text/javascript" src="./js/bootstrap.min.js"></script>
|
#+HTML_HEAD: <script type="text/javascript" src="https://research.tdehaeze.xyz/js/bootstrap.min.js"></script>
|
||||||
#+HTML_HEAD: <script type="text/javascript" src="./js/readtheorg.js"></script>
|
#+HTML_HEAD: <script type="text/javascript" src="https://research.tdehaeze.xyz/js/readtheorg.js"></script>
|
||||||
|
|
||||||
#+HTML_MATHJAX: align: center tagside: right font: TeX
|
#+HTML_MATHJAX: align: center tagside: right font: TeX
|
||||||
|
|
||||||
@ -28,16 +28,6 @@
|
|||||||
#+PROPERTY: header-args:matlab+ :mkdirp yes
|
#+PROPERTY: header-args:matlab+ :mkdirp yes
|
||||||
|
|
||||||
#+PROPERTY: header-args:shell :eval no-export
|
#+PROPERTY: header-args:shell :eval no-export
|
||||||
|
|
||||||
#+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
|
|
||||||
:END:
|
:END:
|
||||||
|
|
||||||
* Introduction :ignore:
|
* Introduction :ignore:
|
||||||
@ -50,52 +40,13 @@
|
|||||||
#+caption: Zoom on the APA
|
#+caption: Zoom on the APA
|
||||||
[[file:figs/setup_zoom.png]]
|
[[file:figs/setup_zoom.png]]
|
||||||
|
|
||||||
* Setup
|
|
||||||
:PROPERTIES:
|
|
||||||
:header-args:matlab+: :tangle matlab/setup_experiment.m
|
|
||||||
:header-args:matlab+: :comments org :mkdirp yes
|
|
||||||
:END:
|
|
||||||
|
|
||||||
** Parameters
|
|
||||||
#+begin_src matlab
|
|
||||||
Ts = 1e-4;
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
** Filter White Noise
|
|
||||||
#+begin_src matlab
|
|
||||||
Glpf = 1/(1 + s/2/pi/500);
|
|
||||||
|
|
||||||
Gz = c2d(Glpf, Ts, 'tustin');
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
* Run Experiment and Save Data
|
|
||||||
:PROPERTIES:
|
|
||||||
:header-args:matlab+: :tangle matlab/run_experiment.m
|
|
||||||
:header-args:matlab+: :comments org :mkdirp yes
|
|
||||||
:END:
|
|
||||||
|
|
||||||
** Load Data
|
|
||||||
#+begin_src matlab
|
|
||||||
data = SimulinkRealTime.utils.getFileScopeData('data/apa95ml.dat').data;
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
** Save Data
|
|
||||||
#+begin_src matlab
|
|
||||||
u = data(:, 1); % Input Voltage [V]
|
|
||||||
y = data(:, 2); % Output Displacement [m]
|
|
||||||
t = data(:, 3); % Time [s]
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+begin_src matlab
|
|
||||||
save('./mat/huddle_test.mat', 't', 'u', 'y', 'Glpf');
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
* Huddle Test
|
* Huddle Test
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:header-args:matlab+: :tangle matlab/huddle_test.m
|
:header-args:matlab+: :tangle matlab/huddle_test.m
|
||||||
:header-args:matlab+: :comments org :mkdirp yes
|
:header-args:matlab+: :comments org :mkdirp yes
|
||||||
:END:
|
:END:
|
||||||
|
<<sec:huddle_test>>
|
||||||
|
** Introduction :ignore:
|
||||||
** Matlab Init :noexport: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)
|
#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
|
||||||
<<matlab-dir>>
|
<<matlab-dir>>
|
||||||
@ -105,9 +56,17 @@
|
|||||||
<<matlab-init>>
|
<<matlab-init>>
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src matlab :tangle no
|
||||||
|
addpath('./matlab/mat/');
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src matlab :eval no
|
||||||
|
addpath('./mat/');
|
||||||
|
#+end_src
|
||||||
|
|
||||||
** Load Data :noexport:
|
** Load Data :noexport:
|
||||||
#+begin_src matlab
|
#+begin_src matlab
|
||||||
load('./mat/huddle_test.mat', 't', 'y');
|
load('huddle_test.mat', 't', 'y');
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src matlab
|
#+begin_src matlab
|
||||||
@ -159,17 +118,13 @@
|
|||||||
#+RESULTS:
|
#+RESULTS:
|
||||||
[[file:figs/huddle_test_pdf.png]]
|
[[file:figs/huddle_test_pdf.png]]
|
||||||
|
|
||||||
* Transfer Function Estimation using the DAC as the driver :noexport:
|
* Identification of the dynamics from actuator to displacement
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:header-args:matlab+: :tangle matlab/tf_estimation.m
|
:header-args:matlab+: :tangle matlab/motion_identification.m
|
||||||
:header-args:matlab+: :comments org :mkdirp yes
|
:header-args:matlab+: :comments org :mkdirp yes
|
||||||
:END:
|
:END:
|
||||||
|
<<sec:motion_identification>>
|
||||||
** Introduction :ignore:
|
** Introduction :ignore:
|
||||||
#+begin_important
|
|
||||||
Results presented in this sections are wrong as the ADC cannot deliver enought current to the piezoelectric actuator.
|
|
||||||
#+end_important
|
|
||||||
|
|
||||||
** Matlab Init :noexport: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)
|
#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
|
||||||
<<matlab-dir>>
|
<<matlab-dir>>
|
||||||
@ -179,188 +134,18 @@ Results presented in this sections are wrong as the ADC cannot deliver enought c
|
|||||||
<<matlab-init>>
|
<<matlab-init>>
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Load Data :noexport:
|
#+begin_src matlab :tangle no
|
||||||
#+begin_src matlab
|
addpath('./matlab/mat/');
|
||||||
ht = load('./mat/huddle_test.mat', 't', 'u', 'y');
|
|
||||||
load('./mat/apa95ml_5kg_10V.mat', 't', 'u', 'y');
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Time Domain Data
|
#+begin_src matlab :eval no
|
||||||
#+begin_src matlab :exports none
|
addpath('./mat/');
|
||||||
figure;
|
|
||||||
|
|
||||||
subplot(1,2,1);
|
|
||||||
plot(t, u)
|
|
||||||
ylabel('Input Voltage [V]'); xlabel('Time [s]');
|
|
||||||
|
|
||||||
|
|
||||||
subplot(1,2,2);
|
|
||||||
plot(t, y)
|
|
||||||
ylabel('Output Displacement [m]'); xlabel('Time [s]');
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+begin_src matlab :tangle no :exports results :results file replace
|
|
||||||
exportFig('figs/apa95ml_5kg_10V_time_domain.pdf', 'width', 'full', 'height', 'tall');
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+name: fig:apa95ml_5kg_10V_time_domain
|
|
||||||
#+caption: Time domain signals during the test
|
|
||||||
#+RESULTS:
|
|
||||||
[[file:figs/apa95ml_5kg_10V_time_domain.png]]
|
|
||||||
|
|
||||||
** Comparison of the PSD with Huddle Test
|
|
||||||
#+begin_src matlab
|
|
||||||
Ts = t(end)/(length(t)-1);
|
|
||||||
Fs = 1/Ts;
|
|
||||||
|
|
||||||
win = hanning(ceil(1*Fs));
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+begin_src matlab
|
|
||||||
[pxx, f] = pwelch(y, win, [], [], Fs);
|
|
||||||
[pht, ~] = pwelch(ht.y, win, [], [], Fs);
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+begin_src matlab :exports none
|
|
||||||
figure;
|
|
||||||
hold on;
|
|
||||||
plot(f, sqrt(pxx), 'DisplayName', '5kg');
|
|
||||||
plot(f, sqrt(pht), 'DisplayName', 'Huddle Test');
|
|
||||||
hold off;
|
|
||||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
|
||||||
xlabel('Frequency [Hz]'); ylabel('ASD [$m/\sqrt{Hz}$]');
|
|
||||||
legend('location', 'northeast');
|
|
||||||
xlim([1, Fs/2]);
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+begin_src matlab :tangle no :exports results :results file replace
|
|
||||||
exportFig('figs/apa95ml_5kg_10V_pdf_comp_huddle.pdf', 'width', 'wide', 'height', 'tall');
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+name: fig:apa95ml_5kg_10V_pdf_comp_huddle
|
|
||||||
#+caption: Comparison of the ASD for the identification test and the huddle test
|
|
||||||
#+RESULTS:
|
|
||||||
[[file:figs/apa95ml_5kg_10V_pdf_comp_huddle.png]]
|
|
||||||
|
|
||||||
** Compute TF estimate and Coherence
|
|
||||||
#+begin_src matlab
|
|
||||||
Ts = t(end)/(length(t)-1);
|
|
||||||
Fs = 1/Ts;
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+begin_src matlab
|
|
||||||
win = hann(ceil(1/Ts));
|
|
||||||
|
|
||||||
[tf_est, f] = tfestimate(u, -y, win, [], [], 1/Ts);
|
|
||||||
[co_est, ~] = mscohere( u, -y, win, [], [], 1/Ts);
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+begin_src matlab :exports none
|
|
||||||
figure;
|
|
||||||
|
|
||||||
hold on;
|
|
||||||
plot(f, co_est, 'k-')
|
|
||||||
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'lin');
|
|
||||||
ylabel('Coherence'); xlabel('Frequency [Hz]');
|
|
||||||
hold off;
|
|
||||||
xlim([10, 5e3]);
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+begin_src matlab :tangle no :exports results :results file replace
|
|
||||||
exportFig('figs/apa95ml_5kg_10V_coh.pdf', 'width', 'wide', 'height', 'normal');
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+name: fig:apa95ml_5kg_10V_coh
|
|
||||||
#+caption: Coherence
|
|
||||||
#+RESULTS:
|
|
||||||
[[file:figs/apa95ml_5kg_10V_coh.png]]
|
|
||||||
|
|
||||||
#+begin_src matlab :exports none
|
|
||||||
figure;
|
|
||||||
ax1 = subplot(2, 1, 1);
|
|
||||||
hold on;
|
|
||||||
plot(f, abs(tf_est), 'k-')
|
|
||||||
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
|
|
||||||
ylabel('Amplitude'); xlabel('Frequency [Hz]');
|
|
||||||
hold off;
|
|
||||||
|
|
||||||
ax2 = subplot(2, 1, 2);
|
|
||||||
hold on;
|
|
||||||
plot(f, 180/pi*angle(tf_est), 'k-')
|
|
||||||
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'lin');
|
|
||||||
ylabel('Phase'); xlabel('Frequency [Hz]');
|
|
||||||
hold off;
|
|
||||||
|
|
||||||
linkaxes([ax1,ax2], 'x');
|
|
||||||
xlim([10, 5e3]);
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+begin_src matlab :tangle no :exports results :results file replace
|
|
||||||
exportFig('figs/apa95ml_5kg_10V_tf.pdf', 'width', 'full', 'height', 'full');
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+name: fig:apa95ml_5kg_10V_tf
|
|
||||||
#+caption: Estimation of the transfer function from input voltage to displacement
|
|
||||||
#+RESULTS:
|
|
||||||
[[file:figs/apa95ml_5kg_10V_tf.png]]
|
|
||||||
|
|
||||||
** Comparison with the FEM model
|
|
||||||
#+begin_src matlab
|
|
||||||
load('mat/fem_model_5kg.mat', 'Ghm');
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+begin_src matlab :exports none
|
|
||||||
figure;
|
|
||||||
ax1 = subplot(2, 1, 1);
|
|
||||||
hold on;
|
|
||||||
plot(f, abs(tf_est), 'DisplayName', 'Identification')
|
|
||||||
plot(f, abs(squeeze(freqresp(Ghm, f, 'Hz'))), 'DisplayName', 'FEM')
|
|
||||||
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
|
|
||||||
ylabel('Amplitude'); xlabel('Frequency [Hz]');
|
|
||||||
legend('location', 'northeast')
|
|
||||||
hold off;
|
|
||||||
|
|
||||||
ax2 = subplot(2, 1, 2);
|
|
||||||
hold on;
|
|
||||||
plot(f, 180/pi*angle(tf_est))
|
|
||||||
plot(f, 180/pi*angle(squeeze(freqresp(Ghm, f, 'Hz'))))
|
|
||||||
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'lin');
|
|
||||||
ylabel('Phase'); xlabel('Frequency [Hz]');
|
|
||||||
hold off;
|
|
||||||
|
|
||||||
linkaxes([ax1,ax2], 'x');
|
|
||||||
xlim([10, 5e3]);
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+begin_src matlab :tangle no :exports results :results file replace
|
|
||||||
exportFig('figs/apa95ml_5kg_comp_fem.pdf', 'width', 'full', 'height', 'full');
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
#+name: fig:apa95ml_5kg_comp_fem
|
|
||||||
#+caption: Comparison of the identified transfer function and the one estimated from the FE model
|
|
||||||
#+RESULTS:
|
|
||||||
[[file:figs/apa95ml_5kg_comp_fem.png]]
|
|
||||||
|
|
||||||
** Conclusion :ignore:
|
|
||||||
#+begin_important
|
|
||||||
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.
|
|
||||||
#+end_important
|
|
||||||
|
|
||||||
* Transfer Function Estimation using the PI Amplifier
|
|
||||||
** 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
|
#+end_src
|
||||||
|
|
||||||
** Load Data
|
** Load Data
|
||||||
#+begin_src matlab
|
#+begin_src matlab
|
||||||
ht = load('./mat/huddle_test.mat', 't', 'u', 'y');
|
ht = load('huddle_test.mat', 't', 'u', 'y');
|
||||||
load('./mat/apa95ml_5kg_Amp_E505.mat', 't', 'u', 'um', 'y');
|
load('apa95ml_5kg_Amp_E505.mat', 't', 'u', 'um', 'y');
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src matlab
|
#+begin_src matlab
|
||||||
@ -476,7 +261,7 @@ In the next section, a current amplifier is used.
|
|||||||
|
|
||||||
** Comparison with the FEM model
|
** Comparison with the FEM model
|
||||||
#+begin_src matlab
|
#+begin_src matlab
|
||||||
load('mat/fem_model_5kg.mat', 'G');
|
load('fem_model_5kg.mat', 'G');
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src matlab :exports none
|
#+begin_src matlab :exports none
|
||||||
@ -514,7 +299,12 @@ In the next section, a current amplifier is used.
|
|||||||
#+RESULTS:
|
#+RESULTS:
|
||||||
[[file:figs/apa95ml_5kg_pi_comp_fem.png]]
|
[[file:figs/apa95ml_5kg_pi_comp_fem.png]]
|
||||||
|
|
||||||
* Transfer function from force actuator to force sensor
|
* Identification of the dynamics from actuator to force sensor
|
||||||
|
:PROPERTIES:
|
||||||
|
:header-args:matlab+: :tangle matlab/force_sensor_identification.m
|
||||||
|
:header-args:matlab+: :comments org :mkdirp yes
|
||||||
|
:END:
|
||||||
|
<<sec:force_sensor_identification>>
|
||||||
** Introduction :ignore:
|
** Introduction :ignore:
|
||||||
Two measurements are performed:
|
Two measurements are performed:
|
||||||
- Speedgoat DAC => Voltage Amplifier (x20) => 1 Piezo Stack => ... => 2 Stacks as Force Sensor (parallel) => Speedgoat ADC
|
- Speedgoat DAC => Voltage Amplifier (x20) => 1 Piezo Stack => ... => 2 Stacks as Force Sensor (parallel) => Speedgoat ADC
|
||||||
@ -531,12 +321,20 @@ The obtained dynamics from force actuator to force sensor are compare with the F
|
|||||||
<<matlab-init>>
|
<<matlab-init>>
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src matlab :tangle no
|
||||||
|
addpath('./matlab/mat/');
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src matlab :eval no
|
||||||
|
addpath('./mat/');
|
||||||
|
#+end_src
|
||||||
|
|
||||||
** Load Data :ignore:
|
** Load Data :ignore:
|
||||||
The data are loaded:
|
The data are loaded:
|
||||||
#+begin_src matlab
|
#+begin_src matlab
|
||||||
a_ss = load('mat/apa95ml_5kg_1a_2s.mat', 't', 'u', 'y', 'v');
|
a_ss = load('apa95ml_5kg_1a_2s.mat', 't', 'u', 'y', 'v');
|
||||||
aa_s = load('mat/apa95ml_5kg_2a_1s.mat', 't', 'u', 'y', 'v');
|
aa_s = load('apa95ml_5kg_2a_1s.mat', 't', 'u', 'y', 'v');
|
||||||
load('mat/G_force_sensor_5kg.mat', 'G');
|
load('G_force_sensor_5kg.mat', 'G');
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Adjust gain :ignore:
|
** Adjust gain :ignore:
|
||||||
@ -698,7 +496,13 @@ The transfer function from input voltage to output voltage are computed and show
|
|||||||
#+RESULTS:
|
#+RESULTS:
|
||||||
[[file:figs/root_locus_iff_apa95ml_identification.png]]
|
[[file:figs/root_locus_iff_apa95ml_identification.png]]
|
||||||
|
|
||||||
* IFF Tests
|
* Integral Force Feedback
|
||||||
|
:PROPERTIES:
|
||||||
|
:header-args:matlab+: :tangle matlab/integral_force_feedback.m
|
||||||
|
:header-args:matlab+: :comments org :mkdirp yes
|
||||||
|
:END:
|
||||||
|
<<sec:integral_force_feedback>>
|
||||||
|
** Introduction :ignore:
|
||||||
** Matlab Init :noexport: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)
|
#+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name)
|
||||||
<<matlab-dir>>
|
<<matlab-dir>>
|
||||||
@ -708,11 +512,19 @@ The transfer function from input voltage to output voltage are computed and show
|
|||||||
<<matlab-init>>
|
<<matlab-init>>
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src matlab :tangle no
|
||||||
|
addpath('./matlab/mat/');
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src matlab :eval no
|
||||||
|
addpath('./mat/');
|
||||||
|
#+end_src
|
||||||
|
|
||||||
** First tests with few gains
|
** First tests with few gains
|
||||||
#+begin_src matlab
|
#+begin_src matlab
|
||||||
iff_g10 = load('./mat/apa95ml_iff_g10_res.mat', 'u', 't', 'y', 'v');
|
iff_g10 = load('apa95ml_iff_g10_res.mat', 'u', 't', 'y', 'v');
|
||||||
iff_g100 = load('./mat/apa95ml_iff_g100_res.mat', 'u', 't', 'y', 'v');
|
iff_g100 = load('apa95ml_iff_g100_res.mat', 'u', 't', 'y', 'v');
|
||||||
iff_of = load('./mat/apa95ml_iff_off_res.mat', 'u', 't', 'y', 'v');
|
iff_of = load('apa95ml_iff_off_res.mat', 'u', 't', 'y', 'v');
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src matlab
|
#+begin_src matlab
|
||||||
@ -789,7 +601,7 @@ The transfer function from input voltage to output voltage are computed and show
|
|||||||
|
|
||||||
** Second test with many Gains
|
** Second test with many Gains
|
||||||
#+begin_src matlab
|
#+begin_src matlab
|
||||||
load('./mat/apa95ml_iff_test.mat', 'results');
|
load('apa95ml_iff_test.mat', 'results');
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src matlab
|
#+begin_src matlab
|
||||||
|
7
js/bootstrap.min.js
vendored
7
js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
4
js/jquery.min.js
vendored
4
js/jquery.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,87 +0,0 @@
|
|||||||
$(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
|
|
||||||
};
|
|
||||||
}($));
|
|
@ -1,23 +0,0 @@
|
|||||||
% Load Data
|
|
||||||
|
|
||||||
load('./mat/huddle_test.mat', 't', 'u', 'y');
|
|
||||||
|
|
||||||
% Time Domain Data
|
|
||||||
|
|
||||||
figure;
|
|
||||||
plot(t, y)
|
|
||||||
ylabel('Output Displacement [m]'); xlabel('Time [s]');
|
|
||||||
|
|
||||||
% PSD of Measurement Noise
|
|
||||||
|
|
||||||
Ts = t(end)/(length(t)-1);
|
|
||||||
Fs = 1/Ts;
|
|
||||||
|
|
||||||
win = hanning(ceil(1*Fs));
|
|
||||||
|
|
||||||
[pxx, f] = pwelch(y, win, [], [], Fs);
|
|
||||||
|
|
||||||
figure;
|
|
||||||
plot(f, sqrt(pxx));
|
|
||||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
|
||||||
xlabel('Frequency [Hz]'); ylabel('ASD [$m/\sqrt{Hz}$]');
|
|
@ -1,54 +0,0 @@
|
|||||||
%% Load Data
|
|
||||||
iff_g10 = load('../mat/apa95ml_iff_g10_res.mat', 'u', 't', 'y', 'v');
|
|
||||||
iff_g100 = load('../mat/apa95ml_iff_g100_res.mat', 'u', 't', 'y', 'v');
|
|
||||||
iff_of = load('../mat/apa95ml_iff_off_res.mat', 'u', 't', 'y', 'v');
|
|
||||||
|
|
||||||
%% Compute TF
|
|
||||||
Ts = 1e-4;
|
|
||||||
win = hann(ceil(10/Ts));
|
|
||||||
|
|
||||||
[tf_iff_g10, f] = tfestimate(iff_g10.u, iff_g10.y, win, [], [], 1/Ts);
|
|
||||||
[co_iff_g10, ~] = mscohere(iff_g10.u, iff_g10.y, win, [], [], 1/Ts);
|
|
||||||
|
|
||||||
[tf_iff_g100, f] = tfestimate(iff_g100.u, iff_g100.y, win, [], [], 1/Ts);
|
|
||||||
[co_iff_g100, ~] = mscohere(iff_g100.u, iff_g100.y, win, [], [], 1/Ts);
|
|
||||||
|
|
||||||
[tf_iff_of, ~] = tfestimate(iff_of.u, iff_of.y, win, [], [], 1/Ts);
|
|
||||||
[co_iff_of, ~] = mscohere(iff_of.u, iff_of.y, win, [], [], 1/Ts);
|
|
||||||
|
|
||||||
%% Coherence
|
|
||||||
figure;
|
|
||||||
|
|
||||||
hold on;
|
|
||||||
plot(f, co_iff_of, '-', 'DisplayName', 'g=0')
|
|
||||||
plot(f, co_iff_g10, '-', 'DisplayName', 'g=10')
|
|
||||||
plot(f, co_iff_g100, '-', 'DisplayName', 'g=100')
|
|
||||||
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'lin');
|
|
||||||
ylabel('Coherence'); xlabel('Frequency [Hz]');
|
|
||||||
hold off;
|
|
||||||
legend();
|
|
||||||
xlim([60, 600])
|
|
||||||
|
|
||||||
%% Compare Dynamics IFF ON/OFF
|
|
||||||
figure;
|
|
||||||
ax1 = subplot(2, 1, 1);
|
|
||||||
hold on;
|
|
||||||
plot(f, abs(tf_iff_of), '-', 'DisplayName', 'g=0')
|
|
||||||
plot(f, abs(tf_iff_g10), '-', 'DisplayName', 'g=10')
|
|
||||||
plot(f, abs(tf_iff_g100), '-', 'DisplayName', 'g=100')
|
|
||||||
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
|
|
||||||
ylabel('Amplitude'); xlabel('Frequency [Hz]');
|
|
||||||
hold off;
|
|
||||||
legend();
|
|
||||||
|
|
||||||
ax2 = subplot(2, 1, 2);
|
|
||||||
hold on;
|
|
||||||
plot(f, 180/pi*angle(-tf_iff_of), '-')
|
|
||||||
plot(f, 180/pi*angle(-tf_iff_g10), '-')
|
|
||||||
plot(f, 180/pi*angle(-tf_iff_g100), '-')
|
|
||||||
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'lin');
|
|
||||||
ylabel('Phase'); xlabel('Frequency [Hz]');
|
|
||||||
hold off;
|
|
||||||
|
|
||||||
linkaxes([ax1,ax2], 'x');
|
|
||||||
xlim([60, 600]);
|
|
112
matlab/runtest.m
112
matlab/runtest.m
@ -1,112 +0,0 @@
|
|||||||
tg = slrt;
|
|
||||||
|
|
||||||
%%
|
|
||||||
f = SimulinkRealTime.openFTP(tg);
|
|
||||||
mget(f, 'apa95ml.dat', 'data');
|
|
||||||
close(f);
|
|
||||||
|
|
||||||
%% Convert the Data
|
|
||||||
data = SimulinkRealTime.utils.getFileScopeData('data/apa95ml.dat').data;
|
|
||||||
|
|
||||||
u = data(:, 1); % Input Voltage [V]
|
|
||||||
y = data(:, 2); % Output Displacement [m]
|
|
||||||
v = data(:, 3); % Output Voltage (Force Sensor) [V]
|
|
||||||
t = data(:, 4); % Time [s]
|
|
||||||
|
|
||||||
save('../mat/apa95ml_5kg_1a_2s.mat', 'u', 't', 'y', 'v');
|
|
||||||
|
|
||||||
%%
|
|
||||||
figure;
|
|
||||||
subplot(1,2,1);
|
|
||||||
plot(t, u)
|
|
||||||
subplot(1,2,2);
|
|
||||||
plot(t, y)
|
|
||||||
|
|
||||||
%%
|
|
||||||
load('../mat/apa95ml_5kg_10V.mat', 'u', 't', 'y');
|
|
||||||
ht = load('../mat/huddle_test.mat', 'u', 't', 'y');
|
|
||||||
u = u - mean(u);
|
|
||||||
y = y - mean(y);
|
|
||||||
|
|
||||||
%%
|
|
||||||
[pxx, f] = pwelch(y, win, [], [], 1/Ts);
|
|
||||||
[pht, ~] = pwelch(ht.y, win, [], [], 1/Ts);
|
|
||||||
|
|
||||||
figure;
|
|
||||||
|
|
||||||
hold on;
|
|
||||||
plot(f, pxx);
|
|
||||||
plot(f, pht);
|
|
||||||
hold off;
|
|
||||||
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
|
|
||||||
ylabel('PSD'); xlabel('Frequency [Hz]');
|
|
||||||
|
|
||||||
%%
|
|
||||||
run setup;
|
|
||||||
|
|
||||||
win = hann(ceil(0.1/Ts));
|
|
||||||
|
|
||||||
[tf_est, f] = tfestimate(u, y, win, [], [], 1/Ts);
|
|
||||||
[co_est, ~] = mscohere(u, y, win, [], [], 1/Ts);
|
|
||||||
|
|
||||||
%%
|
|
||||||
figure;
|
|
||||||
|
|
||||||
hold on;
|
|
||||||
plot(f, co_est, 'k-')
|
|
||||||
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'lin');
|
|
||||||
ylabel('Coherence'); xlabel('Frequency [Hz]');
|
|
||||||
hold off;
|
|
||||||
|
|
||||||
%%
|
|
||||||
figure;
|
|
||||||
ax1 = subplot(2, 1, 1);
|
|
||||||
hold on;
|
|
||||||
plot(f, abs(tf_est), 'k-', 'DisplayName', 'Identified')
|
|
||||||
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
|
|
||||||
ylabel('Amplitude'); xlabel('Frequency [Hz]');
|
|
||||||
hold off;
|
|
||||||
|
|
||||||
ax2 = subplot(2, 1, 2);
|
|
||||||
hold on;
|
|
||||||
plot(f, 180/pi*unwrap(angle(-tf_est)), 'k-')
|
|
||||||
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'lin');
|
|
||||||
ylabel('Phase'); xlabel('Frequency [Hz]');
|
|
||||||
hold off;
|
|
||||||
|
|
||||||
linkaxes([ax1,ax2], 'x');
|
|
||||||
xlim([10, 5000]);
|
|
||||||
|
|
||||||
%%
|
|
||||||
win = hann(ceil(10/Ts));
|
|
||||||
|
|
||||||
[tf_est, f] = tfestimate(u, v, win, [], [], 1/Ts);
|
|
||||||
[co_est, ~] = mscohere(u, v, win, [], [], 1/Ts);
|
|
||||||
|
|
||||||
%%
|
|
||||||
figure;
|
|
||||||
|
|
||||||
hold on;
|
|
||||||
plot(f, co_est, 'k-')
|
|
||||||
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'lin');
|
|
||||||
ylabel('Coherence'); xlabel('Frequency [Hz]');
|
|
||||||
hold off;
|
|
||||||
|
|
||||||
%%
|
|
||||||
figure;
|
|
||||||
ax1 = subplot(2, 1, 1);
|
|
||||||
hold on;
|
|
||||||
plot(f, abs(tf_est), 'k-', 'DisplayName', 'Identified')
|
|
||||||
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
|
|
||||||
ylabel('Amplitude'); xlabel('Frequency [Hz]');
|
|
||||||
hold off;
|
|
||||||
|
|
||||||
ax2 = subplot(2, 1, 2);
|
|
||||||
hold on;
|
|
||||||
plot(f, 180/pi*unwrap(angle(-tf_est)), 'k-')
|
|
||||||
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'lin');
|
|
||||||
ylabel('Phase'); xlabel('Frequency [Hz]');
|
|
||||||
hold off;
|
|
||||||
|
|
||||||
linkaxes([ax1,ax2], 'x');
|
|
||||||
xlim([10, 5000]);
|
|
5
matlab/setup.m
Executable file → Normal file
5
matlab/setup.m
Executable file → Normal file
@ -1,6 +1,9 @@
|
|||||||
s = tf('s');
|
% Parameters
|
||||||
|
|
||||||
Ts = 1e-4;
|
Ts = 1e-4;
|
||||||
|
|
||||||
|
% Filter White Noise
|
||||||
|
|
||||||
Glpf = 1/(1 + s/2/pi/500);
|
Glpf = 1/(1 + s/2/pi/500);
|
||||||
|
|
||||||
Gz = c2d(Glpf, Ts, 'tustin');
|
Gz = c2d(Glpf, Ts, 'tustin');
|
@ -1,9 +0,0 @@
|
|||||||
% Parameters
|
|
||||||
|
|
||||||
Ts = 1e-4;
|
|
||||||
|
|
||||||
% Filter White Noise
|
|
||||||
|
|
||||||
Glpf = 1/(1 + s/2/pi/500);
|
|
||||||
|
|
||||||
Gz = c2d(Glpf, Ts, 'tustin');
|
|
@ -1,54 +0,0 @@
|
|||||||
tg = slrt;
|
|
||||||
|
|
||||||
%% Gains to test
|
|
||||||
g_iff = [0, 1, 5, 10, 50, 100];
|
|
||||||
|
|
||||||
results = {zeros(1, length(g_iff))};
|
|
||||||
|
|
||||||
if tg.Connected == "Yes"
|
|
||||||
|
|
||||||
stop(tg);
|
|
||||||
%% Set Parameters for the Simulation
|
|
||||||
% setparam(tg, 'Noise', 'Variance', 0);
|
|
||||||
setparam(tg, 'Sine', 'Amplitude', 0);
|
|
||||||
setparam(tg, 'DC_value', 'Value', 0);
|
|
||||||
setparam(tg, 'Chirp_gain', 'Gain', 0.03);
|
|
||||||
setparam(tg, 'iff_enable', 'Gain', 1);
|
|
||||||
|
|
||||||
if tg.Status == "stopped"
|
|
||||||
|
|
||||||
for i = 1:length(g_iff)
|
|
||||||
setparam(tg, 'g_iff', 'Gain', g_iff(i));
|
|
||||||
|
|
||||||
fprintf('(%i/%i) - Testing for g_iff = %.1f', i, length(g_iff), g_iff(i));
|
|
||||||
|
|
||||||
start(tg);
|
|
||||||
|
|
||||||
pause(101);
|
|
||||||
|
|
||||||
stop(tg);
|
|
||||||
|
|
||||||
setparam(tg, 'g_iff', 'Gain', 0);
|
|
||||||
|
|
||||||
%%
|
|
||||||
f = SimulinkRealTime.openFTP(tg);
|
|
||||||
mget(f, 'apa95ml.dat', 'data');
|
|
||||||
close(f);
|
|
||||||
|
|
||||||
%% Convert the Data
|
|
||||||
data = SimulinkRealTime.utils.getFileScopeData('data/apa95ml.dat').data;
|
|
||||||
|
|
||||||
u = data(:, 1); % Input Voltage [V]
|
|
||||||
y = data(:, 2); % Output Displacement [m]
|
|
||||||
v = data(:, 3); % Output Voltage (Force Sensor) [V]
|
|
||||||
t = data(:, 4); % Time [s]
|
|
||||||
|
|
||||||
results(i) = {struct('t', t, 'u', u, 'y', y, 'v', v)};
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
save('../mat/apa95ml_iff_test.mat', 'results');
|
|
||||||
%% Best functions
|
|
||||||
% viewTargetScreen(tg);
|
|
@ -1,74 +0,0 @@
|
|||||||
% Load Data
|
|
||||||
|
|
||||||
ht = load('./mat/huddle_test.mat', 't', 'u', 'y');
|
|
||||||
load('./mat/apa95ml_5kg.mat', 't', 'u', 'y');
|
|
||||||
|
|
||||||
% Time Domain Data
|
|
||||||
|
|
||||||
figure;
|
|
||||||
|
|
||||||
subplot(1,2,1);
|
|
||||||
plot(t, u)
|
|
||||||
ylabel('Input Voltage [V]'); xlabel('Time [s]');
|
|
||||||
|
|
||||||
|
|
||||||
subplot(1,2,2);
|
|
||||||
plot(t, y)
|
|
||||||
ylabel('Output Displacement [m]'); xlabel('Time [s]');
|
|
||||||
|
|
||||||
% Comparison of the PSD with Huddle Test
|
|
||||||
|
|
||||||
Ts = t(end)/(length(t)-1);
|
|
||||||
Fs = 1/Ts;
|
|
||||||
|
|
||||||
win = hanning(ceil(1*Fs));
|
|
||||||
|
|
||||||
[pxx, f] = pwelch(y, win, [], [], Fs);
|
|
||||||
[pht, ~] = pwelch(ht.y, win, [], [], Fs);
|
|
||||||
|
|
||||||
figure;
|
|
||||||
hold on;
|
|
||||||
plot(f, sqrt(pxx), 'DisplayName', '5kg');
|
|
||||||
plot(f, sqrt(pht), 'DisplayName', 'Huddle Test');
|
|
||||||
hold off;
|
|
||||||
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
|
||||||
xlabel('Frequency [Hz]'); ylabel('ASD [$m/\sqrt{Hz}$]');
|
|
||||||
legend('locaation', 'norteast');
|
|
||||||
|
|
||||||
% Compute TF estimate and Coherence
|
|
||||||
|
|
||||||
win = hann(ceil(1/Ts));
|
|
||||||
|
|
||||||
[tf_est, f] = tfestimate(data(:, 1), -data(:, 2), win, [], [], 1/Ts);
|
|
||||||
[co_est, ~] = mscohere( data(:, 1), -data(:, 2), win, [], [], 1/Ts);
|
|
||||||
|
|
||||||
% Coherence
|
|
||||||
|
|
||||||
figure;
|
|
||||||
|
|
||||||
hold on;
|
|
||||||
plot(f, co_est, 'k-')
|
|
||||||
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'lin');
|
|
||||||
ylabel('Coherence'); xlabel('Frequency [Hz]');
|
|
||||||
hold off;
|
|
||||||
|
|
||||||
% Transfer Function
|
|
||||||
|
|
||||||
figure;
|
|
||||||
ax1 = subplot(2, 1, 1);
|
|
||||||
hold on;
|
|
||||||
plot(f, abs(tf_est), 'k-')
|
|
||||||
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'log');
|
|
||||||
ylabel('Amplitude'); xlabel('Frequency [Hz]');
|
|
||||||
hold off;
|
|
||||||
|
|
||||||
ax2 = subplot(2, 1, 2);
|
|
||||||
hold on;
|
|
||||||
plot(f, 180/pi*angle(tf_est), 'k-')
|
|
||||||
set(gca, 'Xscale', 'log'); set(gca, 'Yscale', 'lin');
|
|
||||||
ylabel('Phase'); xlabel('Frequency [Hz]');
|
|
||||||
legend();
|
|
||||||
hold off;
|
|
||||||
|
|
||||||
linkaxes([ax1,ax2], 'x');
|
|
||||||
xlim([10, 5000]);
|
|
Loading…
Reference in New Issue
Block a user