DAQ in Matlab with incremental encoder
1 回表示 (過去 30 日間)
古いコメントを表示
HALLO;
How can one calculate the speed of an incremental encoder in Simulink?
0 件のコメント
回答 (1 件)
Simon
2025 年 8 月 11 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Sources についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!