Setup procedures
Work through the steps below in the order shown. Each step builds on the previous one. Click a card to open the instructions for that step.
Prerequisites
Make sure the system is safe to power and correctly configured before any test injects current into the motor.
Hardware
- Motor mechanically installed and shaft free to rotate
- Phase cables connected to the inverter
- Position sensor (resolver) connected and wired correctly
- HV supply available and within the configured minimum/maximum voltage range
- LV 12 V supply connected to the inverter
Software and configuration
- Latest DTI CAN Tool (V3.26 or newer) and latest inverter firmware installed. If the PC is online, the CAN Tool offers the GUI update automatically; firmware is updated on the FWU page.
- Motor parameters configured — see Motor parameters. Enter the datasheet values (including the flux linkage), or select a predefined motor.
- Limit parameters set correctly for the application — see Limit parameters tab
- DC current limit disabled
- No active faults and no active limits
- Enable signal present (if configured)
Temporary settings for the tuning — restored in Step 6
- Reference Ramp disabled (Control Settings → General)
- MFW Mode set to None. With any other MFW mode the inverter ignores the OPENLOOP and CLOSE LOOP commands.
- DQ Axis Decoupling turned off (Control Settings → General). This parameter is only visible in advanced mode: click the SIMPLE button at the top right of the CAN Tool.
CAN2 command source
The closed loop test (Step 5) needs a current command from CAN2 or the analog input. It is set up in Step 4.
Write every change to the inverter
Changes made in the CAN Tool are only active after they are written to the inverter. After every parameter change (also after each inductance iteration) click WRITE at the top of the window before taking the next sample.
Safety
The tests in this guide inject current into the motor. Make sure the motor is securely mounted, nobody is near rotating parts, and the HV system can be switched off quickly.
Step 1 — Verify rotor position sensor
Confirm that one mechanical turn is read as one electrical turn. Most motor control issues can be traced to implausible or incorrect position sensor signals.
The rotor position signal must be verified by manually rotating the rotor before any motor operation or calibration is attempted.
- Ensure that the resolver is properly connected to the inverter.
- On the right-center side of the DTI CAN Tool screen, observe the current rotor angle (displayed in the center of the white circle) in real time. Note the initial angle.
- Carefully rotate the rotor by hand or with a suitable tool through exactly one full mechanical revolution. Mark the rotor before rotation to assist with positioning.
- While rotating, observe the change of the angle displayed in the DTI CAN Tool.
- After one full rotation, record the final angle shown in the GUI.
- Compare the initial angle (point 2) with the final angle (point 5). They must be identical or within ±1°. If so, the verification is successful.
If this mapping is incorrect, motor operation will fail.
If the verification fails
Identify and resolve the root cause. Based on experience:
- Verify all cables, connectors, and pinouts for wiring errors or misalignment.
- Confirm that the resolver is installed correctly from a mechanical perspective.
- Ensure that the resolver has one pole pair.
We strongly recommend thorough double-checks of both the mechanical installation and the electrical wiring of the position sensor.
Step 2 — Open loop validation and tuning
Validate (and, if needed, tune) the FOC current controller with the motor standing still. No encoder offset calibration is needed for this test.
When is the full tuning needed?
- DTI F-MOT and other pre-tuned motors: these have been measured and tuned by DTI on our dyno. Select the motor from the predefined list and do a quick validation only: one open loop sample here and a few closed loop samples in Step 5. Run the full tuning only if the validation result is not good. The full procedure does not need to be repeated for every DTI F-MOT unit.
- Unknown third-party motors, motor parameters from a datasheet you are not sure about, after a firmware update that changes the control loop, after changing the switching frequency, or when you see current overshoot, oscillation, noise or poor current tracking.
Motor datasheets are often updated, and real parameters differ because of tolerances, magnetic saturation and temperature. Even with a predefined motor, we recommend validating the controller at least once.
DTI CAN Tool provides an Active Sampling function (Sampling → Active Sampling) that injects a current step into the controller and records the transient response. Two injection modes are available. When operating a motor with unvalidated parameters for the first time, perform both, in this order:
| Mode | Description |
|---|---|
| Open loop (this step) | Step injected without position sensor feedback. The motor remains stationary. No encoder offset calibration required. |
| Closed loop (Step 5) | Step injected with position sensor feedback, superimposed on an externally commanded current target. Requires encoder offset calibration. |
How the controller is set up
The PI current controller gains are not set directly. The firmware derives them automatically from the motor parameters and the switching frequency. See also FOC current control. The motor parameters are also used by other parts of the control (torque calculation, decoupling, field weakening), so they should stay as close to the real motor as possible.
| Parameter | Effect on the current controller |
|---|---|
| Lq inductance | Sets how fast (aggressive) the q-axis (torque) current controller is. This is the value you tune with the Iq step test. |
| Ld inductance | Sets how fast the d-axis current controller is. Keep it in the same ratio to Lq as in the datasheet. |
| Phase resistance | Use the datasheet or measured value. Not a tuning parameter. |
| Flux linkage | Start with the datasheet value. Measure it with the built-in function as the last step (Step 6). Not a tuning parameter. |
So the controller is tuned by scaling the inductance values:
- Start from the datasheet values. If the datasheet gives only one inductance value, use it for both Ld and Lq.
- If the datasheet gives different Ld and Lq values, keep them different and always change both by the same percentage. Do not set Ld = Lq for a motor with clearly different Ld and Lq: the firmware uses this difference for the torque calculation.
| Wrong parameters cause | Symptom |
|---|---|
| Transient overshoot | Current overshoots the target at every change of the request |
| Oscillation / instability | Sustained current oscillation, audible noise, controller divergence |
| Slow response | Current follows the target slowly, poor torque response |
| Increased losses | Higher current ripple, higher inverter and motor temperatures |
Unsure about the datasheet values?
Do not worry too much. Even if they are not exactly right, they are usually not far enough off to damage the motor at the small test currents used here. The sampling procedure will correct the rest.
Before you start
- All prerequisites met, including the temporary settings (Reference Ramp off, MFW Mode None, DQ Axis Decoupling off)
- Motor mounted securely. Fix the shaft mechanically, or have as much load inertia on it as possible.
- In General, Control Source set to CAN1. The open loop test only works with CAN1.
Do not rotate the motor shaft during open loop testing
Turning the shaft from outside during an open loop test is not recommended and may damage the inverter. The injected current stays on for a short time after the last pulse, until the command times out. Wait until the inverter is back to idle before touching the motor or releasing the shaft.
Procedure
- Go to Sampling and select ACTIVE SAMPLING.
- Set the Injected current (adjustable in 10 A steps) and the Pulse width. Recommended for the DTI F-MOT: 10 A with 20 ms.
- Click OPENLOOP. The inverter applies the injected current, switches it off and on three times (each phase lasts one pulse width), and records the response.
- Click DOWNLOAD. The sample appears in the list, named with the date and time.
- Click the sample in the list to open it in PlotJuggler. The top right graph shows the Iq sample and the Iq target.
- Compare the result with the reference below and the examples in the next section.
- If the result is not good, scale Ld and Lq (both by the same percentage), click WRITE, and repeat from point 3.
Target looks trapezoidal?
If the Iq target in the plot is not a clean square but a trapezoid, the Reference Ramp is still enabled. Turn it off in Control Settings → General during the tuning.
Good to know
The current channels in the sample file are stored in 0.1 A units: a value of 100 in the plot means 10 A. The x axis shows the sample number.
Samples are saved as .csv files. Open the folder by typing %APPDATA%\DTI\DTI CAN Tool\Samples into the File Explorer address bar (full path: C:\Users\<your user>\AppData\Roaming\DTI\DTI CAN Tool\Samples; turn on Hidden items if you browse manually).
Evaluating the result
Aim for a result similar to the reference: the actual current reaches the target quickly, with little or no overshoot, and stays on the target without oscillation. As a rule of thumb, the target should be reached at about ⅓ to ½ of the pulse width. Evaluate both the rising and the falling edges. Always use the same step settings (10 A / 20 ms) when you compare iterations.
| What you see | Likely cause | What to do |
|---|---|---|
| Overshoot, ringing or oscillation | Controller too aggressive: inductances set too high | Decrease Ld and Lq by 10–20 % |
| Slow rise, current reaches the target late or not at all | Controller too slow: inductances set too low | Increase Ld and Lq by 10–20 % |
| Fast rise, small or no overshoot, flat on target | Good tuning | Keep the values, continue with closed loop |
| Response shape is OK, but heavy noise and spikes on the current | Usually not a tuning issue: grounding, shielding or current sensor problem | Check grounding, shielding and wiring first (see the grounding recommendation), then sample again |
Trial-and-error tuning
Iterate: Change inductances → Make sample → Check result
- Change only the inductances during tuning, keep everything else fixed.
- Write down every iteration (Ld, Lq, step settings, sample file name and result), so you can always go back to the best result.
- If a change makes the response worse instead of better, go in the other direction.
- Once you are close, refine in steps of about 10–20 %. If the response flips from too slow to too aggressive (or back), halve the step and go back towards the previous value.
Datasheet values far off? Measure Ld and Lq
In the worst case the datasheet values can be several times higher or lower than the real ones. The recommended solution is to measure them with an LCR meter: disconnect the motor from the inverter and switch off the HV system. Measure the inductance between two motor phases while slowly turning the rotor by hand. The phase inductance is half of the measured line-to-line value: the minimum gives Ld, the maximum gives Lq. For motors with Ld ≈ Lq the reading barely changes with the rotor position.
Large steps can damage the hardware
Without an LCR meter you can search with large steps (double or halve the inductances), but this can make the current controller unstable. In extreme cases the resulting oscillation and overcurrent can damage the motor or the inverter. Use the lowest practical injected current, never change the values by more than 2× in one step, and stop immediately if you see sustained oscillation or hear unusual noise. If in doubt, measure the inductances or contact DTI support.
Not sure if the result is good?
Send the sample .csv file to support@drivetraininnovation.com and we will help evaluate it Include the RPM for closed loop samples, your configuration file, the inverter type, serial number, firmware and CAN Tool version, and the motor type with the source of its parameters (datasheet, measured, predefined).
Step 3 — Encoder offset calibration
Align the rotor's magnetic position with the controller's electrical reference frame. Do not operate the motor with an uncalibrated encoder offset.
In Field-Oriented Control (FOC), the encoder offset defines the alignment between the rotor's actual magnetic field position and the controller's electrical reference frame. An incorrect or uncalibrated offset may lead to poor performance, excessive current consumption, vibrations, or even unstable motor operation.
DTI inverters have an automatic calibration procedure, started from the GUI. It takes approximately 2–4 minutes, during which the motor shaft will move and may produce buzzing or clicking noises. It must be performed once after installing the rotor position sensor; the results are stored in the controller's flash memory.
When to repeat
Perform the calibration again if the calibration values are lost or if the rotor position sensor becomes loose from its mounting. Even small shifts can severely reduce efficiency, increase losses, or cause unstable motor behavior. Always re-calibrate if there is any doubt about the correctness of the encoder offset.
Before you start
- The Drive Enable signal is active if it is configured as a digital input or transmitted via CAN2 (visible in the top-right corner of the GUI)
- No active faults
- The rotor position sensor has been validated in Step 1
- The HV input voltage is sufficient to clear any Undervoltage faults
- The rotor shaft can move freely without any mechanical load
- The correct sensor type is selected
- No limits are active (all indicators in the Limits menu display 0 %)
- No commands are transmitted via CAN2. Temporarily switch the control source to CAN1 and revert after the calibration.
Procedure
- Enter the calibration current into the input field labeled 1. For the DTI F-MOT we recommend 10 A.
- Start the calibration by clicking the Start button labeled 2.
- Wait until it finishes. Do not block the rotor shaft. When complete, the GUI displays a green notification bar and automatically downloads the results into the fields labeled 3.
-
Verify the results before applying them:
Parameter Check Encoder offset Must be between 0–359° Encoder ratio Must equal the pole pair number of the motor. For the DTI F-MOT it must be 4 (resolvers with 1 pole pair). Encoder inverted True or false. No additional check needed. -
Copy the results with the checkmark button labeled 4. If they are not downloaded automatically, use the download button labeled 5.
- Press Write to upload the parameters to the controller. The changes take effect immediately.
Repeat three times
It is strongly recommended to perform the calibration at least three times consecutively, calculate the average of the resulting encoder offsets, and use this value for the configuration. If deviations greater than 5° are observed between runs, increase the calibration current by 50 %. If the issue persists, contact support@drivetraininnovation.com.
Emergency
In the event of any malfunction, the calibration can be safely interrupted by switching off the controller's low-voltage power supply. In an emergency, disconnect the high-voltage supply immediately.
Step 4 — CAN2 command source
Set up and verify the CAN2 command source used in the closed loop test (Step 5) and in production.
Parameters to set
To control the motor via the CAN2 interface, enter the following in Application settings → CAN menu:
- Enable CAN2 interface: Must be enabled. Reboot after write.
- Drive enable via CAN2: Can be disabled. Depends on user requirements.
- Use CAN2 extended ID: Enabled. For demonstration purposes we use extended ID; override it according to your requirements.
- CAN2 baud rate: 500 kbps. We recommend 500 kbps or lower. Only use 1 Mbit if you have a special reason.
- CAN2 map version: V25, for demonstration purposes.
- By default, every message is configured for broadcasting with a 25 ms period. For demonstration and testing keep this default. Otherwise configure at least one message with a 100 ms broadcast period (select the CAN2 map, open the V25-specific variables and assign a 100 ms period to one of the messages).
In Application settings → General:
- Control source: CAN2.
- Timeout: 500 ms (override according to your requirements).
After setting these, the CAN2 interface is ready for operation from the controller's point of view.
CAN2 wiring
To control the F-SIC with an external ECU or PCAN-USB, the CAN2 high and low lines must be correctly wired and terminated according to the Low voltage wiring section.
Verification of CAN2 command decoding
You can monitor the received command values on the controller. This helps troubleshooting and integration.
Go to Device → Terminal and select CAN2 values from the list at the bottom. Enable the Repeating checkbox and press Play. Each line represents a command value received by the inverter. For details on the available commands, refer to the CAN2 Manual.
Validating proper decoding before enabling active operation is strongly recommended to prevent unexpected and potentially hazardous motor behavior.
The Time since data received counter shows the time elapsed since the last valid command. If the Control source is set to anything other than CAN2, this timer does not reset and keeps counting.
Sending CAN2 commands to the inverter
The controller is designed to be commanded by the user's VCU, which calculates the current reference and forwards it via CAN2. Since every system is different, this guide demonstrates the procedure using a PCAN-USB device and PCAN-View software.
Note
PCAN-USB is a USB-to-CAN interface developed by PEAK-System. PCAN-View is the diagnostic and monitoring software supplied with PCAN interfaces; it lets you send, receive and log CAN messages in real time. You can download it from the PEAK-System website.
- Install the PCAN-USB device driver, then connect the device to the physical CAN bus and to the PC.
- Open PCAN-View and click the connect button (3rd from the left on the top toolbar). The messages broadcast by the controller are shown in the receive screen if the controller has messages configured for broadcast and the wiring is correct.
- Check the CAN2 protocol manual and enter the messages in the transmit area (CAN ID, length, data). Set the broadcast period at least 2× faster than the Timeout parameter. We recommend a 50 ms cycle time.
The message implementations can be downloaded here and imported into PCAN-View. The example is made for Node ID 4: make sure your Controller id equals 4.
Danger
Do NOT connect the high-voltage power supply to the inverter before verifying the command decoding. An improper message implementation may cause the motor to spin up immediately to high speed, resulting in unexpected and potentially hazardous operation.
Enable periodic command broadcasting by selecting the Cycle Time checkbox in the transmit area, then verify the received command in the controller terminal as described above.
If the V2.5 Set AC Current command is enabled, it defaults to a current reference of 10.0 A. In the terminal under CAN2 values, the second line should display:
Current: 10.0
Modifying the data field of the transmitted message updates the displayed value accordingly. After successful verification you can be confident that the message implementation is correct. Repeat the same verification once the commands are integrated into your VCU.
If command verification fails
- Check wiring and connections.
- Verify message format, including endianness, data length, and field values.
- Refer to the CAN2 Manual for detailed message specifications.
- If still unsuccessful, contact support@drivetraininnovation.com.
CAN2 commanding in production
If the verification above is successful, the controller can be used in production with high voltage applied. We recommend spinning the motor with low current the first time to make sure the operation is stable.
Before continuing to Step 5
- CAN2 interface enabled and controller rebooted
- CAN2 wiring connected and terminated
- CAN2 command decoding verified in the DTI CAN Tool terminal
Step 5 — Closed loop validation
Check the current controller with the motor spinning and the position sensor in use.
The closed loop test must be done after the encoder offset calibration (Step 3).
Before you start
- No active faults, no active limits, Enable signal present (if configured)
- Encoder offset calibration completed
- CAN2 command decoding verified (Step 4)
- Reference Ramp off, MFW Mode None, DQ Axis Decoupling off (temporary)
- An external command source is ready: CAN2 (or analog input). In General, set Control Source to CAN2 or Analog. The command must be a current command: the step is not applied in speed or torque control.
Procedure
- Spin the motor up to the RPM you want to test, using set current commands (or the analog input in current throttle mode). Set a current value with which the motor runs roughly stable around that RPM. No load is needed, free rotation is enough.
- In Sampling → Active Sampling click CLOSE LOOP. The inverter adds the current step to the active current command three times. Use the same step settings (10 A with 20 ms) as in the open loop test.
- DOWNLOAD and open the sample as in Step 2 and check the Iq response against the reference and examples.
- If the result is good (relatively fast target following, reaching the target without too much overshoot), go to a higher RPM and check again.
- Repeat at at least 4 operating points distributed evenly across the base speed range (about every 3000 RPM), starting from the lowest RPM and progressing upwards, up to the maximum RPM where the motor will be used, but stay below base speed.
- If a result is not satisfying, adjust the inductances (as in Step 2, WRITE after each change) and check again. Iterate until you get a satisfying result.
Do not test in the field weakening region
Above base speed the drive works in the field weakening region, where the controller behaves differently and this test is not meaningful.
Compromise between speeds
The best values can differ slightly at different RPM. In that case, tune for the RPM range where the motor is used most.
What else to look at
Verify that the d-axis and q-axis responses are well-decoupled. Cross-coupling between the axes indicates a flux linkage or inductance mismatch.
Step 6 — Flux linkage and restore settings
Finish the tuning: measure the flux linkage, restore the temporary settings and back up the configuration.
- Measure the flux linkage with the built-in function on the Motor Parameters page and write it to the inverter. The motor rotates during this measurement, so keep it free to turn and keep clear of rotating parts.
- Turn DQ Axis Decoupling back on, WRITE, and take one more closed loop sample at the highest tested RPM (see the final check below).
- Turn the Reference Ramp back on in Control Settings → General.
- Leave MFW Mode at None for now. MTPA and MFW are enabled step by step in Step 8, once the remaining calibration is done.
- Set the Control Source back to your normal command source.
- Write the final configuration to the inverter.
- Save the configuration to a file on your PC as a backup.
- Note the final Ld/Lq values together with the motor serial number.
- Test gradually at higher currents and speeds, and watch for noise, faults and temperatures.
Final check with decoupling
The Iq response should be the same or better than without decoupling, and the Id current should stay close to its target during the Iq step. If the result is clearly worse with decoupling, the inductance or flux linkage values are probably wrong: re-check them before using the motor.
Step 7 — Encoder nonlinearity calibration
Reduce torque ripple and AC current ripple caused by the systematic error of the position sensor.
The angle signal provided by the rotor position sensor (resolver or magnetic encoder) contains a periodic, systematic error. Its sources can be mechanical (shaft eccentricity, ellipticity), magnetic (non-uniform pole pitch of the encoder ring), or signal-processing in nature (sin/cos amplitude mismatch, DC offset, quadrature non-orthogonality). This error manifests as integer harmonics of the mechanical rotation period. In FOC, the consequence is direct torque ripple and higher-harmonic current distortion, because the d–q transformation operates on an incorrect rotor angle.
Without the calibration the motor remains operational, but with degraded performance:
| Effect | Description |
|---|---|
| Torque quality | Increased torque ripple |
| Current quality | Increased DC and AC current ripple |
| Power dissipation | Higher inverter losses due to AC current ripple |
Before you start
- Verified position sensor operation
- Validated motor parameters and confirmed correct current controller operation (the published DTI F-MOT parameters are considered validated by DTI)
- Encoder offset calibration is not mandatory but recommended (Step 3)
Procedure
- Rotate the motor at a stable RPM, at least half the maximum operating speed. Using an external drive source is strongly recommended. If the motor must be driven by the inverter itself, existing torque ripple (caused by the uncorrected nonlinearity) may distort the measured curve.
-
Capture a sample once the speed has stabilized: trigger the passive sampling function in DTI CAN Tool, then download the recorded data to the PC using the Download button.
Capturing and downloading a sample with DTI CAN Tool. (1) Trigger passive sampling. (2) Download the captured sample to the PC. -
Open the nonlinearity tab: navigate to Rotor Position → Encoder Nonlinearity.
-
Load the sample file captured in the previous step.
Loading the captured nonlinearity curve. -
Evaluate the curve. Each individual rotation is a thin colored line, their average is the thick red line.
Curve validation
Only apply a correction if the displayed curve is valid. A valid curve resembles a smooth sinusoidal shape and closes on itself (start and end points meet). A curve that does not close or shows an irregular, non-sinusoidal shape indicates a faulty measurement: do not apply it.
The averaging strength is controlled by the filter coefficient: closer to 1 gives weaker averaging, closer to 0 stronger averaging. The default is recommended for most applications.
Example of an invalid nonlinearity curve — not closed and not sinusoidal. -
Apply the curve: click Load to configuration. The applied correction is shown as a thick orange line over the measured data. Click Write in the top bar to save it to the inverter.
Applied nonlinearity correction curve (orange) overlaid on the measured average (red). -
Verify the result: reload the sample file to confirm the applied (orange) curve matches the measured average (red).
- To remove the correction at any time, click Reset and then Write.
Measurement reliability
Capture at least 2–3 independent samples and compare the curves. Good agreement confirms measurement validity and helps identify outliers caused by speed instability or external disturbances.
Assembly dependency — recalibrate when
The correction is specific to a given mechanical assembly. Recalibrate whenever the position sensor is mechanically disassembled or repositioned, the sensor type or resolution is changed, or the motor is replaced. Even re-seating the encoder ring can change the characteristic.
Step 8 — Enable MTPA and field weakening
Enable advanced control features incrementally, not simultaneously, so that any issue can be isolated.
Before you start
- Encoder offset calibration completed
- Encoder nonlinearity calibration completed (recommended)
- Reference Ramp enabled
- A battery is recommended as the DC source for field weakening testing
Phase 1 — MTPA validation
- In Control Settings → General, set MFW Mode to MTPA only.
- Rotate the motor. A small mechanical load may be applied if available. Use passive sampling in DTI CAN Tool to monitor the current waveforms.
- Verify that no faults are active and no abnormal mechanical noise is present. Current consumption should decrease compared to None mode for the same torque output: this confirms MTPA is operating correctly.
- Gradually ramp up to approximately ⅔ of base speed. Verify CAN communication stability: commands must be received reliably and the motor must follow the reference without unexpected behavior.
- If any fault, oscillation, or abnormal noise is observed, stop immediately, investigate, and resolve before continuing.
Phase 2 — Field weakening validation
Use a battery as DC source
A battery (not a power supply) is recommended for field weakening testing, as the regenerative current during deceleration may exceed the absorption capacity of a bench power supply.
- Set MFW Mode to MTPA + MFW.
-
Increase the current target gradually to raise motor speed into the field weakening region. Use incremental speed targets: ramp up to a target MFW speed, then remove the current target and allow the motor to stop completely before proceeding to the next higher target.
Example sequence for DTI F-MOT
- Ramp up slowly to 15 000 RPM → remove target → stop
- Ramp up slowly to 17 000 RPM → remove target → stop
- Ramp up slowly to 19 000 RPM → remove target → stop
- Continue in similar increments until the desired maximum speed is reached
-
At each speed point, capture a passive sample in DTI CAN Tool and inspect the waveforms. Verify that the d-axis current returns cleanly to zero when the current target is removed: this confirms correct field weakening exit behavior.
- Monitor DC bus current and motor temperature at each step.
- If instability is observed (oscillations, overcurrent faults), reduce the maximum speed, re-check motor parameters, and contact DTI support if the issue persists.
Reference Ramp in the MFW region
Keep the Reference Ramp enabled throughout field weakening operation. Sudden current reference changes in the MFW region can cause instability.
Setup complete.