The invention relates to the technical field of fault diagnosis, and particularly discloses an electric spindle fault diagnosis method and
system based on multi-scale dynamic
convolution, and the method comprises the steps: collecting a multi-channel vibration
signal of an electric spindle through a
vibration sensor, carrying out the preprocessing, and segmenting the multi-channel vibration
signal into equal-length samples through a
sliding time window; constructing a multi-scale dynamic
convolution module, extracting local and global features of an input sample through a parallel multi-
branch structure, and dynamically aggregating
convolution kernel weights of different scales based on an attention mechanism; the extracted local and global features are input into an AMSoftmax module, and decision boundaries between fault categories are increased through angle interval constraint; and training a diagnosis model by adopting a combined
loss function, adjusting hyper-parameters in combination with
Bayesian optimization, and outputting a composite fault
classification result. Local and global features contained in a vibration
signal are captured through parallel convolution kernels of different scales, an expert mechanism is introduced to realize
adaptive selection of convolution kernel parameters, and the adaptability of a model to composite fault mode changes is enhanced.