diff options
| author | 2026-11-11 22:28:13 +0000 | |
|---|---|---|
| committer | 2026-11-11 22:47:34 +0000 | |
| commit | cb070b2d3f2b6e241e3be1b7e0eeb90fc755255f (patch) | |
| tree | c7d90c0abe9533c87d51b5196871846855efa1ba /doc/presentation/presentation.org | |
| download | thesis-master.tar.gz | |
Diffstat (limited to 'doc/presentation/presentation.org')
| -rw-r--r-- | doc/presentation/presentation.org | 969 |
1 files changed, 969 insertions, 0 deletions
diff --git a/doc/presentation/presentation.org b/doc/presentation/presentation.org new file mode 100644 index 0000000..6369476 --- /dev/null +++ b/doc/presentation/presentation.org | |||
| @@ -0,0 +1,969 @@ | |||
| 1 | #+title: ДИПЛОМНАЯ РАБОТА | ||
| 2 | #+subtitle: «АЛГОРИТМ УТОЧНЕНИЯ ТРАЕКТОРИИ ДВИЖЕНИЯ ИСПОЛНИТЕЛЬНОГО ОРГАНА СТАНКА С ЧПУ КОМПЕНСАЦИОННЫМИ ДВИЖЕНИЯМИ» | ||
| 3 | #+author: Студент:\\ | ||
| 4 | #+author: М. Михалец, гр. 5130201/20101@@latex:\\[2mm]@@ | ||
| 5 | #+author: Научный руководитель:\\ | ||
| 6 | #+author: к.т.н., доцент ВШТИИ С. Г. Попов@@latex:\\[2mm]@@ | ||
| 7 | #+author: Научный консультант:\\ | ||
| 8 | #+author: П. А. Нестеренко\vspace*{-8mm} | ||
| 9 | #+date: 2026-06-25 | ||
| 10 | #+creator: Emacs 30.2 (Org mode 9.8-pre) | ||
| 11 | #+language: ru | ||
| 12 | #+setupfile: setup.org | ||
| 13 | #+startup: beamer | ||
| 14 | #+latex: \setbeamertemplate{footline}[frame number] | ||
| 15 | #+latex: \sloppy | ||
| 16 | #+latex: \frame[plain]{\titlepage} | ||
| 17 | #+latex_header_extra: \makeatletter | ||
| 18 | #+latex_header_extra: \renewcommand{\insertframenumber}{\two@digits{\value{framenumber}}} | ||
| 19 | #+latex_header_extra: \makeatother | ||
| 20 | #+latex: \setbeamertemplate{footline}{ | ||
| 21 | #+latex: \includesvg[height=.5cm]{polytech-short} | ||
| 22 | #+latex: \hfill | ||
| 23 | #+latex: \usebeamercolor[fg]{page number in head/foot} | ||
| 24 | #+latex: \usebeamerfont{page number in head/foot} | ||
| 25 | #+latex: \raisebox{.45ex}{Мартин Михалец}\kern.5ex | ||
| 26 | #+latex: \hfill | ||
| 27 | #+latex: \raisebox{.45ex}{\insertdate}\kern.5ex | ||
| 28 | #+latex: \hfill | ||
| 29 | #+latex: \raisebox{.45ex}{\insertframenumber\,/\,15}\kern.5ex | ||
| 30 | #+latex: } | ||
| 31 | |||
| 32 | * Введение | ||
| 33 | ** Проблема прохождения изломов пути :B_block: | ||
| 34 | :PROPERTIES: | ||
| 35 | :BEAMER_env: block | ||
| 36 | :END: | ||
| 37 | - Сглаживание углов -- неточное следование | ||
| 38 | - Снижение скорости -- пережёг/вибрации | ||
| 39 | |||
| 40 | #+attr_latex: :options [H] :width \textwidth | ||
| 41 | #+begin_figure | ||
| 42 | \centering | ||
| 43 | #+attr_latex: :options {.46\textwidth} | ||
| 44 | #+begin_subfigure | ||
| 45 | \centering | ||
| 46 | #+attr_latex: :center nil :width \textwidth | ||
| 47 | [[./res/cnc-gcode.jpg]] | ||
| 48 | #+end_subfigure | ||
| 49 | #+attr_latex: :options {.26\textwidth} | ||
| 50 | #+begin_subfigure | ||
| 51 | \centering | ||
| 52 | #+attr_latex: :center nil :width \textwidth | ||
| 53 | [[./res/corner-burn.jpg]] | ||
| 54 | #+end_subfigure | ||
| 55 | #+attr_latex: :options {.26\textwidth} | ||
| 56 | #+begin_subfigure | ||
| 57 | \centering | ||
| 58 | #+attr_latex: :center nil :width \textwidth | ||
| 59 | [[./res/corner-wobble.jpg]] | ||
| 60 | #+end_subfigure | ||
| 61 | #+end_figure | ||
| 62 | |||
| 63 | #+latex: \vspace*{-5mm} | ||
| 64 | ** Предложенное решение :B_block: | ||
| 65 | :PROPERTIES: | ||
| 66 | :BEAMER_env: block | ||
| 67 | :END: | ||
| 68 | Локально добавить компенсационные движения для изменения скорости и | ||
| 69 | направления с выключенным инструментом | ||
| 70 | |||
| 71 | * Цель и задачи | ||
| 72 | ** Цель :B_block: | ||
| 73 | :PROPERTIES: | ||
| 74 | :BEAMER_env: block | ||
| 75 | :END: | ||
| 76 | Алгоритм уточнения траектории движения исполнительного органа станка с | ||
| 77 | ЧПУ, сохраняющий геометрию и режимы движения на рабочих участках | ||
| 78 | |||
| 79 | ** Задачи :B_block: | ||
| 80 | :PROPERTIES: | ||
| 81 | :BEAMER_env: block | ||
| 82 | :END: | ||
| 83 | 1. Исследовать метрики и способы обеспечения плавности движения | ||
| 84 | исполнительных органов | ||
| 85 | 2. Формализовать метод компенсационных движений | ||
| 86 | 3. Разработать алгоритм построения компенсационных движений | ||
| 87 | 4. Реализовать программный прототип данного алгоритма | ||
| 88 | 5. Исследовать характеристики предложенного алгоритма в симуляторе | ||
| 89 | |||
| 90 | * Постановка задачи | ||
| 91 | ** Дано: :B_block: | ||
| 92 | :PROPERTIES: | ||
| 93 | :BEAMER_env: block | ||
| 94 | :END: | ||
| 95 | 1. Исходный путь \(\mathcal P = \{p_i\}_{i=\text{1}}^\text{N}\), \(p_i=(\gamma_i, v_i, u_i)\) | ||
| 96 | 2. Кинематические ограничения: \(v_{max}\), \(a_{max}\), \(j_{max}\) | ||
| 97 | 3. Рабочая зона станка \(\Omega \subset \mathbb R^\text{2}\) | ||
| 98 | |||
| 99 | ** Требуется: :B_block: | ||
| 100 | :PROPERTIES: | ||
| 101 | :BEAMER_env: block | ||
| 102 | :END: | ||
| 103 | #+latex: \vspace*{-7mm} | ||
| 104 | \[ | ||
| 105 | \text{Найти}\quad \mathcal C: \mathcal P \rightarrow | ||
| 106 | \widetilde{\mathcal P}\quad \text{минимизирующее}\quad \overline | ||
| 107 | j(\widetilde{\mathcal P}_{work}),\ \overline e_{v}(\widetilde{\mathcal | ||
| 108 | P}_{work}) | ||
| 109 | \] | ||
| 110 | \[ | ||
| 111 | \text{где}\quad \widetilde{\mathcal P}_{work} = \left\{\widetilde{p}_{i} \in | ||
| 112 | \widetilde{\mathcal P} \mid \widetilde{u}_{i} = \text{«вкл»}\right\} | ||
| 113 | \] | ||
| 114 | #+latex: \vspace*{-7mm} | ||
| 115 | |||
| 116 | ** Ограничения: :B_block: | ||
| 117 | :PROPERTIES: | ||
| 118 | :BEAMER_env: block | ||
| 119 | :END: | ||
| 120 | 1. Сохранение рабочего контура: \(\widetilde{\mathcal P}_{work} = \mathcal P_{work}\) | ||
| 121 | 2. Внутри рабочей зоны станка: \(\forall \xi: \widetilde\gamma_{i}(\xi) \in \Omega\quad i = \text{1}, \ldots, \widetilde N\) | ||
| 122 | |||
| 123 | * Определение критических точек | ||
| 124 | ** Классификация :B_block: | ||
| 125 | :PROPERTIES: | ||
| 126 | :BEAMER_env: block | ||
| 127 | :END: | ||
| 128 | - Подход: \(X_{i}^{\text{in}} = \left(P_{i},\nu_{i}^{+}\right)\), если @@latex:$\left\{\begin{smallmatrix*}[l] u_{i}\ \ \; =\ \text{0} \\ u_{i+\text{1}} =\ \text{1}\end{smallmatrix*} \right.$@@ | ||
| 129 | - Излом: \(X_{i}^{\text{kink}} = \left(P_{i},\nu_{i}^{-}, \nu_{i}^{+}\right)\), если @@latex:$\left\{\begin{smallmatrix*}[l] u_{i}\ \ \; =\ \text{1} \\ u_{i+\text{1}} =\ \text{1}\\ \theta_{i}\ >\ \theta_{\max}\end{smallmatrix*} \right.$@@ | ||
| 130 | - Отход: \(X_{i}^{\text{out}} = \left(P_{i},\nu_{i}^{-}\right)\), если @@latex:$\left\{\begin{smallmatrix*}[l] u_{i}\ \ \; =\ \text{1} \\ u_{i+\text{1}} =\ \text{0}\end{smallmatrix*} \right.$@@ | ||
| 131 | |||
| 132 | #+begin_figure | ||
| 133 | \centering | ||
| 134 | \begin{tikzpicture}[ | ||
| 135 | line cap=round, | ||
| 136 | line join=round, | ||
| 137 | >=stealth, | ||
| 138 | on/.style={blue, thick}, | ||
| 139 | off/.style={orange, thick}, | ||
| 140 | vec/.style={very thick, ->}, | ||
| 141 | state/.style={black, midway, sloped, above,align=center}, | ||
| 142 | cont/.style={thick, decorate, decoration={snake, amplitude=1.5pt, segment length=10pt}} | ||
| 143 | ] | ||
| 144 | \coordinate (legend) at (7.7,1.2); | ||
| 145 | \coordinate (ps) at ( 0,0); | ||
| 146 | \coordinate (p0) at ( 2,0); | ||
| 147 | \coordinate (p1) at ( 4,1); | ||
| 148 | \coordinate (p2) at ( 8,0); | ||
| 149 | \coordinate (pe) at (10,0); | ||
| 150 | |||
| 151 | \draw[off] (ps) -- (p0) node[state] {$u_{i}=\text{0}$}; | ||
| 152 | \draw[on] (p0) -- (p1) node[state] {$u_{i+\text{1}}=\text{1}$}; | ||
| 153 | \draw[on] (p1) -- (p2) node[state, pos=.66] {$u_{i+\text{2}}=\text{1}$}; | ||
| 154 | \draw[off] (p2) -- (pe) node[state] {$u_{i+\text{3}}=\text{0}$}; | ||
| 155 | |||
| 156 | \draw[cont] ($(ps)+(0,-.4)$) -- ($(ps)+(0,.4)$); | ||
| 157 | \draw[cont] ($(pe)+(.05,-.4)$) -- ($(pe)+(.05,.4)$); | ||
| 158 | |||
| 159 | \fill (p0) circle (2pt) node[align=center,below] {$P_{i}$\\«подход»}; | ||
| 160 | \fill (p1) circle (2pt) node[align=center,above] {«излом»\\$P_{i+\text{1}}$}; | ||
| 161 | \fill (p2) circle (2pt) node[align=center,below] {$P_{i+\text{2}}$\\«отход»}; | ||
| 162 | |||
| 163 | \draw[vec, red] (p0) -- ($(p0)!1cm!(p1)$) node[black,below] {$\nu_{i}^{+}$}; | ||
| 164 | |||
| 165 | \coordinate (v1m) at ($(p1)!-1.5cm!(p0)$); | ||
| 166 | \coordinate (v1p) at ($(p1)!+1.5cm!(p2)$); | ||
| 167 | \draw pic [draw,thick,angle radius=1.25cm] {angle = v1p--p1--v1m}; | ||
| 168 | \draw node[anchor=west] at ($(p1)+(.35,+.05)$) {$\theta_{i+\text{1}}$}; | ||
| 169 | \draw[vec, green] (p1) -- (v1m) node[black,right] {$\nu_{i+\text{1}}^{-}$}; | ||
| 170 | \draw[vec, red] (p1) -- (v1p) node[black,below] {$\nu_{i+\text{1}}^{+}$}; | ||
| 171 | |||
| 172 | \draw[vec, green] (p2) -- ($(p2)!-1cm!(p1)$) node[black,right] {$\nu_{i+\text{2}}^{-}$}; | ||
| 173 | |||
| 174 | \draw[thick, orange] ($(legend)+(0,0.0)$) -- ++(.5,0) node[black,right] {холостое}; | ||
| 175 | \draw[thick, blue ] ($(legend)+(0,0.5)$) -- ++(.5,0) node[black,right] {рабочее}; | ||
| 176 | \end{tikzpicture} | ||
| 177 | #+end_figure | ||
| 178 | |||
| 179 | * Алгоритм построения компенсационных движений | ||
| 180 | #+begin_export latex | ||
| 181 | \begin{enumerate} | ||
| 182 | \item \small Вычисление времени разгона/торможения | ||
| 183 | \footnotesize\[ | ||
| 184 | T(\Delta v)= | ||
| 185 | \begin{cases} | ||
| 186 | \text{2}\sqrt{\dfrac{|\Delta v|}{j_{\max}}}, & |\Delta v|\le \dfrac{a_{\max}^\text{2}}{j_{\max}} \quad(\text{не достигается}\ a_{max})\\[1.2em] | ||
| 187 | \dfrac{|\Delta v|}{a_{\max}}+\dfrac{a_{\max}}{j_{\max}}, & |\Delta v|> \dfrac{a_{\max}^\text{2}}{j_{\max}} \quad(\text{достигается}\ a_{max}) | ||
| 188 | \end{cases} | ||
| 189 | \]\small | ||
| 190 | \item Вычисление расстояния для разгона/торможения | ||
| 191 | \footnotesize\[ | ||
| 192 | L(v_\text{0},v_\text{1})=\frac{v_\text{0}+v_\text{1}}{\text{2}}\,T(v_\text{1} - v_\text{0}) \quad\Rightarrow\quad | ||
| 193 | d_i^{in} = L(\text{0}, \|\nu_i^{+}\|),\ d_i^{out} = L(\|\nu_i^{-}\|, \text{0}) | ||
| 194 | \]\small | ||
| 195 | \item Вычисление положения опорной точки | ||
| 196 | \item Отсечение опорной точки по окну рабочей зоны | ||
| 197 | \end{enumerate} | ||
| 198 | \vspace*{-2mm} | ||
| 199 | #+end_export | ||
| 200 | |||
| 201 | #+begin_figure | ||
| 202 | \centering | ||
| 203 | \begin{tikzpicture}[ | ||
| 204 | line cap=round, | ||
| 205 | line join=round, | ||
| 206 | >=stealth, | ||
| 207 | on/.style={blue, thick}, | ||
| 208 | off/.style={orange, thick}, | ||
| 209 | cont/.style={thick, decorate, decoration={snake, amplitude=1.5pt, segment length=10pt}}, | ||
| 210 | dist/.style={midway,sloped,above,black} | ||
| 211 | ] | ||
| 212 | \coordinate (legend) at (7.7,1.2); | ||
| 213 | \coordinate (ps) at ( 0,0); | ||
| 214 | \coordinate (p0) at ( 2,0); | ||
| 215 | \coordinate (p1) at ( 4,1); | ||
| 216 | \coordinate (p2) at ( 8,0); | ||
| 217 | \coordinate (pe) at (10,0); | ||
| 218 | |||
| 219 | \coordinate (p0i) at ($(p0)!-1.5cm!(p1)$); | ||
| 220 | \coordinate (p1o) at ($(p1)!-1.5cm!(p0)$); | ||
| 221 | \coordinate (p1i) at ($(p1)!-1.5cm!(p2)$); | ||
| 222 | \coordinate (p2o) at ($(p2)!-1.5cm!(p1)$); | ||
| 223 | |||
| 224 | \draw[off] (ps) -- (p0i); | ||
| 225 | \draw[off] (p0i) -- (p0) node[dist] {$d_{i}^{in}$}; | ||
| 226 | \draw[on ] (p0) -- (p1); | ||
| 227 | \draw[off] (p1) -- (p1o) node[dist,below right] {$d_{i+\text{1}}^{out}$}; | ||
| 228 | \draw[off] (p1o) -- (p1i); | ||
| 229 | \draw[off] (p1i) -- (p1) node[dist,below left] {$d_{i+\text{1}}^{in}$}; | ||
| 230 | \draw[on ] (p1) -- (p2); | ||
| 231 | \draw[off] (p2) -- (p2o) node[dist] {$d_{i+\text{2}}^{out}$}; | ||
| 232 | \draw[off] (p2o) -- (pe); | ||
| 233 | |||
| 234 | \fill (p0) circle (2pt) node[below] {$P_{i}$}; | ||
| 235 | \fill (p1) circle (2pt) node[below] {$P_{i+\text{1}}$}; | ||
| 236 | \fill (p2) circle (2pt) node[below] {$P_{i+\text{2}}$}; | ||
| 237 | |||
| 238 | \fill[polytech] (p0i) circle (2pt) node[black, below] {$P_{i}^{in}$}; | ||
| 239 | \fill[polytech] (p1o) circle (2pt) node[black, right] {$P_{i+\text{1}}^{out}$}; | ||
| 240 | \fill[polytech] (p1i) circle (2pt) node[black, left] {$P_{i+\text{1}}^{in}$}; | ||
| 241 | \fill[polytech] (p2o) circle (2pt) node[black, below] {$P_{i+\text{2}}^{out}$}; | ||
| 242 | |||
| 243 | \draw[cont] ($(ps)+(-.05,-.3)$) -- ($(ps)+(-.05,.5)$); | ||
| 244 | \draw[cont] ($(pe)+(.05,-.4)$) -- ($(pe)+(.05,.4)$); | ||
| 245 | |||
| 246 | \draw[thick, orange] ($(legend)+(0,0.0)$) -- ++(.5,0) node[black,right] {холостое}; | ||
| 247 | \draw[thick, blue ] ($(legend)+(0,0.5)$) -- ++(.5,0) node[black,right] {рабочее}; | ||
| 248 | \end{tikzpicture} | ||
| 249 | #+end_figure | ||
| 250 | |||
| 251 | * Структурно-функциональная схема | ||
| 252 | #+begin_export latex | ||
| 253 | \begin{adjustwidth}{-1cm}{-1cm} | ||
| 254 | \makebox[\paperwidth][c]{\centering\resizebox{.9\paperwidth}{!}{ | ||
| 255 | \begin{tikzpicture}[ | ||
| 256 | >=Stealth, | ||
| 257 | font=\small, | ||
| 258 | block/.style={ | ||
| 259 | draw, | ||
| 260 | thick, | ||
| 261 | align=center, | ||
| 262 | minimum height=1.25cm, | ||
| 263 | text width=3.2cm, | ||
| 264 | inner sep=6pt | ||
| 265 | }, | ||
| 266 | area/.style={ | ||
| 267 | draw, | ||
| 268 | dashed, | ||
| 269 | thick, | ||
| 270 | inner sep=0.75cm | ||
| 271 | }, | ||
| 272 | arrow/.style={->, thick}, | ||
| 273 | label/.style={align=center} | ||
| 274 | ] | ||
| 275 | |||
| 276 | \node[block] (det) at (0, 0) {Детектор\\критических\\точек}; | ||
| 277 | \coordinate (det-path-in) at ($(det.west)!0.5!(det.north west)$); | ||
| 278 | \coordinate (det-para-in) at ($(det.west)!0.5!(det.south west)$); | ||
| 279 | \coordinate (det-pnts-out) at (det.south); | ||
| 280 | |||
| 281 | \node[block] (gen) at ($(det-pnts-out)-(0,3)$) {Генератор\\компенсационных\\движений}; | ||
| 282 | \coordinate (gen-pnts-in) at (gen.north); | ||
| 283 | \coordinate (gen-path-in) at ($(gen.west)!0.5!(gen.north west)$); | ||
| 284 | \coordinate (gen-para-in) at ($(gen.west)!0.5!(gen.south west)$); | ||
| 285 | \coordinate (gen-traj-out) at (gen.east); | ||
| 286 | |||
| 287 | \node[block,anchor=east, text width=2.5cm] (cam) at ($(det-path-in)-(2.9,0)$) {Система\\CAM\footnotemark}; | ||
| 288 | \coordinate (cam-path-out) at (cam.east); | ||
| 289 | |||
| 290 | \pic (op) at ($(gen-para-in)-(0.3,0.5)-(4,0)$) {stickman}; | ||
| 291 | \coordinate (op-para-out) at (op-rightarm); | ||
| 292 | \node[below=0.1cm of op-ground] {Оператор}; | ||
| 293 | |||
| 294 | \node[block, anchor=west, text width=2.5cm] (cnc) at ($(gen-traj-out)+(3.3,0)$) {Станок\\с ЧПУ}; | ||
| 295 | \coordinate (cnc-traj-in) at (cnc.west); | ||
| 296 | |||
| 297 | \begin{scope}[on background layer] | ||
| 298 | \node[area, fit=(det)(gen)] (method) {}; | ||
| 299 | \end{scope} | ||
| 300 | |||
| 301 | \draw[arrow] (cam-path-out) -- (det-path-in) node[at start, above right, align=center] {Исходный\\путь}; | ||
| 302 | \draw[arrow] ($(cam-path-out)!0.47!(det-path-in)$) |- (gen-path-in); | ||
| 303 | |||
| 304 | \draw[arrow] (op-para-out) -- (gen-para-in) node[at start, above right, align=center] {Параметры\\модели}; | ||
| 305 | \draw[arrow] ($(op-para-out)!0.71!(gen-para-in)$) |- (det-para-in); | ||
| 306 | |||
| 307 | \draw[arrow] (det-pnts-out) -- (gen-pnts-in) node[midway, right, align=left] {Критические\\точки}; | ||
| 308 | \draw[arrow] (gen-traj-out) -- (cnc-traj-in) node[at end, above left, align=center] {Реализуемая\\траектория}; | ||
| 309 | \end{tikzpicture} | ||
| 310 | } | ||
| 311 | } | ||
| 312 | \end{adjustwidth} | ||
| 313 | \footnotetext{Computer Aided Manufacturing} | ||
| 314 | #+end_export | ||
| 315 | |||
| 316 | * Схема эксперимента | ||
| 317 | #+latex: \footnotesize | ||
| 318 | \textcolor{polytech}{skywrite:} Исходный G-код \(\,\to\,\) | ||
| 319 | интерпретация \(\,\to\,\) поиск критических точек \(\,\to\,\) | ||
| 320 | компенсации \(\,\to\,\) уточнённый G-код | ||
| 321 | |||
| 322 | \textcolor{polytech}{simulate:} G-код \(\,\to\,\) интерпретация | ||
| 323 | \(\,\to\,\) планирование движения \(\,\to\,\) визуализация и расчёт | ||
| 324 | метрик | ||
| 325 | #+begin_export latex | ||
| 326 | \begin{adjustwidth}{-1cm}{-1cm} | ||
| 327 | \makebox[\paperwidth][c]{\centering\includesvg[inkscapelatex=false,width=.7\paperwidth]{./res/experiment}} | ||
| 328 | \end{adjustwidth} | ||
| 329 | #+end_export | ||
| 330 | \textcolor{polytech}{Главные метрики:} | ||
| 331 | - Средний абсолютный рывок на рабочих участках \(\overline j\) | ||
| 332 | - Средняя абсолютная ошибка скорости на рабочих участках \(\overline e_{v}\) | ||
| 333 | #+latex: \normalsize | ||
| 334 | |||
| 335 | * Исходные данные | ||
| 336 | Исходный G-код содержит: | ||
| 337 | - 10 холостых линейных интерполяции | ||
| 338 | - 95 рабочих линейных интерполяции | ||
| 339 | - 50 рабочих дуговых интерполяции | ||
| 340 | \vspace*{-2mm} | ||
| 341 | #+begin_export latex | ||
| 342 | \begin{gather*} | ||
| 343 | v_{work} = \text{50 мм/с},\quad \Omega = \text{1000} \times \text{700 мм},\quad \theta_{\max} = \pi/\text{16},\quad dt = \text{1 мс}\\ | ||
| 344 | v_{\max} = \text{100 мм/с},\quad a_{\max} = \text{800 мм/с$^\text{2}$},\quad j_{\max} = \text{16000 мм/с$^\text{3}$} | ||
| 345 | \end{gather*} | ||
| 346 | #+end_export | ||
| 347 | \vspace*{-6mm} | ||
| 348 | #+begin_export latex | ||
| 349 | \begin{figure}[H] | ||
| 350 | \centering | ||
| 351 | \begin{subfigure}{.43\textwidth} | ||
| 352 | \centering | ||
| 353 | \includesvg[inkscapelatex=false,width=\textwidth]{./res/logo_03} | ||
| 354 | \vspace*{2mm} | ||
| 355 | \end{subfigure} | ||
| 356 | \begin{subfigure}{.56\textwidth} | ||
| 357 | \centering | ||
| 358 | \includegraphics[width=\textwidth]{./res/original-path-overview.png} | ||
| 359 | \end{subfigure} | ||
| 360 | \end{figure} | ||
| 361 | #+end_export | ||
| 362 | |||
| 363 | * Рывок \(j\) на части траектории | ||
| 364 | #+begin_export latex | ||
| 365 | \begin{tikzpicture}[ | ||
| 366 | node distance=0 and 0, | ||
| 367 | img/.style={inner sep=0pt, outer sep=0pt}, | ||
| 368 | label/.style={inner sep=0pt, outer sep=0pt, anchor=south, font=\small} | ||
| 369 | ] | ||
| 370 | \node[img] (os) {\includegraphics[width=4.4cm]{./res/jerk-orig.png}}; | ||
| 371 | \node[img,right=-1pt of os] (cs) {\includegraphics[width=4.4cm]{./res/jerk-comp.png}}; | ||
| 372 | \node[img,below=-1pt of os] (oa) {\includegraphics[width=4.4cm]{./res/jerk-orig-alpha.png}}; | ||
| 373 | \node[img,below=-1pt of cs] (ca) {\includegraphics[width=4.4cm]{./res/jerk-comp-alpha.png}}; | ||
| 374 | |||
| 375 | \node[label] at ($(os.north)+(0,.05)$) {Исходный}; | ||
| 376 | \node[label] at ($(cs.north)+(0,.05)$) {Уточнённый}; | ||
| 377 | \node[label, rotate=90] at ($(os.west)-(.05,0)$) {Полный}; | ||
| 378 | \node[label, rotate=90] at ($(oa.west)-(.05,0)$) {Неблагоприятный}; | ||
| 379 | |||
| 380 | \draw[line width=0.5pt, bottom color=red, top color=blue] | ||
| 381 | ($(cs.north east)+(.1,0)$) rectangle ($(ca.south east)+(.5,0)$) | ||
| 382 | node[anchor=north west] at ($(cs.north east)+(.5,0)$) {16} | ||
| 383 | node[anchor=west] at ($(cs.south east)+(.5,0)$) {0} | ||
| 384 | node[anchor=south west] at ($(ca.south east)+(.5,0)$) {-16} | ||
| 385 | node[anchor=north,rotate=90] at ($(cs.south east)+(1,0)$) {Рывок, $j$ (м/с$^\text{3}$)}; | ||
| 386 | \end{tikzpicture} | ||
| 387 | #+end_export | ||
| 388 | |||
| 389 | * Рывок \(j\) за первых 8 секунд | ||
| 390 | #+begin_export latex | ||
| 391 | \begin{adjustwidth}{-1cm}{-1cm} | ||
| 392 | \makebox[\paperwidth][c]{\centering\resizebox{\paperwidth}{!}{\input{res/jerk}}} | ||
| 393 | \end{adjustwidth} | ||
| 394 | #+end_export | ||
| 395 | |||
| 396 | * Ошибка скорости \(|e_{v}|\) на части траектории | ||
| 397 | #+begin_export latex | ||
| 398 | \begin{tikzpicture}[ | ||
| 399 | node distance=0 and 0, | ||
| 400 | img/.style={inner sep=0pt, outer sep=0pt}, | ||
| 401 | label/.style={inner sep=0pt, outer sep=0pt, anchor=south, font=\small} | ||
| 402 | ] | ||
| 403 | \node[img] (os) {\includegraphics[width=4.4cm]{./res/error-orig.png}}; | ||
| 404 | \node[img,right=-1pt of os] (cs) {\includegraphics[width=4.4cm]{./res/error-comp.png}}; | ||
| 405 | \node[img,below=-1pt of os] (oa) {\includegraphics[width=4.4cm]{./res/error-orig-alpha.png}}; | ||
| 406 | \node[img,below=-1pt of cs] (ca) {\includegraphics[width=4.4cm]{./res/error-comp-alpha.png}}; | ||
| 407 | |||
| 408 | \node[label] at ($(os.north)+(0,.05)$) {Исходный}; | ||
| 409 | \node[label] at ($(cs.north)+(0,.05)$) {Уточнённый}; | ||
| 410 | \node[label, rotate=90] at ($(os.west)-(.05,0)$) {Общий вид}; | ||
| 411 | \node[label, rotate=90] at ($(oa.west)-(.05,0)$) {Только отклонения}; | ||
| 412 | |||
| 413 | \draw[line width=0.5pt, bottom color=green, top color=red] | ||
| 414 | ($(cs.north east)+(.1,0)$) rectangle ($(ca.south east)+(.5,0)$) | ||
| 415 | node[anchor=north west] at ($(cs.north east)+(.5,0)$) {50} | ||
| 416 | node[anchor=south west] at ($(ca.south east)+(.5,0)$) {0} | ||
| 417 | node[anchor=north,rotate=90] at ($(cs.south east)+(1,0)$) {Ошибка скорости, $|e_{v}|$ (мм/с)}; | ||
| 418 | \end{tikzpicture} | ||
| 419 | #+end_export | ||
| 420 | |||
| 421 | * Ошибка скорости \(|e_{v}|\) за первых 8 секунд | ||
| 422 | #+begin_export latex | ||
| 423 | \begin{adjustwidth}{-1cm}{-1cm} | ||
| 424 | \makebox[\paperwidth][c]{\centering\resizebox{\paperwidth}{!}{\input{res/speed_error}}} | ||
| 425 | \end{adjustwidth} | ||
| 426 | #+end_export | ||
| 427 | |||
| 428 | * Результаты исследования | ||
| 429 | #+latex: \begin{adjustwidth}{-1cm}{-1cm} | ||
| 430 | #+latex: \renewcommand{\arraystretch}{1.25} | ||
| 431 | | Метрика | Исходный | Уточнённый | \(\Delta\) | % | | ||
| 432 | |---------------------------------+----------+------------+------------+--------| | ||
| 433 | | \(S\) (мм) | 979.518 | 1861.97 | +882.452 | +90.09 | | ||
| 434 | | \(T\) (с) | 28.574 | 54.0372 | +25.463 | +89.11 | | ||
| 435 | | \(\overline j\) (мм/с^{3}) | 10070.9 | 690.738 | -9380.162 | *-93.14* | | ||
| 436 | | \(\max\vert j\vert\) (мм/с^{3}) | 36328.1 | 19402.9 | -16925.200 | -46.59 | | ||
| 437 | | \(\overline e_{v}\) (мм/с) | 18.1938 | 0.34182 | -17.852 | *-98.12* | | ||
| 438 | | \(\max\vert e_{v}\vert\) (мм/с) | 50 | 17.0152 | -32.985 | -65.97 | | ||
| 439 | #+tblfm: $4=$3-$2;%+.3f | ||
| 440 | #+tblfm: $5=($4/$2)*100;%+.2f | ||
| 441 | #+latex: \end{adjustwidth} | ||
| 442 | |||
| 443 | * Заключение | ||
| 444 | 1. Выявлена проблема снижения качества обработки при торможении и | ||
| 445 | разгоне инструмента | ||
| 446 | 2. Предложен метод уточнения траектории локальной вставкой | ||
| 447 | компенсационный движений в окрестностях критических точек: подхода, | ||
| 448 | излома, отхода | ||
| 449 | 3. Разработан алгоритм построения компенсационных движений на основе | ||
| 450 | опорных точек | ||
| 451 | 4. Реализован программный прототип, выполняющий постпроцессорную | ||
| 452 | обработку G-кода для вставки компенсационных движений | ||
| 453 | 5. Продемонстрировано улучшение точности следования на рабочем | ||
| 454 | контуре, снизив рывок на ~93%, а ошибку скорости на ~98% | ||
| 455 | |||
| 456 | * Спасибо за внимание! :B_fullframe: | ||
| 457 | :PROPERTIES: | ||
| 458 | :BEAMER_ENV: fullframe | ||
| 459 | :BEAMER_OPT: noframenumbering, plain | ||
| 460 | :END: | ||
| 461 | \centering\Huge Спасибо за внимание!\vfill | ||
| 462 | |||
| 463 | #+attr_latex: :width .65\textwidth :center nil | ||
| 464 | [[./res/end.png]] | ||
| 465 | |||
| 466 | \small Продолжение следует... | ||
| 467 | |||
| 468 | * Схемы программного обеспечения | ||
| 469 | #+begin_export latex | ||
| 470 | \begin{adjustwidth}{-1cm}{-1cm} | ||
| 471 | \makebox[\paperwidth][c]{\centering\includesvg[inkscapelatex=false,width=.99\paperwidth]{./res/scheme-skywrite}} | ||
| 472 | \makebox[\paperwidth][c]{\centering\includesvg[inkscapelatex=false,width=.99\paperwidth]{./res/scheme-simulate}} | ||
| 473 | \end{adjustwidth} | ||
| 474 | #+end_export | ||
| 475 | |||
| 476 | * Планирование движения с ограниченным рывком | ||
| 477 | #+begin_figure | ||
| 478 | \centering | ||
| 479 | \begin{tikzpicture}[ | ||
| 480 | x=1.15cm,y=1cm, | ||
| 481 | >={Latex[length=2mm]}, | ||
| 482 | axis/.style={black!55, line width=0.6pt}, | ||
| 483 | sep/.style={black!35, dashed, line width=0.5pt}, | ||
| 484 | poscurve/.style={blue, line width=1.1pt}, | ||
| 485 | velcurve/.style={purple!50!black, line width=1.1pt}, | ||
| 486 | acccurve/.style={green!50!black, line width=1.0pt}, | ||
| 487 | jerkcurve/.style={red, line width=0.9pt}, | ||
| 488 | lab/.style={font=\small}, | ||
| 489 | samples=80 | ||
| 490 | ] | ||
| 491 | |||
| 492 | % ========================================================= | ||
| 493 | % Phase durations | ||
| 494 | % ========================================================= | ||
| 495 | \pgfmathsetmacro{\TOne}{1} | ||
| 496 | \pgfmathsetmacro{\TTwo}{1} | ||
| 497 | \pgfmathsetmacro{\TThree}{1} | ||
| 498 | \pgfmathsetmacro{\TFour}{2} | ||
| 499 | \pgfmathsetmacro{\TFive}{1} | ||
| 500 | \pgfmathsetmacro{\TSix}{1} | ||
| 501 | \pgfmathsetmacro{\TSeven}{1} | ||
| 502 | |||
| 503 | % Time marks | ||
| 504 | \pgfmathsetmacro{\tZero}{0} | ||
| 505 | \pgfmathsetmacro{\tOne}{\TOne} | ||
| 506 | \pgfmathsetmacro{\tTwo}{\TOne+\TTwo} | ||
| 507 | \pgfmathsetmacro{\tThree}{\TOne+\TTwo+\TThree} | ||
| 508 | \pgfmathsetmacro{\tFour}{\TOne+\TTwo+\TThree+\TFour} | ||
| 509 | \pgfmathsetmacro{\tFive}{\TOne+\TTwo+\TThree+\TFour+\TFive} | ||
| 510 | \pgfmathsetmacro{\tSix}{\TOne+\TTwo+\TThree+\TFour+\TFive+\TSix} | ||
| 511 | \pgfmathsetmacro{\tSeven}{\TOne+\TTwo+\TThree+\TFour+\TFive+\TSix+\TSeven} | ||
| 512 | |||
| 513 | % ========================================================= | ||
| 514 | % Kinematic parameters (normalized) | ||
| 515 | % ========================================================= | ||
| 516 | \pgfmathsetmacro{\Jmax}{1} | ||
| 517 | \pgfmathsetmacro{\Amax}{\Jmax*\TOne} | ||
| 518 | \pgfmathsetmacro{\Dmax}{\Jmax*\TFive} | ||
| 519 | |||
| 520 | % Initial velocity and position | ||
| 521 | \pgfmathsetmacro{\Vstart}{0} | ||
| 522 | \pgfmathsetmacro{\Pstart}{0} | ||
| 523 | |||
| 524 | % Velocity at phase boundaries | ||
| 525 | \pgfmathsetmacro{\Vone}{\Vstart + 0.5*\Jmax*\TOne*\TOne} | ||
| 526 | \pgfmathsetmacro{\Vtwo}{\Vone + \Amax*\TTwo} | ||
| 527 | \pgfmathsetmacro{\Vthree}{\Vtwo + \Amax*\TThree - 0.5*\Jmax*\TThree*\TThree} | ||
| 528 | \pgfmathsetmacro{\Vfour}{\Vthree} | ||
| 529 | \pgfmathsetmacro{\Vfive}{\Vfour - 0.5*\Jmax*\TFive*\TFive} | ||
| 530 | \pgfmathsetmacro{\Vsix}{\Vfive - \Dmax*\TSix} | ||
| 531 | \pgfmathsetmacro{\Vseven}{\Vsix - \Dmax*\TSeven + 0.5*\Jmax*\TSeven*\TSeven} | ||
| 532 | |||
| 533 | % Position at phase boundaries | ||
| 534 | \pgfmathsetmacro{\POne}{\Pstart + \Vstart*\TOne + \Jmax*pow(\TOne,3)/6} | ||
| 535 | \pgfmathsetmacro{\PTwo}{\POne + \Vone*\TTwo + 0.5*\Amax*pow(\TTwo,2)} | ||
| 536 | \pgfmathsetmacro{\PThree}{\PTwo + \Vtwo*\TThree + 0.5*\Amax*pow(\TThree,2) - \Jmax*pow(\TThree,3)/6} | ||
| 537 | \pgfmathsetmacro{\PFour}{\PThree + \Vfour*\TFour} | ||
| 538 | \pgfmathsetmacro{\PFive}{\PFour + \Vfour*\TFive - \Jmax*pow(\TFive,3)/6} | ||
| 539 | \pgfmathsetmacro{\PSix}{\PFive + \Vfive*\TSix - 0.5*\Dmax*pow(\TSix,2)} | ||
| 540 | \pgfmathsetmacro{\PSeven}{\PSix + \Vsix*\TSeven - 0.5*\Dmax*pow(\TSeven,2) + \Jmax*pow(\TSeven,3)/6} | ||
| 541 | |||
| 542 | % ========================================================= | ||
| 543 | % Vertical scales and offset for compact overlaid picture | ||
| 544 | % ========================================================= | ||
| 545 | \pgfmathsetmacro{\yAxis}{0} | ||
| 546 | \pgfmathsetmacro{\kPos}{0.45} | ||
| 547 | \pgfmathsetmacro{\kVel}{1.20} | ||
| 548 | \pgfmathsetmacro{\kAcc}{1.25} | ||
| 549 | \pgfmathsetmacro{\kJerk}{1.55} | ||
| 550 | \pgfmathsetmacro{\yPosOffset}{-2.25} | ||
| 551 | |||
| 552 | % bounds | ||
| 553 | \pgfmathsetmacro{\xMin}{-0.45} | ||
| 554 | \pgfmathsetmacro{\xMax}{8.45} | ||
| 555 | \pgfmathsetmacro{\yMin}{-3.15} | ||
| 556 | \pgfmathsetmacro{\yMax}{2.75} | ||
| 557 | |||
| 558 | % ========================================================= | ||
| 559 | % Axis and separators | ||
| 560 | % ========================================================= | ||
| 561 | \draw[axis,->] (\xMin,0) -- (\xMax,0); | ||
| 562 | |||
| 563 | \foreach \tt in {\tZero,\tOne,\tTwo,\tThree,\tFour,\tFive,\tSix,\tSeven}{ | ||
| 564 | \draw[sep] (\tt,\yMin+0.35) -- (\tt,\yMax); | ||
| 565 | } | ||
| 566 | |||
| 567 | % ========================================================= | ||
| 568 | % JERK (piecewise constant) | ||
| 569 | % ========================================================= | ||
| 570 | \draw[jerkcurve] | ||
| 571 | (\tZero,0) -- (\tZero,\kJerk*\Jmax) -- (\tOne,\kJerk*\Jmax) -- (\tOne,0) | ||
| 572 | (\tTwo,0) -- (\tTwo,-\kJerk*\Jmax) -- (\tThree,-\kJerk*\Jmax) -- (\tThree,0) | ||
| 573 | (\tFour,0) -- (\tFour,-\kJerk*\Jmax) -- (\tFive,-\kJerk*\Jmax) -- (\tFive,0) | ||
| 574 | (\tSix,0) -- (\tSix,\kJerk*\Jmax) -- (\tSeven,\kJerk*\Jmax) -- (\tSeven,0); | ||
| 575 | |||
| 576 | % ========================================================= | ||
| 577 | % ACCELERATION (exact integral of jerk) | ||
| 578 | % ========================================================= | ||
| 579 | % 0..t1 | ||
| 580 | \draw[acccurve,domain=0:\TOne,variable=\t] | ||
| 581 | plot ({\t},{\kAcc*(\Jmax*\t)}); | ||
| 582 | |||
| 583 | % t1..t2 | ||
| 584 | \draw[acccurve] (\tOne,\kAcc*\Amax) -- (\tTwo,\kAcc*\Amax); | ||
| 585 | |||
| 586 | % t2..t3 | ||
| 587 | \draw[acccurve,domain=\tTwo:\tThree,variable=\t] | ||
| 588 | plot ({\t},{\kAcc*(\Amax - \Jmax*(\t-\tTwo))}); | ||
| 589 | |||
| 590 | % t3..t4 | ||
| 591 | \draw[acccurve] (\tThree,0) -- (\tFour,0); | ||
| 592 | |||
| 593 | % t4..t5 | ||
| 594 | \draw[acccurve,domain=\tFour:\tFive,variable=\t] | ||
| 595 | plot ({\t},{\kAcc*(-\Jmax*(\t-\tFour))}); | ||
| 596 | |||
| 597 | % t5..t6 | ||
| 598 | \draw[acccurve] (\tFive,-\kAcc*\Dmax) -- (\tSix,-\kAcc*\Dmax); | ||
| 599 | |||
| 600 | % t6..t7 | ||
| 601 | \draw[acccurve,domain=\tSix:\tSeven,variable=\t] | ||
| 602 | plot ({\t},{\kAcc*(-\Dmax + \Jmax*(\t-\tSix))}); | ||
| 603 | |||
| 604 | % ========================================================= | ||
| 605 | % VELOCITY (exact integral of acceleration) | ||
| 606 | % ========================================================= | ||
| 607 | % 0..t1 | ||
| 608 | \draw[velcurve,domain=0:\TOne,variable=\t] | ||
| 609 | plot ({\t},{\kVel*(\Vstart + 0.5*\Jmax*pow(\t,2))}); | ||
| 610 | |||
| 611 | % t1..t2 | ||
| 612 | \draw[velcurve,domain=\tOne:\tTwo,variable=\t] | ||
| 613 | plot ({\t},{\kVel*(\Vone + \Amax*(\t-\tOne))}); | ||
| 614 | |||
| 615 | % t2..t3 | ||
| 616 | \draw[velcurve,domain=\tTwo:\tThree,variable=\t] | ||
| 617 | plot ({\t},{\kVel*(\Vtwo + \Amax*(\t-\tTwo) - 0.5*\Jmax*pow(\t-\tTwo,2))}); | ||
| 618 | |||
| 619 | % t3..t4 | ||
| 620 | \draw[velcurve,domain=\tThree:\tFour,variable=\t] | ||
| 621 | plot ({\t},{\kVel*(\Vthree)}); | ||
| 622 | |||
| 623 | % t4..t5 | ||
| 624 | \draw[velcurve,domain=\tFour:\tFive,variable=\t] | ||
| 625 | plot ({\t},{\kVel*(\Vfour - 0.5*\Jmax*pow(\t-\tFour,2))}); | ||
| 626 | |||
| 627 | % t5..t6 | ||
| 628 | \draw[velcurve,domain=\tFive:\tSix,variable=\t] | ||
| 629 | plot ({\t},{\kVel*(\Vfive - \Dmax*(\t-\tFive))}); | ||
| 630 | |||
| 631 | % t6..t7 | ||
| 632 | \draw[velcurve,domain=\tSix:\tSeven,variable=\t] | ||
| 633 | plot ({\t},{\kVel*(\Vsix - \Dmax*(\t-\tSix) + 0.5*\Jmax*pow(\t-\tSix,2))}); | ||
| 634 | |||
| 635 | % ========================================================= | ||
| 636 | % POSITION (exact integral of velocity) | ||
| 637 | % ========================================================= | ||
| 638 | % 0..t1 | ||
| 639 | \draw[poscurve,domain=0:\TOne,variable=\t] | ||
| 640 | plot ({\t},{\yPosOffset + \kPos*(\Pstart + \Vstart*\t + \Jmax*pow(\t,3)/6)}); | ||
| 641 | |||
| 642 | % t1..t2 | ||
| 643 | \draw[poscurve,domain=\tOne:\tTwo,variable=\t] | ||
| 644 | plot ({\t},{\yPosOffset + \kPos*(\POne + \Vone*(\t-\tOne) + 0.5*\Amax*pow(\t-\tOne,2))}); | ||
| 645 | |||
| 646 | % t2..t3 | ||
| 647 | \draw[poscurve,domain=\tTwo:\tThree,variable=\t] | ||
| 648 | plot ({\t},{\yPosOffset + \kPos*(\PTwo + \Vtwo*(\t-\tTwo) + 0.5*\Amax*pow(\t-\tTwo,2) - \Jmax*pow(\t-\tTwo,3)/6)}); | ||
| 649 | |||
| 650 | % t3..t4 | ||
| 651 | \draw[poscurve,domain=\tThree:\tFour,variable=\t] | ||
| 652 | plot ({\t},{\yPosOffset + \kPos*(\PThree + \Vthree*(\t-\tThree))}); | ||
| 653 | |||
| 654 | % t4..t5 | ||
| 655 | \draw[poscurve,domain=\tFour:\tFive,variable=\t] | ||
| 656 | plot ({\t},{\yPosOffset + \kPos*(\PFour + \Vfour*(\t-\tFour) - \Jmax*pow(\t-\tFour,3)/6)}); | ||
| 657 | |||
| 658 | % t5..t6 | ||
| 659 | \draw[poscurve,domain=\tFive:\tSix,variable=\t] | ||
| 660 | plot ({\t},{\yPosOffset + \kPos*(\PFive + \Vfive*(\t-\tFive) - 0.5*\Dmax*pow(\t-\tFive,2))}); | ||
| 661 | |||
| 662 | % t6..t7 | ||
| 663 | \draw[poscurve,domain=\tSix:\tSeven,variable=\t] | ||
| 664 | plot ({\t},{\yPosOffset + \kPos*(\PSix + \Vsix*(\t-\tSix) - 0.5*\Dmax*pow(\t-\tSix,2) + \Jmax*pow(\t-\tSix,3)/6)}); | ||
| 665 | |||
| 666 | % ========================================================= | ||
| 667 | % Labels on curves | ||
| 668 | % ========================================================= | ||
| 669 | \node[red,lab] at (0.55,1.30) {$j_{\max}$}; | ||
| 670 | \node[red,lab] at (2.55,-1.85) {$j_{\min}$}; | ||
| 671 | |||
| 672 | \node[green!50!black,lab] at (1.55,1.05) {$a_{\max}$}; | ||
| 673 | \node[green!50!black,lab] at (6.50,-1.55) {$a_{\min}$}; | ||
| 674 | |||
| 675 | \node[purple!85!black,lab] at (3.85,2.15) {$v_{\max}$}; | ||
| 676 | |||
| 677 | \node[blue,lab,anchor=west] at (0.05,-2.55) {$p_{0}$}; | ||
| 678 | \node[blue,lab,anchor=west] at (7.45,2.00) {$p_{1}$}; | ||
| 679 | |||
| 680 | % ========================================================= | ||
| 681 | % Bottom intervals T1...T7 | ||
| 682 | % ========================================================= | ||
| 683 | \foreach \L/\R/\Name in { | ||
| 684 | \tZero/\tOne/$T_1$, | ||
| 685 | \tOne/\tTwo/$T_2$, | ||
| 686 | \tTwo/\tThree/$T_3$, | ||
| 687 | \tThree/\tFour/$T_4$, | ||
| 688 | \tFour/\tFive/$T_5$, | ||
| 689 | \tFive/\tSix/$T_6$, | ||
| 690 | \tSix/\tSeven/$T_7$ | ||
| 691 | }{ | ||
| 692 | \draw[black,<->] (\L,\yMin+0.10) -- (\R,\yMin+0.10); | ||
| 693 | \node[below,lab] at ({0.5*(\L+\R)},\yMin+0.10) {\Name}; | ||
| 694 | } | ||
| 695 | |||
| 696 | % ========================================================= | ||
| 697 | % Small legend box | ||
| 698 | % ========================================================= | ||
| 699 | \draw[poscurve] (4,-2.28) -- (4.35,-2.28); | ||
| 700 | \node[lab,anchor=west] at (4.43,-2.28) {Положение}; | ||
| 701 | |||
| 702 | \draw[velcurve] (6.35,-2.28) -- (6.70,-2.28); | ||
| 703 | \node[lab,anchor=west] at (6.78,-2.28) {Скорость}; | ||
| 704 | |||
| 705 | \draw[acccurve] (4,-2.62) -- (4.35,-2.62); | ||
| 706 | \node[lab,anchor=west] at (4.43,-2.62) {Ускорение}; | ||
| 707 | |||
| 708 | \draw[jerkcurve] (6.35,-2.62) -- (6.70,-2.62); | ||
| 709 | \node[lab,anchor=west] at (6.78,-2.62) {Рывок}; | ||
| 710 | |||
| 711 | \end{tikzpicture} | ||
| 712 | #+end_figure | ||
| 713 | |||
| 714 | * Квинтическая кривая Безье между двумя смежными линейными сегментами | ||
| 715 | #+begin_figure | ||
| 716 | \centering | ||
| 717 | \begin{tikzpicture}[ | ||
| 718 | scale=1.15, | ||
| 719 | >={Stealth[length=2.2mm]}, | ||
| 720 | seg/.style={blue!85!black, line width=0.9pt}, | ||
| 721 | bez/.style={green!60!black, line width=1.1pt}, | ||
| 722 | guide/.style={gray!55, line width=0.5pt}, | ||
| 723 | dim/.style={black, line width=0.6pt, <->}, | ||
| 724 | aux/.style={gray!55, line width=0.5pt}, | ||
| 725 | lab/.style={font=\small}, | ||
| 726 | ctlmark/.style={red!75!black, line width=0.7pt}, | ||
| 727 | endpt/.style={circle, draw=blue!70!black, fill=white, inner sep=1.1pt}, | ||
| 728 | vtx/.style={circle, draw=blue!70!black, fill=white, inner sep=1.0pt} | ||
| 729 | ] | ||
| 730 | |||
| 731 | % ========================================================= | ||
| 732 | % Parameters | ||
| 733 | % ========================================================= | ||
| 734 | \pgfmathsetmacro{\Theta}{80} % interior angle | ||
| 735 | \pgfmathsetmacro{\HalfTheta}{\Theta/2} | ||
| 736 | |||
| 737 | \pgfmathsetmacro{\cstep}{0.72} % c | ||
| 738 | \pgfmathsetmacro{\dstep}{0.92} % d, larger than c | ||
| 739 | \pgfmathsetmacro{\LT}{\dstep + 2*\cstep} % L_T = d + 2c | ||
| 740 | \pgfmathsetmacro{\Lseg}{3.9} % visible length of original segments | ||
| 741 | |||
| 742 | % Unit directions of left/right branches | ||
| 743 | \pgfmathsetmacro{\uxL}{-sin(\HalfTheta)} | ||
| 744 | \pgfmathsetmacro{\uyL}{-cos(\HalfTheta)} | ||
| 745 | \pgfmathsetmacro{\uxR}{ sin(\HalfTheta)} | ||
| 746 | \pgfmathsetmacro{\uyR}{-cos(\HalfTheta)} | ||
| 747 | |||
| 748 | % Outward normal to the left branch | ||
| 749 | \pgfmathsetmacro{\nxL}{-cos(\HalfTheta)} | ||
| 750 | \pgfmathsetmacro{\nyL}{ sin(\HalfTheta)} | ||
| 751 | |||
| 752 | % Offsets for dimension lines | ||
| 753 | \pgfmathsetmacro{\rhoDim}{0.24} % same offset for d,c,c | ||
| 754 | \pgfmathsetmacro{\rhoLT}{0.82} % farther offset for L_T | ||
| 755 | \pgfmathsetmacro{\tick}{0.10} % half-length of tick marks | ||
| 756 | |||
| 757 | % ========================================================= | ||
| 758 | % Vertex | ||
| 759 | % ========================================================= | ||
| 760 | \coordinate (V) at (0,0); | ||
| 761 | |||
| 762 | % ========================================================= | ||
| 763 | % Endpoints of original adjacent line segments | ||
| 764 | % ========================================================= | ||
| 765 | \pgfmathsetmacro{\xStart}{\Lseg*\uxL} | ||
| 766 | \pgfmathsetmacro{\yStart}{\Lseg*\uyL} | ||
| 767 | \pgfmathsetmacro{\xEnd}{\Lseg*\uxR} | ||
| 768 | \pgfmathsetmacro{\yEnd}{\Lseg*\uyR} | ||
| 769 | |||
| 770 | \coordinate (Pstart) at (\xStart,\yStart); | ||
| 771 | \coordinate (Pend) at (\xEnd,\yEnd); | ||
| 772 | |||
| 773 | % ========================================================= | ||
| 774 | % Control points: | ||
| 775 | % |VP2| = d, |P2P1| = c, |P1P0| = c | ||
| 776 | % symmetric on the right side | ||
| 777 | % ========================================================= | ||
| 778 | \pgfmathsetmacro{\sTwo}{\dstep} | ||
| 779 | \pgfmathsetmacro{\sOne}{\dstep + \cstep} | ||
| 780 | \pgfmathsetmacro{\sZero}{\dstep + 2*\cstep} | ||
| 781 | |||
| 782 | \pgfmathsetmacro{\xPtwo}{\sTwo*\uxL} | ||
| 783 | \pgfmathsetmacro{\yPtwo}{\sTwo*\uyL} | ||
| 784 | |||
| 785 | \pgfmathsetmacro{\xPone}{\sOne*\uxL} | ||
| 786 | \pgfmathsetmacro{\yPone}{\sOne*\uyL} | ||
| 787 | |||
| 788 | \pgfmathsetmacro{\xPzero}{\sZero*\uxL} | ||
| 789 | \pgfmathsetmacro{\yPzero}{\sZero*\uyL} | ||
| 790 | |||
| 791 | \pgfmathsetmacro{\xPthree}{\sTwo*\uxR} | ||
| 792 | \pgfmathsetmacro{\yPthree}{\sTwo*\uyR} | ||
| 793 | |||
| 794 | \pgfmathsetmacro{\xPfour}{\sOne*\uxR} | ||
| 795 | \pgfmathsetmacro{\yPfour}{\sOne*\uyR} | ||
| 796 | |||
| 797 | \pgfmathsetmacro{\xPfive}{\sZero*\uxR} | ||
| 798 | \pgfmathsetmacro{\yPfive}{\sZero*\uyR} | ||
| 799 | |||
| 800 | \coordinate (P0) at (\xPzero,\yPzero); | ||
| 801 | \coordinate (P1) at (\xPone,\yPone); | ||
| 802 | \coordinate (P2) at (\xPtwo,\yPtwo); | ||
| 803 | \coordinate (P3) at (\xPthree,\yPthree); | ||
| 804 | \coordinate (P4) at (\xPfour,\yPfour); | ||
| 805 | \coordinate (P5) at (\xPfive,\yPfive); | ||
| 806 | |||
| 807 | % ========================================================= | ||
| 808 | % Original adjacent line segments | ||
| 809 | % ========================================================= | ||
| 810 | \draw[seg] (Pstart) -- (V) -- (Pend); | ||
| 811 | |||
| 812 | \node[endpt] at (Pstart) {}; | ||
| 813 | \node[endpt] at (Pend) {}; | ||
| 814 | \node[vtx] at (V) {}; | ||
| 815 | |||
| 816 | \node[lab,below=2pt] at (Pstart) {$P_{\mathrm{start}}$}; | ||
| 817 | \node[lab,below=2pt] at (Pend) {$P_{\mathrm{end}}$}; | ||
| 818 | \node[lab,above right=2pt] at (V) {$P_{\mathrm{trans}}$}; | ||
| 819 | |||
| 820 | % ========================================================= | ||
| 821 | % Quintic Bézier curve (exact Bernstein polynomial) | ||
| 822 | % ========================================================= | ||
| 823 | \draw[bez,domain=0:1,samples=160,variable=\t] | ||
| 824 | plot ( | ||
| 825 | { | ||
| 826 | pow(1-\t,5)*\xPzero | ||
| 827 | +5*pow(1-\t,4)*\t*\xPone | ||
| 828 | +10*pow(1-\t,3)*pow(\t,2)*\xPtwo | ||
| 829 | +10*pow(1-\t,2)*pow(\t,3)*\xPthree | ||
| 830 | +5*(1-\t)*pow(\t,4)*\xPfour | ||
| 831 | +pow(\t,5)*\xPfive | ||
| 832 | }, | ||
| 833 | { | ||
| 834 | pow(1-\t,5)*\yPzero | ||
| 835 | +5*pow(1-\t,4)*\t*\yPone | ||
| 836 | +10*pow(1-\t,3)*pow(\t,2)*\yPtwo | ||
| 837 | +10*pow(1-\t,2)*pow(\t,3)*\yPthree | ||
| 838 | +5*(1-\t)*pow(\t,4)*\yPfour | ||
| 839 | +pow(\t,5)*\yPfive | ||
| 840 | } | ||
| 841 | ); | ||
| 842 | |||
| 843 | % ========================================================= | ||
| 844 | % Labels of control points | ||
| 845 | % ========================================================= | ||
| 846 | \node[lab,right] at (P0) {$P_0$}; | ||
| 847 | \node[lab,right] at (P1) {$P_1$}; | ||
| 848 | \node[lab,right] at (P2) {$P_2$}; | ||
| 849 | \node[lab,right] at (P3) {$P_3$}; | ||
| 850 | \node[lab,right] at (P4) {$P_4$}; | ||
| 851 | \node[lab,right] at (P5) {$P_5$}; | ||
| 852 | |||
| 853 | % ========================================================= | ||
| 854 | % Angle theta | ||
| 855 | % ========================================================= | ||
| 856 | \pgfmathsetmacro{\rTheta}{0.38} | ||
| 857 | |||
| 858 | \draw | ||
| 859 | (V) ++({270-\HalfTheta}:\rTheta) | ||
| 860 | arc[start angle={270-\HalfTheta}, end angle={270+\HalfTheta}, radius=\rTheta]; | ||
| 861 | |||
| 862 | \node at ($(V)+(280:0.62)$) {$\theta$}; | ||
| 863 | |||
| 864 | % ========================================================= | ||
| 865 | % Dimension L_T on the left branch (farther away) | ||
| 866 | % with extension lines reaching the original line | ||
| 867 | % ========================================================= | ||
| 868 | \coordinate (LTa) at ({\xPzero + \rhoLT*\nxL},{\yPzero + \rhoLT*\nyL}); | ||
| 869 | \coordinate (LTb) at ({0 + \rhoLT*\nxL},{0 + \rhoLT*\nyL}); | ||
| 870 | |||
| 871 | \draw[guide] (P0) -- (LTa); | ||
| 872 | \draw[guide] (V) -- (LTb); | ||
| 873 | \draw[dim] (LTa) -- node[midway,sloped,above] {$L_T$} (LTb); | ||
| 874 | |||
| 875 | % small ticks on L_T dimension line | ||
| 876 | \draw[guide] | ||
| 877 | ($(LTa)+(-\tick*\nxL,-\tick*\nyL)$) -- | ||
| 878 | ($(LTa)+(\tick*\nxL,\tick*\nyL)$); | ||
| 879 | \draw[guide] | ||
| 880 | ($(LTb)+(-\tick*\nxL,-\tick*\nyL)$) -- | ||
| 881 | ($(LTb)+(\tick*\nxL,\tick*\nyL)$); | ||
| 882 | |||
| 883 | % ========================================================= | ||
| 884 | % Three distances d, c, c at the same offset from the line | ||
| 885 | % with extension lines reaching the original line | ||
| 886 | % ========================================================= | ||
| 887 | \coordinate (dA1) at ({0 + \rhoDim*\nxL},{0 + \rhoDim*\nyL}); | ||
| 888 | \coordinate (dA2) at ({\xPtwo + \rhoDim*\nxL},{\yPtwo + \rhoDim*\nyL}); | ||
| 889 | |||
| 890 | \coordinate (dB1) at ({\xPtwo + \rhoDim*\nxL},{\yPtwo + \rhoDim*\nyL}); | ||
| 891 | \coordinate (dB2) at ({\xPone + \rhoDim*\nxL},{\yPone + \rhoDim*\nyL}); | ||
| 892 | |||
| 893 | \coordinate (dC1) at ({\xPone + \rhoDim*\nxL},{\yPone + \rhoDim*\nyL}); | ||
| 894 | \coordinate (dC2) at ({\xPzero + \rhoDim*\nxL},{\yPzero + \rhoDim*\nyL}); | ||
| 895 | |||
| 896 | % extension lines | ||
| 897 | \draw[guide] (V) -- (dA1); | ||
| 898 | \draw[guide] (P2) -- (dA2); | ||
| 899 | |||
| 900 | \draw[guide] (P2) -- (dB1); | ||
| 901 | \draw[guide] (P1) -- (dB2); | ||
| 902 | |||
| 903 | \draw[guide] (P1) -- (dC1); | ||
| 904 | \draw[guide] (P0) -- (dC2); | ||
| 905 | |||
| 906 | % dimension lines | ||
| 907 | \draw[dim] (dA1) -- node[midway,sloped,above] {$d$} (dA2); | ||
| 908 | \draw[dim] (dB1) -- node[midway,sloped,above] {$c$} (dB2); | ||
| 909 | \draw[dim] (dC1) -- node[midway,sloped,above] {$c$} (dC2); | ||
| 910 | |||
| 911 | % small ticks on dimension-line endpoints | ||
| 912 | \coordinate (Tick0) at (dA1); | ||
| 913 | \coordinate (Tick2a) at (dA2); | ||
| 914 | \coordinate (Tick2b) at (dB1); | ||
| 915 | \coordinate (Tick1a) at (dB2); | ||
| 916 | \coordinate (Tick1b) at (dC1); | ||
| 917 | \coordinate (Tick0b) at (dC2); | ||
| 918 | |||
| 919 | \draw[guide] ($(Tick0)+(-\tick*\nxL,-\tick*\nyL)$) -- ($(Tick0)+(\tick*\nxL,\tick*\nyL)$); | ||
| 920 | \draw[guide] ($(Tick2a)+(-\tick*\nxL,-\tick*\nyL)$) -- ($(Tick2a)+(\tick*\nxL,\tick*\nyL)$); | ||
| 921 | \draw[guide] ($(Tick2b)+(-\tick*\nxL,-\tick*\nyL)$) -- ($(Tick2b)+(\tick*\nxL,\tick*\nyL)$); | ||
| 922 | \draw[guide] ($(Tick1a)+(-\tick*\nxL,-\tick*\nyL)$) -- ($(Tick1a)+(\tick*\nxL,\tick*\nyL)$); | ||
| 923 | \draw[guide] ($(Tick1b)+(-\tick*\nxL,-\tick*\nyL)$) -- ($(Tick1b)+(\tick*\nxL,\tick*\nyL)$); | ||
| 924 | \draw[guide] ($(Tick0b)+(-\tick*\nxL,-\tick*\nyL)$) -- ($(Tick0b)+(\tick*\nxL,\tick*\nyL)$); | ||
| 925 | |||
| 926 | % ========================================================= | ||
| 927 | % Control-point markers | ||
| 928 | % ========================================================= | ||
| 929 | \foreach \P in {P0,P1,P2,P3,P4,P5}{ | ||
| 930 | \draw[ctlmark] ($(\P)+(-0.05,-0.05)$) -- ($(\P)+(0.05,0.05)$); | ||
| 931 | \draw[ctlmark] ($(\P)+(-0.05,0.05)$) -- ($(\P)+(0.05,-0.05)$); | ||
| 932 | } | ||
| 933 | |||
| 934 | % ========================================================= | ||
| 935 | % delta = vertical distance from P_trans to the apex of the rounded curve | ||
| 936 | % for the symmetric quintic Bézier, apex is at t = 0.5 | ||
| 937 | % ========================================================= | ||
| 938 | \pgfmathsetmacro{\tApex}{0.5} | ||
| 939 | \pgfmathsetmacro{\xApex}{ | ||
| 940 | pow(1-\tApex,5)*\xPzero | ||
| 941 | +5*pow(1-\tApex,4)*\tApex*\xPone | ||
| 942 | +10*pow(1-\tApex,3)*pow(\tApex,2)*\xPtwo | ||
| 943 | +10*pow(1-\tApex,2)*pow(\tApex,3)*\xPthree | ||
| 944 | +5*(1-\tApex)*pow(\tApex,4)*\xPfour | ||
| 945 | +pow(\tApex,5)*\xPfive | ||
| 946 | } | ||
| 947 | \pgfmathsetmacro{\yApex}{ | ||
| 948 | pow(1-\tApex,5)*\yPzero | ||
| 949 | +5*pow(1-\tApex,4)*\tApex*\yPone | ||
| 950 | +10*pow(1-\tApex,3)*pow(\tApex,2)*\yPtwo | ||
| 951 | +10*pow(1-\tApex,2)*pow(\tApex,3)*\yPthree | ||
| 952 | +5*(1-\tApex)*pow(\tApex,4)*\yPfour | ||
| 953 | +pow(\tApex,5)*\yPfive | ||
| 954 | } | ||
| 955 | \coordinate (Apex) at (\xApex,\yApex); | ||
| 956 | |||
| 957 | \pgfmathsetmacro{\xDelta}{1.55} | ||
| 958 | |||
| 959 | \draw[guide] (V) -- (\xDelta,0); | ||
| 960 | \draw[guide] (Apex) -- (\xDelta,\yApex); | ||
| 961 | \draw[dim] (\xDelta,0) -- node[right=2pt] {$\delta$} (\xDelta,\yApex); | ||
| 962 | |||
| 963 | \end{tikzpicture} | ||
| 964 | #+end_figure | ||
| 965 | |||
| 966 | # Local Variables: | ||
| 967 | # org-export-async-init-file: "ox-init.el" | ||
| 968 | # org-export-in-background: t | ||
| 969 | # End: | ||
