A non-transitory computer-readable storage medium recording a program, executable by a computer processor including processing circuitry, for causing a computer to execute determination of an excitation waveform being a time waveform of an excitation signal that is supplied to a stator coil of a motor, the program causing a computer to execute:
- a candidate solution setting step of setting a candidate solution group including one or more candidate solutions of the excitation waveform;
- an electromagnetic field analyzing step of calculating an electromagnetic force generated in a stator of the motor when the one or more candidate solution included in the candidate solution group is supplied to the motor, through execution of an electromagnetic field analysis;
- and an excitation waveform determining step of determining the excitation waveform based on a result of the execution of the electromagnetic field analysis by the electromagnetic field analyzing step, wherein the candidate solution setting step includes:
- an initial candidate solution setting step of setting an initial candidate solution group based on a fundamental wave condition specifies a fundamental wave of the excitation waveform, and a harmonic superimposition condition specifies a harmonic to be superimposed on the fundamental wave;
- and a candidate solution updating step of setting a new candidate solution group from the candidate solution group input therein;
- wherein the excitation waveform determining step determines the excitation waveform from the initial candidate solution group or the new candidate solution group, the excitation waveform capable of suppressing a vibration of the motor;
- and a driving step of driving the motor based on the excitation waveform that has been determined.