|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools |
Rating:
|
Display Modes |
|
#16
|
|||||
|
|||||
|
Re: PID control help
Yes.
|
|
#17
|
||||
|
||||
|
Re: PID control help
Motor1 is controlled by a PID whose setpoint is the driver's position command and whose process variable is position feedback from encoder1. The output of this PID is limited to 90% to allow for motor tolerances as suggested by Steve in post#9. Motor2 is controlled by a closed-loop controller whose output is the sum of two terms: 1) the output from an Integral controller whose setpoint is encoder1 position and whose process variable is encoder2 position, and |
|
#18
|
|||||
|
|||||
|
Re: PID control help
Quote:
|
|
#19
|
||||
|
||||
|
Re: PID control help
Quote:
The problem I see with that is the transient response to large step changes in driver position command. Motor1 responds immediately to the large change, but Motor2's controller must wait for the error to form between encoder1 & encoder2. Granted, you could crank the P gain way up for Motor2, but it's not immediately clear how well that would work in practice. |
|
#20
|
|||
|
|||
|
Re: PID control help
Quote:
What Ether suggested is basically to send the same command to both motors simultaneously, and use the Integrated error between the positions to fine tune motor2. The Integrated error has high DC gain but slow "step response". The settled response for both systems should be similar, but the match while changing position should be much better with Ether's system. |
|
#21
|
|||||
|
|||||
|
Re: PID control help
Quote:
Yeah, that could definitely cause some problems. Depending on the system you might be able to tune it to react correctly, but it could difficult. The more you limit the speed of motor1 the better the system would react I'd imagine. The more I think about it, the more I like your original proposal. I wish I had a system I could try it out on. Last edited by notmattlythgoe : 11-02-2015 at 13:09. |
|
#22
|
|||
|
|||
|
Re: PID control help
Quote:
Would this work? I don't know. Is there a better way? I don't know. This seems to be taking me back to one or two courses I had in college regarding stability and Laplace transforms I think-- but I'm not sure about that. That work was all based on electrical circuits, but I think the math translates to any system of differential equations. Either that or I'm way off in the weeds. I've had no need to revisit that part of my education in the past 25 years, so it's not just rusty, it's frozen/locked up. The part I find curious is using different error terms for P and I on the 'slave' motor. I have absolutely no idea what effect that might have, nor how to solve for it. Thus proving my inability to claim any guru status whatsoever. But I am finding the discussion fascinating, so I really appreciate it. Intuitively it seems it could work, but whether or not in practice the system could keep up with it, or if another formulation would be more effective, I don't know. |
|
#23
|
|||||
|
|||||
|
Re: PID control help
Quote:
|
|
#24
|
|||||
|
|||||
|
Re: PID control help
One thing we decided to do differently this year was control our autonomous drivetrain distances by using a speed controlled PID with a P controller setting the setpoint based on the distance to target. We've had some major success with it so far.
What if you used identical speed controlled PID loops and used the I controller from Ether's proposal to adjust the setpoint of motor 2? |
|
#25
|
|||
|
|||
|
Re: PID control help
Quote:
Basically any servo control loop "attenuates" the error. Three things about this statement - 1) it needs error to work 2) the error is never zero 3) far better reduce the systematic error before entering the loop By sending the same command to both motors simultaneously, you reduce the error before it even develops. The servo has less work to do, is easier to tune and responds faster. |
|
#26
|
||||
|
||||
|
Re: PID control help
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|