View Single Post
  #11   Spotlight this post!  
Unread 25-04-2004, 17:59
Salik Syed Salik Syed is offline
Registered User
FRC #0701 (RoboVikes)
Team Role: Alumni
 
Join Date: Jan 2003
Rookie Year: 2001
Location: Stanford CA.
Posts: 514
Salik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud ofSalik Syed has much to be proud of
Send a message via AIM to Salik Syed
Re: PID control loops - closed loop feedback

degree seconds? i thought it would give the degree angle of the arm ...like a potentiometer... (degree/seconds * seconds = degrees ) right?



btw this is the actual code it hasn't been compiled or tested yet just theory...just notepad:
Code:
p2_y=armin;
targetv=armin;   //just temporary...

//////get gyro input conv to 8bit

(int)gyroin10bit=Get_Analog_Value(rc_anlg_in01);
gyroval=gyroin10bit/4;

////convert gyro values to usable values....
armaccel=gyroval-127;


///integrate
realv=(armaccel+realv)/time; 
time++;
//////////////



if((hicutoff+targetv)>realv>(locutoff+targetv))
	{
	armout=(targetv-realv)/proportion;
	}
pwm03=pwm03+armout;
One more thing... What is this about integral and derivative.... I get the proportional part (basically multiplying by how much change the input produces.."Gain" )
but why integrate the error....i don't get this and how it works ? i read some stuff about how it is an automatic reset which doesn't quite make sense to me...... Also can someone explain the derivative...part...
__________________
Team 701

Last edited by Salik Syed : 25-04-2004 at 18:08.