Home arrow Forums
914 PC Bots Forum  


<< Start < Prev 1 2 Next > End >>
edaniels
User

Platinum Boarder
Posts: 240
graphgraph
Karma: 2  
Re:PID control - 2009/05/20 00:38 PID control relies on getting some information back from some sensor, typically a wheel encoder or the like. The PC-BOT does not have any of that sort of information available unless you add it yourself. It runs two stepper motors and the M3 will tell you basically "this is how many counts I've told the motors to step" based on a motion trajectory that you program it with (acceleration, max velocity, jerk, and distance to move, depending on the trajectory you choose).

The M3 uses a PMD 3410 chipset and PMD has two manuals available for it -- a user guide and a programmer guide. I think my old "WhiteBoxOS" distribution included those, but you may be able to download them from PMD's website, pmdcorp.com.

You could perhaps use the PMD's "velocity contouring profile" which would then let you vary the velocities of the left and right motors in response to external stimuli such as data from a camera or range sensor. The BRIAN code that the robot was shipped with used this mode, I think.

Post edited by: edaniels, at: 2009/05/20 00:42
  | | The administrator has disabled public write access.
c6jones720
User

Platinum Boarder
Posts: 350
graphgraph
Karma: 3  
Re:PID control - 2009/05/20 20:14 velocity contouring is definately the way to go for PID and quick responsive control. If you added a compass to the robot you definately could do PID navigation.
  | | The administrator has disabled public write access.
ionutdinulescu
User

Senior Boarder
Posts: 12
graphgraph
Karma: 0  
Re:PID control - 2009/10/26 19:18 Thanks for your sugestion.

I managed to write my own software starting from the drivers supplied with the PMD board and I can enable velocity contour mode very easy.

Now I have a second problem.
For instance I would need the robot to go on a curved trajectory. It's obvious that in this case the velocities of the wheels change in time. I choose a sampling time T and set the velocities for each wheel between each interval [kT,(k+1)T].

Then I think I'll need to startup a timer that will count the T intervals and give me an event/interrupt/whatever on which I will change the velocities.

Does anyone have an idea on how to implement such a timer on Windows ? I needs to be as real-time as possible.
Also has anyone done this with a different approach ?

Thanks.
Ionut
  | | The administrator has disabled public write access.
c6jones720
User

Platinum Boarder
Posts: 350
graphgraph
Karma: 3  
Re:PID control - 2009/10/28 20:30 Im not sure windows is up to this task. I know what you are describing and have had to do exactly the same thing for real at work on a different type of robot.

It sound to me like to do what you want you will be opening a can of worms.
If you want real time I think youre going to have to go to linux.

Linux is not actually real time, but you can delve into kernel space and access timer interrupts to give you pretty much real time control. -Basically to do what you want I think you will have resort to writing a driver/kernel module. Linux is simply easier to program for for this type of application.

Thats the easy bit. You then have to do your PID calculations. You might want to use floating point, but you cant in the kernel. This means your maths would have to be integer arithmetic etc...
  | | The administrator has disabled public write access.
ionutdinulescu
User

Senior Boarder
Posts: 12
graphgraph
Karma: 0  
Re:PID control - 2009/11/06 16:24 Have you guys used C-Motion from PMD ? Do you think it's appropiate for solving real-time issue ?
  | | The administrator has disabled public write access.
c6jones720
User

Platinum Boarder
Posts: 350
graphgraph
Karma: 3  
Re:PID control - 2009/11/10 20:44 The dll I wrote uses the c-motion libraries. They are very good, but they are not real time. Also be aware that the single longest operation you can perform is to read the ADCs.
If you want a very fast real time system you will need to reinvent the wheel. If you just want a program that can control the robot then you can use whatever you like.

Bear in mind that a lot of hard work is performed in real time by the PMD chip on the M3, you just wont get it from windows in real time.
  | | The administrator has disabled public write access.
<< Start < Prev 1 2 Next > End >>