Your Trial stars are determined by system according to the combat situation when you pass the Trials. Your combat situation includes duration and the rate of lost Power and original Power.