Expand description
ConfigMachine: a belt-driven machine of any routing, built from a netlist (Netlist).
The machine has n axes (tool coordinates q) and as many motors (one more per drive of a gantry beyond the first),
and with a yawing gantry one more coordinate, its yaw, after the axes. Each motor turns one pulley through its gearbox.
Belt section s has the geometric length L_s = L0_s + sum_i c_si q_i (plus the teeth in mesh at each pulley it ends
at, see Belt::tooth_length), and pulley k feeds f_sk r_k of belt into it per radian (f = +1 or -1). So:
- the belt pulls axis i with -sum_s c_si T_s, and turns pulley k with r_mat,k sum_s f_sk M_s (M the force on the belt
material,
SectionForce::material); - in the rigid model the belt keeps its length: C q = F diag(r) a, so the pulley angles are a = K q with K = (F diag(r))^+ C, which must reproduce C exactly (else the routing is refused) and be invertible;
- bodies move with their axes, so the mass on axis i is the sum of the bodies that move with it; the axes are
taken square to each other, so the bodies’ mass matrix is diagonal. Gravity pulls axis i with m_i g sin(incline_i).
A body that rides on rotary axes (or across a yawing gantry’s bridge) is placed by
body_pointinstead, and adds m J^T J, -m g J_z and -m J^T (dJ/dt v) (its place’s Jacobian J by differences): Lagrange’s equations. - a gantry’s yaw (
machine.gantry, effects.gantry_yaw): the coordinate psi with its own inertia, spring and damper; the sections that pull the bridge’s ends get longer by their yaw coefficient per rad, a drive at its side has the row e_axis + side e_psi in K. Where fewer motors than coordinates set it, the motors set the axes (k_invfrom their columns) and the spring the yaw; where the belts cannot keep their length with it, the rigid model has none. - a tool centre point (
machine.tcp): the tool pose is the tip’s, the axes stand at the tip less the tool turned by the rotaries (joints,tool_of).
The effects of the shipped crates, written for any routing:
- idlers (
machine.idler): idler d passes belt at the speed s_d . v (s_d itsspeedper axis), so its inertia J_d / r_d^2 adds m_d s_d s_d^T to the axes’ mass matrix (which is then no longer diagonal), and its bearing friction torque F_d r_d pulls the axes back with F_d tanh(s_d . v / (w_s r_d)) s_d (w_s the motors’ friction smoothing speed, as for the gantry’s idlers). They carry no weight. - a cable chain on an axis (
cable_chain = true): mass m(q) = mu (L0 + q / 2) that moves with the axis, which takes m dv/dt + m’ v^2 / 2, and a drag that fades out below the axis guide’s Stribeck speed (mech::CableChain). - a process force per axis,
process.force_<axis>_n, on the tool while the cycle dwells. - the frame (
machine.frame, elastic model only): it sways by u along a horizontal axis f on its spring. The axes are measured on the frame, so the bodies move at v + e_f du/dt over ground: M (a + e_f u’‘) = F, and the frame takes the forces its belt, guides, idlers, chain and stops put on them back, m_frame u’’ = -k u - c u’ - F_f (less the process force, which the workpiece takes, and plus the chain’s -m’ w^2 / 2, w the chain’s speed over ground). Bodies that do not move along f ride on the frame: their mass sways with it. - thermal feedback: the gearboxes’ efficiency and the guides’ viscous friction follow their temperature
(
mech::ThermalFeedback), the belt’s stiffness the ambient one (inBelt). - belt tooth jump (elastic model only): at each driven pulley between a section it feeds (+1) and one it takes from
(-1),
mech::ToothJump; the slip u of the belt over pulley k feeds u of belt into its +1 section. - span vibration (
machine.span): each free span’s first sideways mode at its section’s tension, against what the drives excite (mech::span_frequency,drive_excitations).
Each motor’s drive train (rotor, gearbox, motor friction, ripple, brake) is read from its own config
(catalog::motor_config): the shared [motor] and [gearbox] with its [motor.<id>], [gearbox.<id>] over them.
Two of the registered belt machines are this with C = [[1], [-1]] and F = [[1], [-1]], and with
C = [[1, 1], [0, -2], [-1, 1]] and F = [[1, 0], [-1, 1], [0, -1]]; machines/*.toml hold them, and
crates/sim-machines/tests/machine_files.rs checks them against their crates. The equations are those crates’,
written for any C and F: their module comments derive them.
A motor may drive an axis without a belt (Direct): a ball screw or a rack behind its gearbox, a linear motor, or a
rotary table (an axis in rad). Its drive train is the registered one-axis machines’ (RotaryJoint with the screw’s or rack’s
transmission::Converter behind the gearbox): the gearbox is then one in the axis’s unit, of ratio i / lever, its
stiffness the gearbox’s and the converter’s in series, its efficiency both, the screw’s or pinion’s inertia on the
rotor. Its “pulley” is the axis itself: K has a row e_i for it, the axis takes the gearbox’s output as its force,
and in the elastic model the pulley’s states follow the axis. So the registered screw, rack, linear motor and table axes are this with no
belt (crates/sim-machines/tests/machine_files.rs checks the screw axis against its crate). A rotary axis has no
body: its rotary’s inertia (and payload’s) is its mass, no gravity along it.
Structs§
Functions§
- intern
- A
&'static strfor an id or key read from a file, whichAxisInfoand the other machine descriptions take. Each distinct text is leaked once, so rebuilding a machine on every config change does not grow memory.