Error description
The Short Circuit Error will trigger when the motor current exceeds 120% of the controller's peak current. This value is hardcoded in the firmware and cannot be changed by the user. When the short error is triggered, the controller will immediately disable its power stage to stop the current flow and prevent MOSFET damage. The time that the controller takes to disable the power stage after the high current event depends on the firmware version and can vary from 1 ms to 62.5 us. For firmware versions over 2.1 for F3 products and 3.0 for G4 products, the controller will act on 0.65 us.
Error | Trigger | Action | Reset | Max response time |
Short circuit | Motor current exceeds 120% of the controller’s peak current | The power stage is disabled | The Loop Error is cleared by giving a Motor command = Feedback | 62.5 us to 1 ms, depending on the firmware version |
Short Circuit Error and Amp limit function
The short circuit protection will disable the controller’s power stage before the current flowing through its MOSFETs reaches unsafe levels. This is a drastic measure that interrupts the normal operation of the controller. To avoid this critical condition, the amp limit function attempts to regulate the motor current before it reaches unsafe levels, by adjusting the motor voltage. The effectiveness of the amp limit depends on the motor's specs (R-L parameters) and the current control loop (FOC) bandwidth, since both factors determine how fast the motor current will develop. If the motor current changes faster than the amp limit can control, the short circuit error may eventually be triggered.
Figure 1-2. Amp limiting before short
Float recovery mechanism
Roboteq controllers using firmware 2.1a for F3 products and 3.0 for G4 products or later, support the float recovery mechanism. According to this implementation, the short error will not be triggered immediately when the current exceeds the controller’s maximum limit. Instead, the controller will disable the power stage and wait for a 5 ms period until it returns to normal operation. If the high current event still exists after returning to normal operation, the previous process will be repeated. The number of times that the controller can go to float condition and recover depends on the short error detection setting. If the high current event occurs more than a defined number of times within 128 ms, the short error will finally trigger.
In the following example, the short error sensitivity is set to medium and therefore the short error will be triggered if the current has exceeded the current threshold three times within 128 ms. After 128 the short error counter clears.
Figure 1-3. Float recovery implementation
The Short Error Detection sensitivity can be set with the THLD configuration command as follows:
- If set as High Sensitivity (0, default), then the short error will trigger immediately at the threshold defined by each product’s datasheet.
- If set as Medium Sensitivity (1) then when the current goes beyond the current threshold, the controller deactivates the MOSFETs for 5ms and then recovers. If that happens more than 3 times in a 128ms period, then short fault is triggered.
- If set as Low Sensitivity (2) then when the current goes beyond the current threshold, the controller deactivates the MOSFETs for 5ms and then recovers. If that happens more than 7 times in a 128ms period then short fault is triggered.
Syntax Serial: ^THLD nn, ~THLD
Syntax Scripting: setconfig(_THLD, nn)
Number of Arguments: 1
Argument 1: Threshold Type: Unsigned 8-bit Min: 0 Max: 2 Default: 0 = High Sensitivity
Where:
nn =
0: High sensitivity
1: Medium sensitivity
2: Low sensitivity
Caution
Setting the THLD parameter to 0 in older firmware versions will turn off the Short Circuit protection. Ensure that you modify this parameter only with firmware versions that support the float recovery mechanism. This is applicable to v2.1a or newer for the F3 products, and v3.0 or newer for the G4 products.
Error trigger causes
Short Circuit Error detection is designed to detect a high current event that would typically be related to a short between the motor phases or the controller’s power stage. However, there are more causes that can make the motor current increase other than a genuine short. The motor current can reach the maximum threshold in any case where the controller is incapable of regulating it. This includes a high PID or FOC bandwidth, a very fast acceleration/deceleration parameter, or operating modes where the current control is not enabled (e.g., trapezoidal commutation or Open Loop). Another reason that can make the motor current increase uncontrolled is if the motor specs do not allow optimal control of it. A typical example of that is if the motor’s time constant is below the supported value.
Important Note
Always make sure to consult the motor controller datasheet to ensure that the motor specifications are within the supported range. The parameters to pay attention to are motor resistance and inductance.
Under abnormal conditions, a short error can occur if there is an error in the rotor angle or motor feedback calculation. Both errors can occur due to sensor failure, misconfiguration, or electrical noise in the sensor signals. In the rotor angle calculation error, the motor current will increase due to the wrong commutation, and in the feedback calculation error, the current will increase because of the Closed Loop operation.
Short error | |||||
Normal | Abnormal | ||||
Incompatible R-L | Aggressive FOC or PID | No FOC and high acc/dec | Angle Error | Feedback Error | Real short |
Troubleshooting table
A table with the symptoms, possible causes, and corrective actions related to the short circuit error follows:
Damaged components | ||
Possible causes | Investigation | Corrective actions |
One or more MOSFETs of the controller are shorted. | Measure the MOSFETs body diode by using a multimeter in diode mode. More information about this test method can be found in the appendix. | Controllers with damaged MOSFETs are not repairable, so the controller should be replaced. |
Shorted motor phases. | Check the motor harness for shorts | Replace the motor or fix the bad harness |
Damaged components | ||
Possible causes | Investigation | Corrective actions |
Faulty sensor. A permanet or temporary sensor malfunction can affect the motor angle or motor feedback calculation and result in high motor current that can eventually trigger the Short Circuit error. | Check the sensor signals by using an oscilloscope. Examine them for deviations from the original values. Check the amplitude, frequency response time and pattern. | Enable the sensor error detection. If it triggers, there is a problem with the sensors |
Misconfiguration | ||
Possible causes | Investigation | Corrective actions |
High motor acceleration/deceleration values. High motor acceleration/deceleration values can result in a significant increase in the motor current, which may trigger the short error. | Log the motor phase amps (?PHA) and the motor amps (?A) until the error occurs. Because the phase amps are not RMS, they should be multiplied by 0.707 to compare them with the maximum current of the controller. If the calculated value exceeds the 120% of the controller's peak current the short error will trigger. Please note that sampling frequency of the controller is limited to 1KHz, so a current spike with less duration than that will not be noticeable. | Decrease the motor acceleration/deceleration parameters |
Misconfiguration | ||
Possible causes | Investigation | Corrective actions |
Aggressive PID values. A significant increase in the motor current caused by aggressive PID tuning can trigger the short error. | Log the motor phase amps (_PHA) until the error occurs. Because the phase amps are not RMS, they should be multiplied by 0.707 to compare them with the maximum current of the controller. If the calculated value exceeds the 120% of the controller's peak current the short error will trigger. Please note that sampling frequency of the controller is limited to 1KHz, so a current spike with less duration than that will not be noticeable | Decrease the PID loop bandwidth (Both P and I). Lower speed or position PID gains will result in a smoother increase of the motor current |
Wrong Encoder/SSI resolution configuration. If the sensor resolution is set incorrectly, it can affect the calculation of the sensor angle and motor feedback. This can cause an increase in motor current that may eventually trigger a short error | Refer to the sensor datasheet to confirm the correct resolution. | After setting the correct resolution of the encoder run again motor/sensor setup |
Misconfiguration | ||
Possible causes | Investigation | Corrective actions |
Wrong pole pairs configuration. If the pole pairs parameter is configured incorrectly, the motor's commutation and feedback will be affected, and the motor current may increase, which could eventually trigger a short error. | Check the motor datasheet to confirm the correct pole pairs parameter. The pole pairs value is the number of motor pole pairs divided by 2. | After setting the correct pole pairs parameter run again motor/sensor setup |
Unsupported Specs | ||
Possible causes | Investigation | Corrective actions |
Incompatible R-L values | Confirm that the resistance and inductance of the motor are within the supported range by referring to the controller's datasheet | If the motor's inductance is too low, you may need to add an external coil to the motor phases to match the supported values. Keep in mind that adding external inductance will decrease the performance of the motor. |
Unsupported sensor resolution or speed. The maximum sensor resolution that the controller can support depends on the maximum frequency of sensor input and the rotor's speed | Consult the controller's datasheet to determine the maximum supported frequency for the sensor input. If using quadrature encoders, you can calculate the maximum supported motor speed by considering the maximum frequency of the sensor input and the sensor's resolution as follows: | If a sensor with unsupported resolution is already used, consider running the motor at lower speeds where the sensor resolution is supported. |
Unsupported Specs | ||
Possible causes | Investigation | Corrective actions |
Unsupported electrical frequency. The frequency of the electrical field required to drive a motor is proportional to the number of motor pole pairs and the rotor speed. For motors with a high number of pole pairs or those running at high speeds, the required electrical frequency may exceed the supported range of the controller. | Consult the controller's datasheet to determine whether the maximum electrical frequency required to drive the motor is below the maximum electrical frequency supported by the controller. The maximum operating rotor speed can be calculated by dividing the maximum operating electrical speed of the controller by the number of motor pole pairs. The parameter values can be found in the controller's and motor's datasheets. | The maximum electrical speed will vary depending on the generation of the product. If the desired speed is not supported, consider switching to another product or do not exceeding the maximum supported speed. |
Wrong controller rating. The peak current rating of the controller should be equal to or higher than the peak current specified by the application. | Investigate if the current required to accelerate the motor at the desired rate is lower that the peak current of the controller. | Use a higher rated controller |
Incompatible sensor. There are many parameters that can make a sensor incompatible, including insufficient signal amplitude, nonlinearity, sensor's time response and more. If the sensor signal is improper, it can affect the motor angle calculation and feedback, which can lead to an increase in moto current which eventually will trigger the Short Circuit error. | Check the sensor signals by using an oscilloscope. Examine them for deviations from the original values. Check the amplitude, frequency, response time and pattern. | Enable the sensor error detection. If it triggers, there is a problem with the sensors |
Electrical Noise | ||
Possible causes | Investigation | Corrective actions |
Noise in the motor sensors. Electrical noise in the sensors can lead to incorrect rotor angle and feedback calculation which in turn can create current spikes. | Use an osciloscope to see if the sensor signals are clean of electrical noise. Voltage spikes that have an amplitude higher than 2.5 V can affect the readings | Enable the sensor error detection to check for any issues with the sensor signals |
Other reasons | ||
Possible causes | Investigation | Corrective actions |
The controller operates at the voltage limit. If the voltage provided to the motor becomes saturated, the controller will not be able to adjust the PWM duty cycle sufficiently to control the motor and regulate its current. This situation can cause an increase in motor current. | Log the Motor Power parameter (P) of the controller which corresponds to the amount of PWM voltage supplied to the motor and the motor current (A). Check if the Motor Power is close to 1000 when the short error occurs. | Avoid running the motor at conditions were the motor power is saturated. Consult the motor's Speed - Torque curve to confirm that the motor runs under the operating limits |
Logging parameters
As previously mentioned, in an ideal scenario, the short circuit error should only be triggered in case of an actual short circuit. In reality though, several other factors can result in an increase in motor current. These factors may include a miscalculation of the rotor angle, insufficient FOC control, unsupported R-L values, feedback sensor malfunction, or a high current demand caused by rapid acceleration or deceleration. To identify the root cause of the issue, various parameters can be logged and analyzed accordingly. Below are some suggested parameters to log based on the suspected cause:
Feedback Error:
# c_/?Parameter1 cc_?F cc_?Parameter2 cc_? P cc_?PHA mm_?PHA mm+1_?PHA mm+2_?Parameter3 cc_?FF cc_# 2
Rotor angle error:
# c_/?Parameter1 cc_?F cc_?Parameter2 cc_? P cc_?PHA mm_?PHA mm+1_?PHA mm+2_?Parameter4_?Parameter5_?ANG cc_?FF cc_# 2
FOC Error:
# c_/?Parameter1 cc_?F cc_?Parameter2 cc_? P cc_?PHA mm_?PHA mm+1_?PHA mm+2_?MA nn_?MA nn+1_?FC cc_?FF cc_# 2
The cc, mm and parameter values come as follows:
Cc = motor channel
Mm = 1 for channel 1
4 for channel 2
Nn = 1 for channel 1
3 for channel 2
Parameter1:
- RMP for Open Loop, Torque or Speed mode
- TR for position mode
Parameter2:
- S for Encoder sensor
- BS for Hall, Sin/Cos or Resolver
- SS for SSI sensor
Parameter3:
- C for Encoder
- CB for for Hall, Sin/Cos or Resolver
- CSS for SSI sensor
Note that parameters 4 and 5 also include the argument:
Parameter4:
- C cc for Encoder
- HS cc for Hall
- ASI nn for Sin/Cos, Resolver or SSI sensor
Parameter5:
- C cc for Encoder
- HS cc for Hall
- ASI nn+1 for Sin/Cos, Resolver or SSI sensor
Because both current and angle are changing rapidly, the logs should be recorded at 2 ms period and the logging should stop as soon as the error occurs to avoid overwriting the data.
Below is an example with a Stream command for investigating a Feedback error with Encoder sensor on channel 2:
# c_/?RMP 2_?F 2_?S 2_?P 2_?PHA 4_?PHA 5_?PHA 6_?C 2_?FF 1_# 2
The steps to record the logs follow:
1. Send the Stream command:
2. Clear the logs:
3. Run the motors from the master device or by giving console commands until the problem is replicated.
4. Immediately after the problem is replicated, stop recording. The console can store 10 seconds of 1ms data until it starts being overwritten.
5. Save the log file and open it with a data visualization tool to examine it
Investigation hints
- When operating In a Closed Loop mode, a short error can occur because of a sudden error in the rotor angle calculation or motor feedback. To clarify if the error occurs in the feedback or rotor angle calculation, one useful technique is to test if the same problem occurs in Open Loop as well, where only the rotor angle estimation takes place.
- The logging capability of the controllers is limited to 1KHz. Under these limitations, a current spike might go unnoticed. If there are doubts as if the short error is real, an oscilloscope with a current probe can be used. The trigger should be set around 120% of the peak current of the controller
Below follows a table with an explanation of the logging parameters:
Angle and feedback sensor
Parameter | What to expect |
Sensor angle (SNA) | The sensor angle should increase linearly during sinusoidal commutation. Although, due to logging frequency limitations, this will not be visible at high speeds. An unexpected variation in the sensor angle would imply a calculation error |
Hall status (HS) | If a Hall sensor is used, the Hall status should have a standard pattern when the rotor is commuting in forward and reverse directions. Again here, the limited logging frequency of the controller will not allow sufficient logging of the parameter as the speed increases. An unforeseen sensor pattern would denote a sensor fault. Also, Hall status values of 0 and 7 are irregular. |
Encoder Counter (C) | The encoder counter should be changing in a linear way when the motor speed is constant. Also, by rotating the rotor for one full cycle, the encoder counter should gain 4*PPR pulses. |
Raw SSI-Sin/Cos values (ASI) | This parameter can be logged to get the SSI angle or the Sin/Cos sensor voltage, depending on the sensor used. Similar to the quadrature encoder, the SSI counter should increase linearly then the motor runs at constant speed. The Sin and Cos voltages should be a sine and cosine respectively with similar peak values and a phase difference of 90 degrees. |
Sensor Error counter (SEC) | The value of this counter will increase by one every time a sensor fault is detected. Up to 2.1 and 3.0 firmware versions, this detection works for Hall sensors, Hall+Encoder and Sin/Cos sensors. |
Motor speed and feedback (BS), (S), (CSS) and (F) depending on the sensor used | When being in Open Loop, fluctuation and spikes in the motor speed can be produced by a sensor malfunction. When being in Closed Loop, this fluctuation can make the motor power increase and the short error to be triggered. |
Motor amps (A) and Phase amps (PHA) | The motor current (A) is the RMS value of the current, averaged and reported every 1 ms and the phase amps (PHA) is the sinusoidal current of the motor phases, sampled every 1 ms. Usually before the short error a big increase in the motor current will be observed. |
Torque and Flux amps (MA) | Torque and Flux amps are the vectors deriving from the Park-Clark transformation. When constant voltage is provided to the motor, the Torque Amps should be close to the Motor Amps and the Flux amps should be kept close to zero. During transients, these values can diverge but they should stabilize at an adequate amount of time. |
Motor Power (P) | This is the percentage of PWM voltage applied to the motors, with 100% to corresponding to 1000. When the torque gains are enabled, the PWM voltage will be adjusted to drive the motor current to the desired values. The set point for the current will derive from the Closed Loop error. |
Parameter | What to expect |
Motor command (M) and Ramped command (RMP) | The Motor command is provided by the user, while the Ramped command is the trajectory taking into account the defined acceleration and deceleration. The Ramped command is the value that is used as an input to the Closed Loop operation. High acceleration/deceleration values will create a big loop error that will produce a high current demand that under some conditions can trigger the short error. |
Fault flags (FF) | The short error is being captured in the fault flags parameter. If the only error that has risen is the short, the FF parameter should have a value of 8. |