I was not able to find a similar topic but am kind of stuck with my problem.
What am I doing?
I am trying to control the speed of a BLDC Motor very precisely but have to control the position of the spinning motor shaft while rotating.
On the shaft a disc is installed with two slits shifted 180 deg from each other. I need to be able to synchronize the position of the slits to an external signal of 5 Hz and then keep spinning with a constant speed of 150 RPM.
I am using a PLL Loop on an FPGA to determine the phase shift of the motor which is controlled via PID and working fine. The phase shift is determined 20 times per revolution from an AB-encoder signal which gives a control frequency of 50 Hz. The PLL on the FPGA generated a PWM signal which is resolved by an ESC and controlling the BLDC.
The motor is spinning now at a constant speed of 150 RPM with sufficient jitter. For the position control I am using the signal of the X-encoder which is generated once per rev. I am now synchronizing the X-encoder to the 20 AB-encoder brackets.
I tried now to simply delay the signal of the X-encoder by an specific amount of time, to have create positioning of the slit on the spinning disc. However, with this logic I am only able to delay the position of the slit in the matter of (1/20) of the disc, because of the other signal from the AB-enc. I should be able to position the slit position from -180 to +180 degrees compared to the external 5 Hz signal.
Has anyone experience with such a parallel position and speed control of a BLDC?