DAQ in Matlab with incremental encoder
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
HALLO;
How can one calculate the speed of an incremental encoder in Simulink?
0 comentarios
Respuestas (1)
Simon
el 11 de Ag. de 2025
Hi Mahmoud,
You can calculate incremental encoder speed in Simulink using the pulse counting method as follows:
1. Encoder Pulse Input – Read channel A (or B) via Digital Input, this is your DAQ input.
2. Detect Rise Positive – Output a single pulse for each rising edge.
3. Counter – Count pulses between resets using a Discrete-Time Integrator or counter logic.
4. Triggered Subsystem – Trigger every second to read and reset the counter. Read the current count and subtract it using a unit delay.
5. First Gain block – Convert to rad/s (Converts encoder counts difference to counts per second)
Value can be 1/(PRR*Interval), create the variables and values accordingly
PRR - Pulses per Revolution
Interval: This is the time between your measurements.
This gain converts the change in encoder counts per sample into a real-world rotational speed (rad/s)
6. To get RPM – multiply second gain block value as 60
7. Display/Scope – Show or log speed.
This method is simple and works well for medium–high speeds. For very low speeds, consider period measurement.
There’s some information available to refer:
Hope it helps!
0 comentarios
Ver también
Categorías
Más información sobre Sources en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!