Compare commits
11
Commits
0097be4114
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f684da767e | ||
|
|
aedf928fd0 | ||
|
|
785feb7f26 | ||
|
|
7d39832b2a | ||
|
|
148338e9c2 | ||
|
|
9bbd8cd325 | ||
|
|
a0cd55427a | ||
|
|
41fc48b8c0 | ||
|
|
adec6e712f | ||
|
|
2490e8bbb1 | ||
|
|
0699938cd5 |
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
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
+++
|
||||
title = "Bibliography"
|
||||
build = { render = "never", list = "never" }
|
||||
+++
|
||||
@@ -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>
|
||||
@@ -1,7 +1,7 @@
|
||||
+++
|
||||
title = "Ultra Precision Bearings"
|
||||
author = ["Dehaeze Thomas"]
|
||||
draft = true
|
||||
draft = false
|
||||
+++
|
||||
|
||||
Tags
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
+++
|
||||
title = "Robust mass damper design for bandwidth increase of motion stages"
|
||||
author = ["Dehaeze Thomas"]
|
||||
draft = true
|
||||
draft = false
|
||||
+++
|
||||
|
||||
Tags
|
||||
|
||||
@@ -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.
|
||||
@@ -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)\\).
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
+93
-28
@@ -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 }}
|
||||
</ul>
|
||||
{{- range $plain.ByTitle }}{{ template "item" . }}{{ end }}
|
||||
</ul>
|
||||
{{- 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 }}{{ 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>
|
||||
</section>
|
||||
{{- end }}
|
||||
{{- 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>
|
||||
|
||||
<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 |
Reference in new issue
Block a user