An optimal encoding project with Kalman filtering

Hi,
I am completely new to robotics. To start learning by doing, I decided to perform a hello-world-type project with Kalman filtering. All what I know is only a little math theory and limited experience with Simulink.

The filter must reduce the noise from an incremental optical encoding system, which is consisting of these parts:

  1. HSR-1422CR Continuous Rotation Standard Servo
  2. Inex Infrared Reflective Sensor - TCRT5000L
    robotshop.ca/inex-infrared-reflective-sensor-TCR-2.html
  3. Arduino Duemilanove USB Microcontroller Board
    robotshop.ca/arduino-usb-microcontroller-board.html
  4. Also learned about codewheel here:
    mindspring.com/~tom2000/Delphi/Codewheel.html
  5. I have seen some practical implementations of KF, for instance here:
    arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1225283209

The hardware assembling is consisting of:

  1. Mounting the codewheel on the servo
  2. Mounting the reflector sensor, faced to the codewheel
  3. Connect them to the Arduino
  4. Connect the Arduino to a PC, to program the system explained below.

The thing is that I still did not receive the parts I bought, and I can’t sit, doing nothing! I would like to start a simulation phase:

  1. Develop a block-diagram of the control system with math-model of parts, with a Kalman filter embedded in that and a source of random process generating.
  2. Get a graph, showing actual system state with and without noise, and the Kalman-filtered signal all together, so that to see and feel (how) the filter works.

This finishes the simulation phase, and hopefully by finishing it in a week, I will have my parts and go for a real experiment :slight_smile:

Please support:

  1. What is your idea about the block-diagram, parts and their math-model?
  2. What should be the state-space equation? I can’t imagine, what the state of the system must be in this case? Spinning angle, or the distance?
  3. Any other general recommendations / instructions / link to tutorials, all are very welcome!

Best Regards!!

When you say block diagram do you mean free body diagram?

  1. Show us what you think the free body diagram should look like
  2. I’m pretty sure you develop the state space model from your free body diagram

First of all thank you for answering :slight_smile:
I did my best to provide pictures to clarify what I mean. As I’m novice in this field, I may use some terms not exactly in their right place!

  1. Exactly, my problem now is the lack of a complete imagination. by imagination (and by block-diagram) I mean something like this:

washingtonhw.110mb.com/sysarch.html
as you see, the happy owner of this diagram, has the whole system architecture: which components, what connections and math-model.

  1. Finally, I would like to come to a Simulink model, for a simulation. Here is a Simulink model (from the same happy robot owner of above)
    washingtonhw.110mb.com/simulmdl.html

  2. Here I explained my motivation for this project (goal):
    washingtonhw.110mb.com/wheelproblem.html

  3. And finally, I tried to show the physical parts I am going to use here:
    washingtonhw.110mb.com/Fiz_parts.html

So, it is not a robot, but a simulation to learn Kalman filtering.
I’m still confused, how to start to model the components under Simulink ((

arash I took a look at your links and I understand the concept behind what you are trying to apply but the lingering question is why the need for such precision? for indexing distance traveled the error is not so siginificant with respect to the errors introduced by difference in tread diameter on the wheels and how different textures of the terrain will impact on that diameter. Don’t get me wrong it is a cool and interesting direction to work with, but in application I think there may be more significant challenges to accurately developing a dead reckoning algorithm. :wink:

You are right EddieB! So now I explain the motivation behind these all. First of all I am trying to learn control theory and so on. Next, I would like to learn KF by doing/experimenting, to get prepared for a project with Two Wheeled Inverted Pendulum Robot, and my last dream is an Autopilot. But I am at the very beginning and without these small steps to do, I can’t imagine how to approach to what I’m interested in! That’s it :slight_smile: