Since the needed DC% for regulating voltage also depends e.g. on engine rpm (and lots of other factors) it would be very nice to have a table based Base value for controlling the alternator output instead of just having a fixed DC. That way the control quality would be greatly improved in all conditions.
What do you think about that?
Ok, we can do it.
Can you post an example log showing how the alternator control works?
Thank you!
Here is a log where you can see the Alternator control trying to reach 13,5V Target.
When the RPMs rise or fall quickly, then the controller has a hard time catching up since the pre-control value is only a fixed value and the I-Part needs some time to iron the error out…
2024_0730_2054_.emuprolog (5.1 MB)
All that makes sense, since for a constant power demand from the alternator, the necessary DC% to fulfill that demand would be decreasing over RPM.
If you tune the PID gains correctly, you can have much better control. The duty cycle should be much more stable. There are drastic jumps between 0 and 30% of the duty cycle, which is not good for overall control stability.
Please enable logging for the channels shown below and make a new log with the same example of revving the engine.
(Press F8 to open the logged channels panel, outputs section, right-click and set the logging frequency)
This will allow us to analyze which gains should be lower or higher. Oscillations like that mean there is too much gain somewhere. If you have oscillations in the proportional term channel, you should lower the P gain, and so on.