Remove unused analysis folder

This commit is contained in:
Thomas Dehaeze 2019-12-11 14:32:57 +01:00
parent f517139655
commit 81ffe5d5a0
9 changed files with 0 additions and 894 deletions

View File

@ -1,264 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2019-10-08 mar. 11:13 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Some analysis</title>
<meta name="generator" content="Org mode" />
<meta name="author" content="Dehaeze Thomas" />
<style type="text/css">
<!--/*--><![CDATA[/*><!--*/
.title { text-align: center;
margin-bottom: .2em; }
.subtitle { text-align: center;
font-size: medium;
font-weight: bold;
margin-top:0; }
.todo { font-family: monospace; color: red; }
.done { font-family: monospace; color: green; }
.priority { font-family: monospace; color: orange; }
.tag { background-color: #eee; font-family: monospace;
padding: 2px; font-size: 80%; font-weight: normal; }
.timestamp { color: #bebebe; }
.timestamp-kwd { color: #5f9ea0; }
.org-right { margin-left: auto; margin-right: 0px; text-align: right; }
.org-left { margin-left: 0px; margin-right: auto; text-align: left; }
.org-center { margin-left: auto; margin-right: auto; text-align: center; }
.underline { text-decoration: underline; }
#postamble p, #preamble p { font-size: 90%; margin: .2em; }
p.verse { margin-left: 3%; }
pre {
border: 1px solid #ccc;
box-shadow: 3px 3px 3px #eee;
padding: 8pt;
font-family: monospace;
overflow: auto;
margin: 1.2em;
}
pre.src {
position: relative;
overflow: visible;
padding-top: 1.2em;
}
pre.src:before {
display: none;
position: absolute;
background-color: white;
top: -10px;
right: 10px;
padding: 3px;
border: 1px solid black;
}
pre.src:hover:before { display: inline;}
/* Languages per Org manual */
pre.src-asymptote:before { content: 'Asymptote'; }
pre.src-awk:before { content: 'Awk'; }
pre.src-C:before { content: 'C'; }
/* pre.src-C++ doesn't work in CSS */
pre.src-clojure:before { content: 'Clojure'; }
pre.src-css:before { content: 'CSS'; }
pre.src-D:before { content: 'D'; }
pre.src-ditaa:before { content: 'ditaa'; }
pre.src-dot:before { content: 'Graphviz'; }
pre.src-calc:before { content: 'Emacs Calc'; }
pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
pre.src-fortran:before { content: 'Fortran'; }
pre.src-gnuplot:before { content: 'gnuplot'; }
pre.src-haskell:before { content: 'Haskell'; }
pre.src-hledger:before { content: 'hledger'; }
pre.src-java:before { content: 'Java'; }
pre.src-js:before { content: 'Javascript'; }
pre.src-latex:before { content: 'LaTeX'; }
pre.src-ledger:before { content: 'Ledger'; }
pre.src-lisp:before { content: 'Lisp'; }
pre.src-lilypond:before { content: 'Lilypond'; }
pre.src-lua:before { content: 'Lua'; }
pre.src-matlab:before { content: 'MATLAB'; }
pre.src-mscgen:before { content: 'Mscgen'; }
pre.src-ocaml:before { content: 'Objective Caml'; }
pre.src-octave:before { content: 'Octave'; }
pre.src-org:before { content: 'Org mode'; }
pre.src-oz:before { content: 'OZ'; }
pre.src-plantuml:before { content: 'Plantuml'; }
pre.src-processing:before { content: 'Processing.js'; }
pre.src-python:before { content: 'Python'; }
pre.src-R:before { content: 'R'; }
pre.src-ruby:before { content: 'Ruby'; }
pre.src-sass:before { content: 'Sass'; }
pre.src-scheme:before { content: 'Scheme'; }
pre.src-screen:before { content: 'Gnu Screen'; }
pre.src-sed:before { content: 'Sed'; }
pre.src-sh:before { content: 'shell'; }
pre.src-sql:before { content: 'SQL'; }
pre.src-sqlite:before { content: 'SQLite'; }
/* additional languages in org.el's org-babel-load-languages alist */
pre.src-forth:before { content: 'Forth'; }
pre.src-io:before { content: 'IO'; }
pre.src-J:before { content: 'J'; }
pre.src-makefile:before { content: 'Makefile'; }
pre.src-maxima:before { content: 'Maxima'; }
pre.src-perl:before { content: 'Perl'; }
pre.src-picolisp:before { content: 'Pico Lisp'; }
pre.src-scala:before { content: 'Scala'; }
pre.src-shell:before { content: 'Shell Script'; }
pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
/* additional language identifiers per "defun org-babel-execute"
in ob-*.el */
pre.src-cpp:before { content: 'C++'; }
pre.src-abc:before { content: 'ABC'; }
pre.src-coq:before { content: 'Coq'; }
pre.src-groovy:before { content: 'Groovy'; }
/* additional language identifiers from org-babel-shell-names in
ob-shell.el: ob-shell is the only babel language using a lambda to put
the execution function name together. */
pre.src-bash:before { content: 'bash'; }
pre.src-csh:before { content: 'csh'; }
pre.src-ash:before { content: 'ash'; }
pre.src-dash:before { content: 'dash'; }
pre.src-ksh:before { content: 'ksh'; }
pre.src-mksh:before { content: 'mksh'; }
pre.src-posh:before { content: 'posh'; }
/* Additional Emacs modes also supported by the LaTeX listings package */
pre.src-ada:before { content: 'Ada'; }
pre.src-asm:before { content: 'Assembler'; }
pre.src-caml:before { content: 'Caml'; }
pre.src-delphi:before { content: 'Delphi'; }
pre.src-html:before { content: 'HTML'; }
pre.src-idl:before { content: 'IDL'; }
pre.src-mercury:before { content: 'Mercury'; }
pre.src-metapost:before { content: 'MetaPost'; }
pre.src-modula-2:before { content: 'Modula-2'; }
pre.src-pascal:before { content: 'Pascal'; }
pre.src-ps:before { content: 'PostScript'; }
pre.src-prolog:before { content: 'Prolog'; }
pre.src-simula:before { content: 'Simula'; }
pre.src-tcl:before { content: 'tcl'; }
pre.src-tex:before { content: 'TeX'; }
pre.src-plain-tex:before { content: 'Plain TeX'; }
pre.src-verilog:before { content: 'Verilog'; }
pre.src-vhdl:before { content: 'VHDL'; }
pre.src-xml:before { content: 'XML'; }
pre.src-nxml:before { content: 'XML'; }
/* add a generic configuration mode; LaTeX export needs an additional
(add-to-list 'org-latex-listings-langs '(conf " ")) in .emacs */
pre.src-conf:before { content: 'Configuration File'; }
table { border-collapse:collapse; }
caption.t-above { caption-side: top; }
caption.t-bottom { caption-side: bottom; }
td, th { vertical-align:top; }
th.org-right { text-align: center; }
th.org-left { text-align: center; }
th.org-center { text-align: center; }
td.org-right { text-align: right; }
td.org-left { text-align: left; }
td.org-center { text-align: center; }
dt { font-weight: bold; }
.footpara { display: inline; }
.footdef { margin-bottom: 1em; }
.figure { padding: 1em; }
.figure p { text-align: center; }
.equation-container {
display: table;
text-align: center;
width: 100%;
}
.equation {
vertical-align: middle;
}
.equation-label {
display: table-cell;
text-align: right;
vertical-align: middle;
}
.inlinetask {
padding: 10px;
border: 2px solid gray;
margin: 10px;
background: #ffffcc;
}
#org-div-home-and-up
{ text-align: right; font-size: 70%; white-space: nowrap; }
textarea { overflow-x: auto; }
.linenr { font-size: smaller }
.code-highlighted { background-color: #ffff00; }
.org-info-js_info-navigation { border-style: none; }
#org-info-js_console-label
{ font-size: 10px; font-weight: bold; white-space: nowrap; }
.org-info-js_search-highlight
{ background-color: #ffff00; color: #000000; font-weight: bold; }
.org-svg { width: 90%; }
/*]]>*/-->
</style>
<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"/>
<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>
<script type="text/javascript">
/*
@licstart The following is the entire license notice for the
JavaScript code in this tag.
Copyright (C) 2012-2019 Free Software Foundation, Inc.
The JavaScript code in this tag is free software: you can
redistribute it and/or modify it under the terms of the GNU
General Public License (GNU GPL) as published by the Free Software
Foundation, either version 3 of the License, or (at your option)
any later version. The code is distributed WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
As additional permission under GNU GPL version 3 section 7, you
may distribute non-source (e.g., minimized or compacted) forms of
that code without the copy of the GNU GPL normally required by
section 4, provided you include this license notice and a URL
through which recipients can access the Corresponding Source.
@licend The above is the entire license notice
for the JavaScript code in this tag.
*/
<!--/*--><![CDATA[/*><!--*/
function CodeHighlightOn(elem, id)
{
var target = document.getElementById(id);
if(null != target) {
elem.cacheClassElem = elem.className;
elem.cacheClassTarget = target.className;
target.className = "code-highlighted";
elem.className = "code-highlighted";
}
}
function CodeHighlightOff(elem, id)
{
var target = document.getElementById(id);
if(elem.cacheClassElem)
elem.className = elem.cacheClassElem;
if(elem.cacheClassTarget)
target.className = elem.cacheClassTarget;
}
/*]]>*///-->
</script>
</head>
<body>
<div id="org-div-home-and-up">
<a accesskey="h" href="../index.html"> UP </a>
|
<a accesskey="H" href="../index.html"> HOME </a>
</div><div id="content">
<h1 class="title">Some analysis</h1>
</div>
<div id="postamble" class="status">
<p class="author">Author: Dehaeze Thomas</p>
<p class="date">Created: 2019-10-08 mar. 11:13</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>
</html>

View File

@ -1,42 +0,0 @@
#+TITLE: Some analysis
:DRAWER:
#+STARTUP: overview
#+LANGUAGE: en
#+EMAIL: dehaeze.thomas@gmail.com
#+AUTHOR: Dehaeze Thomas
#+HTML_LINK_HOME: ../index.html
#+HTML_LINK_UP: ../index.html
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="../css/htmlize.css"/>
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="../css/readtheorg.css"/>
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="../css/zenburn.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
#+PROPERTY: header-args:matlab :session *MATLAB*
#+PROPERTY: header-args:matlab+ :comments org
#+PROPERTY: header-args:matlab+ :results none
#+PROPERTY: header-args:matlab+ :exports both
#+PROPERTY: header-args:matlab+ :eval no-export
#+PROPERTY: header-args:matlab+ :output-dir figs
#+PROPERTY: header-args:matlab+ :tangle matlab/modal_frf_coh.m
#+PROPERTY: header-args:matlab+ :mkdirp yes
#+PROPERTY: header-args:shell :eval no-export
#+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/Cloud/thesis/latex/}{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:

View File

@ -1,28 +0,0 @@
%%
clear; close all; clc;
%% Load Plant
load('./mat/G_xg_to_d.mat', 'G_xg_to_d');
%% Load shape of the perturbation
load('./mat/perturbations.mat', 'Wxg');
%% Effect of the perturbation on the output
freqs = logspace(-1, 3, 1000);
dx_out = squeeze(abs(freqresp(Wxg*G_xg_to_d(1, 1), freqs, 'Hz')));
dy_out = squeeze(abs(freqresp(Wxg*G_xg_to_d(2, 2), freqs, 'Hz')));
dz_out = squeeze(abs(freqresp(Wxg*G_xg_to_d(3, 3), freqs, 'Hz')));
figure;
hold on;
plot(freqs, dx_out, 'DisplayName', 'Effect of $Dg$ on $D_{x}$');
plot(freqs, dy_out, 'DisplayName', 'Effect of $Dg$ on $D_{y}$');
plot(freqs, dz_out, 'DisplayName', 'Effect of $Dg$ on $D_{z}$');
xlabel('Frequency [Hz]'); ylabel('PSD [$m/\sqrt{Hz}$]');
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
legend('location', 'southwest');
xlim([freqs(1), freqs(end)]);
hold off;
exportFig('ground_motion_effect', 'normal-normal')

View File

@ -1,13 +0,0 @@
%%
Dmeas.Data = Dmeas.Data - Dmeas.Data(1, :);
%%
figure;
hold on;
plot(r_setpoint.Time, r_setpoint.Data(:, 2));
plot(Dmeas.Time, Dmeas.Data(:, 2));
legend({'Setpoint', 'Ty'})
hold off;
xlabel('Time [s]'); ylabel('Displacement [m]');
exportFig('set_time_translations', 'normal-normal')

View File

@ -1,46 +0,0 @@
%%
clear; close all; clc;
%%
load('./mat/Gd_ol_cl.mat', 'Gd_ol_20', 'Gd_cl_20');
%%
load('./mat/perturbations.mat', 'Wxg')
%%
load('./mat/G_gm_to_dh.mat', 'G_gm_to_dh')
load('./mat/psd_ground_motion.mat', 'psd_f', 'pxx')
%%
bodeFig({Gd_ol_20(1, 1), G_gm_to_dh})
%% PSD
freqs = logspace(-2, 2, 1000);
gm_ol = abs(squeeze(freqresp(Wxg*Gd_ol_20(1, 1), freqs, 'Hz')));
gm_cl = abs(squeeze(freqresp(Wxg*Gd_cl_20(1, 1), freqs, 'Hz')));
figure;
hold on;
plot(freqs, gm_ol)
plot(freqs, gm_cl)
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
xlabel('Frequency [$Hz$]'); ylabel('PSD [$m/\sqrt{Hz}$]');
hold off;
%% CAS
freqs = logspace(-1, 2, 1000);
gm_ol = abs(squeeze(freqresp(Wxg*Gd_ol_20(1, 1), freqs, 'Hz')));
gm_cl = abs(squeeze(freqresp(Wxg*Gd_cl_20(1, 1), freqs, 'Hz')));
dw = freqs - [0, freqs(1:end-1)];
figure;
hold on;
plot(freqs, cumsum(gm_ol'.*dw))
plot(freqs, cumsum(gm_cl'.*dw))
set(gca, 'XScale', 'log');
% set(gca, 'YScale', 'log');
xlabel('Frequency [Hz]'); ylabel('CAS [m]');
hold off;

View File

@ -1,150 +0,0 @@
%%
clear; close all; clc;
%% Used to get sim_conf.Ts
load('./mat/sim_conf.mat', 'sim_conf');
%% Load simulation results
gm_ol = load('./data/ground_motion_ol.mat', 'Dsample');
gm_cl = load('./data/ground_motion.mat', 'Dsample');
%%
figure;
hold on;
plot(gm_ol.Dsample.Data(:, 1),gm_ol.Dsample.Data(:, 3))
plot(gm_cl.Dsample.Data(:, 1),gm_cl.Dsample.Data(:, 3))
legend({'OL', 'CL'})
hold off;
xlabel('Displacement - $x$ [s]'); ylabel('Displacement - $z$ [m]');
exportFig('gm_control_xz', 'half-short')
%% Compare OL and CL - Time
figure;
hold on;
plot(gm_ol.Dsample.Time, gm_ol.Dsample.Data(:, 1));
plot(gm_cl.Dsample.Time, gm_cl.Dsample.Data(:, 1));
legend({'x - OL', 'x - CL'})
hold off;
xlabel('Time [s]'); ylabel('Displacement [m]');
exportFig('gm_control_time_x', 'normal-normal')
%% Compare OL and CL - Time
figure;
hold on;
plot(gm_ol.Dsample.Time, gm_ol.Dsample.Data(:, 2));
plot(gm_cl.Dsample.Time, gm_cl.Dsample.Data(:, 2));
legend({'y - OL', 'y - CL'})
hold off;
xlabel('Time [s]'); ylabel('Displacement [m]');
exportFig('gm_control_time_y', 'normal-normal')
%% Compare OL and CL - Time
figure;
hold on;
plot(gm_ol.Dsample.Time, gm_ol.Dsample.Data(:, 3));
plot(gm_cl.Dsample.Time, gm_cl.Dsample.Data(:, 3));
legend({'z - OL', 'z - CL'})
hold off;
xlabel('Time [s]'); ylabel('Displacement [m]');
exportFig('gm_control_time_z', 'normal-normal')
%% Compare OL and CL - Time
figure;
hold on;
plot(gm_ol.Dsample.Time, gm_ol.Dsample.Data(:, 4));
plot(gm_cl.Dsample.Time, gm_cl.Dsample.Data(:, 4));
legend({'$\theta_x$ - OL', '$\theta_x$ - CL'})
hold off;
xlabel('Time [s]'); ylabel('Angle [rad]');
exportFig('gm_control_time_rx', 'normal-normal')
%% Compare OL and CL - Time
figure;
hold on;
plot(gm_ol.Dsample.Time, gm_ol.Dsample.Data(:, 5));
plot(gm_cl.Dsample.Time, gm_cl.Dsample.Data(:, 5));
legend({'$\theta_y$ - OL', '$\theta_y$ - CL'})
hold off;
xlabel('Time [s]'); ylabel('Angle [rad]');
exportFig('gm_control_time_ry', 'normal-normal')
%% Compare OL and CL - Time
figure;
hold on;
plot(gm_ol.Dsample.Time, gm_ol.Dsample.Data(:, 6));
plot(gm_cl.Dsample.Time, gm_cl.Dsample.Data(:, 6));
legend({'$\theta_z$ - OL', '$\theta_z$ - CL'})
hold off;
xlabel('Time [s]'); ylabel('Angle [rad]');
exportFig('gm_control_time_rz', 'normal-normal')
%% Compare OL and CL - PSD
han_windows_ol = hanning(ceil(length(gm_ol.Dsample.Time)/10));
[psd_x_ol, freqs_x_ol] = pwelch(gm_ol.Dsample.Data(:, 1), han_windows_ol, 0, [], 1/sim_conf.Ts);
han_windows = hanning(ceil(length(gm_cl.Dsample.Time)/10));
[psd_x, freqs_x] = pwelch(gm_cl.Dsample.Data(:, 1), han_windows, 0, [], 1/sim_conf.Ts);
figure;
hold on;
plot(freqs_x_ol, sqrt(psd_x_ol));
plot(freqs_x, sqrt(psd_x));
set(gca,'xscale','log'); set(gca,'yscale','log');
xlabel('Frequency [Hz]'); ylabel('PSD [$m/\sqrt{Hz}$]');
legend({'x - OL', 'x - CL'})
hold off;
exportFig('gm_control_psd_x', 'normal-normal')
%% Compare OL and CL - PSD
han_windows_ol = hanning(ceil(length(gm_ol.Dsample.Time)/10));
[psd_y_ol, freqs_y_ol] = pwelch(gm_ol.Dsample.Data(:, 2), han_windows_ol, 0, [], 1/sim_conf.Ts);
han_windows = hanning(ceil(length(gm_cl.Dsample.Time)/10));
[psd_y, freqs_y] = pwelch(gm_cl.Dsample.Data(:, 2), han_windows, 0, [], 1/sim_conf.Ts);
figure;
hold on;
plot(freqs_y_ol, sqrt(psd_y_ol));
plot(freqs_y, sqrt(psd_y));
set(gca,'xscale','log'); set(gca,'yscale','log');
xlabel('Frequency [Hz]'); ylabel('PSD [$m/\sqrt{Hz}$]');
legend({'y - OL', 'y - CL'})
hold off;
exportFig('gm_control_psd_y', 'normal-normal')
%% Compare OL and CL - PSD
load('./mat/G_xg_to_d.mat', 'G_xg_to_d');
load('./mat/perturbations.mat', 'Wxg');
load('./mat/T_S.mat', 'S', 'T');
freqs = logspace(-1, 3, 1000);
dz_ol = squeeze(abs(freqresp(Wxg*G_xg_to_d(3, 3), freqs, 'Hz')));
dz_cl = squeeze(abs(freqresp(Wxg*G_xg_to_d(3, 3)*S(3, 3), freqs, 'Hz')));
han_windows_ol = hanning(ceil(length(gm_ol.Dsample.Time)/10));
[psd_z_ol, freqs_z_ol] = pwelch(gm_ol.Dsample.Data(:, 3), han_windows_ol, 0, [], 1/sim_conf.Ts);
han_windows = hanning(ceil(length(gm_cl.Dsample.Time)/10));
[psd_z, freqs_z] = pwelch(gm_cl.Dsample.Data(:, 3), han_windows, 0, [], 1/sim_conf.Ts);
figure;
hold on;
plot(freqs_z_ol, sqrt(psd_z_ol), '-', 'Color', [0 0.4470 0.7410], 'DisplayName', '$Dg \to D_x$ - OL (sim)');
plot(freqs, dz_ol, '--', 'Color', [0 0.4470 0.7410], 'DisplayName', '$Dg \to D_x$ - OL (th)');
plot(freqs_z, sqrt(psd_z), '-', 'Color', [0.8500 0.3250 0.0980], 'DisplayName', '$Dg \to D_x$ - CL (sim)');
plot(freqs, dz_cl, '--', 'Color', [0.8500 0.3250 0.0980], 'DisplayName', '$Dg \to D_x$ - CL (th)');
set(gca,'xscale','log'); set(gca,'yscale','log');
xlabel('Frequency [Hz]'); ylabel('PSD [$m/\sqrt{Hz}$]');
legend('location', 'southwest');
hold off;
exportFig('gm_control_psd_z', 'normal-normal')

View File

@ -1,218 +0,0 @@
%%
clear; close all; clc;
%%
exp_ol = load('./data/exp_open_loop.mat', 'Dmeas');
exp_cl = load('./data/exp_close_loop_xyz.mat', 'Dmeas');
exp_without_nass = load('./data/exp_whitout_nass.mat', 'Dmeas');
load('./mat/sim_conf.mat', 'sim_conf');
exp_without_nass.Dmeas.Data(:, 3) = exp_without_nass.Dmeas.Data(:, 3) - exp_without_nass.Dmeas.Data(end, 3);
Fs = ceil((length(exp_without_nass.Dmeas.Time(:))-1)/exp_without_nass.Dmeas.Time(end));
%%
N = length(exp_without_nass.Dmeas.Data(:, 1));
figure;
hold on;
% plot(exp_without_nass.Dmeas.Data(end-6300:end, 1),exp_without_nass.Dmeas.Data(end-6300:end, 2))
plot(exp_without_nass.Dmeas.Data(N-6600:N-6200, 1),exp_without_nass.Dmeas.Data(N-6600:N-6200, 2))
plot(exp_cl.Dmeas.Data(6:end, 1),exp_cl.Dmeas.Data(6:end, 2))
xlim([-1e-6, 1e-6]);
ylim([-1e-6, 1e-6]);
hold off;
xlabel('Displacement - $x$ [m]'); ylabel('Displacement - $y$ [m]');
%% With and without NASS
steady_i = ceil(length(exp_ol.Dmeas.Time)/2);
steady_i = 6;
figure;
hold on;
plot(exp_without_nass.Dmeas.Data(steady_i:end, 1),exp_without_nass.Dmeas.Data(steady_i:end, 2))
plot(exp_cl.Dmeas.Data(steady_i:end, 1),exp_cl.Dmeas.Data(steady_i:end, 2))
xlim([-1e-6, 1e-6]);
ylim([-1e-6, 1e-6]);
hold off;
xlabel('Displacement - $x$ [m]'); ylabel('Displacement - $y$ [m]');
exportFig('exp_w_wo_nass_xy', 'half-short')
%% Video of the simulation
close all;
figure(1);
hold on;
grid;
xlim([-1e-6, 1e-6]);
ylim([-1e-6, 1e-6]);
xlabel('Displacement - $x$ [m]'); ylabel('Displacement - $y$ [m]');
% Set up the movie.
writerObj = VideoWriter('open_loop.avi'); % Name it.
writerObj.FrameRate = 30; % How many frames per second.
open(writerObj);
% Open Loop
N = length(exp_without_nass.Dmeas.Data(:, 1))-6300;
step_i = ceil(Fs/writerObj.FrameRate);
for i=1:step_i:N
% We just use pause but pretend you have some really complicated thing here...
pause(0.01);
figure(1);
plot(exp_without_nass.Dmeas.Data(i:min(i+step_i, N), 1),exp_without_nass.Dmeas.Data(i:min(i+step_i, N), 2), 'color', [0 0.4470 0.7410])
frame = getframe(gcf); % 'gcf' can handle if you zoom in to take a movie.
writeVideo(writerObj, frame);
end
% Close Loop
N = length(exp_cl.Dmeas.Data(:, 1));
step_i = ceil(Fs/writerObj.FrameRate);
first_i = 6;
for i=first_i:step_i:N
% We just use pause but pretend you have some really complicated thing here...
pause(0.01);
figure(1);
plot(exp_cl.Dmeas.Data(i:min(i+step_i, N), 1),exp_cl.Dmeas.Data(i:min(i+step_i, N), 2), 'color', [0.8500 0.3250 0.0980])
frame = getframe(gcf); % 'gcf' can handle if you zoom in to take a movie.
writeVideo(writerObj, frame);
end
hold off
close(writerObj); % Saves the movie.
%% Video of the simulation
close all;
figure(1);
hold on;
xlim([-40, 40]);
ylim([-40, 40]);
yticks([-40 -20 0 20 40])
xticks([-40 -20 0 20 40])
grid on;
xlabel('Displacement - $x$ [nm]'); ylabel('Displacement - $y$ [nm]');
set(gcf, 'pos', [20 20 300 300]);
% Set up the movie.
writerObj = VideoWriter('close_loop_zoom.avi'); % Name it.
writerObj.FrameRate = 30; % How many frames per second.
open(writerObj);
% Open Loop
N = length(exp_without_nass.Dmeas.Data(:, 1))-6300;
step_i = ceil(Fs/writerObj.FrameRate);
for i=1:step_i:N
% We just use pause but pretend you have some really complicated thing here...
pause(0.01);
figure(1);
plot(1e9*exp_without_nass.Dmeas.Data(i:min(i+step_i, N), 1),1e9*exp_without_nass.Dmeas.Data(i:min(i+step_i, N), 2), 'color', [0 0.4470 0.7410])
frame = getframe(gcf); % 'gcf' can handle if you zoom in to take a movie.
writeVideo(writerObj, frame);
end
% Close Loop
N = length(exp_cl.Dmeas.Data(:, 1));
step_i = ceil(Fs/writerObj.FrameRate);
first_i = 6;
for i=first_i:step_i:N
% We just use pause but pretend you have some really complicated thing here...
pause(0.01);
figure(1);
plot(1e9*exp_cl.Dmeas.Data(i:min(i+step_i, N), 1),1e9*exp_cl.Dmeas.Data(i:min(i+step_i, N), 2), 'color', [0.8500 0.3250 0.0980])
frame = getframe(gcf); % 'gcf' can handle if you zoom in to take a movie.
writeVideo(writerObj, frame);
end
hold off
close(writerObj); % Saves the movie.
%%
figure;
hold on;
plot(exp_without_nass.Dmeas.Time(steady_i:end), exp_without_nass.Dmeas.Data(steady_i:end, 2));
plot(exp_without_nass.Dmeas.Time(steady_i:end), exp_cl.Dmeas.Data(steady_i:end, 2));
legend({'$y$ - without NASS', '$y$ - with NASS'})
hold off;
xlabel('Time [s]'); ylabel('Displacement [m]');
exportFig('exp_w_wo_nass_y', 'half-small')
%% Compare OL and CL - Time
figure;
hold on;
plot(exp_ol.Dmeas.Time, exp_ol.Dmeas.Data(:, 1));
plot(exp_cl.Dmeas.Time, exp_cl.Dmeas.Data(:, 1));
legend({'x - OL', 'x - CL'})
hold off;
xlabel('Time [s]'); ylabel('Displacement [m]');
exportFig('exp_control_time_x', 'normal-normal')
figure;
hold on;
plot(exp_ol.Dmeas.Time, exp_ol.Dmeas.Data(:, 2));
plot(exp_cl.Dmeas.Time, exp_cl.Dmeas.Data(:, 2));
legend({'y - OL', 'y - CL'})
hold off;
xlabel('Time [s]'); ylabel('Displacement [m]');
exportFig('exp_control_time_y', 'normal-normal')
figure;
hold on;
plot(exp_ol.Dmeas.Time, exp_ol.Dmeas.Data(:, 3));
plot(exp_cl.Dmeas.Time, exp_cl.Dmeas.Data(:, 3));
legend({'z - OL', 'z - CL'})
hold off;
xlabel('Time [s]'); ylabel('Displacement [m]');
exportFig('exp_control_time_z', 'normal-normal')
%%
steady_i = ceil(length(exp_ol.Dmeas.Time)/2);
% steady_i = 1;
figure;
hold on;
plot(exp_ol.Dmeas.Data(steady_i:end, 1),exp_ol.Dmeas.Data(steady_i:end, 2))
plot(exp_cl.Dmeas.Data(steady_i:end, 1),exp_cl.Dmeas.Data(steady_i:end, 2))
legend({'OL', 'CL'})
hold off;
xlabel('Displacement - $x$ [s]'); ylabel('Displacement - $y$ [m]');
figure;
hold on;
plot3(exp_ol.Dmeas.Data(steady_i:end, 1),exp_ol.Dmeas.Data(steady_i:end, 2),exp_ol.Dmeas.Data(steady_i:end, 3))
plot3(exp_cl.Dmeas.Data(steady_i:end, 1),exp_cl.Dmeas.Data(steady_i:end, 2),exp_cl.Dmeas.Data(steady_i:end, 3))
legend({'OL', 'CL'})
hold off;
xlabel('Displacement - $x$ [s]'); ylabel('Displacement - $y$ [m]'); zlabel('Displacement - $z$ [m]');
%% Compare OL and CL - PSD
han_windows_ol = hanning(ceil(length(exp_ol.Dmeas.Time(steady_i:end))/2));
[psd_x_ol, freqs_x_ol] = pwelch(exp_ol.Dmeas.Data(steady_i:end, 1), han_windows_ol, 0, [], 1/sim_conf.Ts);
han_windows_cl = hanning(ceil(length(exp_cl.Dmeas.Time(steady_i:end))/2));
[psd_x, freqs_x] = pwelch(exp_cl.Dmeas.Data(steady_i:end, 1), han_windows_cl, 0, [], 1/sim_conf.Ts);
figure;
hold on;
plot(freqs_x_ol, sqrt(psd_x_ol));
plot(freqs_x, sqrt(psd_x));
set(gca,'xscale','log'); set(gca,'yscale','log');
xlabel('Frequency [Hz]'); ylabel('PSD [$m/\sqrt{Hz}$]');
legend({'x - OL', 'x - CL'})
hold off;
exportFig('exp_psd_x', 'normal-normal')

View File

@ -1,65 +0,0 @@
%%
Dmeas.Data = Dmeas.Data - Dmeas.Data(1, :);
%% Time domain X-Y-Z
figure;
hold on;
plot(Dmeas.Time, Dmeas.Data(:, 1));
plot(Dmeas.Time, Dmeas.Data(:, 2));
plot(Dmeas.Time, Dmeas.Data(:, 3));
legend({'x', 'y', 'z'})
hold off;
xlabel('Time [s]'); ylabel('Displacement [m]');
exportFig('tomo_time_translations', 'normal-normal')
%% Time domain angles
figure;
hold on;
plot(Dmeas.Time, Dmeas.Data(:, 4));
plot(Dmeas.Time, Dmeas.Data(:, 5));
legend({'$\theta_x$', '$\theta_y$'})
hold off;
xlabel('Time [s]'); ylabel('Displacement [m]');
exportFig('tomo_time_rotations', 'normal-normal')
%% PSD X-Y-Z
han_windows = hanning(ceil(length(Dmeas.Time)/10));
[psd_x, freqs_x] = pwelch(Dmeas.Data(:, 1), han_windows, 0, [], 1/Ts);
[psd_y, freqs_y] = pwelch(Dmeas.Data(:, 2), han_windows, 0, [], 1/Ts);
[psd_z, freqs_z] = pwelch(Dmeas.Data(:, 3), han_windows, 0, [], 1/Ts);
figure;
hold on;
plot(freqs_x, sqrt(psd_x));
plot(freqs_y, sqrt(psd_y));
plot(freqs_z, sqrt(psd_z));
set(gca,'xscale','log'); set(gca,'yscale','log');
xlabel('Frequency [Hz]'); ylabel('PSD [$m/\sqrt{Hz}$]');
legend({'x', 'y', 'z'})
hold off;
exportFig('tomo_psd_translations', 'normal-normal')
%% PSD X-Y-Z
han_windows = hanning(ceil(length(Dmeas.Time)/10));
[psd_x, freqs_x] = pwelch(Dmeas.Data(:, 4), han_windows, 0, [], 1/Ts);
[psd_y, freqs_y] = pwelch(Dmeas.Data(:, 5), han_windows, 0, [], 1/Ts);
figure;
hold on;
plot(freqs_x, sqrt(psd_x));
plot(freqs_y, sqrt(psd_y));
set(gca,'xscale','log'); set(gca,'yscale','log');
xlabel('Frequency [Hz]'); ylabel('PSD [$rad/s/\sqrt{Hz}$]');
legend({'$\theta_x$', '$\theta_y$'})
hold off;
exportFig('tomo_psd_rotations', 'normal-normal')
%%
save('./data/tomography_exp_ol.mat', 'Dmeas')

View File

@ -1,68 +0,0 @@
%%
clear; close all; clc;
%%
tomo_ol = load('./data/tomography_exp_ol.mat', 'Dmeas');
tomo_cl = load('./data/tomography_exp.mat', 'Dmeas');
%% Compare OL and CL - Time
figure;
hold on;
plot(tomo_ol.Dmeas.Time, tomo_ol.Dmeas.Data(:, 1));
plot(tomo_cl.Dmeas.Time, tomo_cl.Dmeas.Data(:, 1));
legend({'x - OL', 'x - CL'})
hold off;
xlabel('Time [s]'); ylabel('Displacement [m]');
exportFig('tomo_control_time_x', 'normal-normal')
figure;
hold on;
plot(tomo_ol.Dmeas.Time, tomo_ol.Dmeas.Data(:, 2));
plot(tomo_cl.Dmeas.Time, tomo_cl.Dmeas.Data(:, 2));
legend({'y - OL', 'y - CL'})
hold off;
xlabel('Time [s]'); ylabel('Displacement [m]');
exportFig('tomo_control_time_y', 'normal-normal')
figure;
hold on;
plot(tomo_ol.Dmeas.Time, tomo_ol.Dmeas.Data(:, 3));
plot(tomo_cl.Dmeas.Time, tomo_cl.Dmeas.Data(:, 3));
legend({'z - OL', 'z - CL'})
hold off;
xlabel('Time [s]'); ylabel('Displacement [m]');
exportFig('tomo_control_time_z', 'normal-normal')
%%
figure;
hold on;
plot(tomo_ol.Dmeas.Data(:, 1),tomo_ol.Dmeas.Data(:, 3))
plot(tomo_cl.Dmeas.Data(:, 1),tomo_cl.Dmeas.Data(:, 3))
legend({'OL', 'CL'})
hold off;
xlabel('Displacement - $x$ [s]'); ylabel('Displacement - $z$ [m]');
%% Compare OL and CL - PSD
han_windows_ol = hanning(ceil(length(tomo_ol.Dmeas.Time)/10));
[psd_y_ol, freqs_y_ol] = pwelch(tomo_ol.Dmeas.Data(:, 2), han_windows, 0, [], 1/Ts);
han_windows = hanning(ceil(length(tomo_cl.Dmeas.Time)/10));
[psd_y, freqs_y] = pwelch(tomo_cl.Dmeas.Data(:, 2), han_windows, 0, [], 1/Ts);
figure;
hold on;
plot(freqs_y_ol, sqrt(psd_y_ol));
plot(freqs_y, sqrt(psd_y));
set(gca,'xscale','log'); set(gca,'yscale','log');
xlabel('Frequency [Hz]'); ylabel('PSD [$m/\sqrt{Hz}$]');
legend({'y - OL', 'y - CL'})
hold off;
exportFig('tomo_control_psd_y', 'normal-normal')