View Full Version : MATLAB modeling

Jul 24, 2007, 10:11 AM

I need some help with some MATLAB modeling I want to do. I already do quite a bit of work in MATLAB but I have never done anything like this more complex model I need to design.

Is there an 'expert' out there who can give me a few pointers, I will go into further detail if anyone can help.


Jul 24, 2007, 10:43 AM
Is there an 'expert' out there who can give me a few pointers, I will go into further detail if anyone can help.

Going into some more detail might be helpful to let others help, though I'm personally not a matlab 'expert'.

Jul 24, 2007, 12:53 PM
Hi, I haven't used matlab in a while, but I have experience doing simulations, if you give me an overall description of your project I might be able to give you some hints.

Best Regards

Jul 24, 2007, 02:44 PM
Ok here is the general idea:

I have a small dual axis robot. I need the robot to head towards a 'coloured' light (blue) but avoid a red light. On the robot I have 4 photo-receptor sensors (2 red and 2 blue) which control the 2 motors on the robot.

I have generated equations for the robot behavior, I just need to test them and prove that the system is stable.

Below is a picture showing a general overview of what I have:

http://img164.imageshack.us/img164/4084/robot1tz8.th.jpg (http://img164.imageshack.us/my.php?image=robot1tz8.jpg)

What i would like to be able to do is move the red and blue lights around to fully test my theories. At the moment the intensity of the light signal is calculated using trigonometry with a scale of 1 to 0

Jul 24, 2007, 10:39 PM
I'm confused what do you mean by the equations been stable.
The way I would do it is to divide the space into a grid (64 by 64 should be enough), this would make calculations easier, specially using matlab. one of the grid point will be your robot, and another two your two lights. Maybe later on you would like to add a parameter to your robot theta that will determine witch direction the robot is using.

Remember intensity is measured W/m^2 or Power over area, that means that the Intensity is inversely proportional to the square of the distance.

I would match the time step to the time needed for the robot to travel one grid division in the slowest velocity. (remember going on diagonal takes longer, but if the grid space is small enough this might be ignored).

Start with known scenarios and make sure they work fine, like the lights fixed, or traveling on a straight line.

This should be a good first approach, better solutions could be found.

Just out of curiosity, what kind of robot are you using? I used parallax basic stamp some time ago, and parallax have a new microprocessor called propeller whit intrinsic multi threating, worth giving it a look.

I hope this helps you. Let me know if I miss understood your project, and let me know how everything goes.

Best Regards