You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old April 26th, 2021, 09:38 AM   #1
modiconguy
Member
Canada

modiconguy is offline
 
Join Date: Oct 2020
Location: Toronto
Posts: 23
Question How much resolution is enough for velocity control using an incremental encoder?

A bit of background here:


We use an incremental encoder with a counting module in our PLC configuration. Using dual phase / quadrature counting, we know the position of the motor (which makes several turns) and we can differentiate to find the velocity. We would like to control the velocity of the motor to get the predictable speeds under varying load.


Given the maximum frequency of the counting module, and the maximum rotational velocity of the motor, I think we could clearly identify the maximum encoder resolution that we could support. It should be less than the max frequency (Hz) of the counter divided by the max revolutions/second of the motor, right?


Secondly, given an encoder resolution and a PLC scan time, what's the slowest practical revolutions/second we can expect to get reliable PID control of slow velocities? I'm guessing it would be a rule of thumb like "the time between pulses should be less than 10x the scan time" or similar.
  Reply With Quote
Old April 26th, 2021, 01:41 PM   #2
Steve Bailey
Lifetime Supporting Member + Moderator
United States

Steve Bailey is online now
 
Steve Bailey's Avatar
 
Join Date: Apr 2002
Location: The boondocks of Western Massachusetts USA
Posts: 7,491
What type of VFD are you using? Can't you wire the encoder to the drive and let it close the velocity loop?
  Reply With Quote
Old April 26th, 2021, 01:48 PM   #3
modiconguy
Member
Canada

modiconguy is offline
 
Join Date: Oct 2020
Location: Toronto
Posts: 23
Thanks for the response. In our case, the motor is hydraulic, and the valve controller does not support encoder feedback.
Even if it was a VFD, isn't the question still relevant? On any controller with a scan time, how slow is it practical to turn the motor or how low resolution can you tolerate for a certain speed?
  Reply With Quote
Old April 26th, 2021, 02:03 PM   #4
widelto
Member
Colombia

widelto is offline
 
widelto's Avatar
 
Join Date: Jul 2005
Location: Barranquilla, Colombia
Posts: 3,019
@modiconguy:
By your name I can infere that your PLC is obviously modicon, but can you try to use a motion controller with your PLC ?.
A motion controller with the right valve can control your hidraulic motor with no problem, and your encoder can be used as you desire.
__________________
My two cents.
  Reply With Quote
Old April 26th, 2021, 02:11 PM   #5
modiconguy
Member
Canada

modiconguy is offline
 
Join Date: Oct 2020
Location: Toronto
Posts: 23
Good point, a motion controller would probably set us ahead, and if we were just getting started I would pursue that further. I should say that since we're somewhat more OEM-type, this encoder is just one-more-thing we're adding to a legacy PLC application which performs well on the motion applications that we've designed.


I'm really just looking for input on the encoder sizing, obviously higher resolution is better as long as you don't exceed the capabilities of the counter. Same question then, how slow can you go on a motion controller and stay stable if you know the encoder resolution and the scan time of the controller?
  Reply With Quote
Old April 26th, 2021, 02:15 PM   #6
GaryS
Member
United States

GaryS is offline
 
GaryS's Avatar
 
Join Date: Aug 2003
Location: Lancaster Pa.
Posts: 1,587
To get the best speed control you should use a Flux Vector VFD
I would recommend Yaskawa GA800 the higher the PPR the better speed regulation
particularly at lower speeds. I like to use 5000 PPR
I have found I can get very good regulation down to zero hz (Position Holding)
You set the speed you want and the VFD will run at that speed within the limits of motor full torque
  Reply With Quote
Old April 26th, 2021, 02:28 PM   #7
modiconguy
Member
Canada

modiconguy is offline
 
Join Date: Oct 2020
Location: Toronto
Posts: 23
Thanks, good to know that 5000 ppr works well for position holding. I would assume there might be oscillation if we implement it ourselves, but within 1/5000 of a rev is probably better than we need.


See my response to Steve that explains why we're not discussing VFDs.
  Reply With Quote
Old April 26th, 2021, 02:53 PM   #8
widelto
Member
Colombia

widelto is offline
 
widelto's Avatar
 
Join Date: Jul 2005
Location: Barranquilla, Colombia
Posts: 3,019
@Modiconguy : I only have experience with Allen Bradley PLCs, modicon only in photos.
But a motion controller can handle your motor the whole range from 0 - to max speed.
In AB a motion controller is asynchronous to the CPU so no problem, it has its own intelligence.
Just in case, I have seen VFD driving hydraulic pumps and controlling flow, Can this be an appropriate solution to you ??
__________________
My two cents.
  Reply With Quote
Old April 26th, 2021, 02:59 PM   #9
Steve Bailey
Lifetime Supporting Member + Moderator
United States

Steve Bailey is online now
 
Steve Bailey's Avatar
 
Join Date: Apr 2002
Location: The boondocks of Western Massachusetts USA
Posts: 7,491
Pick an encoder resolution within the limits of the high speed counter module. A 5000 PPR encoder on a 3000 RPM shaft generates a 250 kHz pulse frequency.

Also remember that even if the HSC can keep up with the pulses from the encoder, the PLC may only update the information from the HSC module when it services the I/O.
  Reply With Quote
Old April 26th, 2021, 03:01 PM   #10
modiconguy
Member
Canada

modiconguy is offline
 
Join Date: Oct 2020
Location: Toronto
Posts: 23
Thanks widelto, I do not want to change to a VFD. I'm happy with the performance of the hydraulic system under PLC control. I'm sorry that this conversation changed to discussing VFDs.


If no one has any further comments on the encoder resolution, I think we should end this thread.
  Reply With Quote
Old April 26th, 2021, 03:15 PM   #11
GaryS
Member
United States

GaryS is offline
 
GaryS's Avatar
 
Join Date: Aug 2003
Location: Lancaster Pa.
Posts: 1,587
if you have a hydraulic system I assume that you are using a hydraulic motor of some sort
can you install a rotary encoder on the motor ?
how about linier encoder or I would look ate a lease measuring system some will give you rate of change feedback
then install a hydraulic servo valve on the feed to the motor / cylinder
I don't see where you need motion control at this point
but all cases the more pules per rev or inch / MM the better
the newer high speed counters cards can handle rates of at least 1 mhz
you have many options available to you just take a little time and see what best meets your needs
  Reply With Quote
Old April 26th, 2021, 06:40 PM   #12
ASF
Lifetime Supporting Member
Australia

ASF is offline
 
Join Date: Jun 2012
Location: Australia
Posts: 3,302
Quote:
Originally Posted by GaryS View Post
if you have a hydraulic system I assume that you are using a hydraulic motor of some sort
can you install a rotary encoder on the motor ?
how about linier encoder or I would look ate a lease measuring system some will give you rate of change feedback
then install a hydraulic servo valve on the feed to the motor / cylinder
I don't see where you need motion control at this point
but all cases the more pules per rev or inch / MM the better
the newer high speed counters cards can handle rates of at least 1 mhz
you have many options available to you just take a little time and see what best meets your needs
...and finally, after 11 posts, the conversation circles back to the actual question asked by the OP.

This forum is great at offering alternate solutions to problems, but usually we also manage to address the actual question at some point. Hopefully now that we've circled back to where we started, we can do just that


@modiconguy, unfortunately I don't have the specific knowledge to answer your question, but I can throw a little bit of anecdotal/generic information to hopefully get the ball rolling.

Quote:
Originally Posted by modiconguy
given an encoder resolution and a PLC scan time, what's the slowest practical revolutions/second we can expect to get reliable PID control of slow velocities?
As I understand it, your question does not concern itself with how to achieve the slow velocity control; reliable slow-speed velocity control is already achieved by the existing hydraulic motor and controller. You simply want to know the minimum encoder resolution that would enable you to adequately monitor that speed, with sufficient resolution to ensure you are getting an accurate representation of actual speed at all times.

As others have mentioned, as well as the scan time of the PLC, you will also need to consider the update rate of the I/O and the HSC module. All of my modicon experience is quite old so I can't give you specific information, but I can give you an AB-world parallel example. If I have a HSC module on a remote I/O rack, I have to concern myself with (a) the rate at which the HSC module is polled by the fieldbus adaptor, (b) the rate at which that fieldbus adaptor is polled by the PLC, and (c) the rate at which the PLC logic reads and acts on that data (scan time). I would assume there are similar factors at play in a modicon system (and of course, I'm making anotherassumption that you're using a modicon PLC, based purely on your handle).

Once you factor all of those things in, you can work out how often you can *actually* read a change in pulses. I'm afraid that beyond that, my experience only goes so far as to say "two or three times that rate doesn't give you very good results", so I'd suggest that your original suggestion of 10x is probably in the ballpark. But again, that's anecdotal and based on semi-educated guesswork, so I wouldn't take my word for it!

Hope that helps somewhat!
  Reply With Quote
Old April 26th, 2021, 08:08 PM   #13
Peter Nachtwey
Member
United States

Peter Nachtwey is offline
 
Peter Nachtwey's Avatar
 
Join Date: Apr 2002
Location: United Welfare States of America
Posts: 7,414
What is your application?

Quote:
Originally Posted by modiconguy View Post
A bit of background here:
We use an incremental encoder with a counting module in our PLC configuration. Using dual phase / quadrature counting, we know the position of the motor (which makes several turns) and we can differentiate to find the velocity.
I am assuming you don't really care about position but only velocity as if you are moving a conveyor or feed chain. You don't need to worry about bumping into anything.

Quote:
We would like to control the velocity of the motor to get the predictable speeds under varying load.
This isn't that hard IF you can accurate measure the actual speed by differentiating the encoder counts. There are problems.
1. is phase delay.
2. sample jitter
3. feedback resolution

Quote:
Given the maximum frequency of the counting module, and the maximum rotational velocity of the motor, I think we could clearly identify the maximum encoder resolution that we could support. It should be less than the max frequency (Hz) of the counter divided by the max revolutions/second of the motor, right?
Yes and Ditto what Steve Bailey said above about resolution. The more resolution the better. Counting modules usually have limited frequency response and sampling them at irregular intervals will cause sample jitter ( noisy velocities ).
It is best if the counting module computes the counts per second for the PLC.

Quote:
Secondly, given an encoder resolution and a PLC scan time, what's the slowest practical revolutions/second we can expect to get reliable PID control of slow velocities? I'm guessing it would be a rule of thumb like "the time between pulses should be less than 10x the scan time" or similar.
1 count difference in a 1 millisecond scan provides a resolution of 1000 counts/second. 1 count difference over 10 millisecond is better but then then if the controller has a 1 millisecond scan then the encoder will provide 9 readings of 0 speed and 1 reading of 100 counts/second.

You need to provide a scan time and resolution.
I/we sell hydraulic motion controllers and can read an encoder every half millisecond easily. I also suggest highest resolution encoder you can get.
A good motion controller should be able to handle 8M counts per second.

What are you really trying to do? What are your specifications or goals?
I have a lot of experience in this area.

I usually recommend 10K ppr or 40K counts per revolution minimum.
The more the better.
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon
  Reply With Quote
Old April 26th, 2021, 09:37 PM   #14
GaryS
Member
United States

GaryS is offline
 
GaryS's Avatar
 
Join Date: Aug 2003
Location: Lancaster Pa.
Posts: 1,587
Boy did we drift way off on this one
the origenal was to control velocity to get predictable repeatable positioning
and encoder is necessary for both because he is using a hydraulic system that would rule out a VFD so you will need a motion controller of some type PLC are generally not very good at that you need a control loop program the velocity and final position and let the control do it's thing
where are you getting an encoder with 40K PPR the most i have ever seen is 6K
5k is hard to find and is more expensive then standard
with the 5K the final resolution is 20K PPR 5K X 4

As for the outputs on an HSC module they are not scan time dependent unless you want them to be they work off the counter processor triggered from the High Speed counter value
the only limitation is the high count limit or rollover point
what you are trying to is possible but you will need a hydraulic valve
  Reply With Quote
Old April 27th, 2021, 02:17 AM   #15
Peter Nachtwey
Member
United States

Peter Nachtwey is offline
 
Peter Nachtwey's Avatar
 
Join Date: Apr 2002
Location: United Welfare States of America
Posts: 7,414
Quote:
Originally Posted by GaryS View Post
Boy did we drift way off on this one
the origenal was to control velocity to get predictable repeatable positioning
Modiconguy didn't say he needed position control. If he did I would have suggested using an SSI absolute encoder to avoid needing a homing routine.


Quote:

and encoder is necessary for both because he is using a hydraulic system that would rule out a VFD so you will need a motion controller of some type PLC are generally not very good at that you need a control loop program the velocity and final position and let the control do it's thing
A good hydraulic motion controller can do it all. No PLC is required unless there is a lot of I/O


Quote:

where are you getting an encoder with 40K PPR the most i have ever seen is 6K
There is a difference between PPR and counts. Encoder decoders can multiply the PPR by 4 because the decoder sees all 4 phases. BTW, I have customers using 17 bit absolute encoders. Now 18 bit encoders are available. That 262144 counts/rev.



Quote:

As for the outputs on an HSC module they are not scan time dependent unless you want them to be they work off the counter processor triggered from the High Speed counter value
the only limitation is the high count limit or rollover point
what you are trying to is possible but you will need a hydraulic valve
So if a HSC module updates every millisecond, how does a PLC take advantage of that if the PLC will sample at different intervals. The HSC needs to be able to provide a counts/second value at all times an not be dependent on the PLC scan time as you suggest. What about acceleration? counts/second^2.
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Resolution external encoder aand74 LIVE PLC Questions And Answers 5 November 24th, 2020 11:33 AM
Incremental Rotary Encoder reading stability issue ... nilesh_1106 LIVE PLC Questions And Answers 6 February 24th, 2017 08:37 AM
encoder resolution John Morris LIVE PLC Questions And Answers 7 January 21st, 2017 05:16 PM
Integrating PowerFlex 755, Incremental Encoder, & Proximity Sensors into Ladder Logic jake4eng LIVE PLC Questions And Answers 7 September 29th, 2016 04:17 PM
conveyor speed-flow rate using incremental encoder and load cell AMAZINGAHMED LIVE PLC Questions And Answers 1 June 12th, 2007 07:05 AM


All times are GMT -4. The time now is 09:49 PM.


.