Try Kalle's simple method. If that doesn't work then come back.erdemsvri said:Also I was thinking of gather more than one samples and comparing them like a convolusion but this simple solution really gets it going so no need for complexity.
Does this mean that Kalle's method didn't work?
If this is for a HMI then you should be able to tolerate a fairly big phase delay. If you want to do a convolution the the Savitsky-Golay filter is what you need to use.
http://www.google.com/search?client=safari&rls=en&q=savitzky-golay&ie=UTF-8&oe=UTF-8
You can even try the Holoborodko filter which is similar.
http://www.holoborodko.com/pavel/?page_id=245
You can see I have posted on his forum.
Other options are using filters such as a 4 pole Butterworth filter.
If what is the frequency of the pendulum swinging? Can this be modeled? There are plenty of simulations of pendulums swinging. If you can derive a model then a steady state Kalman filter can be used but that is getting more complicated.
What programming language are you going to be using and CPU or PLC will you be using? Some algorithms take much more CPU clock cycles than others.
That is the first place to start. I, my customers, have had little success reading the current directly. Usually a current or torque signal generated by the drives internal is required. The actual current is very noisy because it is a chopped of sine wave.I just thought it would be easier to shape up the signal
It doesn't take me that long. I have posted a Savitsky-Golay filter written in SCL on this forum before. No one seemed to care.than to prog a complex filter and burn hours searching for the different poles and factors.
However, there is much more to making a good filter than "search for the different poles and factors". What are you searching for? Right now we have no clue. What is the sample interval, sample jitter, the frequency of the noise, the frequency that must be passed.
I can calculate filter coefficients easily. I have most of the work done, much is posted on my site. I just need to know what to do not how.Exactly!
And who will pay for the spent hours?
Kalle