Could you offer me some suggestions to get other sensor measures into the Matlab API control loop for real-time control? Like how to feedback EMG data to design the X-series motor controller. I know all the X-series motor control and feedback are within the same Matlab code, which is not applicable to collect other sensors data like using DAQ board.
Thanks a lot.
We have done some demos using EMG sensors before, sending the amplified signals to an I/O Board:
In the video above we used the analog voltage input on the I/O board to read the EMG sensor, a MyoWare Muscle Sensor. Based on that analog signal you can design controllers in Matlab of varying complexity. The video above was just a simple velocity control with some thresholding. You could do similar things with torque and I think get some interesting results.
Code: Select all
while true fbk = emgSensorGroup.getNextFeedbackIO(); cmd.velocity = max( emgSensorGain * (fbk.a1-emgSensorOffset), 0 ); cmdGroup.send(cmd); end
Here is one of my another question: I am using the SpeedGoat target machine (running in Simulink) to collect EMG data and joint encoder data, and in order to control the motor in real-time, I need to transfer the live sensor data from Simulink to Matlab API, which is really painful for me. Would you please offer me some suggestions for the data transfer between Simulink and the Matlab API? Or would you please tell me do you have some Simulink API support for the motor control?
I really appreciate your help.
If you can't use an I/O board as Dave mentioned, you would need to send the Simulink data to your MATLAB instance via a UDP block.