slides avancées
This commit is contained in:
parent
c9fbc03e79
commit
5edd9d665e
6 changed files with 207 additions and 13 deletions
BIN
images/carbide3d-shapeoko-robust-cnc-router-kit-gray.webp
Normal file
BIN
images/carbide3d-shapeoko-robust-cnc-router-kit-gray.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
BIN
images/cnc.jpg
Normal file
BIN
images/cnc.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 48 KiB |
40
slides.nav
Normal file
40
slides.nav
Normal file
|
@ -0,0 +1,40 @@
|
|||
\headcommand {\slideentry {0}{0}{1}{1/1}{}{0}}
|
||||
\headcommand {\beamer@framepages {1}{1}}
|
||||
\headcommand {\beamer@sectionpages {1}{1}}
|
||||
\headcommand {\beamer@subsectionpages {1}{1}}
|
||||
\headcommand {\sectionentry {1}{Positionnement du Problème}{2}{Positionnement du Problème}{0}}
|
||||
\headcommand {\slideentry {1}{0}{1}{2/2}{}{0}}
|
||||
\headcommand {\beamer@framepages {2}{2}}
|
||||
\headcommand {\slideentry {1}{0}{2}{3/3}{}{0}}
|
||||
\headcommand {\beamer@framepages {3}{3}}
|
||||
\headcommand {\slideentry {1}{0}{3}{4/5}{}{0}}
|
||||
\headcommand {\beamer@framepages {4}{5}}
|
||||
\headcommand {\slideentry {1}{0}{4}{6/6}{}{0}}
|
||||
\headcommand {\beamer@framepages {6}{6}}
|
||||
\headcommand {\beamer@sectionpages {2}{6}}
|
||||
\headcommand {\beamer@subsectionpages {2}{6}}
|
||||
\headcommand {\sectionentry {2}{Implémentation}{7}{Implémentation}{0}}
|
||||
\headcommand {\slideentry {2}{0}{1}{7/7}{}{0}}
|
||||
\headcommand {\beamer@framepages {7}{7}}
|
||||
\headcommand {\slideentry {2}{0}{2}{8/8}{}{0}}
|
||||
\headcommand {\beamer@framepages {8}{8}}
|
||||
\headcommand {\slideentry {2}{0}{3}{9/9}{}{0}}
|
||||
\headcommand {\beamer@framepages {9}{9}}
|
||||
\headcommand {\slideentry {2}{0}{4}{10/10}{}{0}}
|
||||
\headcommand {\beamer@framepages {10}{10}}
|
||||
\headcommand {\slideentry {2}{0}{5}{11/11}{}{0}}
|
||||
\headcommand {\beamer@framepages {11}{11}}
|
||||
\headcommand {\beamer@sectionpages {7}{11}}
|
||||
\headcommand {\beamer@subsectionpages {7}{11}}
|
||||
\headcommand {\sectionentry {3}{Réalisme}{12}{Réalisme}{0}}
|
||||
\headcommand {\slideentry {3}{0}{1}{12/12}{}{0}}
|
||||
\headcommand {\beamer@framepages {12}{12}}
|
||||
\headcommand {\slideentry {3}{0}{2}{13/13}{}{0}}
|
||||
\headcommand {\beamer@framepages {13}{13}}
|
||||
\headcommand {\slideentry {3}{0}{3}{14/14}{}{0}}
|
||||
\headcommand {\beamer@framepages {14}{14}}
|
||||
\headcommand {\beamer@partpages {1}{14}}
|
||||
\headcommand {\beamer@subsectionpages {12}{14}}
|
||||
\headcommand {\beamer@sectionpages {12}{14}}
|
||||
\headcommand {\beamer@documentpages {14}}
|
||||
\headcommand {\gdef \inserttotalframenumber {13}}
|
BIN
slides.pdf
Normal file
BIN
slides.pdf
Normal file
Binary file not shown.
3
slides.snm
Normal file
3
slides.snm
Normal file
|
@ -0,0 +1,3 @@
|
|||
\beamer@slide {sec:le-probleme}{3}
|
||||
\beamer@slide {fig:cnc}{3}
|
||||
\beamer@slide {sec:l'implementation}{8}
|
177
slides.tex
177
slides.tex
|
@ -3,13 +3,18 @@
|
|||
\usepackage{cmap}
|
||||
\usepackage[french]{babel}
|
||||
\usepackage{amsmath, amssymb}
|
||||
\usepackage{tikz}
|
||||
\usepackage{multicol}
|
||||
\usetikzlibrary{arrows.meta, backgrounds, calc, fit, positioning, scopes, shadows}
|
||||
|
||||
|
||||
\mode<presentation>
|
||||
\usetheme{Dresden}
|
||||
|
||||
\definecolor{vulm}{HTML}{7d1dd3}
|
||||
\definecolor{yulm}{HTML}{ffe500}
|
||||
|
||||
\AtBeginSection[]{\begin{frame}{Plan}\tableofcontents[subsectionstyle=shaded/hide,sectionstyle=show/shaded]\end{frame}}
|
||||
\AtBeginSection[]{\begin{frame}{Plan}\tableofcontents[sectionstyle=show/shaded]\end{frame}}
|
||||
|
||||
\setbeamercolor{structure}{fg = vulm}
|
||||
\setbeamercolor{section in head/foot}{fg = yulm}
|
||||
|
@ -27,43 +32,189 @@
|
|||
|
||||
\begin{frame}
|
||||
\frametitle{Petite Machine à Bois}
|
||||
|
||||
\begin{figure}
|
||||
\centering
|
||||
\includegraphics[width=.9\textwidth]{images/cnc}
|
||||
\caption{Une Petite Machine à Bois}
|
||||
\label{fig:cnc}
|
||||
\end{figure}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}
|
||||
\frametitle{Format d'Entrée}
|
||||
|
||||
On convertit un fichier \texttt{.svg} en fichier \texttt{.gc} qui est une abstraction des commandes à exécuter.
|
||||
\begin{figure}
|
||||
\centering
|
||||
\begin{tikzpicture}
|
||||
\draw[vulm, fill=yulm!30] (0, 0) rectangle +(2, 2) node[pos=.5] {\texttt{.svg}};
|
||||
\draw[vulm, ->] (2, 1) -- (3, 1);
|
||||
\draw[vulm, fill=yulm!30] (3, 0) rectangle +(2, 2) node[pos=.5] {\texttt{.gc}};
|
||||
\draw[vulm, ->] (5, 1) -- (6, 1);
|
||||
\draw[vulm, fill=yulm!30, double] (6, 0) rectangle +(2, 2) node[pos=.5] {\texttt{CNC}};
|
||||
\end{tikzpicture}
|
||||
\end{figure}
|
||||
\visible<2->{Le format GCode est standardisé, et indépendant des capacités de la machine.}
|
||||
\end{frame}
|
||||
|
||||
\tikzset{
|
||||
comp/.style = {
|
||||
minimum width = 8cm,
|
||||
minimum height = 4.5cm,
|
||||
text width = 8cm,
|
||||
inner sep = 0pt,
|
||||
text = green,
|
||||
align = center,
|
||||
font = \Huge,
|
||||
transform shape,
|
||||
thick
|
||||
},
|
||||
monitor/.style = {draw = none, xscale = 18/16, yscale = 11/9},
|
||||
display/.style = {shading = axis, left color = black!60, right color = black},
|
||||
ut/.style = {fill = gray}
|
||||
}
|
||||
|
||||
\tikzset{
|
||||
computer/.pic = {
|
||||
% screen (with border)
|
||||
\node(-m) [comp, pic actions, monitor]
|
||||
{\phantom{\parbox{\linewidth}{\tikzpictext}}};
|
||||
% display (without border)
|
||||
\node[comp, pic actions, display] {\tikzpictext};
|
||||
\begin{scope}[x = (-m.east), y = (-m.north)]
|
||||
% filling the lower part
|
||||
\path[pic actions, draw = none]
|
||||
([yshift=2\pgflinewidth]-0.1,-1) -- (-0.1,-1.3) -- (-1,-1.3) --
|
||||
(-1,-2.4) -- (1,-2.4) -- (1,-1.3) -- (0.1,-1.3) --
|
||||
([yshift=2\pgflinewidth]0.1,-1);
|
||||
% filling the border of the lower part
|
||||
\path[ut]
|
||||
(-1,-2.4) rectangle (1,-1.3)
|
||||
(-0.9,-1.4) -- (-0.7,-2.3) -- (0.7,-2.3) -- (0.9,-1.4) -- cycle;
|
||||
% drawing the frame of the whole computer
|
||||
\path[pic actions, fill = none]
|
||||
(-1,1) -- (-1,-1) -- (-0.1,-1) -- (-0.1,-1.3) -- (-1,-1.3) --
|
||||
(-1,-2.4) coordinate(sw)coordinate[pos=0.5] (-b west) --
|
||||
(1,-2.4) -- (1,-1.3) coordinate[pos=0.5] (-b east) --
|
||||
(0.1,-1.3) -- (0.1,-1) -- (1,-1) -- (1,1) -- cycle;
|
||||
% node around the whole computer
|
||||
\node(-c) [fit = (sw)(-m.north east), inner sep = 0pt] {};
|
||||
\end{scope}
|
||||
}
|
||||
}
|
||||
|
||||
\begin{frame}
|
||||
\frametitle{Communication}
|
||||
|
||||
\begin{figure}
|
||||
\centering
|
||||
\hfill
|
||||
\begin{minipage}{.5\textwidth}
|
||||
\begin{tikzpicture}
|
||||
\pic(comp0) [
|
||||
draw, fill = gray!30, pic text = {Contrôleur de Petite Machine à Bois}, scale=.3
|
||||
] {computer};
|
||||
\coordinate (cnc) at ($(comp0-c.south) + (0, -1)$);
|
||||
\path (comp0-c.east) edge [loop right, min distance=.7cm, in=330, out=30, looseness=8, -{Latex[width=3mm]}, vulm] node[right, vulm, rectangle, fill=yulm!30, draw=vulm] {GCode} (comp0-c.east);
|
||||
\draw[vulm, fill=yulm!30] ($(cnc) + (-1, 0)$) rectangle +(2, -1) node[pos=0.5] {Socket};
|
||||
\draw[vulm, ->, double] ($(comp0-c.south) + (0.2, 0)$) --node[anchor=west, vulm]{$\omega_{c}$} ($(cnc.north) + (0.2, 0)$);
|
||||
\draw[vulm, <-, double] ($(comp0-c.south) + (-0.2, 0)$) --node[anchor=east, vulm]{$\theta$} ($(cnc.north) + (-0.2, 0)$);
|
||||
\draw[vulm, ->, double] ($(cnc) + (0.2, -1)$) -- node[anchor=west, vulm]{$\omega_{c}$} ($(cnc) + (0.2, -2)$);;
|
||||
\draw[vulm, <-, double] ($(cnc) + (-0.2, -1)$) -- node[anchor=east, vulm]{$\theta$} ($(cnc) + (-0.2, -2)$);;
|
||||
\draw[vulm, fill=yulm!30] ($(cnc) + (-2, -2)$) rectangle +(4, -1) node[pos=0.5] {Petite Machine à Bois};
|
||||
\end{tikzpicture}
|
||||
\end{minipage}
|
||||
\hfill
|
||||
\begin{minipage}{.4\textwidth}
|
||||
\begin{tikzpicture}[scale=.5]
|
||||
\node[vulm, font=\small] (top) at (0, 0) {\parbox{.9\linewidth}{\textbf{Contrôleur:} traduit le GCode et envoie les vitesses de commande $\omega_{c}$ pour les moteurs.}};
|
||||
\node[vulm, font=\small] (mid) at ($(top.south) + (0, -2)$) {\parbox{.9\linewidth}{\textbf{Socket:} sert d'intermédiaire pour la connexion (CNC).}};
|
||||
\node[vulm, font=\small] (bot) at ($(mid.south) + (0, -2)$) {\parbox{.9\linewidth}{\textbf{Petite Machine à Bois:} envoie les positions $\theta$ de ses moteurs pas-à-pas.}};
|
||||
\node[draw=vulm, thick, fit={(top) (mid) (bot)}, inner sep=3pt] (box) {};
|
||||
\end{tikzpicture}
|
||||
\end{minipage}
|
||||
\hfill
|
||||
\end{figure}
|
||||
\end{frame}
|
||||
|
||||
|
||||
\section{Implémentation}\label{sec:l'implementation}
|
||||
|
||||
\begin{frame}
|
||||
\frametitle{Contrôleur}
|
||||
\frametitle{Traducteur}
|
||||
On agit simplement ligne par ligne, voici quelques commandes:
|
||||
\begin{center}
|
||||
\begin{minipage}{.95\textwidth}
|
||||
\begin{multicols}{2}
|
||||
\begin{itemize}
|
||||
\item[G0:] Aller au point donné;
|
||||
\item[G1:] Aller au point donné, en coupant au passage;
|
||||
\item[G2,G3:] Faire un arc de cercle, en sens trigonométrique ou non;
|
||||
\item[G4:] Dormir;
|
||||
\item[G5:] Suivre une courbe de Bézier cubique. Permet d'en suivre plusieurs d'affilée de manière dérivable;
|
||||
\item[G20:] WTF IS A KILOMETER;
|
||||
\item[G21:] Changer d'unité en mm;
|
||||
\item[G28:] Retourner à la maison;
|
||||
\item[G30:] Retourner à la maison, en passant par un point donné.
|
||||
\end{itemize}
|
||||
\end{multicols}
|
||||
\end{minipage}
|
||||
\end{center}
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}
|
||||
\frametitle{Module de Contrôle Hardware}
|
||||
Le module Hardware du contrôleur maintient une représentation mémoire de la position \emph{théorique} de la tête, transmise au contrôleur.
|
||||
Il demande à la socket (et donc au \emph{vrai} hardware) les positions mesurées des moteurs pas-à-pas.
|
||||
\begin{figure}
|
||||
\centering
|
||||
\begin{tikzpicture}
|
||||
\draw[vulm, fill=yulm!30] (0, 0) rectangle +(2, 1) node[pos=0.5] (h) {Hardware};
|
||||
\draw[vulm, fill=yulm!30] (6, 0) rectangle +(2, 1) node[pos=0.5] (c) {Contrôleur};
|
||||
\draw[vulm, fill=yulm!30] (0, -2) rectangle +(2, 1) node[pos=0.5] (s) {Socket};
|
||||
\draw[vulm, ->] ($(h.east) + (.2, 0.1)$) -- node[above, vulm] {Position $\rho$ \& Cible $\tau$} ($(c.west) + (-0.1, 0.1)$);
|
||||
\draw[vulm, <-] ($(h.east) + (.2, -0.1)$) -- node[below, vulm] {Déplacement $\Gamma_{c}$} ($(c.west) + (-0.1, -0.1)$);
|
||||
\draw[vulm, ->] ($(h.south) + (.1, -.3)$) -- node[right, vulm] {$\omega_{c}$} ($(s.north) + (.1, 0.3)$);
|
||||
\draw[vulm, <-] ($(h.south) + (-.1, -.3)$) -- node[left, vulm] {$\theta$} ($(s.north) + (-.1, 0.3)$);
|
||||
\end{tikzpicture}
|
||||
\end{figure}
|
||||
Il envoie ensuite à la socket pour envoyer les vitesses de commandes traduites dans la spécification des moteurs.
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}
|
||||
\frametitle{Contrôleur en Vitesse}
|
||||
Dans une première approximation, on poursuit le point de contrôle à vitesse constante.
|
||||
On calcule $\delta = \rho - \tau$.
|
||||
Selon le signe de $\delta_{x}$ (resp. $y, z$) on définit $\omega_{c}$ la vitesse de commande de sorte que:
|
||||
\begin{equation*}
|
||||
\norm{\omega_{c}} = 1 \text{ et } \left(\omega_{c}\right)_{x} \leq \texttt{FAST_XY_FEEDRATE} \text{(resp. $y, z$)}
|
||||
\end{equation*}
|
||||
Un contrôleur plus poussé est obtenu en ajoutant une proportionnalité par rapport à l'écart \emph{théorie - mesure}.
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}
|
||||
\frametitle{Simulateur}
|
||||
|
||||
Pour modéliser la Petite Machine à Bois, on construit un simulateur physique simple.
|
||||
On discrétise le temps par:
|
||||
\begin{equation*}
|
||||
\Delta t = t\left( \text{dernière requête reçue} \right) - t\left( \text{dernière requête traitée} \right)
|
||||
\end{equation*}
|
||||
On a ensuite par le PFD:
|
||||
\begin{equation*}
|
||||
\dot{J_{\omega}} = \underset{\text{Inertie}}{-f\omega} + \underset{\text{Couple Commande}}{\left( \omega_{c} - \omega_{t} \right)}, \text{d'où } \omega_{t + 1} = \omega_{t} + \Delta t \left( -f\omega + \left( \omega_{c} - \omega_{t} \right) \right)
|
||||
\end{equation*}
|
||||
On introduit par ailleurs un terme d'erreur lié aux frottements, et on peut encore raffiner le modèle.
|
||||
\end{frame}
|
||||
|
||||
|
||||
\section{Réalisme}
|
||||
|
||||
\begin{frame}
|
||||
\frametitle{Connexion}
|
||||
|
||||
\end{frame}
|
||||
|
||||
\begin{frame}
|
||||
\frametitle{Précision}
|
||||
|
||||
\frametitle{Connexion et Précision}
|
||||
L'utilisation d'une socket et d'un modèle théorique restreint comme intermédiaire permet de prendre en compte, durant les phases de test, les différents facteurs d'erreurs pouvant intervenir durant l'exécution:
|
||||
\begin{itemize}
|
||||
\item Une connexion trop volatile;
|
||||
\item Des erreurs liées au glissement des moteurs pas-à-pas;
|
||||
\item Des erreurs liées à la dureté du matériau à couper, et à son anisotropie.
|
||||
\end{itemize}
|
||||
\end{frame}
|
||||
|
||||
\end{document}
|
||||
|
|
Loading…
Reference in a new issue