1. Introduction
The increasing demand for energy-efficient and environmentally friendly transportation has accelerated research into advanced electric propulsion systems, with permanent magnet synchronous motors emerging as a key technology in light electric vehicles such as e-bikes and scooters [
1,
2,
3]. PMSM motors offer superior efficiency, compactness, high torque-to-weight ratio, and reduced maintenance compared to traditional brushed machines and synchronous reluctance machines [
4,
5,
6,
7,
8,
9], making them ideal for sustainable mobility applications. Among the inherited drawbacks of a PMSM is the torque ripple elevated by the winding type, slot/pole combination, and design choices [
4,
5,
6,
10,
11]. Accurate prediction of motor performance parameters such as back-EMF, torque constant, and inductance often relies on finite element method (FEM) analysis, which has become a standard tool for electromagnetic field evaluation in permanent magnet machines [
11,
12].
Given the wide range of strategies in which an electrical propulsion system designing process is approached, optimization frameworks and algorithms have been wildly used in electric machine design, parameter identification [
13,
14,
15,
16,
17], topology [
4,
18], and control optimization. Multi-objective formulations of FEM-based topology optimizations have proven essential in capturing trade-offs [
13,
18,
19], maximizing average torque and efficiency while minimizing torque ripple. FEM evaluation provides accurate insights into flux distributions, torque ripple, and losses, yet each evaluation is time consuming compared to analytical models, which are less accurate in return. This significantly reduces the number of FEM evaluations needed for the optimization algorithms to converge [
4,
18,
20].
In recent years, artificial intelligence (AI) has emerged as a transformative enabler in electric motor optimization. AI-assisted methods combine surrogate models or machine learning with evolutionary or Bayesian optimization to accelerate FEM-based design optimization [
20,
21]. Unlike purely heuristic algorithms, AI-driven frameworks can learn correlations from prior simulations to predict performance trends and guide exploration toward promising design regions [
20,
21]. This reduces computational expenses and enables the discovery of novel topologies that may not arise through conventional search processes.
More recently, large language models (LLMs) have been increasingly investigated as decision-making components for experimental design and Bayesian optimization, providing a natural language interface for encoding expert knowledge, guiding exploration policies, and improving sample efficiency. Recent work has evaluated the practical effectiveness and limitations of LLM-driven experimental design in scientific domains [
22]. In parallel, LLM-guided Bayesian optimization frameworks have been proposed for complex multi-objective optimization [
23], and reasoning-enhanced Bayesian optimization strategies have been introduced to better exploit long-context inference and iterative hypothesis refinement [
24]. Additional efforts have focused on improving the reliability and safety of LLM-in-the-loop optimization through trustworthy BO formulations [
25], incorporating interactive natural language feedback from users within the optimization loop [
26], and integrating language-guided priors in Bayesian optimization to formalize domain preferences and constraints [
27]. Moreover, agentic retrieval-augmented assistants have recently been introduced to translate natural language optimization goals into executable Bayesian optimization pipelines and reusable code templates [
28].
This work presents a topology optimization study of a 48 V PMSM motor tailored for e-bike applications. Both rotor and stator geometries are optimized using an AI-assisted Bayesian optimization framework coupled with FEM analysis. The AI module identifies performance trends across the design space and generates refined candidate solutions for Bayesian optimization using retrieval-augmented generation. It also benefits from user input in natural language format using large language models to change user input into optimization policies, which enables efficient searching process. The optimization goal is to simultaneously maximize average torque and efficiency while minimizing torque ripple, yielding a Pareto set of optimal operating points.
To implement this optimization, a framework is created to couple ANSYS Maxwell (2022R2) to MATLAB (2023b) [
29]; this allows the interchangeability of optimization algorithms applied to the FEM model and still support any parametric FEM model provided. To assess the effectiveness of the proposed AI-assisted Bayesian optimization, its performance is evaluated against a multi-objective version of the Artificial Hummingbird Algorithm (MOAHA), selected as a benchmark due to its demonstrated suitability for electric machine topology optimization [
19,
30]. In the recent literature, MOAHA (and its multi-objective variants) has been successfully applied to the optimization of a PMSM topology closely related to the one investigated in this work [
30], and it was systematically compared to established metaheuristics such as PSO and NSGA-II, showing strong convergence and competitive Pareto performance specifically for this class of machines [
30]. Therefore, adopting MOAHA as the reference optimizer provides a meaningful and literature-supported baseline for benchmarking the efficiency and solution quality of the proposed approach.
This investigates whether large language model (LLM) guidance can improve the sample efficiency of multi-objective topology optimization for PMSMs. Specifically, how effectively an AI-assisted Bayesian optimization framework coupled with FEM can optimize rotor and stator geometric parameters, and whether retrieval-augmented LLM guidance reduces the number of FEM evaluations required to reach Pareto-optimal solutions compared to a benchmark optimizer previously applied to a closely related problem.
The integration of AI with multi-objective optimization contributes a scalable and intelligent framework for electric motor design, supporting the development of high-performance, energy-efficient electric propulsion systems.
2. Methodology
2.1. Motor Configuration and Design Variables
The e-bike assistance powertrain is a mid-drive system, in which the electric motor transmits its mechanical output to the rider’s pedal interface through a built-in gearbox, which serves as a critical mechanism for torque adaptation and rotational speed conditioning (
Figure 1).
The electric motor is a permanent magnet synchronous machine that operates at high rotational velocities and low torque relative to the user pedaling cadence and the torque they need for assistance. Therefore, the electric motor characteristics that are optimal for electromagnetic efficiency are incompatible with the mechanical demands of the human-scale crank motion. To reconcile this mismatch, the motor’s shaft output is routed into the multi-stage gearbox which performs fixed torque amplification while reducing rotational speed to a 100 rpm suitable for human pedaling frequency. This arrangement enables the drivetrain to maintain efficient motor operation across variable load conditions, while also ensuring smooth torque delivery to the crankset and pedal spindle.
The motor has 48 slots, 8 poles, and a
-type interior magnet topology, where each pole contains three buried permanent magnet segments arranged in a
-shaped pattern (
Figure 2). This approach is widely used to enhance the flux concentration and provide mechanical robustness. The 48-slot stator accommodates a distributed three-phase winding to smooth the electromagnetic torque and reduce cogging effects. The machine main dimensions are illustrated in
Figure 3.
2.2. Finite Element Model
Finite element model: The electromagnetic performance of the machine was evaluated using a 2D finite element model implemented in Ansys Maxwell 2022R2. The model represents a periodic sector of 45° corresponding to one pole (
Figure 4). A transient formulation was adopted to compute the motor torque and losses under current excitation, and symmetry was exploited to reduce the simulation time.
Material models and losses: Nonlinear magnetic behavior was considered using B–H curves for M19_24G electrical steel, built-in the ANSYS Maxwell library while magnets were modeled with NdFe35.
The machine efficiency
is defined as the time-averaged efficiency measured over the last electrical period of an FEM evaluation period. It is computed as the ratio of the mechanical output power
to the total converted power. This includes copper losses
calculated using Equation (
3) where
is the phase resistance, and core losses
that are obtained from the Ansys Maxwell built-in core losses model; it includes hysteresis losses, eddy current losses and excess losses.
,
and
are, respectively, phase A, phase B, and phase C instantaneous current.
The mechanical power is calculated using Equation (
4), where
is the instantaneous torque and
is the rotor speed.
Mesh strategy and discretization: The domain was discretized using triangular elements (Ansys built-in) with adaptive refinement concentrated in regions with high field gradients, particularly the airgap, magnet edges, and slot teeth tips. The final mesh contains 23,938 elements, with a minimum element area of
mm
2. Two mesh snapshots are provided in
Figure 4a (global view) and
Figure 4b (zoom-in of airgap/slots) to illustrate the refinement strategy;
Table 1 summarizes the mesh information.
2.3. MATLAB–ANSYS Coupling Framework
The proposed optimization environment is structured around a MATLAB–ANSYS coupling that automates the design evaluation loop. MATLAB acts as the supervisory layer, coordinating design space exploration, invoking FE-based simulations, and interpreting results from the iterations. The framework is intentionally modular, allowing for easy replacement of optimization algorithms and FEM models; it also enables integration with Python (version 3.13.5) AI scripts.
As illustrated in
Figure 5, the optimization algorithm proposes a new set of design variables and calls MATLAB for an FE evaluation. MATLAB then modifies and launches dedicated Visual Basic scripts, which in turn update the parametric model in Ansys Maxwell and run the electromagnetic simulation for the current design.
Once the simulation is finished, Ansys Maxwell returns the electromagnetic results (e.g., torque curves) to MATLAB to post-process them into key performance indicators, as average torque, torque ripple, and efficiency, and sends these metrics back to the optimization algorithm. The optimizer uses this feedback to update its search strategy and iterates the loop until a set of optimized motor geometries is obtained.
2.4. Optimization Problem Formulation (Objectives and Constraints)
The PMSM topology optimization problem is formulated as a constrained multi-objective design task, in which the set of the chosen geometric variables is tuned to improve the electromagnetic performance of the e-bike motor. The decision vector is defined as
The first set of parameters represents the stator teeth or slot-opening geometry, which contributes to the torque ripple characteristics while the rest of the parameters——represent the magnet’s dimensions, which affect the amount of torque generated by the machine.
2.4.1. Design Constraints and Feasible Space
The optimization is performed under box constraints defined by practical geometric limits. These bounds establish the feasible design space:
where the lower and upper values for each parameter are given in
Table 2, which directly acts as the constraint definition for the optimization study.
These bounds were selected to satisfy mechanical manufacturability and electrical constraints (e.g., minimum slot-opening dimensions, wire gauge considerations, and non-interference constraints during parametric model updates).
2.4.2. Objective Functions
Each candidate design is evaluated using the MATLAB–ANSYS Maxwell loop, where FEM simulations return electromagnetic outputs, torque waveform, and losses. These results are post-processed into the key performance indicators used as objectives: average torque, torque ripple, and efficiency. The goal is to identify a Pareto-optimal set of motor geometries that simultaneously perform the following:
Maximize average torque, ;
Maximize efficiency, ;
Minimize torque ripple, .
This multi-objective formulation can be expressed as Equation (
7) and the objective vector as Equation (
8), where
X is the feasible region defined by the parameter bounds in
Table 2. The optimization objective is therefore a three-objective trade-off problem, where improving torque capability conflicts with ripple minimization and efficiency interacts with both.
Because the performance mapping is obtained through the MATLAB–ANSYS simulation environment, the function is treated as a black-box, providing only objective evaluations without gradient information; therefore, gradient-based optimization is not directly applicable.
2.5. AI-Assisted Bayesian Optimization (RAG + BO + LLM Integration)
The motivation behind this integration is to provide the designer with a prompt where he can request design specification, give experience-based insights, or impose constraints qualitatively through natural language. The prompted AI agent can then execute actions, assess the results, and refine its policies for the next actions (
Figure 6).
BO offers an approximation model to find candidates
. Specifically, an approximation model can be formulated by
where
is the observed data (the knowledge base), and
is a latent variable capturing the relationship between
p and
r. Furthermore, in the standard BO,
is often simple (e.g., a wide Gaussian). However, using an LLM with RAG, a useful analysis from humans or history can provide a more informed
. For example, the LLM might see that increasing
can boost torque. Hence, in our model, we define that step by
which means how the approximation model incorporates prior knowledge
, which can be enhanced with LLM insights. Specifically, we use a GP for the approximation method, fitting it to
where
are parameter sets (e.g.,
) and
are the objectives
from FEM runs. Based on that, we use the LLM to provide priors
or refine predictions. LLM prompts it with
to estimate
r for a new
x, then combines it with GP. For example,
; the GP predicts
, and the LLM adjusts based on the current trends (e.g., “wider
to reduce ripple”) to improve early predictions.
RAG + BO: The high-level overview of the architecture is as follows:
Initialization: The LLM suggests initial parameter sets based on the problem description and human knowledge, e.g., ranges of variable settings. The LLM can make suggestions based on the memory knowledge, which is logged from previous run times. This replaces random initialization for faster convergence.
Candiate sampling: After a few iterations, the LLM generates new candidates to Pareto optimize the cost functions vector targeting non-dominated solutions, based on the current knowledge base and a range parameter setting. It uses in-context learning (ICL) with historical data to propose diverse x sets, guided by trends (e.g., increasing boosts torque).
Approximation modeling: The LLM combines with GP to act as an approximation model in finding candidates based on the knowledge base and latent variable .
Evaluation: This step is run on the black-box simulation MATLAB–ANSYS and it will update the cost value after execution. With the multi-objective function, LLM prompts will trigger the LLM to extract Pareto analysis to process the trade-offs.
Stopping: The algorithm will stop when the Pareto value is stable after many iterations.
Figure 7 illustrates the workflow of the LLM-assisted optimization loop. The agent component mediates between the simulation environment, the knowledge base, and the large language model (LLM). At the start of each iteration, the agent prompts the LLM with the current dataset and past simulation history to suggest promising initial or updated parameter sets and sampling settings. These candidates are passed to the hybrid module of Gaussian Process (GP) and LLM, which uses both a GP surrogate model and the LLM’s reasoning to select the next design to evaluate via an acquisition function. The agent then triggers simulations in Ansys, collects the resulting performance metrics, and updates the knowledge base; the LLM analyzes these results relative to previous runs, allowing the system to progressively refine its understanding of the design space and improve subsequent optimization steps.
In this work, the RAG mechanism is applied in a closed-loop, where retrieval is performed exclusively from the internal knowledge base (historical FEM simulation results) and from LLM-generated memory logs containing trend summaries and qualitative design rules. External unstructured documents (e.g., textbooks or research papers) are not included in the retrieval corpus. While this differs from classic RAG applications that augment LLMs with large external knowledge bases, the use of vector-based semantic retrieval to ground LLM generations in the optimization history aligns with the core principles of retrieval-augmented generation and enables the LLM to serve as an effective, memory-based design agent.
2.6. RAG-BO-LLM-Based Algorithm for Multi-Objective Electric Motor Optimization
Leveraging the significant advantages of the LLM (e.g., a fine-tuned variant of GPT-4 or similar), we build an adaptive agent that injects qualitative design knowledge into the Bayesian optimization (BO) loop, enhancing sample efficiency beyond a standard Gaussian Process (GP) surrogate. However, to address the limitation of pre-trained knowledge in LLMs and preventing hallucinations, we only allow an agent to access the optimization corpus including human interactive guidance, constraints of designs, and prior simulation results (e.g., log files, evaluations). Unlike a traditional RAG system, our solution proposes a dynamic knowledge base as follows:
This integration makes the framework interpretable (via natural language prompts/ logs) and scalable, as the corpus grows with runs, enabling transfer learning across similar motor designs.
Furthermore, the design architecture implicitly addresses LLM hallucinations or incorrect physical guidance. Specifically, the LLM does not directly control decisions to find the optimal solution. As shown in the architecture, the LLM proposes candidates or adjusts priors, but the final acquisition decision (Line 24: “Select the best candidate using expected improvement”) is still driven by the GP-based acquisition function. Hence, even if the LLM suggests a bad setting in an allowed range, the GP will assign it low expected improvement if past data shows poor performance there. Second, our architecture is a RAG-based solution, meaning it conditions its responses on the past simulation results (the “knowledge base”), possibly engineering settings or rules (e.g.,
Table 2’s natural language rules). This grounds the LLM in observed data, reducing hallucinations. Third, the design of our solution does not rely directly on the LLM. If an LLM-suggested design performs poorly, it is recorded in
and down-weighted in future GP predictions. Thus, feedback from real simulation, Ansys, corrects LLM bias over time. Last but not least, the design of
and
limits wrong LLM settings when reaching the optimal solutions. In fact, incorrect physical guidance from the LLM is logged to help the agent avoid those mistakes in future iterations.
| Algorithm 1 RAG + BO for Multi-Objective Electric Motor Optimization |
| Require: Parameter bounds : Box constraints from Table 2 (e.g., mm, etc.)
|
| Require: Setting: Maximum iterations N, candidates per iteration k, knowledge base , |
| Ensure: Pareto-optimal parameter set : Non-dominated designs from final |
| Initialization : |
| 1: // Prompt LLM with problem description, bounds , and retrieved memory logs from prior runs |
| 2: Generate initial parameter sets via RAG-augmented LLM |
| 3: for to K do |
| 4: Evaluate using MATLAB–ANSYS FEM simulation |
| 5: Compute objectives: |
| 6: Update knowledge base: |
| 7: end for |
| // Main loop |
| 8: for t = 1 to N do |
| // Candidate Sampling |
| 9: Compute current Pareto reference |
| 10: // RAG: Retrieve top-k similar entries from (semantic search on embeddings) |
| 11: Prompt LLM with , , trends (retrieved), and rules: “Generate K diverse candidates near Pareto front” |
| 12: Output candidates (ensure feasible in ) |
| // Approximation modeling |
| 13: Fit independent GPs to each objective in |
| 14: // RAG: Retrieve trends from |
| 15: Prompt LLM to refine: “Adjust GP mean for based on trends/rules” |
| 16: Compute hybrid prediction |
| 17: Select best candidate using Expected Hypervolume Improvement (EHVI) |
| 18: Run MATLAB–Ansys FEM for to obtain true |
| 19: Update |
| 20: // RAG: Retrieve similar past analyses; |
| 21: Prompt LLM: “Analyze trade-offs in new vs. ” |
| 22: Update memory logs with LLM summary |
| // Stopping criterion |
| 23: Measures the volume dominated by the Pareto set P: |
| 24: if over last iterations then |
| 25: Break loop |
| 26: end if |
| 27: end for |
| 28: Extract final Pareto front via non-dominated sorting on |
| 29: return and best single (e.g., max torque design) |
3. Results and Discussion
3.1. AI-Assisted Optimization Without Natural Language Input
The first trial uses the RAG + BO to search for optimal solutions without any natural language input. The results presented in
Figure 8 demonstrate a clear convergence pattern toward high-efficiency operating conditions, with the Pareto-optimal solutions forming a compact frontier in the multi-objective design space. In the three-dimensional view (
Figure 8a), the Pareto set occupies a narrow region characterized by simultaneously low torque ripple, moderate average torque, and high efficiency.
The compact frontier of the Pareto-optimal solutions in the objective space indicates convergence toward a consistent trade-off surface. To verify that this clustering is not an artifact of narrow design variable bounds, we report the explored ranges of each design parameter across all evaluated samples (
Table 4), showing that the optimizer sampled broadly within the feasible domain before concentrating near the non-dominated region.
The two-dimensional projections (
Figure 8b,c) offer deeper insight into the relationships between the objectives. The torque ripple versus average torque plot (
Figure 8b) shows that the Pareto-optimal designs are concentrated toward higher torque–ripple values within the explored region, indicating a trade-off where increased average torque is obtained at the expense of increased torque ripple. Meanwhile,
Figure 8c highlights a reversed trend between torque ripple and efficiency, where the Pareto points cluster at the upper-left region, showing that within the explored designs, lower torque–ripple values tend to coincide with higher efficiency.
Overall, these results demonstrate that the combination of RAG and BO is able to identify feasible design candidates and also to reveal the underlying structure of the performance landscape. The overall design point distribution and the Pareto front knee shape indicate a convergence behavior and suggest that the chosen objective formulations are well-posed for capturing electric motor performance trade-offs.
3.2. AI-Assisted Optimization with Natural Language Input
In the second optimization trial, the AI-assisted Bayesian optimization framework was augmented with natural language input, where qualitative experience-based designs (
Table 3) allow the LLM agent to translate design preferences into explicit search policies for the permanent magnet machine. Within the MATLAB–ANSYS coupling, the LLM operates on top of the GP surrogate. In the present trial, this interaction was steered by language instructions that emphasize some of the variables effect on the objectives, for example, which one has the lowest effect on torque, or which one has the highest.
Such a configuration aligns with recent work on LLM-enhanced Bayesian optimization, where natural language priors are used to bias the acquisition function toward user-preferred regions of the design space.
The resulting distribution of design points in the second trial shows a markedly structured exploration of the three-dimensional objective space, similar to the first trial but with fewer explored design configurations. The cloud of gray solutions spans a broad efficiency range, down to approximately ≈92.3%, indicating a sub-optimal start point for the optimization process relative to the previous trial. However, the Pareto-optimal set (red markers) collapses into a compact cluster at simultaneously low torque ripple (≈13–14%) and high efficiency (≈93.4–93.6%), with only modest variations in average torque after only 182 iterations (
Table 5). Compared with the first trial, where it took 242 iterations (
Table 5), the LLM input resulted in a 20.1% reduction in simulation expenses. This suggests that LLM-guided candidate generation is more effective at sampling along the relevant trade-off surface, rather than wasting evaluations in regions that are sub-optimal in all three objectives.
A closer comparison of the two trials indicates that natural language input reorients the Pareto set toward designs with slightly lower average torque but systematically reduced torque ripple and marginally improved efficiency. In the first trial, the frontier extended toward designs with higher torque at the cost of increased ripple, consistent with an optimization policy that weighs torque and efficiency more symmetrically against ripple. In contrast, the second trial concentrates Pareto points near the low-ripple edge of the feasible region, indicating that the LLM successfully internalized the designer’s qualitative preference and encoded it into the sampling strategy.
From a methodological perspective, the second trial illustrates the principal advantage of embedding an LLM within the optimization loop: the ability to inject high-level engineering knowledge and soft constraints without manually redefining objective weights or hard bounds. The memory augmented, retrieval-based prompting allows the agent to reason over prior FEM evaluations to express this knowledge in new candidate proposals. This knowledge-assisted behavior is consistent with recent studies showing that LLMs can act as adaptive priors or meta-optimizers, improving sample efficiency compared with purely data-driven BO in complex design tasks.
3.3. Comparative Performance Evaluation of the Proposed Method and the MO-AHA
To assess the benefit of the proposed AI-assisted Bayesian optimization, its results are compared with those obtained using the multi-objective version of the AHA. Both optimizers operate on the same MATLAB–ANSYS framework, FEM model, design variables, and bounds defined in
Section 2 and
Section 3, and use the same multi-objective formulation that simultaneously maximizes average torque and efficiency while minimizing torque ripple.
From the 3D scatter plots of the second trial (AI-assisted Bayesian optimization with LLM input;
Figure 9) and trial 3 (MOAHA;
Figure 10), both methods ultimately identify Pareto-optimal designs located in a similar region in the objective space. This indicates that, in terms of best-found designs, AI-assisted Bayesian optimization is at least competitive with the AHA benchmark, achieving comparable trade-offs between smoothness, efficiency, and torque capability.
However, the search dynamics of the two methods differ. In Trial 3, the MOAHA generates a wide cloud of solutions that spans a wide range of torque ripple (roughly 13–26%) and efficiency (about 92–93.6%), as well as a broad interval of average torque values. The resulting scatter shows a clear global trend from high-ripple and low-efficiency designs toward the low-ripple and high-efficiency region where the Pareto front resides, reflecting large exploration from the meta-heuristic. In contrast, LLM-assisted Bayesian optimization in Trial 2 produces a denser concentration of design points close to the final Pareto cluster, with fewer evaluations spent in clearly dominated regions. This behavior is consistent with the language-encoded rules in
Table 2, which bias the search toward the objectives.
The number of FEM evaluations required quantifies the difference in sample efficiency for each trial. LLM-guided Bayesian optimization converged to its compact Pareto set after 182 iterations (
Table 6), whereas the Artificial Hummingbird Algorithm required 351 iterations to reach a similar quality of solutions (
Table 6). Given the high computational cost of each FEM call, this corresponds to a roughly 48% reduction in simulation effort when using the proposed AI-assisted approach. The improved efficiency arises from exploiting both the surrogate model and the prior knowledge injected through natural language rules and retrieval-augmented memory, which allows the optimizer to focus quickly on the most promising region of the design space.
All simulations and optimization runs were executed on a workstation equipped with an Intel Xeon CPU E5-2670 @ 2.60 GHz with eight physical cores (16 threads), 32 GB RAM, running Windows 10. The FEM analysis represents the dominant computational cost where the average wall-clock time per FEM evaluation was 1 min and 0.62 s (min–max: 59.87 s–1 min 1.87 s) for the mesh settings described in
Section 2.
Overall, the comparison shows that the MOAHA provides good global coverage of the search space and serves as a robust benchmark. Nevertheless, AI-assisted Bayesian optimization achieves comparable Pareto performance with substantially fewer simulations and the time reduction is mainly due to the reduction of number of iterations for convergence. For applications such as an electric motor design, where FEM evaluations are the dominate time-consuming aspect of an optimization process, this combination of high-quality solutions and reduced number of evaluations highlights the practical advantage of integrating LLM guidance into the optimization loop.
3.4. Optimal Designs
The optimal design set summarized in
Table 7 shows that the RAG + BO framework consistently identifies Pareto-optimal configurations that frequently lie near the upper bounds of several design variables. Most optimal candidates adopt large slot-opening and slot height values (
–
,
–
) together with maximum magnet dimensions (
,
,
,
close to its upper limit). Across the ten solutions, the average torque remains tightly clustered around
–
while torque ripple and efficiency span a range of
–
and ≈93.3–93.6%, respectively, illustrating a well-defined Pareto trade-off. Designs such as Design 1 achieve the highest torque and efficiency at the cost of the largest ripple, whereas designs such as Design 7 minimize ripple but slightly sacrifice torque and efficiency. This behavior is consistent with the multi-objective trends observed in
Section 3.1,
Section 3.2 and
Section 3.3, where the Pareto front knee reflects a preference for smoother torque at moderate torque levels suitable for the geared e-bike drivetrain.
Given that the Pareto-optimal candidates exhibit a narrow spread in average torque, the average torque becomes the last discriminator between these designs when manually choosing one of the optimal designs. Efficiency improvements are highly desirable given the current focus on range and power consumption in electrical bikes, provided it does not come at the expense of torque ripple. In this context, Design 9 is the most appropriate choice, since it preserves a near-maximum efficiency (93.50%) while maintaining a comparatively low torque ripple (13.42%) at a representative torque level (5.62 Nm). This selection deliberately avoids the highest-efficiency option (Design 4, 93.56%), which has noticeably larger ripple (14.21%) for a marginal efficiency gain. Design 4 offers the lowest ripple in the set, but it also offers the lowest average torque (5.45 Nm) and a lower efficiency (93.31%) compared to Design 9. Overall, Design 9 offers the most balanced compromise in the Pareto set.
4. Conclusions
This work proposed and evaluated an AI-assisted optimization framework for the topology design of a -type interior PMSM dedicated to e-bike mid-drive powertrain. By coupling a MATLAB–ANSYS Maxwell simulation environment with a Bayesian optimization scheme enhanced by an LLM-based, retrieval-augmented agent, the study addressed a three-objective problem that seeks to maximize average torque and efficiency while minimizing torque ripple. Across all trials, the optimizer identified feasible geometries that deliver moderate average torque (≈5.3–5.7 Nm), low torque ripple (≈12.8–14.2%), and high efficiency (≈93.3–93.6%), which are compatible with the requirements of a geared e-bike drivetrain.
The comparison between the purely data-driven RAG + BO baseline and the LLM-guided RAG + BO configuration highlights the benefit of incorporating natural language design knowledge directly into the search process. When qualitative rules on the influence of slot and magnet parameters were provided, the LLM reoriented the exploration toward smoother torque, high-efficiency designs and concentrated samples near the relevant trade-off surface. This led to convergence in 182 iterations, representing a 20.1% reduction in simulations relative to the 242 iterations required by the baseline trial without language guidance.
Against the multi-objective Artificial Hummingbird Algorithm benchmark, AI-assisted Bayesian optimization achieved a comparable Pareto front while requiring substantially fewer simulations (182 versus 351 iterations, a reduction of about 48%). MOAHA offered broad global exploration, but the proposed approach exploited both surrogate model information and LLM-encoded priors to avoid clearly dominated regions of the design space. This improved sample efficiency is particularly valuable in electric machine design, where each high-fidelity FEM evaluation is computationally expensive.
The resulting optimal designs also provide physical insight. Most Pareto-optimal solutions push the stator slot-opening, slot height, and magnet dimensions close to their upper bounds, confirming that increased magnet volume and wider slots promote torque production while maintaining acceptable ripple and efficiency. The fact that the best candidates cluster at these limits, without clear signs of magnetic saturation, suggests that relaxing some geometric bounds in future studies could unlock additional torque and efficiency gains.