DSPRelated.com
Forums

Coordinated Motion

Started by James Williams October 8, 2004
Hello,

This may be a bit off topic, but I ddin't know where else to ask the
question. How do motion control systems coordinate 2 or 3 axis of motion
when they use servo motors? Do they just calculate the velocities of each
axis with respect to the major axis? If so, how can they be sure that each
axis is truely coordinated in postion?

I know how to do it with stepper motors, just using the bresenham algorithm.
This one is easy. I just don't understand how it is down when using servo
motors.

If you have a good reference site on this subject, please let me know.

Thanks,


James


James Williams wrote:

> Hello, > > This may be a bit off topic, but I ddin't know where else to ask the > question. How do motion control systems coordinate 2 or 3 axis of motion > when they use servo motors? Do they just calculate the velocities of each > axis with respect to the major axis? If so, how can they be sure that each > axis is truely coordinated in postion? > > I know how to do it with stepper motors, just using the bresenham algorithm. > This one is easy. I just don't understand how it is down when using servo > motors. > > If you have a good reference site on this subject, please let me know. > > Thanks, > > > James
Bresenham's algorithm is new to me, but I've been drawing straight lines with integer arithmetic for years, using an algorithm that merely expresses one of two ways it was done earlier with discrete electronics. Binary (or decimal) rate multipliers (BRMs) and digital differential analyzers (DDAs) are useful for line generation. DDAs are more elegant in hardware and more easily expressed in software. Moreover, when cross coupled, they can generate arcs. Stepper or continuous servos behave pretty much the same; only the types of errors differ. With either, following lines or curves is best done with a position servo. Jerry -- When a discovery is new, people say, "It isn't true." When it becomes demonstrably true, they say, "It isn't useful." Later, when its utility is evident, they say, "So what? It's old." a paraphrase of William James ���������������������������������������������������������������������
"James Williams" <james@williams-eng.com> wrote in message 
news:ck6u4q$eh2b$1@news3.infoave.net...
> Hello, > > This may be a bit off topic, but I ddin't know where else to ask the > question. How do motion control systems coordinate 2 or 3 axis of motion > when they use servo motors? Do they just calculate the velocities of each > axis with respect to the major axis? If so, how can they be sure that each > axis is truely coordinated in postion? > > I know how to do it with stepper motors, just using the bresenham > algorithm. > This one is easy. I just don't understand how it is down when using servo > motors. >
James, I'm not sure I fully understand where you'd like to go with your question. So, I'm speculating a bit here: I'll be perfectly general and mention a 6-degree-of-freedom control system as might be used for an airplane. The six degrees of freedom related to 3 axes are: - x,y and z position (where it is in space) - alpha, beta and gamma angular position (how it is oriented in space) which might be roll, pitch and yaw There can be motion in 3 axes and there can be rotational motion around those three axes. So, if x is forward then roll is about the x axis; if y is port/starboard then beta is pitch; if z is vertical then gamma is yaw. The control problem is generally to control all of these positions and perhaps their velocities. Often acceleration is used to damp the control system to avoid overshoot. Often acceleration isn't available, etc. etc. A perfectly instrumented system would have x,y and z position, velocity and acceleration indicators which might be had from GPS or an embedded inertial system. Same thing for pitch, yaw and roll. So much for sensors. On to control surfaces / motors / gravity / "actuators" in general. One decides how the body will be controlled with a collection of these things. Roll can be "controlled" by a low center of gravity for example. Finally, we decide how the actuators will be driven as a result of combining the sensor outputs - the "control equations" if you will. In so doing, we realize that the motions may be coupled. Here's an example of yaw control and roll control that are mixed in the same control actuators: Imagine a rocket with a pair of rudders on the tail - one rudder on the top and the other on the bottom. If the rudders are locked together, they can provide yaw control and have no affect on roll (until you get into some unusual geometries and motions ... e.g. if the rocket is sideslipping and rolled then the rudders could generat a net roll force). However, if the rudders are driven separately so that there can be some displacement in their angular postion, then the difference or splay can impart a roll torque. So, it's possible to control roll and yaw with two rudders. Further, we realize that if the body has a nonzero roll angle that the rudders become elevators and, assuming there are elevators, the elevators become rudders. So the rocket might have control signals that are a function of yaw error and roll error: Proportional control of yaw might have a control equation like this: yaw control = K*(yaw error) This might work fine. However, realizing that the rocket might be rolled somewhat, we might have a control equation something like this: yaw control = K*(yaw error)*cos(roll error) +G*sin(roll error) pitch control = H*(yaw error)*sin(roll error) +L*(pitch error)*cos(pitch error) roll control = M*(roll error) assuming it's independent of yaw or pitch actuator commands. Then, as above, if we want to mix yaw and roll controls we have someting like: upper rudder control = yaw control + roll control lower rudder control = yaw control - roll control This is to give an idea of what might be done. My point here was to show that the system design has as much to do with what you end up with as the mathematical approach that's used to generate the commands. In the end, we might assume that all of the six degrees of freedom are coupled and have sensors and control equations that take everything into account. In the ultimate mathematical limit, you might have equations that combine weighted values of x,y and z errors, error rate and error acceleration; angular errors , error rate and error accelerations for each degree of freedom and mix them according to the configuration of the actuators. As a practical matter you would reduce the complexity of these equations in those cases where the coefficients were negligible or unecesary. For example, as above, there may be *no* roll control actuators at all if a low center of gravity is used to control roll (and maybe pitch) as in a surface ship or automobile - then you'd have no sensors and no control equation terms. Often you don't have the luxury of measuring acceleration so there is no sensor-driven / actuator-driven damping .... and so forth. Oh yes, then there are the dynamics / physics of the thing being controlled and of the actuators and the related things one does for stability, responsiveness, etc. But I guess you understand that part, eh? You might Google on "six degree of freedom" to see what you find there.... Fred
Fred Marshall wrote:

> "James Williams" <james@williams-eng.com> wrote in message > news:ck6u4q$eh2b$1@news3.infoave.net... > >>Hello, >> >>This may be a bit off topic, but I ddin't know where else to ask the >>question. How do motion control systems coordinate 2 or 3 axis of motion >>when they use servo motors? Do they just calculate the velocities of each >>axis with respect to the major axis? If so, how can they be sure that each >>axis is truely coordinated in postion? >> >>I know how to do it with stepper motors, just using the bresenham >>algorithm. >>This one is easy. I just don't understand how it is down when using servo >>motors. >> > > > James, > > I'm not sure I fully understand where you'd like to go with your question. > So, I'm speculating a bit here: > > I'll be perfectly general and mention a 6-degree-of-freedom control system > as might be used for an airplane. The six degrees of freedom related to 3 > axes are:
... Fred, I assumed from the reference to a straight-line algorithm and the remark that the task is conceptually easy with stepping motors that the task involves guiding an object -- a cutter, say, or a pen -- along a specified path. The puzzlement about how to do it and the mention of coordinated velocities reinforced that assumption. One changes the velocity of a stepper motor by changing the pulse rate. That makes it easy to get the idea that the system is velocity controlled. In reality, it is a position system: the motor counts the pulses and integrates them exactly as long as it's run within its capability. That's why I suggested that James's task is properly done with position servos and why it seems relatively simple with steppers. Jerry -- When a discovery is new, people say, "It isn't true." When it becomes demonstrably true, they say, "It isn't useful." Later, when its utility is evident, they say, "So what? It's old." a paraphrase of William James &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
"James Williams" <james@williams-eng.com> wrote in message 
news:ck6u4q$eh2b$1@news3.infoave.net...
> Hello, > > This may be a bit off topic, but I ddin't know where else to ask the > question. How do motion control systems coordinate 2 or 3 axis of motion > when they use servo motors? Do they just calculate the velocities of each > axis with respect to the major axis? If so, how can they be sure that each > axis is truely coordinated in postion? > > I know how to do it with stepper motors, just using the bresenham > algorithm. > This one is easy. I just don't understand how it is down when using servo > motors.
The commanded position and velocity is calculated in the obvious way. Then, usually, the servo for each axis is controlled independently to approximate the command. For Cartesian axes this makes a lot of sense, because the servo control loop is usually linear, and the axes are orthogonal, so a 3D control loop can be separated into independent control loops for each axis without changing its behaviour. -- Matt
I should clarify what I was asking.  I have a 2 axis system for which I want
to move a pen.  X ans Y for example.  When using stepping motors this is
easy to do because you just move 1 step on the major controlling axis, then
only move a step on the minor axis when its integer error is possible.
Hence, the bresenham integer algorithm for staying on a line or circle.

However, with servos you can't just command it to move 1 step.  Instead you
determine a velocity and position for each axis and command them to move.
My question is once the two axis have been command to move, they then run
independent, but what types of checks and balances are normally used to make
sure that during the movement, the minor axis is remaining on the line with
respect to the major axis move.  Hence what type of check is being used to
ensure that the coordinated move of the two axis remain on the vector path
or line from point 1 to point 2 that is not requiring huge time consuming
calculations.  Is it that you just monitor the velocity of each axis and
make adjustments if one is out of sych with the major or what.  It seems
difficult if not impossible to find information of this subject.  I am
wanting to make a small CNC router at home, but I would like to use servos
because they have better speeds over stepper motor systems, but I just can't
figure out how to cooridnate 2 or 3 axis.  I know how to calculate the
vector of the path, the velocity that the major axis must move and the
velocity of the minor axis with respect to the major axis.  But not how to
easily check the two or three axis once motion has begun.  I am trying to
fine a descent method that will provide good performance on a 16bit DSP
process.

Is there any good reference sites on this subject that uses a servo system
to do 3 axis coordinated motion for linear interpelation and circular
interpelation?

Thanks,


James.

"Matt Timmermans" <mt0000@sympatico.nospam-remove.ca> wrote in message
news:CFH9d.37695$HO1.1784354@news20.bellglobal.com...
> > "James Williams" <james@williams-eng.com> wrote in message > news:ck6u4q$eh2b$1@news3.infoave.net... > > Hello, > > > > This may be a bit off topic, but I ddin't know where else to ask the > > question. How do motion control systems coordinate 2 or 3 axis of motion > > when they use servo motors? Do they just calculate the velocities of
each
> > axis with respect to the major axis? If so, how can they be sure that
each
> > axis is truely coordinated in postion? > > > > I know how to do it with stepper motors, just using the bresenham > > algorithm. > > This one is easy. I just don't understand how it is down when using
servo
> > motors. > > The commanded position and velocity is calculated in the obvious way.
Then,
> usually, the servo for each axis is controlled independently to
approximate
> the command. For Cartesian axes this makes a lot of sense, because the > servo control loop is usually linear, and the axes are orthogonal, so a 3D > control loop can be separated into independent control loops for each axis > without changing its behaviour. > > -- > > Matt > >
"James Williams" <james@williams-eng.com> wrote in message 
news:ck7jve$eq7e$1@news3.infoave.net...
>I should clarify what I was asking...
I guessed correctly.
> However, with servos you can't just command it to move 1 step. Instead > you > determine a velocity and position for each axis and command them to move. > My question is once the two axis have been command to move, they then run > independent, but what types of checks and balances are normally used to > make > sure that during the movement, the minor axis is remaining on the line > with > respect to the major axis move.
You command them to move in a coordinated fashion. Normally, no further coordination is normally necessary between the axes, because the algorithms commonly used for control loop -- the things that corrects errors and keep the servos where they are supposed to be -- are linear. That means that multidemensional control loops can be reduced to separate control loops for each dimension, in the same way that vector addition can be reduced to separate additions of the vector components. -- Matt
James Williams wrote:

> I should clarify what I was asking. I have a 2 axis system for which I want > to move a pen. X ans Y for example. When using stepping motors this is > easy to do because you just move 1 step on the major controlling axis, then > only move a step on the minor axis when its integer error is possible. > Hence, the bresenham integer algorithm for staying on a line or circle. > > However, with servos you can't just command it to move 1 step. Instead you > determine a velocity and position for each axis and command them to move. > My question is once the two axis have been command to move, they then run > independent, but what types of checks and balances are normally used to make > sure that during the movement, the minor axis is remaining on the line with > respect to the major axis move. Hence what type of check is being used to > ensure that the coordinated move of the two axis remain on the vector path > or line from point 1 to point 2 that is not requiring huge time consuming > calculations. Is it that you just monitor the velocity of each axis and > make adjustments if one is out of sych with the major or what. It seems > difficult if not impossible to find information of this subject. I am > wanting to make a small CNC router at home, but I would like to use servos > because they have better speeds over stepper motor systems, but I just can't > figure out how to cooridnate 2 or 3 axis. I know how to calculate the > vector of the path, the velocity that the major axis must move and the > velocity of the minor axis with respect to the major axis. But not how to > easily check the two or three axis once motion has begun. I am trying to > fine a descent method that will provide good performance on a 16bit DSP > process. > > Is there any good reference sites on this subject that uses a servo system > to do 3 axis coordinated motion for linear interpelation and circular > interpelation? > > Thanks, > > > James.
Nowadays, most servos get position information from an incremental encoder, rather than from an analog device like a slide wire. In effect, they behave in some respects like steppers with hundreds or even thousands of steps per turn. The way to make an X-Y table follow a line or a curve is to compute each point on the curve and use the coordinates as the command inputs of Z and Y servos, choosing the update speed to achieve the desired velocity. It is sufficient for some purposes maintain some maximum speed along the axis of fastest motion. For others, for example, milling or exposing film on a Gerber plotter, speed along the curve itself needs to be controlled. Usually, approximating sqrt(a^2 + b^2) as [max(a,b) + c*min(a,b)] where c is 1/2 or 3/8 is good enough for that. (http://www.dspguru.com/comp.dsp/tricks/alg/mag_est.htm has more detail.) You rely on the servo to go to the commanded position accurately enough in the time available, just as you would with stepper motors. Instead of inputting a step command to a stepper, you move the analog servo ahead to the next encoded position, and do it rapidly enough so that the motion is continuous. For the fastest motion, watch the encoder to confirm arrival, then update the command before the servo can slow down. The servo will accelerate at the maximum possible rate as long as this regime id followed. We do the same thing (or nearly, open loop) when we ramp steppers. Jerry -- When a discovery is new, people say, "It isn't true." When it becomes demonstrably true, they say, "It isn't useful." Later, when its utility is evident, they say, "So what? It's old." a paraphrase of William James &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;

James Williams wrote:

> Hello, > > This may be a bit off topic, but I ddin't know where else to ask the > question. How do motion control systems coordinate 2 or 3 axis of motion > when they use servo motors? Do they just calculate the velocities of each > axis with respect to the major axis? If so, how can they be sure that each > axis is truely coordinated in postion? >
It's been quite a few years but for the multi-axis system I designed the feedback was position and the command was velocity. The multi-axis problem was to accept some specified trajectory in space, and find geometric projections onto the axes that turned it into independant motion control for each axis. I used a National floating point unit lashed into a 68020 based system, wierd I know but National's part came out first, so I didn't screw around with incremental methods like Breshenham or whatever, and then independantly commanded velocities at the desired rates and closed the loop with positional feedback. The bottom level servo knew nothing about synchronization, that was all handled in the analytic projection phase of the process. That's a real broad brush but about all I can remember from a project some 20 years ago. Bob -- "Things should be described as simply as possible, but no simpler." A. Einstein

James Williams wrote:

> However, with servos you can't just command it to move 1 step. Instead you > determine a velocity and position for each axis and command them to move. > My question is once the two axis have been command to move, they then run > independent, but what types of checks and balances are normally used to make > sure that during the movement, the minor axis is remaining on the line with > respect to the major axis move. Hence what type of check is being used to > ensure that the coordinated move of the two axis remain on the vector path > or line from point 1 to point 2 that is not requiring huge time consuming > calculations.
None is needed if you've correctly separated the motion into independant axis control problems. I just presumed it would work and it did. :-) Bob -- "Things should be described as simply as possible, but no simpler." A. Einstein