Go to Post The world isn't changed by people playing it safe. - Andrew Y. [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 15-06-2013, 11:05
bigar bigar is offline
Registered User
no team
 
Join Date: Jun 2013
Location: Argentina
Posts: 1
bigar is an unknown quantity at this point
Trapezoidal motion profile with fixed-point math

Hello friends,

I'd like to introduce myself. My name is Gabriel, I live in Argentina (excuse me please if my english isn't good), I study electronics engineering, and my hobby is embedded systems designing and programming.
Recently I've been working with a DC motor servo control. Finished PID loop, and now working with motion profile.

Architecture is based on LM628, but implemented with dsPIC33FJ microcontroller. Because it is a fixed-point processor, I am doing all math that way. No problems with PID loop. But with motion profile I find quite difficult to manage "discretization accumulated error". I mean, when doing these integrations:
position1 = position0 + velocity0 + acceleration/2;
velocity1 = velocity0 + acceleration;

discretization error (large enough with Q15.16 fixed-point) integrates too, and the final position isn't correct.
Michrochip 0718 appnote deals with this, just commanding final position when trapezoidal profile finished; but obviously this produces a little jerk because of the error.

I taked a look a this thread:
http://www.chiefdelphi.com/forums/sh...=trapezoida l

and learned a lot; but people uses floating-point here and that's not exactly what I'm looking for.

Any help is appreciated. Have a nice weekend.

Gabriel
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 10:32.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi