View Single Post
Old 10-14-2014, 03:28 PM   #1203 (permalink)
freebeard
Master EcoModder
 
freebeard's Avatar
 
Join Date: Aug 2012
Location: northwest of normal
Posts: 20,839
Thanks: 5,834
Thanked 6,804 Times in 5,502 Posts
Quote:
Note really a quote, but I wanted it indented
vBulletin supports CODE, it just doesn't have a button for it:
Code:
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)