Compare commits
13
Commits
432702d1a4
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f684da767e | ||
|
|
aedf928fd0 | ||
|
|
785feb7f26 | ||
|
|
7d39832b2a | ||
|
|
148338e9c2 | ||
|
|
9bbd8cd325 | ||
|
|
a0cd55427a | ||
|
|
41fc48b8c0 | ||
|
|
adec6e712f | ||
|
|
2490e8bbb1 | ||
|
|
0699938cd5 | ||
|
|
0097be4114 | ||
|
|
ac11e1e4a4 |
No files matched your search
@@ -57,5 +57,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.list-zettels .subcategory { list-style: none; margin-top: .8em; }
|
||||
.list-zettels .list-subtitle { font-weight: bold; }
|
||||
|
||||
.site-navbar .menu-item-link.active { color: #c05b4d; font-weight: bold; }
|
||||
.header .site-navbar { float: none; text-align: center; }
|
||||
.header .site-navbar .menu { padding-right: 0; }
|
||||
File renamed without changes.
+19
-17
@@ -1,7 +1,7 @@
|
||||
baseURL = "/"
|
||||
locale = "en"
|
||||
defaultContentLanguage = "en"
|
||||
title = "My digital brain"
|
||||
title = "Thomas Dehaeze"
|
||||
preserveTaxonomyNames = true
|
||||
enableRobotsTXT = true
|
||||
enableEmoji = true
|
||||
@@ -26,11 +26,11 @@ changefreq = "weekly"
|
||||
priority = 0.5
|
||||
filename = "sitemap.xml"
|
||||
|
||||
# [[menu.main]]
|
||||
# name = "Home"
|
||||
# weight = 10
|
||||
# identifier = "home"
|
||||
# url = "/"
|
||||
[[menu.main]]
|
||||
name = "Home"
|
||||
weight = 10
|
||||
identifier = "home"
|
||||
url = "/"
|
||||
|
||||
[[menu.main]]
|
||||
name = "Publications"
|
||||
@@ -39,16 +39,16 @@ identifier = "research"
|
||||
url = "/research/"
|
||||
|
||||
[[menu.main]]
|
||||
name = "Zettels"
|
||||
weight = 30
|
||||
identifier = "zettels"
|
||||
url = "/zettels/"
|
||||
name = "Projects"
|
||||
weight = 25
|
||||
identifier = "projects"
|
||||
url = "/projects/"
|
||||
|
||||
[[menu.main]]
|
||||
name = "Bibliography"
|
||||
weight = 50
|
||||
identifier = "bibliography"
|
||||
url = "/bibliography/"
|
||||
name = "Notes"
|
||||
weight = 30
|
||||
identifier = "notes"
|
||||
url = "/notes/"
|
||||
|
||||
[[menu.main]]
|
||||
name = "Search"
|
||||
@@ -56,6 +56,9 @@ weight = 70
|
||||
identifier = "search"
|
||||
url = "/search/"
|
||||
|
||||
[permalinks]
|
||||
zettels = "/notes/:slug/"
|
||||
|
||||
[outputs]
|
||||
home = ["HTML", "RSS", "JSON"]
|
||||
|
||||
@@ -66,9 +69,8 @@ debug = false
|
||||
since = "2020"
|
||||
gitRepo = ""
|
||||
|
||||
logoTitle = "Digital Brain"
|
||||
keywords = ["org-roam","research"]
|
||||
description = "My personnal digital brain"
|
||||
keywords = ["mechatronics","research"]
|
||||
description = "My personnal website about mechatronics"
|
||||
|
||||
archivePaginate = 5
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
+++
|
||||
title = "Thomas Dehaeze"
|
||||
draft = false
|
||||
+++
|
||||
|
||||
I am a control and mechatronics researcher at the [European Synchrotron (ESRF)](https://www.esrf.fr) in Grenoble.
|
||||
I recently completed a PhD at the [Precision Mechatronics Laboratory](https://www.pml.uliege.be/) (University of Liège) on nano active stabilization of samples for tomography experiments.
|
||||
|
||||
My current work is on the mechatronic design of nano-positioning systems for synchrotron beamlines.
|
||||
This spans the whole chain, from dynamical modelling, to control (active damping, sensor fusion, real-time implementation), and online metrology.
|
||||
|
||||
You can reach me at [thomas@tdehaeze.xyz](mailto:thomas@tdehaeze.xyz).
|
||||
@@ -1,7 +1,7 @@
|
||||
+++
|
||||
title = "Exploring the pareto fronts of actuation technologies for high performance mechatronic systems"
|
||||
author = ["Dehaeze Thomas"]
|
||||
draft = true
|
||||
draft = false
|
||||
+++
|
||||
|
||||
Tags
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
+++
|
||||
title = "Fly-scan-oriented motion analyses and upgraded beamline integration architecture for the high-dynamic double-crystal monochromator at sirius/lnls"
|
||||
author = ["Dehaeze Thomas"]
|
||||
draft = true
|
||||
draft = false
|
||||
+++
|
||||
|
||||
Tags
|
||||
|
||||
@@ -39,14 +39,14 @@ In the frequency range that is relevant for control, the dynamical behavior is m
|
||||
In particular, the mechanics can typically be described as:
|
||||
|
||||
\begin{equation}
|
||||
G\_m = \sum\_{i=1}^{n\_{RB}} \frac{c\_i b\_i^T}{s^2} + \sum\_{n\_{RB} + 1}^{n\_s} \frac{c\_i b\_i^T}{s^2 + 2\xi \omega\_i s + \omega\_i^2}
|
||||
G\_m = \sum\_{i=1}^{n\_{RB}} \frac{c\_i b\_i^T}{s^2} + \sum\_{n\_{RB} + 1}^{n\_s} \frac{c\_i b\_i^T}{s^2 + 2\zeta \omega\_i s + \omega\_i^2}
|
||||
\end{equation}
|
||||
|
||||
where the first term refers to rigid body modes and the second term to flexible modes.
|
||||
|
||||
- \\(n\_{RB}\\) is the number of rigid body modes
|
||||
- \\(c\_i \in \mathbb{R}^{n\_y}\\) and \\(b\_i \in \mathbb{R}^{n\_u}\\) are associated with the mode shapes
|
||||
- \\(\xi\_i, \omega\_i \in \mathbb{R}\_+\\)
|
||||
- \\(\zeta\_i, \omega\_i \in \mathbb{R}\_+\\)
|
||||
|
||||
In traditional positioning systems, the number of actuators \\(n\_u\\) and sensors \\(n\_y\\) equals the number of rigid body modes \\(n\_{RB}\\) and are positioned such that the matrix \\(\sum\_{i=1}^{n\_{RB}} c\_i b\_i^T\\) is invertible.
|
||||
In this case, matrices \\(T\_u\\) and \\(T\_y\\) can be selected such that:
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
+++
|
||||
title = "Bibliography"
|
||||
build = { render = "never", list = "never" }
|
||||
+++
|
||||
@@ -75,9 +75,9 @@ which includes the resonance model
|
||||
and the resonance \\(P\_{ri}(s)\\) can be represented as one of the following forms
|
||||
|
||||
\begin{align\*}
|
||||
P\_{ri}(s) &= \frac{\omega\_i^2}{s^2 + 2 \xi\_i \omega\_i s + \omega\_i^2} \\\\
|
||||
P\_{ri}(s) &= \frac{b\_{1i} \omega\_i s + b\_{0i} \omega\_i^2}{s^2 + 2 \xi\_i \omega\_i s + \omega\_i^2} \\\\
|
||||
P\_{ri}(s) &= \frac{b\_{2i} s^2 + b\_{1i} \omega\_i s + b\_{0i} \omega\_i^2}{s^2 + 2 \xi\_i \omega\_i s + \omega\_i^2}
|
||||
P\_{ri}(s) &= \frac{\omega\_i^2}{s^2 + 2 \zeta\_i \omega\_i s + \omega\_i^2} \\\\
|
||||
P\_{ri}(s) &= \frac{b\_{1i} \omega\_i s + b\_{0i} \omega\_i^2}{s^2 + 2 \zeta\_i \omega\_i s + \omega\_i^2} \\\\
|
||||
P\_{ri}(s) &= \frac{b\_{2i} s^2 + b\_{1i} \omega\_i s + b\_{0i} \omega\_i^2}{s^2 + 2 \zeta\_i \omega\_i s + \omega\_i^2}
|
||||
\end{align\*}
|
||||
|
||||
|
||||
@@ -99,8 +99,8 @@ There characteristics are shown on [Table 1](#table--tab:microactuator).
|
||||
</div>
|
||||
|
||||
| | Elect. | PZT | Thermal |
|
||||
|--------------|-----------------------------------------------|-----------------------------------------------|----------------------------|
|
||||
| TF | \\(\frac{K}{s^2 + 2\xi\omega s + \omega^2}\\) | \\(\frac{K}{s^2 + 2\xi\omega s + \omega^2}\\) | \\(\frac{K}{\tau s + 1}\\) |
|
||||
|--------------|-------------------------------------------------|-------------------------------------------------|----------------------------|
|
||||
| TF | \\(\frac{K}{s^2 + 2\zeta\omega s + \omega^2}\\) | \\(\frac{K}{s^2 + 2\zeta\omega s + \omega^2}\\) | \\(\frac{K}{\tau s + 1}\\) |
|
||||
| \\(\tau\\) | \\(<\SI{0.1}{ms}\\) | \\(<\SI{0.05}{ms}\\) | \\(>\SI{0.1}{ms}\\) |
|
||||
| \\(\omega\\) | \\(1-\SI{2}{kHz}\\) | \\(20-\SI{25}{kHz}\\) | \\(>\SI{15}{kHz}\\) |
|
||||
|
||||
@@ -210,10 +210,10 @@ Equation means that \\(S(s)\\) can be shaped similarly to the inverse of the cho
|
||||
One form of \\(W(s)\\) is taken as
|
||||
|
||||
\begin{equation}
|
||||
W(s) = \frac{\frac{1}{M}s^2 + 2\xi\omega\frac{1}{\sqrt{M}}s + \omega^2}{s^2 + 2\omega\sqrt{\epsilon}s + \omega^2\epsilon}
|
||||
W(s) = \frac{\frac{1}{M}s^2 + 2\zeta\omega\frac{1}{\sqrt{M}}s + \omega^2}{s^2 + 2\omega\sqrt{\epsilon}s + \omega^2\epsilon}
|
||||
\end{equation}
|
||||
|
||||
where \\(\omega\\) is the desired bandwidth, \\(\epsilon\\) is used to determine the desired low frequency level of sensitivity magnitude and \\(\xi\\) is the damping ratio.
|
||||
where \\(\omega\\) is the desired bandwidth, \\(\epsilon\\) is used to determine the desired low frequency level of sensitivity magnitude and \\(\zeta\\) is the damping ratio.
|
||||
|
||||
The controller can then be synthesis using the linear matrix inequality (LMI) approach.
|
||||
|
||||
|
||||
@@ -379,14 +379,14 @@ which leads to
|
||||
|
||||
\begin{align}
|
||||
s\_{1, 2} &= -\frac{c}{2 m} \pm \frac{\sqrt{c^2 - 4 k m}}{2 m} \\\\
|
||||
&= - \bar{\omega}\_0 \xi \pm i \bar{\omega}\_0 \sqrt{1 - \xi^2} \nonumber
|
||||
&= - \bar{\omega}\_0 \zeta \pm i \bar{\omega}\_0 \sqrt{1 - \zeta^2} \nonumber
|
||||
\end{align}
|
||||
|
||||
where
|
||||
\\[ \bar{\omega}\_0^2 = \frac{k}{m};\quad \xi = \frac{c}{c\_0} = \frac{c}{2 \sqrt{km}} \\]
|
||||
\\[ \bar{\omega}\_0^2 = \frac{k}{m};\quad \zeta = \frac{c}{c\_0} = \frac{c}{2 \sqrt{km}} \\]
|
||||
|
||||
This implies a modal solution of the form
|
||||
\\[ x(t) = X e^{-\bar{\omega}\_0 \xi t} e^{i (\bar{\omega}\_0 \sqrt{1 - \xi^2})t} = X e^{-a t} e^{i \omega\_0^\prime t} \\]
|
||||
\\[ x(t) = X e^{-\bar{\omega}\_0 \zeta t} e^{i (\bar{\omega}\_0 \sqrt{1 - \zeta^2})t} = X e^{-a t} e^{i \omega\_0^\prime t} \\]
|
||||
which is a single mode of vibration with a complex natural frequency having two part:
|
||||
|
||||
- **An imaginary or oscillatory part**
|
||||
@@ -899,7 +899,7 @@ A usual definition of proportional damping is that the damping matrix \\([C]\\)
|
||||
In this case, the damped system will have eigenvalues and eigenvectors as follows
|
||||
|
||||
\begin{align\*}
|
||||
&\omega\_r^\prime = \bar{\omega}\_r \sqrt{1 - \xi\_r^2} ; \quad \xi\_r = \frac{\beta \bar{\omega}\_r}{2} + \frac{\gamma}{2 \bar{\omega}\_r}\\\\
|
||||
&\omega\_r^\prime = \bar{\omega}\_r \sqrt{1 - \zeta\_r^2} ; \quad \zeta\_r = \frac{\beta \bar{\omega}\_r}{2} + \frac{\gamma}{2 \bar{\omega}\_r}\\\\
|
||||
&[\Psi\_\text{damped}] = [\Psi\_\text{undamped}]
|
||||
\end{align\*}
|
||||
|
||||
@@ -1074,8 +1074,8 @@ The eigensolution can thus be described as
|
||||
\\[ s\_r, s\_r^\*, \quad \\{\psi\\}\_r, \\{\psi\\}\_r^\*;\quad r = 1, N \\]
|
||||
|
||||
Each eigenvalue \\(s\_r\\) is expressed in the form
|
||||
\\[ s\_r = \omega\_r \left( -\xi\_r + i\sqrt{1 - \xi\_r^2} \right) \\]
|
||||
where \\(\omega\_r\\) is the **natural frequency** and \\(\xi\_r\\) is the **critical damping ratio** for that mode.
|
||||
\\[ s\_r = \omega\_r \left( -\zeta\_r + i\sqrt{1 - \zeta\_r^2} \right) \\]
|
||||
where \\(\omega\_r\\) is the **natural frequency** and \\(\zeta\_r\\) is the **critical damping ratio** for that mode.
|
||||
|
||||
**Orthogonality equations** can also be derived:
|
||||
|
||||
@@ -1085,12 +1085,12 @@ where \\(\omega\_r\\) is the **natural frequency** and \\(\xi\_r\\) is the **cri
|
||||
\end{align}
|
||||
|
||||
When the modes \\(r\\) and \\(q\\) are a complex conjugate pair:
|
||||
\\[ s\_r = \omega\_r \left( -\xi\_r - i\sqrt{1 - \xi\_r^2} \right); \quad \\{\psi\\}\_q = \\{\psi\\}\_r^\* \\]
|
||||
\\[ s\_r = \omega\_r \left( -\zeta\_r - i\sqrt{1 - \zeta\_r^2} \right); \quad \\{\psi\\}\_q = \\{\psi\\}\_r^\* \\]
|
||||
|
||||
From equations \eqref{eq:viscous\_damping\_orthogonality}, we can obtain
|
||||
|
||||
\begin{align}
|
||||
2 \omega\_r \xi\_r &= \frac{\\{\psi\\}\_r^H [C] \\{\psi\\}\_r}{\\{\psi\\}\_r^H [M] \\{\psi\\}\_r} = \frac{c\_r}{m\_r} \\\\
|
||||
2 \omega\_r \zeta\_r &= \frac{\\{\psi\\}\_r^H [C] \\{\psi\\}\_r}{\\{\psi\\}\_r^H [M] \\{\psi\\}\_r} = \frac{c\_r}{m\_r} \\\\
|
||||
\omega\_r^2 &= \frac{\\{\psi\\}\_r^H [K] \\{\psi\\}\_r}{\\{\psi\\}\_r^H [M] \\{\psi\\}\_r} = \frac{k\_r}{m\_r}
|
||||
\end{align}
|
||||
|
||||
@@ -1104,11 +1104,11 @@ but this expression is not particularly convenient for numerical applications.
|
||||
We then seek a similar series expansion that was found for the undamped, proportionally-damped and hysteretically damped systems.
|
||||
|
||||
The obtain result is
|
||||
\\[ \alpha\_{jk}(\omega) = \sum\_{r=1}^N \frac{({}\_rR\_{jk}) + i (\omega/\omega\_r)({}\_rS\_{jk})}{\omega\_r^2 - \omega^2 + 2 i \omega \omega\_r \xi\_r} \\]
|
||||
\\[ \alpha\_{jk}(\omega) = \sum\_{r=1}^N \frac{({}\_rR\_{jk}) + i (\omega/\omega\_r)({}\_rS\_{jk})}{\omega\_r^2 - \omega^2 + 2 i \omega \omega\_r \zeta\_r} \\]
|
||||
where the coefficients \\(R\\) and \\(S\\) are obtained from:
|
||||
|
||||
\begin{align\*}
|
||||
\\{{}\_rR\_k\\} &= 2 \left( \xi\_r \text{Re}\\{{}\_rG\_k\\} - \text{Im}\\{{}\_rG\_k\\} \sqrt{1 - \xi\_r^2} \right)\\\\
|
||||
\\{{}\_rR\_k\\} &= 2 \left( \zeta\_r \text{Re}\\{{}\_rG\_k\\} - \text{Im}\\{{}\_rG\_k\\} \sqrt{1 - \zeta\_r^2} \right)\\\\
|
||||
\\{{}\_rS\_k\\} &= 2 \text{Re}\\{{}\_rG\_k\\}\\\\
|
||||
\\{{}\_rG\_k\\} &= (\theta\_{kr}/a\_r) \\{\theta\\}\_r
|
||||
\end{align\*}
|
||||
@@ -1222,12 +1222,12 @@ Here \\(C\_r\\) may be complex whereas \\(D\_r\\) is real.
|
||||
</div>
|
||||
|
||||
| **Case** | **C** | **D** | **Free** \\(\omega\_r^\prime\\) | **Forced** \\(\omega\_r\\) |
|
||||
|-------------|---------------------------------|---------------------------------|----------------------------------|----------------------------|
|
||||
|-------------|---------------------------------|---------------------------------|------------------------------------|----------------------------|
|
||||
| Undamped | \\(\mathbb{R}\\) | 0 | \\(\bar{\omega}\_r\\) | \\(\bar{\omega}\_r\\) |
|
||||
| Prop. Hyst. | \\(\mathbb{R}\\) | \\(\mathbb{R}\\) | \\(\bar{\omega}\_r\\) | \\(\bar{\omega}\_r\\) |
|
||||
| Prop. Visc. | \\(\mathbb{R}\\) | \\(\mathbb{R}\\) (\\(\omega\\)) | \\(\omega\_r\sqrt{1-\xi\_r^2}\\) | \\(\bar{\omega}\_r\\) |
|
||||
| Prop. Visc. | \\(\mathbb{R}\\) | \\(\mathbb{R}\\) (\\(\omega\\)) | \\(\omega\_r\sqrt{1-\zeta\_r^2}\\) | \\(\bar{\omega}\_r\\) |
|
||||
| Gen. Hyst. | \\(\mathbb{C}\\) | \\(\mathbb{R}\\) | \\(\omega\_r\\) | \\(\omega\_r\\) |
|
||||
| Gen. Visc. | \\(\mathbb{C}\\) (\\(\omega\\)) | \\(\mathbb{R}\\) (\\(\omega\\)) | \\(\omega\_r\sqrt{1-\xi\_r^2}\\) | \\(\omega\_r\\) |
|
||||
| Gen. Visc. | \\(\mathbb{C}\\) (\\(\omega\\)) | \\(\mathbb{R}\\) (\\(\omega\\)) | \\(\omega\_r\sqrt{1-\zeta\_r^2}\\) | \\(\omega\_r\\) |
|
||||
|
||||
|
||||
#### Mobility and Impedance FRF Parameters {#mobility-and-impedance-frf-parameters}
|
||||
@@ -3265,7 +3265,7 @@ The peak-picking method is applied as follows (illustrated on [Figure 46](#figur
|
||||
\begin{equation}
|
||||
\begin{aligned}
|
||||
\eta\_r &= \frac{\omega\_a^2 - \omega\_b^2}{2 \omega\_r^2} \approx \frac{\Delta\omega}{\omega\_r} \\\\
|
||||
2\xi\_r &= \eta\_r
|
||||
2\zeta\_r &= \eta\_r
|
||||
\end{aligned}
|
||||
\end{equation}
|
||||
4. We now obtain an estimate for the **modal constant** of the mode being analyzed by assuming that the total response in this resonant region is attributed to a single term in the general FRF series:
|
||||
@@ -3390,14 +3390,14 @@ For SDOF system with **viscous** damping, rather than structural damping, the **
|
||||
And we have
|
||||
|
||||
\begin{equation}
|
||||
\tan\left(\frac{\theta}{2}\right) = \frac{1 - (\omega/\omega\_r)^2}{2 \xi \omega/\omega\_r}
|
||||
\tan\left(\frac{\theta}{2}\right) = \frac{1 - (\omega/\omega\_r)^2}{2 \zeta \omega/\omega\_r}
|
||||
\end{equation}
|
||||
|
||||
From points at \\(\omega\_a\\) and \\(\omega\_b\\), we obtain
|
||||
|
||||
\begin{equation}
|
||||
\begin{aligned}
|
||||
\xi &= \frac{\omega\_a^2 - \omega\_b^2}{2 \omega\_r \left( \omega\_a \tan(\theta\_a/2) + \omega\_b \tan(\theta\_b/2) \right)}\\\\
|
||||
\zeta &= \frac{\omega\_a^2 - \omega\_b^2}{2 \omega\_r \left( \omega\_a \tan(\theta\_a/2) + \omega\_b \tan(\theta\_b/2) \right)}\\\\
|
||||
&= \frac{\omega\_a - \omega\_b}{\omega\_r \left( \tan(\theta\_a/2) + \tan(\theta\_b/2) \right)} \text{ for light damping}
|
||||
\end{aligned}
|
||||
\end{equation}
|
||||
@@ -3405,7 +3405,7 @@ From points at \\(\omega\_a\\) and \\(\omega\_b\\), we obtain
|
||||
Finally, selecting two points for which \\(\theta\_a = \theta\_b = \SI{90}{\degree}\\):
|
||||
|
||||
\begin{equation}
|
||||
\xi = \frac{\omega\_2 - \omega\_1}{2 \omega\_r}
|
||||
\zeta = \frac{\omega\_2 - \omega\_1}{2 \omega\_r}
|
||||
\end{equation}
|
||||
|
||||
|
||||
@@ -3736,7 +3736,7 @@ This method is a special version of the general curve fitting approach but is ba
|
||||
Rational fraction FRF formulation:
|
||||
|
||||
\begin{equation}
|
||||
H(\omega) = \sum\_{r=1}^N \frac{A\_r}{\omega\_r^2 - \omega^2 + 2 i \omega \omega\_r \xi\_r} \label{eq:frf\_clasic}
|
||||
H(\omega) = \sum\_{r=1}^N \frac{A\_r}{\omega\_r^2 - \omega^2 + 2 i \omega \omega\_r \zeta\_r} \label{eq:frf\_clasic}
|
||||
\end{equation}
|
||||
|
||||
\begin{equation}
|
||||
@@ -3823,7 +3823,7 @@ where \\([X], [Y], [Z], \\{G\\}\\) and \\(\\{F\\}\\) are known measured quantiti
|
||||
Once the solution has been obtained for the coefficients \\(a\_k, \dots , b\_k, \dots\\) then the second stage of the modal analysis can be performed in which the required **modal parameters are derived**.
|
||||
This is usually done by solving the two polynomial expressions which form the numerator and denominator of equations \eqref{eq:frf\_clasic} and \eqref{eq:frf\_rational:}
|
||||
|
||||
- the denominator is used to obtain the natural frequencies \\(\omega\_r\\) and damping factors \\(\xi\_r\\)
|
||||
- the denominator is used to obtain the natural frequencies \\(\omega\_r\\) and damping factors \\(\zeta\_r\\)
|
||||
- the numerator is used to determine the complex modal constants \\(A\_r\\)
|
||||
|
||||
In order to determine the order, the analysis is repeated using different assumed values for the order \\(m\\) and are compared.
|
||||
|
||||
@@ -39,13 +39,13 @@ Typical value of \\(R\_s\\) is between \\(10\\) and \\(100 \Omega\\).
|
||||
When considering the effects of both output impedance and cable inductance, the transfer function from source voltage \\(V\_s\\) to load voltage \\(V\_L\\) is second-order low pass filter:
|
||||
|
||||
\begin{equation}
|
||||
\frac{V\_L(s)}{V\_s(s)} = \frac{1}{\frac{s^2}{\omega\_r^2} + 2 \xi \frac{s}{\omega\_r} + 1}
|
||||
\frac{V\_L(s)}{V\_s(s)} = \frac{1}{\frac{s^2}{\omega\_r^2} + 2 \zeta \frac{s}{\omega\_r} + 1}
|
||||
\end{equation}
|
||||
|
||||
with:
|
||||
|
||||
- \\(\omega\_r = \frac{1}{\sqrt{L C\_p}}\\)
|
||||
- \\(\xi = \frac{R\_s \sqrt{L C\_p}}{2 L}\\)
|
||||
- \\(\zeta = \frac{R\_s \sqrt{L C\_p}}{2 L}\\)
|
||||
|
||||
|
||||
## Amplifier small-signal Bandwidth {#amplifier-small-signal-bandwidth}
|
||||
|
||||
@@ -622,19 +622,19 @@ And the damping matrix expressed in the principal coordinates is:
|
||||
We note:
|
||||
|
||||
\begin{equation}
|
||||
c\_{pi} = a + b \omega\_i^2 = 2 \xi\_i \omega\_i
|
||||
c\_{pi} = a + b \omega\_i^2 = 2 \zeta\_i \omega\_i
|
||||
\end{equation}
|
||||
|
||||
where \\(\xi\_i\\) is the percentage of critical damping for the i'th mode:
|
||||
where \\(\zeta\_i\\) is the percentage of critical damping for the i'th mode:
|
||||
|
||||
\begin{equation}
|
||||
\xi\_i = \frac{c\_i}{2 \sqrt{k\_{pi} m\_{pi}}} = \frac{c\_i}{2 m\_{pi} \sqrt{\omega\_i^2}} = \frac{a + b \omega\_i^2}{2 \omega\_i}
|
||||
\zeta\_i = \frac{c\_i}{2 \sqrt{k\_{pi} m\_{pi}}} = \frac{c\_i}{2 m\_{pi} \sqrt{\omega\_i^2}} = \frac{a + b \omega\_i^2}{2 \omega\_i}
|
||||
\end{equation}
|
||||
|
||||
And the equation in principal coordinates becomes:
|
||||
|
||||
\begin{equation}
|
||||
\ddot{z}\_{pi} + 2 \xi\_i \omega\_i \dot{z}\_{pi} + \omega\_i^2 z\_{pi} = F\_{pi}
|
||||
\ddot{z}\_{pi} + 2 \zeta\_i \omega\_i \dot{z}\_{pi} + \omega\_i^2 z\_{pi} = F\_{pi}
|
||||
\end{equation}
|
||||
|
||||
This type of damping is known as **proportional damping**, where the damping for each mode is proportional to the critical damping for that mode.
|
||||
@@ -642,10 +642,10 @@ This type of damping is known as **proportional damping**, where the damping for
|
||||
|
||||
#### Simple Proportional Damping {#simple-proportional-damping}
|
||||
|
||||
Viscous damping in each mode is taken to be an arbitrary percentage \\(\xi\\) of the critical damping \\(c\_{cr}\\):
|
||||
Viscous damping in each mode is taken to be an arbitrary percentage \\(\zeta\\) of the critical damping \\(c\_{cr}\\):
|
||||
|
||||
\begin{equation}
|
||||
c = \frac{\xi}{2 \sqrt{k m}} = \xi \cdot c\_{cr}
|
||||
c = \frac{\zeta}{2 \sqrt{k m}} = \zeta \cdot c\_{cr}
|
||||
\end{equation}
|
||||
|
||||
|
||||
@@ -654,19 +654,19 @@ Viscous damping in each mode is taken to be an arbitrary percentage \\(\xi\\) of
|
||||
Recognizing that the higher modes of vibration damp out quickly, "relative" damping yields damping in proportion to frequencies in normal modes:
|
||||
|
||||
\begin{equation}
|
||||
\xi\_i = \frac{a + b\omega\_i^2}{2 \omega\_i}
|
||||
\zeta\_i = \frac{a + b\omega\_i^2}{2 \omega\_i}
|
||||
\end{equation}
|
||||
|
||||
If a value of \\(\xi\_1\\) for the first mode, is assumed:
|
||||
If a value of \\(\zeta\_1\\) for the first mode, is assumed:
|
||||
|
||||
\begin{equation}
|
||||
b = \frac{2 \xi\_1}{\omega\_1}
|
||||
b = \frac{2 \zeta\_1}{\omega\_1}
|
||||
\end{equation}
|
||||
|
||||
The value of the damping for any other mode is:
|
||||
|
||||
\begin{equation}
|
||||
\xi\_i = \xi\_1 \frac{\omega\_i}{\omega\_1}
|
||||
\zeta\_i = \zeta\_1 \frac{\omega\_i}{\omega\_1}
|
||||
\end{equation}
|
||||
|
||||
|
||||
@@ -861,7 +861,7 @@ It can be shown that for a general system with \\(m\\) undamped modes:
|
||||
If modes have some damping:
|
||||
|
||||
\begin{equation}
|
||||
\frac{z\_j}{F\_k} = \sum\_{i = 1}^m \frac{z\_{nji} z\_{nki}}{s^2 + 2 \xi\_i \omega\_i s + \omega\_i^2} \label{eq:general\_add\_tf\_damp}
|
||||
\frac{z\_j}{F\_k} = \sum\_{i = 1}^m \frac{z\_{nji} z\_{nki}}{s^2 + 2 \zeta\_i \omega\_i s + \omega\_i^2} \label{eq:general\_add\_tf\_damp}
|
||||
\end{equation}
|
||||
|
||||
Equations \eqref{eq:general\_add\_tf} and \eqref{eq:general\_add\_tf\_damp} shows that in general every transfer function is made up of **additive combinations of single degree of freedom systems**, with each system having its DC gain determined by the appropriate eigenvector entry product divided by the square of the eigenvalue, \\(z\_{nji} z\_{nki}/\omega\_i^2\\), and with resonant frequency defined by the eigenvalue \\(\omega\_i\\).
|
||||
@@ -923,13 +923,13 @@ The DC gain contributions of the eliminated modes are not included in the overal
|
||||
In order to eliminate this error, the Matlab function `modred` is introduced.
|
||||
Using `modred` is analogous to using Guyan reduction to reduce some less important degrees of freedom.
|
||||
|
||||
We will discuss in this section two methods of sorting, one which is applicable for models with the same value of damping for all modes \\(\xi\_i = \xi\\) ("uniform" damping), and another which is applicable for models with different damping values for each mode ("non-uniform" damping).
|
||||
We will discuss in this section two methods of sorting, one which is applicable for models with the same value of damping for all modes \\(\zeta\_i = \zeta\\) ("uniform" damping), and another which is applicable for models with different damping values for each mode ("non-uniform" damping).
|
||||
|
||||
The general equation for the overall transfer function of undamped and damped systems are:
|
||||
|
||||
\begin{align}
|
||||
\frac{z\_j}{F\_k} &= \sum\_{i = 1}^m \frac{z\_{nji} z\_{nki}}{s^2 + \omega\_i^2} \\\\
|
||||
\frac{z\_j}{F\_k} &= \sum\_{i = 1}^m \frac{z\_{nji} z\_{nki}}{s^2 + 2 \xi\_i \omega\_i s + \omega\_i^2}
|
||||
\frac{z\_j}{F\_k} &= \sum\_{i = 1}^m \frac{z\_{nji} z\_{nki}}{s^2 + 2 \zeta\_i \omega\_i s + \omega\_i^2}
|
||||
\end{align}
|
||||
|
||||
The **DC gain** of the i'th mode can be obtained by substituting \\(s = j\omega = 0\\):
|
||||
@@ -943,12 +943,12 @@ where \\(z\_{nji} z\_{nki}\\) is the product of the j'th (output) row and k'th (
|
||||
At resonance, the **peak gain** amplitude of each mode is given by substituting \\(s = j \omega\_i\\):
|
||||
|
||||
\begin{equation}
|
||||
\text{Peak gain}\_i = \frac{z\_{ji}}{F\_{ki}} = \frac{-j}{2 \xi\_i} \frac{z\_{nji} z\_{nki}}{\omega\_i^2}
|
||||
\text{Peak gain}\_i = \frac{z\_{ji}}{F\_{ki}} = \frac{-j}{2 \zeta\_i} \frac{z\_{nji} z\_{nki}}{\omega\_i^2}
|
||||
\end{equation}
|
||||
|
||||
And we see that the peak gain for a mode is the DC gain of the same mode divided by \\(2 \xi\_i\\).
|
||||
And we see that the peak gain for a mode is the DC gain of the same mode divided by \\(2 \zeta\_i\\).
|
||||
|
||||
If the same value of \\(\xi\\) is used for all modes, then all the DC gain terms are divided by the same \\(2 \xi\\) terms and the relative amplitude of the DC gains and peak gains are the same, so there is no difference between sorting a uniform damping model using DC gain or peak gain.
|
||||
If the same value of \\(\zeta\\) is used for all modes, then all the DC gain terms are divided by the same \\(2 \zeta\\) terms and the relative amplitude of the DC gains and peak gains are the same, so there is no difference between sorting a uniform damping model using DC gain or peak gain.
|
||||
|
||||
However, if the modes have different damping the relationship between the DC gain and peak gain for all the modes is not a constant value and peak gain must be used to rank modes for importance.
|
||||
|
||||
|
||||
@@ -1099,84 +1099,6 @@ Experiment shows that the magnitude of the force depends directly on the current
|
||||
|
||||
### A2.9. Equivalent Circuit Under Variable-Frequency Conditions {#a2-dot-9-dot-equivalent-circuit-under-variable-frequency-conditions}
|
||||
|
||||
|
||||
## Further Reading {#further-reading}
|
||||
|
||||
|
||||
## Index {#index}
|
||||
|
||||
|
||||
### A {#a}
|
||||
|
||||
|
||||
### B {#b}
|
||||
|
||||
|
||||
### C {#c}
|
||||
|
||||
|
||||
### D {#d}
|
||||
|
||||
|
||||
### E {#e}
|
||||
|
||||
|
||||
### F {#f}
|
||||
|
||||
|
||||
### G {#g}
|
||||
|
||||
|
||||
### H {#h}
|
||||
|
||||
|
||||
### I {#i}
|
||||
|
||||
|
||||
### J {#j}
|
||||
|
||||
|
||||
### K {#k}
|
||||
|
||||
|
||||
### L {#l}
|
||||
|
||||
|
||||
### M {#m}
|
||||
|
||||
|
||||
### N {#n}
|
||||
|
||||
|
||||
### O {#o}
|
||||
|
||||
|
||||
### P {#p}
|
||||
|
||||
|
||||
### Q {#q}
|
||||
|
||||
|
||||
### R {#r}
|
||||
|
||||
|
||||
### S {#s}
|
||||
|
||||
|
||||
### T {#t}
|
||||
|
||||
|
||||
### U {#u}
|
||||
|
||||
|
||||
### V {#v}
|
||||
|
||||
|
||||
### W {#w}
|
||||
|
||||
|
||||
## Color Plates {#color-plates}
|
||||
|
||||
<style>.csl-entry{text-indent: -1.5em; margin-left: 1.5em;}</style><div class="csl-bib-body">
|
||||
<div class="csl-entry"><a id="citeproc_bib_item_1"></a>Hughes, Austin, and Bill Drury. 2013. <i>Electric Motors and Drives: Fundamentals, Types and Applications</i>. Newnes.</div>
|
||||
</div>
|
||||
@@ -345,21 +345,21 @@ If we left multiply the equation by \\(\Phi^T\\) and we use the orthogonalily re
|
||||
\\[ diag(\mu\_i) \ddot{z} + \Phi^T C \Phi + diag(\mu\_i \omega\_i^2) z = \Phi^T f \\]
|
||||
|
||||
If \\(\Phi^T C \Phi\\) is diagonal, the **damping is said classical or normal**. In this case:
|
||||
\\[ \Phi^T C \Phi = diag(2 \xi\_i \mu\_i \omega\_i) \\]
|
||||
\\[ \Phi^T C \Phi = diag(2 \zeta\_i \mu\_i \omega\_i) \\]
|
||||
|
||||
One can verify that the Rayleigh damping \eqref{eq:rayleigh\_damping} complies with this condition with modal damping ratios \\(\xi\_i = \frac{1}{2} ( \frac{\alpha}{\omega\_i} + \beta\omega\_i )\\).
|
||||
One can verify that the Rayleigh damping \eqref{eq:rayleigh\_damping} complies with this condition with modal damping ratios \\(\zeta\_i = \frac{1}{2} ( \frac{\alpha}{\omega\_i} + \beta\omega\_i )\\).
|
||||
|
||||
And we obtain decoupled modal equations \eqref{eq:modal\_eom}.
|
||||
|
||||
<div class="cbox">
|
||||
|
||||
\begin{equation}\label{eq:modal\_eom}
|
||||
\ddot{z} + 2 \xi \Omega \dot{z} + \Omega^2 z = z^{-1} \Phi^T f
|
||||
\ddot{z} + 2 \zeta \Omega \dot{z} + \Omega^2 z = z^{-1} \Phi^T f
|
||||
\end{equation}
|
||||
|
||||
with:
|
||||
|
||||
- \\(\xi = diag(\xi\_i)\\)
|
||||
- \\(\zeta = diag(\zeta\_i)\\)
|
||||
- \\(\Omega = diag(\omega\_i)\\)
|
||||
- \\(\mu = diag(\mu\_i)\\)
|
||||
|
||||
@@ -374,11 +374,11 @@ Typical values of the modal damping ratio are summarized on [Table 2](#table--ta
|
||||
</div>
|
||||
|
||||
| **Damping Ratio** | **Application** |
|
||||
|--------------------------------|-------------------------|
|
||||
| \\(\xi \simeq 0.001 - 0.005\\) | Space structures |
|
||||
| \\(\xi \simeq 0.01 - 0.02\\) | Mechanical engineering |
|
||||
| \\(\xi \simeq 0.05\\) | Civil engineering |
|
||||
| \\(\xi \simeq 0.2\\) | When ground is involved |
|
||||
|----------------------------------|-------------------------|
|
||||
| \\(\zeta \simeq 0.001 - 0.005\\) | Space structures |
|
||||
| \\(\zeta \simeq 0.01 - 0.02\\) | Mechanical engineering |
|
||||
| \\(\zeta \simeq 0.05\\) | Civil engineering |
|
||||
| \\(\zeta \simeq 0.2\\) | When ground is involved |
|
||||
|
||||
The assumption of classical damping is often justified for light damping, but it is questionable when the damping is large.
|
||||
|
||||
@@ -407,7 +407,7 @@ With:
|
||||
- \\(D\_i(\omega)\\) is the dynamic amplification factor of mode \\(i\\) given by
|
||||
|
||||
\begin{equation}\label{eq:dynamic\_amplification}
|
||||
D\_i(\omega) = \frac{1}{1 - \omega^2/\omega\_i^2 + 2 j \xi\_i \omega/\omega\_i}
|
||||
D\_i(\omega) = \frac{1}{1 - \omega^2/\omega\_i^2 + 2 j \zeta\_i \omega/\omega\_i}
|
||||
\end{equation}
|
||||
|
||||
<a id="figure--fig:neglected-modes"></a>
|
||||
@@ -489,7 +489,7 @@ By looking at [Figure 7](#figure--fig:collocated-control-frf), we see that negle
|
||||
The open-loop transfer function of a lighly damped structure with a collocated actuator/sensor pair can be written:
|
||||
|
||||
\begin{equation}\label{eq:frf\_lighly\_damped\_collocated}
|
||||
G(s) = G\_0 \frac{\Pi\_i(s^2/z\_i^2 + 2 \xi\_i s/z\_i + 1)}{\Pi\_j(s^2/\omega\_j^2 + 2 \xi\_j s /\omega\_j + 1)}
|
||||
G(s) = G\_0 \frac{\Pi\_i(s^2/z\_i^2 + 2 \zeta\_i s/z\_i + 1)}{\Pi\_j(s^2/\omega\_j^2 + 2 \zeta\_j s /\omega\_j + 1)}
|
||||
\end{equation}
|
||||
|
||||
The corresponding Bode plot is represented in [Figure 9](#figure--fig:alternating-p-z). Every imaginary pole at \\(\pm j\omega\_i\\) introduces a \\(\SI{180}{\degree}\\) phase lag and every imaginary zero at \\(\pm jz\_i\\) introduces a phase lead of \\(\SI{180}{\degree}\\).
|
||||
@@ -576,14 +576,14 @@ The transfer function between the total force and the current \\(i\\) applied to
|
||||
<div class="cbox">
|
||||
|
||||
\begin{equation}\label{eq:proof\_mass\_eq}
|
||||
\frac{F}{i} = \frac{-s^2 T}{s^2 + 2\xi\_p \omega\_p s + \omega\_p^2}
|
||||
\frac{F}{i} = \frac{-s^2 T}{s^2 + 2\zeta\_p \omega\_p s + \omega\_p^2}
|
||||
\end{equation}
|
||||
|
||||
with:
|
||||
|
||||
- \\(T\\) is the transducer constant
|
||||
- \\(\omega\_p = \frac{k}{m}\\) is the natural frequency of the spring-mass system
|
||||
- \\(\xi\_p\\) is the damping ratio
|
||||
- \\(\zeta\_p\\) is the damping ratio
|
||||
|
||||
</div>
|
||||
|
||||
@@ -609,7 +609,7 @@ If \\(x\_0\\) is the displacement of the support and if the voice coil is open (
|
||||
By using the two equations, we obtain:
|
||||
|
||||
\begin{equation}\label{eq:geophone}
|
||||
\frac{e}{\dot{x\_0}} = \frac{-s^2 T}{s^2 + 2\xi\_p\omega\_p s + \omega\_p^2}
|
||||
\frac{e}{\dot{x\_0}} = \frac{-s^2 T}{s^2 + 2\zeta\_p\omega\_p s + \omega\_p^2}
|
||||
\end{equation}
|
||||
|
||||
Above the corner frequency, the gain of the geophone is equal to the transducer constant \\(T\\).
|
||||
|
||||
@@ -428,7 +428,7 @@ In this chapter some important lessons have been learned, which are summarised a
|
||||
- Stiffness, whether it is created mechanically or by means of a control system, is determinative for precision
|
||||
- Every mechanical structure can be modelled as a combination of bodies, springs and dampers, either as separate bodies or as finite elements within a body
|
||||
- Phase is prominent factor regarding the possibility to control the motion of a mechanical system
|
||||
- The quality factor \\(Q\\) and damping ratio \\(\xi\\) are inverse proportional. Each have their practical value.
|
||||
- The quality factor \\(Q\\) and damping ratio \\(\zeta\\) are inverse proportional. Each have their practical value.
|
||||
- A damping placed in parallel with a lumped mass-spring system limits the magnitude of the resonance at the natural frequency.
|
||||
However, it also increases the transmissibility at frequencies above the native frequency.
|
||||
- The dynamic behavior of a complex system and its response to a stimulus can be derived and understood by viewing it as a superposition of contributions of its eigenmodes, each with its own mode-shape, eigenfrequency, modal parameters and damping.
|
||||
@@ -454,7 +454,7 @@ The core of the control system is the _plant_, which is the physical system that
|
||||
<a id="table--tab:walk-control-loop"></a>
|
||||
<div class="table-caption">
|
||||
<span class="table-number"><a href="#table--tab:walk-control-loop">Table 3</a>:</span>
|
||||
Symbols used in <a href="#org0e13ef0">3</a>
|
||||
Symbols used in <a href="#org9f480e2">3</a>
|
||||
</div>
|
||||
|
||||
| Symbol | Meaning | Unit |
|
||||
@@ -633,7 +633,7 @@ The measured frequency-response of the scanning unit taken as as an example is s
|
||||
A mathematical model of a seconder-order mass-spring system with a force input is fitted to this measured response:
|
||||
|
||||
\begin{equation}
|
||||
G(s) = \frac{C\_f \omega\_0^2}{s^2 + 2\xi\_f \omega\_0 s + \omega\_0^2}
|
||||
G(s) = \frac{C\_f \omega\_0^2}{s^2 + 2\zeta\_f \omega\_0 s + \omega\_0^2}
|
||||
\end{equation}
|
||||
|
||||
When positioning at high scanning frequency, the resonance at the first mode-shape of this scanning unit causes oscillations, which adversely affect the tracking accuracy.
|
||||
@@ -641,7 +641,7 @@ In order to solve this problem, a feedforward controller is designed that compen
|
||||
This means that the transfer function of the feedforward controller is:
|
||||
|
||||
\begin{equation}
|
||||
C\_{ff}(s) = \frac{s^2 + 2 \xi\_f \omega\_0 s + \omega\_0^2}{\omega\_0^2}
|
||||
C\_{ff}(s) = \frac{s^2 + 2 \zeta\_f \omega\_0 s + \omega\_0^2}{\omega\_0^2}
|
||||
\end{equation}
|
||||
|
||||
However, such controller needs to be modified in such a way that it becomes _realizable_.
|
||||
@@ -649,23 +649,23 @@ In this case, it is decided to create a resulting overall transfer function of t
|
||||
In order to realize this controller, first two poles have to be added:
|
||||
|
||||
\begin{equation}
|
||||
C\_{ff}(s) = \frac{s^2 + 2 \xi\_f \omega\_0 s + \omega\_0^2}{s^2 + 2\cdot 1 \cdot \omega\_0 s + \omega\_0^2}
|
||||
C\_{ff}(s) = \frac{s^2 + 2 \zeta\_f \omega\_0 s + \omega\_0^2}{s^2 + 2\cdot 1 \cdot \omega\_0 s + \omega\_0^2}
|
||||
\end{equation}
|
||||
|
||||
There the damping ratio of the resulting dynamics is chosen to be \\(\xi = 1\\).
|
||||
There the damping ratio of the resulting dynamics is chosen to be \\(\zeta = 1\\).
|
||||
|
||||
This feedforward controller is basically a _notch filter_.
|
||||
In order to create an additional attenuation of higher frequency resonances due to flexible-body mode-shapes, another first-order pole is added at the first eigenfrequency:
|
||||
|
||||
\begin{equation}
|
||||
C\_{ff}(s) = \frac{s^2 + 2 \xi\_f \omega\_0 s + \omega\_0^2}{(s + \omega\_0)(s^2 + 2\omega\_0 s + \omega\_0^2)}
|
||||
C\_{ff}(s) = \frac{s^2 + 2 \zeta\_f \omega\_0 s + \omega\_0^2}{(s + \omega\_0)(s^2 + 2\omega\_0 s + \omega\_0^2)}
|
||||
\end{equation}
|
||||
|
||||
Then this controller is connected in series with the scanning unit, the anti-resonance of the controller and the resonance of the piezo-scanner cancel each other out:
|
||||
|
||||
\begin{align}
|
||||
G\_{t,ff}(s) &= G(s)G\_{ff}(s) \\\\
|
||||
&= \frac{C\_f}{s^2 + 2 \xi\_f \omega\_0 s + \omega\_0^2} \frac{s^2 + 2 \xi\_f \omega\_0 s + \omega\_0^2}{(s + \omega\_0){s^2 + 2 \omega\_0 s + \omega\_0^2}} \\\\
|
||||
&= \frac{C\_f}{s^2 + 2 \zeta\_f \omega\_0 s + \omega\_0^2} \frac{s^2 + 2 \zeta\_f \omega\_0 s + \omega\_0^2}{(s + \omega\_0){s^2 + 2 \omega\_0 s + \omega\_0^2}} \\\\
|
||||
&= \frac{C\_f}{(s + \omega\_0){s^2 + 2 \omega\_0 s + \omega\_0^2}}
|
||||
\end{align}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
+++
|
||||
title = "Ultra Precision Bearings"
|
||||
author = ["Dehaeze Thomas"]
|
||||
draft = true
|
||||
draft = false
|
||||
+++
|
||||
|
||||
Tags
|
||||
|
||||
@@ -54,7 +54,7 @@ Here, we focus on the control of linear time invariant electromechanical motion
|
||||
The dynamics of such systems are often dominated by the mechanics, such that:
|
||||
|
||||
\begin{equation}
|
||||
G\_p(s) = \sum\_{i=1}^{N\_{rb}} \frac{c\_i b\_i^T}{s^2} + \sum\_{i=N\_{rb} + 1}^{N} \frac{c\_ib\_i^T}{s^2 + 2 \xi\_i \omega\_i s + \omega\_i^2}
|
||||
G\_p(s) = \sum\_{i=1}^{N\_{rb}} \frac{c\_i b\_i^T}{s^2} + \sum\_{i=N\_{rb} + 1}^{N} \frac{c\_ib\_i^T}{s^2 + 2 \zeta\_i \omega\_i s + \omega\_i^2}
|
||||
\end{equation}
|
||||
|
||||
with \\(N\_{rb}\\) is the number of rigid body modes.
|
||||
|
||||
@@ -195,8 +195,8 @@ If the PSD is given as a function \\(S\_x(j\omega)\\), the disturbance filter ca
|
||||
> Given a positive even function \\(S\_x(f)\\) of finite area, find a minimum-phase stable function \\(L(s)\\), such that \\(|L(j2\pi f)|^2 = S(s)\\)
|
||||
|
||||
**Harmonic signals** can be approximately modeled by filtering white noise with a badly damped second order system, having a \\(+1\\) slope below the resonance frequency and a \\(-1\\) slope above the resonance frequency:
|
||||
\\[ V\_h = \frac{s}{s^2 + 2 \xi \omega\_h + \omega\_h^2} \\]
|
||||
with \\(\xi\\) the relative damping and \\(\omega\_h\\) the resonance frequency [rad/s].
|
||||
\\[ V\_h = \frac{s}{s^2 + 2 \zeta \omega\_h + \omega\_h^2} \\]
|
||||
with \\(\zeta\\) the relative damping and \\(\omega\_h\\) the resonance frequency [rad/s].
|
||||
By making the \\(\mathcal{H}\_2\\) norm of \\(V\_h\\) equal to the RMS-value of the harmonic signal, the propagation of the disturbance to the performance channel can be well approximated.
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
+++
|
||||
title = "Robust mass damper design for bandwidth increase of motion stages"
|
||||
author = ["Dehaeze Thomas"]
|
||||
draft = true
|
||||
draft = false
|
||||
+++
|
||||
|
||||
Tags
|
||||
@@ -192,7 +192,7 @@ The goal is to increase the modal damping of modes 7, 9, 10/11 and 13.
|
||||
The transfer function \\(T\_i(s)\\) is defined as the contribution of the a single mode \\(i\\) in an input/output transfer function:
|
||||
|
||||
\begin{equation}
|
||||
T\_i(s) = \frac{\phi\_i^{\text{act}} \phi\_i^{\text{sen}}}{s^2 + 2 \xi \omega\_i s + \omega\_i^2} = \frac{1}{m\_i s^2 + c\_i s + k\_i}
|
||||
T\_i(s) = \frac{\phi\_i^{\text{act}} \phi\_i^{\text{sen}}}{s^2 + 2 \zeta \omega\_i s + \omega\_i^2} = \frac{1}{m\_i s^2 + c\_i s + k\_i}
|
||||
\end{equation}
|
||||
|
||||
With \\(\phi\_i^{\text{act}}\\) and \\(\phi\_i^{\text{sen}}\\) the modal factors of the actuator and sensor.
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: "Projects"
|
||||
---
|
||||
|
||||
Here are personal and professional projects that are all open-source / open hardware.
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 395 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 124 KiB |
Binary file not shown.
@@ -0,0 +1,109 @@
|
||||
---
|
||||
title: "Inverted Pendulum on a Recycled 3D Printer"
|
||||
summary: "A pendulum balanced upright on a motorised cart, built from the axis of an old 3D printer and controlled by a Teensy 4.1 at 1 kHz."
|
||||
tags: ["Hardware", "Software", "Control"]
|
||||
status: "Completed"
|
||||
date: 2026-03-22
|
||||
repo: "https://github.com/tdehaeze/inverted-pendulum"
|
||||
cover: "cover.jpg"
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
This project is a classic control demonstrator: a rigid pendulum is mounted on a cart and kept upright by moving the cart back and forth.
|
||||
The mechanics come from a recycled 3D printer (Alfawise U20): one of its linear axes, with the stepper motor and belt, carries the pendulum pivot.
|
||||
A quadrature encoder measures the pendulum angle, and a Teensy 4.1 microcontroller runs the feedback loop at 1 kHz.
|
||||
A small PyQt5 application on the computer is used to select the controller, change the gains and setpoints, and record data.
|
||||
|
||||
{{< figure src="cover.jpg" alt="Photo of the inverted pendulum setup with its main parts labelled" caption="The setup: cart on a belt-driven rail, stepper motor, pendulum encoder and the electronics (labels in French)." >}}
|
||||
|
||||
## Hardware
|
||||
|
||||
| Component | Details |
|
||||
|-----------|---------|
|
||||
| Microcontroller | Teensy 4.1 |
|
||||
| Stepper motor | DRV8825 driver, 32 microsteps, 5 µm per step |
|
||||
| Pendulum encoder | Quadrature, 4096 steps per revolution (0.088° per step) |
|
||||
| Cart travel | ±200 mm hard stop, ±160 mm soft limit |
|
||||
| Control rate | 1 kHz, driven by a hardware timer (`IntervalTimer`) |
|
||||
|
||||
The cart input is an acceleration command.
|
||||
It is integrated to a velocity inside the 1 kHz interrupt, and converted into step pulses for the motor driver.
|
||||
The pendulum angular velocity is estimated by finite difference of the encoder reading.
|
||||
A soft limit blocks accelerations towards the end of the rail, and a hard stop at ±200 mm cuts the motor.
|
||||
|
||||
## Software
|
||||
|
||||
The repository has three parts:
|
||||
|
||||
- **`teensy/`**: firmware (PlatformIO / Arduino framework). Runs the control loop, drives the motor, reads the encoder and streams telemetry over USB serial.
|
||||
- **`gui/`**: PyQt5 and pyqtgraph application. Sends text commands to the Teensy (`MODE PD`, `SET KP 12`, `FB ON`, ...), plots the telemetry live and saves it to CSV.
|
||||
- **`model/` and `tools/`**: Python scripts for simulation, controller design, model identification and plotting experiments.
|
||||
|
||||
## Model and identification
|
||||
|
||||
With φ = θ − π the angle from the upright position and u the cart acceleration, the linearised dynamics around the upright position are:
|
||||
|
||||
```
|
||||
D·φ̈ + c·φ̇ − m·g·l·φ = m·l·u
|
||||
```
|
||||
|
||||
where D is the effective inertia of the pendulum about its pivot.
|
||||
The state is [x, ẋ, φ, φ̇] and the input is the cart acceleration.
|
||||
|
||||
The pendulum length and friction coefficient are identified from a free oscillation: the pendulum hangs down, receives a small push, and the decaying oscillation is recorded for 10 to 50 seconds.
|
||||
A Nelder-Mead fit (`tools/fit.py`) then adjusts the model to the measurement.
|
||||
|
||||
| Parameter | Symbol | Value |
|
||||
|-----------|--------|-------|
|
||||
| Pendulum mass | m | 0.1 kg |
|
||||
| Half length (pivot to centre of mass) | l | 0.326 m |
|
||||
| Friction coefficient | c | 3.4 × 10⁻⁴ N·m·s/rad |
|
||||
|
||||
{{< figure src="identification-fit.png" alt="Measured and fitted free oscillation of the pendulum" caption="Free oscillation of the pendulum: measurement and fitted model (figure labels in French)." >}}
|
||||
|
||||
{{< video src="identification.mp4" caption="Free oscillation used for the identification." >}}
|
||||
|
||||
## Controllers
|
||||
|
||||
All gains are in SI units, and the controller output is the cart acceleration.
|
||||
|
||||
- **P**: u = −Kp · φ
|
||||
- **PD**: u = −Kp · φ − Kd · φ̇
|
||||
- **LQR**: u = −K · [x, ẋ, φ, φ̇]
|
||||
|
||||
The LQR gain vector K is computed in Python (`model/inverted_pendulum.py`, using the `control` library) from weights on the four states and on the input, then entered in the GUI.
|
||||
|
||||
### PD control
|
||||
|
||||
A PD controller can hold the pendulum angle at zero, but it does not see the cart position.
|
||||
In the experiment below the angle is regulated while the cart drifts until it reaches the end of the rail and the pendulum falls.
|
||||
The same controller with other gains acts mostly as a damper: it slows down the pendulum without fully stabilising it.
|
||||
|
||||
{{< figure src="pd-simulation.png" alt="Simulated PD response of the pendulum angle" caption="Simulated PD response, from a 5° initial angle (figure labels in French)." >}}
|
||||
|
||||
{{< figure src="pd-experiment.png" alt="Measured angle and cart position with a PD controller" caption="Measured PD experiment: the angle is held near zero while the cart drifts to the end stop (figure labels in French)." >}}
|
||||
|
||||
{{< video src="pd-control.mp4" caption="PD control: the pendulum is stabilised, the cart slowly drifts." >}}
|
||||
|
||||
{{< video src="pd-damping.mp4" caption="PD control used as a damper only: the pendulum dynamics are slowed down." >}}
|
||||
|
||||
### LQR control
|
||||
|
||||
The LQR feeds back the cart position and velocity as well as the pendulum angle and angular velocity.
|
||||
This keeps the cart near its setpoint while the pendulum stays upright.
|
||||
Higher weights on the states give faster corrections, at the cost of more aggressive cart motion.
|
||||
|
||||
{{< video src="lqr.mp4" caption="LQR with a higher gain: angle and cart position are controlled together." >}}
|
||||
|
||||
{{< video src="lqr-setpoint-step.mp4" caption="LQR following a step in the cart position setpoint while keeping the pendulum upright." >}}
|
||||
|
||||
## Typical workflow
|
||||
|
||||
1. Flash the firmware with `pio run -e teensy41 -t upload` from `teensy/`.
|
||||
2. Start the GUI (`python gui/program.py`), enable the motor and zero the cart and encoder.
|
||||
3. Record a free oscillation (`tools/capture.py`) and fit the model parameters (`tools/fit.py`).
|
||||
4. Pick a controller in the GUI, enter the gains, bring the pendulum close to upright and switch the feedback on.
|
||||
5. Save the data to CSV and plot it with `tools/plot_experiment.py`.
|
||||
|
||||
The full instructions and serial command list are in the [README](https://github.com/tdehaeze/inverted-pendulum).
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 62 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 42 KiB |
@@ -0,0 +1,53 @@
|
||||
---
|
||||
title: "rtint-gui: Desktop GUI for Real-Time Control"
|
||||
summary: "A desktop application to acquire signals, identify plant dynamics and design feedback control on a real-time target."
|
||||
tags: ["Software", "Control"]
|
||||
status: "Active"
|
||||
date: 2026-09-01
|
||||
repo: "https://gitlab.esrf.fr/dehaeze/real-time-interface-gui"
|
||||
docs: "https://dehaeze.gitlab-pages.esrf.fr/real-time-interface-gui/"
|
||||
pypi: "https://pypi.org/project/rtint-gui/"
|
||||
---
|
||||
<!-- TODO: confirm public URL -->
|
||||
<!-- TODO: add GUI screenshots (e.g. Signal Analysis, Dynamical Identification, Feedback Control Design) -->
|
||||
|
||||
## Overview
|
||||
|
||||
`rtint-gui` is a desktop application for working with a real-time target that runs a Resyst server.
|
||||
It is built on top of [rtint]({{< relref "real-time-interface" >}}), which handles the communication with the target, and follows the usual steps of a control task:
|
||||
|
||||
1. **Connect** to a running server.
|
||||
2. **Acquire** signals from the target.
|
||||
3. **Analyse** the records as time traces and spectra (PSD / ASD).
|
||||
4. **Identify** the plant dynamics by measuring frequency responses.
|
||||
5. **Design** feedback control from the identified dynamics.
|
||||
|
||||
Each step is a page of the application.
|
||||
|
||||
## Pages
|
||||
|
||||
- **Signal Analysis**: choose counters and model signals, set a duration, watch the acquisition live, then compute power spectra with configurable window, overlap and averaging.
|
||||
- **Dynamical Identification**: excite the plant with a generator and estimate its frequency response (Bode plot, coherence, and an RGA plot for multi-input multi-output systems). Open-loop and closed-loop identification are supported.
|
||||
- **Transfer Function Analysis**: overlay measured responses with the Bode plots of the filters running on the target, and with their products.
|
||||
- **Feedback Control Design**: from an identified plant and the filters used as controller, compute characteristic loci, sensitivity and complementary sensitivity, the modulus margin and a Nyquist stability verdict.
|
||||
- **Filters, motors, EtherCAT, parameters and more**: inspect and edit what the real-time model exposes.
|
||||
|
||||
Results are saved as MATLAB `.mat` files, so they can be reopened in MATLAB or Python.
|
||||
The analysis pages also work offline on previously saved data, without a target.
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
pipx install rtint-gui # or: uv tool install rtint-gui
|
||||
rtint-gui
|
||||
```
|
||||
|
||||
Python 3.12 or 3.13 is required.
|
||||
The interface uses PySide6 and pyqtgraph.
|
||||
Running `rtint-gui --offline` starts it without a real-time target.
|
||||
|
||||
The [documentation](https://dehaeze.gitlab-pages.esrf.fr/real-time-interface-gui/) has a guide for each page and a description of the `.mat` file format.
|
||||
|
||||
## Related
|
||||
|
||||
- [rtint]({{< relref "real-time-interface" >}}): the Python package this application is built on.
|
||||
@@ -0,0 +1,65 @@
|
||||
---
|
||||
title: "rtint: Python Interface to Real-Time Targets"
|
||||
summary: "A Python package to control and monitor Simulink models running on a real-time target machine, such as a Speedgoat."
|
||||
tags: ["Software", "Control"]
|
||||
status: "Active"
|
||||
date: 2026-10-01
|
||||
repo: "https://gitlab.esrf.fr/dehaeze/real-time-interface"
|
||||
pypi: "https://pypi.org/project/rtint/"
|
||||
---
|
||||
<!-- TODO: confirm public URL -->
|
||||
|
||||
## Overview
|
||||
|
||||
`rtint` is a Python package that talks to Simulink models running on a real-time target machine, through a Resyst server.
|
||||
It wraps the server's client API so that the parts of a real-time model (motors, filters, feedback loops, signals and so on) can be used as ordinary Python objects from a script or an interactive session.
|
||||
|
||||
It is used at the ESRF to commission and tune mechatronic systems whose control runs on a real-time target.
|
||||
For a graphical front end built on top of it, see [rtint-gui]({{< relref "real-time-interface-gui" >}}).
|
||||
|
||||
## What it covers
|
||||
|
||||
Each part of the real-time model has its own controller object, available as an attribute of the main `RtintController`:
|
||||
|
||||
- **Motors**: start, stop, move and read the state.
|
||||
- **Regulation**: switch feedback loops on and off.
|
||||
- **Filters**: read and change filter parameters, for example low-pass, PID and notch filters, and compute their frequency responses.
|
||||
- **Signals and parameters**: read and write model signals and tunable parameters.
|
||||
- **Acquisition**: record signals at the model sampling rate.
|
||||
- **Signal generators**: sine, chirp and other excitation signals, useful for system identification.
|
||||
- **Triggers, lookup tables, EtherCAT slaves and 2D scans.**
|
||||
|
||||
Most objects can print a summary table of their state in the terminal.
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from rtint.rtint_hardware import RtintController
|
||||
|
||||
config = {
|
||||
"server": "my-server-hostname",
|
||||
"port": 8080,
|
||||
}
|
||||
|
||||
controller = RtintController("my_target", config)
|
||||
controller._run_model("my_model")
|
||||
|
||||
# Access hardware components
|
||||
controller.motor.start()
|
||||
controller.regul.on()
|
||||
controller.filter.low_pass(wn=100, xi=0.707)
|
||||
```
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
pip install rtint
|
||||
```
|
||||
|
||||
Python 3.9 to 3.13 is supported.
|
||||
The package depends on `resyst-client`, `numpy`, `scipy`, `matplotlib`, `gevent`, `treelib` and `tabulate`.
|
||||
A running Resyst server and a real-time model are needed to do anything useful with it.
|
||||
|
||||
## Related
|
||||
|
||||
- [rtint-gui]({{< relref "real-time-interface-gui" >}}): desktop application built on this package.
|
||||
@@ -2,3 +2,7 @@
|
||||
title = "Publications"
|
||||
draft = false
|
||||
+++
|
||||
|
||||
**Reproducible research:**
|
||||
I try to apply reproducible-research practices to all my work: the data, scripts and source files behind each publication are made available, so that anyone can regenerate the figures and reproduce the findings.
|
||||
Each entry below links to the paper, and, when available, to the associated code and data.
|
||||
@@ -1,8 +1,11 @@
|
||||
+++
|
||||
title = "Zettels"
|
||||
title = "Notes"
|
||||
author = ["Thomas Dehaeze"]
|
||||
type = "zettels"
|
||||
url = "/notes/"
|
||||
draft = false
|
||||
+++
|
||||
|
||||
Here is the list of subjects I took note about.
|
||||
Technical notes on control, mechatronics, instrumentation and related topics.
|
||||
This is a living personal wiki, so some notes are still incomplete.
|
||||
Further down, there is a list of notes on books, theses and articles I have read and found interesting.
|
||||
@@ -16,13 +16,13 @@ Tags
|
||||
\end{equation}
|
||||
|
||||
\begin{equation}
|
||||
\frac{V\_o}{V\_i}(s) = \frac{1}{\frac{s^2}{\omega\_0^2} + 2 \xi \frac{s}{\omega\_0} + 1}
|
||||
\frac{V\_o}{V\_i}(s) = \frac{1}{\frac{s^2}{\omega\_0^2} + 2 \zeta \frac{s}{\omega\_0} + 1}
|
||||
\end{equation}
|
||||
|
||||
With:
|
||||
|
||||
- \\(\omega\_0 = \frac{1}{R\sqrt{C\_1 C\_2}}\\)
|
||||
- \\(\xi = \frac{C\_2}{C\_1}\\)
|
||||
- \\(\zeta = \frac{C\_2}{C\_1}\\)
|
||||
|
||||
The input impedance is \\(V\_i/i\_i\\).
|
||||
|
||||
@@ -42,7 +42,7 @@ Same as [Figure 1](#figure--fig:analog-act-filt-second-order-lpf) but by exchang
|
||||
With:
|
||||
|
||||
- \\(\omega\_0 = \frac{1}{R\sqrt{C\_1 C\_2}}\\)
|
||||
- \\(\xi = \frac{C\_2}{C\_1}\\)
|
||||
- \\(\zeta = \frac{C\_2}{C\_1}\\)
|
||||
|
||||
|
||||
## PID controller {#pid-controller}
|
||||
|
||||
@@ -76,7 +76,7 @@ Z = (1 + R*C*s)/(C*s); % Filter Impedance
|
||||
{{< figure src="/ox-hugo/analog_filt_second_order_lpf.png" caption="<span class='figure-number'>Figure 5: </span>Second Order Low Pass Filter using an RLC circuit" >}}
|
||||
|
||||
\begin{equation}
|
||||
\boxed{\frac{V\_o}{V\_i}(s) = \frac{1}{1 + 2 \xi \frac{s}{\omega\_0} + \frac{s^2}{\omega\_0^2}}, \quad \omega\_0 = \frac{1}{\sqrt{LC}},\quad \xi = \frac{1}{2R\sqrt{LC}}}
|
||||
\boxed{\frac{V\_o}{V\_i}(s) = \frac{1}{1 + 2 \zeta \frac{s}{\omega\_0} + \frac{s^2}{\omega\_0^2}}, \quad \omega\_0 = \frac{1}{\sqrt{LC}},\quad \zeta = \frac{1}{2R\sqrt{LC}}}
|
||||
\end{equation}
|
||||
|
||||
\begin{equation}
|
||||
|
||||
@@ -111,22 +111,22 @@ In order to implement a fourth order trajectory, look at [this](https://www.math
|
||||
See (<a href="#citeproc_bib_item_2">Schmidt, Schitter, and Rankers 2020</a>) (Section 4.2.1).
|
||||
|
||||
Suppose we have a second order plant (could typically be a piezoelectric stage):
|
||||
\\[ G(s) = \frac{C\_f \omega\_0^2}{s^2 + 2\xi \omega\_0 s + \omega\_0^2} \\]
|
||||
\\[ G(s) = \frac{C\_f \omega\_0^2}{s^2 + 2\zeta \omega\_0 s + \omega\_0^2} \\]
|
||||
|
||||
<a id="figure--fig:feedforward-second-order-plant"></a>
|
||||
|
||||
{{< figure src="/ox-hugo/feedforward_second_order_plant.png" caption="<span class='figure-number'>Figure 4: </span>Bode plot of a second order system with fitted model" >}}
|
||||
|
||||
The idea is to design a feedforward controller that corresponds to the plant inverse:
|
||||
\\[ C\_{ff}(s) = \frac{s^2 + 2\xi \omega\_0 s + \omega\_0^2}{C\_f \omega\_0^2} \\]
|
||||
\\[ C\_{ff}(s) = \frac{s^2 + 2\zeta \omega\_0 s + \omega\_0^2}{C\_f \omega\_0^2} \\]
|
||||
|
||||
This controller has a pair of zeros, corresponding to an anti-resonance at the eigenfrequency of the first eigenmode of the system, with equal damping.
|
||||
The controller needs to be modified in such a way that it becomes realisable.
|
||||
In this case it is decided to create a resulting overall transfer function of the controller and the plant that acts like a well damped mass-spring system with the same natural frequency as the plant and an additional reduction of the excitation of higher frequency eigenmodes.
|
||||
In order to realise this controller first two poles have to be added, placed at the same frequency as the resonance but with a higher damping ratio.
|
||||
Typically a damping ratio between aperiodic and critical (\\(0.7 < \xi < 1\\)) is applied to avoid oscillations.
|
||||
For \\(\xi = 1\\) this results in the following transfer function:
|
||||
\\[ C\_{ff}(s) = \frac{s^2 + 2\xi \omega\_0 s + \omega\_0^2}{s^2 + 2 \cdot 1 \cdot \omega\_0 s + \omega\_0^2}\\]
|
||||
Typically a damping ratio between aperiodic and critical (\\(0.7 < \zeta < 1\\)) is applied to avoid oscillations.
|
||||
For \\(\zeta = 1\\) this results in the following transfer function:
|
||||
\\[ C\_{ff}(s) = \frac{s^2 + 2\zeta \omega\_0 s + \omega\_0^2}{s^2 + 2 \cdot 1 \cdot \omega\_0 s + \omega\_0^2}\\]
|
||||
|
||||
<a id="figure--fig:feedforward-compensated-system"></a>
|
||||
|
||||
@@ -211,10 +211,10 @@ Therefore, it is very important to match the delay of the plant:
|
||||
{{< figure src="/ox-hugo/feedforward_4th_order.png" >}}
|
||||
|
||||
Dynamics from \\(F\\) to \\(x\_2\\) is:
|
||||
\\[ G(s) = \frac{x\_2}{F} = \frac{cs + k}{m\_1m\_2 s^2(s^2 + 2\xi\omega\_0 s + \omega\_0^2)} \\]
|
||||
\\[ G(s) = \frac{x\_2}{F} = \frac{cs + k}{m\_1m\_2 s^2(s^2 + 2\zeta\omega\_0 s + \omega\_0^2)} \\]
|
||||
We take the inverse for the feedforward controller:
|
||||
\\[ K\_{ff}(s) = G^{-1}(s) = \frac{m\_1m\_2 s^2(s^2 + 2\xi\omega\_0 s + \omega\_0^2)}{cs + k} \\]
|
||||
If we neglect damped: \\(\xi = 0\\), and we get:
|
||||
\\[ K\_{ff}(s) = G^{-1}(s) = \frac{m\_1m\_2 s^2(s^2 + 2\zeta\omega\_0 s + \omega\_0^2)}{cs + k} \\]
|
||||
If we neglect damped: \\(\zeta = 0\\), and we get:
|
||||
\\[ K\_{ff}(s) = \underbrace{\frac{m\_1m\_2}{k} s^4}\_{\text{snap FF}} + \underbrace{(m\_1 + m\_2) s^2}\_{\text{acc FF}} \\]
|
||||
This can be solved by using **snap feedforward**
|
||||
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
+++
|
||||
title = "Mass Matrix"
|
||||
author = ["Dehaeze Thomas"]
|
||||
draft = false
|
||||
+++
|
||||
|
||||
Tags
|
||||
:
|
||||
|
||||
|
||||
## Mass matrix of a rigid body at its center of mass {#mass-matrix-of-a-rigid-body-at-its-center-of-mass}
|
||||
|
||||
The 6x6 mass matrix of a rigid body relates the forces/torques applied to the body to its translational/rotational accelerations.
|
||||
Expressed at a point \\(P\\) and in a given frame, it is:
|
||||
|
||||
\begin{equation}
|
||||
\bm{M}\_P = \begin{bmatrix} m \bm{I}\_3 & -m [\bm{r}\_c]\_\times \\\ m [\bm{r}\_c]\_\times & \bm{I}\_P \end{bmatrix}
|
||||
\end{equation}
|
||||
|
||||
with \\(\bm{r}\_c\\) the position of the CoM relative to \\(P\\), and \\([\bm{r}\_c]\_\times\\) the skew-symmetric matrix of \\(\bm{r}\_c\\).
|
||||
|
||||
|
||||
### Translation: always diagonal at the CoM {#translation-always-diagonal-at-the-com}
|
||||
|
||||
- The translational block is \\(m \bm{I}\_3\\) (mass is a scalar), so the three translations are decoupled from each other.
|
||||
- The translation/rotation coupling block is \\(m [\bm{r}\_c]\_\times\\), which vanishes if and only if \\(P\\) is the CoM.
|
||||
- Therefore, at the CoM, the mass matrix is block-diagonal:
|
||||
|
||||
\begin{equation}
|
||||
\bm{M}\_{\text{CoM}} = \begin{bmatrix} m \bm{I}\_3 & \bm{0} \\\ \bm{0} & \bm{I}\_c \end{bmatrix}
|
||||
\end{equation}
|
||||
|
||||
|
||||
### Rotation: diagonal only in the principal frame {#rotation-diagonal-only-in-the-principal-frame}
|
||||
|
||||
The rotational block is the inertia tensor at the CoM:
|
||||
|
||||
\begin{equation}
|
||||
\bm{I}\_c = \begin{bmatrix} I\_{xx} & -I\_{xy} & -I\_{xz} \\\ -I\_{xy} & I\_{yy} & -I\_{yz} \\\ -I\_{xz} & -I\_{yz} & I\_{zz} \end{bmatrix}
|
||||
\end{equation}
|
||||
|
||||
- It is symmetric positive (semi-)definite, but in general **not diagonal**, even when evaluated at the CoM.
|
||||
The products of inertia \\(I\_{xy}, I\_{xz}, I\_{yz}\\) couple the rotations.
|
||||
- Example: a thin rod of mass \\(m\\) and length \\(L\\), centered on the CoM and tilted by \\(\theta\\) from the x axis in the x-y plane.
|
||||
\\(I\_{xx} = \tfrac{mL^2}{12}\sin^2\theta\\), \\(I\_{yy} = \tfrac{mL^2}{12}\cos^2\theta\\), \\(I\_{xy} = -\tfrac{mL^2}{12}\sin\theta\cos\theta \neq 0\\) unless \\(\theta = 0, 90^\circ\\).
|
||||
A torque about x then produces an angular acceleration about both x and y.
|
||||
- Since \\(\bm{I}\_c\\) is real and symmetric, a rotation \\(\bm{R}\\) always exists (spectral theorem) such that:
|
||||
|
||||
\begin{equation}
|
||||
\bm{R}^T \bm{I}\_c \bm{R} = \text{diag}(I\_1, I\_2, I\_3)
|
||||
\end{equation}
|
||||
|
||||
The columns of \\(\bm{R}\\) are the **principal axes** (eigenvectors) and \\(I\_i\\) the **principal moments of inertia** (eigenvalues).
|
||||
Axes are unique when the eigenvalues are distinct; for a symmetric top (two equal) or a sphere (all equal), there is freedom in the choice.
|
||||
|
||||
```matlab
|
||||
[R, D] = eig(I_c); % I_c symmetric -> R orthogonal
|
||||
if det(R) < 0, R(:,3) = -R(:,3); end % proper rotation
|
||||
I_principal = R' * I_c * R; % = D (diagonal)
|
||||
```
|
||||
|
||||
|
||||
### Resulting dynamics {#resulting-dynamics}
|
||||
|
||||
In the principal frame at the CoM, for small motion about rest and no stiffness:
|
||||
|
||||
\begin{equation}
|
||||
m \ddot{x} = f\_x,\quad m \ddot{y} = f\_y,\quad m \ddot{z} = f\_z,\quad I\_1 \ddot{\theta}\_x = t\_x,\quad I\_2 \ddot{\theta}\_y = t\_y,\quad I\_3 \ddot{\theta}\_z = t\_z
|
||||
\end{equation}
|
||||
|
||||
i.e. six decoupled double integrators: \\(\bm{G}(s) = \text{diag}\left(\tfrac{1}{ms^2}, \tfrac{1}{ms^2}, \tfrac{1}{ms^2}, \tfrac{1}{I\_1 s^2}, \tfrac{1}{I\_2 s^2}, \tfrac{1}{I\_3 s^2}\right)\\).
|
||||
@@ -31,24 +31,24 @@ Let's consider [Figure 1](#figure--fig:mass-spring-damper-system) where:
|
||||
Transmissibility:
|
||||
|
||||
\begin{equation}
|
||||
\frac{x}{w}(s) = \frac{c s + k}{m s^2 + c s + k} = \frac{2 \xi \frac{s}{\omega\_0} + 1}{\frac{s^2}{\omega\_0^2} + 2 \xi \frac{s}{\omega\_0} + 1}
|
||||
\frac{x}{w}(s) = \frac{c s + k}{m s^2 + c s + k} = \frac{2 \zeta \frac{s}{\omega\_0} + 1}{\frac{s^2}{\omega\_0^2} + 2 \zeta \frac{s}{\omega\_0} + 1}
|
||||
\end{equation}
|
||||
|
||||
Compliance:
|
||||
|
||||
\begin{equation}
|
||||
\frac{x}{F}(s) = \frac{x}{F\_d}(s) = \frac{1}{m s^2 + c s + k} = \frac{1/k}{\frac{s^2}{\omega\_0^2} + 2 \xi \frac{s}{\omega\_0} + 1}
|
||||
\frac{x}{F}(s) = \frac{x}{F\_d}(s) = \frac{1}{m s^2 + c s + k} = \frac{1/k}{\frac{s^2}{\omega\_0^2} + 2 \zeta \frac{s}{\omega\_0} + 1}
|
||||
\end{equation}
|
||||
|
||||
with:
|
||||
|
||||
- \\(\omega\_0 = \sqrt{k/m}\\) the natural frequency in [rad/s]
|
||||
- \\(\xi = \frac{1}{2} \frac{c}{\sqrt{km}}\\) the damping ratio [unit-less]
|
||||
- \\(\zeta = \frac{1}{2} \frac{c}{\sqrt{km}}\\) the damping ratio [unit-less]
|
||||
|
||||
A quality factor \\(Q\\) can also be defined:
|
||||
|
||||
\begin{equation}
|
||||
Q = \frac{1}{2\xi}
|
||||
Q = \frac{1}{2\zeta}
|
||||
\end{equation}
|
||||
|
||||
This corresponds to the amplification at the natural frequency \\(\omega\_0\\).
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
+++
|
||||
title = "Simscape Multibody"
|
||||
author = ["Dehaeze Thomas"]
|
||||
draft = false
|
||||
+++
|
||||
|
||||
Tags
|
||||
: [Simulink]({{< relref "simulink.md" >}})
|
||||
@@ -42,3 +42,17 @@ Tips:
|
||||
## Configure Simulink Programmatically {#configure-simulink-programmatically}
|
||||
|
||||
<https://fr.mathworks.com/help/simulink/slref/common-block-parameters.html>
|
||||
|
||||
|
||||
## Import Geometry in Simscape Multi-Body {#import-geometry-in-simscape-multi-body}
|
||||
|
||||
Best format: `.STEP` (it keeps the geometrical feature such as circles which is not the case with STL).
|
||||
|
||||
If we want to import several parts as one solid:
|
||||
|
||||
- create an assembly with all these parts
|
||||
- made a "defeature" of the assembly and same as a new part
|
||||
- then export to "defeatured" part as a STEP file
|
||||
|
||||
When exporting an assembly as a STEP file, it cannot be imported into Simscape.
|
||||
To make it work, first same the assembly as a "part" in Solidworks, then export the "part" to a STEP file.
|
||||
@@ -1,7 +1,7 @@
|
||||
+++
|
||||
title = "test Page"
|
||||
author = ["Dehaeze Thomas"]
|
||||
draft = false
|
||||
draft = true
|
||||
+++
|
||||
|
||||
## Basics {#basics}
|
||||
@@ -463,7 +463,7 @@ Numbering can be continued by using `+n` option as shown below.
|
||||
```
|
||||
<div class="src-block-caption">
|
||||
<span class="src-block-number"><a href="#code-snippet--lst:tikz-test-general-control-names">Code Snippet 4</a>:</span>
|
||||
Tikz code that is used to generate <a href="#org7b171b1">5</a>
|
||||
Tikz code that is used to generate <a href="#org8100af6">5</a>
|
||||
</div>
|
||||
|
||||
<a id="figure--fig:test-general-control-names"></a>
|
||||
|
||||
@@ -57,7 +57,7 @@ Such amplifier is used to control motors (e.g. voice coil, BLDC, stepper motors,
|
||||
|
||||
## Required properties {#required-properties}
|
||||
|
||||
Main required properties are (taken from (<a href="#citeproc_bib_item_2">Schmidt, Schitter, and Rankers 2020</a>)):
|
||||
Main required properties are (taken from (<a href="#citeproc_bib_item_3">Schmidt, Schitter, and Rankers 2020</a>)):
|
||||
|
||||
- **Power delivery capability**
|
||||
- **Dynamic properties**
|
||||
@@ -212,7 +212,7 @@ W_stop = 0.0025 [W]
|
||||
|
||||
### Howland Current Sources {#howland-current-sources}
|
||||
|
||||
See Section 4.2.5 in (<a href="#citeproc_bib_item_1">Horowitz 2015</a>).
|
||||
See Section 4.2.5 in (<a href="#citeproc_bib_item_2">Horowitz 2015</a>).
|
||||
|
||||
Howland current source is shown in [Figure 1](#figure--fig:art-electronics-current-source).
|
||||
|
||||
@@ -230,6 +230,12 @@ Howland current source is shown in [Figure 1](#figure--fig:art-electronics-curre
|
||||
|
||||
{{< figure src="/ox-hugo/okyay16_current_amplifier_schematic.png" caption="<span class='figure-number'>Figure 3: </span>From <&okyay16_mechat_desig_dynam_contr_metrol>, Appendix A" >}}
|
||||
|
||||
There is a nice transconductance amplifier designed in (<a href="#citeproc_bib_item_1">Anthis 2021</a>) ([Figure 4](#figure--fig:anthis21-transconductance-schematic)).
|
||||
|
||||
<a id="figure--fig:anthis21-transconductance-schematic"></a>
|
||||
|
||||
{{< figure src="/ox-hugo/anthis21_transconductance_schematic.png" caption="<span class='figure-number'>Figure 4: </span>From <&anthis21_six_axis_levit_stage_novel>, Chapter 5" >}}
|
||||
|
||||
|
||||
## Estimation of the required current noise {#estimation-of-the-required-current-noise}
|
||||
|
||||
@@ -287,6 +293,7 @@ In = 6.8e-06 [A/sqrt(Hz)]
|
||||
## Bibliography {#bibliography}
|
||||
|
||||
<style>.csl-entry{text-indent: -1.5em; margin-left: 1.5em;}</style><div class="csl-bib-body">
|
||||
<div class="csl-entry"><a id="citeproc_bib_item_1"></a>Horowitz, Paul. 2015. <i>The Art of Electronics - Third Edition</i>. New York, NY, USA: Cambridge University Press.</div>
|
||||
<div class="csl-entry"><a id="citeproc_bib_item_2"></a>Schmidt, R. M., G. Schitter, and A. Rankers. 2020. <i>The Design of High Performance Mechatronics - Third Revised Edition</i>. Ios Press.</div>
|
||||
<div class="csl-entry"><a id="citeproc_bib_item_1"></a>Anthis, Austin Forrest. 2021. “Six-Axis Levitated Stage with a Novel Flux-Steering Magnetic Hub Actuator.” Massachusetts Institute of Technology.</div>
|
||||
<div class="csl-entry"><a id="citeproc_bib_item_2"></a>Horowitz, Paul. 2015. <i>The Art of Electronics - Third Edition</i>. New York, NY, USA: Cambridge University Press.</div>
|
||||
<div class="csl-entry"><a id="citeproc_bib_item_3"></a>Schmidt, R. M., G. Schitter, and A. Rankers. 2020. <i>The Design of High Performance Mechatronics - Third Revised Edition</i>. Ios Press.</div>
|
||||
</div>
|
||||
@@ -51,7 +51,7 @@ The optimal parameters of the tuned mass damper can be roughly estimated as foll
|
||||
- This allows to compute the stiffness of the TMD:
|
||||
\\[ k\_2 = \nu^2 k\_1 \mu = k\_1 \frac{\mu}{(1 + \mu)^2} \\]
|
||||
- Finally, the optimal damping of the TMD is:
|
||||
\\[ \xi\_2 = \sqrt{\frac{3 \mu}{8 (1 + \mu)}} \Longrightarrow c\_2 = 2 \xi\_2 \sqrt{k\_2 m\_2} \\]
|
||||
\\[ \zeta\_2 = \sqrt{\frac{3 \mu}{8 (1 + \mu)}} \Longrightarrow c\_2 = 2 \zeta\_2 \sqrt{k\_2 m\_2} \\]
|
||||
|
||||
|
||||
## Simple TMD model {#simple-tmd-model}
|
||||
|
||||
@@ -52,6 +52,28 @@ As the force is proportional to the current, a [Transconductance Amplifiers]({{<
|
||||
| [Monticont](http://www.pwr-con.com/ecommerce/default.asp?cat=Linear+Motor+Driven+Positioning+Stage) | |
|
||||
|
||||
|
||||
## Vacuum Compatible Voice Coils {#vacuum-compatible-voice-coils}
|
||||
|
||||
| Vendor | Country | Product | Claim |
|
||||
|------------------------------------------------------------------------------------------------|-------------|----------------------------------------------------------------|-------------------------------------------------------------------------|
|
||||
| [JPE Innovations](https://www.jpe-innovations.com/cryo-uhv-products/cryo-voice-coil-actuator/) | Netherlands | Cryo Voice Coil Actuator (CVCA1) | "UHV compatible", welded titanium housing, hermetic coil, contactless |
|
||||
| [Moticont](https://www.moticont.com/LVCM-VAC/vacuum-compatible-voice-coil-motor.htm) | USA | LVCM-VAC, GVCM-VAC (with bearing), HVCM-VAC (hollow) | "Vacuum-compatible", low outgassing |
|
||||
| [H2W Technologies](https://www.h2wtech.com/product/voice-coil-actuators/NCC05-11-011-1V) | USA | NCC05-11-011-1V, NCC03-14-010-1SL, NCM06-16-037-2SB3TV (cryo) | NASA low-outgassing materials; NCM06 "designed for UHV", meets TML/CVCM |
|
||||
| [Sierra Motion](https://www.sierramotion.com/products/motion-components/voice-coil-motors/) | | Custom voice coil motors | "Vacuum rating down to <9E-9 with proper design" |
|
||||
| Moog | USA | VCA-300, VCA-350 | "Cleanroom and vacuum-compatible versions available" |
|
||||
| [Magnetic Innovations](https://www.magneticinnovations.com/) | Netherlands | MI-MMA moving magnet; "Vacuum Motors" pages (VA 3070, VA 5536) | "Suitable for vacuum environments" |
|
||||
| [Cedrat Technologies](https://www.cedrat-technologies.com/) | France | Space voice coils (RVCM, VC15N, VC60N) | "Severe environment", space heritage |
|
||||
| DH-Robotics | China | VLA-16-15 with vacuum option | Vacuum is an ordering option |
|
||||
|
||||
Other manufacturers that could provide vacuum compatible options:
|
||||
|
||||
- **Akribis AWM** ironless linear motors: "vacuum compatible up to 1e-7 Torr" (about 1.3e-7 mbar), RGA tested. Linear motors, not voice coils, and short of 1e-8 mbar.
|
||||
- **Tecnotion** ironless linear motors: snippet mentions "up to 1e-8 mbar", brochure not verified.
|
||||
- **Aerotech** BLMUC linear motor: "-V" version to 1e-6 Torr, "-UHV" on request. Custom UHV stages.
|
||||
- **Steinmeyer** MT105: UHV linear stage to 1e-11 mbar, 120 C bake. Not a voice coil.
|
||||
- **LABmotionsystems**
|
||||
|
||||
|
||||
## Voice Coil for Vertical payload {#voice-coil-for-vertical-payload}
|
||||
|
||||
Let's consider a spring-mass system with a force actuator ([Figure 1](#figure--fig:voice-coil-vertical-mass-spring)).
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
{{ define "content" -}}
|
||||
<article class="post">
|
||||
<!-- post-header -->
|
||||
<header class="post-header">
|
||||
<h1 class="post-title">{{ .Title | title }}</h1>
|
||||
</header>
|
||||
|
||||
<!-- TOC -->
|
||||
{{- partial "post/toc.html" . -}}
|
||||
|
||||
<!-- Content -->
|
||||
<div class="post-content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
|
||||
<!-- Backlinks -->
|
||||
{{ partial "backlinks" . }}
|
||||
|
||||
<footer class="post-footer">
|
||||
{{ with .Params.tags -}}
|
||||
<div class="post-tags">
|
||||
{{ range . -}}
|
||||
<a href="{{ "tags" | relLangURL }}/{{ . | urlize }}/">{{ . }}</a>
|
||||
{{ end -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
<!-- Post Pagination -->
|
||||
</footer>
|
||||
</article>
|
||||
<div id="comments">
|
||||
{{ partial "comments.html" $ }}
|
||||
</div>
|
||||
{{- end }}
|
||||
@@ -0,0 +1,34 @@
|
||||
{{ define "content" -}}
|
||||
<article class="post">
|
||||
<!-- post-header -->
|
||||
<header class="post-header">
|
||||
<h1 class="post-title">{{ .Title | title }}</h1>
|
||||
</header>
|
||||
|
||||
<!-- TOC -->
|
||||
{{- partial "post/toc.html" . -}}
|
||||
|
||||
<!-- Content -->
|
||||
<div class="post-content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
|
||||
<!-- Backlinks -->
|
||||
{{ partial "backlinks" . }}
|
||||
|
||||
<footer class="post-footer">
|
||||
{{ with .Params.tags -}}
|
||||
<div class="post-tags">
|
||||
{{ range . -}}
|
||||
<a href="{{ "tags" | relLangURL }}/{{ . | urlize }}/">{{ . }}</a>
|
||||
{{ end -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
<!-- Post Pagination -->
|
||||
</footer>
|
||||
</article>
|
||||
<div id="comments">
|
||||
{{ partial "comments.html" $ }}
|
||||
</div>
|
||||
{{- end }}
|
||||
@@ -0,0 +1,34 @@
|
||||
{{ define "content" -}}
|
||||
<article class="post">
|
||||
<!-- post-header -->
|
||||
<header class="post-header">
|
||||
<h1 class="post-title">{{ .Title | title }}</h1>
|
||||
</header>
|
||||
|
||||
<!-- TOC -->
|
||||
{{- partial "post/toc.html" . -}}
|
||||
|
||||
<!-- Content -->
|
||||
<div class="post-content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
|
||||
<!-- Backlinks -->
|
||||
{{ partial "backlinks" . }}
|
||||
|
||||
<footer class="post-footer">
|
||||
{{ with .Params.tags -}}
|
||||
<div class="post-tags">
|
||||
{{ range . -}}
|
||||
<a href="{{ "tags" | relLangURL }}/{{ . | urlize }}/">{{ . }}</a>
|
||||
{{ end -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
<!-- Post Pagination -->
|
||||
</footer>
|
||||
</article>
|
||||
<div id="comments">
|
||||
{{ partial "comments.html" $ }}
|
||||
</div>
|
||||
{{- end }}
|
||||
@@ -0,0 +1,50 @@
|
||||
{{ define "title" }}{{ .Site.Title }}{{ end }}
|
||||
|
||||
{{ define "content" }}
|
||||
{{ partial "home/styles.html" . }}
|
||||
<section class="home-hero">
|
||||
<img class="home-photo" src="{{ "img/thomas.jpg" | relURL }}" alt="Thomas Dehaeze" width="130" height="130">
|
||||
<div>
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="home-section">
|
||||
<h2>On this site</h2>
|
||||
<ul class="home-site-list">
|
||||
<li><a href="{{ "research/" | relURL }}">Publications</a><span>Published work: journal articles, lectures and conference publications.</span></li>
|
||||
<li><a href="{{ "projects/" | relURL }}">Projects</a><span>Side projects and software tools.</span></li>
|
||||
<li><a href="{{ "notes/" | relURL }}">Notes</a><span>Technical notes on control, mechatronics and instrumentation</span></li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section class="home-section">
|
||||
<h2>Latest publications</h2>
|
||||
{{- $pubs := where hugo.Data.publications.publications "type" "ne" "lecture" -}}
|
||||
<ul class="home-latest">
|
||||
{{- range first 3 (sort $pubs "year" "desc") -}}
|
||||
{{- $pub := . -}}
|
||||
{{- $page := false -}}
|
||||
{{- with .page }}{{ $page = site.GetPage (printf "/research/%s" .) }}{{ end }}
|
||||
<li>
|
||||
{{- with $page }}<a href="{{ .RelPermalink }}">{{ $pub.title }}</a>{{ else }}<strong>{{ $pub.title }}</strong>{{ end -}}
|
||||
<span class="meta">{{ with .venue }}{{ . }}, {{ end }}{{ .year }}</span>
|
||||
</li>
|
||||
{{- end -}}
|
||||
</ul>
|
||||
<p class="home-more"><a href="{{ "research/" | relURL }}">All publications →</a></p>
|
||||
</section>
|
||||
|
||||
{{- with site.GetPage "/projects" }}{{ with .Pages }}
|
||||
<section class="home-section">
|
||||
<h2>Projects</h2>
|
||||
<ul class="home-latest">
|
||||
{{- range first 3 . }}
|
||||
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a>{{ with or .Description .Summary }}<span class="meta">{{ . | plainify | truncate 140 }}</span>{{ end }}</li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
<p class="home-more"><a href="{{ "projects/" | relURL }}">All projects →</a></p>
|
||||
</section>
|
||||
{{ end }}{{ end }}
|
||||
{{ end }}
|
||||
@@ -0,0 +1,43 @@
|
||||
<meta name="renderer" content="webkit" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
|
||||
|
||||
<meta http-equiv="Cache-Control" content="no-transform" />
|
||||
<meta http-equiv="Cache-Control" content="no-siteapp" />
|
||||
|
||||
<meta name="theme-color" content="#f8f5ec" />
|
||||
<meta name="msapplication-navbutton-color" content="#f8f5ec">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="#f8f5ec">
|
||||
|
||||
<!-- author & description & keywords -->
|
||||
<meta name="author" content="{{ partial "author.html" . }}" />
|
||||
|
||||
{{- if .Description -}}
|
||||
<meta name="description" content="{{ .Description | safeHTML }}" />
|
||||
{{- else if .IsPage -}}
|
||||
<meta name="description" content="{{ .Summary | plainify }}" />
|
||||
{{- else if .Site.Params.description -}}
|
||||
<meta name="description" content="{{ .Site.Params.description | safeHTML }}" />
|
||||
{{- end -}}
|
||||
|
||||
<!-- Permalink & RSSlink -->
|
||||
<link rel="canonical" href="{{ .Permalink }}" />
|
||||
{{- with .OutputFormats.Get "RSS" }}
|
||||
<link href="{{ .Permalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" />
|
||||
<link href="{{ .Permalink }}" rel="feed" type="application/rss+xml" title="{{ $.Site.Title }}" />
|
||||
{{- end -}}
|
||||
|
||||
<!-- Favicon and Touch icons -->
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="{{ "favicon-32x32.png" | relURL }}">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="{{ "favicon-16x16.png" | relURL }}">
|
||||
|
||||
<!-- Styles -->
|
||||
{{ $style := resources.Get "sass/main.scss" | toCSS | minify | fingerprint }}
|
||||
<link href="{{ $style.Permalink }}" rel="stylesheet">
|
||||
|
||||
<!-- custom css (fingerprinted so CDN caches are busted on change) -->
|
||||
{{ range .Site.Params.customCSS -}}
|
||||
{{ with resources.Get (printf "css/%s" .) | fingerprint -}}
|
||||
<link rel="stylesheet" href="{{ .RelPermalink }}">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
@@ -0,0 +1,19 @@
|
||||
{{- $page := . -}}
|
||||
{{- $bib := slice "book" "article" "inbook" "inproceedings" "phdthesis" "techreport" "websites" -}}
|
||||
<nav class="site-navbar">
|
||||
<ul id="menu" class="menu">
|
||||
{{ range .Site.Menus.main -}}
|
||||
{{- $active := false -}}
|
||||
{{- if eq .URL "/" -}}
|
||||
{{- $active = $page.IsHome -}}
|
||||
{{- else if hasPrefix $page.RelPermalink .URL -}}
|
||||
{{- $active = true -}}
|
||||
{{- else if and (eq .URL "/notes/") (in $bib $page.Section) -}}
|
||||
{{- $active = true -}}
|
||||
{{- end }}
|
||||
<li class="menu-item">
|
||||
<a class="menu-item-link{{ if $active }} active{{ end }}"{{ if $active }} aria-current="page"{{ end }} href="{{ .URL | safeURL }}">{{ .Name }}</a>
|
||||
</li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
</nav>
|
||||
@@ -0,0 +1,22 @@
|
||||
<style>
|
||||
.home-hero { display: flex; align-items: flex-start; gap: 1.8em; margin: 1em 0 2.2em; }
|
||||
.home-photo { width: 130px; height: 130px; border-radius: 50%; object-fit: cover; flex: none; }
|
||||
.home-hero h1 { margin: 0 0 .5em; font-size: 1.9em; }
|
||||
.home-hero p { margin: 0 0 .8em; line-height: 1.6; }
|
||||
.home-hero a { color: #c05b4d; }
|
||||
.home-section { margin-top: 2.2em; }
|
||||
.home-section h2 { font-size: 1.4em; margin-bottom: .7em; }
|
||||
.home-site-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1em 1.6em; }
|
||||
.home-site-list li { line-height: 1.5; padding-left: .9em; border-left: 3px solid hsl(232, 61%, 80%); }
|
||||
.home-site-list a { font-weight: 600; color: hsl(232, 61%, 64%); }
|
||||
.home-site-list span { display: block; color: #666; font-size: .95em; }
|
||||
.home-latest { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .9em; }
|
||||
.home-latest li { line-height: 1.45; }
|
||||
.home-latest .meta { display: block; color: #8a8a8a; font-size: .9em; }
|
||||
.home-latest a { color: hsl(232, 61%, 64%); font-weight: 600; }
|
||||
.home-more { margin-top: .8em; font-size: .95em; }
|
||||
@media (max-width: 640px) {
|
||||
.home-hero { flex-direction: column; align-items: center; text-align: left; gap: 1em; }
|
||||
.home-site-list { grid-template-columns: 1fr; }
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,13 @@
|
||||
{{- $p := . -}}
|
||||
{{- $raw := $p.RawContent -}}
|
||||
{{- $author := $p.Params.ref_author | default "" -}}
|
||||
{{- if not $author }}{{ with findRE `(?m)^Author\(s\)\r?\n: (.+)$` $raw 1 }}{{ $author = replaceRE `^Author\(s\)\r?\n: ` "" (index . 0) }}{{ end }}{{ end -}}
|
||||
{{- $author = $author | replaceRE `&` "&" | strings.TrimSpace -}}
|
||||
{{- $year := $p.Params.ref_year | default "" -}}
|
||||
{{- if not $year }}{{ with findRE `(?m)^Year\r?\n: (\d{4})` $raw 1 }}{{ $year = replaceRE `^Year\r?\n: ` "" (index . 0) }}{{ end }}{{ end -}}
|
||||
{{- $notes := slice -}}
|
||||
{{- range findRE `relref "[^"]+\.md"` $raw -}}
|
||||
{{- $base := . | replaceRE `^relref "(?:.*/)?([^"/]+)\.md"$` "$1" -}}
|
||||
{{- with site.GetPage (printf "/zettels/%s" $base) }}{{ $notes = $notes | append . }}{{ end -}}
|
||||
{{- end -}}
|
||||
{{- return (dict "author" $author "year" (string $year) "notes" $notes) -}}
|
||||
@@ -0,0 +1,68 @@
|
||||
<style>
|
||||
.notes-intro { max-width: 42em; }
|
||||
.notes-bar { position: sticky; top: 0; z-index: 5; background: #fff; border-bottom: 1px solid #e5e5e5; padding: .6em 0; margin: 1.2em 0; }
|
||||
.notes-filter { display: none; align-items: center; gap: .8em; margin-bottom: .5em; }
|
||||
.notes-filter.is-on { display: flex; }
|
||||
.notes-filter input { flex: 1; max-width: 22em; padding: .4em .6em; border: 1px solid #ccc; border-radius: 4px; font: inherit; }
|
||||
.notes-filter input:focus { outline: 2px solid hsl(232, 61%, 64%); outline-offset: 1px; }
|
||||
.notes-count { color: #777; font-size: .85em; }
|
||||
.notes-block { margin-top: 2em; }
|
||||
.notes-block > h2 { font-size: 1.4em; margin: 0 0 .6em; padding-bottom: .3em; border-bottom: 1px solid #e5e5e5; }
|
||||
.notes-block > h2 span { font-size: .6em; font-weight: normal; color: #888; }
|
||||
.notes-block-bib { margin-top: 3.5em; scroll-margin-top: 4em; }
|
||||
.notes-cols { display: flex; gap: 1.2em; align-items: flex-start; }
|
||||
.notes-col { flex: 1 1 0; min-width: 0; }
|
||||
@media (max-width: 699px) { .notes-cols { flex-direction: column; align-items: stretch; } }
|
||||
.notes-single { max-width: 50em; }
|
||||
.note-references { margin-top: 2em; }
|
||||
.notes-card { break-inside: avoid; display: inline-block; width: 100%; box-sizing: border-box; margin: 0 0 1.2em; border: 1px solid #e5e5e5; border-radius: 6px; padding: .9em 1.1em 1em; min-width: 0; }
|
||||
.notes-card h3 { margin: 0 0 .5em; font-size: 1.1em; display: flex; justify-content: space-between; align-items: baseline; gap: .5em; }
|
||||
.notes-card h3 span { font-size: .75em; font-weight: normal; color: #888; }
|
||||
.notes-card ul { list-style: none; margin: 0; padding: 0; }
|
||||
.notes-card li { margin: .3em 0; line-height: 1.35; }
|
||||
.notes-card .keywords { color: #888; font-size: .8em; margin-left: .3em; }
|
||||
.notes-card .description { color: #666; font-size: .85em; }
|
||||
.notes-sub { margin-top: .9em; }
|
||||
.notes-sub h4 { margin: 0 0 .2em; font-size: .95em; }
|
||||
.notes-sub h4 span { font-weight: normal; color: #888; font-size: .85em; }
|
||||
.notes-sub ul { padding-left: 1em; border-left: 2px solid #eee; }
|
||||
.notes-card li > a { color: #2a6ebb; }
|
||||
.notes-block-bib .notes-card .description a { color: #c05b4d; }
|
||||
.notes-card [hidden], .notes-sub[hidden], .notes-block[hidden], .notes-empty[hidden] { display: none; }
|
||||
.notes-card-flow { break-inside: auto; display: block; }
|
||||
.notes-card-flow h3 { break-after: avoid; }
|
||||
</style>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
var input = document.getElementById('notes-filter');
|
||||
if (!input) return;
|
||||
input.parentNode.classList.add('is-on');
|
||||
var items = [].slice.call(document.querySelectorAll('.notes-card li[data-text]'));
|
||||
var cards = [].slice.call(document.querySelectorAll('.notes-card'));
|
||||
var count = document.getElementById('notes-count');
|
||||
var empty = document.getElementById('notes-empty');
|
||||
var total = items.length;
|
||||
function run() {
|
||||
var q = input.value.trim().toLowerCase(), shown = 0;
|
||||
items.forEach(function (li) {
|
||||
var ok = !q || li.getAttribute('data-text').indexOf(q) !== -1;
|
||||
li.hidden = !ok;
|
||||
if (ok) shown++;
|
||||
});
|
||||
[].forEach.call(document.querySelectorAll('.notes-sub'), function (d) {
|
||||
d.hidden = !d.querySelector('li:not([hidden])');
|
||||
});
|
||||
cards.forEach(function (c) {
|
||||
var hide = !c.querySelector('li:not([hidden])');
|
||||
c.hidden = hide;
|
||||
});
|
||||
[].forEach.call(document.querySelectorAll('.notes-block'), function (b) {
|
||||
b.hidden = !b.querySelector('li:not([hidden])');
|
||||
});
|
||||
count.textContent = q ? shown + ' of ' + total + ' entries' : total + ' entries';
|
||||
empty.hidden = shown !== 0;
|
||||
}
|
||||
input.addEventListener('input', run);
|
||||
run();
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,60 @@
|
||||
<style>
|
||||
.project-filter { display: flex; flex-wrap: wrap; gap: .5em; justify-content: center; margin: 1.5em 0 1em; }
|
||||
.project-filter button {
|
||||
font: inherit; font-size: .9em; cursor: pointer; padding: .25em .9em;
|
||||
border: 1px solid #d5d8e0; border-radius: 999px; background: #fff; color: #34495e;
|
||||
}
|
||||
.project-filter button:hover { border-color: hsl(232, 61%, 64%); }
|
||||
.project-filter button.active { background: hsl(232, 61%, 64%); border-color: hsl(232, 61%, 64%); color: #fff; }
|
||||
|
||||
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5em; margin: 1.5em 0 2em; }
|
||||
.project-card {
|
||||
display: flex; flex-direction: column; background: #fff; border: 1px solid #e3e5ea; border-radius: 8px;
|
||||
overflow: hidden; transition: box-shadow .2s, transform .2s;
|
||||
}
|
||||
.project-card:hover { box-shadow: 0 6px 18px rgba(40, 50, 90, .12); transform: translateY(-2px); }
|
||||
.project-card[hidden] { display: none; }
|
||||
.project-card-cover { display: block; aspect-ratio: 16 / 10; background: #eef0f5; overflow: hidden; border: 0; }
|
||||
.project-card-cover:hover { border: 0; }
|
||||
.project-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0; }
|
||||
.project-card-cover.placeholder { display: flex; align-items: center; justify-content: center; padding: 0 .5em; text-align: center; color: #fff; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.8em; font-weight: 600; background: linear-gradient(135deg, hsl(232, 61%, 64%), hsl(232, 45%, 38%)); }
|
||||
.project-card-cover.placeholder:hover { color: #fff; }
|
||||
.project-card-body { display: flex; flex-direction: column; gap: .5em; padding: 1em 1.1em 1.1em; flex: 1; }
|
||||
.project-card-title { margin: 0; font-size: 1.2em; line-height: 1.25; }
|
||||
.project-card-title a { color: inherit; border: 0; }
|
||||
.project-card-title a:hover { color: hsl(232, 61%, 64%); border: 0; }
|
||||
.project-card-summary { margin: 0; color: #4a5568; font-size: .95em; line-height: 1.5; flex: 1; }
|
||||
.project-card-footer { display: flex; align-items: center; justify-content: space-between; gap: .5em; font-size: .85em; margin-top: .3em; }
|
||||
.project-card-footer a { color: #c05b4d; white-space: nowrap; }
|
||||
|
||||
.project-tags { display: flex; flex-wrap: wrap; gap: .35em; }
|
||||
.project-tag {
|
||||
display: inline-block; padding: .05em .65em; font-size: .78em; font-weight: 600; letter-spacing: .02em;
|
||||
border-radius: 999px; background: hsl(232, 61%, 94%); color: hsl(232, 45%, 40%);
|
||||
}
|
||||
.project-status { font-size: .85em; color: #8a8a8a; }
|
||||
.project-status::before { content: ""; display: inline-block; width: .55em; height: .55em; border-radius: 50%; margin-right: .4em; background: #b0b4c0; }
|
||||
.project-status[data-status="active"]::before { background: #4caf7d; }
|
||||
.project-status[data-status="completed"]::before { background: hsl(232, 61%, 64%); }
|
||||
.project-status[data-status="in progress"]::before { background: #e0a030; }
|
||||
|
||||
.project-summary { text-align: center; font-size: 1.1em; color: #4a5568; max-width: 40em; margin: .4em auto 1em; }
|
||||
.project-header .project-tags { justify-content: center; }
|
||||
.project-meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .6em 1.4em; margin: 1em 0 1.5em; font-size: .95em; color: #6b7280; }
|
||||
.project-btn {
|
||||
display: inline-block; padding: .35em 1em; border-radius: 4px; border: 1px solid hsl(232, 61%, 64%);
|
||||
color: hsl(232, 61%, 64%); font-size: .95em;
|
||||
}
|
||||
.project-btn:hover { background: hsl(232, 61%, 64%); color: #fff; border-color: hsl(232, 61%, 64%); }
|
||||
.project-btn.primary { background: hsl(232, 61%, 64%); color: #fff; }
|
||||
.project-btn.primary:hover { background: hsl(232, 61%, 54%); }
|
||||
.project-back { text-align: center; margin-top: 2em; }
|
||||
|
||||
.project-content figure, figure.project-video { margin: 1.5em auto; text-align: center; }
|
||||
.project-content figure img { max-width: 100%; height: auto; }
|
||||
figure.project-video video { display: block; margin: 0 auto; width: 100%; max-width: 420px; max-height: 75vh; background: #000; border-radius: 6px; }
|
||||
figure.project-video.wide video { max-width: 100%; }
|
||||
figure.project-video figcaption, .project-content figcaption { margin-top: .5em; font-size: .9em; color: #6b7280; }
|
||||
.project-content table { margin: 1em auto; }
|
||||
@media (max-width: 600px) { .project-grid { grid-template-columns: 1fr; } }
|
||||
</style>
|
||||
@@ -1 +1 @@
|
||||
<link rel="stylesheet" href="{{ "css/research.css" | relURL }}">
|
||||
{{ with resources.Get "css/research.css" | fingerprint }}<link rel="stylesheet" href="{{ .RelPermalink }}">{{ end }}
|
||||
@@ -0,0 +1,16 @@
|
||||
<div id="mobile-navbar" class="mobile-navbar">
|
||||
<div class="mobile-navbar-icon">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
<nav id="mobile-menu" class="mobile-menu slideout-menu">
|
||||
<ul class="mobile-menu-list">
|
||||
{{ range .Site.Menus.main -}}
|
||||
<a href="{{ .URL | safeURL }}">
|
||||
<li class="mobile-menu-item">{{ .Name }}</li>
|
||||
</a>
|
||||
{{- end }}
|
||||
</ul>
|
||||
</nav>
|
||||
@@ -0,0 +1,34 @@
|
||||
{{ define "content" -}}
|
||||
<article class="post">
|
||||
<!-- post-header -->
|
||||
<header class="post-header">
|
||||
<h1 class="post-title">{{ .Title | title }}</h1>
|
||||
</header>
|
||||
|
||||
<!-- TOC -->
|
||||
{{- partial "post/toc.html" . -}}
|
||||
|
||||
<!-- Content -->
|
||||
<div class="post-content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
|
||||
<!-- Backlinks -->
|
||||
{{ partial "backlinks" . }}
|
||||
|
||||
<footer class="post-footer">
|
||||
{{ with .Params.tags -}}
|
||||
<div class="post-tags">
|
||||
{{ range . -}}
|
||||
<a href="{{ "tags" | relLangURL }}/{{ . | urlize }}/">{{ . }}</a>
|
||||
{{ end -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
<!-- Post Pagination -->
|
||||
</footer>
|
||||
</article>
|
||||
<div id="comments">
|
||||
{{ partial "comments.html" $ }}
|
||||
</div>
|
||||
{{- end }}
|
||||
@@ -0,0 +1,31 @@
|
||||
{{ define "title" }}{{ .Title }} - {{ .Site.Title }}{{ end }}
|
||||
|
||||
{{ define "content" }}
|
||||
{{ partial "projects/styles.html" . }}
|
||||
<article class="post">
|
||||
{{- with .Content }}<div class="post-content">{{ . }}</div>{{ end }}
|
||||
|
||||
<div class="project-grid">
|
||||
{{- range .Pages.ByDate.Reverse }}
|
||||
{{- $cover := .Resources.GetMatch (.Params.cover | default "cover.*") -}}
|
||||
<div class="project-card">
|
||||
{{- if $cover }}
|
||||
<a class="project-card-cover" href="{{ .RelPermalink }}" tabindex="-1" aria-hidden="true">
|
||||
<img src="{{ $cover.RelPermalink }}" alt="" loading="lazy">
|
||||
</a>
|
||||
{{- else }}
|
||||
<a class="project-card-cover placeholder" href="{{ .RelPermalink }}" tabindex="-1" aria-hidden="true">{{ index (split .Title ":") 0 }}</a>
|
||||
{{- end }}
|
||||
<div class="project-card-body">
|
||||
<h2 class="project-card-title"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
|
||||
{{- with .Params.summary }}<p class="project-card-summary">{{ . }}</p>{{ end }}
|
||||
<div class="project-card-footer">
|
||||
{{- with .Params.status }}<span class="project-status" data-status="{{ . | lower }}">{{ . }}</span>{{ else }}<span></span>{{ end }}
|
||||
{{- with .Params.repo }}<a href="{{ . }}" target="_blank" rel="noopener">Source code ↗</a>{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{- end }}
|
||||
</div>
|
||||
</article>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,22 @@
|
||||
{{ define "title" }}{{ .Title }} - {{ .Site.Title }}{{ end }}
|
||||
|
||||
{{ define "content" }}
|
||||
{{ partial "projects/styles.html" . }}
|
||||
<article class="post project-page">
|
||||
<header class="post-header project-header">
|
||||
<h1 class="post-title">{{ .Title }}</h1>
|
||||
{{- with .Params.summary }}<p class="project-summary">{{ . }}</p>{{ end }}
|
||||
<div class="project-meta">
|
||||
{{- with .Params.status }}<span class="project-status" data-status="{{ . | lower }}">{{ . }}</span>{{ end }}
|
||||
{{- if not .Date.IsZero }}<span>{{ .Date.Format "January 2006" }}</span>{{ end }}
|
||||
{{- with .Params.repo }}<a class="project-btn primary" href="{{ . }}" target="_blank" rel="noopener">Source code ↗</a>{{ end }}
|
||||
{{- with .Params.docs }}<a class="project-btn" href="{{ . }}" target="_blank" rel="noopener">Documentation</a>{{ end }}
|
||||
{{- with .Params.pypi }}<a class="project-btn" href="{{ . }}" target="_blank" rel="noopener">PyPI</a>{{ end }}
|
||||
</div>
|
||||
</header>
|
||||
<div class="post-content project-content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
<p class="project-back"><a href="{{ .Parent.RelPermalink }}">← All projects</a></p>
|
||||
</article>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,12 @@
|
||||
{{- $src := .Get "src" | default (.Get 0) -}}
|
||||
{{- $caption := .Get "caption" -}}
|
||||
{{- $poster := .Get "poster" -}}
|
||||
{{- with .Page.Resources.GetMatch $src }}{{ $src = .RelPermalink }}{{ end -}}
|
||||
{{- with $poster }}{{ with $.Page.Resources.GetMatch . }}{{ $poster = .RelPermalink }}{{ end }}{{ end -}}
|
||||
<figure class="project-video">
|
||||
<video controls preload="metadata" playsinline{{ with $poster }} poster="{{ . }}"{{ end }}>
|
||||
<source src="{{ $src }}" type="video/mp4">
|
||||
Your browser does not support the video tag. <a href="{{ $src }}">Download the video</a>.
|
||||
</video>
|
||||
{{- with $caption }}<figcaption>{{ . | markdownify }}</figcaption>{{ end }}
|
||||
</figure>
|
||||
+91
-26
@@ -1,44 +1,109 @@
|
||||
{{- define "title" }}{{ T "archive" }} - {{ .Site.Title }}{{ end -}}
|
||||
{{- define "title" }}{{ .Title }} - {{ .Site.Title }}{{ end -}}
|
||||
|
||||
{{- define "item" -}}
|
||||
<li>
|
||||
<li data-text="{{ printf "%s %s %s" .Title (delimit (.Params.keywords | default slice) " ") (.Description | default "") | lower }}">
|
||||
<a href="{{ .Permalink }}">{{ .Title | title }}</a>
|
||||
{{ with .Keywords }}<span class="keywords">{{ . }}</span>{{ end }}
|
||||
{{ with .Keywords }}<span class="keywords">{{ delimit . ", " }}</span>{{ end }}
|
||||
{{ with .Description }}<div class="description">{{ . }}</div>{{ end }}
|
||||
</li>
|
||||
{{- end }}
|
||||
|
||||
{{- define "content" }}
|
||||
{{- range .Pages.GroupByParam "category" }}
|
||||
<section class="list-zettels">
|
||||
<span class="list-title">{{ .Key | title }}:</span>
|
||||
{{- define "card" -}}
|
||||
{{- $id := .Key | urlize }}
|
||||
<section class="notes-card" id="{{ $id }}" aria-labelledby="{{ $id }}-h">
|
||||
<h3 id="{{ $id }}-h">{{ .Key | title }} <span>{{ len .Pages }}</span></h3>
|
||||
{{- $plain := where .Pages "Params.subcategory" "eq" nil }}
|
||||
{{- if $plain }}
|
||||
<ul>
|
||||
{{- range (where .Pages "Params.subcategory" "eq" nil).ByTitle }}
|
||||
{{ template "item" . }}
|
||||
{{- end }}
|
||||
{{- range .Pages.GroupByParam "subcategory" }}
|
||||
<li class="subcategory">
|
||||
<span class="list-subtitle">{{ .Key | title }}:</span>
|
||||
<ul>
|
||||
{{- range .Pages.ByTitle }}
|
||||
{{ template "item" . }}
|
||||
{{- end }}
|
||||
{{- range $plain.ByTitle }}{{ template "item" . }}{{ end }}
|
||||
</ul>
|
||||
</li>
|
||||
{{- end }}
|
||||
{{- range (where .Pages "Params.subcategory" "ne" nil).GroupByParam "subcategory" }}
|
||||
<div class="notes-sub">
|
||||
<h4>{{ .Key | title }} <span>({{ len .Pages }})</span></h4>
|
||||
<ul>
|
||||
{{- range .Pages.ByTitle }}{{ template "item" . }}{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{- end }}
|
||||
</section>
|
||||
{{- end }}
|
||||
|
||||
{{- define "bibcard" -}}
|
||||
{{- $label := .label }}
|
||||
<section class="notes-card notes-card-flow" id="bib-{{ $label | urlize }}" aria-labelledby="bib-{{ $label | urlize }}-h">
|
||||
<h3 id="bib-{{ $label | urlize }}-h">{{ $label }} <span>{{ len .pages }}</span></h3>
|
||||
{{- $rows := slice }}
|
||||
{{- range .pages }}{{ $m := partial "notes/bibmeta.html" . }}{{ $rows = $rows | append (dict "page" . "m" $m "year" (or $m.year "0")) }}{{ end }}
|
||||
<ul>
|
||||
{{- range sort $rows "year" "desc" }}
|
||||
{{- $m := .m }}{{ with .page }}
|
||||
<li data-text="{{ printf "%s %s %s %s %s" .Title $m.author $m.year (delimit (.Params.keywords | default slice) " ") (.Description | default "") | lower }}">
|
||||
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||
{{ with .Keywords }}<span class="keywords">{{ delimit . ", " }}</span>{{ end }}
|
||||
{{- if or $m.author $m.year }}
|
||||
<div class="description">{{ $m.author }}{{ if and $m.author $m.year }}, {{ end }}{{ $m.year }}</div>
|
||||
{{- end }}
|
||||
{{- with $m.notes }}
|
||||
<div class="description">Notes: {{ range $i, $n := . }}{{ if $i }}, {{ end }}<a href="{{ $n.Permalink }}">{{ $n.Title | title }}</a>{{ end }}</div>
|
||||
{{- end }}
|
||||
</li>
|
||||
{{- end }}{{ end }}
|
||||
</ul>
|
||||
</section>
|
||||
{{- end }}
|
||||
|
||||
{{- define "content" }}
|
||||
{{- partial "notes/styles.html" . }}
|
||||
{{- $cats := .Pages.GroupByParam "category" }}
|
||||
{{- $uncat := where .Pages "Params.category" "eq" nil }}
|
||||
{{- if $uncat }}
|
||||
<section class="list-zettels">
|
||||
<span class="list-title">Other:</span>
|
||||
<ul>
|
||||
{{- range $uncat.ByTitle }}
|
||||
{{ template "item" . }}
|
||||
{{- $bibTypes := slice
|
||||
(dict "label" "Books" "pages" (where site.RegularPages "Section" "book"))
|
||||
(dict "label" "PhD theses" "pages" (where site.RegularPages "Section" "phdthesis"))
|
||||
(dict "label" "Journal articles" "pages" (where site.RegularPages "Section" "article"))
|
||||
(dict "label" "Conference papers" "pages" (where site.RegularPages "Section" "inproceedings"))
|
||||
(dict "label" "Book chapters" "pages" (where site.RegularPages "Section" "inbook"))
|
||||
(dict "label" "Reports" "pages" (where site.RegularPages "Section" "techreport"))
|
||||
(dict "label" "Websites" "pages" (where site.RegularPages "Section" "websites")) }}
|
||||
{{- $bibCount := 0 }}
|
||||
{{- range $bibTypes }}{{ $bibCount = add $bibCount (len .pages) }}{{ end }}
|
||||
<article class="post">
|
||||
<div class="post-content notes-intro">{{ .Content }}</div>
|
||||
|
||||
<div class="notes-bar">
|
||||
<div class="notes-filter">
|
||||
<label for="notes-filter">Filter</label>
|
||||
<input type="search" id="notes-filter" placeholder="Title, keyword, author, year…" autocomplete="off">
|
||||
<span class="notes-count" id="notes-count" aria-live="polite">{{ add (len .Pages) $bibCount }} entries</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="notes-block" aria-labelledby="notes-h">
|
||||
<h2 id="notes-h">Notes <span>{{ len .Pages }}</span></h2>
|
||||
{{- $groups := slice }}
|
||||
{{- range $cats }}
|
||||
{{- $subs := len ((where .Pages "Params.subcategory" "ne" nil).GroupByParam "subcategory") }}
|
||||
{{- $groups = $groups | append (dict "Key" .Key "Pages" .Pages "w" (add (len .Pages) (mul 2 $subs) 3)) }}
|
||||
{{- end }}
|
||||
</ul>
|
||||
{{- if $uncat }}{{ $groups = $groups | append (dict "Key" "Other" "Pages" $uncat "w" (add (len $uncat) 3)) }}{{ end }}
|
||||
{{- $colA := slice }}{{ $colB := slice }}{{ $wA := 0 }}{{ $wB := 0 }}
|
||||
{{- range sort $groups "w" "desc" }}
|
||||
{{- if le $wA $wB }}{{ $colA = $colA | append . }}{{ $wA = add $wA .w }}
|
||||
{{- else }}{{ $colB = $colB | append . }}{{ $wB = add $wB .w }}{{ end }}
|
||||
{{- end }}
|
||||
<div class="notes-cols">
|
||||
<div class="notes-col">{{ range sort $colA "Key" }}{{ template "card" . }}{{ end }}</div>
|
||||
<div class="notes-col">{{ range sort $colB "Key" }}{{ template "card" . }}{{ end }}</div>
|
||||
</div>
|
||||
</section>
|
||||
{{- end }}
|
||||
|
||||
<section class="notes-block notes-block-bib" id="bibliography" aria-labelledby="bibliography-h">
|
||||
<h2 id="bibliography-h">Bibliography <span>{{ $bibCount }}</span></h2>
|
||||
<div class="notes-single">
|
||||
{{- range $bibTypes }}{{ if .pages }}{{ template "bibcard" (dict "label" .label "pages" .pages.ByTitle) }}{{ end }}{{ end }}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<p class="notes-empty" id="notes-empty" hidden>Nothing matches this filter.</p>
|
||||
</article>
|
||||
{{- end }}
|
||||
@@ -0,0 +1,45 @@
|
||||
{{ define "content" -}}
|
||||
<article class="post">
|
||||
<header class="post-header">
|
||||
<h1 class="post-title">{{ .Title }}</h1>
|
||||
</header>
|
||||
|
||||
{{- partial "post/toc.html" . -}}
|
||||
|
||||
<div class="post-content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
|
||||
{{- $base := .File.BaseFileName }}
|
||||
{{- $needle := printf `/%s.md"` $base }}
|
||||
{{- $needle2 := printf `"%s.md"` $base }}
|
||||
{{- $refs := slice }}
|
||||
{{- range where site.RegularPages "Section" "in" (slice "book" "article" "phdthesis" "inproceedings" "inbook" "techreport") }}
|
||||
{{- if or (strings.Contains .RawContent (printf `relref "%s.md"` $base)) (strings.Contains .RawContent (printf `/%s.md"` $base)) }}{{ $refs = $refs | append . }}{{ end }}
|
||||
{{- end }}
|
||||
{{- with $refs }}
|
||||
<section class="note-references">
|
||||
<h2>References</h2>
|
||||
<ul>
|
||||
{{- range sort . "Title" }}<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>{{ end }}
|
||||
</ul>
|
||||
</section>
|
||||
{{- end }}
|
||||
|
||||
{{ partial "backlinks" . }}
|
||||
|
||||
<footer class="post-footer">
|
||||
{{ with .Params.tags -}}
|
||||
<div class="post-tags">
|
||||
{{ range . -}}
|
||||
<a href="{{ "tags" | relLangURL }}/{{ . | urlize }}/">{{ . }}</a>
|
||||
{{ end -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
</footer>
|
||||
</article>
|
||||
<div id="comments">
|
||||
{{ partial "comments.html" $ }}
|
||||
</div>
|
||||
{{- end }}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 40 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 194 KiB |
Reference in new issue
Block a user