TAILIEUCHUNG - Feedback.Control.for.a.Path.Following.Robotic.Car Part 12

Tham khảo tài liệu ' part 12', kỹ thuật - công nghệ, cơ khí - chế tạo máy phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Patricia Mellodge Appendix 100 v2 alpha2 u2-alpha1 u1_actual phi phi v2 T if phi phi if phi phi angle Round phi if angle 0 angle 0 if angle 63 angle 63 output e_bit s_bit angle offset 1 enable car PutMem mem output offset load values to PIC PSP offset 3 PIC interrupt triggers on rising edge PutMem mem output offset p_front_error front_error p_back_error back_error theta_p_prev theta_p a_hat_prev a_hat end while loop end main Function FindError Parameters array - the bits read from the bumper bits - the number of individual sensors in the bumper spacing - the distance between the sensors in meters Returns error - the distance in inches that the line is off center if the line is to the right error is positive float FindError long array long bits float spacing float max float p_error static static static static static static long long long long float float i mask current num error val error 0 num 0 val bits- 1 2 for i 0 i bits i mask 0x0001 i current mask array if current 0 Patricia Mellodge Appendix 101 error error val-i spacing num num 1 if num 0 error Sign p_error max else error error float num return error Function LateralController Parameters chained state variables x2 x3 x4 and the car s transformed velocity u1 Returns U2 - the tranformed angular velocity float LateralController float X2 float X3 float X4 float U1 static float U2 steering angular velocity and a very good rock band static float k1 k2 k3 gains define lambda 20 k1 10 lambda lambda k2 3 lambda lambda k3 3 lambda U2 -k1 U1 X4-k2 U1 X3-k3 U1 X2 return U2 Function Round Parameters x - the float number to round Returns temp - rounded integer value of x long Round float x static long temp static float y temp long x if x 0 y x-temp if y temp temp 1 else y temp-x if y Patricia Mellodge Appendix 102 temp temp-1 return temp Function Sign Parameters x - the float number to take the sign of Returns 1 if x 0 -1 if x 0 zero otherwise long Sign float x if x 0 .

TỪ KHÓA LIÊN QUAN
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.