{"id":82897,"date":"2025-02-06T13:31:29","date_gmt":"2025-02-06T19:31:29","guid":{"rendered":"https:\/\/www.controleng.com\/articles\/pid-the-basic-technique-for-feedback-control\/"},"modified":"2025-04-23T19:35:29","modified_gmt":"2025-04-24T00:35:29","slug":"pid-the-basic-technique-for-feedback-control","status":"publish","type":"post","link":"https:\/\/www.controleng.com\/pid-the-basic-technique-for-feedback-control\/","title":{"rendered":"How to tune a PID controller"},"content":{"rendered":"\n<div class=\"wp-block-group is-style-default has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:100%\">\n<div class=\"wp-block-group alignfull is-nowrap is-layout-flex wp-container-core-group-is-layout-bd3f9bef wp-block-group-is-layout-flex\">\n<div class=\"wp-block-columns are-vertically-aligned-bottom is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-vertically-aligned-bottom is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:100%\"><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n<p>A feedback controller is designed to generate an output that causes some corrective effort to be applied to a process to drive a measurable process variable towards a desired value known as the setpoint. Virtually all feedback controllers determine their output by observing the error between the setpoint and the actual process variable measurement.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Defining a PID controller<\/h2>\n\n\n\n<p>A <a href=\"https:\/\/www.controleng.com\/not-all-pid-controllers-are-the-same\/\">proportional-integral-derivative, or PID, controller<\/a> looks at the current value of the error, the integral of the error over a recent time interval and the current derivative of the error signal to determine not only how much of a correction to apply, but for how long. Those three quantities are each multiplied by a tuning constant and added together to produce the current controller output CO(t) thusly:<\/p>\n\n\n\n<p>In equation (1), P is the proportional tuning constant, I is the integral tuning constant, D is the derivative tuning constant, and e(t) is the error between the setpoint SP(t) and the process variable PV(t) at time (t).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">e(t) = SP(t) &#8211; PV (t)<\/h3>\n\n\n\n<p>If the current error is large, has been sustained for some time or is changing rapidly, the controller will attempt to make a large correction by generating a large output. Conversely, if the process variable has matched the setpoint for some time, the controller will leave well enough alone.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The basics of tuning a PID controller<\/h2>\n\n\n\n<p>Conceptually, that&#8217;s all there is to a PID controller. The <a href=\"https:\/\/www.controleng.com\/initial-settings-for-pid-controllers\/\">tricky part is tuning it<\/a>, meaning setting the P, I and D tuning constants so the weighted sum of the proportional, integral and derivative terms produces a controller output that steadily drives the process variable in the direction required to eliminate the error.<\/p>\n\n\n\n<p>This will cause the controller to initiate a burst of corrective efforts the instant the error changes from zero. The proportional term will then come in to play to keep the controller&#8217;s output going until the error is eliminated.<\/p>\n\n\n\n<p>The controller will continue to generate an output based on the history of errors that have been accumulating in the controller&#8217;s integrator. The process variable may then overshoot the setpoint, causing an error in the opposite direction.<\/p>\n\n\n\n<p>The accumulated errors are eliminated. Meanwhile, the derivative term will continue to add its share to the controller output based on the derivative of the oscillating error signal. The proportional term too will come and go as the error waxes and wanes.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<p><\/p>\n\n\n\n<p><em>This article originally appeared Jan. 1,  1997.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A feedback controller is designed to generate an output that causes some corrective effort to be applied to a process to drive a measurable process variable towards a desired value known as the setpoint. Virtually all feedback controllers determine their output by observing the error between the setpoint and the actual process variable measurement. Defining [&hellip;]<\/p>\n","protected":false},"author":3604,"featured_media":121848,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"pgc_sgb_lightbox_settings":"","footnotes":""},"categories":[104038],"tags":[109340,109730,109731,109503,109502,109501],"tracking-metrics":[],"display-location":[],"class_list":{"2":"type-post"},"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to tune a PID controller - Control Engineering<\/title>\n<meta name=\"description\" content=\"A PID controller considers the current value of the error, the integral of the error over time and the current derivative of the error.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.controleng.com\/pid-the-basic-technique-for-feedback-control\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to tune a PID controller - Control Engineering\" \/>\n<meta property=\"og:description\" content=\"A PID controller considers the current value of the error, the integral of the error over time and the current derivative of the error.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.controleng.com\/pid-the-basic-technique-for-feedback-control\/\" \/>\n<meta property=\"og:site_name\" content=\"Control Engineering\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ControlEngineeringMagazine\" \/>\n<meta property=\"article:published_time\" content=\"2025-02-06T19:31:29+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-24T00:35:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.controleng.com\/wp-content\/uploads\/2024\/11\/CTL2404_MAG2_F1a_PID_Hargrove_APC_Fig2_DCS-Slider-1.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"580\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Control Engineering Staff\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@controlengtips\" \/>\n<meta name=\"twitter:site\" content=\"@controlengtips\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Control Engineering Staff\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.controleng.com\/pid-the-basic-technique-for-feedback-control\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.controleng.com\/pid-the-basic-technique-for-feedback-control\/\"},\"author\":{\"name\":\"Control Engineering Staff\",\"@id\":\"https:\/\/www.controleng.com\/#\/schema\/person\/23a1144d9b5d980be07d7f9539a674b2\"},\"headline\":\"How to tune a PID controller\",\"datePublished\":\"2025-02-06T19:31:29+00:00\",\"dateModified\":\"2025-04-24T00:35:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.controleng.com\/pid-the-basic-technique-for-feedback-control\/\"},\"wordCount\":414,\"publisher\":{\"@id\":\"https:\/\/www.controleng.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.controleng.com\/pid-the-basic-technique-for-feedback-control\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.controleng.com\/wp-content\/uploads\/2024\/11\/CTL2404_MAG2_F1a_PID_Hargrove_APC_Fig2_DCS-Slider-1.jpeg\",\"keywords\":[\"control engineering\",\"controls\",\"PId\",\"PID control\",\"PID controller tuning\",\"PID tuning\"],\"articleSection\":[\"PID, APC\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.controleng.com\/pid-the-basic-technique-for-feedback-control\/\",\"url\":\"https:\/\/www.controleng.com\/pid-the-basic-technique-for-feedback-control\/\",\"name\":\"How to tune a PID controller - Control Engineering\",\"isPartOf\":{\"@id\":\"https:\/\/www.controleng.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.controleng.com\/pid-the-basic-technique-for-feedback-control\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.controleng.com\/pid-the-basic-technique-for-feedback-control\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.controleng.com\/wp-content\/uploads\/2024\/11\/CTL2404_MAG2_F1a_PID_Hargrove_APC_Fig2_DCS-Slider-1.jpeg\",\"datePublished\":\"2025-02-06T19:31:29+00:00\",\"dateModified\":\"2025-04-24T00:35:29+00:00\",\"description\":\"A PID controller considers the current value of the error, the integral of the error over time and the current derivative of the error.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.controleng.com\/pid-the-basic-technique-for-feedback-control\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.controleng.com\/pid-the-basic-technique-for-feedback-control\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.controleng.com\/pid-the-basic-technique-for-feedback-control\/#primaryimage\",\"url\":\"https:\/\/www.controleng.com\/wp-content\/uploads\/2024\/11\/CTL2404_MAG2_F1a_PID_Hargrove_APC_Fig2_DCS-Slider-1.jpeg\",\"contentUrl\":\"https:\/\/www.controleng.com\/wp-content\/uploads\/2024\/11\/CTL2404_MAG2_F1a_PID_Hargrove_APC_Fig2_DCS-Slider-1.jpeg\",\"width\":1024,\"height\":580,\"caption\":\"Courtesy: Hargrove Controls & Automation\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.controleng.com\/pid-the-basic-technique-for-feedback-control\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.controleng.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to tune a PID controller\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.controleng.com\/#website\",\"url\":\"https:\/\/www.controleng.com\/\",\"name\":\"Control Engineering\",\"description\":\"Control Engineering covers and educates about automation, control and instrumentation technologies\",\"publisher\":{\"@id\":\"https:\/\/www.controleng.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.controleng.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.controleng.com\/#organization\",\"name\":\"Control Engineering\",\"url\":\"https:\/\/www.controleng.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.controleng.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.controleng.com\/wp-content\/uploads\/2024\/12\/ce_logo.png\",\"contentUrl\":\"https:\/\/www.controleng.com\/wp-content\/uploads\/2024\/12\/ce_logo.png\",\"width\":300,\"height\":93,\"caption\":\"Control Engineering\"},\"image\":{\"@id\":\"https:\/\/www.controleng.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/ControlEngineeringMagazine\",\"https:\/\/x.com\/controlengtips\",\"https:\/\/www.linkedin.com\/company\/control-engineering-magazine\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.controleng.com\/#\/schema\/person\/23a1144d9b5d980be07d7f9539a674b2\",\"name\":\"Control Engineering Staff\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.controleng.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a71b8c279c109855866696137da9e5ce8350c84b413aec20631de37d1abcf56b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/a71b8c279c109855866696137da9e5ce8350c84b413aec20631de37d1abcf56b?s=96&d=mm&r=g\",\"caption\":\"Control Engineering Staff\"},\"url\":\"https:\/\/www.controleng.com\/author\/control-engineering-staff\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to tune a PID controller - Control Engineering","description":"A PID controller considers the current value of the error, the integral of the error over time and the current derivative of the error.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.controleng.com\/pid-the-basic-technique-for-feedback-control\/","og_locale":"en_US","og_type":"article","og_title":"How to tune a PID controller - Control Engineering","og_description":"A PID controller considers the current value of the error, the integral of the error over time and the current derivative of the error.","og_url":"https:\/\/www.controleng.com\/pid-the-basic-technique-for-feedback-control\/","og_site_name":"Control Engineering","article_publisher":"https:\/\/www.facebook.com\/ControlEngineeringMagazine","article_published_time":"2025-02-06T19:31:29+00:00","article_modified_time":"2025-04-24T00:35:29+00:00","og_image":[{"width":1024,"height":580,"url":"https:\/\/www.controleng.com\/wp-content\/uploads\/2024\/11\/CTL2404_MAG2_F1a_PID_Hargrove_APC_Fig2_DCS-Slider-1.jpeg","type":"image\/jpeg"}],"author":"Control Engineering Staff","twitter_card":"summary_large_image","twitter_creator":"@controlengtips","twitter_site":"@controlengtips","twitter_misc":{"Written by":"Control Engineering Staff","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.controleng.com\/pid-the-basic-technique-for-feedback-control\/#article","isPartOf":{"@id":"https:\/\/www.controleng.com\/pid-the-basic-technique-for-feedback-control\/"},"author":{"name":"Control Engineering Staff","@id":"https:\/\/www.controleng.com\/#\/schema\/person\/23a1144d9b5d980be07d7f9539a674b2"},"headline":"How to tune a PID controller","datePublished":"2025-02-06T19:31:29+00:00","dateModified":"2025-04-24T00:35:29+00:00","mainEntityOfPage":{"@id":"https:\/\/www.controleng.com\/pid-the-basic-technique-for-feedback-control\/"},"wordCount":414,"publisher":{"@id":"https:\/\/www.controleng.com\/#organization"},"image":{"@id":"https:\/\/www.controleng.com\/pid-the-basic-technique-for-feedback-control\/#primaryimage"},"thumbnailUrl":"https:\/\/www.controleng.com\/wp-content\/uploads\/2024\/11\/CTL2404_MAG2_F1a_PID_Hargrove_APC_Fig2_DCS-Slider-1.jpeg","keywords":["control engineering","controls","PId","PID control","PID controller tuning","PID tuning"],"articleSection":["PID, APC"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.controleng.com\/pid-the-basic-technique-for-feedback-control\/","url":"https:\/\/www.controleng.com\/pid-the-basic-technique-for-feedback-control\/","name":"How to tune a PID controller - Control Engineering","isPartOf":{"@id":"https:\/\/www.controleng.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.controleng.com\/pid-the-basic-technique-for-feedback-control\/#primaryimage"},"image":{"@id":"https:\/\/www.controleng.com\/pid-the-basic-technique-for-feedback-control\/#primaryimage"},"thumbnailUrl":"https:\/\/www.controleng.com\/wp-content\/uploads\/2024\/11\/CTL2404_MAG2_F1a_PID_Hargrove_APC_Fig2_DCS-Slider-1.jpeg","datePublished":"2025-02-06T19:31:29+00:00","dateModified":"2025-04-24T00:35:29+00:00","description":"A PID controller considers the current value of the error, the integral of the error over time and the current derivative of the error.","breadcrumb":{"@id":"https:\/\/www.controleng.com\/pid-the-basic-technique-for-feedback-control\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.controleng.com\/pid-the-basic-technique-for-feedback-control\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.controleng.com\/pid-the-basic-technique-for-feedback-control\/#primaryimage","url":"https:\/\/www.controleng.com\/wp-content\/uploads\/2024\/11\/CTL2404_MAG2_F1a_PID_Hargrove_APC_Fig2_DCS-Slider-1.jpeg","contentUrl":"https:\/\/www.controleng.com\/wp-content\/uploads\/2024\/11\/CTL2404_MAG2_F1a_PID_Hargrove_APC_Fig2_DCS-Slider-1.jpeg","width":1024,"height":580,"caption":"Courtesy: Hargrove Controls & Automation"},{"@type":"BreadcrumbList","@id":"https:\/\/www.controleng.com\/pid-the-basic-technique-for-feedback-control\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.controleng.com\/"},{"@type":"ListItem","position":2,"name":"How to tune a PID controller"}]},{"@type":"WebSite","@id":"https:\/\/www.controleng.com\/#website","url":"https:\/\/www.controleng.com\/","name":"Control Engineering","description":"Control Engineering covers and educates about automation, control and instrumentation technologies","publisher":{"@id":"https:\/\/www.controleng.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.controleng.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.controleng.com\/#organization","name":"Control Engineering","url":"https:\/\/www.controleng.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.controleng.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.controleng.com\/wp-content\/uploads\/2024\/12\/ce_logo.png","contentUrl":"https:\/\/www.controleng.com\/wp-content\/uploads\/2024\/12\/ce_logo.png","width":300,"height":93,"caption":"Control Engineering"},"image":{"@id":"https:\/\/www.controleng.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/ControlEngineeringMagazine","https:\/\/x.com\/controlengtips","https:\/\/www.linkedin.com\/company\/control-engineering-magazine\/"]},{"@type":"Person","@id":"https:\/\/www.controleng.com\/#\/schema\/person\/23a1144d9b5d980be07d7f9539a674b2","name":"Control Engineering Staff","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.controleng.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/a71b8c279c109855866696137da9e5ce8350c84b413aec20631de37d1abcf56b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a71b8c279c109855866696137da9e5ce8350c84b413aec20631de37d1abcf56b?s=96&d=mm&r=g","caption":"Control Engineering Staff"},"url":"https:\/\/www.controleng.com\/author\/control-engineering-staff\/"}]}},"_links":{"self":[{"href":"https:\/\/www.controleng.com\/wp-json\/wp\/v2\/posts\/82897","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.controleng.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.controleng.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.controleng.com\/wp-json\/wp\/v2\/users\/3604"}],"replies":[{"embeddable":true,"href":"https:\/\/www.controleng.com\/wp-json\/wp\/v2\/comments?post=82897"}],"version-history":[{"count":0,"href":"https:\/\/www.controleng.com\/wp-json\/wp\/v2\/posts\/82897\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.controleng.com\/wp-json\/wp\/v2\/media\/121848"}],"wp:attachment":[{"href":"https:\/\/www.controleng.com\/wp-json\/wp\/v2\/media?parent=82897"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.controleng.com\/wp-json\/wp\/v2\/categories?post=82897"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.controleng.com\/wp-json\/wp\/v2\/tags?post=82897"},{"taxonomy":"tracking-metric","embeddable":true,"href":"https:\/\/www.controleng.com\/wp-json\/wp\/v2\/tracking-metrics?post=82897"},{"taxonomy":"display-location","embeddable":true,"href":"https:\/\/www.controleng.com\/wp-json\/wp\/v2\/display-location?post=82897"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}