I have one belt with speed V1.I want to synchronize other axis with S
curve to this belt.How can I create S Curve? V1 can change during
synchronisation.
Regards
Leo
See:
http://groups.google.com/group/sci.engr.control/tree/browse_frm/thread/a7c266d83ac6537d/6b84343f397286cd?rnum=1&_done=%2Fgroup%2Fsci.engr.control%2Fbrowse_frm%2Fthread%2Fa7c266d83ac6537d%2Fff956f14e5f2671a%3Flnk%3Dst%26q%3D%26#doc_6b84343f397286cd
Heed my first two replies. I have seen the other responses you have
received in other forums and they have been almost worthless.
You have been working on this since last January. For all the time
you have spent on this you could have bought a real controller and had
it done by last February. The people that know how to do this the
simple way are not going to tell the world here because they are
trying to sell their own controllers. The math isn't hard but the
techniques are not written down. Everyone must figure this out on
their own if you want to be a member of the motion control developer's
club. Consider it an initiation. Note, it shouldn't take this long
to derive all the formulas needed.
It isn't the answer you want but it is reality.
Peter Nachtwey
Wow! Deja vu!
Jerry
--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
I read your very good article:
http://www.hydraulicspneumatics.com/200/Issue/Article/False/31840/Issue
My problem is following:
I have input in controller as ramp to speed V1. This ramp is going to
value of speed of belt .
I have to reach the speed of belt and then following this speed. I try
to do that with PID controller, but output from controller is allways
smaller than input.
Should I use feedforward or not? Or what is best algorithm for
velocity PID controller?
Thanks.
Regards
Leo
I read your very good article:
http://www.hydraulicspneumatics.com/200/Issue/Article/False/31840/Issue
My problem is following:
I have input in controller as ramp to speed V1. This ramp is going to
value of speed of belt .
I have to reach the speed of belt and then following this speed. I try
to do that with PID controller, but output from controller is allways
smaller than input.
Should I use feedforward or not? Or what is best algorithm for
velocity PID controller?
*** JCH
If you move your set point in normal operation use feedforward.
--
Regards/Grüße http://home.arcor.de/janch/janch/menue.htm
Jan C. Hoffmann eMail aktuell: ja...@nospam.arcornews.de
Microsoft-kompatibel/optimiert für IE7+OE7
A better article
http://www.designnews.com/article/12037-Tuning_the_Motion_Control_Loop_How_To_for_Techies.php
Notice the comments at the bottom. They are customers that have used
the auto tuning.
> My problem is following:
>
> I have input in controller as ramp to speed V1. This ramp is going to
> value of speed of belt .
> I have to reach the speed of belt and then following this speed. I try
> to do that with PID controller, but output from controller is allways
> smaller than input.
> Should I use feedforward or not?
Yes. There is know way you can track a target accurately without feed
forwards. PIDs only work when there is error. That implies there must
BE error and error isn't desirable. Feed forwards provide an open
loop estimate of what the control output should be at any moment. If
the feed forwards estimate is accurate then the PID will need to
correct very little and therefore there will be very little error. I
strive to get at least within %5 using the feed forwards. This leaves
the PID to correct for only that last 5%. Usually I can do MUCH
better.
> Or what is best algorithm for
> velocity PID controller?
>
You are controlling position. You haven't said what the control
signal to the drive is. In some cases controllers control the
velocity loop and a position loop. Most drives take care of the
velocity loop for you so the controller can output + or - 10 volts to
the drive. +5 volts makes the motor go in the positive direction at
half speed. In any case you need to control position if you plan to
synchronize two axes.
BTW, this is an example of rotary shear that is used to cut sheet
metal at fixed intervals.
ftp://ftp.deltacompsys.com/public/Pictures/RotaryShear2.PNG
The black line is the line speed. It is constant in this example but
on the real machine there is a little jitter. A little jitter is OK
but the main headache when doing gearing systems is the master or line
encoder.
I also calculate the line acceleration but I didn't show that in this
picture.
The yellow line is the line position. It increments to the cut
length and then is reset after the cut.
The red line is the shear position. It is about 31.4 inches in
circumference. If you look closely you can see that for each cut the
shear travels 31.4 inches while the sheet metal travels 25 inches.
This means the shear must go faster in between the cuts and slow down
to the line speed when making the cut.
The blue line is the rotary shear speed in inches per second. You can
see it matches the line speed at the cut. If the cut length is less
than 31.4 inches the shear must hurry to get around the top for the
next cut. That is the case here. If the cut length is longer than
31.3 inches the shear must slow down between cuts like this
ftp://ftp.deltacompsys.com/public/Pictures/RotoryShear1.PNG
In this case the cut length was 40 inches so the shear had to slow
down. If the cut length goes over 2 x 31.4 inches then a decision
must be made. The shear can be stopped at the top and wait for a bit
or the shear can be allowed to wiggle. That is go forward then back
then forward again to kill time. The wiggle method looks strange but
results in the lowest amount of torque.
In both cases the green line is the control output. Notice that it
leads the shear velocity. That is because feed forwards are used.
Without feed forwards the PID would always lag in such a dynamic
motion profile.
This is what you are trying to avoid.
All of this is done without using cam tables. We don't use blending
either. This motion profile only requires for motion commands per
revolution. The motion profiles are calculated on-the-fly and will
respond to the line speed changing speeds. After all the customer
wants his sheet metal to be the same size whether the line is ramping
up or ramping down as well as at constant velocity. This also means
the customer can change the cut length on-the-fly if required.
Here is a flying shear. It is much simpler.
ftp://ftp.deltacompsys.com/public/Pictures/flying%20shear%201.png
It takes just one command to go forward and one to go back. The
cycles has only about 5 steps. Two of which are tell the shear to go
down, waiting for indication it is down, tell the shear to go up and
waiting for the shear to be up.
You can see I know very well what you want to do. I can use the same
kinds of commands that I use above to do do smooth motion in multiple
dimensions if required.
Peter Nachtwey
Hi Peter
How can I add the feed forward in my equation for PID ?I have PID
control:
delta_u_n = Kp * [ (ep_n - ep_n-1) + ((Ts/Ti)*e_n)
* + (Td/Ts)*(edf_n - 2*edf_n-1 + edf_n-2) ]
u_n = u_n-1 + delta_u_n
delta_u : The incremental output
* Kp : Proportional gain
* ep : Proportional error with reference weighing
* ep = beta * r - y
* where:
* beta : Weighing factor
* r : Reference (setpoint)
* y : Process value, measured
* e : Error
* e = r - y
* Ts : Sampling interval
* Ti : Integrator time
* Td : Derivator time
* edf : Derivate error with reference weighing and filtering
* edf_n = edf_n-1 / ((Ts/Tf) + 1) + ed_n * (Ts/Tf) / ((Ts/
Tf) + 1)
* where:
* Tf : Filter time
* Tf = alpha * Td , where alpha usually is set to 0.1
* ed : Unfiltered derivate error with reference weighing
* ed = gamma * r - y
* where:
* gamma : Weighing factor
*
* u : absolute output
*
* Index n means the n'th value.
*
*
* Inputs:
* enabled ,
* y_n , r_n , beta=1 , gamma=0 , alpha=0.1 ,
* Kp , Ti , Td , Ts (sampling time=0.001sec)
* u_min , u_max
*
* Output:
* u_n
*/
--------------------------------------------------------------------------------
If you have formula, how can I tune system with feedforward? Is there
any automaticaly way to tune?
Best regards
Leo
Hi Peter
--------------------------------------------------------------------------------
*** JCH
Can you give me 2 representative 10%/90% value pairs of your process
transfer function for process identification?
Example
1 second at 10% process value v1 after a step value v2
4 seconds at 90% process value v1 after a step value v2
How feedforward can be added (see equation 2, value u, u', ...)
* http://home.arcor.de/janch/janch/_control/20080805-feed-back-control/
See also process idendification for explanation
* http://home.arcor.de/janch/janch/_news/20080916-process-identification/
Does your process transfer function has a similar shape? PT1...PT6?
I have no formula for tuning, but I can simulate and find a best operation.
Should be
e(n)=r(n)-y(n)
u(n) = u(n-1)+Ki*Ts*e(n)+Kp*(e(n)-e(n-1))+(Kd/
Ts)*( e(n)-2*e(n-1)+e(n-2))
There is no separate derivative error unless you are using state
space.
uff=Kv*r+Ka*r'+Kj*r''
add uff to your PID output and you have got it.
r is the reference or target position. This is not the set point. r
and its derivatives are updated every millisecond or faster by the
motion profile generator.
Kv is the velocity feed forward
Ka is the acceleration feed forward
Kj is the jerk feed forward but this isn't required on first order
system.
For instance. A simple first order velocity system is:
Gp(s) = K*a/(s+a)
Where a is the corner frequency or open loop bandwidth
We want
Gp(s)*Gff(s) = 1
Therefore Gff(s) = (s+a)/(K*a) or
Gff(s) = s/(K*a) + 1/K
The 1/K is the velocity feed forward.
Kv = 1/K
It is simply the inverse of the plant gain
The acceleration feed forward is
Ka=1/(K*a)
just remove the s.
If Gp(s) is a second order system then you would have a jerk feed
forward too.
Now show us how to calculate the feed forwards for a second order
systems.
After you have a solution you can look at this:
ftp://ftp.deltacompsys.com/public/NG/Mathcad%20-%20FeedForward%20and%20the%20RMC.pdf
Our motion controller is called the RMC75
You can see that the more poles the plant has the more PID and feed
forward gains are required. A simple trapezoidal motion profile isn't
very good. The control output would change in jumps whenever the
acceleration changed. A third order motion profile would have the
control output jump whenever the jerk changes, etc.
The changes in the control output shouldn't change too quickly or too
much or it will excite the unmodeled 'features' in your system. A
long time ago you said that your system was very compliant. Therefore
you need a higher order motion profile generator ( target generator ).
Peter Nachtwey
Notice that if you have the feed forwards gains you have the plant
transfer function or something close. Our tech support guys often ask
about feed forward gains and the PID gains to see if the two sets of
gain make sense.
Peter Nachtwey
*** JCH
The feedforward function works only if the setpoint is moved. Basically you
have a process value with 2 disturbances (z1, z2) to be controlled.
Even if the disturbances are compensated you would need 'I' of PID for
making error e=0.
Yes, and it should be moved smoothly. You use a 'target filter' to do
that but it has limitations in that you really don't control the
velocity, acceleration and jerk. I can see in your graphs that you
plot the position. What isn't clear is if you take the derivatives of
the position filter to calculate the 'target filter velocity' and the
'target filter acceleration'.
>
> Even if the disturbances are compensated you would need 'I' of PID for
> making error e=0.
In theory the PID isn't required and e will always equal 0 because.
Gff(s)*Gp(s)=1. In reality the sampling time, the quantization of the
feed back and output and the non-linearities of the system require a
PID of some sort. However if the feed forwards are tuned well the PID
may only need to correct for 1% of error and usually no more than %5.
Swing arms are a different matter. Then one needs to change the feed
forwards on-the-fly.
Peter Nachtwey
Thanks,Peter.
For blending I found very nice article :
http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=131682
You can download on this Web site. I implement that and everything is
OK. I like geometric blending.
Best regards
Leo
P.S. I write software for industrial robots.
Yes, and it should be moved smoothly. You use a 'target filter' to do
that but it has limitations in that you really don't control the
velocity, acceleration and jerk. I can see in your graphs that you
plot the position. What isn't clear is if you take the derivatives of
the position filter to calculate the 'target filter velocity' and the
'target filter acceleration'.
***JCH
v1 (process value) can be any physical value. If v1 is velocity then
velocity is controlled. v in v1 does not indicale velocity. It indicates
value.
***
> Even if the disturbances are compensated you would need 'I' of PID for
> making error e=0.
In theory the PID isn't required and e will always equal 0 because.
Gff(s)*Gp(s)=1. In reality the sampling time, the quantization of the
feed back and output and the non-linearities of the system require a
PID of some sort. However if the feed forwards are tuned well the PID
may only need to correct for 1% of error and usually no more than %5.
Swing arms are a different matter. Then one needs to change the feed
forwards on-the-fly.
***JCH
Feedforward leads only the target value accurately if differential equation
of target filter and process transfer function are identical. (Page 1)
For controlling disturbances one needs a PID controller in addition. (Page
2)
If the target filter is different to the process transfer function then the
PID controller will act. (Page 3)
See for some definitions. (Page 4)
http://home.arcor.de/janch/janch/_control/20080917-feedforward-pid/
(1.4 MByte)
Conclusion: Additional controller is necessary.
Peter Nachtwey
***JCH
Any measurable physical value can be controlled!
Example
0...10 m/s => 4...20mA (in my model defined 0.2...1)
See Control Range Examples (etc.) in
* http://home.arcor.de/janch/janch/_control/20080917-feedforward-pid/