A computer readable non-transitory storage medium having a failure determination program stored therein, the program causing a computer to realize:
- a data acquisition function of acquiring, during execution of one-pulse control in which voltage phase control is adopted as a system for controlling an inverter that supplies electric power to a rotating electrical machine, rotation angle data indicating a rotation angle of a rotor included in the rotating electrical machine, voltage phase data indicating a phase of a voltage applied to the rotating electrical machine, angular velocity data indicating an angular velocity of the rotor, direct-current voltage data indicating a direct-current voltage supplied to the inverter, and current data indicating a current supplied to the rotating electrical machine;
- a current expectation value calculation function of calculating an expectation value of the current supplied to the rotating electrical machine during the execution of one-pulse control using the rotation angle data, the voltage phase data, the angular velocity data, and the direct-current voltage data and generating current expectation value data indicating the expectation value;
- based on the inverter being controlled by the one-pulse control and based on the current expectation value data and the current data determining whether at least one of a signal line connected to a switching element included in the inverter and a conducting wire for supplying electric power to the rotating electrical machine has failed on the basis of the current expectation value data and the current data;
- determining that at least one of the signal line and the conducting wire has failed in a case where a difference between the expectation value of the current indicated by the current expectation value data and the current indicated by the current data exceeds a predetermined threshold;
- and
- first calculating the voltage applied to the rotating electrical machine from the rotation angle data, the voltage phase data, and the direct-current voltage data, and then calculating the expectation value of the current supplied to the rotating electrical machine during execution of the one-pulse control from the calculated voltage applied to the rotating electrical machine, the angular velocity data, and expressions used for vector control of the rotating electrical machine, and
- wherein, when the inverter is controlled by pulse width modulation control, the processor does not calculate the expectation value of the current supplied to the rotating electrical machine and does not generate the current expectation value data indicating the expectation value.