Position controller algorithm

G

Thread Starter

George

Hi,

I am trying to design a position controller (PID) for controlling a PMSM motor. I am using TI's 320LF2407 dsp processor with spectrum digital's DMC 1500 board.

My idea is to implement a space vector controlled scheme to provide commutation to the PMSM motor. I have seen the reference design which implements a speed controller (by TI) for this. Now I need to provide a position control loop in addition to the speed control.

The constraint is to provide a trapezoidal speed-time response i.e. the motor should start with a linearly increasing velocity, then hold the velocity steady and then linearly decrease the speed as it reaches the target position.

Is there any method to achieve this speed-time response? Is feed forwading the required velocity/Position profile to the respective controllers a possible solution??

Any help in this regard would be appreciated.

Regards,

George
 
C
George:

Almost all standard controllers split the task into two separate parts: the trajectory generator and the position loop. The job of the trajectory generator is to generate a new commanded position (set point) each servo cycle based on the desired action; the job of the position loop is to compare this set point to the measured actual position and compute an output command that tries to drive the difference to zero.

The trajectory generation algorithm itself is split into two parts: planning and interpolation. Planning takes a general description of the move -- destination, velocity, acceleration, etc. -- and generates equations of commanded motion (usually polynomial functions of time). The interpolation solves these polynomial equations each servo cycle, updating the time for the cycle.

Academic controls courses barely ever cover trajectory generation, so it doesn't get the attention it deserves, and there are few good references. In general, I find robotics texts the best source of information on these.

Curt Wilson
Delta Tau Data Systems
 
Thank you very much Curt for your help. I had a vague idea that something like a trajectory generator would be needed but didn't know how to do it exactly. Now thanks to you I know what approach to take.

Since I don't have access to robotics texts, I would be grateful if you could tell me some sites on the Net where I can read about how to design a trajectory generator.

Regards,

George
 
P

Pete Darnell

Hi George,

You can certainly use a trapezoidal profile for position control on the LF2407. Are you doing closed loop control or open loop? If closed loop, use a PID to track velocity to max velocity till you get within dX of your destination. Then track velocity to zero. dX = is Vmax/(2*timeToMax).

By the way, we sell VisSim/Embedded Controls Developer, a block diagram language with digital motor control blocks to perform space vector control of ACI and PMSM motors both simulated and codegen'ed. You can download a trial at www.vissim.com/downloads/demos.html. This will let you try different control strategies off line.

If you have more questions you can reach me at [email protected]

Regards,
Pete Darnell
 
T
Go to the control.com web site.
Under luminaries, select BULL!
Under tutorials select Command Generation.
Maybe this will help you get started in the right direction.

Tom
Thomas B. Bullock, President
Industrial Controls Consulting Div.
Bull's Eye Marketing, Inc.
104 S. Main St., Suite 320
Fond du Lac, WI 54935
Ph: 920: 929-6544
Fax: 920: 929-9344
E-mail: [email protected]
 
C
George:

I didn't find anything useful in a quick web search, but the concept is very simple. For a trapezoidal profile move, you will need to create and solve second-order position equations:

p(t) = p(0) + v(0)*t + (1/2)*a*t^2

You will have three of these equations, one for the accel, one for the slew, and one for the decel (skipping the middle one for short moves).

Your move-planning algorithm will have to compute p(0), v(0), a, and tmax for each segment. Your interpolation algorithm will have to increment t each servo cycle and compute p(t). If, in incrementing t, it becomes greater than tmax, you must load the next equation first.

A basic algorithm is really very simple. I give it to undergrads as a homework assignment.

Curt Wilson
Delta Tau Data Systems
 
hi wilson

I am also working brushless dc motors with Trapezoidal back-emf.I want to implement the Trapezoidal motion profile can you elaborate more
about the trapezoidal motion profile and its implementation.if you have any notes concerned to it or you remember the site name where we can find
any.please share with us.

my mail id:[email protected]
:[email protected]

thanks in advance
with regards
mohd sulaiman
 
Hi Curt; using a trapezoidal profile move, I have the ff data for accln slew and decel for a lineqith coord's (5,6), (24,32). Fmax=1000counts/s , Tmin=2ms and A=50000counts/s2. How can I implement this on a coordinated independent control system (separate controllers for each axis)? For instance for the x axis controller, do I send x(k) and Vx(k) at each interpolation time interval? Thanks

clock Feed Interpolation x y
pulses counts/s interval (ms) counts counts
k
1 0 0 5 6
2 447.21 8.9 6.19 7.63
3
4
5
6
7
8
9
10
11
12
13
14
15
16
 
Top