Energy changes of cosmic rays in the solar system