Subject
- Posted on
Hi,
Could somebody help and advice how I estimate the velocity from the
position output of an incremental shaft encoder (two outputs, 90 deg.
shifted). I use Simulink and xPC target to control an actuator with DC
motor. The easiest way would be to take the difference between the
last two sampled positions divided by the sampling period. But I don't
know where I should get the sampling period from? Is there another way
which I could try to perform speed control?
Thanks
Dan
Re: velocity estimation from position measurement for speed control
dr5417@bris.ac.uk wrote:
Surely you know the sampling rate?
A bare first difference, such as you propose, will work far better than
nothing -- good enough, perhaps, that you don't need more.
If you have noise problems, consider making a band-limited
differentiator, though.
--
Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
Posting from Google? See http://cfaj.freeshell.org/google/
Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" gives you just what it says.
See details at http://www.wescottdesign.com/actfes/actfes.html
Re: velocity estimation from position measurement for speed control
Tim Wescott wrote:
Fine, but that doesn't answer his sample-period question. The period is
the reciprocal of the sample rate. Surely, that is a constant?
Jerry
--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Re: velocity estimation from position measurement for speed control
¯AF¯AF¯AF¯AF¯AF¯AF¯AF¯AF¯AF¯AF¯AF
Thanks Jerry and Tim for your discussion.
I managed to create a model which simulates a DC motor with encoder
feedback. The reference speed changes at a predefined time interval
(e.g. 0.5 sec). A counter counts the pulses coming from the shaft
encoder to get the position of the actuator. This counter is then
reset to obtain the position at the end of the predefined time
interval. Multiplying the final counter content with a constant
should give me then the exact position at the end of the time interval
(0.5 sec.). This value is then divided by the time interval to get the
average speed of the actuator for the predefined time interval.
My problem is now how to get only the final content out of the counter
at the end of predefined time interval?
At the moment, I subtract the counter content from the previous time
step from the current content to get the position. By the end of the
time interval, the counter is reset and this gives me then the final
counter content for the particular time step. However, this is done
always based on the sampling rate of the simulation (0.001 sec) and
not only at the end of the time interval (0.5 sec). To send only the
final speed at the end of the time interval to the comperator, I use a
zero order hold but I'm not sure if this is the right solution.
Thanks
Dan
Site Timeline
- » Process Control for 3 variables: Target and 2 Disturbances
- — Next thread in » Industrial Control Group
-

- » Simulation of a nonlinear system in MATLAB
- — Previous thread in » Industrial Control Group
-

- » Measurement validation for process signals
- — Newest thread in » Industrial Control Group
-

- » Re: shop press
- — The site's Newest Thread. Posted in » General Metalworking
-






