Signal spikes from servomotors need to be eliminate

1 次查看(过去 30 天)
I have 2 servomotors that function based on some code. I am sending commands through a data cable, and also get the actual position with the help of the control circuit through another data cable(inside a servo there is a pretty simple set-up: a small DC motor, potentiometer, and a control circuit). Servos are controlled by sending an electrical pulse of variable width, or pulse width modulation (PWM), through the control wire. There is a minimum pulse, a maximum pulse, and a repetition rate.
So I have one signal sent, one signal received, through different cables of course. I have a Matlab interface that sends the position and acquires the info. The problem is I get some spikes on the graph.
Even when it should get stick to 0, we can see the spikes (in the red circle). For me looks like whenever finishes the pulse width I get a spike. I need to eliminate this spike. The problem is that it appears when the motors are moving, so how can eliminate the spikes without influence (in a bad way) the data I receive (need to filter in real time)? I have no idea whatsoever how to filter this. Please help. Thank you. (Matlab 2015b)

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Import and Analysis 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by