View unanswered posts | View active topics It is currently Sat Jul 23, 2016 9:12 am






Reply to topic  [ 5 posts ] 
PID Control 
Author Message
Rookie

Joined: Sun Oct 04, 2015 12:20 pm
Posts: 1
Post PID Control
For the robot I am working on, I would like to use PID to regulate the speed of a flywheel. Will using Integrated Motor Encoders and checking the "PID Control" option in the "Setup Motors and Sensors" menu do the trick? Or do I have to implement my own algorithm?

Thanks.


Sun Oct 04, 2015 12:23 pm
Profile
Rookie

Joined: Sat Nov 29, 2014 4:51 am
Posts: 11
Post Re: PID Control
Hi kb3wmh,

I have used PID control and found it very accurate for the integrated motor Encoders. So yes checking PID control will work.

Quick note.

Creating your own algorithm may give some extra reliability since you will be fine tuning it for your robot.

I hope you find this useful.

Kind regards,
Asim Poptani
King Henry VIII


Thu Oct 08, 2015 2:11 pm
Profile
Rookie

Joined: Tue Nov 03, 2015 8:22 pm
Posts: 3
Post Re: PID Control
I'm also facing the same issue. Hi My name is marelzarka or just mar and my team migrated from easyc to RobotC this season and as head programmer I need to know how to use this in order to accurately program the flywheel on our robot as well. Would anyone be able to link me to a tutorial either video or text on motor encoders?

Another thing that I'm also having issues with is when I assign motors to vexRT channels, they are not the ones I've specified. For example I've setup the code so that it is arcadecontrol(Ch3,Ch4); without a threshold on purpose, mainly because I don't know what the threshold does. Unfortunately the arcade control is set to channels 1 and 2 when we actually move. There is another issue. I don't know how RobotC sets which motors as the chassis for arcade control. Nor do I know why some of my motors are moving regardless of the code and cortex they are plugged into. I will replace them with new motors and a new cortex but once again there is only so much I can do without the knowledge of the forums! Any help is much appreciated!! :) Thanks again!


Tue Nov 03, 2015 8:29 pm
Profile
Rookie

Joined: Sat Nov 29, 2014 4:51 am
Posts: 11
Post Re: PID Control
Hi marelzarka,

Great to see you have joined Robotc (High five).

Quote:
Would anyone be able to link me to a tutorial either video or text on motor encoders?


yep sure : http://www.education.rec.ri.cmu.edu/products/cortex_video_trainer/lesson/3-6IntegratedEncoders1.html

Quote:
Another thing that I'm also having issues with is when I assign motors to vexRT channels, they are not the ones I've specified. For example I've setup the code so that it is arcadecontrol(Ch3,Ch4); without a threshold on purpose, mainly because I don't know what the threshold does. Unfortunately the arcade control is set to channels 1 and 2 when we actually move. There is another issue. I don't know how RobotC sets which motors as the chassis for arcade control. Nor do I know why some of my motors are moving regardless of the code and cortex they are plugged into. I will replace them with new motors and a new cortex but once again there is only so much I can do without the knowledge of the forums! Any help is much appreciated!!


Don't get a new cortex just yet! Could you please show me the code please. Also have you installed the robotc drivers on the cortex and the controller?

King Regards,

Asim


Wed Nov 04, 2015 3:23 pm
Profile
Rookie

Joined: Tue Nov 03, 2015 8:22 pm
Posts: 3
Post Re: PID Control
So after having mechanical issues in our first competition and doing quite poorly and then resolving those issues, all I have left to do is fine tune the motor encoders. I know that there is a tutorial but that is based off of one motor encoder. What I would like help with is making a base algorithm from which I can work from.

My thoughts currently:
Calculate desired target motor speed via trial and error.
run a method that adds increments to the motor speeds until that motor speed is found and an inverse version that subtracts if the motor speed is too high.

My only issue is that since I am new to this, I don't really know what I need to do when calculating such a game. I don't understand why some algorithms calculate the difference and look super complicated. Again I'm still a newbie so I'll take all the help I can get. Currently I have a double flywheel with 2 sets of motors on each side and one on each side being a 393 motor encoder. Currently I've wired them up and can read in real-time the values of the encoders. I need to know how to reset it and check it consistently and how to convert that motor speed into flywheel speed.

Thanks again for all the help.


Wed Nov 18, 2015 6:57 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.