View Single Post
  #6   Spotlight this post!  
Unread 18-02-2015, 21:27
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,089
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Keeping two motors in sync

Quote:
Originally Posted by Jared Russell View Post
You want both sides of the mechanism to end up in the same place at the same time.
That's half the problem. The other half is keeping the sides synchronized while doing so.

For an elevator the synchronization is important because of binding. For drivetrains it's important because the final location of the robot depends on the sides staying in sync during the journey..


Quote:
In drivetrains people often use a controller that is something like:

Code:
output_steering = PID(steering_error)
output_throttle = PID(distance_error)

left_command = output_throttle + output_steering
right_command = output_throttle - output_steering
Nice and symmetric. No master/slave.


Quote:
distance_error is usually computed as:

Code:
distance_error = desired_distance - (left_distance + right_distance) / 2
I think that's a big part of making this work, so that the throttle and steer controllers don't fight each other. They can be satisfied independently.

Quote:
...and steering error could be calculated by a gyro, or by integrating encoder values over time.
Could you elaborate on what you mean here by "integrating encoder values over time"? Could it be as simple as just using encoder counts instead of rate?



Reply With Quote