- Posts: 492
- Thank you received: 297
G76, Troubleshooting needed!
- dgarrett
- Offline
- Platinum Member
-
Less
More
8 years 1 day ago #119719
by dgarrett
Replied by dgarrett on topic G76, Troubleshooting needed!
The relation between the lowpass filter 'gain' and its
bandwidth is shown on the man page:
Ref:
linuxcnc.org/docs/2.7/html/man/man9/lowpass.9.html
Note:
1) a is the filter cutoff frequency (-3dB) in radians/sec
a=2*pi*frequency_in_Hz.
2) T is the sample interval in seconds
Using the computed gain=0.0609 and an input amplitude of 1,
the filter output for a 10Hz input should be attenuated
by 3dB or equal to 0.707:
Other notes:
a) If you know the gain, the filter 3dB cutoff frequency (radians/sec) is:
b) for a single pole lowpass filter, the risetime (10 to 90%) is related
to the bandwidth (in Hz) as:
Ref:
en.wikipedia.org/wiki/Rise_time
bandwidth is shown on the man page:
Code:
$ man lowpass
...
gain = 1 - e^(-a * T)
Note:
1) a is the filter cutoff frequency (-3dB) in radians/sec
a=2*pi*frequency_in_Hz.
2) T is the sample interval in seconds
Code:
Using the man page example for a 10Hz filter:
a=2*pi*10 # lowpass filter with 10Hz cutoff (-3dB) frequency
T=0.001 # typical 1mS servo period
g=0.00609 # computed 'gain'
Test using halrun with a 10Hz sine wave and 1mS (=1000000nS) period:
$ halrun
loadrt siggen names=sig
loadrt lowpass names=fil
loadrt threads name1=thd period1=1000000
setp sig.frequency 10
setp sig.amplitude 1
setp fil.gain 0.0609
net input <= sig.sine => fil.in
net output <= fil.out
addf sig.update thd
addf fil thd
start
Using the computed gain=0.0609 and an input amplitude of 1,
the filter output for a 10Hz input should be attenuated
by 3dB or equal to 0.707:
Other notes:
a) If you know the gain, the filter 3dB cutoff frequency (radians/sec) is:
Code:
a = - (1/T) * ln(1-gain)
b) for a single pole lowpass filter, the risetime (10 to 90%) is related
to the bandwidth (in Hz) as:
Code:
risetime = 0.35/BW
The following user(s) said Thank You: Victor
Please Log in or Create an account to join the conversation.
- Victor
- Offline
- Senior Member
-
Less
More
- Posts: 51
- Thank you received: 1
8 years 7 hours ago #119756
by Victor
Replied by Victor on topic G76, Troubleshooting needed!
BIG Thanks for all your help!
I did a test run yesterday.
Started with gain to 0.01 and it was really bad, the move was smooth during G33, but with G76 it started fine, then stopped for a couple revolutions about 3mm into the part, then started again and in the following passes it didn't track so good.
Changed the gain to 0.05 better but still no good. tried 0.075 and the M12x1.75 thread was descent. not as good as the ones i made without the filter but they would be ok.
I tried a thread with a pitch of 7mm and i could see different lines from different passes. Changed the gain to 0.075, got a little better, tried a run with 7mm pitch without filter and that one was perfect.
Any ideas? or is the next step a higher resolution encoder? or will i have the same stuttering problem then?
Br Victor
I did a test run yesterday.
Started with gain to 0.01 and it was really bad, the move was smooth during G33, but with G76 it started fine, then stopped for a couple revolutions about 3mm into the part, then started again and in the following passes it didn't track so good.
Changed the gain to 0.05 better but still no good. tried 0.075 and the M12x1.75 thread was descent. not as good as the ones i made without the filter but they would be ok.
I tried a thread with a pitch of 7mm and i could see different lines from different passes. Changed the gain to 0.075, got a little better, tried a run with 7mm pitch without filter and that one was perfect.
Any ideas? or is the next step a higher resolution encoder? or will i have the same stuttering problem then?
Br Victor
Please Log in or Create an account to join the conversation.
- PCW
- Offline
- Moderator
-
Less
More
- Posts: 18115
- Thank you received: 5334
8 years 4 hours ago - 8 years 3 hours ago #119763
by PCW
Replied by PCW on topic G76, Troubleshooting needed!
The index signal is sporadic because its too short to be captured at the 1 ms servo thread rate. This is a general issue with any kind of sampled system like halscope. Because halscope is only sampling the index signal every 1 ms, pulses shorter than 1 ms will not always be detected.
I would expect a higher resolution encoder to be much better, but 150 should be ok if a bit rough
I'm not sure how adding the filter can make motion pause (slow to follow, yes but not pause)
Are you sure your encoder is counting correctly?
I would expect a higher resolution encoder to be much better, but 150 should be ok if a bit rough
I'm not sure how adding the filter can make motion pause (slow to follow, yes but not pause)
Are you sure your encoder is counting correctly?
Last edit: 8 years 3 hours ago by PCW.
The following user(s) said Thank You: Victor
Please Log in or Create an account to join the conversation.
- Victor
- Offline
- Senior Member
-
Less
More
- Posts: 51
- Thank you received: 1
7 years 11 months ago - 7 years 11 months ago #120156
by Victor
Replied by Victor on topic G76, Troubleshooting needed!
Ok, Thanks for explaining PCW!
A complete stop might have been a little exaggerated, it looked like it but at 1200rpm a couple revs is achieved pretty fast
when the gain factor was increased to 0.075 the slow down disappeared but the stuttering at certain rev's was back.
Edit: if the encoder is counting correctly is hard to check i guess, i have rotated the spindle 360ยบ by hand and got about 150 counts (+/-5 but that is probably due to human error when trying to get to exact 1 full turn.)
Maybe it's time to replace the encoder, i can find a quadrature useful anyway for rigid tapping.
Any recommendations for brand/model of encoder?
I've looked at the CUI Inc AMT102-V but after some reading people are complaining on the accuracy
www.digikey.com/product-detail/en/cui-in...V/102-1307-ND/827015
Also found this Broadcom / Avago HEDS-5540#A13 but haven't heard so much about them.
www.mouser.se/ProductDetail/Broadcom-Ava...rdeZYmv5qed0RtL2E%3d
Br Victor
A complete stop might have been a little exaggerated, it looked like it but at 1200rpm a couple revs is achieved pretty fast
when the gain factor was increased to 0.075 the slow down disappeared but the stuttering at certain rev's was back.
Edit: if the encoder is counting correctly is hard to check i guess, i have rotated the spindle 360ยบ by hand and got about 150 counts (+/-5 but that is probably due to human error when trying to get to exact 1 full turn.)
Maybe it's time to replace the encoder, i can find a quadrature useful anyway for rigid tapping.
Any recommendations for brand/model of encoder?
I've looked at the CUI Inc AMT102-V but after some reading people are complaining on the accuracy
www.digikey.com/product-detail/en/cui-in...V/102-1307-ND/827015
Also found this Broadcom / Avago HEDS-5540#A13 but haven't heard so much about them.
www.mouser.se/ProductDetail/Broadcom-Ava...rdeZYmv5qed0RtL2E%3d
Br Victor
Last edit: 7 years 11 months ago by Victor.
Please Log in or Create an account to join the conversation.
- Victor
- Offline
- Senior Member
-
Less
More
- Posts: 51
- Thank you received: 1
7 years 11 months ago #120252
by Victor
Replied by Victor on topic G76, Troubleshooting needed!
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
-
Less
More
- Posts: 19899
- Thank you received: 4655
7 years 11 months ago #120254
by andypugh
Replied by andypugh on topic G76, Troubleshooting needed!
That design looks difficult to use with a lathe spindle?
I would suggest one either with a shaft for use with a belt-drive, or with a large through-hole.
Maybe one of these?
www.aliexpress.com/item/Good-quality-GHH...-CE/32852630034.html
I would suggest one either with a shaft for use with a belt-drive, or with a large through-hole.
Maybe one of these?
www.aliexpress.com/item/Good-quality-GHH...-CE/32852630034.html
The following user(s) said Thank You: Victor
Please Log in or Create an account to join the conversation.
Time to create page: 0.301 seconds