Initial Commit
This commit is contained in:
commit
fe269b02b4
52
.gitignore
vendored
Normal file
52
.gitignore
vendored
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
auto/
|
||||||
|
*.tex
|
||||||
|
*.bbl
|
||||||
|
*.synctex.gz
|
||||||
|
.auctex-auto/
|
||||||
|
_minted*
|
||||||
|
|
||||||
|
# Emacs
|
||||||
|
auto/
|
||||||
|
|
||||||
|
# Simulink Real Time
|
||||||
|
*bio.m
|
||||||
|
*pt.m
|
||||||
|
*ref.m
|
||||||
|
*ri.m
|
||||||
|
*xcp.m
|
||||||
|
*.mldatx
|
||||||
|
*.slxc
|
||||||
|
*.xml
|
||||||
|
*_slrt_rtw/
|
||||||
|
|
||||||
|
# data
|
||||||
|
data/
|
||||||
|
|
||||||
|
# Windows default autosave extension
|
||||||
|
*.asv
|
||||||
|
|
||||||
|
# OSX / *nix default autosave extension
|
||||||
|
*.m~
|
||||||
|
|
||||||
|
# Compiled MEX binaries (all platforms)
|
||||||
|
*.mex*
|
||||||
|
|
||||||
|
# Packaged app and toolbox files
|
||||||
|
*.mlappinstall
|
||||||
|
*.mltbx
|
||||||
|
|
||||||
|
# Generated helpsearch folders
|
||||||
|
helpsearch*/
|
||||||
|
|
||||||
|
# Simulink code generation folders
|
||||||
|
slprj/
|
||||||
|
sccprj/
|
||||||
|
|
||||||
|
# Matlab code generation folders
|
||||||
|
codegen/
|
||||||
|
|
||||||
|
# Simulink autosave extension
|
||||||
|
*.autosave
|
||||||
|
|
||||||
|
# Octave session info
|
||||||
|
octave-workspace
|
BIN
doc/APA300ML.pdf
Normal file
BIN
doc/APA300ML.pdf
Normal file
Binary file not shown.
BIN
doc/Catalog-CPL190290.pdf
Normal file
BIN
doc/Catalog-CPL190290.pdf
Normal file
Binary file not shown.
BIN
doc/IO131-OEM-Datasheet.pdf
Normal file
BIN
doc/IO131-OEM-Datasheet.pdf
Normal file
Binary file not shown.
BIN
doc/L-9517-9678-05-A_Data_sheet_VIONiC_series_en.pdf
Normal file
BIN
doc/L-9517-9678-05-A_Data_sheet_VIONiC_series_en.pdf
Normal file
Binary file not shown.
BIN
doc/L-9517-9862-01-C_Data_sheet_RKLC_EN.pdf
Normal file
BIN
doc/L-9517-9862-01-C_Data_sheet_RKLC_EN.pdf
Normal file
Binary file not shown.
BIN
doc/RS250S.pdf
Normal file
BIN
doc/RS250S.pdf
Normal file
Binary file not shown.
1
index.html
Symbolic link
1
index.html
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
test-bench-nano-hexapod.html
|
89
matlab/identif_analyze.m
Normal file
89
matlab/identif_analyze.m
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
%% Clear Workspace and Close figures
|
||||||
|
clear; close all; clc;
|
||||||
|
|
||||||
|
%% Intialize Laplace variable
|
||||||
|
s = zpk('s');
|
||||||
|
|
||||||
|
addpath('./src/');
|
||||||
|
|
||||||
|
% Test with one APA
|
||||||
|
|
||||||
|
%% Load measurement data for APA number 1
|
||||||
|
load(sprintf('mat/frf_data_%i_sweep_lf.mat', 2), 't', 'Va', 'Vs', 'de', 'da');
|
||||||
|
|
||||||
|
% Compute transfer functions:
|
||||||
|
|
||||||
|
Ts = (t(end) - t(1))/(length(t)-1);
|
||||||
|
Fs = 1/Ts;
|
||||||
|
|
||||||
|
win = hanning(ceil(1*Fs)); % Hannning Windows
|
||||||
|
|
||||||
|
[G_dvf, f] = tfestimate(Va, de, win, [], [], 1/Ts);
|
||||||
|
[G_d, ~] = tfestimate(Va, da, win, [], [], 1/Ts);
|
||||||
|
[G_iff, ~] = tfestimate(Va, Vs, win, [], [], 1/Ts);
|
||||||
|
|
||||||
|
[coh_dvf, ~] = mscohere(Va, de, win, [], [], 1/Ts);
|
||||||
|
[coh_d, ~] = mscohere(Va, da, win, [], [], 1/Ts);
|
||||||
|
[coh_iff, ~] = mscohere(Va, Vs, win, [], [], 1/Ts);
|
||||||
|
|
||||||
|
%%
|
||||||
|
figure;
|
||||||
|
hold on;
|
||||||
|
plot(f, coh_dvf);
|
||||||
|
plot(f, coh_d);
|
||||||
|
plot(f, coh_iff);
|
||||||
|
hold off;
|
||||||
|
set(gca, 'XScale', 'log');
|
||||||
|
|
||||||
|
%%
|
||||||
|
figure;
|
||||||
|
tiledlayout(2, 1, 'TileSpacing', 'None', 'Padding', 'None');
|
||||||
|
|
||||||
|
ax1 = nexttile;
|
||||||
|
hold on;
|
||||||
|
plot(f, abs(G_dvf));
|
||||||
|
plot(f, abs(G_d));
|
||||||
|
hold off;
|
||||||
|
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||||
|
ylabel('Amplitude $V_{out}/V_{in}$ [V/V]'); set(gca, 'XTickLabel',[]);
|
||||||
|
hold off;
|
||||||
|
|
||||||
|
ax2 = nexttile;
|
||||||
|
hold on;
|
||||||
|
plot(f, 180/pi*angle(G_dvf));
|
||||||
|
plot(f, 180/pi*angle(G_d));
|
||||||
|
hold off;
|
||||||
|
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
|
||||||
|
xlabel('Frequency [Hz]'); ylabel('Phase [deg]');
|
||||||
|
hold off;
|
||||||
|
yticks(-360:90:360);
|
||||||
|
|
||||||
|
linkaxes([ax1,ax2],'x');
|
||||||
|
xlim([5, 5e3]);
|
||||||
|
|
||||||
|
figure;
|
||||||
|
tiledlayout(2, 1, 'TileSpacing', 'None', 'Padding', 'None');
|
||||||
|
|
||||||
|
ax1 = nexttile;
|
||||||
|
plot(f, abs(G_iff));
|
||||||
|
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||||
|
ylabel('Amplitude $V_{out}/V_{in}$ [V/V]'); set(gca, 'XTickLabel',[]);
|
||||||
|
hold off;
|
||||||
|
|
||||||
|
ax2 = nexttile;
|
||||||
|
plot(f, 180/pi*angle(G_iff));
|
||||||
|
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'lin');
|
||||||
|
xlabel('Frequency [Hz]'); ylabel('Phase [deg]');
|
||||||
|
hold off;
|
||||||
|
yticks(-360:90:360);
|
||||||
|
|
||||||
|
linkaxes([ax1,ax2],'x');
|
||||||
|
xlim([0.1, 10]);
|
||||||
|
|
||||||
|
% Comparison of all APA
|
||||||
|
|
||||||
|
%% Load all the measurements
|
||||||
|
meas_data = {};
|
||||||
|
for i = 1:7
|
||||||
|
meas_data(i) = {load(sprintf('mat/frf_data_%i.mat', i), 't', 'Va', 'Vs', 'de', 'da')};
|
||||||
|
end
|
BIN
matlab/identif_data.mat
Normal file
BIN
matlab/identif_data.mat
Normal file
Binary file not shown.
BIN
matlab/identif_measure.slx
Normal file
BIN
matlab/identif_measure.slx
Normal file
Binary file not shown.
BIN
matlab/identif_model.slx
Normal file
BIN
matlab/identif_model.slx
Normal file
Binary file not shown.
35
matlab/identif_save.m
Normal file
35
matlab/identif_save.m
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
% =frf_save.m= - Save Data
|
||||||
|
% :PROPERTIES:
|
||||||
|
% :header-args: :tangle matlab/frf_save.m
|
||||||
|
% :END:
|
||||||
|
|
||||||
|
% First, we get data from the Speedgoat:
|
||||||
|
|
||||||
|
tg = slrt;
|
||||||
|
|
||||||
|
f = SimulinkRealTime.openFTP(tg);
|
||||||
|
mget(f, 'data/data.dat');
|
||||||
|
close(f);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
% And we load the data on the Workspace:
|
||||||
|
|
||||||
|
data = SimulinkRealTime.utils.getFileScopeData('data/data.dat').data;
|
||||||
|
|
||||||
|
da = data(:, 1); % Excitation Voltage (input of PD200) [V]
|
||||||
|
de = data(:, 2); % Measured voltage (force sensor) [V]
|
||||||
|
Vs = data(:, 3); % Measurment displacement (encoder) [m]
|
||||||
|
Va = data(:, 4); % Measurement displacement (attocube) [m]
|
||||||
|
t = data(:, end); % Time [s]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
% And we save this to a =mat= file:
|
||||||
|
apa_number = 1;
|
||||||
|
% leg_number = 4;
|
||||||
|
|
||||||
|
save(sprintf('mat/frf_data_leg_coder_%i_noise.mat', apa_number), 't', 'Va', 'Vs', 'de', 'da');
|
||||||
|
% save(sprintf('mat/frf_data_leg_coder_%i_sweep.mat', apa_number), 't', 'Va', 'Vs', 'de', 'da');
|
||||||
|
% save(sprintf('mat/frf_data_leg_coder_%i_noise_hf.mat', apa_number), 't', 'Va', 'Vs', 'de', 'da');
|
||||||
|
% save(sprintf('mat/frf_data_leg_coder_%i_add_mass_closed_circuit.mat', apa_number), 't', 'Va', 'Vs', 'de', 'da');
|
84
matlab/identif_setup.m
Normal file
84
matlab/identif_setup.m
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
%% Clear Workspace and Close figures
|
||||||
|
clear; close all; clc;
|
||||||
|
|
||||||
|
%% Intialize Laplace variable
|
||||||
|
s = zpk('s');
|
||||||
|
|
||||||
|
addpath('./src/');
|
||||||
|
|
||||||
|
%% Simulation configuration
|
||||||
|
Fs = 10e3; % Sampling Frequency [Hz]
|
||||||
|
Ts = 1/Fs; % Sampling Time [s]
|
||||||
|
|
||||||
|
%% Data record configuration
|
||||||
|
Trec_start = 5; % Start time for Recording [s]
|
||||||
|
Trec_dur = 100; % Recording Duration [s]
|
||||||
|
|
||||||
|
Tsim = 2*Trec_start + Trec_dur; % Simulation Time [s]
|
||||||
|
|
||||||
|
%% Shaped Noise
|
||||||
|
V_noise = generateShapedNoise('Ts', 1/Fs, ...
|
||||||
|
'V_mean', 3.25, ...
|
||||||
|
't_start', Trec_start, ...
|
||||||
|
'exc_duration', Trec_dur, ...
|
||||||
|
'smooth_ends', true, ...
|
||||||
|
'V_exc', 0.05/(1 + s/2/pi/10));
|
||||||
|
|
||||||
|
%% Sweep Sine
|
||||||
|
gc = 0.1;
|
||||||
|
xi = 0.5;
|
||||||
|
wn = 2*pi*94.3;
|
||||||
|
|
||||||
|
% Notch filter at the resonance of the APA
|
||||||
|
G_sweep = 0.2*(s^2 + 2*gc*xi*wn*s + wn^2)/(s^2 + 2*xi*wn*s + wn^2);
|
||||||
|
|
||||||
|
V_sweep = generateSweepExc('Ts', Ts, ...
|
||||||
|
'f_start', 10, ...
|
||||||
|
'f_end', 400, ...
|
||||||
|
'V_mean', 3.25, ...
|
||||||
|
't_start', Trec_start, ...
|
||||||
|
'exc_duration', Trec_dur, ...
|
||||||
|
'sweep_type', 'log', ...
|
||||||
|
'V_exc', G_sweep*1/(1 + s/2/pi/500));
|
||||||
|
|
||||||
|
%% High Frequency Shaped Noise
|
||||||
|
[b,a] = cheby1(10, 2, 2*pi*[300 2e3], 'bandpass', 's');
|
||||||
|
wL = 0.005*tf(b, a);
|
||||||
|
|
||||||
|
V_noise_hf = generateShapedNoise('Ts', 1/Fs, ...
|
||||||
|
'V_mean', 3.25, ...
|
||||||
|
't_start', Trec_start, ...
|
||||||
|
'exc_duration', Trec_dur, ...
|
||||||
|
'smooth_ends', true, ...
|
||||||
|
'V_exc', wL);
|
||||||
|
|
||||||
|
%% Sinus excitation with increasing amplitude
|
||||||
|
V_sin = generateSinIncreasingAmpl('Ts', 1/Fs, ...
|
||||||
|
'V_mean', 3.25, ...
|
||||||
|
'sin_ampls', [0.1, 0.2, 0.4, 1, 2, 4], ...
|
||||||
|
'sin_period', 1, ...
|
||||||
|
'sin_num', 5, ...
|
||||||
|
't_start', Trec_start, ...
|
||||||
|
'smooth_ends', true);
|
||||||
|
|
||||||
|
%% Select the excitation signal
|
||||||
|
V_exc = timeseries(V_noise(2,:), V_noise(1,:));
|
||||||
|
|
||||||
|
%% Plot
|
||||||
|
figure;
|
||||||
|
tiledlayout(1, 2, 'TileSpacing', 'Normal', 'Padding', 'None');
|
||||||
|
|
||||||
|
ax1 = nexttile;
|
||||||
|
plot(V_exc(1,:), V_exc(2,:));
|
||||||
|
xlabel('Time [s]'); ylabel('Amplitude [V]');
|
||||||
|
|
||||||
|
ax2 = nexttile;
|
||||||
|
win = hanning(floor(length(V_exc)/8));
|
||||||
|
[pxx, f] = pwelch(V_exc(2,:), win, 0, [], Fs);
|
||||||
|
plot(f, pxx)
|
||||||
|
xlabel('Frequency [Hz]'); ylabel('Power Spectral Density [$V^2/Hz$]');
|
||||||
|
set(gca, 'xscale', 'log'); set(gca, 'yscale', 'log');
|
||||||
|
xlim([1, Fs/2]); ylim([1e-10, 1e0]);
|
||||||
|
|
||||||
|
%% Save data that will be loaded in the Simulink file
|
||||||
|
save('./frf_data.mat', 'Fs', 'Ts', 'Tsim', 'Trec_start', 'Trec_dur', 'V_exc');
|
BIN
matlab/speedgoat_IO318_100k_CI_01585.mat
Normal file
BIN
matlab/speedgoat_IO318_100k_CI_01585.mat
Normal file
Binary file not shown.
57
test-bench-nano-hexapod.html
Normal file
57
test-bench-nano-hexapod.html
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
<?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>
|
||||||
|
<!-- 2021-06-07 lun. 19:00 -->
|
||||||
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||||
|
<title>Nano-Hexapod - Test Bench</title>
|
||||||
|
<meta name="author" content="Dehaeze Thomas" />
|
||||||
|
<meta name="generator" content="Org Mode" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="https://research.tdehaeze.xyz/css/style.css"/>
|
||||||
|
<script type="text/javascript" src="https://research.tdehaeze.xyz/js/script.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="org-div-home-and-up">
|
||||||
|
<a accesskey="h" href="../index.html"> UP </a>
|
||||||
|
|
|
||||||
|
<a accesskey="H" href="../index.html"> HOME </a>
|
||||||
|
</div><div id="content">
|
||||||
|
<h1 class="title">Nano-Hexapod - Test Bench</h1>
|
||||||
|
<div id="table-of-contents">
|
||||||
|
<h2>Table of Contents</h2>
|
||||||
|
<div id="text-table-of-contents">
|
||||||
|
<ul>
|
||||||
|
<li><a href="#orgc63308d">1. Test-Bench Description</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<p>This report is also available as a <a href="./test-bench-nano-hexapod.pdf">pdf</a>.</p>
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<div id="outline-container-orgc63308d" class="outline-2">
|
||||||
|
<h2 id="orgc63308d"><span class="section-number-2">1</span> Test-Bench Description</h2>
|
||||||
|
<div class="outline-text-2" id="text-1">
|
||||||
|
<div class="note" id="org060848e">
|
||||||
|
<p>
|
||||||
|
Here are the documentation of the equipment used for this test bench:
|
||||||
|
</p>
|
||||||
|
<ul class="org-ul">
|
||||||
|
<li>Voltage Amplifier: PiezoDrive <a href="doc/PD200-V7-R1.pdf">PD200</a></li>
|
||||||
|
<li>Amplified Piezoelectric Actuator: Cedrat <a href="doc/APA300ML.pdf">APA300ML</a></li>
|
||||||
|
<li>DAC/ADC: Speedgoat <a href="doc/IO131-OEM-Datasheet.pdf">IO313</a></li>
|
||||||
|
<li>Encoder: Renishaw <a href="doc/L-9517-9678-05-A_Data_sheet_VIONiC_series_en.pdf">Vionic</a> and used <a href="doc/L-9517-9862-01-C_Data_sheet_RKLC_EN.pdf">Ruler</a></li>
|
||||||
|
<li>Interferometers: Attocube</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="postamble" class="status">
|
||||||
|
<p class="author">Author: Dehaeze Thomas</p>
|
||||||
|
<p class="date">Created: 2021-06-07 lun. 19:00</p>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
58
test-bench-nano-hexapod.org
Normal file
58
test-bench-nano-hexapod.org
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
#+TITLE: Nano-Hexapod - Test Bench
|
||||||
|
:DRAWER:
|
||||||
|
#+LANGUAGE: en
|
||||||
|
#+EMAIL: dehaeze.thomas@gmail.com
|
||||||
|
#+AUTHOR: Dehaeze Thomas
|
||||||
|
|
||||||
|
#+HTML_LINK_HOME: ../index.html
|
||||||
|
#+HTML_LINK_UP: ../index.html
|
||||||
|
|
||||||
|
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="https://research.tdehaeze.xyz/css/style.css"/>
|
||||||
|
#+HTML_HEAD: <script type="text/javascript" src="https://research.tdehaeze.xyz/js/script.js"></script>
|
||||||
|
|
||||||
|
#+BIND: org-latex-image-default-option "scale=1"
|
||||||
|
#+BIND: org-latex-image-default-width ""
|
||||||
|
|
||||||
|
#+LaTeX_CLASS: scrreprt
|
||||||
|
#+LaTeX_CLASS_OPTIONS: [a4paper, 10pt, DIV=12, parskip=full]
|
||||||
|
#+LaTeX_HEADER_EXTRA: \input{preamble.tex}
|
||||||
|
|
||||||
|
#+PROPERTY: header-args:matlab :session *MATLAB*
|
||||||
|
#+PROPERTY: header-args:matlab+ :comments org
|
||||||
|
#+PROPERTY: header-args:matlab+ :exports both
|
||||||
|
#+PROPERTY: header-args:matlab+ :results none
|
||||||
|
#+PROPERTY: header-args:matlab+ :eval no-export
|
||||||
|
#+PROPERTY: header-args:matlab+ :noweb yes
|
||||||
|
#+PROPERTY: header-args:matlab+ :mkdirp yes
|
||||||
|
#+PROPERTY: header-args:matlab+ :output-dir figs
|
||||||
|
|
||||||
|
#+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{$HOME/Cloud/tikz/org/}{config.tex}")
|
||||||
|
#+PROPERTY: header-args:latex+ :imagemagick t :fit yes
|
||||||
|
#+PROPERTY: header-args:latex+ :iminoptions -scale 100% -density 150
|
||||||
|
#+PROPERTY: header-args:latex+ :imoutoptions -quality 100
|
||||||
|
#+PROPERTY: header-args:latex+ :results file raw replace
|
||||||
|
#+PROPERTY: header-args:latex+ :buffer no
|
||||||
|
#+PROPERTY: header-args:latex+ :tangle no
|
||||||
|
#+PROPERTY: header-args:latex+ :eval no-export
|
||||||
|
#+PROPERTY: header-args:latex+ :exports results
|
||||||
|
#+PROPERTY: header-args:latex+ :mkdirp yes
|
||||||
|
#+PROPERTY: header-args:latex+ :output-dir figs
|
||||||
|
#+PROPERTY: header-args:latex+ :post pdf2svg(file=*this*, ext="png")
|
||||||
|
:END:
|
||||||
|
|
||||||
|
#+begin_export html
|
||||||
|
<hr>
|
||||||
|
<p>This report is also available as a <a href="./test-bench-nano-hexapod.pdf">pdf</a>.</p>
|
||||||
|
<hr>
|
||||||
|
#+end_export
|
||||||
|
|
||||||
|
* Test-Bench Description
|
||||||
|
|
||||||
|
#+begin_note
|
||||||
|
Here are the documentation of the equipment used for this test bench:
|
||||||
|
- Voltage Amplifier: PiezoDrive [[file:doc/PD200-V7-R1.pdf][PD200]]
|
||||||
|
- Amplified Piezoelectric Actuator: Cedrat [[file:doc/APA300ML.pdf][APA300ML]]
|
||||||
|
- DAC/ADC: Speedgoat [[file:doc/IO131-OEM-Datasheet.pdf][IO313]]
|
||||||
|
- Encoder: Renishaw [[file:doc/L-9517-9678-05-A_Data_sheet_VIONiC_series_en.pdf][Vionic]] and used [[file:doc/L-9517-9862-01-C_Data_sheet_RKLC_EN.pdf][Ruler]]
|
||||||
|
- Interferometers: Attocube
|
||||||
|
#+end_note
|
Loading…
Reference in New Issue
Block a user