Abstract
A strong integration between different design tools is desirable to improve the work of engineers, reducing the number of errors and speeding up the design process. In this article, the authors present a strong integration between three-dimensional computer-aided design models and multidomain simulation applied to the design of a magnetomechanical energy harvester. A MATLAB framework controls a block-oriented Simulink model, drives the Finite Element Method Magnetic simulation and manages the updating of the SolidWorks computer-aided design models of the device. The parameters involved in the different simulations and in the computer-aided design models are stored in a unique data file. Moreover, constructive drawings are automatically updated and are immediately suitable for tolerance and design constraint checks and also for the effective prototyping of the device. Constructed prototypes are immediately suitable to validate the performance predicted by the model.
Keywords
Introduction
In the field of virtual prototyping (Eccleston, 1996) and simulation-based design (Bossak, 1998; Dougal et al., 2007), the main objective has always been to achieve the widest possible integration between different design tools in order to optimize, simplify, and speed up the design process from the initial drafts to the final validation (Chung et al., 2000; Sinha et al., 2000, 2001). This integration can be considered as accomplished between three-dimensional (3D) computer-aided design (CAD), finite element method (FEM), computational fluid dynamics (CFD), and multibody (MB) dynamics analysis instruments. This kind of tool is already available in the majority of computer-aided engineering (CAE) packages and analyzed in greater detail in the literature (Guo et al., 2012; Hamri et al., 2010; Lee, 2005; Lin-Chen et al., 2003; Mocko and Feneves, 2003). A widely used technique is co-simulation between different time-domain lumped parameters simulation environments to simulate both control and under control system and interactions between complex multidomain systems (Albers and Ottnad, 2010; Changlin et al., 2008; Jing, 2009; Rui-guang et al., 2009). Even so, it is rare to find in the literature examples of interaction and automatic data exchange between this last kind of simulation environments and 3D CAD systems (Bhattacharya et al., 2006; Dede and Tosunoglu, 2006; Juhász and Schmucker, 2008; Liu et al., 2012).
For these reasons, a MATLAB-based platform has been developed to allow the integration of different designs and simulation environments, thus reducing, simplifying and automating a lot of iterative editing operations. The proposed methodology, in this case applied to an electromagnetic energy harvesting device (Beeby and O’Donnel, 2009; Cepnik et al., 2012; Green et al., 2013; Mann and Sims, 2009) powering a tire sensor node (Tornincasa et al., 2012a, 2012b), can also be applied to different problems.
By the proposed method, starting from a single configuration file containing geometric and functional parameters of the system, it is possible to automatically execute simulations, FEM analysis, CAD models, and constructive drawings in order to validate design and build prototypes. A complete and effective multidirectional integration between different software environments, concerning different and distant engineering aspects, has been achieved.
The following software tools have been used to create the platform:
MATLAB: the well-known numerical computing environment and programming language has been used for the data and models management and hierarchical structure operations;
Simulink: the MATLAB simulation tool has been used to create a block-oriented physical model of the system;
Finite Element Method Magnetic (FEMM): this is a free powerful finite element tool for two-dimensional (2D) and axial-symmetric electromagnetic field computing. It has been used to calculate magnetic forces and fluxes maps;
SolidWorks: reference software in the field of mechanical design and drawing, suitable both for preliminary models, as the methodological setup of new design proposals, and to develop detailed models and drawings.
Device working principle
The device under examination is a vibrational magnetomechanical energy harvester conceived to power a remote sensor mounted on the inner liner of a tire (Tornincasa et al., 2012a, 2012b). The sketch of the device is shown in Figure 1.

Energy harvester sketch.
When revolving around its axis, the external surface of the tire is subjected to high deformation gradients when contacting ground. An energy harvester, bonded to the inner layer of the tire, follows the imposed external deformation.
In Figure 2, the main phases involved in the energy harvester dynamic behavior are sketched:
The tire does not touch the ground, so the device is subjected to radial (centripetal) acceleration, and therefore, a centrifugal force acts on it;
The tire starts its deformation approaching the ground, so the scavenger is subjected to an acceleration peak;
The tire is on the contact patch, the energy harvester moves with a straight motion, and the radial acceleration quickly drops to 0;
The tire leaves the ground contact, and the scavenger is again subjected to another acceleration peak.

Energy harvester behavior during wheel rotation.
The floating magnet inside the scavenger is radially pushed toward center of the wheel during the third phase, and again, it is forced toward the inner liner during the fourth phase. The motion of the floating magnet is responsible for the energy conversion. The main details of the scavenger are shown in Figure 1. The floating magnet has the magnetization axis parallel to the guide axis, which is fixed radially in the tire. The inner size of the guide is slightly bigger than the magnet, in order to permit the airflow through the two chambers above and below the magnet. Two rubber bumpers are bonded to the upper and lower lids to prevent disruptive shocks of the magnet at the end of the strokes. Between the lids and externally to the guide are wound two coils, divided by a separator. When the floating magnet moves along the guide, excited by the external deformation of the tire, the variation of the magnetic flux linkage into the coils produces an electromotive force that can be used to supply power to an electrical load. The coils are series connected and wound in opposite direction so that their electromotive forces are summed. In the lower lid, a fixed magnet works as a nonlinear spring: when the tire is on the ground (phase 3), it pushes the floating magnet toward the center of the wheel. The behavior of the dynamic system will be adaptive resonant, due to the fact that during the undeformed tire arc, the floating magnet displacement and the resonant dynamic properties are dependent on the wheel speed. An external shell of soft magnetic composite (SMC) material can be added to contain magnetic flux and flux linking with coils.
Design, simulation, and optimization multisoftware framework
A framework in which MATLAB manages and drives all the other software tools for simulations, data exchange, and CAD models updating (Figure 3) has been developed in order to allow a correct and effective interaction between the different components of the device.

Interactions between software tools.
Particularly through a sequence of MATLAB functions, the following operations are provided:
To define the geometrical characteristics by the creation of a shared parametric model used by all simulative tools, MB and finite element models (CAE) and 3D modeling software (CAD);
To compile SolidWorks in order to obtain an automatic model and drawings update from geometric data file;
To pilot FEMM in order to calculate magnetic forces and linked fluxes maps for the substructured MB model;
To pilot Simulink models starting from geometric data, magnetic maps, and accelerometric data available for the different vehicle speeds. It is also possible to perform simulation sequences with variable parameters to make comparisons or optimizations;
To post-process data to further elaborate and to compare different configurations or simulation and experimental results.
Functional parameterization choices
One of the key aspects in the realization of this platform is the most convenient choice of the geometrical parameters of the energy harvester components. This is not an unambiguous choice, but it is fundamental to take into account all the relationships linked to the industrialization and production aspects of the components. Through these parameters, both the geometric description of the device and its functional simulation are completely defined. The chosen parameters are used to compile a configuration file suitable both for running simulations and solid modeling.
Parameters should be chosen in order to avoid redundancy, conflicts, and ambiguity. It is also necessary to preserve parameters independence and at the same time minimize their number (Chang and Joo, 2006). As an example (Figure 4), since the nominal inner diameter of the guide and the floating magnet one are the same, their quotes are directly obtained from the same parameter dm. Similarly, the inner coil radius, as its sizes are tightly linked to the guide, is not directly parameterized, but its value is calculated as the sum of dm/2 and guide thickness dr_peek and the external one as sum of the calculated inner radius and coil thickness dr_coil.

Energy harvester geometry parameterization.
FEMM finite element calculation
Forces applied on the floating magnet by the two coils and the preload magnet are evaluated through a FEMM model (Figure 5) driven by MATLAB. The calculus is iterated for different positions of the floating magnet obtaining a good approximation of the magnetic characteristics. The FEMM scripts are written in the Lua programming language. A source Lua script is updated by a MATLAB function substituting predefined strings with values taken from the configuration file. Then, the script is automatically executed in FEMM, and results are saved in a text file from which Simulink can read the force and flux linkage characteristics as functions of the floating magnet position.

FEMM magnetic induction distribution for a specific magnet configuration.
Energy harvester model
The energy harvester simulator is built in Simulink using a block-oriented logic (Velardocchia et al., 2008): every system component interacts with the other ones by a mutual data exchange about actions and reactions between the same components. This kind of logic partitioning of the model emphasizes interactions between system components giving a quick and easy comprehension of cause-and-effect relationships.
The energy harvester simulator is composed of four subsystems (Figure 6): signal source, energy harvester mechanical model, sensor node (simply as power consumption device), and sensor–generator interface.

Energy harvester simulator.
The input block allows to choose different types of inputs as sinusoidal accelerations with fixed or variable frequency or tire acceleration experimentally measured during steady-state vehicle velocity (i.e. 40 and 60 km/h) or during transient behavior (acceleration or braking maneuvers, coast down test, etc.).
The harvester subsystem is itself partitioned in its physical components according to the functional block logic emphasizing mutual interactions (Figure 7).
Floating magnet. A 3-degree-of-freedom (DOF) model (horizontal x, y and vertical z displacements, rotations are ignored) obtains as inputs forces in z direction applied by other components, system acceleration, and gives as outputs its displacement, velocity, and acceleration in z direction and forces exchanged with the guide in x and y directions.
Guide. It obtains as input the floating magnet dynamic and gives as output magnet friction forces and pneumatic effect forces due to the pressure difference at the two sides of the magnet and to the airflow in the clearance between the two components.
Coils and preload magnet. They obtain as input the floating magnet displacement and velocity and a feedback from the interface block. They give as output tension and current on the interface, the dissipative force (viscous equivalent to energy subtraction to the coils) and the nonlinear elastic force on the floating magnet. These forces, due to the floating magnet displacement and velocity, are calculated through the FEMM maps by the geometrical data.
End-stops. They obtain as input the relative displacement between the floating magnet and the guide and give as output the elastic and dissipative forces due to the bumpers between magnet and end-stop.

Energy harvester mechanical subsystem.
The scavenger interface provides alternating current–direct current (AC-DC) conversion and energy management through Simulink SimPower library blocks and StateFlow state machine charts. More details on the electromechanical logics for improving the efficiency of the energy conversion are resumed in Tornincasa et al. (2012b).
The sensor node is simply modeled as a power consuming device. Typically, the load is represented by a resistor supplied by a capacitor that acts as energy storage (Tornincasa et al., 2012a).
Parametrical CAD model control
To achieve a complete automation in CAD models building, geometry changes are driven by a macro automatically compiled starting from a properly structured configuration file. This approach has been developed in SolidWorks by means of Application Program Interface (API) (Farhan et al., 2012; Raffaeli et al., 2010; SolidWorks, 2004) tools that allow the execution and parameterization of modeling features and functional simulations with ASCII text files.
Once geometrical parameters are chosen, it is possible to start the SolidWorks modeling. Models have to be completely parametric and driven by equations: the equations, which state mathematical relations between model quotes and global variables, are shown in Figure 8 for the coil part.

SolidWorks equations manual editing window.
In the models, there are two different categories of equations: global variables (the effective system parameters) and model dimensions (calculated by the previously defined parameters). Through the model equations, editing is possible to modify component geometries and update the assembly.
Once the model parameters have been identified and defined in the CAD model of the device, the next step is the building of a SolidWorks VBA Macro (SolidWorks, 2004) to overwrite the equations of every component in the assembly. This macro can be easily recorded directly in the CAD environment and in a second while modified by a text editor.
The operations to be recorded are subdivided into four steps:
Load the models;
Rewrite parametric equations;
Rebuild the models;
Save and close the models.
Then macros recorded for each component can be assembled in a single file. Moreover, thanks to the great simplicity of API tools and VBA language, it is very easy to find useless operations in the macro (as an example views translation and rotations) and clear them from the code. Another choice is to directly write the macro.
The macro, once run in SolidWorks, opens each component of the scavenger, modifies the linking and controlling model quotes equations, deactivates not necessary features, rebuilds, and closes the model. Then, it opens the assembly, deactivates unnecessary components, and rebuilds it. The last operation is the updating procedure of constructive drawings of each component and assembly.
Macros compiling is performed by a MATLAB function completely independent from the edited model. The compiler needs two external files to work and generates the compiled macro: the parameters file and a source file (the macro to be compiled). The source file differs from the effective macros because it contains, instead of numerical values of model geometrical parameters, definite strings univocally matched to a defined parameter and easily detectable by the compiler. During a run, the compiler searches and substitutes these strings with the corresponding numerical values.
As an example, the guide’s inner diameter is defined by two equations in the SolidWorks model: the first one links the parameter dm to its numerical value, while the second one links it to the inner diameter of the guide. If the guide has a 5 mm inner diameter, the macro will contain the following two instructions:
That it will add the following two relations in the selected part:
In the source file, the modified instructions will be
The macro compiler, when it detects ParVar14 string, recognizes it and substitutes the associated value. The second equation, since it does not constitute a parameter definition, will not be edited. Obviously, it is necessary to avoid confusing any part of the source code with the string chosen to define parameters.
Design feedback, prototyping, test, and comparison
In the automatically generated models, the tolerance and interference analysis can be performed through SolidWorks embedded tools but widely available in the largest part of CAD software. Drawings of the parts and assembly are univocally linked to solid models. Model changes are automatically transferred to the drawings, immediately available to perform a check on design constraints and to eventually start prototypes construction. In this way, it is possible to quickly set up an experimental test campaign in order to verify and validate simulated design configurations. If necessary, the parameters in the simulation model are automatically updated through a comparison between numerical and experimental results. As shown in Figure 9, this closed-loop approach between geometrical parameters, CAD models, CAE evaluations, and MB simulation tools represents an effective and innovative design tool for the optimization of performance of energy harvester devices.

Summary of the design approach.
Optimization
This kind of automatism in model generation and simulation is essential if it is necessary to optimize the device by numerical techniques like Newton’s method or genetic algorithms. The objective function for the optimization of this device is the opposite of the useful output power at a chosen vehicle speed. It is also possible to optimize the output power at more than one vehicle speed: in this case, the objective function is a weighted average of the opposites of output power at each speed (Tornincasa et al., 2013).
The optimization routine runs a MATLAB-embedded optimization function (like fmincon, patternsearch, or ga) calling the objective function and imposing proper constraints and initial values for the parameters. The fmincon function uses the trust-region-reflective algorithm to find an optimal solution starting from an appropriate starting point. This algorithm approximates the neighborhood of the current point with a quadratic function to choose the direction of the step. Patternsearch is a direct method that searches the optimum varying only one parameter at time and if no improvement of the objective function is found, it reduces the step size. The ga function is the MATLAB implementation of genetic algorithm, differently from the other two methods it does not need a starting point.
This objective function, which is called by the optimization function at each iteration, has to perform the subsequent steps:
Feasibility check of the parameter set: if the set is not feasible, the output power is set to 0 and then immediately returned to the calling function; otherwise, it proceeds with the subsequent steps;
Creation of the configuration file for the current parameter set;
Creation of the FEMM model and simulation;
Updating of the Simulink model and time-domain simulation at the requested vehicle speed (or speeds);
Return of the result to the optimization function.
In order to save time and disk space, the CAD model is created only for the optimal solutions of the optimization. The sequence of the operation is described with greater detail in Appendix 1.
The feasibility check cited above is necessary because not all the geometrical constraints act independently on each parameter, and constraints acting on multiple parameters are not always linear.
Table 1 shows the geometrical DOFs, and their respective boundaries, for the optimization problem related to the sketch of Figure 4. Lower and upper boundaries are determined by the availability of off-the-shelf components and overall size constraints.
Geometrical degrees of freedom for the optimization.
An example of the evolution of the optimization parameters using MATLAB fmincon is shown in Figure 10.

Example of the (a) evolution of parameters and (b) output power.
Conclusion
Integration between simulation, analysis, and CAD instruments is everyday more important to obtain a quicker and more effective virtual environment for rapid prototyping. A design optimization can be faster with a simulation and drawing automation for all the configuration of possible interest. A complete and effective system parameterization with a complete sharing of the parameters, stored in a unique data file, between all the involved software gives the designer great advantages in terms of time saving and error reduction. Moreover, this kind of automation in simulation and design is essential in the case of numerical optimization. All these characteristics of multiobjective design have been successfully implemented to optimize an energy harvester device powering a tire sensor node.
Footnotes
Appendix 1
In Figure 11 is shown the flowchart of the operation performed by the optimization tool. In the gray boxes, an action by the user is required while the operation enclosed in the dash-dotted rectangle is performed automatically. The dotted arrows link the blocks in the flowchart with the menus of the optimization tool. The dashed arrows make an ideal link between the blocks in the flowchart related to the operation automatically performed by the software and the buttons in the menu of the automatic design tool.
Acknowledgements
This work has been performed under a research project with Pirelli Tyre S.p.A. The authors would like to thank Dr Giorgio Audisio, Dr Federico Mancosu, Dr Massimo Brusarosco from Pirelli Tyre S.p.A. for their enthusiasm and driving force in the project.
Declaration of conflicting interests
The authors declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
This work was supported by Pirelli Tyre S.p.A., viale Sarca 222, 20126 Milan, Italy.
