Design of a development environment for drive controllers
Author: Moritz Olbrich, Dr. Fritz Faulhaber GmbH & Co. KG
Contribution – Embedded Software Engineering Congress 2017
Implementing and testing newly developed functions (e.g., drive controllers) for drive controllers can be error-prone and time-consuming. Using a Rapid Control Prototyping (RCP) environment aims to make developing new functions more efficient. This environment allows directly connected drives to be operated at the model level. Improved analysis capabilities and prior direct comparison with the drive controller enable early assessments of the extension's functionality.
Function development for drive controls
If the drive control system needs to be extended or modified with an additional function (e.g., due to a customer request or to expand functionality), this is often first verified using an offline simulation. The reliability of these simulation results can vary depending on the quality of the chosen model. For a more qualified assessment, the function must be translated into machine language and implemented in an existing prototype drive control system. This process can be quite time-consuming and prone to errors, as many additional aspects (variable definitions, scaling, interface management, etc.) must be considered. Furthermore, the analysis options (e.g., comparison with the simulation) are limited because not all signals from the drive control system are available for analysis (see also Figure 1)., PDF).
Function development with the Rapid Control prototyping environment
Using a Rapid Control Prototyping (RCP) environment for function development enables a more function-oriented approach. Rapid Control Prototyping is used for function development in many different fields [1]. The developed simulation models, which only include the drive control, are directly translated and loaded onto the RCP board. On this RCP board, the functions can be tested and analyzed directly with the motor in real time. Only after testing with the RCP environment is the new function implemented in the drive control (see also Figure 2, PDF).
The RCP environment provides access to numerous signals that can be analyzed and saved. This allows for faster and more effective correction of potential implementation errors. The block-oriented representation of functions in the simulation facilitates clear understanding. Furthermore, all variables in the model are available to the controller.
The parameters of the model environment (sampling time, variable data types, measurement resolution) are adjusted or scaled down to match the given environmental conditions of the drive control system. Differences in operating behavior can be identified and corrected. This enables an explicit comparison and alignment between the drive control system and the RCP environment. Statements about the functionality of the drive control system can be made based on measurements taken with the RCP environment. The measurement results can also be used to improve the models in the offline simulation. Several approaches exist for implementing the functions. These are tested under the given conditions and compared. This allows for an earlier and more accurate evaluation of the performance of different solutions. Early tests with a connected motor allow for a more precise refinement of the offline simulation results.
Development of hardware and software components
The development environment consists of two main components: the simulation software and the RCP board. The necessary models are created and compiled using the simulation software (here MATLAB/SIMULINK from MathWorks). These models are then loaded onto the RCP board (here DS1005 with ACMC module [2] from dSPACE) and operated with the associated software (here ControlDesk [3] from dSPACE). The RCP board used here provides various inputs and outputs, including different encoder interfaces and a PWM unit for block and sine commutation. The accompanying software allows all possible signals in the model to be displayed and saved, as well as for model parameters to be modified (see also Figure 3)., PDF).
A wide variety of motors from Faulhaber's product portfolio [4] can be operated for testing in the RCP environment. These include brushed and brushless DC motors, as well as brushless linear DC servo motors in various sizes and voltage variants. Incremental and absolute encoders, as well as analog or digital Hall sensors, are possible encoders that can be combined with the motors.
The following additionally developed driver hardware is required for operating this motor variant: The motors and encoders are connected to the carrier board and operated at a supply voltage of up to 24 V. The phase currents and phase voltages of the motors are also measured on the carrier board. The power stages and signal processing for the encoders are plugged in as modules. Various dual-N channel as well as PN channel power stage modules can be used for operation. The additional connector board serves as the link between the RCP board and the carrier board. Reconfiguration options on the connector board and switching capabilities in the simulation model allow the inputs and outputs to be used in different ways and quickly reconfigured for a different motor.
Variant handling
The various motor technologies, numerous motor variants with different encoder technologies, and virtually limitless load cases result in a multitude of possible combinations that must be covered. Additional MATLAB scripts facilitate and accelerate model reconfiguration. The existing system can be configured via a user interface. The parameters for controller and simulation initialization of the selected system configuration are generated using motor parameters from a database. Parameter files can be saved via the user interface, enabling the simulation model to be reparameterized directly on the RCP board after a hardware change (see also Figure 4)., PDF).
Selecting from the various available models, which differ in function, is also managed via the user interface. Similarly, the creation of RCP models (build process) for the RCP platform is initiated via the user interface, which speeds up the modification and reuse of models.
The RCP simulation models, explicitly developed at the outset, represent the drive behavior of the drive control system. These models comprise the signal processing for encoders and various analog quantities, the drive control system with its different commutation variants, and the drive regulation system. The results of the RCP model must be thoroughly compared with the drive control system to verify the equivalence of both systems.
Alignment of the development environment with the drive control
The comparison of the saved measurements serves not only to verify the systems against each other. It is also used to demonstrate the improvement of the additional function. Comparison with the results of the offline simulation can help to improve the model quality (see also Figure 5)., PDF).
The recorded measurements from the RCP environment and drive control are exported using the respective programs. The file name contains the relevant system and measurement information. The desired system is configured via the user interface, and it is checked whether measurements exist for this configuration. The selected measurements are imported, scaled, and then displayed together in a plot. System comparison is achieved by displaying the respective measurements from each system.
Summary and Outlook
The use of the development environment enables function-oriented development and testing on the actual hardware at an early stage of the development phase. This results in improved system analysis and, in turn, a rapid assessment of functionality. Various drives can be operated in just a few steps using the RCP development environment. Overlaying the simulation results with measurements from the RCP environment or the controller improves the comparison and analysis of the systems. Subsequently, further algorithms/controllers can be developed and verified on various drives using the RCP environment in a function-oriented manner. Controller programming is already being carried out using UML programs and a code generator [4]. The idea here is that the additional functions developed in the simulation are directly implemented in the drive controller via code generation.
Bibliography
| [1] | D. Abel and A. Bollig, Rapid Control Prototyping, Heidelberg: Springer Verlag, 2006. |
| [2] | „ACMC Module“, [Online]. Available: https://www.dspace.com/de/gmb/home/products/hw/modular_hardware_introduction/i_o_boards/ac_motor_control_solution.cfm. [Accessed on 27.09.2017]. |
| [3] | „ControlDesk,“ [Online]. Available: https://www.dspace.com/de/gmb/home/products/sw/experimentandvisualization/controldesk.cfm. [Accessed on 27.09.2017]. |
| [4] | „Faulthaber’s product portfolio“, [Online]. Available: https://www.faulhaber.com/de/produkte/. [Accessed on 27.09.2017]. |
| [5] | A. Wagener, „OO and model-based tools – workshop report“, in Embedded Software Engineering Congress, Sindelfingen, 2015. |
Download the article as a PDF file
Architecture – MicroConsult Training & Coaching
Do you want to bring yourself up to date with the latest technology?
Then find out more here MircoConsult offers training courses/seminars/workshops and individual coaching on the topic of architecture/embedded and real-time software development.
Training & coaching on the other topics in our portfolio can be found here. here.
Architecture – Expertise
Valuable expertise in architecture/embedded and real-time software development is available. here Available for you to download free of charge.
You can find expertise on other topics in our portfolio here. here.
