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.
Hello,
I have been through lab 2c, 5c,5d, 5e, 6a, etc and had no issue.
both sensorless FOC and motion worked great.
my application is doing position control, so i need to have the sensor attached to the motor (slow RPM, max RPM ~200).
i am using the resolver and using this ADI RDC to emulate the encoder output (https://www.analog.com/media/en/technical-documentation/data-sheets/AD2S1210.pdf)
in this case, i configured 10-bit resolution (256 lines - quadrature encoder).
however, my motor does not run, it pulled in a lot of current (1.5A instead of 0.11 A) and vibrated.
i have been searching the forum and found others having the same problem as me, but unfortunately, I am not sure very what they did.
to ensure the encoder see the correct output, I did not run the system, but manually spin the motor shaft and observed both mechanical and electrical angles from
st_obj.vel.conv.Pos_erev and st_obj.vel.conv.Pos_mrev.
what i observed is that the st_obj.vel.conv.Pos_erev goes from 0 to 1 max and reset back to 0 as i rotate the shaft.
however, the st_obj.vel.conv.Pos_mrev just incrementing and never return to 0. Is this normal behavior?
another observation is that the mrev is always half of the erev.
for example, if erev completes 1 revolution, the mrev is only half. see attachment.
i am uploading the CCS snap shot of mrev and erev as well as other configuration in user.h file, but I am not sure if it loaded as this new interface does not have option to select file, but rather just drop in.
can someone please help me understand my issue?
Thanks and Best Regards,
Henry
another strange thing that i observed while manually rotating the shaft in the same direction on st_obj.vel.conv.Pos_mrev is that it goes from 0 to 10 max and then goes back down to -9.xyz, ..., -5.xyz, ... -1.xyz, to zero and then repeat again. is it the intended behavior for st_obj.vel.conv.Pos_mrev?
i also look at mechanical angle from ENC_getElecAngle(encHandle) function and it looks like it rotates between 0 and 1. however, it seems to be half behind electrical angle. i think this makes sense because i have 4 pole motor or 2 pole-pair. the elec angle = (mec angle * Gain + offset) * pole-pair.
in this code, i see offset = 0.
Gain = 4 * timeslot. in my case, timeslot = 256. So gain is 1024 for 10-bit resolution.
manually cranking the shaft, i see the following relationship of mech ENC_getElecAngle(encHandle) and elec angle st_obj.vel.conv.Pos_erev
Elec Angle Mec Angle
0.166015625 0.0830078125
0.330078125 0.1650390625
0.5 0.25
0.662109375 0.3310546875
0.83203125 0.416015625
0.99609375 0.498046875
0.1640625 0.58203125
and repeating.
so it seems that the elec and mec angles are rotating.
can someone please help me understand what's going on with lab 12a/b?
Thanks,
Henry
hello,
i finally figure out what happened. i will post my solution here so that anyone else stumbled on the same problem can hopefully find this useful.
Thanks to this post: https://e2e.ti.com/support/microcontrollers/c2000/f/c2000-microcontrollers-forum/449014/problem-with-instaspin-lab12a-sensored-inertia-indentification-with-bldc
the way the resolver mounted on the back of the motor causing confusion on term of direction.
the instaspin codes say counter clock is positive direction, but resolver said the opposite.
i can either change the phase connection or switching A and B at the input of encoder.
either way works fine and i am now able to run lab 12a / b.
Henry