Simulate tachometer varying refresh rate
4 views (last 30 days)
Show older comments
Hi,
I am simulating a DC motor controller. The real application will use an optical tachometer, where the measured period of the pulses is used to calculate the motors angular velocity. Since the angular velcoity is calculated with every pulse width measure, the refresh rate of the angular velocity measurement will vary, ie higher refresh rate at higher angular velocity and vice-versa.
Is there a way to simulate this on mathlab?
Thanks
0 Comments
Answers (1)
Mathieu NOE
on 17 Mar 2022
hello
why not using a counter ? sampled at a high (fix) frequency rate.
This simulink code attached is a demo (Fs = 100 kHz, adapt to your needs)
the output is the frequency (or RPM if you prefer, multiply by 60 the freq output)
All the best
2 Comments
Mathieu NOE
on 18 Mar 2022
hello
a techometer is always built around a (fast) counter - so it's fixed sampling rate.
a variable step size simulation / solver is IMHO just a simulation / computation time saving tool
if you want to turn that into a prototype control system is gonna be anyway fixed sampling process.
so IMHO your code could / should have multiple rates ( fix ) as this is going to be how it will work in "real" .
See Also
Categories
Find more on Electrical Block Libraries in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!