VFD Vo 0-10V rpm feedback - Analogue pin flicker
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23170
- Thank you received: 4860
10 May 2022 22:52 #242530
by andypugh
Replied by andypugh on topic VFD Vo 0-10V rpm feedback - Analogue pin flicker
If you want the Kalman then it is a .comp file, so can be easily compiled and installed with halcompile.
sudo halcompile --install filter_kalman.comp
raw.githubusercontent.com/LinuxCNC/linux...s/filter_kalman.comp
sudo halcompile --install filter_kalman.comp
raw.githubusercontent.com/LinuxCNC/linux...s/filter_kalman.comp
Please Log in or Create an account to join the conversation.
- re_relentlessly
- Offline
- Senior Member
Less
More
- Posts: 49
- Thank you received: 4
12 May 2022 20:48 #242817
by re_relentlessly
Replied by re_relentlessly on topic VFD Vo 0-10V rpm feedback - Analogue pin flicker
Hello Andy,
I managed to compile the filter, after installing the linuxcnc-uspace-dev package.
I then tried to tune the filter based on the recommend setting in the man page.
I installed Octave on my windows system, dumped data from halscope, ran through the covariance generation, got some very large number as a result, tried it with no luck, tried increasingly small numbers, no change.
So clearly I dont understand how to tune the filter or it just doesnt work.
Any advice?
I managed to compile the filter, after installing the linuxcnc-uspace-dev package.
I then tried to tune the filter based on the recommend setting in the man page.
I installed Octave on my windows system, dumped data from halscope, ran through the covariance generation, got some very large number as a result, tried it with no luck, tried increasingly small numbers, no change.
So clearly I dont understand how to tune the filter or it just doesnt work.
Any advice?
loadrt filter_kalman names=kalman.spindle
addf kalman.spindle servo-thread
net spindle-rpm-raw kalman.spindle.zk <= hm2_7i76e.0.7i76.0.0.analogin0
net spindle-rpm-filtered <= kalman.spindle.xk-out
setp kalman.spindle.Rk 36076301.81788512
setp kalman.spindle.Qk 36076301.81788512
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23170
- Thank you received: 4860
13 May 2022 13:20 #242872
by andypugh
Replied by andypugh on topic VFD Vo 0-10V rpm feedback - Analogue pin flicker
Those are big gains!
Did you try anything between 0 and 1? And did you try making R and Q different from each other?
Have you tried plotting input and output with Halscope to get a feel for what happens?
Did you try anything between 0 and 1? And did you try making R and Q different from each other?
Have you tried plotting input and output with Halscope to get a feel for what happens?
Please Log in or Create an account to join the conversation.
- re_relentlessly
- Offline
- Senior Member
Less
More
- Posts: 49
- Thank you received: 4
14 May 2022 01:34 #242934
by re_relentlessly
Replied by re_relentlessly on topic VFD Vo 0-10V rpm feedback - Analogue pin flicker
Thank Andy for the suggestions.
Plotting input and output in halscope at least allowed me to get the kalman filter to do something.
It seems to work best when Rk and Qk are far apart, although I could not tell the difference when shifting them around (1 and 0.0000001 or 10 and 0.000001).
Also I am still running into the same issues with all the filtering methods: there is a offset from the desired/correct value (lower) and the more I filter (to get the output steady) the slower the response time becomes.
It feels a little like at this point the whole rpm feedback from the VFD is just so noisy as to be mostly only a general idea. probably just going to have to live with the lowpass filter or kalman and the unsteady output.
Though If you have any other ideas or suggestions I am all ears.
Plotting input and output in halscope at least allowed me to get the kalman filter to do something.
net spindle-rpm-raw kalman.spindle.zk <= hm2_7i76e.0.7i76.0.0.analogin0
net spindle-rpm-filtered <= kalman.spindle.xk-out
setp kalman.spindle.Rk 100
setp kalman.spindle.Qk 0.00001
It seems to work best when Rk and Qk are far apart, although I could not tell the difference when shifting them around (1 and 0.0000001 or 10 and 0.000001).
Also I am still running into the same issues with all the filtering methods: there is a offset from the desired/correct value (lower) and the more I filter (to get the output steady) the slower the response time becomes.
It feels a little like at this point the whole rpm feedback from the VFD is just so noisy as to be mostly only a general idea. probably just going to have to live with the lowpass filter or kalman and the unsteady output.
Though If you have any other ideas or suggestions I am all ears.
Please Log in or Create an account to join the conversation.
Time to create page: 0.054 seconds