The solution described in this section was implemented in Octave, release 6.2.0, and MathWorks MATLAB, release R2015a. Before designing the ANN, we performed a simple visual analysis of the data obtained by numerical experiments.
Figure 9 presents 4D graphs related to the first three resonant modes of the linearly tapered multimode bimorph cantilever-based PVEH, where
x,
y, and
z-axis refer to its length, width at the anchor and the taper ratio, respectively, and the values of the frequencies related to each triplet (length, width, taper ratio) are proportionally scaled and used for defining the marker size. The greater the marker size is, the greater is the resonant frequency related to the parameter set defined by the marker coordinates. Thus, we visualize the trend of change in resonant frequencies caused by varying the cantilever beam’s dimensions.
The analysis of raw data further proves that the longer the beam is, the lower the resonant frequencies of all three resonant modes are, and the greater the power of the first mode is. The wider the beam is, the greater the output power related to the first resonant mode is (if the length and the taper ratio are kept constant). For long and wide beams, the taper ratio of 0.5 seems to be optimal for the power related to the third resonant mode. The interdependencies of these values are complex; however, the decision on which data to use for training the ANN and which data should be the focus of multiobjective optimization is simple. For the first preliminary results, we used the data related to the first resonant mode only. The reasoning for this is based on the analysis of the data shown in
Figure 9 and
Figure 10. The marker size in
Figure 10 is proportional to the power generated by a specific structure related to the marker’s location; however, the correlation between powers of different modes is not clear. Longer structures would resonate with all three modes at lower frequencies than the starting structure and hence enable harnessing more vibration energy. The amount of that improvement is visualized in
Figure 11, which presents a 4D graph of the trend of gain from higher modes. Again, marker location is related to the beam’s dimensions and now the marker size is proportional to the ratio of the power of the third and the first resonant mode. Markers related to frequencies higher than 450 Hz are excluded because we are interested in low-frequency applications. The power of the second resonant mode is lower than the power of the first resonant mode for orders of magnitude, and hence, the trend of their correlation is not visualized. With different scaling of the beam’s dimensions, the impact of the third mode becomes noticeable in a similar manner as the power of the first mode becomes greater.
Therefore, in the search for the triplet (beam length, width, and taper ratio) related to high powers at low frequencies, we first constructed an ANN capable of predicting the vector of values related to the frequency and output power related to the first resonant mode of the linearly tapered multimode bimorph cantilever-based PVEH. The primary aim of the ANN was to ensure the proper trend in the search for the optimal structure and not to replace the numerical experiments per se.
3.1. ANN Capable of Predicting Frequency and Power of the First Resonant Mode
Since the ANN is used for fitting the exemplary data in order to provide a function that can predict the frequency and power related to the first resonant mode of a linearly tapered multimode bimorph cantilever-based PVEH, based on the beam length, the width at the anchor, and the taper ratio, the structure of the ANN is such that it has three inputs (related to the cantilever size) and two outputs (related to desired function output). As shown in
Figure 12, there is a hidden layer with 50 neurons between the ANN input and output layer.
Every segment in the design of this network directly affects the results. After an intense search through numerous variants of the basic structure, the final one was chosen. In the final structure, the inputs were scaled so that their length and width were normalized, divided by 100, and thus, they did not differ from the taper ratio for more than an order of magnitude. The number of neurons in the hidden layer was 50. In the hidden layer, a sigmoid transfer function (hyperbolic tangent) was used, and the output layer computed the linear combination of the outputs of the hidden layer. The raw data related to the output were conditioned so that the frequencies were normalized and divided by 100, and powers were represented by their inverse multiplied by 100. The reason for conditioning the raw output data is the scalarization of outputs that was performed later in the process of multiobjective optimization. We later constructed a new function based on the obtained two output ANN functions by summing their squared components so that the new function was a scalar whose minimum was of our interest.
The starting point in exploring the behavior of nonlinear regression in this multilayer perception with backpropagation was the Neural Net Fitting application provided in the MathWorks environment, where training algorithms based on Levenberg–Marquardt (LM) method, Bayesian regularization (BR) method, and scaled conjugate gradient (SCG) method are available. The codes resulting from using the Neural Net Fitting were then altered and augmented so that they would allow the use of training methods other than the three provided in the Neural Net Fitting application, and thus, they could be a part of the code developed for the optimization purposes in MATLAB or Octave environment.
Another decision that directly affects results is the arrangement of the data. Out of 124 examples, we used 99 to create the ANN fitting functions, and we used the remaining 25 examples stochastically excerpted from the set of 124 examples later to assess the generalization capabilities of ANN fitting functions. The final decomposition of the 99 examples into three categories was 70% for training (69 samples), 15% for validation (15 samples), and 15% for testing (15 samples).
One-attempt training and multiple training with different training methods result in different ANN fitting functions. The quality of the resulting ANN fitting functions is assessed using two figures of merit. One is the mean squared error (MSE), the discrepancy between the target (the true output provided to the ANN in the example used for supervised learning) and the output generated by the ANN itself. The closer the MSE is to zero, the better. Another figure of merit for the assessment of the quality of an ANN is the regression coefficient R, also called the coefficient of correlation because it is related to the correlation between the target
t and the ANN’s output
a.
R is related to the coefficient of determination,
R2 calculated by the following expression:
where
N is the number of examples in a dataset, and
is the arithmetic mean of the target values. The closer the
R is to one, the better.
Figure 13 shows the regression coefficient of the ANN fitting function obtained by applying the LM training algorithm. All regression coefficients are above 95.152%, which is considered a good result. Since the ANN fitting function generates output as a two-column vector, the correlation between the targets and the ANN outputs is not computed automatically for any of the two outputs. We analyze separate outputs later by assessing the capability of the ANN fitting function to give a good, never previously achieved result for the new data.
Figure 14 shows the regression coefficient of the ANN fitting function obtained by applying the SCG training algorithm. The related regression coefficients are even better, all exceeding 95.468%.
Table 3 shows the related MSE for these two ANN fitting functions. In terms of MSE, the LM training method proved itself superior over other training methods since its MSE is better in predicting the frequency and power related to the first resonant mode than that of the SCG training method. For predicting the (normalized) frequency of the resonant mode, its MSE is 3.8398 × 10
−4, an order of magnitude lower than the MSE of the ANN fitting function obtained by applying the SCG training method. If an ANN finds a complex surface that connects all the examples, it has been fed with, then the training error may happen to be zero, but it is not certain that the ANN, although fitting the training data perfectly, can be used as a good predictive model. Thus, we tested the ANN by using the data never presented to the ANN before.
In terms of its capability for generalization, the ANN fitting function obtained by applying the LM training method outperforms the ANN fitting function obtained by applying the SCG training method as shown in
Figure 15, where the correlation between the target data and the data generated by the ANN fitting functions is calculated for the new data, entirely unknown to the ANN.
However, the ANN fitting functions themselves, although they can serve for reverse calculations of the frequency and power related to the first resonance mode of a linearly tapered multimode bimorph cantilever with segmented PZT-5H patches, are here just an intermediary result. The tool that we need aims to deliver the optimal dimensions of a cantilever beam with respect to PVEH applications. As we describe later, we integrate the obtained ANN fitting functions in the optimization algorithms to achieve that.
Since the number of neurons in the hidden layer is high (50), the expressions for obtained functions are not given here in the analytical form but are available upon request.
3.2. Optimization: Goal Attainment Method and Genetic Algorithm
Our goal is simultaneous minimization of the resonant frequency and maximization of the output power. Frequency and power form a vector of objective functions. Hence, there is no unique solution to this optimization problem, but a set of solutions related to the tradeoff between the competing objectives [
31]. We perform the multiobjective optimization or perform scalarization of the output before searching for the minimum of the scalarized function. In both cases, we need to define the parameter space, the domain in which we seek the solution. All dimensions are positive; thus, the lower bound for the length, the width, and the taper ratio are zero. The upper bound for the taper ratio is one. As for the upper bounds of the beam’s length and width, they are application specific. Here, we used values up to 150–200 mm (the scaled value is equal to 2) as the upper bound for the length of the cantilever and the same values for its width.
As shown in
Figure 5, apart from the cantilever dimensions, the load resistance can also be optimized with respect to the resonant frequencies and the output power. The optimal value of the load resistance varies with the geometry and the vibration modes. The lowest value of the optimum load resistance occurring for all the geometry and vibration modes of the structures under consideration is at the third mode of vibration with 2.7 kΩ. Since PVEH is segmented at strain nodes of third vibration modes to optimize the performance at higher (second and third) modes (especially the third mode), we considered the abovementioned optimum load of 2.7 kΩ to reduce the data computation time, and performed optimization seeking the optimal triplet of parameters related to the cantilever beam length, the width at the proximal end, and the taper ratio.
We first performed the scalarization of the objectives. Both ANNs (the one trained with the LM method and the one trained with the SCG method) are trained to predict the normalized resonant frequency and the normalized reciprocal power related to the first resonant mode. The sum of their squares is the function we aim to minimize. We performed the minimization in two ways—by applying the goal attainment method and by integrating each ANN with a code that implements the genetic algorithm.
The optimization algorithm related to the goal attainment method starts with defining the starting values for optimal parameters that we seek. In our case, those are the geometrical parameters (the beam length, width, and taper ratio). The goal refers to the output, i.e., the function we want to achieve. Although the MathWorks MATLAB statement
fgoalattain allows for the use of vector functions, and therefore, we can define separate goals for the frequency and power (we can even have them weighted with different weights), we opted for the optimization of the scalarized function obtained by postprocessing of the fitting function generated by the artificial neural network. If
are ANN output functions (frequency and power) used as optimization objectives, and
are the goal functions, the goal attainment method aims to find
x to minimize the maximum of
where
wi denotes a set of positive weights.
The figure of merit of this optimization, as provided by the MathWorks MATLAB toolbox, is the attainfactor, a value related to the percentage of the objectives that may be overachieved (in which case the attainfactor is negative) or underachieved (in which case the attainfactor is positive). The closer this figure of merit is to zero, the better the optimization results will be.
The optimization algorithm related to the genetic algorithm, on the other hand, does not have a starting point related to the set of parameters that we seek; it starts instead from the whole parameter space. In our case, we allowed the length and the width at the anchor to spread from 0.1 mm to 160 mm, while the taper ratio varied from 0.1 to 1. The function is evaluated for all the triplets in the parameter space. Analogously to the biological evolution, in the genetic algorithm method, in every iteration, the selection is based on previous reproductions, crossovers, or mutations. These selections stochastically navigate the search [
31]. The great advantage here is the ability to find global extrema rather than to stick to some of the local ones. The number of iterations is not crucial for finding an extremum, but the population size is the factor that has a great impact on the success of the genetic algorithm. The greater the population size is, the smoother the road towards the global extremum. The number of iterations that we used was 40, and the population size we chose was up to 1000.
Both optimization methods—the goal attainment method and the genetic algorithm—allow for setting lower and upper bounds for the optimal values we seek. Our bounds were the same in both methods. They were also equal to the edges of the parameter space defined for the genetic algorithm (the lower bound for all three parameters was 0.1, the upper bound for the beam length, and its width at the anchor was 160 mm).