Motion profile generator.


Closed Thread
Results 1 to 40 of 56

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,631


    Did you find this post helpful? Yes | No

    Default Re: Motion profile generator.

    the idea was easier to implement than I expected. when the setpoint to target distance is less than the ramp_length + the constant velocity increment , rather than any fancy math I just set the setpoint to the target-ramp_length value. I just let the pid work the mechanics out for its self. after that its just a matter or playing the array back backwards to arrive dead on target .
    I have included a poorly annotated sketch of my c routine,
    the motor I want to use can only achieve 300 counts/sec (accel 2000 counts /s/s) and needs to not have a count for at least 30mS to guarantee 0 vel , therefore the pid loop is run @40mS intervals and the profile input is applied on every second pid loop. this works pretty well (motor inertia gives smooth motion) and it stops on target _+ 1 count (pid might need better tuning).
    seems to me that motor/load characteristics really change the entire nature of the problem.
    I'm yet to try this on a real servo motor my pid loops are taking 50-300 uS to run so hopefully a 1mS pid rate is possible , I think I will get some pic18f2431's and have a play with thev qei module
    Attached Images Attached Images  

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,631


    Did you find this post helpful? Yes | No

    Default Re: Motion profile generator.

    I forgot to add that in my application the accel and max v will never change only the direction and distance therefore the ramp array will never need recalculating , for "short" moves i just reduce the number of elements played out. the pid tolerance seems pretty accommodating.
    I want no overshoot no stalling and no hunting +- 4 counts is accurate enough . its controlling the really stiff and jerky air slide on the pid controlled wood heater in the lounge (its a matter of principle)

Similar Threads

  1. Motion Capturing
    By koossa in forum Off Topic
    Replies: 0
    Last Post: - 30th June 2009, 11:05
  2. Suggest a motion sensor Please
    By sougata in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 4th March 2007, 13:22
  3. Wireless Motion Sensors.
    By koossa in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 17th October 2006, 21:57
  4. Need low Profile LCDs
    By Foxx373 in forum General
    Replies: 8
    Last Post: - 26th October 2005, 17:33
  5. Motion Tracking
    By JEC in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 5th November 2004, 00:58

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

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