motor instabilty due to glass linear encoder of precision 1 micro-meter

More
27 Feb 2021 17:34 #200314 by suraj9735
Dear Forum,

My Pncconf is working properly, but the motor is in unstable/oscillating mode due to the linear encoder (linear glass encoder of 1 micro-meter precision). How to remove this oscillation?

I have attached the g drive link of my video.

video
Attachments:

Please Log in or Create an account to join the conversation.

More
27 Feb 2021 18:09 #200321 by aleksamc
I think you need to decreese P gain in ini file for this axis.
It's not problem on linear encoder because of it has 0,001 mm and your oscilations are 1mm

Please Log in or Create an account to join the conversation.

More
27 Feb 2021 18:13 #200323 by PCW
You need to tune the PID loop (start with a much lower P value)

I would suggest using the calibrate menu and looking at the
following error with halscope

Please Log in or Create an account to join the conversation.

More
27 Feb 2021 18:30 - 27 Feb 2021 18:37 #200326 by chris@cnc
But be sure that your scale parameter fits. You can test it. Switch encoder off and check with dialindicator that your axis move correct distance. Compare in halshow hm2_7i95.0.encoder.00.position and joint.0.motor-pos-fb in this case. Adjust STEP_SCALE = 1000.0 to less as possible error to encoder data. Set P = 1000.0 to P = 1.0 and switch encoder on.
Check with dialindicator that your axis move correct distance and take a look into joint position error and joint.0.motor-pos-fb. Should now your Gui data.
If so your ENCODER_SCALE = 250.0 correct and you can increacse the P slowly. Make a short nc programm. travel axis 10mm an 100mm and check position. If axis stop on programmed data without noise and vibration, the basics o.k.
You can also use halscope to trigger error and command data. But i can't write manual for this. Search for video or in forum. You will find lot for the tuning topic.
Chris
Last edit: 27 Feb 2021 18:37 by chris@cnc.

Please Log in or Create an account to join the conversation.

More
04 Mar 2021 15:06 #201024 by suraj9735
Hi, I read the manual and found the manual tuning method.

Step-1) Start with very low value of Kp and intially set Ki and Kd value to zero. Increase the Kp value when system start oscillating ( I am confused with the degree of oscillation to stop, at Kp=25 system just oscillate very little and Ko= 35 the oscillation is significant and I can see with my nacked eye, so where to stop????).

Step-2) Reduce the Kp value to half of the previous last step. And start increasing the Ki value till oscillation vanished. (I don't have position time graph to visualise, I am depended on my nacked eye to see the oscillation and position manually, looking for suggestions of how to generate the graph or index value of positions in halscope or halmeter).

Step-3) Now increase the Kd value till the position attained quickly and also be careful about the overshoot. My system doesn't allow overshoot.



***********
Another confusion I have with Servo/Stepper system. My system is Servo system having rotory and linear encoder. I can't do much for rotary encoder because it's wire goes to the servo drive not in my mesa 7i95 card, so it internally communicate with eachother. I have another linear encoder attached with the linear stage and it is connected with mesa card.
I am using pncconf because I am using Servo system (another reason is using mesa card, having confusion, can I use steepeer configuration for Servo system with different control card?).
My Servo Drive don't have the values for Step On-Time, Step Space, Direction, and Direction Setup unlike stepper motor. He just told me how to set pulse per revolution (ppr) value in the Drive and same value in software for stepper scale. He also suggested me to put other values (Step On-Time, Step Space, Direction, and Direction Setup) in the software only as per my output. I am confused here does Servo system (closed loop) also has the value like Step On-Time, Step Space, Direction, Direction Setup?????

The last query related with latency test.
In latency I am getting two max gitter value, one as Servo thread (1618) and another is Base thread (12303). As I am using pncconf with servo system. What value should (default is 1000000) I put for Actual Servo Period in Pncconf settings??????

Please Log in or Create an account to join the conversation.

More
05 Mar 2021 17:29 #201108 by aleksamc
A lot of math is made bu your 7i95, so latency test is not neccesary. I think better to live value as default.

I have never made closed loop system with step/dir, so you need to make your own decisions.
1) Really all encoders has encoder output, so it's possible to use, not only extra linear encoder.
2) But you want to use linear encoder, so you need to connect it as feedback to your hardware board with scale value.
scale = 1/(resolution of linear encoder)
3) your step/dir outputs are correspond to pulse/revolution output.
You need to count it yourself, basically it should be equal to your scale value.
In servodrive settings, set value for pulse/rev similar to your scale.

Example:
So, if you have 1mkm resolution encoder, you need to set scale=0.001
Your servodrive has as default 15000 pulses/rev
With 1 revolution you make 10mm or 10000 pulses from encoder.
You need in servodrive set value 2/3 as =15000*(2/3)=10000.
Than check if your calculations are right.

Please Log in or Create an account to join the conversation.

More
05 Mar 2021 19:38 - 05 Mar 2021 19:40 #201118 by chris@cnc
First of all, the system has to work without extra linear encoder. And yes your system is closed loop. The encoder on your servo closes the loop to the amplifier. If something goes wrong with the servo, the amplifier gives an alarm.
The second loop is your scale to linuxcnc. In the case of imprecise mechanics or, in my case, a gantry drive with a belt, useful additional security.
Therefore it is important that the scale and servo position are the same. Otherwise one always runs after the other and it also vibrates. Check that by switching off the scale.
encoder off
#net x-pos-fb   <=  hm2_7i95.0.encoder.00.position	# Encoderpostion to PIN x-pos-fb
stepgen feedback active
net x-pos-fb     <= hm2_7i95.0.stepgen.00.position-fb	# Stepgenposition to PIN x-pos-fb

Then compare encoder position and step position. They have to be the same if not adjust your scale parameters. Verify the whole thing with a dial indicator.
Other things. Your servo and amplifier already have their own control loop with KP parameter. It is a good idea to tune this control loop and keep KP in linuxcnc as low as possible.
Finally turn on your scale and it will work.
The following error can be found in joint.0.f-error or using halscope.
Attachments:
Last edit: 05 Mar 2021 19:40 by chris@cnc.

Please Log in or Create an account to join the conversation.

More
06 Mar 2021 13:09 - 06 Mar 2021 13:11 #201183 by suraj9735
I was doing big mistake. I was using my linear encoder for close loop while my rotary encoder settings in drive was not correct and getting huge position error without linear encoder. I talked to my drive and motor supplier, tested with without linear encoder and he helped me to set the parameters for 17 bit encoder. He also helped to set PPR value correctly (4 mm ball screw pitch, 4000 PPR in drive, 1000 pulse/mm in Linuxcnc). The test was successful.

Then I attached the linear encoder (250 pulse/mm, 1000 pulse/mm for quadrature output, I set 1000 for encoder scale in Linuxcnc, my units are in mm). This test is also successful.

Now I need to understand more about these parameters and how to decide these optimal value.

FERROR?
MIN_FERROR?
FF0?
FF1?
FF2?

DIRSETUP?
DIRHOLD?
STEPLEN?
STEPSPACE?
Last edit: 06 Mar 2021 13:11 by suraj9735.

Please Log in or Create an account to join the conversation.

More
06 Mar 2021 15:38 #201192 by chris@cnc
This is the classic.
But well done you solved.
Explanation for the parameters found this here ...
Ferror ++ here
linuxcnc.org/docs/2.8/html/config/ini-co...t__lt_num_gt_section

FF0 ++ i don't know but is good idea this parameter not touch.

DIRSETUP ++ here
linuxcnc.org/docs/html/hal/rtcomps.html
or in your servo manual. Parameters might be called there.
PULSE
/PULSE
SIGN
/SIGN
Set the values as recommended by your servo.

Please Log in or Create an account to join the conversation.

Time to create page: 0.073 seconds
Powered by Kunena Forum