How to configure a dual-loop application

How to configure a dual-loop application

Problem

I have quite a complex system that I can't figure out how to configure. I have a rotatory brushless motor with a certain feedback device for commutation, a gearbox in the motor shaft and an absolute encoder on the output shaft of the system. I don't know how to configure all this in the MotionLab software all according to my requirements. What do I need to do?

Clarifications and checkings

  • This article describes (step by step) the manual process of configuring a rotatory brushless motor with a certain feedback device for commutation and an SSI absolute encoder for positioning/velocity control with very optimal performance. A more automatic way of doing this configuration could be by using the Configuration Wizard with all the implications that this might have.
  • This step by step process assumes that your motor does not have a brake. If you do have one, ensure that you have configured it correctly like it is shown in the following article before proceeding with any configuration: How to configure the brake of your motor.
  • This step by step process assumes that neither the motor or the power stage of the drive is damaged. Please, if you are not sure of this, follow the instructions in the How to know if the motor phases or the power stage of the drive are damaged article in order to verify it.
  • This step by step process assumes that your feedback devices are working properly and no noise is coupled to the feedback lines. Please ensure that you have checked this by following the step process described in How to know if the feedback device is working properly.
  • This step by step process assumes that there is no digital input mapped to the "Motor Enable" functionality of the drive. If that is the case, ensure to have the digital input ON (if active high, otherwise OFF) in all the steps that involve movement during the configuration or otherwise those steps will fail.

Steps

  • Once you have connected to the drive, go to the Actuator window and set the right parameters for the Motor Type, Position sensor and Velocity sensor. Your window should look like the following:

  • Then, you need to go to the Motor window in order to input all the motor data from its datasheet (it should all be in there). The parameters that you need to input mandatory are: torque constant, continuous current, peak current (if known), max permissible speed and motor pair poles. The inductance and the resistance can be obtained in latter steps with the system identification included in the torque tuning stage and the rated torque can be determined by the product of torque constant and continuous current. An example of motor parameters for a brushless motor could be the following:

  • The following step is to calibrate all the different sensors in the system, including those used for commutation and those used for positioning/velocity control. Let's see an example of how that would apply if we had the following sensors: digital encoder as commutation sensor, digital halls as reference sensor and the SSI absolute encoder for position/velocity control.
  • In no specific order, you need to configure each one of the feedback devices (one at a time) until all of them are configured properly. Let's start with the SSI encoder for example. With the SSI encoder, you would need to input all the parameters that come from the datasheet: Type, Size, Codification, Max. clock rate, Single-turn bits, the Single-turn start bit, Multi-turn bits, Multi-turn start bit and Endianness. If you are not familiar with all these parameters, here is an example of the frame of an SSI encoder and how all these parameters can be extracted:

  • For such encoder, the parameters would be:
    • Type: 3 status bits at the end of the frame
    • Size: 27
    • Codification: specified in the datasheet
    • Max. clock rate: specified in the datasheet
    • Single-turn bits: 14
    • Single-turn start bit: 3 
    • Multi-turn bits: 9
    • Multi-turn start bit: 18 
    • Endianness: MSB
  • Finally, in order to configure the Polarity, please follow the instructions that are explained in the article How to calibrate the polarity of your feedback manually. The following picture shows an example of a configuration of an SSI encoder configured in MotionLab:

  • Next would be to configure one of the 2 remaining sensors, even though right now the different windows to do that are not available. In order for them to show up (the windows to configure both incremental encoder and hall sensors), you need to go to the Commutation window and set them as Commutation sensor and Reference sensor respectively:

  • After that, both feedback can be configured in their respective window. Let's start with the incremental encoder which can be configured in the Digital Encoder window. First, this includes setting the Encoder type, the Sensor resolution and the Noise filter. The first 2 you can get directly by taking a look at the datasheet of the encoder and the third on you can determine it through the checking procedure that is explained in the article How to know if the feedback device is working properly. Finally, the Polarity can be determined either with the Auto identify tool or through the manual procedure explained in the article How to calibrate the polarity of your feedback device manually. An example of how to do it with the Auto identify tool is shown in the following pictures:
 
  • Finally, we would need to configure the remaining sensor (if there is any), which in this case are the digital halls. This can be easily done in the Digital Halls window by either using the Auto identify tool or following the manual procedure explained in the article How to calibrate the polarity of your feedback device manually:
 
  • Once all the feedback devices have been properly configured, it is time to calibrate the commutation. Starting from the setting that we set a few steps before, the only remaining thing to do is to calibrate the initial commutation angle by using the Calibrate button. Start by using a small amount of torque and keep increasing it until you get enough movement to get the test finished successfully.
 
  • Before verifying that the commutation has been done correctly, it is worth showing as well what would be the procedure if only feedback was available for commutation and no reference sensor was available. Let's take the case in which we only have a digital encoder. In such case, you would need to perform a forced alignment procedure (also known as "wake and shake") after every power cycle of the drive in order calibrate the initial commutation angle before commanding any movements. These would lead to some changes in the Commutation window: you would need to select "Digital encoder" as the Commutation sensor and "Forced alignment method" as the Initial angle determination method. As far as the forced alignment parameters are concerned, here are some basic guidelines in order to choose its values:
    • Process time: 2000-5000 ms 
    • Process current: 5-20% of rated current if done with the motor without a load. If there is a load on the shaft, increase gradually beyond 20% until you get enough movement to get the alignment process done correctly.
    • Process tolerance: 5-10%
  • An example of the Commutation window for a system like this one could be the following: 

  • After having successfully calibrated the initial angle determination method, it is of good practice to do a quick verification to ensure that the commutation has indeed been properly calibrated. This can be very easily done by using the Open-loop with the commutation sensor mode from the Move window while plotting in the Scope both position and velocity actual values. Try applying different target voltages in both directions and check that the motor is spinning at the same speed (for a certain target level) in both directions. If the motor does not spin the same way in both directions, if it spins erratically in one direction or any other strange anomaly please repeat the previous step and recalibrate the initial commutation angle. An example of this verification procedure is shown in the following image.

Another example of dual-loop applications

Here are some examples of feedback combinations that could be used to create dual-loop applications and that can be configured through the same process as explained before:
  • Sin-cos encoder as commutation sensor and SSI absolute encoder as reference sensor if there is no gearbox in the system (otherwise the SSI will not guarantee proper commutation as reference sensor). Both feedbacks can be used for position/velocity control.
  • Digital halls as commutation and reference sensor and SSI absolute encoder for position/velocity control. It does not matter if there is a gearbox or not in the system. Depending on the motor nature (BLDC or BLAC), the efficiency and performance of the motor will vary.
  • Digital/sin-cos encoder as commutation sensor and SSI absolute encoder for position/velocity control after a gearbox. In such a system, it will always be needed to perform a forced alignment procedure after every power cycle of the system in order to calibrate the commutation before any movement can be commanded.

    • Related Articles

    • How to use the Open-loop mode

      Problem I have my motor (and optional feedback devices) properly configured and I am wondering if I can drive the motor in open-loop mode. Is the Open-loop mode of operation meant to be used in end-applications or does it have a specific purpose that ...
    • How to configure a linear actuator

      Problem I have a linear actuator (combination of rotatory brushed DC + gearbox that transforms into linear movement) with a certain type of feedback device but I don't know how to properly configure it and tune it. What is the right process that I ...
    • How to configure a brushed DC motor

      Problem I have a rotatory brushed DC motor with a certain feedback device but I don't know how to properly configure it and tune it. What is the right process that I need to follow? Clarifications and checkings This article describes (step by step) ...
    • How to configure a rotatory brushless motor with resolver feedback

      Problem I have a rotatory brushless motor with resolver as feedback but I don't know how to properly configure it and tune it. What is the right process that I need to follow? Clarifications and checkings This step by step process assumes that your ...
    • How to configure a linear voice coil motor with analog signal feedback

      Problem I have a linear voice coil motor with an analog signal as feedback properly wired to my drive but I don't know how to properly configure and tune it. What is the right process that I need to follow? Steps Once you have connected to the drive, ...