View Single Post
  #17   Spotlight this post!  
Unread 21-03-2012, 12:03
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,083
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: Alternative to PID speed control

Quote:
Originally Posted by Ether
Make sure you scale the feedforward appropriately and then clamp the result after you add it to the PID output.
Quote:
Originally Posted by mommazzboy View Post
Can you expand on this some?
Yes, but first let me make a recommendation: Seriously consider the approach Martin has described in his earlier post in this thread. Really.

Quote:
We're setting the motor outputs in PWM, so the input to the VI needs to be between -1 and 1 inclusive, so we should make sure that the sum of the feedforward and the output of the PID never goes out of that range. Is that what you mean by "scale the feedforward appropriately"?
No. What I mean by "scale the feedforward appropriately" is that you must scale the feedforward so that adding it to the PID output makes sense.

If your PID setpoint is in rpm, and your PID output is +/-1, then it would not make sense to add the setpoint to the PID output without first scaling the setpoint. Adding 4000 (rpm) to the PID's +/-1 output would make the PID completely ineffective.

After you've added the feedforward to the output of the PID, you should then clamp that sum to whatever range the downstream code is expecting. In LabVIEW I think that's called "in range and coerce", or some such thing.




Last edited by Ether : 21-03-2012 at 12:22.
Reply With Quote