Expand description
What a machine is, beside what it does: its modes with their shapes (from the machine, or from its elastic model
linearised at a pose) and the stiffness each mode lives in; how well it moves its tool at a place of its workspace;
and the envelope of traces. For the app’s views and sim-cli modes --shapes and workspace. No machine is named:
everything comes through the Machine interface and the config.
Structs§
- Mode
View - One mode of the machine at a pose, for the mode list.
- Shown
Mode - A shape shown swinging in the 3D view (
session::mode_scene): the pose the machine rests at, the mode’s frequency and its shape as a complex direction in the state, re and im. The state swings as rest + a (re sin wt + im cos wt). - Slice
- A horizontal slice through what the machine reaches, at height
zof its third axis (workspace_slice).
Constants§
- STIFFNESS_
KINDS - The kinds of stiffness a mode can live in, each with the label key
ui-modes-stiffness-<kind>.
Functions§
- as_mode
- An eigenvalue as a mode: its undamped natural frequency |lambda| / 2 pi in Hz and its damping ratio -Re / |lambda|.
- build
- The machine
configbuilds, with its parts in. - eigen_
near - The eigenvalue of the n x n matrix
anearestshiftand its eigenvector, by inverse iteration: (A - shift I) is factorised (LU with partial pivoting) and solved fifty times, each solve multiplying the part of the nearest eigenvector by 1 / |lambda - shift| more than any other; then once more from the eigenvalue found, as Rayleigh’s iteration does, since another eigenvalue (a free machine’s rigid motion at 0) may lie nearly as near the shift and fade slowly. The vector is scaled so that its largest entry is 1 (real).Nonewhere the matrix holds a number that is not finite. - envelope
- The lowest and the highest value at each sample over
traces, sample by sample from their starts; where a trace is shorter than another, its end counts no further. - linearised
- The machine at rest at
pose(Machine::equilibrium) and its small-motion matrix there: A = d(derivatives) / d(state), n x n row after row, by central differences with the motor torques held at those that hold it at rest. The motors are free in it, as on a machine with its drives off: no control loop holds them. - linearised_
held - The machine at rest at
posewith its rotors held, asMachine::modeshas its modes (motors held by their loops):linearised‘s matrix over the states that move neither a motor’s angle nor its speed (Machine::motor_state), and those states’ indices. A state that moves a motor’s angle (a rotor’s, or on a rigid drive the joint’s own) is held with the state that moves its speed. The rest, the stand atpose. - mode_
views - The modes the machine reports at
pose, lowest first, each with a shape: the machine’s own for the mode it gives one of, else that of the oscillation nearest the reported one of its linearised model with the motors free (linearised) or with the rotors held (linearised_held, asMachine::modeshas them), a real eigenvalue never (eigen_near; a held 694.28 Hz mode was paired with a roller friction pole, 101.8 Hz, until 21 November), scaled so that the tool moves by at most 1 m per unit (or, where it does not move, the largest entry is 1). - stiffness_
kind - The kind of stiffness a config value is, by its path: a number whose key names a stiffness (
*stiffness*, or a Young’s modulus), in a table of belts, gearboxes, guides and what runs on them (friction contacts, racks, screws, slides), the frame, the base or the links. End stops and a payload’s swing are left out: they hold nothing at rest. - workspace_
slice - The slice at
zwithnnodes a side (seeSlice); the other axes beyond the third at 0.Nonefor a machine with fewer than three axes or no condition to tell (one whose motors move the tool as its axes). - worst_
acceleration - The largest acceleration the motors can give the tool at
posein its worst direction, m/s^2: with T = A a + g the rigid model’s motor torques (Machine::feedforward_torque, linear in the acceleration a of the axes in metres) andpeakeach motor’s peak torque, motor k holds |g_k| + |A_k . d| a <= peak_k for a direction d; its worst is d along its row A_k, so a = min over k of (peak_k - |g_k|) / |A_k|. 0 where a motor cannot even hold the tool there.