commit
This commit is contained in:
parent
49e8efbb02
commit
13cf686ad0
52
index.org
52
index.org
@ -1,17 +1,3 @@
|
|||||||
<<<<<<< HEAD
|
|
||||||
#+TITLE:Test of Cercalo
|
|
||||||
:DRAWER:
|
|
||||||
#+STARTUP: overview
|
|
||||||
#+HTML_HEAD: <script type="text/javascript" src="../js/readtheorg.js"></script>
|
|
||||||
|
|
||||||
#+PROPERTY: header-args:matlab :session *MATLAB*
|
|
||||||
#+PROPERTY: header-args:matlab+ :comments org
|
|
||||||
#+PROPERTY: header-args:matlab+ :results output
|
|
||||||
#+PROPERTY: header-args:matlab+ :exports both
|
|
||||||
#+PROPERTY: header-args:matlab+ :eval no-export
|
|
||||||
#+PROPERTY: header-args:matlab+ :output-dir figs
|
|
||||||
:END:
|
|
||||||
=======
|
|
||||||
#+TITLE: Cercalo Test Bench
|
#+TITLE: Cercalo Test Bench
|
||||||
:DRAWER:
|
:DRAWER:
|
||||||
#+STARTUP: overview
|
#+STARTUP: overview
|
||||||
@ -62,11 +48,43 @@ c2d(Gi, Ts, 'tustin')
|
|||||||
|
|
||||||
ans =
|
ans =
|
||||||
|
|
||||||
0.059117 (z+1)
|
0.030459 (z+1)
|
||||||
--------------
|
--------------
|
||||||
(z-0.8818)
|
(z-0.9391)
|
||||||
|
|
||||||
Sample time: 0.0001 seconds
|
Sample time: 0.0001 seconds
|
||||||
Discrete-time zero/pole/gain model.
|
Discrete-time zero/pole/gain model.
|
||||||
#+end_example
|
#+end_example
|
||||||
>>>>>>> add index.org
|
|
||||||
|
#+begin_src matlab
|
||||||
|
load('mat/data_001.mat', 't', 'ux')
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src matlab
|
||||||
|
figure; plot(t, ux)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src matlab
|
||||||
|
[tf_est, freqs] = tfestimate(ux, yx, hanning(ceil(length(ux)/10)), [], [], fs);
|
||||||
|
|
||||||
|
% h = idfrd(tf_est, freqs*2*pi, Ts);
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+begin_src matlab
|
||||||
|
figure;
|
||||||
|
ax1 = subplot(2, 1, 1);
|
||||||
|
hold on;
|
||||||
|
plot(freqs, abs(tf_est),'--')
|
||||||
|
set(gca, 'XScale', 'log'); set(gca, 'YScale', 'log');
|
||||||
|
ylabel('Amplitude [m/N]');
|
||||||
|
hold off;
|
||||||
|
|
||||||
|
ax2 = subplot(2, 1, 2);
|
||||||
|
hold on;
|
||||||
|
plot(freqs, mod(180+180/pi*phase(tf_est), 360)-180,'--')
|
||||||
|
set(gca,'xscale','log');
|
||||||
|
ylim([-180, 180]);
|
||||||
|
yticks([-180, -90, 0, 90, 180]);
|
||||||
|
xlabel('Frequency [$Hz$]'); ylabel('Phase [deg]');
|
||||||
|
hold off;
|
||||||
|
#+end_src
|
||||||
|
Loading…
Reference in New Issue
Block a user