On Thu, 29 Jun 2017, Les Newell wrote:

Date: Thu, 29 Jun 2017 16:20:16 +0100
From: Les Newell <les.new...@fastmail.co.uk>
Reply-To: "Enhanced Machine Controller (EMC)"
    <emc-users@lists.sourceforge.net>
To: "Enhanced Machine Controller (EMC)" <emc-users@lists.sourceforge.net>
Subject: Re: [Emc-users] Rough motion with servos

Well, some progress figuring out what is going on.

I just ran some more tests using Ubuntu 16.04 with a freshly built preempt-rt kernel and freshly built Git master. No surprise, it still shows the fault. I took a Halscope log from the original setup. The encoder velocity is rather noisy but no big spikes. On the new install the encoder velocity is not as noisy but it has occasional spikes. The encoders are wired to a 7i29.
This log is from the old setup <www.sheetcam.com/lathe/old.log>
This log is from the new setup <www.sheetcam.com/lathe/spike.log>

This lathe is fitted with high resolution handwheel encoders so I also did something I should have done much sooner and looked at the handwheel encoder velocity. Big difference - nice clean signals on both configs.

So it looks like something funky is going on when reading encoders with the 7i29, resulting in noisy velocity estimation. I guess the velocity estimation code has changed a bit over the years, giving the different results. The fault has probably been there for a long time, quite possibly since I built it. My immediate thought is noise on the encoder signals but this machine never loses position. It will turn out accurate parts all day. Peter, any idea how the velocity estimation can be noisy while the overall counts seem to track accurately?

Do you have and raw-write encoder filter tweaking stuff in the hal file:

The bitfile may have changed so the address is no longer correct (plus newwer version of the driver let you set these as hal pins)

Note the noise in the encoder signals can generate nasty velocity noise without losing counts



Some time back I was involved with developing flight controllers for RC models. They used nested PID loops. The loops worked well even though the accelerometer and gyro feedback signals were extremely noisy. I think that explains why my old config seems to run smoothly. The signal is noisy but consistent so the noise averages out. On the later config the velocity estimation ends up with spikes which are noticeable in motion.

Les



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Peter Wallace
Mesa Electronics

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to