On Mon, 7 Feb 2011 22:20:27 -0800 (PST) "Peter C. Wallace" <p...@mesanet.com> wrote:
> Right. I think I figured out the problem. We are using negative P,I,D > terms which works fine except it breaks the integral freezing logic > in the PID comp. This is for a velocity PID loop for spindle control. > I blame Matt... Hey! Wait a minute! I'm the innocent victim here! :) My only objection to allowing negative values is that someone could set a positive Pgain with a negative I or Dgain, or some other unstable, mixed sign configuration. Although, I wouldn't want to restrict the functionality to make this component "idiot proof". Some possibilities: 1. I could have reversed the encoder polarity and Hall sensor pattern configuration to allow positive PID gains. This is the optimal solution, but in some cases wires and terminals on equipment are already labeled in a way that makes re-arrangement difficult or at least awkward. 2. Add an inverting input or output or both to the PID component. Adding an inverting input would make it into a "specialized op-amp". The gains could then be positive only (actual_gain=abs(specified_gain)). 3. I could have set the bldc.N.rev pin to TRUE which would have reversed the rotation allowing positive PID gains. I'm not completely sure of this and I don't have the hardware to test with anymore. In conclusion, I think that disallowing negative PID gains would be a good idea as long as there was a way of inverting the PID component output for situations where that is most convenient. Thanks, Matt ------------------------------------------------------------------------------ The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb _______________________________________________ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers