How to Measure Motor Speed?

9 views (last 30 days)
Manikandan
Manikandan on 11 Jan 2014
Commented: gopal jat on 16 Jul 2022
Hi guys,
I use DSP TMS320F2812 for control of BLDC drive. I used 3GPOI's are for detect rotor position from this corresponding switches are ON with aids of PWM block, so that I build code that will be downloaded through RS232 with use of another local compiler to convert .out to .asc file. I was successfully controlled the speed in open loop with online control through serial by using SCI block sets. Now I want to measure the speed of motor, how to calculate speed form the signal out of GPIO in simulink. Otherwise I used QEP and CAP blocks with proper wiring connections.
The problem is the output of CAP or QEP will give the counter values only while motor running and these values are oscillating. Actually my motor one rotation will give two square pulses. Some of other chip block sets will give the period of square eg. dSPIC embedded target block set's from www.kerhuel.eu
Please help me out calculate the speed of motor by using QEP or CAP block so that the output of block i want to get frequency or period of i'm given square, then i will send it to SCI to real time monitor.
I waiting reply,
Thanks and Reg, R.Manikandan,M.E.,(Ph.D)., AP / Department of EEE, The Kavery Engineering College, Mecheri (po), Salem(dt), pin:636453 Tamil Nadu, India. Cell: 9944270473 Email: electricmani@yahoo.co.in

Answers (1)

Azzi Abdelmalek
Azzi Abdelmalek on 11 Jan 2014
From what I've understood, after each pulse, your motor has done a half of a revolution. You will need to use a clock block to get the amount of time between two pulses. Can you precise, if your two pulses are equidistant ?
  2 Comments
Manikandan
Manikandan on 12 Jan 2014
yes the pulses are equidistant. adding clock block mean where and how to add? there is no input to add CAP or QEP block, i think from this cnt out of CAP or QEP need to create subsystem to find frequency or pulse width.
gopal jat
gopal jat on 16 Jul 2022
frist you need to calculate the maximum output pulse frequency of your encoder then set the basic parameter of eCAP block using datasheet. you must have an idea about GPIO pin of eCAP where you attached Input speed signal. select an appropriate values in capture event, prescaler, no. of capture events etc.or follow some reference model on Matlab site.

Sign in to comment.

Communities

More Answers in the  Power Electronics Control

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!