Other Parts Discussed in Thread: MOTORWARE
I have an unusual mechanical configuration and I’m hoping to get some direction before I go forward and run right off the cliff.
We have a BLDC motor connected to a crankshaft and a linear bearing. The linear part has a linear encoder on it.
We want to run the device in two modes:
- Constant linear velocity. We want to rotate the BLDC motor approximately at 240 RPM, but vary the target speed signal so that the linear part moves linear in velocity as much as possible. (Of course it will be nonlinear at both extreme ends where the crankshaft is causing the linear part to slow down, stop and reverse motion. That’s not a problem.)
- Position control mode. We want to move the linear part to a location and have it stay there and then move it to another location.
We don’t want to have to have both a linear and a rotary encoder, so I’m thinking about using sensorless FOC to estimate the rotor position, and using the linear encoder to generate an error-in-position value for the position control loop.
Things are going to get crazy if I try to use the linear encoder to estimate rotor position since the linear values increase for half the crank rotation and then decrease for the second half of the crank rotation. I’d have to really dig into the ENC module and especially ENC_calcElecAngle() to somehow use the FOC-calculated STPOSCONV_getPosition_mrev() and use both the estimated rotor angle and the linear encoder value to back-calculate a new rotor angle for the rest of the control loop.