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.