ITK Engineering Develops IEC 62304–Compliant Controller for Dental Drill Motor with Model-Based Design
- Development time halved
- Hardware problems discovered early
- Contract won, client confidence established
Sensorless brushless DC (BLDC) motors are well-suited for use in dental drills. They operate with less abrasion than brushed motors, and are more reliable, quieter, and easier to maintain and sterilize. Compared with BLDC motors with sensors, sensorless BLDC motors are less expensive and more compact. However, the complex algorithms needed for sensorless control require much more engineering effort to develop.
ITK Engineering saved time and effort by using Model-Based Design to develop and implement a production BLDC motor controller compliant with the IEC 62304 standard for medical device software.
“Model-Based Design with Simulink enabled us to design and optimize the controller even before the motor hardware was available for testing and then generate production code for the controller once we had the motor,” says Dr. Michael Schwarz, senior engineer for medical control systems at ITK. “It would have been impossible to complete this project on schedule if we had written the code by hand.”
Dental drill motors operate at speeds up to 40,000 RPM. The field-oriented control algorithm for such motors needs precise information about the rotor position over a wide speed range. In a sensorless motor, rotor position must be deduced from changes in current in the stator caused by electromagnetic induction from the rotor magnet. ITK engineers needed to design and optimize a rotor position estimator, as well as a sophisticated cascade control for the dental drill motor that would comply with the IEC 62304 standard for medical device software.
When the project began, a prototype motor was unavailable. To meet their client’s project deadline, ITK had to develop the controller software in parallel with the motor hardware. ITK engineers needed to create an accurate model of the motor and develop a controller that worked with this model. Once the motor was available, they needed to rapidly implement and test their control software on an embedded processor.
ITK engineers designed, optimized, implemented, and tested the sensorless BLDC motor controller with Model-Based Design.
Working from data sheets for existing motors and information provided by their client, the engineers modeled the BLDC motor, including its electrical and mechanical components, in Simulink®.
They developed a controller model in Simulink, and used Stateflow® to model startup, shutdown, and error modes, as well as user-selectable operating modes.
The team ran closed-loop simulations of the plant model and the initial controller model, which relied on a rotor position signal supplied by the plant model.
To develop the rotor position estimator, the team used Symbolic Math Toolbox™ to solve algebraic equations, and then refined the estimator until its results matched the actual rotor position signal from the plant model.
Using the automatic scaling and data type override capabilities of Fixed-Point Designer™, the engineers converted their floating-point controller design to fixed point. They reran simulations to verify the fixed-point model.
The team developed MATLAB® scripts that performed batch unit testing of individual model components. They produced model coverage reports for these tests using Simulink Coverage™.
The team generated more than 5000 lines of C code from their controller model with Embedded Coder®. They compiled the code for an ARM® Cortex®-M3 processor with a Keil compiler.
The engineers tested the controller on a prototype board and motor, refining the model and re-generating code several times to optimize performance.
ITK delivered Simulink models of the controller and the plant to its client, together with the generated production code. The controller and sensorless BLDC motor are currently in series production in dental drills.
Development time halved. “We completed controller development in about four months,” says Schwarz. “Without Model-Based Design it would have taken at least twice as long, because we would have had to wait for hardware, write code by hand, and test more prototypes.”
Hardware problems discovered early. “Our plant model accurately reflected motor behavior, which enabled us to verify our controller and the hardware early in development,” says Alexander Reiss, systems engineer at ITK. “We quickly identified the root cause of an error on the first hardware prototype: The results measured on the hardware did not match the results produced by our verified Simulink model.”
Contract won, client confidence established. “Our client wanted to start work immediately. Model-Based Design helped us get the contract because it enabled us to begin development before hardware was available,” says Reiss. “Model-Based Design also increased our client’s confidence in our work; we shared our Simulink models and simulations, which they now use to make their own enhancements.”