<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://script.spoken-tutorial.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=Other_Controllers</id>
		<title>Other Controllers - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=Other_Controllers"/>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Other_Controllers&amp;action=history"/>
		<updated>2026-05-13T01:47:26Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.17</generator>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=Other_Controllers&amp;diff=2002&amp;oldid=prev</id>
		<title>Gyan: Created page with '{|border=&quot;1&quot; width=100% ! width=20% | Visual Cue ! width=60% | Narration  |- | | In order to eliminate the steady state error, we add an integrator to the proportional controller…'</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Other_Controllers&amp;diff=2002&amp;oldid=prev"/>
				<updated>2012-12-24T10:41:33Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;#039;{|border=&amp;quot;1&amp;quot; width=100% ! width=20% | Visual Cue ! width=60% | Narration  |- | | In order to eliminate the steady state error, we add an integrator to the proportional controller…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{|border=&amp;quot;1&amp;quot; width=100%&lt;br /&gt;
! width=20% | Visual Cue&lt;br /&gt;
! width=60% | Narration&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
In order to eliminate the steady state error, we add an integrator to the proportional controller&lt;br /&gt;
That is to say, we add a pole at origin. &lt;br /&gt;
In order to have the root locus pass through the same point as before so as to maintain the same transient performance, we add a zero near the origin: &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
    PI = (s+1)/s&lt;br /&gt;
    evans(PI*System)&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
    sgrid(zeta, wn)  &lt;br /&gt;
    Kpi = -1/real(horner(PI*System, [1 %i]*locate(1)))&lt;br /&gt;
|&lt;br /&gt;
We use the same values of zeta and omega_n from the proportional controller. &lt;br /&gt;
&lt;br /&gt;
We now check the performance of the PI controller. &lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
    PISystem = Kpi*PI*System/. 1&lt;br /&gt;
    yPI = csim('step', t, PISystem);&lt;br /&gt;
    plot(t, yPI)&lt;br /&gt;
    plot(t, ones(t), 'r'), // Compare with step&lt;br /&gt;
|&lt;br /&gt;
We can also compare this response with the Proportional controller&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
    plot(t, [ones(t); y; yPI; yProp])&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
Now, let us try to design a PD controller that has better transient performance than the plain Proportional controller. &lt;br /&gt;
&lt;br /&gt;
Let us aim for the following parameters: &lt;br /&gt;
&lt;br /&gt;
Overshoot of 0.05 and Settling time of 0.5 seconds. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show first slide of PD controller: &lt;br /&gt;
    OS = 0.05&lt;br /&gt;
    Ts = 0.5&lt;br /&gt;
|&lt;br /&gt;
From theory we know, &amp;lt;read from slide&amp;gt; &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
    zeta = sqrt((log(OS))^2/((log(OS))^2 + %pi^2))&lt;br /&gt;
    wn = 4/(zeta*Ts)&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
Therefore, we design our PD controller: &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
    PD = s + 20&lt;br /&gt;
    evans(PD*System)&lt;br /&gt;
    sgrid(zeta, wn)  // Zoom first, then execute next line:&lt;br /&gt;
    Kpd = -1/real(horner(PD*System, [1 %i]*locate(1)))&lt;br /&gt;
|&lt;br /&gt;
You might need to go through a few trials to find the location of the pole required so that the modified root locus passes through the point of intersection of the curves corresponding to zeta and omega_n. We do not wish to waste our time here- let me tell you that -20 is an appropriate location. &lt;br /&gt;
&lt;br /&gt;
We check the performance of the controller: &lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
    PDSystem = Kpd*PD*System/. 1&lt;br /&gt;
    yPD = csim('step', t, PDSystem);&lt;br /&gt;
    plot(t, yPD)&lt;br /&gt;
    plot(t, ones(t), 'r'), // Compare with step&lt;br /&gt;
|&lt;br /&gt;
We note that the transient performance has improved significantly, but the steady state performance has degraded somewhat. &lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
Let us now try to design a PID controller by removing the steady state error from the PD controlled system, in a manner similar to how we designed a PI controller: &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
    PID = (s + 20)*(s+1)/s&lt;br /&gt;
    evans(PID*System)&lt;br /&gt;
    sgrid(zeta, wn) &lt;br /&gt;
&lt;br /&gt;
    Kpid = -1/real(horner(PID*System, [1 %i]*locate(1)))&lt;br /&gt;
    PIDSystem = Kpid*PID*System/. 1&lt;br /&gt;
|&lt;br /&gt;
We add a zero at origin to the PD controller. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We use the same values of zeta and omega_n from the PD system. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now we check the performance of the PID controller: &lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
    yPID = csim('step', t, PIDSystem);&lt;br /&gt;
    plot(t, yPID)&lt;br /&gt;
    plot(t, ones(t), 'r')&lt;br /&gt;
|&lt;br /&gt;
We note the significantly improved steady state as well as transient response. &lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
As a final step, let us compare the performance of all the controllers we have studied so far: &lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
    plot(t, [ones(t); y; yFeedback; yProp; yPI; yPD; yPID])&lt;br /&gt;
    legend([&amp;quot;Step&amp;quot;; &amp;quot;Open Loop TF&amp;quot;; &amp;quot;Closed Loop TF&amp;quot;; &amp;quot;Proportional     Controller&amp;quot;; &amp;quot;PI Controller&amp;quot;; &amp;quot;PD Controller&amp;quot;; &amp;quot;PID Controller&amp;quot;])&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
END&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Gyan</name></author>	</entry>

	</feed>