Speed Sensor (speedSensor)
Reads shaft speed as a signal without loading the shaft.
Group: Mechanical · Kind: {"element":"speedSensor","kind":"mechanical"}
When to use it
Use it to feed the speed to a control loop. Use Position Sensor when you need the angle.
Pins
| Pin | Domain | Meaning |
|---|---|---|
shaft |
mechanical | Shaft terminal, it reads speed and loads nothing |
out |
signal | Speed signal, in rad/s or rpm |
Common parameters
unit: Unit of the speed output:rad/sorrpm(Default: rad/s)
Parameters
| Key | Unit | Default | Typical range | Description |
|---|---|---|---|---|
unit |
— | rad/s | Unit of the speed output: rad/s or rpm |
Parameter descriptions are in English in both languages.
Model
The output is ω·scale, where the scale is 1 for rad/s and 60/(2π) for rpm. The sensor is ideal, with no delay, noise or quantization, and it does not affect the shaft. The value is the shaft speed after each accepted step. To only look at the speed, the result w(net) already shows it.
Common mistakes
- A speed loop tuned in rad/s must read rad/s. With rpm the signal is about 9.55 times larger than the gains were designed for, so use rpm only for a display.
- Put the sensor on the same shaft net as the machine. A sensor on another net reads that net, which is 0 when nothing drives it, and a shaft pin left open is reported as a problem.
- unit accepts only rad/s or rpm, and anything else is refused. The speed is not filtered, so a real drive may need a filter after the sensor.
Problems rules: pin.unconnected, compile.error
Datasheet and sources
A tachometer or encoder datasheet gives nothing for this part except the choice of unit. Use rad/s when the control gains were designed in rad/s, and rpm when the signal feeds a display.
Example
Open the example with the command file.openExample and the name demo:speedSensor.
Generated by cargo xtask reference from the usage texts and parameter specs. Do not edit by hand.