This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DRV8305: General motor question

Expert 1145 points
Part Number: DRV8305
Other Parts Discussed in Thread: DRV8334, DRV8323

Tool/software:

Hello,

I just make some motor measurements and wanted to find out the axis direct current, so the one with no torque when current applied.

My motor has 7 pole pairs.

I connected phase A&B together and applied 2V from Power Supply and applied 0V to phase C, then moving the shaft i can feel 7 positions (current was about 2A).

Are those positions the ones with 0 posiiton (electrical 0 for FOC, so called direct axis)?

I am asking because when I did the same but connecting A&C to 2V and B to 0V i has also 7 positions but different ones, they not aligned with the previous 7 ones...

Also, if I apply i.e. 5A D-Axis cuerrent (with my FOC Controller I can apply only D-Axis current separatelly) will i get shat aligned with D-Axis?

Regards,

Adam

  • Hi Adam,

    In FOC, the direct and quadrature (d-q) axes are a rotating reference frame with respect to the zero position of the rotor, i.e. they spin with the rotor. You will need to use the Clarke and Park transforms to measure the current on the direct axis, and to use these transforms you will also need to know the position of the rotor. You can refer to this app note for more details on the math: https://www.ti.com/lit/an/spraby9/spraby9.pdf?ts=1718720172474&ref_url=https%253A%252F%252Fwww.google.com%252F. Wikipedia also has a pretty good series of articles on FOC and the transforms: https://en.wikipedia.org/wiki/Vector_control_(motor). The transforms specific to your motor are likely to be found in your FOC controller algorithm if available.

    To answer your other questions, the 0 position you are looking for will occur when there is no torque on the rotor, i.e. the rotor is aligned with the phase that is turned on. I believe this means that only one phase can be on for the rotor to align with. As for aligning with the D-Axis, I assume you are referring to the direct axis? If so, this axis rotates based on the position of the rotor as discussed above and thus alignment doesn't really apply in a physical sense to an outside observer (since the rotor is permanently aligned with this axis by definition).

    Please let me know if this answers your questions,

    Davis

  • Thanks, this gives me some answers but not all ;)

    I want to ask how to determine 0 position (to which d-q reference frame refers to) having the motor and power supply only, is that possible?

    If I for example has a motor 3-phase pmsm. Then I connect 1 phase to positive power supply and other phase to negative power supply then the rotor align to some position an keeps the position firmly (so I can not freely move the rotor with hand, according to the current) In that case - is the rotor now aligned with 0 position?

  • Hi Adam,

    Yes, it is possible to determine the 0-position with just the motor and the power supply, but note that this 0-position does not relate to a specific orientation of the rotor. This is because the d-q frame is fixed to the rotor's position - the d-axis represents the flux of the permanent magnet rotor, meaning that the rotor is essentially always in the 0-position with respect to the d-q frame. If you are trying to determine the d-current when the rotor is aligned with one of the poles and no torque is applied to the q-axis, please refer to the equations and diagrams shown in section 3.1 here. The physical position of the rotor in this 0-position will change depending on which axes are being powered. If you are looking for the absolute zero physical position of the rotor, that will depend on which phase you wish to designate as the reference point (typically the U or A phase). Are you looking to characterize your motor with the current value or do you need to set the phase axes (UVW or ABC) to find the actual position of the rotor?

    Additionally, I notice that you are using the DRV8305. We have some newer devices such as the DRV8323 and DRV8334 with similar features, might I ask which features you are particularly interested in with the 8305?

    Best,

    Davis

  • Hi,

    I just want to find the encoder offset at te power up.

    Encoder gives me position, then I transform it to sin and cos and this goes to Part/Clark transforms

    So I believe after power up I need to:

    1. Set the rotor to some specific position that would be treated as 0 position

    2. read the encoder value (offset)

    3. Set this value read from encoder as new 0 position.

    I tried to follow your explanation prefious but still it seems little hard to understand concept ;-)

    How to do the step 1? To which position I need to set the motor to find encoder offset?

    Regarding DRV8305N this is a part i used some time previously in another project, now in new project i just choose this but maybe i look at DRV8323 and DRV8334 after your suggestions

    Thanks, 

    Adam

  • This is one way of finding the encoder offset, however due to cogging it might not be accurate, and in case the rotor is blocked during the calibration sequence you will get the wrong offset. I suggest spinning the motor slowly in both directions across at least 3 physical revolutions, and take the average of the error (commanded position - encoder position). During the calibration process you should also check that the motor is actually following the commands, one way to do this is to check the change in position as reported by the encoder is the same as the change in position commanded, plus some margin for noise and cogging.

  • This is a good way to localize the position of the rotor before starting into closed loop control. TI provides software for the C2000 controller that includes sensored FOC control, with a test project for encoders: https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1097684/tms320f28379d-best-way-to-get-started-with-sensored-or-sensorless-foc. Keep in mind whether you have an absolute or relative encoder, as the relative encoder will likely restart at or near 0 automatically every time you power cycle it.

    For more information on the steps of motor control, you can also refer to this video which includes steps for both sensored and sensorless control: https://www.ti.com/video/6269668413001#tab-1. The section on sensorless startup might provide some insight on a possible solution to localizing the rotor in the case that motion on initialization is undesirable.