OTOH ...
One of the early power system simulation packages developed (I think) by IBM (dates from the days of punched cards so that gives an indication) had a reasonably well documented (for those days) program, luckily...
In the main body of the program prior to calling a subroutine to simulate the voltage regulator was a line of code that reversed the sign of a variable, with a brief note to state that the standard equation assumed the quantity was positive when it was actually negative (or something). Immediately after the start of the subroutine was a line of code that reversed the sign of the same variable, with a brief note to state that the standard equation assumed the quantity was positive when it was actually negative.
We found this after several days of wondering why the simulation of a power system transient indicated an unstable voltage regulator.
But I guess if you get the action of controller wrong it's nice to be able to reverse it very quickly - hopefully before the operators notice!
Bruce
Tim Wescott wrote: