Results 1 to 4 of 4

Thread: Sinusoidal Servo control using MATLAB

  1. Sinusoidal Servo control using MATLAB

    I am working on a project which involves actuation of a part that has to move sinusoidaly. Suppose, I have to continuously move my servo to and fro between two positions such that the rpm is not fixed through out the cycle, rather it has to vary according to different mathematical functions like a sine function.

    Is it possible to actuate Dynamixel 12A in similar fashion using MATLAB only?

    Any help would be great

  2. #2

    Re: Sinusoidal Servo control using MATLAB

    The best you can do is to send a very high speed stream of updates -- say, 100 Hz -- for where you want the position to be.

    Let the control algorithm and damping inherent in the servo then drive the speed curve. This will given okay results, although they will be jittery at low velocities. This is not so much because of the control algorithm, but because of the limited resolution in the position sensor (1024 or 4096 for the AX / MX series.)

    You can also attempt to send a "target velocity" update together with the "target position," but I've found that to be very hard to get to work smoothly; presumably because of the same encoder resolution problem multiplying out by the small size of the control loop timestamp.

  3. Re: Sinusoidal Servo control using MATLAB

    Hi Jwatte

    Thanks for the reply. Are you suggesting that I need to implement the sine function as an array of elements with 100 data being written into the motor per second through MATLAB. I know with lower resolution of AX/ MX series controlling becomes very difficult.

    Today, I tried with Arduino and Matlab, the servo control works fine but with Matlab only (which my professor wants since we need to reset arduino with new code), it becomes difficult. I used the ReadWrite.m (protocol 1.0) provided by the Dynamixel Github to actuate the motor. I am able to control the goal position and speed but not able to give speed as a variable between two goal position.

    Can you look at the code once and suggest any modifications to have sine output?

    I am very new to this field and have just started with coding in MATLAB. So any suggestion or tutorials to study will be of great help.

    Thanks and regards
    Last edited by shulnak09; 02-10-2019 at 08:25 PM.

  4. #4

    Re: Sinusoidal Servo control using MATLAB

    I don't know how fast Matlab can run -- can it run at 100 Hz itself? If not, then you're going to have to live with whatever it can do ...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Question(s) Problem with control of Dynamixel AX-12A by using MatLab
    By adamlevine in forum Robotics General Discussion
    Replies: 1
    Last Post: 08-02-2018, 03:43 PM
  2. Interesting Hack servo v3.00 - Get full PID position and speed control from your hobby servo
    By Antonb in forum Mechanics / Construction
    Replies: 20
    Last Post: 06-27-2010, 10:24 AM
  3. Control ESC as Servo
    By masoric in forum Arbotix, Microcontrollers, Arduino
    Replies: 6
    Last Post: 10-07-2009, 10:09 AM
  4. My Phidgets servo control
    By Semicton in forum Project Showcase
    Replies: 10
    Last Post: 04-16-2008, 01:37 PM
  5. Question(s) servo control?
    By Wingzero01w in forum Arbotix, Microcontrollers, Arduino
    Replies: 6
    Last Post: 04-12-2008, 09:41 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts