Design Optimization of Electrodynamic Structure of Permanent Magnet Piston Mechanical Electric Engine

: To meet the demand of multiple power requirements, and enhance power utilization, a new type of dual-element electricity unit is designed in this study, which is a permanent magnet piston mechanical electric engine. Based on the analysis method of traditional internal combustion engines and linear generators, the working principle of the engine and the magnetic field distribution in the electrodynamic structure are analyzed, the machine dynamics model and electrodynamics model of the engine are established, then the theoretical evaluation is additionally established using finite elements. Based on this, an optimization model is constructed with the electrodynamic shape dimension as the optimization variable, with the intention of growing the output power. The optimization of the engine electrodynamic shape is executed via the use of the finite aspect approach and the NLPQL optimization algorithm integrated. The results show that the optimized engine output electricity expanded to 8.40 w, which is 18.81% greater than before optimization. An experimental prototype is developed, and the output voltage of the prototype is measured to verify the precept and overall performance of the new structure.


Research Motivation
With the ongoing improvement of the financial system and the extensive promotion of new electricity sources, strength conservation and environmental safety have ended up as focal points of interest worldwide. Efforts to successfully enhance ecological air pollution and power shortage from the issue of strength acquisition include the use of renewable electricity and enhanced new renewable power sources, and improving energy efficiency to boost new electricity units. In recent years, mechanical-electrical energy mixing science has acquired a lot of interest as a new configuration.

Literature Review
In the exploration of new energy sources and the development of new power devices, domestic and foreign enterprises and research institutions have done a lot of work [1][2][3][4][5][6]. The research on linear motor systems is worthy of attention. With the advantages of high power density, high system efficiency, and high positioning accuracy, permanent magnet linear synchronous motors are ideal for high-precision applications. Abdollahi et al. [7] designed a double-sided linear induction motor for transportation (LIM). The analytical results of the designed motor were evaluated using the two-dimensional finite element method. The flux density distribution exhibits a lower magnetic load, reduced core losses, and improved efficiency. Baatar N et al. [8] proposed a new nine-bar 10-slot permanent magnet synchronous motor structure. Through theoretical analysis and finite element analysis, it was demonstrated that the proposed structure can eliminate most of the tooth slot forces. Combined with the response surface method of multi-quadratic radial basis functions, the length of the core and outer tooth shape were simultaneously optimized, thereby achieving the goal of reducing the braking force. In addition, the simulation results verified the experimental measurements for the proposed structure.
The free-piston generator as a new power device has been widely studied and compared with the traditional internal combustion engine and has the advantages of simple structure and high efficiency. Cawthorne et al. [9] designed a new type of power generation system, which was composed of a linear crankless internal combustion engine and a linear alternator. The results show an effective improvement in energy efficiency. Zheng et al. [10] analyzed and studied a free-piston energy converter, which consisted of a freepiston engine and a permanent magnet (PM) linear mechanism. That study used the finite element method to optimize the parameters of the converter, and this method effectively reduced the cogging force and thrust fluctuation of the converter. Goto et al. [11] developed a single-cylinder free-piston generator system, which achieved piston return using a gas spring. They also investigated the effect of ignition position on the system operating condition, and explored numerous factors leading to the misfire condition of the system. To thoroughly study the motion characteristics of a single-piston free-piston expanderlinear generator (FPE-LG), Zhang et al. [12] proposed an FPE-LG that could be used in a small organic Rankine cycle (ORC) waste heat recovery system, and a single-piston FPE-LG test bench was built, which verified the feasibility of the working principle of the single-piston FPE-LG.
Qingdao University was the first to start exploring the coupling of linear motors with conventional internal combustion engines, proposing a single-bar electric power confined piston engine (ECPE). The engine completed the work by increasing the length of the connecting rod, and the reciprocating piston converted the heat energy generated by the combustion of fuel into electrical output. The results show a great improvement the efficiency of thermoelectric conversion. Gou et al. [13] described the working principle of the ECPE, and they performed modeling analysis to establish the dynamics model of the system, which laid the foundation for the following analysis of the operational qualities such as the simulation stability and coordination of the ECPE. Zhang et al. [14,15] conducted a theoretical and experimental study of the no-load characteristics of the ECPE and calculated the no-load electric potential curve of the motor by the analytical method and the finite element method. The results show that the engine can produce sinusoidal electricity in the same way as the conventional engine-generator system, and the experimental results verified the theoretical simulation results.
To improve the performance of engines, while taking the economy into account, and to improve existing generators with disadvantages such as low power density and low utilization of ferromagnetic materials, various research methods are used to optimize generators globally. Zang et al. [16] established a numerical simulation model of the linear motor/engine system to analyze the potential disturbance factors in the steady-state operation stage of the system, ensuring that the system works rapidly and efficiently. Deb et al. [17] used the design of experiments method to optimize the separation of a new fluxswitched transverse flux-tube linear motor, optimizing the cross-sectional part of the motor to achieve optimal structural dimensions. Fu et al. [18] proposed a new multi-objective optimization method for a modular linear permanent magnet vernier, achieving low disengagement force, high thrust force, and low force ripple. Zhao et al. [19] proposed an improved two-dimensional study that addressed the effect of the asymmetry problem on the electromagnetic characteristics of iron-free permanent magnet linear synchronous motors with non-overlapping windings. According to different mechanical analysis models, Xie et al. [20] optimized the end force generated in the open-circuit state of the permanent magnet synchronous motor. However, due to the complexity of traditional engines and linear motor structures, there are still many difficulties in coordinating dual power units.

Challenges and Problems
Significant progress has been made in mechanical-energy hybrid technology. Nevertheless, the development of mechatronics technology still faces some challenges and problems that cannot be ignored. First, finding a way to couple the two devices and effectively output electrical and mechanical energy without changing the scope of the overall structure still remains a great challenge. Due to the complexity of the structure of conventional engines and linear motors, there are many difficulties in the process of integrated coupling. Most of the current power generators mainly rely on the free piston to output a single power, but the free piston engine has problems such as excessive size, integration difficulties, and an inability to output stable kinetic energy. Second, finding a way to reduce the losses in the device is also a problem that needs to be explored. Due to the complex geometry, high thrust fluctuation, and severe saturation of the dual element power engine, the internal losses are high, the energy utilization is low and the output of electric energy is low. In order to continuously expand its application fields to meet future demands, it is necessary to effectively reduce internal losses and improve output efficiency, in addition to increasing output electrical energy. Lastly, the existing optimization algorithms generally have inherent defects and limitations, and the effective determination of the optimal effective set relies heavily on the reasonable choice of the initial point, especially for solving nonlinear programming problems with multiple inequality constraints. Therefore, it is difficult for the traditional algorithms to effectively optimize the motor structure to improve its electromagnetic performance.

Contributions of This Work
Based on this, a new type of engine is proposed in this paper: a permanent magnet piston mechanical and electric engine (PMPMEE). This paper attempts to make three original contributions and improvements to the current research, as shown in the following: (1) The PMPMEE adopts the principle of reciprocating linear motion of the piston for machine-to-electric energy conversion, which couples a traditional internal combustion engine with a linear motor into a single unit to attain mechanical and electrical energy output without changing the engine size. This overcomes the problems of the existing piston internal combustion generator set electricity mixture electricity era, such as an unreasonable regular device, uncoordinated work, low conversion and transfer efficiency, power waste, etc. (2) Based on its structural principle, and the established gadget electricity demand model and electrodynamic model of the engine, the theoretical groundwork for subsequent research is given. (3) The rational design of the electrodynamic structure of the PMPMEE has a significant impact on the electric power output. In order to effectively reduce the internal electric power loss and improve the output power, an optimization model is established with the output power as the optimization target to optimize the design of the electrodynamic structure size of the engine, and the optimal structural dimensions are obtained. (4) Based on the optimization method integrated with finite element simulation and ISIGHT software, the NLPQL algorithm is used to analyze and optimize the electrodynamic structure of the engine. The optimization algorithm applies to nonlinear programming problems with multiple inequality constraints, and effectively avoids the disadvantage of the optimal set, and validates the validity of the optimization results by way of experiments

Organization of the Paper
The rest of this paper is organized as follows. Section 2 describes the working principle of the PMPMEE. Section 3 establishes the mathematical model of PMPMEE. Section 4 performs finite element analysis on the constructed 3D simulation model. Section 5 combines ANSOFT Maxwell software and ISIGHT software to optimize the electrodynamic structure dimensions. Section 6 designs the experiments based on the optimization results. Section 7 summarizes the research of this paper.

Structure and Principle of PMPMEE
This paper shows the design of a new electric engine that converts the thermal strength generated through gas combustion into both mechanical power and electric powered energy. This paper also provides a linear electrodynamic shape to the usual piston inner combustion engine [21][22][23][24], consisting of a kinetic and stator assembly, and its major issue dimensions, as shown in Table 1. The engine output mechanical electricity elements are equal to the regular piston inside a combustion engine, and the principal distinction is the addition of the linear electrodynamic structure. The linear electrodynamic shape, broadly speaking, consists of the kinetic and stator structures: the kinematic shape is positioned at the skirt of the piston, mostly composed of sector-shaped everlasting magnets, accompanying the up and down motion of the piston. The stator meeting is located in the cylinder wall, commonly consisting of the stator core and solenoid coil. The stator core is made of pressed silicon metal sheet, and the solenoid coil is divided into two turns embedded in the stator core. The more the winding is turned, the higher the induced voltage generated by the magnetic lines of force cut by the electromagnetic coil with the reciprocating motion of the piston. Based on the above parameters modeled in the 3D software [25,26], the isometric side view and half section view of the 3D model of the PMPMEE were obtained, as shown in Figure 1. When the PMPMEE is in regular operation, it uses the thermal energy generated in the combustion chamber to drive the reciprocating motion of the piston, which in turn directly drives the linear electric power structure to output electrical energy. The cranklink mechanism constrains the movement of the piston-permanent magnet assembly and operates the subsidiary system to work, thus timing the work of the whole system. As the permanent magnet follows the reciprocating movement of the piston, it causes the magnetic flux inside the coil winding to change, thus generating the induced electric potential and outputting the electric power externally. When the engine is in the work stroke, the crankshaft accelerates the rotation, and the flywheel reserves energy. When the engine is in the exhaust stroke, suction stroke, and compression stroke, the flywheel releases energy, which makes the crankshaft rotate continuously. At the same time, the end of the crankshaft is connected to the external load, and the engine outputs mechanical energy to the outside. When the engine works, it can convert the heat energy generated by fuel combustion into mechanical energy or electrical energy output alone, and also convert mechanical energy and electrical energy output simultaneously.
When the engine converts the heat energy generated by fuel combustion into mechanical energy output alone, in the work stroke, the fuel burns in the combustion chamber above the piston, producing a high-pressure mixture of gases, which pushes the crank connecting rod movement. At the same time, the energy stored in the flywheel causes the crankshaft to rotate continuously, outputting the speed and torque from the crankshaft end to the outside. At this time, the output terminal is disconnected from the load, and no electrical power is output.
When the engine converts the heat energy generated by fuel combustion into electrical energy output alone, the engine is in the working stroke. At this time, the output terminal is connected to the load, and outputs electrical energy. Because the crankshaft end is disconnected from the external load, there is no external speed and torque output.
When the engine converts the heat energy generated by fuel combustion into mechanical energy and electrical power simultaneously, the output terminal is connected to the load during the work stroke. At this time, the engine outputs electrical energy externally. Meanwhile, the flywheel releases energy in the exhaust stroke, suction stroke, and compression stroke, which makes the crankshaft rotate continuously, and outputs the speed and torque from the crankshaft terminal to the outside.

System Dynamics Model
According to the kinetic evaluation approach of traditional inside combustion engines [27], the force analysis of the kinetic subassembly of the PMPMEE conducted by simplifying the structure of the cylinder, crankshaft, and connecting rod, as well as the force evaluation graph under the work stroke, are shown in Figure 2. Since the PMPMEE does not modify the structural dimensions of the conventional internal combustion engine, such as the connecting rod length, crank radius, and piston stroke, the piston displacement, piston velocity, and piston acceleration are the same. Therefore, without considering the crankshaft eccentricity, the piston displacement x is expressed as: where r is the crank radius, l is the connecting rod length, λ = r/l is the crank connecting rod. φ is the crankshaft turning angle, and the starting position is the upper stop point of the work stroke.
Taking the first and second order derivatives of x, the velocity and acceleration of the piston are obtained as: where ω is the angular velocity of the crankshaft. α is the angular acceleration of the crankshaft.
Based on the force analysis of the traditional internal combustion engine, the analysis of the force of PMPMEE is developed. When the piston for reciprocating motion is active, the coil winding connected to the load will generate electromagnetic force, the force balance equation is expressed as follows: where Fa is the thrust force of gas combustion acting on the piston. Fj is the reciprocating inertia force. Fe is the electromagnetic force on the kinetic subassembly. Fμ is the friction force between the piston ring and the cylinder liner. Fs is the piston force.
The variation of piston displacement and velocity with time at the rated speed is shown in Figure 3a. Taking the upper stop of the piston as the starting point and the downward movement in the positive direction, the internal combustion engine goes through four strokes of work, exhaust, intake, and compression in turn. With the non-stop exchange of piston displacement, its speed adjustments act as a sinusoidal function, which lays the basis for the subsequent electrodynamic structural analysis. When the throttle opening is one hundred percent and the rated pace has been reached (nr = 3600 r/min), the modifications of the in-cylinder fuel combustion strain and the thrust pressure performing on the piston with time are proven, as can be seen in Figure 3b. As can be considered from the graph, the engine's strain decreases sharply throughout the work stroke. It begins to upwardly jab throughout the compression stroke, equal to the strain curve of a traditional piston interior combustion engine.  The torque generated by the crankshaft is used to overcome the resistance torque of the external mechanical load at the crankshaft end, the friction torque generated by the connecting rod to the crankpin, and the friction torque generated by the bearing to the main shaft. Finally, the mechanical power is output. The output torque can be expressed as follows: where Tm is the resistance torque of the external mechanical load, Tfri is the friction torque generated by the connecting rod to the crank pin, Tfbi is the friction torque generated by the bearing to the spindle.

Electrodynamic Model
The PMPMEE adopts the structure and working principle of a linear generator. When the engine is working normally, the thermal energy generated by combustion pushes the kinetic assembly to do a linear reciprocating motion. At this time, the linear electric power structure of the engine works in the power generation state. According to Faraday's law of electromagnetic induction [28][29][30], the induced electric potential is generated as follows: where ψ is the single-phase fundamental magnetic chain, Φ is the per-pole flux function, N is the total number of turns of the single-phase coil. According to the displacement and velocity equations, the electric angle position function and electric angle frequency function are: e e π 2π 2 π 2π 2 where τ is the pole pitch of the permanent magnet, which according to the basic equation of linear motor, can also be expressed as: where vT is the average velocity per unit cycle, xT is the displacement per unit cycle, s is the stroke of the piston (xT = 2s = 0.09 m), T is the engine crankshaft rotation time of two weeks, T = 2π/ω, f is the electromagnetic frequency, f = fv.
Assuming that the magnetic flux function Φ per pole is: where Φm is the magnitude of magnetic flux per pole. Therefore, the induced electric potential can be expressed again as: [ cos( )] sin( ) In the different working strokes of the engine, the energy generated by fuel combustion drives the movement of the crank connecting rod, which in turn drives the electrodynamic structure to work so that the linear electrodynamic mechanism generates induced electric potential. In addition to losses, the remaining output electrical power is available for external use, as shown in Figure 4. The equivalent circuit diagram of the engine linear electrodynamic structure can be represented by a simplified circuit of RLC, where e is the induced electric potential generated by the coil winding, R0 is the value of internal resistance in the coil winding, L is the value of inductance in the circuit, C is the value of capacitance in the circuit, R is the value of resistance of the external load. According to Kirchhoff's voltage law, we can obtain: When the external load of the linear motor is pure resistance, then C = 0, L is the inductance of the coil winding, and the induced current can be obtained according to the equivalent circuit as follows: The input power of the engine linear electrodynamic structure is expressed as:  P ei (13) The copper loss of the engine linear electrodynamic structure is expressed as: The core losses in the electrodynamic structure part of the PMPMEE include hysteresis losses and eddy current losses, the magnitude of which is closely related to the core material, frequency, and magnetic flux density.
The core loss of the linear electrodynamic structure part of the PMPMEE includes hysteresis loss (Ph) and eddy current loss (Pec), whose magnitude is closely related to the core material, frequency, and magnetic flux density: where Kh is the hysteresis loss coefficient, from the B-H curve to take the value of 155 W·s/(T 2 ·m 3 ), Bm is the magnetic density, σ is the core material conductivity, take the value of 8000 S/m, q is the core laminations thickness, take the value of 0.25 mm. The total loss of the engine electrodynamic structure is: c cu Fe P P P   (16) The output power of the engine linear power structure is expressed as: out c P P P   (17)

Finite Element Simulation Analysis
Based on the finite element evaluation software ANSOFT Maxwell, a 3D modeling simulation of the PMPMEE was carried out to analyze the electrodynamic characteristics of this engine at rated operating conditions [31]. According to the established system dynamics model and electrodynamics model of the moving sub-component, the finite element modeling and programming function of Maxwell 3D software was used to simulate and analyze the no-load state and load state of the linear electro-dynamic structure underrated working conditions.

No-Load Characteristics Analysis
Since the PMPMEE has a pair of permanent magnets with asymmetrical structure, a three-dimensional coordinate system for modeling and analysis was selected, and a 3D finite element model was created in ANSYS Maxwell software, as shown in Figure 5a, and the model was simulated and analyzed [32][33][34]. Because the model is mainly used for the simulation analysis of electrodynamic structures, the model simplified the traditional internal combustion engine structure and omitted mechanical structures such as connecting rods and crankshafts, which greatly reduced the simulation speed without affecting the calculation results. Under the normal operation of the engine, the piston-permanent magnet kinematic assembly makes a linear reciprocating motion, and the inner region is established in the 3D transient field model of Maxwell 3D with the kinematic assembly inside, the stator outside, and the boundary in the middle of the air gap. The simulation results were obtained by applying a force to the inner region to push the kinematic assembly to move. The simulation results were obtained by applying a force to the inner region to push the kinematic assembly, which made the piston motion pattern the same as that of the engine in the actual running process. Figure 5b shows the magnetic density clouds of the kinetic in motion to four special positions, including: bottom dead center; middle of the winding; upper edge of winding; and top dead center. The four positions are within the upper and lower stops of the piston, in other words, within one electrical cycle. The left side of the graph shows the magnetic density values of different colors, from top to bottom, and the right side of the graph shows the magnetic density of the engine electrodynamic structure at other positions. As can be seen from the figure, the no-load magnetic field of PMPMEE is similar to the magnetic field distribution of a cylindrical linear motor, and the magnetic lines of force are distributed very regularly. Since the relative permeability of the primary stator, air gap, and secondary kinematic of the engine are different, the magnetic lines of force almost always pass through the stator core. When the permanent magnets cross in the coil winding area, the flux density is evenly distributed, which makes the effective cutting of the magnetic lines of force in the winding sufficient. At the same time, the silicon metal sheet cores under different positions of the permanent magnets have not reached saturation, which meets the design requirements. The electromagnetism of the created 3D simulation model was simulated and analyzed [35][36][37], and the operation law of the linear electrodynamic structure at no-load condition underrated working conditions were obtained, as shown in Figure 6. The air gap magnetic density was calculated by the field calculator, and the air gap magnetic density curves of the permanent magnets at different positions were obtained, as shown in Figure  6a. As can be seen from the figure, the air gap magnetic density of the permanent magnet under this design is more significant in the place of the coil winding than in size above the coil winding. The magnetic chain is related to the magnetic flux density, taking the direction perpendicular through the coil winding, pointing to the permanent magnet as positive, as can be seen from Figure 6b. As the kinematic meeting strikes from the upper stop point to the lower stop point, the absolute value of the magnetic chain shows a trend of increasing and then decreasing. As the kinematic meeting strikes from the upper stop to the lower stop, the speed increases and then decreases, and the absolute value of the induced electric potential (the rate of change of the magnetic chain) indicates a trend of increasing and then decreasing. When the kinematic assembly reaches the position near the maximum speed, the rate of change of magnetic chain reaches the maximum, and the precipitated electric-powered practicable comes to a magnificent value, as shown in Figure 6c.

Load Characteristics Analysis
The load characteristics of the engine electrodynamic structure were simulated and analyzed by an external 5 Ω and 10 Ω load circuit, and the simulation results are shown in Figure 7. As shown in Figure 7, the trends of load current and voltage modifications are the same, expressed approximately as a sinusoidal function, similar to the direction of conventional linear generator current changes. The value of the same dependent variable is different when connected to different loads. This is because when the load changes, the armature reaction in the linear electrodynamic structure also changes, which first affects the distribution of air gap magnetic density. As the load increases, the harmonic content of air gap magnetic density increases, which will increase the core loss in the motor and decrease the output current. Therefore, when the engine is connected to the different loads, the magnetic density of different regions varies with time, which will have an effect on the output current, output voltage, and electric powered electricity of the engine. After comparative analysis, the measurement of the linear electrodynamic shape is optimized by way of choosing a constant 5 Ω resistor in the later optimization process.
The calculated results of current, voltage and electric power obtained under load condition are shown in Table 2.

Optimization and Validation
ISIGHT is an automated simulation and multi-disciplinary multi-objective optimization tool that provides a visual simulation operating platform with a dedicated interface to a wide range of CAE analysis software to quickly and easily create complex simulation analysis flows, set and modify independent variables and design target-dependent variables, and automatically perform multiple analysis cycles [38,39]. The optimization module can do structural and dimensional optimization analysis, and this module is rich in various optimization analysis algorithms. Its sim code module is an efficient module with a variety of experimental design methods to meet the design needs of most engineers. Our optimization analysis uses ISIGHT software integrated with ANSOFT Maxwell to create a dimensional optimization analysis loop, and the NLPQL algorithm is used to optimize the target [40][41][42], and the entire flow of the analysis is shown in Figure 8.

Design Optimization Model
The 3D finite element model of the electrodynamic structure under the ISIGHT optimization design framework integrated with ANSOFT Maxwell, and the design optimization, are achieved by building the optimization model through the sim code component and optimization component in ISIGHT. The design method does not require repeated finite element simulation calculations, which significantly reduces the calculation time, and the optimization results prove the method's effectiveness.
To find the optimal global solution of the optimization objective, the nonlinear sequential quadratic programming (NLPQL) algorithm is used to iteratively find the optimal combination of parameters that can maximize the engine output power. The algorithm applies a quadratic Taylor series to expand the objective function and linearize the constraints, transforming the original nonlinear problem into a quadratic programming problem [43,44].
where d is the search direction; Bk is the Newton-like matrix; f (x) is the objective function; ▽f (x) is the gradient of the objective function; gj (x) is the constraint function; ▽gj (x) is the gradient of the constraint function; xl is the lower bound of the boundary constraint; xu is the upper bound of the boundary constraint; j is a variable.
(1) Optimization objectives The PMPMEE studied in this paper can output mechanical and electrical energy according to the power demand, where the electrical power output is to be improved. Therefore, the optimization design objective of this paper is to optimize each dimensional parameter of the electrodynamic structure under the fixed external volume dimension parameter so that the output power of the engine electrodynamic structure can be maximized.
(2) Design variables The electrodynamic structure is an integral part of the output electrical energy, which significantly influences the electromagnetic performance of the engine. The electrodynamic structure is mainly composed of the kinetic assembly and the stator assembly. The size of the permanent magnet is the critical parameter for the design of the electrodynamic structure. As the permanent magnet volume increases, the power density of the engine electrodynamic structure increases.
Still, the growth of permanent magnet axial length is equivalent to the rise of substantial volume, which leads to more power loss of the permanent magnet because of the eddy current loss effect. As such, the permanent magnet size is chosen as the optimization variable. Its parametric structure is shown in Figure 9a. x1 is the kinetic permanent magnet height, x2 is the radial length, and x3 is the permanent magnet wrap angle. For the PMP-MEE with a core, the primary body needs to be slotted into the coil. A smaller slot height increases the stator slot leakage, thus reducing the output power of the electrodynamic structure. In addition, a smaller number of stator slots can obtain a higher force density. Therefore, the stator slot size is a sensitive parameter and needs to be designed optimally. Figure 9b shows the dimensional structure of the stator core, x4 is the stator slot height, and x5 is the stator slot radial width. In summary, the design variables are taken as: (

3) Constraints
According to the structural allowances, the variables take the values as:

Optimization Results
During the optimization iteration, multiple optimization variables have different effects on the optimization objective. As shown in Figure 10, there is a relationship between each variable and the output power: the darker the color, the greater the influence during the iterative process. From Figure 10a, the red module is biased at the maximum value of variable x1, and the output power gradually increases as variable x1 increases, but the output power does not change significantly as variable x2 increases. Thus, it can be seen that the axial length of the permanent magnet has more impact on the target value than the radial length. From Figure 10b, the red module is located at the diagonal, and the output power increases with increasing variables x1 and x3. Thus, it can be seen that both the axial length and radius of the permanent magnet have a more significant influence on the target value. From Figure 10c, the red module is biased at the maximum value of variable x3, and the output power gradually increases as variable x3 gradually increases, but the output power does not change significantly as variable x2 increases. Thus, it can be seen that the radius of the permanent magnet has a greater influence on the target value than the radial length. From Figure 10d, the red module is biased at the maximum value of variable x4, and the output power gradually increases as variable x4 gradually increases, but the output power does not change significantly as variable x5 increases. Thus, it can be seen that the stator slot height has a more significant influence on the target value than the stator slot width. Therefore, in the later optimization process, the axial length and radiality values of the permanent magnet and the stator slot width are sensitive parameters that have a greater impact on the output power of the linear electrodynamic structure, and are given priority consideration. This consideration is not only beneficial to improving the output power of the engine, but can also relatively simplify the optimization process of the linear electrodynamic structure, and lay the foundation for the later design of the prototype structure dimensions. As the number of iterations increases, the optimization results gradually converge, and finally the optimal solution is selected from the solution set. Figure 11 shows the iteration of the objective optimization function and the final design variables. x1 = 6.24 mm, x2 = 20.56 mm, x3 = 28.95 mm, x4 = 4.53 mm, and x5 = 37.3 mm are selected after the global optimization search. After optimization, the output power increases from 7.07 w before optimization to 8.40 w, 18.8% higher than before optimization. Figure 11. Output power optimization iterative process.

Prototype Test
The PMPMEE is based totally on the structural precept of the regular internals inside engines and linear generators, modified from a 168 F fuel engine. To confirm the feasibility of the optimization results in this paper, the main components were designed, processed, and assembled according to the designed engineering diagrams of the kinetic and stator assemblies and the structural parameters received after optimization. The test prototype and primary components are shown in Figure 12. The characteristics of the devices used in the experiment are shown in Table 3. To ensure the experimental safety and ideal speed conditions, only the electrical performance of the PMPMEE was studied. To ensure the engine was not ignited, the coupling was used to connect an electric motor to the crankshaft end of the machine and clamped on a T-shaped table, and the motor was connected to a frequency converter to control the speed, to guarantee that the crankshaft end of the machine was fixed at the same speed rotation. During the experiment, the motor was started and the motor frequency was adjusted to 10 Hz through the frequency converter to realize the reciprocating motion of the crank connecting rod moving up and down, thus driving the permanent magnet motion of the actuator, cutting the magnetic induction line, and generating electromotive force. Two wiring terminals of the coil winding were connected to a pure resistance of 5 Ω. At this time, the engine outputs electrical energy externally. The voltage signal from the test was measured by an oscilloscope. By adjusting the frequency in finite element simulation to be consistent with the actual operating frequency, the results were compared with the prototype test results, as shown in Figure 12. The crank connecting rod mechanism drives the permanent magnet to make the linear reciprocating motion in the cylinder liner during the engine operation. The coil winding cuts the magnetic induction line to generate electrical energy. The load voltage signal data of the test prototype of the permanent magnet piston mechanical-electric engine was obtained through the oscilloscope and compared with the data obtained from the simulation. As can be seen from the figure, the test curve is similar to the simulation curve, where the peak value of the simulation data is 1.23 V. The peak value of the test data is 1.18 V, with an error of less than 10%, which is due to the deviation in size and position of the test prototype in the manufacturing process and installation process. Vibration and other effects during test operation caused the test data to be relatively small, however, the trend is nearly the same as the simulation results, which verifies the accuracy of the finite element simulation model of the PMPMEE and the feasibility of the structural principle. The test provides a theoretical model basis for the subsequent research.

Conclusions
This paper proposes a new dual-element power engine-PMPMEE, derived from a traditional internal combustion engine and linear electric motor, which can output mechanical and electric energy externally according to the actual demand to meet multiple power requirements. To effectively improve the electromagnetic performance of this engine, the study applied the finite element integrated optimization method to optimize and design the electrodynamic structure, thus, achieving the purpose of improving the output electric power of the electrodynamic structure.
(1) Based on the three-dimensional model, the study analyzed its working principle, established the system dynamics model and electrodynamic model, and derived the electrodynamic structure power expression to provide the theoretical basis for subsequent optimization studies. (2) The basic characteristics of the engine electrodynamic structure were investigated by using ANSOFT Maxwell software with a simplified 3D finite element model. Finite elements verified the theoretical analysis, and the magnetic chain, counter potential, output current, voltage, and power waveforms of the electrodynamic structure were obtained. The no-load and load characteristic laws of the electrodynamic structure were further analyzed. (3) An optimization method integrating finite element and NLPQL optimization algorithms is proposed, which effectively improves the output power of the electrodynamic structure of the PMPMEE. The output power of the electrodynamic part of the engine is increased to 8.40 w after optimization, which is 18.81% higher than that before optimization. The electromagnetic performance of the engine is improved effectively, verifying the effectiveness of the optimization method. Institutional Review Board Statement: Not applicable.
Informed Consent Statement: Not applicable.
Data Availability Statement: Not applicable.

Conflicts of Interest:
The authors declare no conflict of interest.

Nomenclature r
The crank radius l The connecting rod length λ The crank connecting rod φ The crankshaft turning angle ω The angular velocity of the crankshaft α The angular acceleration of the crankshaft Fa The thrust force of gas combustion acting on the piston Fj The reciprocating inertia force Fe The electromagnetic force on the kinetic subassembly Fμ The friction force between the piston ring and the cylinder liner Fs The piston force nr The rated speed Tm The resistance torque of the external mechanical load Tfri The friction torque generated by the connecting rod to the crank pin Tfbi The friction torque generated by the bearing to the spindle ψ The single-phase fundamental magnetic chain Φ The per-pole flux function N The total number of turns of the single-phase coil τ The pole pitch of the permanent magnet vT The average velocity per unit cycle xT The displacement per unit cycle s The stroke of the piston vT The average velocity per unit cycle xT The displacement per unit cycle s The stroke of the piston T The engine crankshaft rotation time of two weeks f The electromagnetic frequency Φm The magnitude of magnetic flux per pole Ph The hysteresis loss Pec The eddy current loss Kh The hysteresis loss coefficient Bm The magnetic density σ The core material conductivity C The capacitance R The resistance L The inductors d The search direction Bk The Newton-like matrix f (x) The objective function ▽f (x) The gradient of the objective function gj(x) The constraint function ▽gj (x) The gradient of the constraint function xu The upper bound of the boundary constraint j The variable Abbreviations PMPMEE Permanent magnet piston mechanical electric engine FPE-LG Free piston expander-linear generator ORC Organic Rankine cycle CAE Computer aided engineering ECPE Electric power confined piston engine