Find Maximum Torque Envelope for Motor
To generate calibration tables using torque percent as an input, calculate an intermediate set of values to create a 1-D lookup table based on the torque envelope and run an optimization.
For this example, to calculate the intermediate set of values, set up functions for:
Current magnitude, Is
Torque model, TrqModel
CAGE can only optimize models, so a torque model is required.
Note
If you want to use torque as a table input instead of torque percent, set up only the function for Is, and skip the remaining steps for finding the maximum torque envelope for the motor.
In the CAGE Browser toolbar, use New Function Model wizard to create these functions:
Is = sqrt(Id^2 + Iq^2)TrqModel = Trq
Click the New Function Model icon
.Enter the formula
Is = sqrt(Id^2 + Iq^2).
From the Available Inputs, assign to the Model Input. The inputs
IdandIqare automatically assigned to theIdandIqmodels.
In the Cage Browser, verify that the function models for
IsandTrqModelhave these descriptions:Is—sqrt(Id^2 + Iq^2)TrqModel—Trq

Create 1-D Lookup Table from Model
Create a table with all the optimization points. For this example, the table is the
torque envelope as a function of motor speed, n.
In the CAGE Browser, select File > New > 1D Lookup Table.
In the Create Lookup Table dialog box, set Name to
TrqEnvelopeand Units toNm.From Rows (Y) input select motor speed,
n.Select
to use operating points for
breakpoints.Click OK.

Run Optimization on Torque Envelope
For this example, run an optimization with these specifications:
Current magnitude, Is, less than or equal to
615AVoltage magnitude Vs, less than or equal to
222.8V
In the CAGE Browser, click Optimization.

The Optimization Quick Start dialog box opens to guide you through the optimization setup. Click Next.

In the Optimization Quick Start dialog box on the Objectives tab:
From the Model list, select
TrqModel.From the Goal list, select
Maximize.
The variable
Trqis automatically selected to optimize. Click Next.
In the Optimization Quick Start dialog box on the Constraints tab, add the optimization constraint for the current magnitude,
Is <= 615, and voltage magnitude,Vs <= 222.8. Select the variableIdto optimize in addition toTrq. Then, click Next.
In the Optimization Quick Start dialog box on the Operating Points tab:
From the Operating points list select
BreakpointsandTrqEnvelope(n).Under Optimize operating points, select Point: optimize each operating point separately.
Click Apply. Then, click Close.

In the CAGE Browser, carefully verify the Objectives and Constraints.

In the CAGE Browser, click Run.
Fill Lookup Tables
Fill the torque envelope table.
In the CAGE Browser, select Solution > Fill Lookup Tables
In the Lookup Table Filling Optimization Results Wizard dialog box, click Next to fill the
TrqEnvelope(n_norm)lookup table.
In the next view of the table filling wizard, select
TrqModelfrom the optimization results to fill theTrqEnvelopetable. Click Finish.
Review the results for
TrqEnvelope. The results are similar to the results shown here.
Select File > Save Project. Save the
gs_example.cagfile to theworkfolder.
Create Function Model for Torque Grid
Using the optimized TrqEnvelope table set up the torque grid function model TrqGrid.
In the CAGE Browser toolbar, use the New Function Model wizard to create the function
TrqGrid = TrqPercent/100*TrqEnvelope.Note
If you want to use torque as a table input instead of torque percent, you can skip creating a function model for TrqGrid.

In the CAGE Browser, right-click the model
Iqand select Edit Inputs. Update the Assigned Input for the Model InputTrqto useTrqGrid. Leave Duplicate models selected to create Iq_TrqGrid, Is_TrqGrid, and Vs_TrqGrid.
Click OK.
Click Yes to change the inputs for the models.
In the CAGE Browser, verify that the TrqGrid function models have these descriptions:
TrqGrid—n,TrqPercentIs_TrqGrid—Id,n,TrqPercentIq_TrqGrid—Id,n,TrqPercent
