sanfox
100 mW
- Joined
- Mar 26, 2015
- Messages
- 41
I try to make instruction “How to alight sin/cos encoder of motenergy motor with of without SEVCON”.
Information collected from different sources. Guys, who have deal with it, please confirm this information or correct it.
At the picture below you can see encoder location inside of the ME1302 motor.
So to tune the encoder we must go thru several steps.
1. Mechanical alignment by measuring values with oscilloscope.
Note from motenergy drawing below.
“Sensor timing: with BEMF oscilloscope probe attached to M1 and ground probe attached to M2, the BEMF rising edge zero cross should lead the sin wave (sensor pin A to sensor pin C gnd) zero cross by 20 electrical degrees of the BEMF waveform.”
As the rotor has 8 magnets (4 pole pares) by one rotation of rotor we have four electrical rotations of BEMF. So the 20 electrical degrees of the BEMF equal to 5 degrees of rotor rotation. That is not so simple to hit this value. At the graphs below you can see waves comparison in two scales of x – axis.
View attachment 8
View attachment 7
Using home made oscilloscope attached to soundcard line in measuring waves looks like this.
View attachment 6
Connection of soundcard oscilloscope to the motor showed below.
2. PMAC encoder commission by Sevcon DVT macros.
a) Set peak torque to 0.0 Nm – this should prevent torque being applied to the motor during testing and alignment. This is only necessary if your setup allows you to rotate your motor by another means i.e dynamometer. If this is not possible and you will use the Gen 4 to spin up the motor then leave this set to its current value.
b) Commission Sin Cos Encoder (Check of sinusoidal curve amlitudes )
1). Turn the controller off then on again.
2). Spin the motor with manual power (hand spin the motor).
3). After spinning – use the helper and bring up “pmac encoder”
4). Click “commission sincos encoder”.
5). Turn the controller off then on again.
6). Check sine and cosine peak and trough voltages:
- Peak voltages should not exceed 4.5 Volts.
- Trough voltages should not descend below 500 mV.
- Peak to trough swing on sine and cosine should exceed 1.0 Volts.
3. Adjusting the encoder offset
Note from motenergy drawing:
“If timing the sensor using a Sevcon controller, the encoder position should be within +/-3 degrees of zero.”
1). Verify that peak torque is still set to zero.
2). Ensure that Ud and Uq values are being monitored via a TPDO.
3). If the previous steps were performed correctly, you should now see the Ud and Uq items being monitored
You can now specify a “Filename” (bottom right of the screen capture), while preserving the .csv extension and you are ready to take a trace using the control buttons at the top of the window. Press the “Reset” button (looks like a rewind button), followed by the “Start trace” button (looks like a play button) to start a new trace.
1) AT THIS POINT YOU ARE READY TO TAKE A TRACE
2) In order to be able to read the Ud and Uq values accurately, you need to turn the electric motor externally (using a power drill for example, or the vehicle’s own inertia). If possible to use some external power to turn the motor, then you can start a trace as explained above and collect the information (use the “Stop trace” button – looks more like a pause button). If that is not possible, then you can drive the motor using our Gen4 controller and when reaching full speed, select neutral or remove motoring torque to the Gen4 controller and start a trace as the motor starts to decelerate. Note: You must have 0 neutral braking set and the bridge still enabled to successfully trace this,
3) Once the trace was stopped (it is automatically saved in the “C:\C6944\DVT\veh_if_log” folder), you can use the built in utility (“PMAC Encoder” button on the main page of the DVT Helper) to look at the offset angle.
4) Click on the “Graph Voltage Vectors” button in the “PMAC Encoder Alignment” window and you will be prompted to select the trace file you collected in the previous steps. Once you select the appropriate file, you will see a new window that shows the encoder alignment. In the screen capture above, the encoder is slightly misaligned (you see the graph points form a bar tilted slightly to the left of the Y axis). To correct the encoder alignment, pick a point in the middle of that bar made of multiple points and click the mouse on it). You will see an alignment value display in the textbox below the graph. Press the “Subtract Calculated Angle from Offset” button to commit the new alignment value to the Gen4 controller.
5) Recycle power to the Gen4 controller key switch and repeat the test to verify that the encoder is properly aligned. If the motor is spinning in the forward direction, a well aligned encoder will produce a bar that is positive and along the Y axis in the graph above.
Information collected from different sources. Guys, who have deal with it, please confirm this information or correct it.
At the picture below you can see encoder location inside of the ME1302 motor.
So to tune the encoder we must go thru several steps.
1. Mechanical alignment by measuring values with oscilloscope.
Note from motenergy drawing below.
“Sensor timing: with BEMF oscilloscope probe attached to M1 and ground probe attached to M2, the BEMF rising edge zero cross should lead the sin wave (sensor pin A to sensor pin C gnd) zero cross by 20 electrical degrees of the BEMF waveform.”
As the rotor has 8 magnets (4 pole pares) by one rotation of rotor we have four electrical rotations of BEMF. So the 20 electrical degrees of the BEMF equal to 5 degrees of rotor rotation. That is not so simple to hit this value. At the graphs below you can see waves comparison in two scales of x – axis.
View attachment 8
View attachment 7
Using home made oscilloscope attached to soundcard line in measuring waves looks like this.
View attachment 6
Connection of soundcard oscilloscope to the motor showed below.
2. PMAC encoder commission by Sevcon DVT macros.
a) Set peak torque to 0.0 Nm – this should prevent torque being applied to the motor during testing and alignment. This is only necessary if your setup allows you to rotate your motor by another means i.e dynamometer. If this is not possible and you will use the Gen 4 to spin up the motor then leave this set to its current value.
b) Commission Sin Cos Encoder (Check of sinusoidal curve amlitudes )
1). Turn the controller off then on again.
2). Spin the motor with manual power (hand spin the motor).
3). After spinning – use the helper and bring up “pmac encoder”
4). Click “commission sincos encoder”.
5). Turn the controller off then on again.
6). Check sine and cosine peak and trough voltages:
- Peak voltages should not exceed 4.5 Volts.
- Trough voltages should not descend below 500 mV.
- Peak to trough swing on sine and cosine should exceed 1.0 Volts.
3. Adjusting the encoder offset
Note from motenergy drawing:
“If timing the sensor using a Sevcon controller, the encoder position should be within +/-3 degrees of zero.”
1). Verify that peak torque is still set to zero.
2). Ensure that Ud and Uq values are being monitored via a TPDO.
3). If the previous steps were performed correctly, you should now see the Ud and Uq items being monitored
You can now specify a “Filename” (bottom right of the screen capture), while preserving the .csv extension and you are ready to take a trace using the control buttons at the top of the window. Press the “Reset” button (looks like a rewind button), followed by the “Start trace” button (looks like a play button) to start a new trace.
1) AT THIS POINT YOU ARE READY TO TAKE A TRACE
2) In order to be able to read the Ud and Uq values accurately, you need to turn the electric motor externally (using a power drill for example, or the vehicle’s own inertia). If possible to use some external power to turn the motor, then you can start a trace as explained above and collect the information (use the “Stop trace” button – looks more like a pause button). If that is not possible, then you can drive the motor using our Gen4 controller and when reaching full speed, select neutral or remove motoring torque to the Gen4 controller and start a trace as the motor starts to decelerate. Note: You must have 0 neutral braking set and the bridge still enabled to successfully trace this,
3) Once the trace was stopped (it is automatically saved in the “C:\C6944\DVT\veh_if_log” folder), you can use the built in utility (“PMAC Encoder” button on the main page of the DVT Helper) to look at the offset angle.
4) Click on the “Graph Voltage Vectors” button in the “PMAC Encoder Alignment” window and you will be prompted to select the trace file you collected in the previous steps. Once you select the appropriate file, you will see a new window that shows the encoder alignment. In the screen capture above, the encoder is slightly misaligned (you see the graph points form a bar tilted slightly to the left of the Y axis). To correct the encoder alignment, pick a point in the middle of that bar made of multiple points and click the mouse on it). You will see an alignment value display in the textbox below the graph. Press the “Subtract Calculated Angle from Offset” button to commit the new alignment value to the Gen4 controller.
5) Recycle power to the Gen4 controller key switch and repeat the test to verify that the encoder is properly aligned. If the motor is spinning in the forward direction, a well aligned encoder will produce a bar that is positive and along the Y axis in the graph above.