Videos > Setting Up and Running Sensitivity Analysis in optiSLang for BPM Optimization
Jan 27, 2025

Setting Up and Running Sensitivity Analysis in optiSLang for BPM Optimization

Hello everyone, welcome back. In the last video, we integrated our IPM motor model from MotorCAD into OptiSling. Now we're ready to perform a sensitivity analysis to identify the key design variables that impact the motor's performance.

Before we dive in, be sure to check out the supplementary video on sensitivity analysis in OptiSling. I've included a link in the description, and I cover different sampling methods, including the one we'll be using today.

Configuring the Sensitivity Study in OptiSling

  1. Click Setup Optimization in OptiSling. A window opens with information on our exported MotorCAD model. This is the export wizard that will create the Python script for our OptiSling project.
  2. All parameters and constraints are ready to go. One change I will make is using the same method to generate the sensitivity study that we will use in the next video.
  3. In the Run Options tab, adjust the number of MotorCAD instances to be driven in parallel by OptiSling. Set the max number of instances in parallel to 4. Note that lab module build calculations already run in parallel using multiple threads and can use up to 14 cores. Be cautious about resource usage.
  4. Click Apply and then OK.

Parameter and Criteria Definition

In the Parameter Definition tab, ensure all parameters, values, and ranges are imported correctly. Adjust ranges if necessary. The same applies to the Criteria tab, where you can adjust responses.

Choosing Sampling Methods

In the sampling methods tab, the color scheme indicates which methods are most appropriate based on the number and type of variables defined. OptiSling suggests using the AMOP method:

  • AMOP (Adaptive Metamodel of Optimal Prognosis): Dynamically refines the design space by focusing sampling where the metamodel predicts the highest uncertainty or potential improvement. Uses regression-based error metrics to optimize exploration and exploitation.

However, we're opting for ALHS:

  • ALHS (Advanced Latin Hypercube Sampling): Divides the design space into evenly distributed strata and samples from each stratum to ensure uniform coverage. Minimizes clustering and ensures statistical diversity but doesn't adapt to problem topology like AMOP. It's computationally efficient and excels at initial exploration of high-dimensional design spaces.

Select ALHS and click Next. This prompts the export tool to run the Python file that will create and open the actual OptiSling project.

Overview of OptiSling

OptiSling is a tool for graphical programming, process integration, and process automation. Two important components are:

  • Nodes: Workflow building blocks that can be inputs, processes, or outputs.
  • Connections: Define data flow between nodes, consisting of a connection line, an output slot, and an input slot.

The export wizard automatically adds the sensitivity analysis and MOP node to the schematic. Nodes can be activated or deactivated by clicking on them and pressing Ctrl + E. Double-clicking on the sensitivity analysis reopens the options we configured. Double-clicking on the node reopens the export tool.

Running the Sensitivity Analysis

Let's run the sensitivity analysis. OptiSling acts as the driver for MotorCAD, orchestrating simulations for each defined design point. This process evaluates how variations in input variables influence performance metrics such as torque, efficiency, or thermal behavior. OptiSling systematically explores the design space, generating a comprehensive dataset linking input parameters to output responses.

Once the analysis is complete, navigate to the Result Designs tab to review the simulation outcomes. Here, you can identify successful designs that satisfy the defined constraints and pinpoint designs that fail to meet the criteria, which may require further investigation to understand underlying issues or constraints.

We have many designs that have zero results for all requested responses, indicating failures due to non-physical or broken geometry. These designs can be fixed easily, but I'll use them to demonstrate post-processing results and creating meta models that ignore bad designs in the next video.

Make sure to like and subscribe to catch the next video in our motor optimization series. Thanks for watching!

[This was auto-generated. There may be mispellings.]

Setting Up and Running Sensitivity Analysis in optiSLang for BPM Optimization Hello everyone, welcome back. In the last video we integrated our IPM motor model from MotorCAD into OptiSling.

Now we're ready to perform a sensitivity analysis to identify the key design variables that impact the motor's performance. Before we dive in, be sure to check out the supplementary video on sensitivity analysis in OptiSling.

I've included a link in the description and I cover different sampling methods including the one we'll be using today. Let's finish the process of configuring the sensitivity study in OptiSling.

After clicking the "Setup Optimization" in OptiSling, a window opens up with information on our exported MotorCAD model. This is the export wizard that will create the Python script that will generate our OptiSling project.

You can see that it already has all of our parameters and constraints ready to go. One change I will make here is that I will be using the same method to generate the sensitivity study that we will be using in the next video. The next step I will be using is in the "Run Options" tab.

This step involves adjusting the number of MotorCAD instances to be driven in parallel by OptiSling. I'm going to set the max number of instances in parallel to 4. Keep in mind that the lab module build calculations already run in parallel using multiple threads and can use up to 14 cores.

This means that you want to be careful about how many parallel MotorCAD instances you run and be aware of how each of those instances use resources. Click "Apply" and then "OK". Next we'll see the "Parameter Definition" tab. All of our parameters, values, and ranges should have imported correctly.

If you want, you can adjust the ranges from this tab. The same is true for the "Criteria" tab. All of our responses will be imported correctly, but if we want, we can make adjustments to them here. Finally, we come to the tab where we can choose between various sampling methods.

The color scheme indicates which methods are most appropriate for the problem based on the number and type of variables defined. In this example, OptiSling suggests using the AMOP method.

AMOP, or A-M-O-P, Adaptive Metamodel of Optimal Prognosis, dynamically refines the design space by iteratively focusing the sampling where the metamodel predicts the highest uncertainty or the greatest potential improvement.

It uses regression-based error metrics to adaptively optimize both exploration, which would be broad coverage, and exploitation, which could be fine-tuning and promising regions.

This creates a feedback loop, improving the accuracy of the surrogate model in the areas most critical to the optimization objectives. OptiSling suggests using AMOP based on the problem's characteristics, but we're opting for ALHS.

ALHS, or Advanced Latin Hypercube Sampling, divides the visualization step into two. The decision-makers, or upon their decision, buy a model and space into evenly distributed strata and samples from each stratum to ensure uniform coverage.

This method minimizes clustering and ensures statistical diversity of samples, but it doesn't adapt to the problem's topology like AMOP. ALHS is computationally efficient and excels at initial exploration of a high-dimensional design space, which is why we'll use it here.

Select ALHS and click "Next". This will prompt the export tool to run the Python file that will create and open the actual OptiSling project. Quick overview of what we're seeing here. OptiSling is a tool used for graphical programming, process integration, and process automation.

Two important components provide a base for this: Nodes and connections. Nodes are the workflow building blocks. They can be inputs, processes, or outputs depending on the data flow. The data flow is defined by the connections to and from the nodes.

Each connection consists of a connection line or edge between the nodes, an output slot, and an input slot. You can see here that the export wizard automatically added the sensitivity analysis and the MOP node to the schematic.

The top area of this block that says "Sensitivity" is the system, and inside of it is the node. You can string multiple nodes together inside of a system. Nodes can be activated or deactivated by clicking on them and pressing Ctrl E.

Double-clicking on the sensitivity analysis opens back up the options that we just configured. Double-clicking on the node opens back up the export tool. Let's now run the sensitivity analysis. OptiSling will act as the driver for MotorCAD, orchestrating simulations for each defined design point.

This process evaluates how variations in input variables influence performance metrics such as torque, efficiency, or thermal behavior. OptiSling systemically explores the design space, generating a comprehensive data set that links input parameters to output responses.

Once the analysis is complete, navigate to the "Result Designs" tab to review the simulation outcomes.

Here you can identify successful designs that satisfy the defined constraints and pinpoint designs that fail to meet the criteria, which may require further investigation to understand the underlying issues or constraints. We have a lot of designs that have zero ran for all the requested responses.

This means that these designs failed and it's likely because these combinations of variables lead to non-physical or broken geometry. We can go in and fix these designs easily.

Instead, I'm going to use them to show how we can post-process our results and create meta models that ignore bad designs like the E-MODEL. I'm going to use the E-MODEL to show how we can post-process our results and create meta models that ignore bad designs like the E-MODEL.

That'll be in the next video. Make sure to like and subscribe and catch the next video on our motor optimization series. Thanks for watching.