I know it's a bit strange, but my objective is to control an isolated hydroelectric power station which generates 5000W, connected to a variable load.
When this load doesn't require such power, (which is known by measuring the voltage, frecuency and current) a secondary load, controlled by a PWM set by the measured parameters, dissipates the excess.
Without setting the power in the source, if I add more load it only increases the required power, but it is not dissipated. I thought that maybe it could be preset the power of the source, but I see that probably is not.