View Single Post
Old 10-14-2014, 02:28 PM   #1203 (permalink)
Master EcoModder
freebeard's Avatar
Join Date: Aug 2012
Location: northwest of normal
Posts: 27,795
Thanks: 7,805
Thanked 8,616 Times in 7,097 Posts
Note really a quote, but I wanted it indented
vBulletin supports CODE, it just doesn't have a button for it:
ShouldBeClamped = Kp*error + Ki*sumOfErrors;
if (ShouldBeClamped)>VdClamped /* this is too high, limit 
sumOfErrors=(Vbus-(Kp*error))/Ki; /* calculate sumOfErrors
Id = Id - IdLimit; /* change Id so it can ramp up again
/* next time around

newVd = Kp*error + Ki*sumOfErrors.
If lines aren't wrapped you get a horizontal scroll bar.
  Reply With Quote
The Following 2 Users Say Thank You to freebeard For This Useful Post:
MPaulHolmes (10-14-2014), thingstodo (10-14-2014)