{"id":15350,"date":"2021-11-25T17:36:07","date_gmt":"2021-11-25T22:36:07","guid":{"rendered":"https:\/\/ckms.ca\/?p=15350"},"modified":"2021-11-25T17:36:44","modified_gmt":"2021-11-25T22:36:44","slug":"my-pid-car-driving-anoalogy","status":"publish","type":"post","link":"https:\/\/blog.ckms.ca\/?p=15350","title":{"rendered":"My PID car-driving anoalogy"},"content":{"rendered":"<p>This is my analogy for expaining PID control.\u00a0 Car analogy is somehting most people understand.<\/p>\n<p>I may have written this before elsewhare.\u00a0 Finally wrote it again? after watching this dude:<\/p>\n<p>https:\/\/forum.dronebotworkshop.com\/2021\/build-a-custom-servo-motor-with-a-dc-motor\/<\/p>\n<p><iframe loading=\"lazy\" title=\"Using Servo Motors with Arduino\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/kUHmYKWwuWs?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p>&nbsp;<\/p>\n<p>&#8212; Raw:<\/p>\n<p>My PID describer&#8230; think of driving a car., everyone knows how to drive a car, and while doing so, they&#8217;rte doing a couple of PID loops without really knowingit. Steering and speed control (assuming not using cruise control).<\/p>\n<p>measuring &#8211; using a few diffent methods 9 line up hood ornament to side of ride, left endge of car hood vs the centerline, putting my foot left on the left-sde groove on te roadway, etc. we &#8220;measure&#8221; the error<\/p>\n<p>P &#8211; the larger the error (the further you are pointing away fromthe desired direction<\/p>\n<p>D &#8211; the slope of thw line of your direcretion change is happening (the derivitive) is subtrat4ed from the correction outoput; if you are still moving away from the correct direction, turn harder. once your heading towards the desired direction, you reduce 9hence the subtraction or the negative value if D reduce the output since you&#8217;re getting there. this reduces overshoots, but too much slows the response.<\/p>\n<p>I &#8211; over time, s the error under the curve (the integrl) increases, you will turn harder to make more correction.<\/p>\n<p>also, I think you need to to the D value being subtracted at the summing junction; makes it more obviouis that D is a dampener.<\/p>\n<p>&#8212;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is my analogy for expaining PID control.\u00a0 Car analogy is somehting&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[282],"tags":[919,994,729],"class_list":["post-15350","post","type-post","status-publish","format-standard","hentry","category-article","tag-mine","tag-pid","tag-work","wpcat-282-id"],"_links":{"self":[{"href":"https:\/\/blog.ckms.ca\/index.php?rest_route=\/wp\/v2\/posts\/15350","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ckms.ca\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ckms.ca\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ckms.ca\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ckms.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=15350"}],"version-history":[{"count":0,"href":"https:\/\/blog.ckms.ca\/index.php?rest_route=\/wp\/v2\/posts\/15350\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.ckms.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=15350"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ckms.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=15350"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ckms.ca\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=15350"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}