Hello all,
I have got a motion signal rate signal (in degrees per second) coming from a motion sensor via RS232 into my control system.
The signal has quite a lot of noise when the sensor has no motion but this noise is approx 50Hz. This application will be for the marine industry so I will only be interested in below 5Hz as the boat will not be able to move at a higher frequency above this.
Therefore I should be able to use a low pass filter to filter this noise. When the sensor is not moved, I should have 0 degrees per second on the rate, when moved, only have the rate signal and not the noise. I will be happy
The controller is Beckhoff Twincat and I have got a digital filter supplement from Beckhoff.
I have set up the filter (input/output/order filter and cycle time). All I need now is the coefficients.
I found this site that you select the filter (i.e I have selected Butterworth, Low pass filter 3rd order with a cutoff frequency at 5Hz
http://www.dsptutor.freeuk.com/IIRFilterDesign/IIRFilterDesign.html
It generates the coefficients:-
Butterworth IIR filter
Filter type: LP
Passband: 0 - 5 Hz
Order: 3
Coefficients
a[0] = 7.540253E-9 b[0] = 1.0
a[1] = 2.2620759E-8 b[1] = -2.992146
a[2] = 2.2620759E-8 b[2] = 2.9843228
a[3] = 7.540253E-9 b[3] = -0.9921768
I have added these coefficients to my filter and done some testing.
The filtered signal has more noise than the input signal where I would have expected the opposite and for this noise to be completely filtered out.
I have tried with different orders and also different cut off frequencies but cant filter this noise or even get a substantial reduction. I also set the cutoff frequency as 1Hz i.e. filter majority of the signal but there is still this high frequency noise.
I am quite new to filters, am I doing something wrong or missing something? Is there any other web site that generates these Coefficients so I can cross reference?
Any help/comments appreciated
Matt
PS
This is the details of he digital filter I am using:-
http://infosys.beckhoff.com/english...tml/tcplclibcontoller_ctrl_digital_filter.htm
I have got a motion signal rate signal (in degrees per second) coming from a motion sensor via RS232 into my control system.
The signal has quite a lot of noise when the sensor has no motion but this noise is approx 50Hz. This application will be for the marine industry so I will only be interested in below 5Hz as the boat will not be able to move at a higher frequency above this.
Therefore I should be able to use a low pass filter to filter this noise. When the sensor is not moved, I should have 0 degrees per second on the rate, when moved, only have the rate signal and not the noise. I will be happy
The controller is Beckhoff Twincat and I have got a digital filter supplement from Beckhoff.
I have set up the filter (input/output/order filter and cycle time). All I need now is the coefficients.
I found this site that you select the filter (i.e I have selected Butterworth, Low pass filter 3rd order with a cutoff frequency at 5Hz
http://www.dsptutor.freeuk.com/IIRFilterDesign/IIRFilterDesign.html
It generates the coefficients:-
Butterworth IIR filter
Filter type: LP
Passband: 0 - 5 Hz
Order: 3
Coefficients
a[0] = 7.540253E-9 b[0] = 1.0
a[1] = 2.2620759E-8 b[1] = -2.992146
a[2] = 2.2620759E-8 b[2] = 2.9843228
a[3] = 7.540253E-9 b[3] = -0.9921768
I have added these coefficients to my filter and done some testing.
The filtered signal has more noise than the input signal where I would have expected the opposite and for this noise to be completely filtered out.
I have tried with different orders and also different cut off frequencies but cant filter this noise or even get a substantial reduction. I also set the cutoff frequency as 1Hz i.e. filter majority of the signal but there is still this high frequency noise.
I am quite new to filters, am I doing something wrong or missing something? Is there any other web site that generates these Coefficients so I can cross reference?
Any help/comments appreciated
Matt
PS
This is the details of he digital filter I am using:-
http://infosys.beckhoff.com/english...tml/tcplclibcontoller_ctrl_digital_filter.htm