3 replaced http://robotics.stackexchange.com/ with https://robotics.stackexchange.com/
source | link

Are there any issues with this?

The main issue with this is that while your proposed solution will instantaneously correct for a mismatch between the performance of the motors, it will not correct for accumulated error, let alone more complex errors in position such as Abbe error (see later).

What is a better approach?

There are several things you can do, depending on what your tolerance for errors are and how much effort you want to put into correcting them.

The first step would be to set up a pair of PID loops, one for each wheel, giving them both the same demand position. As I suggested in my answer to a similar questionmy answer to a similar question, if you keep both wheels within a very tight error bound of where you ask them to be, then it will take some time to accumulate enough of an error to cause noticeable veer.

It will also be much easier to tune two nominally independent Motor level PID loops than to tune a single complex, interdependent combined system. To stand any change of the higher level control working you really need each motor to behave as similarly as possible to the other motor for as much of the time as possible, and that really requires separate servo loops.

There are a number of further complications however, and it depends what accuracy you need and how much effort you are prepared to go to to correct for them as to which solution you go for. It may be that Dead Reckoning is sufficient, or you may need to add Relative or Absolute position determination to your robot.

One problem is that even if your left and right wheels both move 1000 encoder counts, you may still end up in a different position on two different runs.

For example, say you have a maximum following error of 10 encoder counts, and your motors are running at a speed of say 10 encoder counts per PID loop iteration. Your left motor might move 5,10,10,10...10,5 while your right motor might have a profile of 4,11,10,10...10,5 and even that slight difference in acceleration at the start of the move could cause the robot to set off in slightly the wrong direction. Not only that but the further you move in that direction, the greater the error will become in absolute terms. This is what we are talking about when we talk of Abbe error, and without a complex kinematic model or some sort of external reference, you are never going to be able to correct for it.

For more information, see my answermy answer to a similar but not quite duplicate question: How can I use the Arduino PID library to drive a robot in a straight line?How can I use the Arduino PID library to drive a robot in a straight line? and my answermy answer to the also related Line Follower optimizationLine Follower optimization

Are there any issues with this?

The main issue with this is that while your proposed solution will instantaneously correct for a mismatch between the performance of the motors, it will not correct for accumulated error, let alone more complex errors in position such as Abbe error (see later).

What is a better approach?

There are several things you can do, depending on what your tolerance for errors are and how much effort you want to put into correcting them.

The first step would be to set up a pair of PID loops, one for each wheel, giving them both the same demand position. As I suggested in my answer to a similar question, if you keep both wheels within a very tight error bound of where you ask them to be, then it will take some time to accumulate enough of an error to cause noticeable veer.

It will also be much easier to tune two nominally independent Motor level PID loops than to tune a single complex, interdependent combined system. To stand any change of the higher level control working you really need each motor to behave as similarly as possible to the other motor for as much of the time as possible, and that really requires separate servo loops.

There are a number of further complications however, and it depends what accuracy you need and how much effort you are prepared to go to to correct for them as to which solution you go for. It may be that Dead Reckoning is sufficient, or you may need to add Relative or Absolute position determination to your robot.

One problem is that even if your left and right wheels both move 1000 encoder counts, you may still end up in a different position on two different runs.

For example, say you have a maximum following error of 10 encoder counts, and your motors are running at a speed of say 10 encoder counts per PID loop iteration. Your left motor might move 5,10,10,10...10,5 while your right motor might have a profile of 4,11,10,10...10,5 and even that slight difference in acceleration at the start of the move could cause the robot to set off in slightly the wrong direction. Not only that but the further you move in that direction, the greater the error will become in absolute terms. This is what we are talking about when we talk of Abbe error, and without a complex kinematic model or some sort of external reference, you are never going to be able to correct for it.

For more information, see my answer to a similar but not quite duplicate question: How can I use the Arduino PID library to drive a robot in a straight line? and my answer to the also related Line Follower optimization

Are there any issues with this?

The main issue with this is that while your proposed solution will instantaneously correct for a mismatch between the performance of the motors, it will not correct for accumulated error, let alone more complex errors in position such as Abbe error (see later).

What is a better approach?

There are several things you can do, depending on what your tolerance for errors are and how much effort you want to put into correcting them.

The first step would be to set up a pair of PID loops, one for each wheel, giving them both the same demand position. As I suggested in my answer to a similar question, if you keep both wheels within a very tight error bound of where you ask them to be, then it will take some time to accumulate enough of an error to cause noticeable veer.

It will also be much easier to tune two nominally independent Motor level PID loops than to tune a single complex, interdependent combined system. To stand any change of the higher level control working you really need each motor to behave as similarly as possible to the other motor for as much of the time as possible, and that really requires separate servo loops.

There are a number of further complications however, and it depends what accuracy you need and how much effort you are prepared to go to to correct for them as to which solution you go for. It may be that Dead Reckoning is sufficient, or you may need to add Relative or Absolute position determination to your robot.

One problem is that even if your left and right wheels both move 1000 encoder counts, you may still end up in a different position on two different runs.

For example, say you have a maximum following error of 10 encoder counts, and your motors are running at a speed of say 10 encoder counts per PID loop iteration. Your left motor might move 5,10,10,10...10,5 while your right motor might have a profile of 4,11,10,10...10,5 and even that slight difference in acceleration at the start of the move could cause the robot to set off in slightly the wrong direction. Not only that but the further you move in that direction, the greater the error will become in absolute terms. This is what we are talking about when we talk of Abbe error, and without a complex kinematic model or some sort of external reference, you are never going to be able to correct for it.

For more information, see my answer to a similar but not quite duplicate question: How can I use the Arduino PID library to drive a robot in a straight line? and my answer to the also related Line Follower optimization

2 added 973 characters in body
source | link

Are there any issues with this?

From the way your have phrased you question I assume you are either running motorsThe main issue with a speed controller andthis is that while your proposed solution will instantaneously correct for a separate encoder, or reading backmismatch between the encoder used byperformance of the speed controllermotors, it will not correct for accumulated error, let alone more complex errors in position such as Abbe error (see later).

What is a better approach?

If this is the caseThere are several things you can do, then I would suggest thatdepending on what your tolerance for errors are and how much effort you might find it more accuratewant to put into correcting them.

The first step would be to set up a pair of PID loops, one for each wheel, giving them both the same demand position. As I suggested in my answer to a similar question, if you keep both wheels within a very tight error bound of where you ask them to be, then it will take some time to accumulate enough of an error to cause noticeable veer.

The problem with your proposed solution is that by the time your error value gets large enough to cause a significant differential between the motors, you have already accumulated significant Abbe error which you are never going toIt will also be able to correct for.

I think you would find it much easier to tune two nominally independent systemsMotor level PID loops than to tune a single complex, interdependent combined system, since. To stand any change of the higher level control working you really need each motor to behave as similarly as possible to the other motor for as much of the time as possible, and that really requires separate servo loops.

There are a number of further complications however, and it depends what accuracy you need and how much effort you are prepared to go to to correct for them as to which solution you go for. It may be that Dead Reckoning is sufficient, or you may need to add Relative or Absolute position determination to your robot.

One problem is that even if your left and right wheels both move 1000 encoder counts, you may still end up in a different position on two different runs.

For example, say you have a maximum following error of 10 encoder counts, and your motors are running at a speed of say 10 encoder counts per PID loop iteration. Your left motor might move 5,10,10,10...10,5 while your right motor might have a profile of 4,11,10,10...10,5 and even that slight difference in acceleration at the start of the move could cause the robot to set off in slightly the wrong direction. Not only that but the further you move in that direction, the greater the error will become in absolute terms. This is what we are talking about when we talk of Abbe error, and without a complex kinematic model or some sort of external reference, you are never going to be able to correct for it.

For more information, see my answer to a similar but not quite duplicate question: How can I use the Arduino PID library to drive a robot in a straight line? and my answer to the also related Line Follower optimization  

From the way your have phrased you question I assume you are either running motors with a speed controller and a separate encoder, or reading back the encoder used by the speed controller.

If this is the case, then I would suggest that you might find it more accurate to set up a pair of PID loops, one for each wheel, giving them both the same demand position. As I suggested in my answer to a similar question, if you keep both wheels within a very tight error bound of where you ask them to be, then it will take some time to accumulate enough of an error to cause noticeable veer.

The problem with your proposed solution is that by the time your error value gets large enough to cause a significant differential between the motors, you have already accumulated significant Abbe error which you are never going to be able to correct for.

I think you would find it much easier to tune two nominally independent systems than to tune a single combined system, since you need each motor to behave as similarly as possible to the other motor for as much of the time as possible, and that really requires separate servo loops.

There are a number of further complications however, and it depends what accuracy you need and how much effort you are prepared to go to to correct for them as to which solution you go for. It may be that Dead Reckoning is sufficient, or you may need to add Relative or Absolute position determination to your robot.

For more information, see my answer to a similar but not quite duplicate question: How can I use the Arduino PID library to drive a robot in a straight line? and my answer to the also related Line Follower optimization  

Are there any issues with this?

The main issue with this is that while your proposed solution will instantaneously correct for a mismatch between the performance of the motors, it will not correct for accumulated error, let alone more complex errors in position such as Abbe error (see later).

What is a better approach?

There are several things you can do, depending on what your tolerance for errors are and how much effort you want to put into correcting them.

The first step would be to set up a pair of PID loops, one for each wheel, giving them both the same demand position. As I suggested in my answer to a similar question, if you keep both wheels within a very tight error bound of where you ask them to be, then it will take some time to accumulate enough of an error to cause noticeable veer.

It will also be much easier to tune two nominally independent Motor level PID loops than to tune a single complex, interdependent combined system. To stand any change of the higher level control working you really need each motor to behave as similarly as possible to the other motor for as much of the time as possible, and that really requires separate servo loops.

There are a number of further complications however, and it depends what accuracy you need and how much effort you are prepared to go to to correct for them as to which solution you go for. It may be that Dead Reckoning is sufficient, or you may need to add Relative or Absolute position determination to your robot.

One problem is that even if your left and right wheels both move 1000 encoder counts, you may still end up in a different position on two different runs.

For example, say you have a maximum following error of 10 encoder counts, and your motors are running at a speed of say 10 encoder counts per PID loop iteration. Your left motor might move 5,10,10,10...10,5 while your right motor might have a profile of 4,11,10,10...10,5 and even that slight difference in acceleration at the start of the move could cause the robot to set off in slightly the wrong direction. Not only that but the further you move in that direction, the greater the error will become in absolute terms. This is what we are talking about when we talk of Abbe error, and without a complex kinematic model or some sort of external reference, you are never going to be able to correct for it.

For more information, see my answer to a similar but not quite duplicate question: How can I use the Arduino PID library to drive a robot in a straight line? and my answer to the also related Line Follower optimization

1
source | link

From the way your have phrased you question I assume you are either running motors with a speed controller and a separate encoder, or reading back the encoder used by the speed controller.

If this is the case, then I would suggest that you might find it more accurate to set up a pair of PID loops, one for each wheel, giving them both the same demand position. As I suggested in my answer to a similar question, if you keep both wheels within a very tight error bound of where you ask them to be, then it will take some time to accumulate enough of an error to cause noticeable veer.

The problem with your proposed solution is that by the time your error value gets large enough to cause a significant differential between the motors, you have already accumulated significant Abbe error which you are never going to be able to correct for.

I think you would find it much easier to tune two nominally independent systems than to tune a single combined system, since you need each motor to behave as similarly as possible to the other motor for as much of the time as possible, and that really requires separate servo loops.

There are a number of further complications however, and it depends what accuracy you need and how much effort you are prepared to go to to correct for them as to which solution you go for. It may be that Dead Reckoning is sufficient, or you may need to add Relative or Absolute position determination to your robot.

For more information, see my answer to a similar but not quite duplicate question: How can I use the Arduino PID library to drive a robot in a straight line? and my answer to the also related Line Follower optimization