-
Notifications
You must be signed in to change notification settings - Fork 0
Home
kendemu edited this page Jul 13, 2014
·
1 revision
Welcome to the KendemuRCJArduinoProject wiki!
direction control(PID control)
Proportion : p_gein = parameter * difference of target direction between the current direction Integral : if (|last difference - difference| < parameter) i_gein = time * parameter2 Differencial : d_gein = angular_velocity * radius
motor power *= p_gein + i_gein + d_gein
finding ball direction(fuzzy control)
ball_x_vector = cos(ball1_direction) + cos(ball2_direction) + cos(ball3_direction) + cos(ball4_direction) + ...... + cos(ball^n_direction) ball_y_vector = sin(ball1_direction) + sin(ball2_direction) + sin(ball3_direction) + sin(ball4_direction) * ...... +sin(ball^n_direction) to calculate direction , atan(ball_y_vector / ball_y_vector)