diff --git a/Makefile b/Makefile index 15a9337..1ec9b0e 100644 --- a/Makefile +++ b/Makefile @@ -2,11 +2,11 @@ help: @echo "Usage: make " - @echo " hugo - Export the org files to the Hugo website (~/Sites/website)" + @echo " hugo - Export the org files to the Hugo website (org-hugo-base-dir)" hugo: - @files=$$(grep -rli --include='*.org' --exclude-dir=.git '^#+hugo_base_dir:' . | sort); \ - if [ -z "$$files" ]; then echo "No Org file with #+hugo_base_dir found"; exit 1; fi; \ + @files=$$(grep -rli --include='*.org' --exclude-dir=.git '^#+hugo_section:' . | sort); \ + if [ -z "$$files" ]; then echo "No Org file with #+hugo_section found"; exit 1; fi; \ for f in $$files; do \ echo "==> Exporting $$f"; \ emacsclient -e "(with-current-buffer (find-file-noselect \"$(CURDIR)/$${f#./}\") (org-hugo-export-wim-to-md))" > /dev/null || exit 1; \ diff --git a/index.org b/index.org index 87551c0..f5a4ca3 100644 --- a/index.org +++ b/index.org @@ -1,4 +1,10 @@ #+TITLE: Active Damping of Rotating Platforms using Integral Force Feedback +#+hugo_section: research +#+hugo_bundle: dehaeze21_activ_dampin_rotat_platf_using +#+export_file_name: _index +#+hugo_custom_front_matter: :venue "Engineering Research Express" :year 2021 :pubtype "journal" +#+hugo_custom_front_matter: :doi "10.1088/2631-8695/abe803" +#+hugo_custom_front_matter: :code "https://git.tdehaeze.xyz/tdehaeze/dehaeze21_activ_dampin_rotat_platf_using" :DRAWER: #+SUBTITLE: Dehaeze Thomas, Collette Christophe @@ -55,10 +61,3 @@ Dehaeze, T., & Collette, C., Active damping of rotating platforms using integral :UNNUMBERED: t :END: The Matlab scripts that permits to obtain all the results presented in the paper are accessible [[file:matlab/index.org][here]]. - -* Figures ([[file:tikz/index.org][link]]) -:PROPERTIES: -:UNNUMBERED: t -:END: -All the figures in the paper are generated using either [[https://sourceforge.net/projects/pgf/][TikZ]] or [[https://inkscape.org/][Inkscape]]. The code snippets that was used to generate the figures are accessible [[file:tikz/index.org][here]]. - diff --git a/journal/paper.tex b/journal/paper.tex index af238ce..0b56468 100644 --- a/journal/paper.tex +++ b/journal/paper.tex @@ -1,4 +1,4 @@ -% Created 2021-08-27 ven. 18:43 +% Created 2025-11-27 Thu 16:56 % Intended LaTeX compiler: pdflatex \documentclass[10pt]{iopart} @@ -15,8 +15,10 @@ \usetikzlibrary{shapes.misc,arrows,arrows.meta} \usepackage[square,comma,sort&compress,numbers]{natbib} \renewcommand{\bibsection}{\section*{References}} -\date{} -\title{} + + +\usepackage{biblatex} + \begin{document} \title{Active damping of rotating platforms using integral force feedback} @@ -42,30 +44,34 @@ The results reveal that, despite their different implementations, both modified \maketitle % Two Columns output \ioptwocol - \section{Introduction} \label{sec:introduction} There is an increasing need to reduce the undesirable vibration of sensitive equipment in many different fields such as in aerospace industry \cite{hanieh03_activ_stewar,hauge04_sensor_contr_space_based_six,souleille18_concep_activ_mount_space_applic}, semi conductor industry \cite{yoshioka01_activ_microv_isolat_system_hi}, microscopy \cite{lan08_activ_vibrat_isolat_long_range,fleming15_low_order_dampin_track_contr}, gravitational wave detectors \cite{matichard15_seism_isolat_advan_ligo} and particles accelerators \cite{collette10_activ_quadr_stabil_futur_linear_partic_collid,dehaeze18_sampl_stabil_for_tomog_exper}. A common method to reduce vibration is to mount the sensitive equipment on a suspended platform which attenuates the vibrations above the frequency of the suspension modes \cite{reilly06_critic,poel10_explor_activ_hard_mount_vibrat}. \par + In order to further decrease the residual vibrations, active damping can be used for reducing the magnification of the response in the vicinity of the resonances \cite{collette11_review_activ_vibrat_isolat_strat}. Many active damping techniques have been developed over the years such as Positive Position Feedback (PPF) \cite{lin06_distur_atten_precis_hexap_point,fanson90_posit_posit_feedb_contr_large_space_struc}, Integral Force Feedback (IFF) \cite{preumont91_activ} and Direct Velocity Feedback (DVF) \cite{karnopp74_vibrat_contr_using_semi_activ_force_gener,serrand00_multic_feedb_contr_isolat_base_excit_vibrat,preumont02_force_feedb_versus_accel_feedb}. \par + In \cite{preumont92_activ_dampin_by_local_force}, the IFF control scheme has been proposed, where a force sensor, a force actuator and an integral controller are used to directly augment the damping of a mechanical system. When the force sensor is collocated with the actuator, the open-loop transfer function has alternating poles and zeros which facilitate to guarantee the stability of the closed loop system \cite{preumont02_force_feedb_versus_accel_feedb}. It was latter shown that this property holds for multiple collated actuator/sensor pairs \cite{preumont08_trans_zeros_struc_contr_with}. \par + The main advantages of IFF over other active damping techniques are the guaranteed stability even in presence of flexible dynamics, good performances and robustness properties \cite{preumont02_force_feedb_versus_accel_feedb}. \par + Several improvements of the classical IFF have been proposed, such as adding a feed-through term to increase the achievable damping \cite{teo15_optim_integ_force_feedb_activ_vibrat_contr} or adding an high pass filter to recover the loss of compliance at low frequency \cite{chesne16_enhan_dampin_flexib_struc_using_force_feedb}. Recently, an \(\mathcal{H}_\infty\) optimization criterion has been used to derive optimal gains for the IFF controller \cite{zhao19_optim_integ_force_feedb_contr}. \par + However, when the platform is rotating, gyroscopic effects alter the system dynamics and IFF cannot be applied as is. The purpose of this paper is to study how the IFF strategy can be adapted to deal with these gyroscopic effects. \par + The paper is structured as follows. Section \ref{sec:dynamics} presents a simple model of a rotating suspended platform that will be used throughout this study. Section \ref{sec:iff} explains how the unconditional stability of IFF is lost due to gyroscopic effects induced by the rotation. Section \ref{sec:iff_hpf} suggests a simple modification of the control law such that damping can be added to the suspension modes in a robust way. Section \ref{sec:iff_kp} proposes to add springs in parallel with the force sensors to regain the unconditional stability of IFF. Section \ref{sec:comparison} compares both proposed modifications to the classical IFF in terms of damping authority and closed-loop system behavior. - \section{Dynamics of Rotating Platforms} \label{sec:dynamics} In order to study how the rotation affects the use of IFF, a model of a suspended platform on top of a rotating stage is used. @@ -86,6 +92,7 @@ Two reference frames are used: an inertial frame \((\vec{i}_x, \vec{i}_y, \vec{i The position of the payload is represented by \((d_u, d_v, 0)\) expressed in the rotating frame. \par + To obtain the equations of motion for the system represented in Figure \ref{fig:system}, the Lagrangian equations are used: \begin{equation} \label{eq:lagrangian_equations} @@ -120,6 +127,7 @@ The uniform rotation of the system induces two gyroscopic effects as shown in Eq One can verify that without rotation (\(\Omega = 0\)) the system becomes equivalent to two uncoupled one degree of freedom mass-spring-damper systems. \par + To study the dynamics of the system, the differential equations of motions \eqref{eq:eom_coupled} are converted into the Laplace domain and the \(2 \times 2\) transfer function matrix \(\mathbf{G}_d\) from \(\begin{bmatrix}F_u & F_v\end{bmatrix}\) to \(\begin{bmatrix}d_u & d_v\end{bmatrix}\) in Eq. \eqref{eq:Gd_mimo_tf} is obtained. Its elements are shown in Eq. \eqref{eq:Gd_indiv_el}. @@ -158,6 +166,7 @@ For all further numerical analysis in this study, we consider \(\omega_0 = \SI{1 Even though no system with such parameters will be encountered in practice, conclusions can be drawn relative to these parameters such that they can be generalized to any other set of parameters. \par + The poles of \(\mathbf{G}_d\) are the complex solutions \(p\) of Eq. \eqref{eq:poles}. \begin{equation} @@ -220,7 +229,6 @@ For \(\Omega > \omega_0\), the low frequency pair of complex conjugate poles \(p \caption{\label{fig:plant_compare_rotating_speed}Bode plots for \(\mathbf{G}_d\) for several rotational speed \(\Omega\)} \centering \end{figure} - \section{Decentralized Integral Force Feedback} \label{sec:iff} In order to apply IFF to the rotating system, force sensors are added in series with the two actuators (Figure \ref{fig:system_iff}). @@ -240,6 +248,7 @@ The control diagram is schematically shown in Figure \ref{fig:control_diagram_if \end{figure} \par + The forces \(\begin{bmatrix}f_u & f_v\end{bmatrix}\) measured by the two force sensors represented in Figure \ref{fig:system_iff} are described by Eq. \eqref{eq:measured_force}. \begin{equation} \label{eq:measured_force} @@ -298,6 +307,7 @@ This can be explained as follows: a constant force \(F_u\) induces a small displ \end{figure} \par + \label{sec:iff_pure_int} The two IFF controllers \(K_{F}\) consist of a pure integrator as shown in Eq. \eqref{eq:Kf_pure_int} where \(g\) is a scalar representing the gain of the controller. \begin{equation} @@ -326,7 +336,6 @@ The control system is thus canceling the spring forces which makes the suspended In order to apply decentralized IFF to rotating platforms, two solutions are proposed to deal with this instability problem. The first one consists of slightly modifying the control law (Section \ref{sec:iff_hpf}) while the second one consists of adding springs in parallel with the force sensors (Section \ref{sec:iff_kp}). - \section{Integral Force Feedback with High Pass Filter} \label{sec:iff_hpf} As was explained in the previous section, the instability comes in part from the high gain at low frequency caused by the pure integrators. @@ -344,6 +353,7 @@ This modification of the IFF controller is typically done to avoid saturation as This is however not the case in this study as it will become clear in the next section. \par + The loop gains, \(K_F(s)\) times the direct dynamics \(f_u/F_u\), with and without the added HPF are shown in Figure \ref{fig:loop_gain_modified_iff}. The effect of the added HPF limits the low frequency gain as expected. @@ -370,6 +380,7 @@ It is interesting to note that \(g_{\text{max}}\) also corresponds to the contro \end{figure} \par + Two parameters can be tuned for the modified controller in Eq. \eqref{eq:IFF_LHF}: the gain \(g\) and the pole's location \(\omega_i\). The optimal values of \(\omega_i\) and \(g\) are here considered as the values for which the damping of all the closed-loop poles are simultaneously maximized. @@ -397,7 +408,6 @@ Three regions can be observed: \item \(0.02 < \omega_i/\omega_0 < 0.2\): the attainable damping ratio is maximized and is reached for \(g \approx 2\) \item \(0.2 < \omega_i/\omega_0\): the added damping decreases as \(\omega_i/\omega_0\) increases. \end{itemize} - \section{Integral Force Feedback with Parallel Springs} \label{sec:iff_kp} In this section additional springs in parallel with the force sensors are added to counteract the negative stiffness induced by the gyroscopic effects. @@ -413,6 +423,7 @@ The parallel stiffness \(k_p\) then corresponds to the mechanical amplification \end{figure} \par + The forces measured by the two force sensors represented in Figure \ref{fig:system_parallel_springs} are described by Eq. \eqref{eq:measured_force_kp}. \begin{equation} @@ -476,6 +487,7 @@ It is shown that if the added stiffness is higher than the maximum negative stif \end{figure} \par + Even though the parallel stiffness \(k_p\) has no impact on the open-loop poles (as the overall stiffness \(k\) is kept constant), it has a large impact on the transmission zeros. Moreover, as the attainable damping is generally proportional to the distance between poles and zeros \cite{preumont18_vibrat_contr_activ_struc_fourt_edition}, the parallel stiffness \(k_p\) is foreseen to have a large impact on the attainable damping. @@ -497,7 +509,6 @@ This is confirmed by the Figure \ref{fig:opt_damp_alpha} where the attainable cl \includegraphics[scale=1,scale=0.95]{figs/fig16.pdf} \caption{\label{fig:opt_damp_alpha}Optimal damping ratio \(\xi_\text{opt}\) and the corresponding optimal gain \(g_\text{opt}\) as a function of \(\alpha\)} \end{figure} - \section{Comparison and Discussion} \label{sec:comparison} In order to overcome the instability issue of the classical IFF strategy when applied to rotating platforms, two modifications of IFF have been proposed in Sections \ref{sec:iff_hpf} and \ref{sec:iff_kp}. @@ -507,6 +518,7 @@ For the following comparisons, the cut-off frequency for the HPF is set to \(\om These values are chosen based on the discussion about optimal parameters. \par + Figure \ref{fig:comp_root_locus} shows the Root Locus plots for the two proposed IFF modifications. While the two pairs of complex conjugate open-loop poles are identical for both techniques, the transmission zeros are not. This means that the closed-loop behavior of both systems will differ when large control gains are used. @@ -523,6 +535,7 @@ It is interesting to note that the maximum added damping is very similar for bot \end{figure} \par + The two proposed techniques are now compared in terms of closed-loop transmissibility and compliance. The transmissibility is here defined as the transfer function from a displacement of the rotating stage along \(\vec{i}_x\) to the displacement of the payload along the same direction. @@ -557,7 +570,6 @@ It is also confirmed that these two techniques can significantly damp the suspen On can see in Figure \ref{fig:comp_transmissibility} that the problem of the degradation of the transmissibility at high frequency when using passive damping techniques is overcome by the use of IFF. The addition of the HPF or the use of the parallel stiffness also permits to limit the degradation of the compliance as compared with classical IFF (Figure \ref{fig:comp_compliance}). - \section{Conclusion} \label{sec:conclusion} @@ -575,15 +587,12 @@ It was shown that if the stiffness \(k_p\) of the additional springs is larger t While having very different implementations, both proposed modifications are very similar when it comes to the attainable damping and the obtained closed loop system behavior. Future work will focus on the experimental validation of the proposed IFF modifications. - \section*{Data Availability} Matlab \cite{matlab20} was used for this study. The source code is available under a MIT License and archived in Zenodo \cite{dehaeze20_activ_dampin_rotat_posit_platf}. - \section*{Acknowledgments} This research benefited from a FRIA grant (grant number: FC 31597) from the French Community of Belgium. This paper is based on a paper previously presented at the ISMA conference \cite{dehaeze20_activ_dampin_rotat_platf_integ_force_feedb}. - \bibliographystyle{iopart-num} \bibliography{ref} \end{document} diff --git a/matlab/figs-inkscape/comp_root_locus.svg.2020_10_27_14_07_47.0.svg b/matlab/figs-inkscape/comp_root_locus.svg.2020_10_27_14_07_47.0.svg deleted file mode 100644 index b7b2642..0000000 --- a/matlab/figs-inkscape/comp_root_locus.svg.2020_10_27_14_07_47.0.svg +++ /dev/null @@ -1,1339 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/matlab/figs-inkscape/root_locus_iff_kps.svg.2020_10_27_13_58_52.0.svg b/matlab/figs-inkscape/root_locus_iff_kps.svg.2020_10_27_13_58_52.0.svg deleted file mode 100644 index 8571859..0000000 --- a/matlab/figs-inkscape/root_locus_iff_kps.svg.2020_10_27_13_58_52.0.svg +++ /dev/null @@ -1,1357 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/matlab/figs-inkscape/root_locus_modified_iff.svg.2020_10_27_13_34_14.0.svg b/matlab/figs-inkscape/root_locus_modified_iff.svg.2020_10_27_13_34_14.0.svg deleted file mode 100644 index 3f96ff2..0000000 --- a/matlab/figs-inkscape/root_locus_modified_iff.svg.2020_10_27_13_34_14.0.svg +++ /dev/null @@ -1,1151 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/matlab/figs-paper b/matlab/figs-paper index 30fa883..402bced 120000 --- a/matlab/figs-paper +++ b/matlab/figs-paper @@ -1 +1 @@ -../paper/figs \ No newline at end of file +../journal/figs \ No newline at end of file diff --git a/matlab/figs/fig01.pdf b/matlab/figs/fig01.pdf new file mode 100644 index 0000000..b8603ac Binary files /dev/null and b/matlab/figs/fig01.pdf differ diff --git a/matlab/figs/fig01.png b/matlab/figs/fig01.png new file mode 100644 index 0000000..d4ee0ed Binary files /dev/null and b/matlab/figs/fig01.png differ diff --git a/matlab/figs/fig04.pdf b/matlab/figs/fig04.pdf new file mode 100644 index 0000000..5ac81f5 Binary files /dev/null and b/matlab/figs/fig04.pdf differ diff --git a/matlab/figs/fig04.png b/matlab/figs/fig04.png new file mode 100644 index 0000000..34c44ed Binary files /dev/null and b/matlab/figs/fig04.png differ diff --git a/matlab/figs/fig12.pdf b/matlab/figs/fig12.pdf new file mode 100644 index 0000000..0417ca3 Binary files /dev/null and b/matlab/figs/fig12.pdf differ diff --git a/matlab/figs/fig12.png b/matlab/figs/fig12.png new file mode 100644 index 0000000..e76e99e Binary files /dev/null and b/matlab/figs/fig12.png differ diff --git a/matlab/index.org b/matlab/index.org index c3fd6ab..bc6fb67 100644 --- a/matlab/index.org +++ b/matlab/index.org @@ -1,4 +1,7 @@ #+TITLE: Active Damping of Rotating Platforms using Integral Force Feedback - Matlab Computation +#+hugo_section: research/dehaeze21_activ_dampin_rotat_platf_using +#+hugo_bundle: matlab +#+export_file_name: index :DRAWER: #+HTML_LINK_HOME: ../index.html #+HTML_LINK_UP: ../index.html @@ -25,14 +28,8 @@ #+PROPERTY: header-args:matlab+ :output-dir figs :END: -#+begin_export html -
-

This report is also available as a pdf.

-
-#+end_export - * Introduction :ignore: -This document gathers the Matlab code used to for the conference paper cite:dehaeze20_activ_dampin_rotat_platf_integ_force_feedb and the journal paper cite:dehaeze21_activ_dampin_rotat_platf_using. +This document gathers the Matlab code used to for the conference paper [[cite:&dehaeze20_activ_dampin_rotat_platf_integ_force_feedb]] and the journal paper [[cite:&dehaeze21_activ_dampin_rotat_platf_using]]. It is structured in several sections: - Section [[sec:system_description]]: presents a simple model of a rotating suspended platform that will be used throughout this study. @@ -42,7 +39,7 @@ It is structured in several sections: - Section [[sec:comparison]]: compares both proposed modifications to the classical IFF in terms of damping authority and closed-loop system behavior. - Section [[sec:notations]]: contains the notations used for both the Matlab code and the paper -The matlab code is accessible on [[https://zenodo.org/record/3894343][Zonodo]] and [[https://github.com/tdehaeze/dehaeze20_contr_stewa_platf][Github]] cite:dehaeze20_activ_dampin_rotat_posit_platf. It can also be download as a =.zip= file [[file:matlab.zip][here]]. +The matlab code is accessible on [[https://zenodo.org/record/3894343][Zonodo]] and [[https://github.com/tdehaeze/dehaeze20_contr_stewa_platf][Github]] [[cite:&dehaeze20_activ_dampin_rotat_posit_platf]]. It can also be download as a =.zip= file [[file:matlab.zip][here]]. To run the Matlab code, go in the =matlab= directory and run the following Matlab files corresponding to each section. @@ -80,7 +77,7 @@ The system consists of one 2 degree of freedom translation stage on top of a spi #+name: fig:system #+caption: Schematic of the studied system -[[file:figs-paper/system.png]] +[[file:figs/fig04.png]] The control inputs are the forces applied by the actuators of the translation stage ($F_u$ and $F_v$). As the translation stage is rotating around the Z axis due to the spindle, the forces are applied along $\vec{i}_u$ and $\vec{i}_v$. @@ -439,7 +436,7 @@ Two identical controllers $K_F$ are used to feedback each of the sensed force to #+name: fig:system_iff #+caption: System with added Force Sensor in series with the actuators -[[file:figs-paper/system_iff.png]] +[[file:figs/fig01.png]] ** Matlab Init :noexport:ignore: #+begin_src matlab :tangle no :exports none :results silent :noweb yes :var current_dir=(file-name-directory buffer-file-name) @@ -1180,7 +1177,7 @@ In this section additional springs in parallel with the force sensors are added #+name: fig:system_parallel_springs #+caption: Studied system with additional springs in parallel with the actuators and force sensors -[[file:figs-paper/system_parallel_springs.png]] +[[file:figs/fig12.png]] In order to keep the overall stiffness $k = k_a + k_p$ constant, a scalar parameter $\alpha$ ($0 \le \alpha < 1$) is defined to describe the fraction of the total stiffness in parallel with the actuator and force sensor \begin{equation} diff --git a/tikz/config.html b/tikz/config.html deleted file mode 100644 index f1b7eef..0000000 --- a/tikz/config.html +++ /dev/null @@ -1,964 +0,0 @@ - - - - - - -LaTeX Configuration for Tikz export - - - - - - -
- UP - | - HOME -
-

LaTeX Configuration for Tikz export

- - -
-

1 Packages

-
-
-
\usepackage[utf8]{inputenc}
-\usepackage[T1]{fontenc}
-
-\usepackage[french, english]{babel} % Last language is main language
-
-\usepackage{lmodern} % Latin Modern Font
-\usepackage{gensymb} % Generic symbols for both text and math mode
-
-\usepackage{standalone} % Used to generate standalone Tikz
-
-\usepackage{amsmath}   % Main math Package
-\usepackage{mathtools} % Extension package to amsmath
-\usepackage{amsthm}    % Typesetting theorems (AMS style)
-\usepackage{amsfonts}  % More fonts from the AMS
-\usepackage{textcomp}  % provide many text symbols
-\usepackage{steinmetz} % For phase symbol
-
-\usepackage{xstring}  % Utils to manipulate strings
-\usepackage{etoolbox} % Add basic if/then
-\usepackage{esvect}   % Beautyfull vectors
-\usepackage{graphicx} % Enhanced support for graphics
-\usepackage{grffile}  % Used by matlab2tikz
-
-\usepackage{microtype} % typographic tuning
-\usepackage{setspace}  % for line spacing, e.g. \onehalfspacing
-\usepackage{tabularx}  % table features
-\usepackage{enumitem}  % for simple list modifications
-\usepackage{booktabs}  % better table support
-
-\usepackage{stackengine} %
-
-\usepackage[load-configurations=abbreviations]{siunitx} % SI units
-\sisetup{
-    locale = US,
-    detect-all,
-    range-phrase=--,
-    range-units=single
-}
-
-
-
-
- -
-

2 Tikz related packages

-
-
-
\usepackage{tikz}       % Tikz
-\usepackage{tikzscale}  % Used to scale Tikz graphics
-\usepackage{adjustbox}  % Used to proper positioning of tikz pictures
-\usepackage{circuitikz} % Draw electronic circuits
-\usepackage{pgfpages}   % Needed to use notes
-\usepackage{pgfplots}   % Used to plot functions
-
-
-
-
- -
-

3 Tikz Libraries

-
-
-
\usetikzlibrary{arrows}                   % Arrow tip library
-\usetikzlibrary{arrows.meta}              % Add some arrows
-\usetikzlibrary{calc}                     % The library allows advanced Coordinate Calculations
-\usetikzlibrary{intersections}            % calculate intersections of paths
-\usetikzlibrary{matrix}                   %
-\usetikzlibrary{patterns}                 %
-\usetikzlibrary{shapes}                   % Defines circle and rectangle
-\usetikzlibrary{shapes.geometric}         % Use for the shape diamond and isosceles triangle
-\usetikzlibrary{snakes}                   % snake=coil and snake=zigzag using segment amplitude=10pt
-\usetikzlibrary{positioning}              % Additional options for placing nodes
-\usetikzlibrary{3d}                       % Plot 3D shapes
-\usetikzlibrary{spy}                      % Creating a magnified area
-\usetikzlibrary{decorations.text}         % Used to make text follows a curve
-\usetikzlibrary{decorations.pathmorphing} % deformation of a path
-\usetikzlibrary{decorations.markings}     % Used for spring and damper
-\usetikzlibrary{babel}                    % A tiny library that make the interaction with the babel package easier
-\usetikzlibrary{plotmarks}                % This library defines a number of plot marks
-\usetikzlibrary{fit}                      % Used to make rectangle as nodes by specifying two points
-\usetikzlibrary{backgrounds}              % Used to put things under others
-
-
-
-
- -
-

4 PGF Plot libraries and config

-
-
-
\usepgfplotslibrary{patchplots}
-\usepgfplotslibrary{groupplots}
-
-\pgfplotsset{compat=newest}
-\pgfplotsset{plot coordinates/math parser=false}
-
-
-
-
- -
-

5 Setup size of figures

-
-
-
\newlength{\fheight}
-\newlength{\fwidth}
-
-\setlength{\fwidth}{85mm}
-\setlength{\fheight}{112mm}
-
-
-
-
- -
-

6 Setup Arrows style

-
-
-
\tikzset{>=Stealth}
-% Setup default Linewidth
-\tikzset{every path/.style={line width=1pt}}
-
-
-
-
- -
-

7 Colors

-
-
-
\usepackage{xcolor}% Color extension
-
-\definecolor{colorblack}{rgb}{0, 0, 0}
-\definecolor{colorblue}{rgb}{0, 0.4470, 0.7410}
-\definecolor{colorred}{rgb}{0.8500, 0.3250, 0.0980}
-\definecolor{coloryellow}{rgb}{0.9290, 0.6940, 0.1250}
-\definecolor{colorpurple}{rgb}{0.4940, 0.1840, 0.5560}
-\definecolor{colorgreen}{rgb}{0.4660, 0.6740, 0.1880}
-\definecolor{colorcyan}{rgb}{0.3010, 0.7450, 0.9330}
-\definecolor{colorbordeau}{rgb}{0.6350, 0.0780, 0.1840}
-
-% Main color
-\definecolor{maincolor}{RGB}{89, 9, 38}
-\definecolor{secondcolor}{RGB}{20, 9, 89}
-
-
-
-
- -
-

8 Control

-
-
-
-

8.1 Blocks

-
-
-
\tikzset{%
-  block/.style n args={2}{%
-    draw,
-    fill=white,
-    minimum width  = #1,
-    minimum height = #2,
-  },
-  block/.default={1.2cm}{1.0cm}
-}
-
-
-
-
- -
-

8.2 Branches

-
-
-
\tikzstyle{branch}=[fill,shape=circle,minimum size=4pt,inner sep=0pt]
-\tikzstyle{->top}=[-{Stealth[color=black, scale=0.8]}, draw=white, double=black, double distance=1pt, line width=1pt]
-\tikzstyle{<-top}=[{stealth[color=black, scale=0.8]}-, draw=white, double=black, double distance=1pt, line width=1pt]
-
-
-
-
- -
-

8.3 Hand Writen Style

-
-

-Usefull for schematic plots -

-
-
\tikzstyle{handwriten}=[decorate,decoration={random steps,amplitude=0.1pt,segment length=0.8pt}]
-
-
-
-
- -
-

8.4 DAC

-
-
-
\tikzset{%
-  DAC/.style={%
-    draw,
-    signal,
-  }
-}
-
-
-
-
- -
-

8.5 ADC

-
-
-
\tikzset{%
-  ADC/.style={%
-    draw,
-    signal,
-    signal to = west,
-  }
-}
-
-
-
-
- -
-

8.6 Gain

-
-

-Maybe use isosceles instead of regular polygon? -

-
-
\tikzset{%
-  gain right/.style={%
-    draw,
-    regular polygon,
-    regular polygon sides = 3,
-    inner sep = 2pt,
-    shape border rotate=-90
-  },
-  gain left/.style={%
-    draw,
-    regular polygon,
-    regular polygon sides = 3,
-    inner sep = 2pt,
-    shape border rotate=90
-  },
-  gain top/.style={%
-    draw,
-    regular polygon,
-    regular polygon sides = 3,
-    inner sep = 2pt,
-    shape border rotate=0
-  },
-  gain bottom/.style={%
-    draw,
-    regular polygon,
-    regular polygon sides = 3,
-    inner sep = 2pt,
-    shape border rotate=180
-  },
-}
-
-
-
-
- -
-

8.7 Add / Substract / Divide / Multiply block

-
-
-
\tikzset{% Add block with Circled operations
-  addc/.style n args={5}{%
-    draw,
-    fill=white,
-    circle,
-    outer sep = 0pt,
-    inner sep = 0pt,
-    minimum size = 2em,
-    execute at begin node={\LARGE $#1$},
-    append after command={\pgfextra{\let\mainnode=\tikzlastnode}
-      \ifx#2\empty\else
-      node[draw, circle, outer sep=6pt, inner sep=0pt, above left] at (\mainnode.west) {$#2$}%
-      \fi
-      \ifx#3\empty\else
-      node[draw, circle, outer sep=6pt, inner sep=0pt, above right] at (\mainnode.north) {$#3$}%
-      \fi
-      \ifx#4\empty\else
-      node[draw, circle, outer sep=6pt, inner sep=0pt, below right] at (\mainnode.east) {$#4$}%
-      \fi
-      \ifx#5\empty\else
-      node[draw, circle, outer sep=6pt, inner sep=0pt, below left] at (\mainnode.south) {$#5$}%
-      \fi
-      }
-  },
-  addc/.default={+}{}{}{}{},
-}
-
-
- -
-
\tikzset{% Add Block
-  addb/.style n args={5}{%
-    draw,
-    fill=white,
-    circle,
-    outer sep = 0pt,
-    inner sep = 0pt,
-    minimum size = 2em,
-    execute at begin node={\LARGE $#1$},
-    append after command={\pgfextra{\let\mainnode=\tikzlastnode}
-      \ifx#2\empty\else
-      node[outer sep=2pt, inner sep=0pt, above left] at (\mainnode.west) {$#2$}%
-      \fi
-      \ifx#3\empty\else
-      node[outer sep=2pt, inner sep=0pt, above right] at (\mainnode.north) {$#3$}%
-      \fi
-      \ifx#4\empty\else
-      node[outer sep=2pt, inner sep=0pt, below right] at (\mainnode.east) {$#4$}%
-      \fi
-      \ifx#5\empty\else
-      node[outer sep=2pt, inner sep=0pt, below left] at (\mainnode.south) {$#5$}%
-      \fi
-      }
-  },
-  addb/.default={+}{}{}{}{},
-}
-
-
-
-
-
- -
-

9 Plots

-
-
-
-

9.1 Grid

-
-
-
\pgfplotsset{grid style={black}}
-\pgfplotsset{major grid style={black!30!white}}
-\pgfplotsset{minor grid style={black!10!white}}
-\pgfplotsset{xmajorgrids}
-\pgfplotsset{ymajorgrids}
-
-
-
-
- -
-

9.2 Lines

-
-
-
\pgfplotsset{separate axis lines=false} % draw axis as rectangle and not as 4 lines
-\pgfplotsset{every outer x axis line/.append style={black}}
-\pgfplotsset{every outer y axis line/.append style={black}}
-\pgfplotsset{axis background/.style={fill=white}}
-\pgfplotsset{axis x line*=bottom} % solid line on the bottom with thin on the top
-\pgfplotsset{axis y line*=left} % solid line on the left with thin on the right
-
-
-
-
- -
-

9.3 Ticks

-
-
-
\pgfplotsset{every y tick label/.append style={font=\color{black}}}
-\pgfplotsset{every y tick/.append style={black}}
-\pgfplotsset{every x tick label/.append style={font=\color{black}}}
-\pgfplotsset{every x tick/.append style={black}}
-
-
-
-
- -
-

9.4 Size

-
-

-If scale only axis=false (the default), pgfplots will try to produce the desired width including labels, titles and ticks. -

-
-
\pgfplotsset{scale only axis=true}
-
-
-
-
- -
-

9.5 Label

-
-

-Used to align all of ylabel of one figure. -

-
-
\pgfplotsset{ylabel absolute}
-
-
-
-
- -
-

9.6 Legend

-
-
-
% https://tex.stackexchange.com/questions/54794/using-a-pgfplots-style-legend-in-a-plain-old-tikzpicture#54834
-
-% argument #1: any options
-\newenvironment{customlegend}[1][]{%
-  \begingroup
-  % inits/clears the lists (which might be populated from previous
-  % axes):
-  \csname pgfplots@init@cleared@structures\endcsname
-  \pgfplotsset{#1}%
-}{%
-  % draws the legend:
-  \csname pgfplots@createlegend\endcsname
-  \endgroup
-}%
-
-% makes \addlegendimage available (typically only available within an
-% axis environment):
-\def\addlegendimage{\csname pgfplots@addlegendimage\endcsname}
-
-% definition to insert numbers
-% \pgfkeys{/pgfplots/number in legend/.style={%
-%     /pgfplots/legend image code/.code={%
-%       \node at (0.125,-0.0225){#1}; % <= changed x value
-%     },%
-%   },
-% }
-\pgfplotsset{
-  every legend to name picture/.style={west}
-}
-
-
-
-
- -
-

9.7 Upper and Lower bounds

-
-
-
\tikzstyle{upperbound}=[line cap=round, postaction={decorate,draw,decoration={border, segment length=0.2cm, amplitude=0.3cm, angle=60}}]
-\tikzstyle{lowerbound}=[line cap=round, postaction={decorate,draw,decoration={border, segment length=0.2cm, amplitude=0.3cm, angle=-60}}]
-
-
- -

-And we add the corresdonding -

-
-
\pgfplotsset{
-  /pgfplots/upperbound/.style 1 args={
-    legend image code/.code={
-      \draw[##1, upperbound]
-        plot coordinates {
-        (0cm,0cm)
-        (0.6cm,0cm)
-      }
-    }
-  }
-}
-
-
-
-
- -
-

9.8 Pole

-
-
-
\tikzset{%
-  pole/.style{%
-    color=red,
-    cross out,
-    draw,
-    inner sep=0pt,
-    outer sep=0pt,
-    minimum size=#1pt
-  },
-  pole/.default={4}
-}
-
-
-
-
- -
-

9.9 Zero

-
-
-
\tikzset{%
-  zero/.style{%
-    color=red,
-    circle,
-    draw,
-    inner sep=0pt,
-    outer sep=0pt,
-    minimum size=#1pt
-  },
-  zero/.default={4}
-}
-
-
-
-
-
- -
-

10 Mechanical

-
-
-
-

10.1 Spring

-
-
-
\tikzset{%
-  spring/.style={%
-    thick,
-    decoration={
-      zigzag,
-      pre length  = #1cm,
-      post length = #1cm,
-      segment length = 6
-    },
-    decorate
-  },
-  spring/.default={0.2}
-}
-
-
-
-
- -
-

10.2 Coil

-
-
-
\tikzset{%
-  coil/.style n args={2}{%
-    thick,
-    decoration={
-      coil,
-      pre length  = #1cm,
-      post length = #2cm,
-      segment length = 4
-    },
-    decorate
-  },
-  coil/.default={0.3}{0.3}
-}
-
-
-
-
- -
-

10.3 Damper

-
-
-
\tikzset{%
-  damper/.style n args={2}{%
-    thick,
-    decoration={markings, mark connection node=dmp, mark=at position 0.5 with {
-        \node (dmp) [thick,
-                     inner sep = 0pt,
-                     transform shape,
-                     rotate  =-90,
-                     minimum width  = #1pt,
-                     minimum height = #2pt,
-                     draw=none] {};
-        \draw [thick] ($(dmp.north east)+(0.6*#2pt,0)$) -- (dmp.south east) -- (dmp.south west) -- ($(dmp.north west)+(0.6*#2pt,0)$);
-        \draw [thick] ($(dmp.north)+(0,-0.3*#1pt)$) -- ($(dmp.north)+(0,0.3*#1pt)$);
-      }
-    },
-    decorate
-  },
-  damper/.default={12}{3}
-}
-
-
-
-
- -
-

10.4 Actuator

-
-
-
\tikzset{%
-  actuator/.style n args={2}{%
-    thick,
-    draw=none,
-    decoration={
-      markings,
-      mark connection node=my node,
-      mark=at position .5 with {
-        \node [draw, inner sep=0pt, minimum width=#1cm, minimum height=#2cm,
-        transform shape, fill=white] (my node) {};
-      },
-      mark=at position .0 with {
-        \draw[<-] (0, 0) -- (my node);
-      },
-      mark=at position 1.0 with {
-        \draw[<-] (0, 0) -- (my node);
-      }
-    },
-    decorate
-  },
-  actuator/.default={0.5}{0.2}
-}
-
-
-
-
- -
-

10.5 Ground

-
-
-
\tikzset{%
-  ground/.style n args={2}{%
-    fill,
-    pattern = north east lines,
-    draw = none,
-    anchor = north,
-    minimum width  = #1cm,
-    minimum height = #2cm,
-    append after command={
-      (\tikzlastnode.north west) edge (\tikzlastnode.north east)
-    }
-  },
-  ground/.default={2.5}{0.3}
-}
-
-
-
-
- -
-

10.6 Force Sensor

-
-
-
\tikzset{%
-  forcesensor/.style n args={2}{%
-    rectangle,
-    outer sep=0pt,
-    inner sep=0pt,
-    draw=black,
-    fill=white!60!black,
-    anchor=south,
-    minimum width =#1cm,
-    minimum height=#2cm,
-    append after command={
-      [every edge/.append style={
-        thick,
-        black,
-      }]
-      (\tikzlastnode.north west) edge (\tikzlastnode.south east)
-      (\tikzlastnode.north east) edge (\tikzlastnode.south west)
-    }
-  },
-  forcesensor/.default={2.0}{0.5}
-}
-
-
-
-
- -
-

10.7 Inertial Sensor

-
-
-
\tikzset{%
-  inertialsensor/.style={%
-    rectangle,
-    outer sep=0pt,
-    inner sep=0pt,
-    draw=black,
-    fill=white!60!black,
-    anchor=south east,
-    minimum size=#1cm,
-    append after command={
-      [every edge/.append style={
-        thick,
-        black,
-      }]
-      (\tikzlastnode.north west) edge (\tikzlastnode.south east)
-      (\tikzlastnode.north east) edge (\tikzlastnode.south west)
-    }
-  },
-  inertialsensor/.default={0.3}
-}
-
-
-
-
- -
-

10.8 Axis Rotator

-
-
-
\newcommand{\AxisRotator}[1][rotate=0]{%
-  \tikz [x=0.1cm,y=0.30cm,-stealth,#1] \draw (0,0) arc (-150:150:1 and 1);%
-}
-
-
-
-
- -
-

10.9 Cross

-
-
-
\tikzstyle{cross}=[path picture={
-  \draw[black]
-  (path picture bounding box.south east) -- (path picture bounding box.north west) (path picture bounding box.south west) -- (path picture bounding box.north east);
-}]
-
-
-
-
-
- -
-

10.10 Piezoelectric actuator

-
-
-
\tikzset{%
-  piezo/.style n args={3}{%
-    draw,
-    rectangle,
-    minimum width  = #1cm,
-    minimum height = #2cm,
-    fill=blue!10!white,
-    anchor=center,
-    append after command={
-      [every edge/.append style={
-        thick,
-        black,
-      }]
-      \foreach \i in {1,...,#3}{
-        (${\i/(1+#3)}*(\tikzlastnode.north west)+{(1+#3-\i)/(1+#3)}*(\tikzlastnode.south west)+0.1*(#1,0)$) edge (${\i/(1+#3)}*(\tikzlastnode.north east)+{(1+#3-\i)/(1+#3)}*(\tikzlastnode.south east)-0.1*(#1,0)$)
-      }
-    }
-  },
-  piezo/.default={2}{4}{10}
-}
-
-
-
-
- -
-

10.11 Voice coil

-
-
-
\def\voicecoil#1#2#3{
-  % ======================
-  % Parameters
-  % ======================
-  \def\voicecoilw{#1} % Total Width
-  \def\voicecoilh{#2} % Total Height
-
-  \def\magnetw{\voicecoilw} % Width of the magnet
-  \def\magneth{\voicecoilh/1.4} % Height of the magnet
-
-  \def\magnetwb{0.15*\magnetw} % Width of the borders of the magnet
-  \def\magnetmw{0.15*\magnetw} % Width of the middle part of the magnet
-  \def\magnetwg{0.5*\magnetw} % Width of the gap of the magnet
-
-  \def\magnethl{\magnetwb} % Height of the low part of the magnet
-  \def\magnetmh{0.15*\magneth} % Height of the middle part of the magnet
-  \def\magnethg{0.2*\magneth} % Height of the gap of the magnet
-  % ======================
-
-  \begin{scope}[shift={(0.5*\voicecoilw, 0.5*\voicecoilh)}, rotate=#3, shift={(0, -0.5*\voicecoilh)}]
-    % ======================
-    % Magnet
-    % ======================
-    \draw[fill=white] (0, 0) -| ++(0.5*\magnetw, \magneth) -| ++(-0.5*\magnetw+0.5*\magnetwg, -\magnethg) -| (0.5*\magnetw-\magnetwb, \magnethl) -| (-0.5*\magnetw+\magnetwb, \magneth-\magnethg) -| (-0.5*\magnetwg, \magneth) -| (-0.5*\magnetw, 0) -- (cycle);
-    \begin{scope}[shift={(0, \magnethl)}]
-      \draw[fill=red]  (-0.5*\magnetmw, 0) rectangle (0.5*\magnetmw, \magnetmh);
-      \draw[fill=blue] (-0.5*\magnetmw, \magnetmh) rectangle (0.5*\magnetmw, 2*\magnetmh);
-      % Top conductive Magnet
-      \draw[fill=white] (-0.5*\magnetmw, 2*\magnetmh) -| (0.5*\magnetmw, -\magnethl+\magneth-\magnethg) -| ++(0.1, \magnethg) -| ++(-0.2-\magnetmw, -\magnethg) -| (-0.5*\magnetmw, \magnetmh);
-    \end{scope}
-    % ======================
-
-    % ======================
-    % Coil
-    % ======================
-    \pgfmathsetmacro{\coilwidth}{0.5*0.5*\magnetmw+0.5*0.1+0.25*\magnetwg}%
-    \draw[] ( \coilwidth, 0.5*\magneth) -- ++(0, 0.7*\magneth);
-    \draw[] (-\coilwidth, 0.5*\magneth) -- ++(0, 0.7*\magneth);
-    % Point on the coil
-    \foreach \x in {0,1,...,9}
-    {
-      \node[circle,inner sep=0.6pt,fill] at ( \coilwidth, \x*0.7*\magneth/10+0.5*\magneth);
-      \node[circle,inner sep=0.6pt,fill] at (-\coilwidth, \x*0.7*\magneth/10+0.5*\magneth);
-    }
-    \draw[fill=white] (-0.5*\magnetw, 1.2*\magneth) rectangle ++(\magnetw, \magnethg);
-    % ======================
-
-    % ======================
-    % Coordinates
-    % ======================
-    % Force
-    \coordinate[] (vc_force) at (0, \magneth-0.5*\magnethg);
-    % Coil
-    \coordinate[] (vc_coil) at (0, \voicecoilh);
-    % Magnet
-    \coordinate[] (vc_magnet) at (0, 0);
-    % Coil Wires
-    \coordinate[] (vc_wire_one) at ( \coilwidth, 1.2*\magneth);
-    \coordinate[] (vc_wire_two) at (-\coilwidth, 1.2*\magneth);
-    % ======================
-  \end{scope}
-}
-
-
-
-
-
- -
-

11 Optics

-
-
-
\tikzset{%
-  ->-/.style={
-    decoration={
-      markings,
-      mark = at position #1 with {\arrow{>}
-      }
-    },
-    postaction={decorate}
-  }
-}
-\tikzset{%
-  -<-/.style={
-    decoration={
-      markings,
-      mark = at position #1 with {\arrow{<}
-      }
-    },
-    postaction={decorate}
-  }
-}
-
-
-
-
- -
-

12 Misc

-
-
-
\tikzset{%
-  labelc/.style= {%
-    draw,
-    fill=white,
-    shape=circle,
-    inner sep=2pt,
-    outer sep=6pt,
-  }
-}
-
-
-
-
-
-
-

Author: Thomas Dehaeze

-

Created: 2020-11-12 jeu. 10:40

-
- - diff --git a/tikz/config.org b/tikz/config.org deleted file mode 100644 index 7b9a8bf..0000000 --- a/tikz/config.org +++ /dev/null @@ -1,689 +0,0 @@ -#+TITLE: LaTeX Configuration for Tikz export -:drawer: -#+HTML_LINK_HOME: ../index.html -#+HTML_LINK_UP: ../index.html - -#+HTML_HEAD: -#+HTML_HEAD: - -#+PROPERTY: header-args:latex+ :tangle config.tex -#+PROPERTY: header-args:latex+ :exports code -:end: - -* Packages -#+begin_src latex -\usepackage[utf8]{inputenc} -\usepackage[T1]{fontenc} - -\usepackage[french, english]{babel} % Last language is main language - -\usepackage{lmodern} % Latin Modern Font -\usepackage{gensymb} % Generic symbols for both text and math mode - -\usepackage{standalone} % Used to generate standalone Tikz - -\usepackage{amsmath} % Main math Package -\usepackage{mathtools} % Extension package to amsmath -\usepackage{amsthm} % Typesetting theorems (AMS style) -\usepackage{amsfonts} % More fonts from the AMS -\usepackage{textcomp} % provide many text symbols -\usepackage{steinmetz} % For phase symbol - -\usepackage{xstring} % Utils to manipulate strings -\usepackage{etoolbox} % Add basic if/then -\usepackage{esvect} % Beautyfull vectors -\usepackage{graphicx} % Enhanced support for graphics -\usepackage{grffile} % Used by matlab2tikz - -\usepackage{microtype} % typographic tuning -\usepackage{setspace} % for line spacing, e.g. \onehalfspacing -\usepackage{tabularx} % table features -\usepackage{enumitem} % for simple list modifications -\usepackage{booktabs} % better table support - -\usepackage{stackengine} % - -\usepackage[load-configurations=abbreviations]{siunitx} % SI units -\sisetup{ - locale = US, - detect-all, - range-phrase=--, - range-units=single -} -#+end_src - -* Tikz related packages -#+begin_src latex - \usepackage{tikz} % Tikz - \usepackage{tikzscale} % Used to scale Tikz graphics - \usepackage{adjustbox} % Used to proper positioning of tikz pictures - \usepackage{circuitikz} % Draw electronic circuits - \usepackage{pgfpages} % Needed to use notes - \usepackage{pgfplots} % Used to plot functions -#+end_src - -* Tikz Libraries -#+begin_src latex - \usetikzlibrary{arrows} % Arrow tip library - \usetikzlibrary{arrows.meta} % Add some arrows - \usetikzlibrary{calc} % The library allows advanced Coordinate Calculations - \usetikzlibrary{intersections} % calculate intersections of paths - \usetikzlibrary{matrix} % - \usetikzlibrary{patterns} % - \usetikzlibrary{shapes} % Defines circle and rectangle - \usetikzlibrary{shapes.geometric} % Use for the shape diamond and isosceles triangle - \usetikzlibrary{snakes} % snake=coil and snake=zigzag using segment amplitude=10pt - \usetikzlibrary{positioning} % Additional options for placing nodes - \usetikzlibrary{3d} % Plot 3D shapes - \usetikzlibrary{spy} % Creating a magnified area - \usetikzlibrary{decorations.text} % Used to make text follows a curve - \usetikzlibrary{decorations.pathmorphing} % deformation of a path - \usetikzlibrary{decorations.markings} % Used for spring and damper - \usetikzlibrary{babel} % A tiny library that make the interaction with the babel package easier - \usetikzlibrary{plotmarks} % This library defines a number of plot marks - \usetikzlibrary{fit} % Used to make rectangle as nodes by specifying two points - \usetikzlibrary{backgrounds} % Used to put things under others -#+end_src - -* PGF Plot libraries and config -#+begin_src latex - \usepgfplotslibrary{patchplots} - \usepgfplotslibrary{groupplots} - - \pgfplotsset{compat=newest} - \pgfplotsset{plot coordinates/math parser=false} -#+end_src - -* Setup size of figures -#+begin_src latex - \newlength{\fheight} - \newlength{\fwidth} - - \setlength{\fwidth}{85mm} - \setlength{\fheight}{112mm} -#+end_src - -* Setup Arrows style -#+begin_src latex - \tikzset{>=Stealth} - % Setup default Linewidth - \tikzset{every path/.style={line width=1pt}} -#+end_src - -* Colors -#+begin_src latex - \usepackage{xcolor}% Color extension - - \definecolor{colorblack}{rgb}{0, 0, 0} - \definecolor{colorblue}{rgb}{0, 0.4470, 0.7410} - \definecolor{colorred}{rgb}{0.8500, 0.3250, 0.0980} - \definecolor{coloryellow}{rgb}{0.9290, 0.6940, 0.1250} - \definecolor{colorpurple}{rgb}{0.4940, 0.1840, 0.5560} - \definecolor{colorgreen}{rgb}{0.4660, 0.6740, 0.1880} - \definecolor{colorcyan}{rgb}{0.3010, 0.7450, 0.9330} - \definecolor{colorbordeau}{rgb}{0.6350, 0.0780, 0.1840} - - % Main color - \definecolor{maincolor}{RGB}{89, 9, 38} - \definecolor{secondcolor}{RGB}{20, 9, 89} -#+end_src - -* Control -** Blocks -#+begin_src latex - \tikzset{% - block/.style n args={2}{% - draw, - fill=white, - minimum width = #1, - minimum height = #2, - }, - block/.default={1.2cm}{1.0cm} - } -#+end_src - -** TODO Branches -#+begin_src latex - \tikzstyle{branch}=[fill,shape=circle,minimum size=4pt,inner sep=0pt] - \tikzstyle{->top}=[-{Stealth[color=black, scale=0.8]}, draw=white, double=black, double distance=1pt, line width=1pt] - \tikzstyle{<-top}=[{stealth[color=black, scale=0.8]}-, draw=white, double=black, double distance=1pt, line width=1pt] -#+end_src - -** TODO Hand Writen Style -Usefull for schematic plots -#+begin_src latex - \tikzstyle{handwriten}=[decorate,decoration={random steps,amplitude=0.1pt,segment length=0.8pt}] -#+end_src - -** DAC -#+begin_src latex - \tikzset{% - DAC/.style={% - draw, - signal, - } - } -#+end_src - -** ADC -#+begin_src latex - \tikzset{% - ADC/.style={% - draw, - signal, - signal to = west, - } - } -#+end_src - -** TODO Gain -Maybe use =isosceles= instead of regular polygon? -#+begin_src latex - \tikzset{% - gain right/.style={% - draw, - regular polygon, - regular polygon sides = 3, - inner sep = 2pt, - shape border rotate=-90 - }, - gain left/.style={% - draw, - regular polygon, - regular polygon sides = 3, - inner sep = 2pt, - shape border rotate=90 - }, - gain top/.style={% - draw, - regular polygon, - regular polygon sides = 3, - inner sep = 2pt, - shape border rotate=0 - }, - gain bottom/.style={% - draw, - regular polygon, - regular polygon sides = 3, - inner sep = 2pt, - shape border rotate=180 - }, - } -#+end_src - -** Add / Substract / Divide / Multiply block -#+begin_src latex - \tikzset{% Add block with Circled operations - addc/.style n args={5}{% - draw, - fill=white, - circle, - outer sep = 0pt, - inner sep = 0pt, - minimum size = 2em, - execute at begin node={\LARGE $#1$}, - append after command={\pgfextra{\let\mainnode=\tikzlastnode} - \ifx#2\empty\else - node[draw, circle, outer sep=6pt, inner sep=0pt, above left] at (\mainnode.west) {$#2$}% - \fi - \ifx#3\empty\else - node[draw, circle, outer sep=6pt, inner sep=0pt, above right] at (\mainnode.north) {$#3$}% - \fi - \ifx#4\empty\else - node[draw, circle, outer sep=6pt, inner sep=0pt, below right] at (\mainnode.east) {$#4$}% - \fi - \ifx#5\empty\else - node[draw, circle, outer sep=6pt, inner sep=0pt, below left] at (\mainnode.south) {$#5$}% - \fi - } - }, - addc/.default={+}{}{}{}{}, - } -#+end_src - -#+begin_src latex - \tikzset{% Add Block - addb/.style n args={5}{% - draw, - fill=white, - circle, - outer sep = 0pt, - inner sep = 0pt, - minimum size = 2em, - execute at begin node={\LARGE $#1$}, - append after command={\pgfextra{\let\mainnode=\tikzlastnode} - \ifx#2\empty\else - node[outer sep=2pt, inner sep=0pt, above left] at (\mainnode.west) {$#2$}% - \fi - \ifx#3\empty\else - node[outer sep=2pt, inner sep=0pt, above right] at (\mainnode.north) {$#3$}% - \fi - \ifx#4\empty\else - node[outer sep=2pt, inner sep=0pt, below right] at (\mainnode.east) {$#4$}% - \fi - \ifx#5\empty\else - node[outer sep=2pt, inner sep=0pt, below left] at (\mainnode.south) {$#5$}% - \fi - } - }, - addb/.default={+}{}{}{}{}, - } -#+end_src - -* Plots -** Grid -#+begin_src latex - \pgfplotsset{grid style={black}} - \pgfplotsset{major grid style={black!30!white}} - \pgfplotsset{minor grid style={black!10!white}} - \pgfplotsset{xmajorgrids} - \pgfplotsset{ymajorgrids} -#+end_src - -** Lines -#+begin_src latex - \pgfplotsset{separate axis lines=false} % draw axis as rectangle and not as 4 lines - \pgfplotsset{every outer x axis line/.append style={black}} - \pgfplotsset{every outer y axis line/.append style={black}} - \pgfplotsset{axis background/.style={fill=white}} - \pgfplotsset{axis x line*=bottom} % solid line on the bottom with thin on the top - \pgfplotsset{axis y line*=left} % solid line on the left with thin on the right -#+end_src - -** Ticks -#+begin_src latex - \pgfplotsset{every y tick label/.append style={font=\color{black}}} - \pgfplotsset{every y tick/.append style={black}} - \pgfplotsset{every x tick label/.append style={font=\color{black}}} - \pgfplotsset{every x tick/.append style={black}} -#+end_src - -** Size -If =scale only axis=false= (the default), pgfplots will try to produce the desired width including labels, titles and ticks. -#+begin_src latex - \pgfplotsset{scale only axis=true} -#+end_src - -** Label -Used to align all of ylabel of one figure. -#+begin_src latex - \pgfplotsset{ylabel absolute} -#+end_src - -** Legend -#+begin_src latex - % https://tex.stackexchange.com/questions/54794/using-a-pgfplots-style-legend-in-a-plain-old-tikzpicture#54834 - - % argument #1: any options - \newenvironment{customlegend}[1][]{% - \begingroup - % inits/clears the lists (which might be populated from previous - % axes): - \csname pgfplots@init@cleared@structures\endcsname - \pgfplotsset{#1}% - }{% - % draws the legend: - \csname pgfplots@createlegend\endcsname - \endgroup - }% - - % makes \addlegendimage available (typically only available within an - % axis environment): - \def\addlegendimage{\csname pgfplots@addlegendimage\endcsname} - - % definition to insert numbers - % \pgfkeys{/pgfplots/number in legend/.style={% - % /pgfplots/legend image code/.code={% - % \node at (0.125,-0.0225){#1}; % <= changed x value - % },% - % }, - % } - \pgfplotsset{ - every legend to name picture/.style={west} - } -#+end_src - -** Upper and Lower bounds -#+begin_src latex - \tikzstyle{upperbound}=[line cap=round, postaction={decorate,draw,decoration={border, segment length=0.2cm, amplitude=0.3cm, angle=60}}] - \tikzstyle{lowerbound}=[line cap=round, postaction={decorate,draw,decoration={border, segment length=0.2cm, amplitude=0.3cm, angle=-60}}] -#+end_src - -And we add the corresdonding -#+begin_src latex - \pgfplotsset{ - /pgfplots/upperbound/.style 1 args={ - legend image code/.code={ - \draw[##1, upperbound] - plot coordinates { - (0cm,0cm) - (0.6cm,0cm) - } - } - } - } -#+end_src - -** Pole -#+begin_src latex - \tikzset{% - pole/.style{% - color=red, - cross out, - draw, - inner sep=0pt, - outer sep=0pt, - minimum size=#1pt - }, - pole/.default={4} - } -#+end_src - -** Zero -#+begin_src latex - \tikzset{% - zero/.style{% - color=red, - circle, - draw, - inner sep=0pt, - outer sep=0pt, - minimum size=#1pt - }, - zero/.default={4} - } -#+end_src - -* Mechanical -** Spring -#+begin_src latex - \tikzset{% - spring/.style={% - thick, - decoration={ - zigzag, - pre length = #1cm, - post length = #1cm, - segment length = 6 - }, - decorate - }, - spring/.default={0.2} - } -#+end_src - -** Coil -#+begin_src latex - \tikzset{% - coil/.style n args={2}{% - thick, - decoration={ - coil, - pre length = #1cm, - post length = #2cm, - segment length = 4 - }, - decorate - }, - coil/.default={0.3}{0.3} - } -#+end_src - -** Damper -#+begin_src latex - \tikzset{% - damper/.style n args={2}{% - thick, - decoration={markings, mark connection node=dmp, mark=at position 0.5 with { - \node (dmp) [thick, - inner sep = 0pt, - transform shape, - rotate =-90, - minimum width = #1pt, - minimum height = #2pt, - draw=none] {}; - \draw [thick] ($(dmp.north east)+(0.6*#2pt,0)$) -- (dmp.south east) -- (dmp.south west) -- ($(dmp.north west)+(0.6*#2pt,0)$); - \draw [thick] ($(dmp.north)+(0,-0.3*#1pt)$) -- ($(dmp.north)+(0,0.3*#1pt)$); - } - }, - decorate - }, - damper/.default={12}{3} - } -#+end_src - -** Actuator -#+begin_src latex - \tikzset{% - actuator/.style n args={2}{% - thick, - draw=none, - decoration={ - markings, - mark connection node=my node, - mark=at position .5 with { - \node [draw, inner sep=0pt, minimum width=#1cm, minimum height=#2cm, - transform shape, fill=white] (my node) {}; - }, - mark=at position .0 with { - \draw[<-] (0, 0) -- (my node); - }, - mark=at position 1.0 with { - \draw[<-] (0, 0) -- (my node); - } - }, - decorate - }, - actuator/.default={0.5}{0.2} - } -#+end_src - -** Ground -#+begin_src latex - \tikzset{% - ground/.style n args={2}{% - fill, - pattern = north east lines, - draw = none, - anchor = north, - minimum width = #1cm, - minimum height = #2cm, - append after command={ - (\tikzlastnode.north west) edge (\tikzlastnode.north east) - } - }, - ground/.default={2.5}{0.3} - } -#+end_src - -** Force Sensor -#+begin_src latex - \tikzset{% - forcesensor/.style n args={2}{% - rectangle, - outer sep=0pt, - inner sep=0pt, - draw=black, - fill=white!60!black, - anchor=south, - minimum width =#1cm, - minimum height=#2cm, - append after command={ - [every edge/.append style={ - thick, - black, - }] - (\tikzlastnode.north west) edge (\tikzlastnode.south east) - (\tikzlastnode.north east) edge (\tikzlastnode.south west) - } - }, - forcesensor/.default={2.0}{0.5} - } -#+end_src - -** Inertial Sensor -#+begin_src latex - \tikzset{% - inertialsensor/.style={% - rectangle, - outer sep=0pt, - inner sep=0pt, - draw=black, - fill=white!60!black, - anchor=south east, - minimum size=#1cm, - append after command={ - [every edge/.append style={ - thick, - black, - }] - (\tikzlastnode.north west) edge (\tikzlastnode.south east) - (\tikzlastnode.north east) edge (\tikzlastnode.south west) - } - }, - inertialsensor/.default={0.3} - } -#+end_src - -** Axis Rotator -#+begin_src latex - \newcommand{\AxisRotator}[1][rotate=0]{% - \tikz [x=0.1cm,y=0.30cm,-stealth,#1] \draw (0,0) arc (-150:150:1 and 1);% - } -#+end_src - -** Cross -#+begin_src latex - \tikzstyle{cross}=[path picture={ - \draw[black] - (path picture bounding box.south east) -- (path picture bounding box.north west) (path picture bounding box.south west) -- (path picture bounding box.north east); - }] - -#+end_src - -** Piezoelectric actuator -#+begin_src latex - \tikzset{% - piezo/.style n args={3}{% - draw, - rectangle, - minimum width = #1cm, - minimum height = #2cm, - fill=blue!10!white, - anchor=center, - append after command={ - [every edge/.append style={ - thick, - black, - }] - \foreach \i in {1,...,#3}{ - (${\i/(1+#3)}*(\tikzlastnode.north west)+{(1+#3-\i)/(1+#3)}*(\tikzlastnode.south west)+0.1*(#1,0)$) edge (${\i/(1+#3)}*(\tikzlastnode.north east)+{(1+#3-\i)/(1+#3)}*(\tikzlastnode.south east)-0.1*(#1,0)$) - } - } - }, - piezo/.default={2}{4}{10} - } -#+end_src - -** Voice coil -#+begin_src latex - \def\voicecoil#1#2#3{ - % ====================== - % Parameters - % ====================== - \def\voicecoilw{#1} % Total Width - \def\voicecoilh{#2} % Total Height - - \def\magnetw{\voicecoilw} % Width of the magnet - \def\magneth{\voicecoilh/1.4} % Height of the magnet - - \def\magnetwb{0.15*\magnetw} % Width of the borders of the magnet - \def\magnetmw{0.15*\magnetw} % Width of the middle part of the magnet - \def\magnetwg{0.5*\magnetw} % Width of the gap of the magnet - - \def\magnethl{\magnetwb} % Height of the low part of the magnet - \def\magnetmh{0.15*\magneth} % Height of the middle part of the magnet - \def\magnethg{0.2*\magneth} % Height of the gap of the magnet - % ====================== - - \begin{scope}[shift={(0.5*\voicecoilw, 0.5*\voicecoilh)}, rotate=#3, shift={(0, -0.5*\voicecoilh)}] - % ====================== - % Magnet - % ====================== - \draw[fill=white] (0, 0) -| ++(0.5*\magnetw, \magneth) -| ++(-0.5*\magnetw+0.5*\magnetwg, -\magnethg) -| (0.5*\magnetw-\magnetwb, \magnethl) -| (-0.5*\magnetw+\magnetwb, \magneth-\magnethg) -| (-0.5*\magnetwg, \magneth) -| (-0.5*\magnetw, 0) -- (cycle); - \begin{scope}[shift={(0, \magnethl)}] - \draw[fill=red] (-0.5*\magnetmw, 0) rectangle (0.5*\magnetmw, \magnetmh); - \draw[fill=blue] (-0.5*\magnetmw, \magnetmh) rectangle (0.5*\magnetmw, 2*\magnetmh); - % Top conductive Magnet - \draw[fill=white] (-0.5*\magnetmw, 2*\magnetmh) -| (0.5*\magnetmw, -\magnethl+\magneth-\magnethg) -| ++(0.1, \magnethg) -| ++(-0.2-\magnetmw, -\magnethg) -| (-0.5*\magnetmw, \magnetmh); - \end{scope} - % ====================== - - % ====================== - % Coil - % ====================== - \pgfmathsetmacro{\coilwidth}{0.5*0.5*\magnetmw+0.5*0.1+0.25*\magnetwg}% - \draw[] ( \coilwidth, 0.5*\magneth) -- ++(0, 0.7*\magneth); - \draw[] (-\coilwidth, 0.5*\magneth) -- ++(0, 0.7*\magneth); - % Point on the coil - \foreach \x in {0,1,...,9} - { - \node[circle,inner sep=0.6pt,fill] at ( \coilwidth, \x*0.7*\magneth/10+0.5*\magneth); - \node[circle,inner sep=0.6pt,fill] at (-\coilwidth, \x*0.7*\magneth/10+0.5*\magneth); - } - \draw[fill=white] (-0.5*\magnetw, 1.2*\magneth) rectangle ++(\magnetw, \magnethg); - % ====================== - - % ====================== - % Coordinates - % ====================== - % Force - \coordinate[] (vc_force) at (0, \magneth-0.5*\magnethg); - % Coil - \coordinate[] (vc_coil) at (0, \voicecoilh); - % Magnet - \coordinate[] (vc_magnet) at (0, 0); - % Coil Wires - \coordinate[] (vc_wire_one) at ( \coilwidth, 1.2*\magneth); - \coordinate[] (vc_wire_two) at (-\coilwidth, 1.2*\magneth); - % ====================== - \end{scope} - } -#+end_src - -* Optics -#+begin_src latex - \tikzset{% - ->-/.style={ - decoration={ - markings, - mark = at position #1 with {\arrow{>} - } - }, - postaction={decorate} - } - } - \tikzset{% - -<-/.style={ - decoration={ - markings, - mark = at position #1 with {\arrow{<} - } - }, - postaction={decorate} - } - } -#+end_src - -* Misc -#+begin_src latex - \tikzset{% - labelc/.style= {% - draw, - fill=white, - shape=circle, - inner sep=2pt, - outer sep=6pt, - } - } -#+end_src diff --git a/tikz/config.tex b/tikz/config.tex deleted file mode 100644 index 0e6781c..0000000 --- a/tikz/config.tex +++ /dev/null @@ -1,556 +0,0 @@ -\usepackage[utf8]{inputenc} -\usepackage[T1]{fontenc} - -\usepackage[french, english]{babel} % Last language is main language - -\usepackage{lmodern} % Latin Modern Font -\usepackage{gensymb} % Generic symbols for both text and math mode - -\usepackage{standalone} % Used to generate standalone Tikz - -\usepackage{amsmath} % Main math Package -\usepackage{mathtools} % Extension package to amsmath -\usepackage{amsthm} % Typesetting theorems (AMS style) -\usepackage{amsfonts} % More fonts from the AMS -\usepackage{textcomp} % provide many text symbols -\usepackage{steinmetz} % For phase symbol - -\usepackage{xstring} % Utils to manipulate strings -\usepackage{etoolbox} % Add basic if/then -\usepackage{esvect} % Beautyfull vectors -\usepackage{graphicx} % Enhanced support for graphics -\usepackage{grffile} % Used by matlab2tikz - -\usepackage{microtype} % typographic tuning -\usepackage{setspace} % for line spacing, e.g. \onehalfspacing -\usepackage{tabularx} % table features -\usepackage{enumitem} % for simple list modifications -\usepackage{booktabs} % better table support - -\usepackage{stackengine} % - -\usepackage[load-configurations=abbreviations]{siunitx} % SI units -\sisetup{ - locale = US, - detect-all, - range-phrase=--, - range-units=single -} - -\usepackage{tikz} % Tikz -\usepackage{tikzscale} % Used to scale Tikz graphics -\usepackage{adjustbox} % Used to proper positioning of tikz pictures -\usepackage{circuitikz} % Draw electronic circuits -\usepackage{pgfpages} % Needed to use notes -\usepackage{pgfplots} % Used to plot functions - -\usetikzlibrary{arrows} % Arrow tip library -\usetikzlibrary{arrows.meta} % Add some arrows -\usetikzlibrary{calc} % The library allows advanced Coordinate Calculations -\usetikzlibrary{intersections} % calculate intersections of paths -\usetikzlibrary{matrix} % -\usetikzlibrary{patterns} % -\usetikzlibrary{shapes} % Defines circle and rectangle -\usetikzlibrary{shapes.geometric} % Use for the shape diamond and isosceles triangle -\usetikzlibrary{snakes} % snake=coil and snake=zigzag using segment amplitude=10pt -\usetikzlibrary{positioning} % Additional options for placing nodes -\usetikzlibrary{3d} % Plot 3D shapes -\usetikzlibrary{spy} % Creating a magnified area -\usetikzlibrary{decorations.text} % Used to make text follows a curve -\usetikzlibrary{decorations.pathmorphing} % deformation of a path -\usetikzlibrary{decorations.markings} % Used for spring and damper -\usetikzlibrary{babel} % A tiny library that make the interaction with the babel package easier -\usetikzlibrary{plotmarks} % This library defines a number of plot marks -\usetikzlibrary{fit} % Used to make rectangle as nodes by specifying two points -\usetikzlibrary{backgrounds} % Used to put things under others - -\usepgfplotslibrary{patchplots} -\usepgfplotslibrary{groupplots} - -\pgfplotsset{compat=newest} -\pgfplotsset{plot coordinates/math parser=false} - -\newlength{\fheight} -\newlength{\fwidth} - -\setlength{\fwidth}{85mm} -\setlength{\fheight}{112mm} - -\tikzset{>=Stealth} -% Setup default Linewidth -\tikzset{every path/.style={line width=1pt}} - -\usepackage{xcolor}% Color extension - -\definecolor{colorblack}{rgb}{0, 0, 0} -\definecolor{colorblue}{rgb}{0, 0.4470, 0.7410} -\definecolor{colorred}{rgb}{0.8500, 0.3250, 0.0980} -\definecolor{coloryellow}{rgb}{0.9290, 0.6940, 0.1250} -\definecolor{colorpurple}{rgb}{0.4940, 0.1840, 0.5560} -\definecolor{colorgreen}{rgb}{0.4660, 0.6740, 0.1880} -\definecolor{colorcyan}{rgb}{0.3010, 0.7450, 0.9330} -\definecolor{colorbordeau}{rgb}{0.6350, 0.0780, 0.1840} - -% Main color -\definecolor{maincolor}{RGB}{89, 9, 38} -\definecolor{secondcolor}{RGB}{20, 9, 89} - -\tikzset{% - block/.style n args={2}{% - draw, - fill=white, - minimum width = #1, - minimum height = #2, - }, - block/.default={1.2cm}{1.0cm} -} - -\tikzstyle{branch}=[fill,shape=circle,minimum size=4pt,inner sep=0pt] -\tikzstyle{->top}=[-{Stealth[color=black, scale=0.8]}, draw=white, double=black, double distance=1pt, line width=1pt] -\tikzstyle{<-top}=[{stealth[color=black, scale=0.8]}-, draw=white, double=black, double distance=1pt, line width=1pt] - -\tikzstyle{handwriten}=[decorate,decoration={random steps,amplitude=0.1pt,segment length=0.8pt}] - -\tikzset{% - DAC/.style={% - draw, - signal, - } -} - -\tikzset{% - ADC/.style={% - draw, - signal, - signal to = west, - } -} - -\tikzset{% - gain right/.style={% - draw, - regular polygon, - regular polygon sides = 3, - inner sep = 2pt, - shape border rotate=-90 - }, - gain left/.style={% - draw, - regular polygon, - regular polygon sides = 3, - inner sep = 2pt, - shape border rotate=90 - }, - gain top/.style={% - draw, - regular polygon, - regular polygon sides = 3, - inner sep = 2pt, - shape border rotate=0 - }, - gain bottom/.style={% - draw, - regular polygon, - regular polygon sides = 3, - inner sep = 2pt, - shape border rotate=180 - }, -} - -\tikzset{% Add block with Circled operations - addc/.style n args={5}{% - draw, - fill=white, - circle, - outer sep = 0pt, - inner sep = 0pt, - minimum size = 2em, - execute at begin node={\LARGE $#1$}, - append after command={\pgfextra{\let\mainnode=\tikzlastnode} - \ifx#2\empty\else - node[draw, circle, outer sep=6pt, inner sep=0pt, above left] at (\mainnode.west) {$#2$}% - \fi - \ifx#3\empty\else - node[draw, circle, outer sep=6pt, inner sep=0pt, above right] at (\mainnode.north) {$#3$}% - \fi - \ifx#4\empty\else - node[draw, circle, outer sep=6pt, inner sep=0pt, below right] at (\mainnode.east) {$#4$}% - \fi - \ifx#5\empty\else - node[draw, circle, outer sep=6pt, inner sep=0pt, below left] at (\mainnode.south) {$#5$}% - \fi - } - }, - addc/.default={+}{}{}{}{}, -} - -\tikzset{% Add Block - addb/.style n args={5}{% - draw, - fill=white, - circle, - outer sep = 0pt, - inner sep = 0pt, - minimum size = 2em, - execute at begin node={\LARGE $#1$}, - append after command={\pgfextra{\let\mainnode=\tikzlastnode} - \ifx#2\empty\else - node[outer sep=2pt, inner sep=0pt, above left] at (\mainnode.west) {$#2$}% - \fi - \ifx#3\empty\else - node[outer sep=2pt, inner sep=0pt, above right] at (\mainnode.north) {$#3$}% - \fi - \ifx#4\empty\else - node[outer sep=2pt, inner sep=0pt, below right] at (\mainnode.east) {$#4$}% - \fi - \ifx#5\empty\else - node[outer sep=2pt, inner sep=0pt, below left] at (\mainnode.south) {$#5$}% - \fi - } - }, - addb/.default={+}{}{}{}{}, -} - -\pgfplotsset{grid style={black}} -\pgfplotsset{major grid style={black!30!white}} -\pgfplotsset{minor grid style={black!10!white}} -\pgfplotsset{xmajorgrids} -\pgfplotsset{ymajorgrids} - -\pgfplotsset{separate axis lines=false} % draw axis as rectangle and not as 4 lines -\pgfplotsset{every outer x axis line/.append style={black}} -\pgfplotsset{every outer y axis line/.append style={black}} -\pgfplotsset{axis background/.style={fill=white}} -\pgfplotsset{axis x line*=bottom} % solid line on the bottom with thin on the top -\pgfplotsset{axis y line*=left} % solid line on the left with thin on the right - -\pgfplotsset{every y tick label/.append style={font=\color{black}}} -\pgfplotsset{every y tick/.append style={black}} -\pgfplotsset{every x tick label/.append style={font=\color{black}}} -\pgfplotsset{every x tick/.append style={black}} - -\pgfplotsset{scale only axis=true} - -\pgfplotsset{ylabel absolute} - -% https://tex.stackexchange.com/questions/54794/using-a-pgfplots-style-legend-in-a-plain-old-tikzpicture#54834 - -% argument #1: any options -\newenvironment{customlegend}[1][]{% - \begingroup - % inits/clears the lists (which might be populated from previous - % axes): - \csname pgfplots@init@cleared@structures\endcsname - \pgfplotsset{#1}% -}{% - % draws the legend: - \csname pgfplots@createlegend\endcsname - \endgroup -}% - -% makes \addlegendimage available (typically only available within an -% axis environment): -\def\addlegendimage{\csname pgfplots@addlegendimage\endcsname} - -% definition to insert numbers -% \pgfkeys{/pgfplots/number in legend/.style={% -% /pgfplots/legend image code/.code={% -% \node at (0.125,-0.0225){#1}; % <= changed x value -% },% -% }, -% } -\pgfplotsset{ - every legend to name picture/.style={west} -} - -\tikzstyle{upperbound}=[line cap=round, postaction={decorate,draw,decoration={border, segment length=0.2cm, amplitude=0.3cm, angle=60}}] -\tikzstyle{lowerbound}=[line cap=round, postaction={decorate,draw,decoration={border, segment length=0.2cm, amplitude=0.3cm, angle=-60}}] - -\pgfplotsset{ - /pgfplots/upperbound/.style 1 args={ - legend image code/.code={ - \draw[##1, upperbound] - plot coordinates { - (0cm,0cm) - (0.6cm,0cm) - } - } - } -} - -\tikzset{% - pole/.style{% - color=red, - cross out, - draw, - inner sep=0pt, - outer sep=0pt, - minimum size=#1pt - }, - pole/.default={4} -} - -\tikzset{% - zero/.style{% - color=red, - circle, - draw, - inner sep=0pt, - outer sep=0pt, - minimum size=#1pt - }, - zero/.default={4} -} - -\tikzset{% - spring/.style={% - thick, - decoration={ - zigzag, - pre length = #1cm, - post length = #1cm, - segment length = 6 - }, - decorate - }, - spring/.default={0.2} -} - -\tikzset{% - coil/.style n args={2}{% - thick, - decoration={ - coil, - pre length = #1cm, - post length = #2cm, - segment length = 4 - }, - decorate - }, - coil/.default={0.3}{0.3} -} - -\tikzset{% - damper/.style n args={2}{% - thick, - decoration={markings, mark connection node=dmp, mark=at position 0.5 with { - \node (dmp) [thick, - inner sep = 0pt, - transform shape, - rotate =-90, - minimum width = #1pt, - minimum height = #2pt, - draw=none] {}; - \draw [thick] ($(dmp.north east)+(0.6*#2pt,0)$) -- (dmp.south east) -- (dmp.south west) -- ($(dmp.north west)+(0.6*#2pt,0)$); - \draw [thick] ($(dmp.north)+(0,-0.3*#1pt)$) -- ($(dmp.north)+(0,0.3*#1pt)$); - } - }, - decorate - }, - damper/.default={12}{3} -} - -\tikzset{% - actuator/.style n args={2}{% - thick, - draw=none, - decoration={ - markings, - mark connection node=my node, - mark=at position .5 with { - \node [draw, inner sep=0pt, minimum width=#1cm, minimum height=#2cm, - transform shape, fill=white] (my node) {}; - }, - mark=at position .0 with { - \draw[<-] (0, 0) -- (my node); - }, - mark=at position 1.0 with { - \draw[<-] (0, 0) -- (my node); - } - }, - decorate - }, - actuator/.default={0.5}{0.2} -} - -\tikzset{% - ground/.style n args={2}{% - fill, - pattern = north east lines, - draw = none, - anchor = north, - minimum width = #1cm, - minimum height = #2cm, - append after command={ - (\tikzlastnode.north west) edge (\tikzlastnode.north east) - } - }, - ground/.default={2.5}{0.3} -} - -\tikzset{% - forcesensor/.style n args={2}{% - rectangle, - outer sep=0pt, - inner sep=0pt, - draw=black, - fill=white!60!black, - anchor=south, - minimum width =#1cm, - minimum height=#2cm, - append after command={ - [every edge/.append style={ - thick, - black, - }] - (\tikzlastnode.north west) edge (\tikzlastnode.south east) - (\tikzlastnode.north east) edge (\tikzlastnode.south west) - } - }, - forcesensor/.default={2.0}{0.5} -} - -\tikzset{% - inertialsensor/.style={% - rectangle, - outer sep=0pt, - inner sep=0pt, - draw=black, - fill=white!60!black, - anchor=south east, - minimum size=#1cm, - append after command={ - [every edge/.append style={ - thick, - black, - }] - (\tikzlastnode.north west) edge (\tikzlastnode.south east) - (\tikzlastnode.north east) edge (\tikzlastnode.south west) - } - }, - inertialsensor/.default={0.3} -} - -\newcommand{\AxisRotator}[1][rotate=0]{% - \tikz [x=0.1cm,y=0.30cm,-stealth,#1] \draw (0,0) arc (-150:150:1 and 1);% -} - -\tikzstyle{cross}=[path picture={ - \draw[black] - (path picture bounding box.south east) -- (path picture bounding box.north west) (path picture bounding box.south west) -- (path picture bounding box.north east); -}] - -\tikzset{% - piezo/.style n args={3}{% - draw, - rectangle, - minimum width = #1cm, - minimum height = #2cm, - fill=blue!10!white, - anchor=center, - append after command={ - [every edge/.append style={ - thick, - black, - }] - \foreach \i in {1,...,#3}{ - (${\i/(1+#3)}*(\tikzlastnode.north west)+{(1+#3-\i)/(1+#3)}*(\tikzlastnode.south west)+0.1*(#1,0)$) edge (${\i/(1+#3)}*(\tikzlastnode.north east)+{(1+#3-\i)/(1+#3)}*(\tikzlastnode.south east)-0.1*(#1,0)$) - } - } - }, - piezo/.default={2}{4}{10} -} - -\def\voicecoil#1#2#3{ - % ====================== - % Parameters - % ====================== - \def\voicecoilw{#1} % Total Width - \def\voicecoilh{#2} % Total Height - - \def\magnetw{\voicecoilw} % Width of the magnet - \def\magneth{\voicecoilh/1.4} % Height of the magnet - - \def\magnetwb{0.15*\magnetw} % Width of the borders of the magnet - \def\magnetmw{0.15*\magnetw} % Width of the middle part of the magnet - \def\magnetwg{0.5*\magnetw} % Width of the gap of the magnet - - \def\magnethl{\magnetwb} % Height of the low part of the magnet - \def\magnetmh{0.15*\magneth} % Height of the middle part of the magnet - \def\magnethg{0.2*\magneth} % Height of the gap of the magnet - % ====================== - - \begin{scope}[shift={(0.5*\voicecoilw, 0.5*\voicecoilh)}, rotate=#3, shift={(0, -0.5*\voicecoilh)}] - % ====================== - % Magnet - % ====================== - \draw[fill=white] (0, 0) -| ++(0.5*\magnetw, \magneth) -| ++(-0.5*\magnetw+0.5*\magnetwg, -\magnethg) -| (0.5*\magnetw-\magnetwb, \magnethl) -| (-0.5*\magnetw+\magnetwb, \magneth-\magnethg) -| (-0.5*\magnetwg, \magneth) -| (-0.5*\magnetw, 0) -- (cycle); - \begin{scope}[shift={(0, \magnethl)}] - \draw[fill=red] (-0.5*\magnetmw, 0) rectangle (0.5*\magnetmw, \magnetmh); - \draw[fill=blue] (-0.5*\magnetmw, \magnetmh) rectangle (0.5*\magnetmw, 2*\magnetmh); - % Top conductive Magnet - \draw[fill=white] (-0.5*\magnetmw, 2*\magnetmh) -| (0.5*\magnetmw, -\magnethl+\magneth-\magnethg) -| ++(0.1, \magnethg) -| ++(-0.2-\magnetmw, -\magnethg) -| (-0.5*\magnetmw, \magnetmh); - \end{scope} - % ====================== - - % ====================== - % Coil - % ====================== - \pgfmathsetmacro{\coilwidth}{0.5*0.5*\magnetmw+0.5*0.1+0.25*\magnetwg}% - \draw[] ( \coilwidth, 0.5*\magneth) -- ++(0, 0.7*\magneth); - \draw[] (-\coilwidth, 0.5*\magneth) -- ++(0, 0.7*\magneth); - % Point on the coil - \foreach \x in {0,1,...,9} - { - \node[circle,inner sep=0.6pt,fill] at ( \coilwidth, \x*0.7*\magneth/10+0.5*\magneth); - \node[circle,inner sep=0.6pt,fill] at (-\coilwidth, \x*0.7*\magneth/10+0.5*\magneth); - } - \draw[fill=white] (-0.5*\magnetw, 1.2*\magneth) rectangle ++(\magnetw, \magnethg); - % ====================== - - % ====================== - % Coordinates - % ====================== - % Force - \coordinate[] (vc_force) at (0, \magneth-0.5*\magnethg); - % Coil - \coordinate[] (vc_coil) at (0, \voicecoilh); - % Magnet - \coordinate[] (vc_magnet) at (0, 0); - % Coil Wires - \coordinate[] (vc_wire_one) at ( \coilwidth, 1.2*\magneth); - \coordinate[] (vc_wire_two) at (-\coilwidth, 1.2*\magneth); - % ====================== - \end{scope} -} - -\tikzset{% - ->-/.style={ - decoration={ - markings, - mark = at position #1 with {\arrow{>} - } - }, - postaction={decorate} - } -} -\tikzset{% - -<-/.style={ - decoration={ - markings, - mark = at position #1 with {\arrow{<} - } - }, - postaction={decorate} - } -} - -\tikzset{% - labelc/.style= {% - draw, - fill=white, - shape=circle, - inner sep=2pt, - outer sep=6pt, - } -} diff --git a/tikz/figs b/tikz/figs deleted file mode 120000 index 30fa883..0000000 --- a/tikz/figs +++ /dev/null @@ -1 +0,0 @@ -../paper/figs \ No newline at end of file diff --git a/tikz/index.html b/tikz/index.html deleted file mode 100644 index 6d430ac..0000000 --- a/tikz/index.html +++ /dev/null @@ -1,321 +0,0 @@ - - - - - - -Active Damping of Rotating Platforms using Integral Force Feedback - Tikz Figures - - - - - - -
- UP - | - HOME -
-

Active Damping of Rotating Platforms using Integral Force Feedback - Tikz Figures

- -

-Configuration file is accessible here. -

- -
-

1 X-Y Rotating Positioning Platform

-
-
-
\begin{tikzpicture}
-  % Angle
-  \def\thetau{25}
-
-  % Rotational Stage
-  \draw[fill=black!60!white] (0, 0) circle (4.3);
-  \draw[fill=black!40!white] (0, 0) circle (3.8);
-
-  % Label
-  \node[anchor=north west, rotate=\thetau] at (-2.5, 2.5) {\small Rotating Stage};
-
-  % Rotating Scope
-  \begin{scope}[rotate=\thetau]
-    % Rotating Frame
-    \draw[fill=black!20!white] (-2.6, -2.6) rectangle (2.6, 2.6);
-    % Label
-    \node[anchor=north west, rotate=\thetau] at (-2.6, 2.6) {\small Suspended Platform};
-
-    % Mass
-    \draw[fill=white] (-1, -1) rectangle (1, 1);
-    % Label
-    \node[anchor=south west, rotate=\thetau] at (-1, -1) {\small Payload};
-
-    % Attached Points
-    \node[] at (-1, 0){$\bullet$};
-    \draw[] (-1, 0) -- ++(-0.2, 0) coordinate(cu);
-    \draw[] ($(cu) + (0, -0.8)$) coordinate(actu) -- ($(cu) + (0, 0.8)$) coordinate(ku);
-    \node[] at (0, -1){$\bullet$};
-    \draw[] (0, -1) -- ++(0, -0.2) coordinate(cv);
-    \draw[] ($(cv) + (-0.8, 0)$)coordinate(kv) -- ($(cv) + (0.8, 0)$) coordinate(actv);
-
-    % Spring and Actuator for U
-    \draw[actuator={0.6}{0.2}] (actu) -- node[above=0.1, rotate=\thetau]{$F_u$} (actu-|-2.6,0);
-    \draw[spring=0.2] (ku) -- node[above=0.1, rotate=\thetau]{$k$} (ku-|-2.6,0);
-    \draw[damper={8}{8}] (cu) -- node[above left=0.2 and -0.1, rotate=\thetau]{$c$} (cu-|-2.6,0);
-
-    \draw[actuator={0.6}{0.2}] (actv) -- node[left, rotate=\thetau]{$F_v$} (actv|-0,-2.6);
-    \draw[spring=0.2] (kv) -- node[left, rotate=\thetau]{$k$} (kv|-0,-2.6);
-    \draw[damper={8}{8}] (cv) -- node[left=0.1, rotate=\thetau]{$c$} (cv|-0,-2.6);
-  \end{scope}
-
-  % Inertial Frame
-  \draw[->] (-4, -4) -- ++(2, 0) node[below]{$\vec{i}_x$};
-  \draw[->] (-4, -4) -- ++(0, 2) node[left]{$\vec{i}_y$};
-  \draw[fill, color=black] (-4, -4) circle (0.06);
-  \node[draw, circle, inner sep=0pt, minimum size=0.3cm, label=left:$\vec{i}_z$] at (-4, -4){};
-
-  \draw[->] (0, 0) node[above left, rotate=\thetau]{$\vec{i}_w$} -- ++(\thetau:2) node[above, rotate=\thetau]{$\vec{i}_u$};
-  \draw[->] (0, 0) -- ++(\thetau+90:2) node[left, rotate=\thetau]{$\vec{i}_v$};
-  \draw[fill, color=black] (0,0) circle (0.06);
-  \node[draw, circle, inner sep=0pt, minimum size=0.3cm] at (0, 0){};
-  \draw[dashed] (0, 0) -- ++(2, 0);
-  \draw[] (1.5, 0) arc (0:\thetau:1.5) node[midway, right]{$\theta$};
-
-  \draw[->] (3.5, 0) arc (0:40:3.5) node[midway, left]{$\Omega$};
-\end{tikzpicture}
-
-
- - -
-

system.png -

-
-
-
- -
-

2 X-Y Rotating Positioning Platform

-
-
-
\tikzset{block/.default={0.8cm}{0.8cm}}
-\tikzset{addb/.append style={scale=0.7}}
-\tikzset{node distance=0.6}
-
-\begin{tikzpicture}
-  \node[block={1.8cm}{2.2cm}] (G) {$\bm{G}_f$};
-
-  % Inputs of the controllers
-  \coordinate[] (output1) at ($(G.south east)!0.75!(G.north east)$);
-  \coordinate[] (output2) at ($(G.south east)!0.25!(G.north east)$);
-  \coordinate[] (input1)  at ($(G.south west)!0.75!(G.north west)$);
-  \coordinate[] (input2)  at ($(G.south west)!0.25!(G.north west)$);
-
-  \node[block, left=1.8 of input1] (K1) {$K_F$};
-  \node[block] (K2) at ($(K1.east|-input2)+(0.6, 0)$) {$K_F$};
-
-  % Connections and labels
-  \draw[->] (K1.east) -- (input1)node[above left]{$F_u$}node[below left]{$-$};
-  \draw[->] (K2.east) -- (input2)node[above left]{$F_v$}node[below left]{$-$};
-
-  \draw[->] (output1) -- ++(0.8, 0) node[above left]{$f_u$};
-  \draw[->] (output2) -- ++(0.8, 0) node[above left]{$f_v$};
-
-  \draw[->] ($(output1)+(0.2, 0)$)node[branch]{} -- ++(0,  1.2) -| ($(K1.west) + (-0.8, 0)$)coordinate(start) -- (K1.west);
-  \draw[->] ($(output2)+(0.2, 0)$)node[branch]{} -- ++(0, -1.2) -| (start|-K2) -- (K2.west);
-
-  \begin{scope}[on background layer]
-    \node[fit={(K1.north west) (K2.south east)}, inner sep=6pt, draw, dashed, fill=black!20!white] (K) {};
-    \node[below left] at (K.north east) {$\bm{K}_F$};
-  \end{scope}
-\end{tikzpicture}
-
-
- - -
-

control_diagram_iff.png -

-
-
-
- -
-

3 Decentralized Integral Force Feedback

-
-
-
\begin{tikzpicture}
-  % Angle
-  \def\thetau{25}
-
-  % Rotational Stage
-  \draw[fill=black!60!white] (0, 0) circle (4.3);
-  \draw[fill=black!40!white] (0, 0) circle (3.8);
-
-  % Label
-  \node[anchor=north west, rotate=\thetau] at (-2.5, 2.5) {\small Rotating Stage};
-
-  % Rotating Scope
-  \begin{scope}[rotate=\thetau]
-    % Rotating Frame
-    \draw[fill=black!20!white] (-2.6, -2.6) rectangle (2.6, 2.6);
-    % Label
-    \node[anchor=north west, rotate=\thetau] at (-2.6, 2.6) {\small Suspended Platform};
-
-    % Mass
-    \draw[fill=white] (-1, -1) rectangle (1, 1);
-    % Label
-    \node[anchor=south west, rotate=\thetau] at (-1, -1) {\small Payload};
-
-    % Attached Points
-    \node[] at (-1, 0){$\bullet$};
-    \draw[] (-1, 0) -- ++(-0.2, 0) coordinate(au);
-    \node[] at (0, -1){$\bullet$};
-    \draw[] (0, -1) -- ++(0, -0.2) coordinate(av);
-
-    % Force Sensors
-    \draw[fill=white] ($(au) + (-0.2, -0.5)$) rectangle ($(au) + (0, 0.5)$);
-    \draw[] ($(au) + (-0.2, -0.5)$)coordinate(actu) -- ($(au) + (0,  0.5)$);
-    \draw[] ($(au) + (-0.2,  0.5)$)coordinate(ku)   -- ($(au) + (0, -0.5)$);
-
-    \draw[fill=white] ($(av) + (-0.5, -0.2)$) rectangle ($(av) + (0.5, 0)$);
-    \draw[] ($(av) + ( 0.5, -0.2)$)coordinate(actv) -- ($(av) + (-0.5,  0)$);
-    \draw[] ($(av) + (-0.5, -0.2)$)coordinate(kv)   -- ($(av) + ( 0.5,  0)$);
-
-    % Spring and Actuator for U
-    \draw[actuator={0.6}{0.2}] (actu) -- coordinate[midway](actumid) (actu-|-2.6,0);
-    \draw[spring=0.2] (ku) -- node[above=0.1, rotate=\thetau]{$k$} (ku-|-2.6,0);
-
-    % \draw[actuator={0.6}{0.2}] (actv) -- node[right, rotate=\thetau]{$F_v$} (actv|-0,-2.6);
-    \draw[actuator={0.6}{0.2}] (actv) -- coordinate[midway](actvmid) (actv|-0,-2.6);
-    \draw[spring=0.2] (kv) -- node[left, rotate=\thetau]{$k$} (kv|-0,-2.6);
-
-    \node[block={0.8cm}{0.6cm}, rotate=\thetau] (Ku) at ($(actumid) + (0, -1.2)$) {$K_{F}$};
-    \draw[->] ($(au) + (-0.1, -0.5)$) |- (Ku.east) node[below right, rotate=\thetau]{$f_{u}$};
-    \draw[->] (Ku.north) -- ($(actumid) + (0, -0.1)$) node[below left, rotate=\thetau]{$F_u$} node[below right, rotate=\thetau]{$-$};
-
-    \node[block={0.8cm}{0.6cm}, rotate=\thetau] (Kv) at ($(actvmid) + (1.2, 0)$) {$K_{F}$};
-    \draw[->] ($(av) + (0.5, -0.1)$) -| (Kv.north) node[above right, rotate=\thetau]{$f_{v}$};
-    \draw[->] (Kv.west) -- ($(actvmid) + (0.1, 0)$) node[below right, rotate=\thetau]{$F_v$} node[above right, rotate=\thetau]{$-$};
-  \end{scope}
-
-  % Inertial Frame
-  \draw[->] (-4, -4) -- ++(2, 0) node[below]{$\vec{i}_x$};
-  \draw[->] (-4, -4) -- ++(0, 2) node[left]{$\vec{i}_y$};
-  \draw[fill, color=black] (-4, -4) circle (0.06);
-  \node[draw, circle, inner sep=0pt, minimum size=0.3cm, label=left:$\vec{i}_z$] at (-4, -4){};
-
-  \node[draw, circle, inner sep=0pt, minimum size=0.3cm] at (0, 0){};
-  \draw[->] (0, 0) node[above left, rotate=\thetau]{$\vec{i}_w$} -- ++(\thetau:2) node[above, rotate=\thetau]{$\vec{i}_u$};
-  \draw[->] (0, 0) -- ++(\thetau+90:2) node[left, rotate=\thetau]{$\vec{i}_v$};
-  \draw[dashed] (0, 0) -- ++(2, 0);
-  \draw[] (1.5, 0) arc (0:\thetau:1.5) node[midway, right]{$\theta$};
-  \node[] at (0,0) {$\bullet$};
-
-  \draw[->] (3.5, 0) arc (0:40:3.5) node[midway, left]{$\Omega$};
-\end{tikzpicture}
-
-
- - -
-

system_iff.png -

-
-
-
- -
-

4 Springs in parallel

-
-
-
\begin{tikzpicture}
-  % Angle
-  \def\thetau{25}
-
-  % Rotational Stage
-  \draw[fill=black!60!white] (0, 0) circle (4.3);
-  \draw[fill=black!40!white] (0, 0) circle (3.8);
-
-  % Label
-  \node[anchor=north west, rotate=\thetau] at (-2.5, 2.5) {\small Rotating Stage};
-
-  % Rotating Scope
-  \begin{scope}[rotate=\thetau]
-    % Rotating Frame
-    \draw[fill=black!20!white] (-2.6, -2.6) rectangle (2.6, 2.6);
-    % Label
-    \node[anchor=north west, rotate=\thetau] at (-2.6, 2.6) {\small Suspended Platform};
-
-    % Mass
-    \draw[fill=white] (-1, -1) rectangle (1, 1);
-    % Label
-    \node[anchor=south west, rotate=\thetau] at (-1, -1) {\small Payload};
-
-    % Attached Points
-    \draw[] (-1, 0) -- ++(-0.2, 0) coordinate(au);
-    \draw[] (0, -1) -- ++(0, -0.2) coordinate(av);
-
-    % Force Sensors
-    \draw[fill=white] ($(au) + (-0.2, -0.5)$) rectangle ($(au) + (0, 0.5)$);
-    \draw[] ($(au) + (-0.2, -0.5)$)coordinate(actu) -- ($(au) + (0,  0.5)$);
-    \draw[] ($(au) + (-0.2,  0.5)$)coordinate(ku)   -- ($(au) + (0, -0.5)$);
-    \node[below=0.1, rotate=\thetau] at ($(au) + (-0.1, -0.5)$) {$f_{u}$}
-
-    \draw[fill=white] ($(av) + (-0.5, -0.2)$) rectangle ($(av) + (0.5, 0)$);
-    \draw[] ($(av) + ( 0.5, -0.2)$)coordinate(actv) -- ($(av) + (-0.5,  0)$);
-    \draw[] ($(av) + (-0.5, -0.2)$)coordinate(kv)   -- ($(av) + ( 0.5,  0)$) ;
-    \node[right=0.1, rotate=\thetau] at ($(av) + (0.5, -0.1)$) {$f_{v}$}
-
-    % Spring and Actuator for U
-    \draw[actuator={0.6}{0.2}] (actu) -- node[below=0.1, rotate=\thetau]{$F_u$} (actu-|-2.6,0);
-    \draw[spring=0.2] (ku) -- node[below=0.1, rotate=\thetau]{$k_a$} (ku-|-2.6,0);
-    \draw[spring=0.2] (-1, 0.8) -- node[above=0.1, rotate=\thetau]{$k_p$} (-1, 0.8-|-2.6,0);
-
-    \draw[actuator={0.6}{0.2}] (actv) -- node[right=0.1, rotate=\thetau]{$F_v$} (actv|-0,-2.6);
-    \draw[spring=0.2] (kv) -- node[right=0.1, rotate=\thetau]{$k_a$} (kv|-0,-2.6);
-    \draw[spring=0.2] (-0.8, -1) -- node[left=0.1, rotate=\thetau]{$k_p$} (-0.8, -1|-0,-2.6);
-  \end{scope}
-
-  % Inertial Frame
-  \draw[->] (-4, -4) -- ++(2, 0) node[below]{$\vec{i}_x$};
-  \draw[->] (-4, -4) -- ++(0, 2) node[left]{$\vec{i}_y$};
-  \draw[fill, color=black] (-4, -4) circle (0.06);
-  \node[draw, circle, inner sep=0pt, minimum size=0.3cm, label=left:$\vec{i}_z$] at (-4, -4){};
-
-  \node[draw, circle, inner sep=0pt, minimum size=0.3cm] at (0, 0){};
-  \draw[->] (0, 0) node[above left, rotate=\thetau]{$\vec{i}_w$} -- ++(\thetau:2) node[above, rotate=\thetau]{$\vec{i}_u$};
-  \draw[->] (0, 0) -- ++(\thetau+90:2) node[left, rotate=\thetau]{$\vec{i}_v$};
-  \draw[dashed] (0, 0) -- ++(2, 0);
-  \draw[] (1.5, 0) arc (0:\thetau:1.5) node[midway, right]{$\theta$};
-  \node[] at (0,0) {$\bullet$};
-
-  \draw[->] (3.5, 0) arc (0:40:3.5) node[midway, left]{$\Omega$};
-\end{tikzpicture}
-
-
- - -
-

system_parallel_springs.png -

-
-
-
-
-
-

Author: Thomas Dehaeze

-

Created: 2020-11-12 jeu. 10:40

-
- - diff --git a/tikz/index.org b/tikz/index.org deleted file mode 100644 index 73988be..0000000 --- a/tikz/index.org +++ /dev/null @@ -1,270 +0,0 @@ -#+TITLE: Active Damping of Rotating Platforms using Integral Force Feedback - Tikz Figures -:DRAWER: -#+HTML_LINK_HOME: ../index.html -#+HTML_LINK_UP: ../index.html - -#+HTML_HEAD: -#+HTML_HEAD: - -#+PROPERTY: header-args:latex :headers '("\\usepackage{tikz}" "\\usepackage{import}" "\\import{/home/thomas/Cloud/thesis/papers/dehaeze20_contr_stewa_platf/tikz/}{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+ :eval no-export -#+PROPERTY: header-args:latex+ :exports both -#+PROPERTY: header-args:latex+ :mkdirp yes -#+PROPERTY: header-args:latex+ :output-dir figs -#+PROPERTY: header-args:latex+ :post pdf2svg(file=*this*, ext="png") -:END: - -Configuration file is accessible [[file:config.org][here]]. - -* X-Y Rotating Positioning Platform -#+begin_src latex :file system.pdf - \begin{tikzpicture} - % Angle - \def\thetau{25} - - % Rotational Stage - \draw[fill=black!60!white] (0, 0) circle (4.3); - \draw[fill=black!40!white] (0, 0) circle (3.8); - - % Label - \node[anchor=north west, rotate=\thetau] at (-2.5, 2.5) {\small Rotating Stage}; - - % Rotating Scope - \begin{scope}[rotate=\thetau] - % Rotating Frame - \draw[fill=black!20!white] (-2.6, -2.6) rectangle (2.6, 2.6); - % Label - \node[anchor=north west, rotate=\thetau] at (-2.6, 2.6) {\small Suspended Platform}; - - % Mass - \draw[fill=white] (-1, -1) rectangle (1, 1); - % Label - \node[anchor=south west, rotate=\thetau] at (-1, -1) {\small Payload}; - - % Attached Points - \node[] at (-1, 0){$\bullet$}; - \draw[] (-1, 0) -- ++(-0.2, 0) coordinate(cu); - \draw[] ($(cu) + (0, -0.8)$) coordinate(actu) -- ($(cu) + (0, 0.8)$) coordinate(ku); - \node[] at (0, -1){$\bullet$}; - \draw[] (0, -1) -- ++(0, -0.2) coordinate(cv); - \draw[] ($(cv) + (-0.8, 0)$)coordinate(kv) -- ($(cv) + (0.8, 0)$) coordinate(actv); - - % Spring and Actuator for U - \draw[actuator={0.6}{0.2}] (actu) -- node[above=0.1, rotate=\thetau]{$F_u$} (actu-|-2.6,0); - \draw[spring=0.2] (ku) -- node[above=0.1, rotate=\thetau]{$k$} (ku-|-2.6,0); - \draw[damper={8}{8}] (cu) -- node[above left=0.2 and -0.1, rotate=\thetau]{$c$} (cu-|-2.6,0); - - \draw[actuator={0.6}{0.2}] (actv) -- node[left, rotate=\thetau]{$F_v$} (actv|-0,-2.6); - \draw[spring=0.2] (kv) -- node[left, rotate=\thetau]{$k$} (kv|-0,-2.6); - \draw[damper={8}{8}] (cv) -- node[left=0.1, rotate=\thetau]{$c$} (cv|-0,-2.6); - \end{scope} - - % Inertial Frame - \draw[->] (-4, -4) -- ++(2, 0) node[below]{$\vec{i}_x$}; - \draw[->] (-4, -4) -- ++(0, 2) node[left]{$\vec{i}_y$}; - \draw[fill, color=black] (-4, -4) circle (0.06); - \node[draw, circle, inner sep=0pt, minimum size=0.3cm, label=left:$\vec{i}_z$] at (-4, -4){}; - - \draw[->] (0, 0) node[above left, rotate=\thetau]{$\vec{i}_w$} -- ++(\thetau:2) node[above, rotate=\thetau]{$\vec{i}_u$}; - \draw[->] (0, 0) -- ++(\thetau+90:2) node[left, rotate=\thetau]{$\vec{i}_v$}; - \draw[fill, color=black] (0,0) circle (0.06); - \node[draw, circle, inner sep=0pt, minimum size=0.3cm] at (0, 0){}; - \draw[dashed] (0, 0) -- ++(2, 0); - \draw[] (1.5, 0) arc (0:\thetau:1.5) node[midway, right]{$\theta$}; - - \draw[->] (3.5, 0) arc (0:40:3.5) node[midway, left]{$\Omega$}; - \end{tikzpicture} -#+end_src - -#+RESULTS: -[[file:figs/system.png]] - -* X-Y Rotating Positioning Platform -#+begin_src latex :file control_diagram_iff.pdf - \tikzset{block/.default={0.8cm}{0.8cm}} - \tikzset{addb/.append style={scale=0.7}} - \tikzset{node distance=0.6} - - \begin{tikzpicture} - \node[block={1.8cm}{2.2cm}] (G) {$\bm{G}_f$}; - - % Inputs of the controllers - \coordinate[] (output1) at ($(G.south east)!0.75!(G.north east)$); - \coordinate[] (output2) at ($(G.south east)!0.25!(G.north east)$); - \coordinate[] (input1) at ($(G.south west)!0.75!(G.north west)$); - \coordinate[] (input2) at ($(G.south west)!0.25!(G.north west)$); - - \node[block, left=1.8 of input1] (K1) {$K_F$}; - \node[block] (K2) at ($(K1.east|-input2)+(0.6, 0)$) {$K_F$}; - - % Connections and labels - \draw[->] (K1.east) -- (input1)node[above left]{$F_u$}node[below left]{$-$}; - \draw[->] (K2.east) -- (input2)node[above left]{$F_v$}node[below left]{$-$}; - - \draw[->] (output1) -- ++(0.8, 0) node[above left]{$f_u$}; - \draw[->] (output2) -- ++(0.8, 0) node[above left]{$f_v$}; - - \draw[->] ($(output1)+(0.2, 0)$)node[branch]{} -- ++(0, 1.2) -| ($(K1.west) + (-0.8, 0)$)coordinate(start) -- (K1.west); - \draw[->] ($(output2)+(0.2, 0)$)node[branch]{} -- ++(0, -1.2) -| (start|-K2) -- (K2.west); - - \begin{scope}[on background layer] - \node[fit={(K1.north west) (K2.south east)}, inner sep=6pt, draw, dashed, fill=black!20!white] (K) {}; - \node[below left] at (K.north east) {$\bm{K}_F$}; - \end{scope} - \end{tikzpicture} -#+end_src - -#+RESULTS: -[[file:figs/control_diagram_iff.png]] - -* Decentralized Integral Force Feedback -#+begin_src latex :file system_iff.pdf - \begin{tikzpicture} - % Angle - \def\thetau{25} - - % Rotational Stage - \draw[fill=black!60!white] (0, 0) circle (4.3); - \draw[fill=black!40!white] (0, 0) circle (3.8); - - % Label - \node[anchor=north west, rotate=\thetau] at (-2.5, 2.5) {\small Rotating Stage}; - - % Rotating Scope - \begin{scope}[rotate=\thetau] - % Rotating Frame - \draw[fill=black!20!white] (-2.6, -2.6) rectangle (2.6, 2.6); - % Label - \node[anchor=north west, rotate=\thetau] at (-2.6, 2.6) {\small Suspended Platform}; - - % Mass - \draw[fill=white] (-1, -1) rectangle (1, 1); - % Label - \node[anchor=south west, rotate=\thetau] at (-1, -1) {\small Payload}; - - % Attached Points - \node[] at (-1, 0){$\bullet$}; - \draw[] (-1, 0) -- ++(-0.2, 0) coordinate(au); - \node[] at (0, -1){$\bullet$}; - \draw[] (0, -1) -- ++(0, -0.2) coordinate(av); - - % Force Sensors - \draw[fill=white] ($(au) + (-0.2, -0.5)$) rectangle ($(au) + (0, 0.5)$); - \draw[] ($(au) + (-0.2, -0.5)$)coordinate(actu) -- ($(au) + (0, 0.5)$); - \draw[] ($(au) + (-0.2, 0.5)$)coordinate(ku) -- ($(au) + (0, -0.5)$); - - \draw[fill=white] ($(av) + (-0.5, -0.2)$) rectangle ($(av) + (0.5, 0)$); - \draw[] ($(av) + ( 0.5, -0.2)$)coordinate(actv) -- ($(av) + (-0.5, 0)$); - \draw[] ($(av) + (-0.5, -0.2)$)coordinate(kv) -- ($(av) + ( 0.5, 0)$); - - % Spring and Actuator for U - \draw[actuator={0.6}{0.2}] (actu) -- coordinate[midway](actumid) (actu-|-2.6,0); - \draw[spring=0.2] (ku) -- node[above=0.1, rotate=\thetau]{$k$} (ku-|-2.6,0); - - % \draw[actuator={0.6}{0.2}] (actv) -- node[right, rotate=\thetau]{$F_v$} (actv|-0,-2.6); - \draw[actuator={0.6}{0.2}] (actv) -- coordinate[midway](actvmid) (actv|-0,-2.6); - \draw[spring=0.2] (kv) -- node[left, rotate=\thetau]{$k$} (kv|-0,-2.6); - - \node[block={0.8cm}{0.6cm}, rotate=\thetau] (Ku) at ($(actumid) + (0, -1.2)$) {$K_{F}$}; - \draw[->] ($(au) + (-0.1, -0.5)$) |- (Ku.east) node[below right, rotate=\thetau]{$f_{u}$}; - \draw[->] (Ku.north) -- ($(actumid) + (0, -0.1)$) node[below left, rotate=\thetau]{$F_u$} node[below right, rotate=\thetau]{$-$}; - - \node[block={0.8cm}{0.6cm}, rotate=\thetau] (Kv) at ($(actvmid) + (1.2, 0)$) {$K_{F}$}; - \draw[->] ($(av) + (0.5, -0.1)$) -| (Kv.north) node[above right, rotate=\thetau]{$f_{v}$}; - \draw[->] (Kv.west) -- ($(actvmid) + (0.1, 0)$) node[below right, rotate=\thetau]{$F_v$} node[above right, rotate=\thetau]{$-$}; - \end{scope} - - % Inertial Frame - \draw[->] (-4, -4) -- ++(2, 0) node[below]{$\vec{i}_x$}; - \draw[->] (-4, -4) -- ++(0, 2) node[left]{$\vec{i}_y$}; - \draw[fill, color=black] (-4, -4) circle (0.06); - \node[draw, circle, inner sep=0pt, minimum size=0.3cm, label=left:$\vec{i}_z$] at (-4, -4){}; - - \node[draw, circle, inner sep=0pt, minimum size=0.3cm] at (0, 0){}; - \draw[->] (0, 0) node[above left, rotate=\thetau]{$\vec{i}_w$} -- ++(\thetau:2) node[above, rotate=\thetau]{$\vec{i}_u$}; - \draw[->] (0, 0) -- ++(\thetau+90:2) node[left, rotate=\thetau]{$\vec{i}_v$}; - \draw[dashed] (0, 0) -- ++(2, 0); - \draw[] (1.5, 0) arc (0:\thetau:1.5) node[midway, right]{$\theta$}; - \node[] at (0,0) {$\bullet$}; - - \draw[->] (3.5, 0) arc (0:40:3.5) node[midway, left]{$\Omega$}; - \end{tikzpicture} -#+end_src - -#+RESULTS: -[[file:figs/system_iff.png]] - -* Springs in parallel -#+begin_src latex :file system_parallel_springs.pdf - \begin{tikzpicture} - % Angle - \def\thetau{25} - - % Rotational Stage - \draw[fill=black!60!white] (0, 0) circle (4.3); - \draw[fill=black!40!white] (0, 0) circle (3.8); - - % Label - \node[anchor=north west, rotate=\thetau] at (-2.5, 2.5) {\small Rotating Stage}; - - % Rotating Scope - \begin{scope}[rotate=\thetau] - % Rotating Frame - \draw[fill=black!20!white] (-2.6, -2.6) rectangle (2.6, 2.6); - % Label - \node[anchor=north west, rotate=\thetau] at (-2.6, 2.6) {\small Suspended Platform}; - - % Mass - \draw[fill=white] (-1, -1) rectangle (1, 1); - % Label - \node[anchor=south west, rotate=\thetau] at (-1, -1) {\small Payload}; - - % Attached Points - \draw[] (-1, 0) -- ++(-0.2, 0) coordinate(au); - \draw[] (0, -1) -- ++(0, -0.2) coordinate(av); - - % Force Sensors - \draw[fill=white] ($(au) + (-0.2, -0.5)$) rectangle ($(au) + (0, 0.5)$); - \draw[] ($(au) + (-0.2, -0.5)$)coordinate(actu) -- ($(au) + (0, 0.5)$); - \draw[] ($(au) + (-0.2, 0.5)$)coordinate(ku) -- ($(au) + (0, -0.5)$); - \node[below=0.1, rotate=\thetau] at ($(au) + (-0.1, -0.5)$) {$f_{u}$} - - \draw[fill=white] ($(av) + (-0.5, -0.2)$) rectangle ($(av) + (0.5, 0)$); - \draw[] ($(av) + ( 0.5, -0.2)$)coordinate(actv) -- ($(av) + (-0.5, 0)$); - \draw[] ($(av) + (-0.5, -0.2)$)coordinate(kv) -- ($(av) + ( 0.5, 0)$) ; - \node[right=0.1, rotate=\thetau] at ($(av) + (0.5, -0.1)$) {$f_{v}$} - - % Spring and Actuator for U - \draw[actuator={0.6}{0.2}] (actu) -- node[below=0.1, rotate=\thetau]{$F_u$} (actu-|-2.6,0); - \draw[spring=0.2] (ku) -- node[below=0.1, rotate=\thetau]{$k_a$} (ku-|-2.6,0); - \draw[spring=0.2] (-1, 0.8) -- node[above=0.1, rotate=\thetau]{$k_p$} (-1, 0.8-|-2.6,0); - - \draw[actuator={0.6}{0.2}] (actv) -- node[right=0.1, rotate=\thetau]{$F_v$} (actv|-0,-2.6); - \draw[spring=0.2] (kv) -- node[right=0.1, rotate=\thetau]{$k_a$} (kv|-0,-2.6); - \draw[spring=0.2] (-0.8, -1) -- node[left=0.1, rotate=\thetau]{$k_p$} (-0.8, -1|-0,-2.6); - \end{scope} - - % Inertial Frame - \draw[->] (-4, -4) -- ++(2, 0) node[below]{$\vec{i}_x$}; - \draw[->] (-4, -4) -- ++(0, 2) node[left]{$\vec{i}_y$}; - \draw[fill, color=black] (-4, -4) circle (0.06); - \node[draw, circle, inner sep=0pt, minimum size=0.3cm, label=left:$\vec{i}_z$] at (-4, -4){}; - - \node[draw, circle, inner sep=0pt, minimum size=0.3cm] at (0, 0){}; - \draw[->] (0, 0) node[above left, rotate=\thetau]{$\vec{i}_w$} -- ++(\thetau:2) node[above, rotate=\thetau]{$\vec{i}_u$}; - \draw[->] (0, 0) -- ++(\thetau+90:2) node[left, rotate=\thetau]{$\vec{i}_v$}; - \draw[dashed] (0, 0) -- ++(2, 0); - \draw[] (1.5, 0) arc (0:\thetau:1.5) node[midway, right]{$\theta$}; - \node[] at (0,0) {$\bullet$}; - - \draw[->] (3.5, 0) arc (0:40:3.5) node[midway, left]{$\Omega$}; - \end{tikzpicture} -#+end_src - -#+RESULTS: -[[file:figs/system_parallel_springs.png]]