BLDC controller target velocity update rate
Posted: Thu Nov 18, 2021 5:55 pm
I am trying to use the BLDC motor controller, in speed control mode, as a position control with the position loop closed in software (the reason is I need higher resolution position data than can be derived from the hall effect sensors, so I have an encoder connected and reading on the computer).
The software is showing an acceptable update rate reading the encoder and calculating the output (about 2k samples/second), But I find when I go to write the new target velocity to the BLDC controller, it is taking about 20 ms-- calculated by the time from when I call PhidgetBLDCMotor_setTargetVelocity_async to when the completion function is called. So I can only get an effective update rate of around 50 samples/second. It is sort of working, but I feel it needs around at least 200-300 samples/second for smooth position control in my application.
50 samples/second seems slower than what the USB/VINT interface should be capable of, so I'm wondering where the speed limitation is and is there anyway to improve it? I am aware there is a function to set the update rate of data going the other direction, TO the host, but the documentation seems to imply it wouldn't affect the rate at which I can send data to the Phidget (I haven't tried changing it). I am using the 6 port VINT hub connected to the computer over USB.
The software is showing an acceptable update rate reading the encoder and calculating the output (about 2k samples/second), But I find when I go to write the new target velocity to the BLDC controller, it is taking about 20 ms-- calculated by the time from when I call PhidgetBLDCMotor_setTargetVelocity_async to when the completion function is called. So I can only get an effective update rate of around 50 samples/second. It is sort of working, but I feel it needs around at least 200-300 samples/second for smooth position control in my application.
50 samples/second seems slower than what the USB/VINT interface should be capable of, so I'm wondering where the speed limitation is and is there anyway to improve it? I am aware there is a function to set the update rate of data going the other direction, TO the host, but the documentation seems to imply it wouldn't affect the rate at which I can send data to the Phidget (I haven't tried changing it). I am using the 6 port VINT hub connected to the computer over USB.