METU Uses MATLAB and Simulink to Help Develop Self-Optimized Machine Tool Control

Algorithm Helps Optimize CNC Machine Performance and Extend Tool Life

“MATLAB and Simulink are very powerful for developing and testing the time-based algorithm we use for self-optimized machine tool control of chatter.”

Key Outcomes

  • MATLAB and Simulink enabled testing and analyses of a time-based algorithm for self-optimized machine tool control of chatter
  • MATLAB allowed researchers to write functions for all test components of the algorithm and combine them in a single M-file script
  • Simulink enabled algorithm simulation before being deployed to a machine tool
A flowchart depicting an automatic chatter control system consisting of several interconnected blocks and states.

The machine tool controller is implemented by constructing a state machine developed by Stateflow.

Middle East Technical University (METU) has a mission to attain excellence in research, education, and public service by nurturing creative and critical thinking, innovation, and leadership. In addition to providing an education that meets the highest global standards, the Department of Mechanical Engineering at METU conducts research in areas such as automotive, mechatronics, and biomechanics.

One research focus at METU is self-optimized machining systems (SOMS), which is considered the future of advanced manufacturing. SOMS is designed to prevent chatter, an instability phenomenon in manufacturing that can result in poor surface finishes, decreased tool life, and even tool breakage. To begin, a time-based algorithm is being developed to detect and remove chatter in a CNC machine tool without the need for an operator’s intervention.

METU developed a Kalman filter–based detection algorithm that samples and analyzes vibration frequencies to detect the onset of chatter from the axis encoder signal. This algorithm automatically adjusts the spindle speed to eliminate chatter before it causes damage. MATLAB® and Simulink® are used to test and analyze an algorithm during development.

The algorithm uses a Kalman filter to determine the actual axis speed and identify speed variations caused by cutting forces. Normally, these forces create predictable signals, but during instability, chatter frequencies occur. The algorithm aims to detect chatter frequencies using a periodic Kalman filter to separate stable components from chatter. Dynamic band-pass filters (BPFs) isolate potential chatter frequencies, and each BPF’s output is analyzed by an extended Kalman filter to identify frequency, amplitude, and phase. A selection algorithm confirms chatter by checking frequency variance, which decreases when a dominant frequency is found.

Once detected, the algorithm calculates the chatter energy and compares it to the periodic energy. This energy ratio informs a control system that adjusts the spindle speed. If chatter energy exceeds a threshold, the controller increases the spindle speed until the ratio is reduced. An open-loop controller can also set a specific spindle speed, treating chatter frequency as a multiple of the spindle frequency. The controller’s state machine is managed using Stateflow®.

MATLAB is used to write functions for all test components and combine them in a single M-file script. For example, tuning of the Kalman filters is done in an M-file. Simulink is then used to simulate the algorithm for analysis before it is deployed to the controller. Finally, the algorithm is tested with a CNC machine tool to confirm that the real-time chatter and frequency estimates are consistent with the analysis.