You mean other than doing like they do on the prototype - increase the
SOME decoders have "back EMF compensation." This is also known
as "speed compensation" and a few other similar sounding names. Most
decoders do not have this feature. You will have to examine the
features for your decoder to determine if it has this feature.
Back EMF compensation senses the load put on a locomotive when it goes
up a grade and increases the power to the motor to compensation.
Likewise, when going down a grade, it senses this, too, and decreases
the power to the motor.
If your decoder has back EMF compensation, it usually comes from the
factory deactivated. You will need to activate it. How you activate
it varies with the manufacturer and the decoder. Usually it is as
simple as setting a CV.
Many decoders have variable back EMF compensation. You can set these
decoders anywhere from no compensation to maximum compensation. At
maximum compensation, you will see very little, if any, speed change
when the train is on a grade. How much compensation is up to you.
Try a value and see how the train reacts.