{"id":1479,"date":"2019-12-02T19:48:32","date_gmt":"2019-12-02T19:48:32","guid":{"rendered":"https:\/\/pressbooks.library.ryerson.ca\/controlsystems\/?post_type=chapter&#038;p=1479"},"modified":"2021-01-14T16:11:26","modified_gmt":"2021-01-14T16:11:26","slug":"13-5lag-controller-design-solved-example-1","status":"publish","type":"chapter","link":"https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/chapter\/13-5lag-controller-design-solved-example-1\/","title":{"raw":"13.5\tLag Controller Design \u2013 Solved Example 1","rendered":"13.5\tLag Controller Design \u2013 Solved Example 1"},"content":{"raw":"Consider a typical unit feedback closed loop control system, as shown, which is to operate under Lag Control.\r\n\r\n<img src=\"http:\/\/pressbooks.library.ryerson.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5.png\" alt=\"\" width=\"635\" height=\"247\" class=\"alignnone size-full wp-image-1480\" \/>\r\n\r\nThe Lag Controller transfer function is as follows:\r\n<p style=\"text-align: center\">[latex] G_c(s)=K_c\\cdot\\frac{\\tau\\alpha s +1}{\\tau s+1}=\\frac{a_1 s +a_0}{b_1 s+1} [\/latex]<\/p>\r\nWhere [latex] \\tau [\/latex] is the so-called Lag Time Constant and [latex] \\alpha = 1[\/latex]. The process transfer function G(s) is:\r\n<p style=\"text-align: center\">[latex] G(s)=\\frac{30(s+2)}{{(s+0.1)}^2 {(s+20)}^2} [\/latex]<\/p>\r\nOpen loop frequency response plots of G(s) are shown in Figure 13\u201120. The closed loop performance requirements are: the Steady State Error for the unit step input for the compensated closed loop system is one half of the Steady State Error for the uncompensated system; Percent Overshoot is approximately 10%.\r\n\r\nCheck what the current (uncompensated system) values of the Phase Margin, [latex] \\Phi_m [\/latex], and the Crossover Frequency, [latex] \\omega_{cp} [\/latex] are. Estimate the uncompensated closed loop step response specs: Percent Overshoot, PO, Steady State Error, [latex] e_{ss(step\\%)} [\/latex], and Settling Time, [latex] T_{settle(\\pm2\\%)} [\/latex]. Next, based on the specifications, calculate the required values of the Phase Margin for the compensated system, [latex] \\Phi_{mc} [\/latex], and the DC gain of the controller, [latex] K_{dc} [\/latex].\r\n\r\nDesign the Lag Controller such that it meets the closed loop response requirements, and write the Lag Controller transfer function and its parameters. For your Controller, estimate the compensated closed loop step response specs: Percent Overshoot, PO, Steady State Error, [latex] e_{ss(step\\%)} [\/latex], Rise Time, [latex] T_{rise(100\\%)} [\/latex], and Settling Time, [latex] T_{settle(\\pm2\\%)} [\/latex].\r\n\r\nLet\u2019s start by finding the open loop DC gain - note that reading the gains off the Bode plots is difficult due to decibel units \u2013 here the gain could be read off from Figure 13\u201120 as anywhere between 20 and 25 dB. It is recommended to always use the transfer function (if available) to compute the accurate gain values. Here we can compute the Uncompensated Open Loop DC gain \u2013 there is no controller, i.e. [latex] G_c(s) = 1 [\/latex].\r\n\r\nFrom the process transfer function:\r\n<p style=\"text-align: center\">[latex] K_{dco}=\\lim_{s\\rightarrow0}\\frac{30(s+2)}{{(s+0.1)}^2{(s+20)}^2}=\\frac{60}{4}=15 [\/latex]<\/p>\r\n\r\n\r\n[caption id=\"attachment_1485\" align=\"aligncenter\" width=\"1200\"]<img src=\"http:\/\/pressbooks.library.ryerson.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_20.png\" alt=\"Figure 13\u201120: Uncompensated Open Loop Frequency Response in Lag Design Example\" width=\"1200\" height=\"900\" class=\"wp-image-1485 size-full\" \/> Figure 13\u201120: Uncompensated Open Loop Frequency Response in Lag Design Example[\/caption]\r\n\r\nThe uncompensated closed loop DC gain is then:\r\n<p style=\"text-align: center\">[latex] K_{dc} = \\frac{K_{dco}}{1+K_{dco}}=\\frac{15}{16}=0.9375 [\/latex]<\/p>\r\nThe Phase Margin and the crossover frequency can be read off from the Bode plot in Figure 13\u201120 as: [latex] \\Phi_m = 38^{\\circ} [\/latex] and [latex] \\omega_{cp} = 0.378 [\/latex] rad\/sec. The damping ratio [latex] \\zeta [\/latex] and the frequency of natural oscillations [latex] \\omega_n [\/latex] for the uncompensated closed loop system can now be estimated by either reading it off the Phase Margin graph in Figure 12\u20119 or by using the formula: [latex] \\zeta = 0.3487 [\/latex]. Next, calculate the natural frequency:\r\n<p style=\"text-align: center\">[latex] \\omega_n = \\frac{\\tan{\\Phi_m}\\cdot\\omega_{cp}}{2\\zeta}=0.426 [\/latex]<\/p>\r\nThe uncompensated closed loop model:\r\n<p style=\"text-align: center\">[latex] G_m(s)=K_{dc}\\frac{\\omega_n^2}{s^2+2\\zeta\\omega_n s + \\omega_n^2} \\rightarrow G_{mu}(s)=\\frac{0.1701}{s^2+0.2971 s + 0.1814} [\/latex]<\/p>\r\nModel specs can be calculated as:\r\n<p style=\"text-align: center\">[latex] PO = 100\\cdot \\left ( e^{\\frac{-\\zeta\\pi}{\\sqrt{1-{\\zeta}^2}}} \\right ) = 31\\% [\/latex]<\/p>\r\n<p style=\"text-align: center\">[latex] T_{settle(\\pm2\\%)}=\\frac{4}{\\zeta\\omega_n}=26.9 [\/latex]<\/p>\r\n<p style=\"text-align: center\">[latex] T_{rise(100\\%)}=\\frac{\\pi-\\cos\\zeta^{-1}}{\\omega_n\\sqrt{1-\\zeta^2}}=4.82 [\/latex]<\/p>\r\n<p style=\"text-align: center\">[latex] e_{ss(step\\%)}=\\frac{1}{1+K_{pos}}\\cdot100\\%=\\frac{1}{1+15}=6.25\\% [\/latex]<\/p>\r\nThe actual closed loop uncompensated transfer function is:\r\n<p style=\"text-align: center\">[latex] G_{cl}(s)=\\frac{30s + 60}{s^4 + 40.2s^3 + 408s^2 + 110.4s +64} [\/latex]<\/p>\r\n<p style=\"text-align: center\">[latex] G_{cl}(s)=\\frac{30(s+2)}{(s+21.14)(s+18.8)(s^2 + 0.262s + 0.161)} [\/latex]<\/p>\r\nAs we can see, the closed loop transfer function has a dominant pair of complex poles, with the damping ratio [latex] \\zeta = 0.326 [\/latex] and the natural frequency of oscillations\u00a0 [latex] \\omega_n = 0.4 [\/latex] rad\/sec, which are very close to the model estimates of [latex] \\zeta = 0.349 [\/latex] and [latex] \\omega_n = 0.426 [\/latex] rad\/sec. The actual transfer function also has a zero at -2, and two poles at \u2013 21.14 and -18.8, all of which are negligible, compared to the dominant pair of closed loop poles located at [latex] -0.13\\pm j0.38 [\/latex]. Thus, the assumed model is quite accurate \u2013 see the actual step response comparison, shown in Figure 13\u201121.\r\n\r\nBelow, we compare the expected specs, based on the model, with the actual system response specs, obtained by running the \u201cstepeval\u201d function. The actual specs, compared to the model specs, are:\r\n<table style=\"border-collapse: collapse;width: 100%\" border=\"0\">\r\n<tbody>\r\n<tr>\r\n<td style=\"width: 33.3333%\"><\/td>\r\n<td style=\"width: 33.3333%\">Actual Compensated System<\/td>\r\n<td style=\"width: 33.3333%\">[latex] G_{mc}(s) [\/latex] \u2013 Model for the Compensated System<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 33.3333%\">PO<\/td>\r\n<td style=\"width: 33.3333%\">54.8%<\/td>\r\n<td style=\"width: 33.3333%\">31%<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 33.3333%\">[latex] e_{ss(step\\%)} [\/latex]<\/td>\r\n<td style=\"width: 33.3333%\">6.25%<\/td>\r\n<td style=\"width: 33.3333%\">6.25%<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 33.3333%\">[latex] T_{rise(0-100\\%)} [\/latex]<\/td>\r\n<td style=\"width: 33.3333%\">4.68 sec<\/td>\r\n<td style=\"width: 33.3333%\">4.82 sec<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\nThe specs estimates from the model are very accurate, with all specs meeting the required values.\r\n\r\n[caption id=\"attachment_1490\" align=\"aligncenter\" width=\"1200\"]<img src=\"http:\/\/pressbooks.library.ryerson.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_21.png\" alt=\"Figure 13\u201121: Uncompensated Closed Loop Step Response in Lag Design Example\" width=\"1200\" height=\"900\" class=\"wp-image-1490 size-full\" \/> Figure 13\u201121: Uncompensated Closed Loop Step Response in Lag Design Example[\/caption]\r\n\r\nNow, the Lag Controller design \u2013 we can choose a simplified design or an analytical design. First, always calculate the required DC gain of the controller \u2013 this part is the same in both approaches. Based on the required error specification:\r\n<p style=\"text-align: center\">[latex] e_{ss(step)c}=0.5\\cdot e_{ss(step)u} \\rightarrow \\frac{1}{K_{posu}}=\\frac{0.5}{1+K_{posu}} [\/latex]<\/p>\r\n<p style=\"text-align: center\">[latex] \\frac{1}{K_{posu}}=\\frac{0.5}{1+K_{posu}} \\rightarrow k_{posu}=31 [\/latex]<\/p>\r\nThe compensated closed loop DC gain should be:\r\n<p style=\"text-align: center\">[latex]K_{dc(comp)}=\\frac{K_{posc}}{1+K_{posc}}=\\frac{31}{32}=0.9688[\/latex]<\/p>\r\nThe controller DC gain is then:\r\n<p style=\"text-align: center\">[latex] K_c = a_0 = \\frac{K_{posc}}{K_{posu}}=\\frac{31}{15}=2.067 [\/latex]<\/p>\r\nNext, \u201ctranslate\u201d the required PO spec into the equivalent closed loop damping ratio. Based on Figure 7\u20114, for PO = 10%, the required damping ratio is approximately [latex] \\zeta =0.59 [\/latex]. The compensated Phase Margin, based on Figure 12\u20119 should be close to [latex] \\Phi_{m(comp)} = 60^{\\circ} [\/latex].\r\n\r\nWhat do we do next? The two approaches differentiate on how we proceed.\r\n<div>\r\n<h3><strong>13.5.1.1 Lag Controller Design Solved Example 1: The \u201cSimplified\u201d Lag Design<\/strong><\/h3>\r\nRecall that at the frequency of [latex] \\frac{10}{\\alpha\\tau} [\/latex] in the Lag Controller (see the graph below), we are still losing about \u00a0of [latex] 5^{\\circ} [\/latex] phase, so look at the uncompensated open loop Bode plot and choose the frequency where the phase angle is ([latex] \\Phi_m + 5^{\\circ} [\/latex]) away from the [latex] -180^{\\circ} [\/latex] line. Here, if we want the compensated Phase Margin to be [latex] \\Phi_m = 60^{\\circ} [\/latex], we should look for the frequency where the phase angle reaches [latex] -115^{\\circ} [\/latex]:\r\n<p style=\"text-align: center\">[latex] \\angle G(j\\omega) = -180^{\\circ}+\\Phi_m + 5^{\\circ} = -180^{\\circ}+60^{\\circ} + 5^{\\circ} [\/latex]<\/p>\r\nThat frequency is read off the plot as approximately 0.17 rad\/sec: [latex] \\omega_{co(comp)} = 0.17 [\/latex] rad\/sec. <strong>Note that in the Lag Design,<\/strong> <strong>the compensated crossover frequency will always be to the left of the uncompensated frequency of the crossover<\/strong>. If it were to the right of the uncompensated frequency of the crossover, we would end up with a Lead Design. Here the uncompensated frequency is 0.38 rad\/s. Next, find the gain of the uncompensated system at that point \u2013 recall that reading it off the graph is inaccurate so it is best to substitute [latex] s = j0.17 [\/latex] into G(s):\r\n<p style=\"text-align: center\">[latex] \\left | G(j0.17) \\right | = 3.87\\frac{V}{V}=11.75dB [\/latex]<\/p>\r\n<img src=\"http:\/\/pressbooks.library.ryerson.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_a.png\" alt=\"\" width=\"672\" height=\"504\" class=\"alignnone size-full wp-image-1495\" \/>\r\n\r\nRemember that since we are using the DC gain of 2.0667, the total gain at the chosen crossover frequency is going to be 3.87 times 2.0667. This is the amount of the gain reduction that has to be delivered by the high frequency gain drop-off of the Lag Controller:\r\n<p style=\"text-align: center\">[latex] \\alpha = \\frac{1}{2.0667\\cdot3.87}=0.125 [\/latex]<\/p>\r\n<p style=\"text-align: left\">[latex] \\omega_{cp(comp)} [\/latex] rad\/sec becomes the right-side corner of the phase characteristic:<\/p>\r\n<p style=\"text-align: center\">[latex]\\omega_{cp(comp)}=0.17=\\frac{10}{\\alpha\\tau}\u00a0 [\/latex]<\/p>\r\n<p style=\"text-align: center\">[latex] \\tau = \\frac{10}{\\alpha\\cdot\\omega_{cp}}=\\frac{10}{0.125\\cdot0.17}=4704 [\/latex]<\/p>\r\nThe controller transfer function is:\r\n<p style=\"text-align: center\">[latex] G_c(s)=K_c\\cdot\\frac{\\tau\\alpha s + 1}{\\tau s + 1}=2.0647\\cdot\\frac{470.4\\cdot0.125s+1}{470.4s+1}=2.0647\\cdot\\frac{58.82s+1}{470.4s+1} [\/latex]<\/p>\r\n<p style=\"text-align: center\">[latex]G_c(s)=\\frac{a_1 s + a_0}{b_1 s +1 }= \\frac{121.6s+2.067}{470.4s+1}\u00a0 [\/latex]<\/p>\r\nThe open loop Bode plots before and after compensation and the system Phase Margin are shown in Figure 13\u201122 and the compensated Phase Margin is shown in Figure 13\u201123 \u2013 it is [latex] \\Phi_m=60^{\\circ} [\/latex] at the frequency of [latex] \\omega_{cp(comp)}=0.17 [\/latex] rad\/sec, as was chosen for this design.\r\n\r\n[caption id=\"attachment_1496\" align=\"aligncenter\" width=\"1200\"]<img src=\"http:\/\/pressbooks.library.ryerson.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_22.png\" alt=\"Figure 13\u201122: Open Loop Frequency Responses in Lag Design Example \u2013 Simplified Design\" width=\"1200\" height=\"900\" class=\"wp-image-1496 size-full\" \/> Figure 13\u201122: Open Loop Frequency Responses in Lag Design Example \u2013 Simplified Design[\/caption]\r\n\r\n[caption id=\"attachment_1497\" align=\"aligncenter\" width=\"1200\"]<img src=\"http:\/\/pressbooks.library.ryerson.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_23.png\" alt=\"Figure 13\u201123: Compensated Phase Margin in Lag Design Example \u2013 Simplified Design\" width=\"1200\" height=\"900\" class=\"wp-image-1497 size-full\" \/> Figure 13\u201123: Compensated Phase Margin in Lag Design Example \u2013 Simplified Design[\/caption]\r\n\r\nThe expected compensated closed loop response specs can be estimated using the dominant poles model again. Use the formula below, or read off the Phase Margin graph in Figure 12\u20119:\r\n<p style=\"text-align: center\">[latex] \\zeta=\\frac{\\tan{\\Phi_m}}{2\\sqrt{{(\\tan\\Phi_m)}^2 + 1}} \\rightarrow \\zeta = 0.607 [\/latex]<\/p>\r\n<p style=\"text-align: center\">[latex] \\omega_n = \\frac{\\tan{\\Phi_m}\\cdot\\omega_{cp}}{2\\zeta} = 0.24 [\/latex]<\/p>\r\nThe compensated closed loop model:\r\n<p style=\"text-align: center\">[latex] G_{mc}(s)=\\frac{0.054}{s^2 + 0.291s + 0.054} [\/latex]<\/p>\r\nModel specs can be calculated as:\r\n<p style=\"text-align: center\">[latex] PO=100\\cdot\\left ( e^{\\frac{-\\zeta\\pi}{\\sqrt{1-\\zeta^2}}} \\right )=9\\% [\/latex]<\/p>\r\n<p style=\"text-align: center\">[latex] T_{settle(\\pm2\\%)}=\\frac{4}{\\zeta\\omega_n}=27.4 [\/latex]<\/p>\r\n<p style=\"text-align: center\">[latex] T_{rise(100\\%)}=\\frac{pi-\\cos\\zeta^{-1}}{\\omega_n\\sqrt{1-\\zeta^{2}}}=11.5 [\/latex]<\/p>\r\n<p style=\"text-align: center\">[latex] e_{ss(step\\%)}=\\frac{1}{1+K_{pos}}\\cdot100\\%=\\frac{1}{1+31}\\cdot100\\%=3.125\\% [\/latex]<\/p>\r\nThe actual closed loop transfer function is:\r\n<p style=\"text-align: center\">[latex] G_{cl}(s)=\\frac{7.753(s+2)(s+0.017)}{(s+20.59)(s+19.4)(s+0.01463)(s^2 + 0.203s + 0.047)} [\/latex]<\/p>\r\nAs we can see, the actual closed loop transfer function has a dominant pair of complex poles, with the damping ratio [latex] \\zeta=0.47 [\/latex] and the natural frequency of oscillations [latex] \\omega_n = 0.22 [\/latex] rad\/sec, as well as a zero at -2, another zero at -0.017, and three real poles at \u2013 20.59, -19.4 and at -0.01463.\r\n\r\nThe dominant poles model is not as accurate as before, because now an additional pole-zero combo shows up, and both are very close to the Imaginary axis. They do not cancel out, and their net effect on the closed loop response is that the very large time constant associated with the Lag Controller causes a very slow, very visible exponential component in the step response - see the actual step response comparison in Figure 13\u201124 and the comparison of the specs below. That additional real pole has a very long decay time associated with it, which significantly affects the Settling Time.\r\n\r\nBelow, we compare the expected specs, based on the model, with the actual system response specs, obtained by running the \u201cstepeval\u201d function. The actual specs, compared to the model specs, are:\r\n<table style=\"border-collapse: collapse;width: 100%;height: 70px\" border=\"0\">\r\n<tbody>\r\n<tr style=\"height: 14px\">\r\n<td style=\"width: 33.3333%;height: 14px\"><\/td>\r\n<td style=\"width: 33.3333%;height: 14px\">Actual Compensated System<\/td>\r\n<td style=\"width: 33.3333%;height: 14px\">[latex] G_{mc}(s) [\/latex] \u2013 Model for the Compensated System<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px\">\r\n<td style=\"width: 33.3333%;height: 14px\">PO<\/td>\r\n<td style=\"width: 33.3333%;height: 14px\">4.6%<\/td>\r\n<td style=\"width: 33.3333%;height: 14px\">9%<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px\">\r\n<td style=\"width: 33.3333%;height: 14px\">[latex] e_{ss(step\\%)} [\/latex]<\/td>\r\n<td style=\"width: 33.3333%;height: 14px\">3.125%<\/td>\r\n<td style=\"width: 33.3333%;height: 14px\">3.125%<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px\">\r\n<td style=\"width: 33.3333%;height: 14px\">[latex] T_{rise(0-100\\%)} [\/latex]<\/td>\r\n<td style=\"width: 33.3333%;height: 14px\">14.1 sec<\/td>\r\n<td style=\"width: 33.3333%;height: 14px\">11.5 sec<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px\">\r\n<td style=\"width: 33.3333%;height: 14px\">[latex] T_{settle(\\pm2\\%)} [\/latex]<\/td>\r\n<td style=\"width: 33.3333%;height: 14px\">130.4 sec<\/td>\r\n<td style=\"width: 33.3333%;height: 14px\">24.8 sec<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\nClearly, the biggest problem with the simplified approach is that it typically generates a long-time constant that causes the closed loop system to have the real pole close to the Imaginary axis that cannot be ignored \u2013 the closed loop model is not really based on a dominant pair of complex poles alone. Unfortunately, the simplified design does not allow us to avoid this. Let\u2019s consider the analytical design next.\r\n<div class=\"textbox\">\r\n\r\nPlus of the simplified design \u2013 it will never lead to negative values of the controller parameters.\r\n\r\nMinus of the simplified design \u2013 it almost always results in an additional significant closed loop pole that has a strong negative effect on the Settling Time. This can be somehow ameliorated by trial &amp; error adjustments, but it would be tedious.\r\n\r\n<\/div>\r\n\r\n[caption id=\"attachment_1499\" align=\"aligncenter\" width=\"1200\"]<img src=\"http:\/\/pressbooks.library.ryerson.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_24.png\" alt=\"Figure 13\u201124: Compensated Closed Loop Step Response in Lag Design Example \u2013 Simplified Design\" width=\"1200\" height=\"900\" class=\"wp-image-1499 size-full\" \/> Figure 13\u201124: Compensated Closed Loop Step Response in Lag Design Example \u2013 Simplified Design[\/caption]\r\n<h3><strong><span style=\"font-size: 1.266em\">13.5.1.2 Lag Controller Design Solved Example 1: The \u201cAnalytical\u201d Lag Design<\/span><\/strong><\/h3>\r\n<\/div>\r\n<div>\r\n\r\nThe analytical design gives us more flexibility to shape the open loop response by choosing different locations for the crossover frequency. Remember to choose the required DC gain based on the error specs \u2013 the calculations are identical to the simplified method, so the Controller DC gain ([latex] a_0 [\/latex]) will be the same:\r\n<p style=\"text-align: center\">[latex] e_{ss(step)c}=0.5\\cdot e_{ss(step)u} \\rightarrow\\frac{1}{1+K_posc}=\\frac{0.5}{1+K_{posu}} [\/latex]<\/p>\r\n<p style=\"text-align: center\">[latex] \\frac{1}{1+K_{posc}}=\\frac{0.5}{1+15}\\rightarrow K_{posc}=31 [\/latex]<\/p>\r\nThe compensated closed loop DC gain should be:\r\n<p style=\"text-align: center\">[latex] K_{dc(comp)}=\\frac{K_{posc}}{1+K_{posc}}=\\frac{31}{32}=0.9688 [\/latex]<\/p>\r\nThe controller DC gain is again:\r\n<p style=\"text-align: center\">[latex] a_0=\\frac{K_{posc}}{K_{posu}}=\\frac{31}{15}=2.067 [\/latex]<\/p>\r\nNext, we pick the Phase Margin \u2013 in this example, we decided to have the Phase Margin of [latex] 60^{\\circ} [\/latex], so let\u2019s stick with this value. Next, we need to choose the crossover frequency \u2013 as long as it is less than 0.38 (the uncompensated value). First, let\u2019s choose the same value as in the simplified design:\r\n\r\n<\/div>\r\n<p style=\"text-align: center\">[latex] \\omega_{cp(comp)}=0.17 rad\/sec [\/latex]<\/p>\r\nTo use the derived formulae for the controller constants [latex] a_1 [\/latex] and [latex] b_1 [\/latex], we need to calculate the uncompensated open loop Bode plot the phase and the gain at that frequency - as before, substitute [latex] s=j0.17 [\/latex] into the transfer function G(s):\r\n<p style=\"text-align: center\">[latex] \\angle G(j0.17)=-115^{\\circ} [\/latex]<\/p>\r\n<p style=\"text-align: center\">[latex] \\left | G(j0.17) \\right | = 3.87\\frac{V}{V}=11.75dB [\/latex]<\/p>\r\n<p style=\"text-align: left\">Next, substitute these values into the formulae:<\/p>\r\n<p style=\"text-align: center\">[latex] \\theta=-180^{\\circ}+\\Phi_m-\\angle G(j0.17)= -180^{\\circ}+60^{\\circ}+115^{\\circ} = -5^{\\circ} [\/latex]<\/p>\r\nNote since this is a LAG design, the \u201clift\u201d angle is not really \u201clifting\u201d anything; it is just an intermediate step in the calculation and could be even called a \u201cdrag\u201d or \u201clag\u201d angle. Also note this calculation confirms our assumption in the \u201csimplified\u201d design that at the chosen crossover frequency, we are losing approximately 5 degrees of phase to the lag controller.\r\n<p style=\"text-align: center\">[latex] a_1 = \\frac{1-a_0\\cdot\\left | G(j\\omega_{cp})\\right | \\cdot \\cos \\theta}{\\omega_{cp}\\cdot\\left | G(j\\omega)\\right |\\cdot\\sin\\theta}=126.2 [\/latex]<\/p>\r\n<p style=\"text-align: center\">[latex] b_1 = \\frac{\\cos\\theta-a_0\\cdot\\left | G(j\\omega_{cp})\\right | }{\\omega_{cp}\\cdot\\sin\\theta}=490.6 [\/latex]<\/p>\r\nThese values are very close to the ones obtained using the simplified approach, as expected. The closed loop response will also be similar, with the large value of the closed loop time constant dominating the response and adversely affecting the Settling Time. The resulting design offers some improvement over the uncompensated response, but the Settling Time spec takes a huge beating \u2013 this is not a good design and we should be able to do better.\r\n\r\nWith the analytical design we are not stuck with the one choice of the crossover frequency, as is the case with the simplified design. We can easily choose a different frequency of the crossover (as long as it is less than the uncompensated crossover frequency) and see if the resulting closed loop step response simulations will improve. Let\u2019s consider what would happen if we chose a different value for the crossover frequency. Let\u2019s say, make [latex] \\omega_{cp(comp)}=0.2 [\/latex] rad\/sec. Again, we need to find the gain of the uncompensated system at that point \u2013 recall that reading it off the graph is inaccurate so it is best to substitute [latex] s=j0.2 [\/latex] into G(s):\r\n<p style=\"text-align: center\">[latex] \\angle G(j0.2) = -122^{\\circ} [\/latex]<\/p>\r\n<p style=\"text-align: center\">[latex] \\left | G(j0.2) \\right | = 3.01\\frac{V}{V}=9.6dB [\/latex]<\/p>\r\nNext, substitute these values into the formulae:\r\n<p style=\"text-align: center\">[latex] \\theta = -180^{\\circ} + \\Phi_m - \\angle G(j0.2)= -180^{\\circ}+60^{\\circ}+122^{\\circ}=2^{\\circ} [\/latex]<\/p>\r\n<p style=\"text-align: center\">[latex] a_1 = \\frac{1-a_0\\cdot\\left | G(j\\omega_{cp})\\right | \\cdot \\cos \\theta}{\\omega_{cp}\\cdot\\left | G(j\\omega)\\right |\\cdot\\sin\\theta}=-215.5 [\/latex]<\/p>\r\n<p style=\"text-align: center\">[latex] b_1 = \\frac{\\cos\\theta-a_0\\cdot\\left | G(j\\omega_{cp})\\right | }{\\omega_{cp}\\cdot\\sin\\theta}=-650.3 [\/latex]<\/p>\r\n<p style=\"text-align: center\">[latex] G_c(s)=\\frac{a_1 s + a_0}{b_1 s +1}=\\frac{-215.5s + 2.067}{-650.3s +1} [\/latex]<\/p>\r\nSo here we have an unpleasant surprise! The controller coefficients are not acceptable, as they are negative! The controller pole in RHP is unacceptable because it means an unstable open loop transfer function \u2013 even if the resulting closed loop is stable, for safety reasons we do not want to implement that \u2013 in case if the closed loop incidentally opens (a malfunction), we would have an unstable system on our hands. The RHP location of the controller zero is also unacceptable. Even if the controller pole is in a stable location, the RHP zero will introduce an effective delay into the system, extending both the Rise Time and the Settling Time. Recall that we will never get that kind of surprise in the \u201csimplified\u201d lag design.\r\n\r\nLet\u2019s keep adjusting the value of the crossover frequency \u2013 we already have one \u201cpassable\u201d value, at 0.17 rad\/sec, but we want to improve on that design. By \u201ctrial &amp; error\u201d we find that values of crossover frequency that are between 0.19 and 0.38 all result in negative coefficients and are therefore unacceptable. Let\u2019s try frequencies smaller than 0.17 \u2013 some of those choices will lead to acceptable controller values. Let\u2019s see if we can get a set of controller values that would give us a better actual step response than the one seen above for [latex] \\omega_{cp(comp)} = 0.17 rad\/sec [\/latex] \u2013 remember that one was quite different from expected because it had a large time constant associated with the Lag controller.\r\n\r\nAfter some trial &amp; error with the analytical formulae, we come across quite an agreeable response \u2013 note that the formulae can be easily programmed into Matlab so that the iterations are quite easy to perform. Let\u2019s see the results for [latex] \\omega_{cp(comp)} = 0.1 rad\/sec [\/latex] \u2013 good results can be had for some other, smaller values as well. Again, we need to find the gain and phase of the uncompensated system at that frequency \u2013 recall that reading it off the graph is inaccurate so it is best to substitute [latex] s=j0.1 [\/latex] into G(s):\r\n<p style=\"text-align: center\">[latex] \\angle G(j0.1)=-88^{\\circ} [\/latex]<\/p>\r\n<p style=\"text-align: center\">[latex] \\left | G(j0.1) \\right | = 7.5\\frac{V}{V}=17.5dB [\/latex]<\/p>\r\nNext, substitute these values into the formulae and first calculate our \u201clag\u201d angle:\r\n<p style=\"text-align: center\">[latex] \\theta = -180^{\\circ}+\\Phi_m-\\angle G(j0.1)=-180^{\\circ}+60^{\\circ}+88^{\\circ}=-32^{\\circ} [\/latex]<\/p>\r\nNote that at this point the \u201clift\u201d angle has become a \u201clag\u201d angle (negative value).\r\n<p style=\"text-align: center\">[latex] a_1 = \\frac{1-a_0\\cdot\\left | G(j\\omega_{cp})\\right | \\cdot \\cos \\theta}{\\omega_{cp}\\cdot\\left | G(j\\omega)\\right |\\cdot\\sin\\theta}=30.2 [\/latex]<\/p>\r\n<p style=\"text-align: center\">[latex] b_1 = \\frac{\\cos\\theta-a_0\\cdot\\left | G(j\\omega_{cp})\\right | }{\\omega_{cp}\\cdot\\sin\\theta}=274.7 [\/latex]<\/p>\r\nBoth controller parameters are positive, so this controller will be acceptable. The open loop Bode plots before and after compensation are shown in Figure 13\u201125 and the system Phase Margin is shown in Figure 13\u201126.\r\n\r\n[caption id=\"attachment_1506\" align=\"aligncenter\" width=\"1200\"]<img src=\"http:\/\/pressbooks.library.ryerson.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_25.png\" alt=\"Figure 13\u201125: Open Loop Frequency Responses in Lag Design Example \u2013 Analytical Design\" width=\"1200\" height=\"900\" class=\"wp-image-1506 size-full\" \/> Figure 13\u201125: Open Loop Frequency Responses in Lag Design Example \u2013 Analytical Design[\/caption]\r\n\r\nThe controller transfer function is:\r\n<p style=\"text-align: center\">[latex] G_c(s)=\\frac{a_1 s + a_0}{b_1 s + 1}=\\frac{30.2s+2.067}{274.7s+1} [\/latex]<\/p>\r\nNote that with a much smaller value of [latex] b_1 [\/latex], this design may be actually better than the one with a higher crossover frequency, as the closed loop compensated response will be closer to the expected model \u2013 no slow exponential visible. Let\u2019s check this theory out. The expected compensated closed loop response can be estimated using the dominant poles model again. Use the formula below, or read off the Phase Margin graph in Figure 12\u20119:\r\n<p style=\"text-align: center\">[latex] \\zeta = \\frac{\\tan\\Phi_m}{2\\sqrt{\\sqrt{{(\\tan\\Phi_m)}^2 + 1}}} \\rightarrow \\zeta = 0.612 [\/latex]<\/p>\r\n<p style=\"text-align: center\">[latex] \\omega_n = \\frac{\\tan\\Phi_m\\cdot\\omega_{cp}}{2\\zeta}=0.1414 [\/latex]<\/p>\r\n\r\n\r\n[caption id=\"attachment_1507\" align=\"aligncenter\" width=\"1200\"]<img src=\"http:\/\/pressbooks.library.ryerson.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_26.png\" alt=\"Figure 13\u201126: Compensated Phase Margin in Lag Design Example \u2013 Analytical Design\" width=\"1200\" height=\"900\" class=\"wp-image-1507 size-full\" \/> Figure 13\u201126: Compensated Phase Margin in Lag Design Example \u2013 Analytical Design[\/caption]\r\n\r\nThe compensated closed loop model:\r\n<p style=\"text-align: center\">[latex]G_{mc}(s)=\\frac{0.0194}{s^2+0.173s+0.02}\u00a0 [\/latex]<\/p>\r\nModel specs can be calculated as:\r\n<p style=\"text-align: center\">[latex] PO = 100\\cdot \\left ( e^{\\frac{-\\zeta\\pi}{\\sqrt{1-{\\zeta}^2}}} \\right ) = 9\\% [\/latex]<\/p>\r\n<p style=\"text-align: center\">[latex] T_{settle(\\pm2\\%)}=\\frac{4}{\\zeta\\omega_n}=46.2 [\/latex]<\/p>\r\n<p style=\"text-align: center\">[latex] T_{rise(100\\%)}=\\frac{\\pi-\\cos\\zeta^{-1}}{\\omega_n\\sqrt{1-\\zeta^2}}=20 [\/latex]<\/p>\r\n<p style=\"text-align: center\">[latex] e_{ss(step\\%)}=\\frac{1}{1+K_{pos}}\\cdot100\\%=\\frac{1}{1+31}=3.125\\% [\/latex]<\/p>\r\nThe actual closed loop transfer function:\r\n<p style=\"text-align: center\">[latex] G_{cl}(s)=\\frac{3.3(s+2)(s+0.068)}{(s+20.38)(s+19.6)(s+0.063)(s^2 + 0.1469s +0.0184)} [\/latex]<\/p>\r\nNote that the closed loop model based on the dominant poles is now more accurate than in the case of the \u201csimplified\u201d design \u2013 while the additional pole-zero combo still shows up, both very close to the Imaginary axis, their net effect on the closed loop response is almost negligible because of a much better \u201cnear-cancellation\u201d: we have a zero at -0.068, and a pole at -0.063. Before they were at -0.017 and -0.0146, respectively. The very large time constant associated with the Lag Controller is no longer visible in the step response, and the Settling Time is much as expected - see the actual step response comparison and the comparison of the specs below.\r\n\r\nBelow, we compare the expected specs, based on the model, with the actual system response specs, obtained by running the \u201cstepeval\u201d function. The actual specs, compared to the model specs, are:\r\n<table style=\"border-collapse: collapse;width: 100%;height: 70px\" border=\"0\">\r\n<tbody>\r\n<tr style=\"height: 14px\">\r\n<td style=\"width: 33.3333%;height: 14px\"><\/td>\r\n<td style=\"width: 33.3333%;height: 14px\">Actual Compensated System<\/td>\r\n<td style=\"width: 33.3333%;height: 14px\">[latex] G_{mc}(s) [\/latex] \u2013 Model for the Compensated System<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px\">\r\n<td style=\"width: 33.3333%;height: 14px\">PO<\/td>\r\n<td style=\"width: 33.3333%;height: 14px\">10.6%<\/td>\r\n<td style=\"width: 33.3333%;height: 14px\">8.8%<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px\">\r\n<td style=\"width: 33.3333%;height: 14px\">[latex] e_{ss(step\\%)} [\/latex]<\/td>\r\n<td style=\"width: 33.3333%;height: 14px\">3.125%<\/td>\r\n<td style=\"width: 33.3333%;height: 14px\">3.125%<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px\">\r\n<td style=\"width: 33.3333%;height: 14px\">[latex] T_{rise(0-100\\%)} [\/latex]<\/td>\r\n<td style=\"width: 33.3333%;height: 14px\">19.7 sec<\/td>\r\n<td style=\"width: 33.3333%;height: 14px\">20.1 sec<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px\">\r\n<td style=\"width: 33.3333%;height: 14px\">[latex] T_{settle(\\pm2\\%)} [\/latex]<\/td>\r\n<td style=\"width: 33.3333%;height: 14px\">41.1 sec<\/td>\r\n<td style=\"width: 33.3333%;height: 14px\">42.1 sec<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\nThe estimates are very accurate. Finally, let\u2019s see how much of an improvement we achieved by introducing the Lag Controller \u2013 see the comparison of the responses in Figure 13\u201128.\r\n<div class=\"textbox\">\r\n\r\nPlus of the Analytical Lag Design \u2013 it can be quickly iterated to find a much better system performance, often without the long and visible slow time constant associated with the Simplified Lag Design.\r\n\r\nMinus of the Analytical Lag Design \u2013 sometimes the design formulae will yield negative, i.e. unacceptable, values of controller parameters. This can be addressed by a slightly different choice of the crossover frequency and the phase margin.\r\n\r\n<\/div>\r\n\r\n[caption id=\"attachment_1508\" align=\"aligncenter\" width=\"1200\"]<img src=\"http:\/\/pressbooks.library.ryerson.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_27.png\" alt=\"Figure 13\u201127: Compensated Closed Loop Step Response in Lag Design Example \u2013 Analytical Design\" width=\"1200\" height=\"900\" class=\"wp-image-1508 size-full\" \/> Figure 13\u201127: Compensated Closed Loop Step Response in Lag Design Example \u2013 Analytical Design[\/caption]\r\n\r\n[caption id=\"attachment_1509\" align=\"aligncenter\" width=\"1200\"]<img src=\"http:\/\/pressbooks.library.ryerson.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_28.png\" alt=\"Figure 13\u201128: Comparison of Closed Loop Step Responses in Lag Design Example\" width=\"1200\" height=\"900\" class=\"wp-image-1509 size-full\" \/> Figure 13\u201128: Comparison of Closed Loop Step Responses in Lag Design Example[\/caption]","rendered":"<p>Consider a typical unit feedback closed loop control system, as shown, which is to operate under Lag Control.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/pressbooks.library.ryerson.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5.png\" alt=\"\" width=\"635\" height=\"247\" class=\"alignnone size-full wp-image-1480\" srcset=\"https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5.png 635w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5-300x117.png 300w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5-65x25.png 65w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5-225x88.png 225w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5-350x136.png 350w\" sizes=\"auto, (max-width: 635px) 100vw, 635px\" \/><\/p>\n<p>The Lag Controller transfer function is as follows:<\/p>\n<p style=\"text-align: center\">[latex]G_c(s)=K_c\\cdot\\frac{\\tau\\alpha s +1}{\\tau s+1}=\\frac{a_1 s +a_0}{b_1 s+1}[\/latex]<\/p>\n<p>Where [latex]\\tau[\/latex] is the so-called Lag Time Constant and [latex]\\alpha = 1[\/latex]. The process transfer function G(s) is:<\/p>\n<p style=\"text-align: center\">[latex]G(s)=\\frac{30(s+2)}{{(s+0.1)}^2 {(s+20)}^2}[\/latex]<\/p>\n<p>Open loop frequency response plots of G(s) are shown in Figure 13\u201120. The closed loop performance requirements are: the Steady State Error for the unit step input for the compensated closed loop system is one half of the Steady State Error for the uncompensated system; Percent Overshoot is approximately 10%.<\/p>\n<p>Check what the current (uncompensated system) values of the Phase Margin, [latex]\\Phi_m[\/latex], and the Crossover Frequency, [latex]\\omega_{cp}[\/latex] are. Estimate the uncompensated closed loop step response specs: Percent Overshoot, PO, Steady State Error, [latex]e_{ss(step\\%)}[\/latex], and Settling Time, [latex]T_{settle(\\pm2\\%)}[\/latex]. Next, based on the specifications, calculate the required values of the Phase Margin for the compensated system, [latex]\\Phi_{mc}[\/latex], and the DC gain of the controller, [latex]K_{dc}[\/latex].<\/p>\n<p>Design the Lag Controller such that it meets the closed loop response requirements, and write the Lag Controller transfer function and its parameters. For your Controller, estimate the compensated closed loop step response specs: Percent Overshoot, PO, Steady State Error, [latex]e_{ss(step\\%)}[\/latex], Rise Time, [latex]T_{rise(100\\%)}[\/latex], and Settling Time, [latex]T_{settle(\\pm2\\%)}[\/latex].<\/p>\n<p>Let\u2019s start by finding the open loop DC gain &#8211; note that reading the gains off the Bode plots is difficult due to decibel units \u2013 here the gain could be read off from Figure 13\u201120 as anywhere between 20 and 25 dB. It is recommended to always use the transfer function (if available) to compute the accurate gain values. Here we can compute the Uncompensated Open Loop DC gain \u2013 there is no controller, i.e. [latex]G_c(s) = 1[\/latex].<\/p>\n<p>From the process transfer function:<\/p>\n<p style=\"text-align: center\">[latex]K_{dco}=\\lim_{s\\rightarrow0}\\frac{30(s+2)}{{(s+0.1)}^2{(s+20)}^2}=\\frac{60}{4}=15[\/latex]<\/p>\n<figure id=\"attachment_1485\" aria-describedby=\"caption-attachment-1485\" style=\"width: 1200px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/pressbooks.library.ryerson.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_20.png\" alt=\"Figure 13\u201120: Uncompensated Open Loop Frequency Response in Lag Design Example\" width=\"1200\" height=\"900\" class=\"wp-image-1485 size-full\" srcset=\"https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_20.png 1200w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_20-300x225.png 300w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_20-768x576.png 768w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_20-1024x768.png 1024w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_20-65x49.png 65w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_20-225x169.png 225w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_20-350x263.png 350w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><figcaption id=\"caption-attachment-1485\" class=\"wp-caption-text\">Figure 13\u201120: Uncompensated Open Loop Frequency Response in Lag Design Example<\/figcaption><\/figure>\n<p>The uncompensated closed loop DC gain is then:<\/p>\n<p style=\"text-align: center\">[latex]K_{dc} = \\frac{K_{dco}}{1+K_{dco}}=\\frac{15}{16}=0.9375[\/latex]<\/p>\n<p>The Phase Margin and the crossover frequency can be read off from the Bode plot in Figure 13\u201120 as: [latex]\\Phi_m = 38^{\\circ}[\/latex] and [latex]\\omega_{cp} = 0.378[\/latex] rad\/sec. The damping ratio [latex]\\zeta[\/latex] and the frequency of natural oscillations [latex]\\omega_n[\/latex] for the uncompensated closed loop system can now be estimated by either reading it off the Phase Margin graph in Figure 12\u20119 or by using the formula: [latex]\\zeta = 0.3487[\/latex]. Next, calculate the natural frequency:<\/p>\n<p style=\"text-align: center\">[latex]\\omega_n = \\frac{\\tan{\\Phi_m}\\cdot\\omega_{cp}}{2\\zeta}=0.426[\/latex]<\/p>\n<p>The uncompensated closed loop model:<\/p>\n<p style=\"text-align: center\">[latex]G_m(s)=K_{dc}\\frac{\\omega_n^2}{s^2+2\\zeta\\omega_n s + \\omega_n^2} \\rightarrow G_{mu}(s)=\\frac{0.1701}{s^2+0.2971 s + 0.1814}[\/latex]<\/p>\n<p>Model specs can be calculated as:<\/p>\n<p style=\"text-align: center\">[latex]PO = 100\\cdot \\left ( e^{\\frac{-\\zeta\\pi}{\\sqrt{1-{\\zeta}^2}}} \\right ) = 31\\%[\/latex]<\/p>\n<p style=\"text-align: center\">[latex]T_{settle(\\pm2\\%)}=\\frac{4}{\\zeta\\omega_n}=26.9[\/latex]<\/p>\n<p style=\"text-align: center\">[latex]T_{rise(100\\%)}=\\frac{\\pi-\\cos\\zeta^{-1}}{\\omega_n\\sqrt{1-\\zeta^2}}=4.82[\/latex]<\/p>\n<p style=\"text-align: center\">[latex]e_{ss(step\\%)}=\\frac{1}{1+K_{pos}}\\cdot100\\%=\\frac{1}{1+15}=6.25\\%[\/latex]<\/p>\n<p>The actual closed loop uncompensated transfer function is:<\/p>\n<p style=\"text-align: center\">[latex]G_{cl}(s)=\\frac{30s + 60}{s^4 + 40.2s^3 + 408s^2 + 110.4s +64}[\/latex]<\/p>\n<p style=\"text-align: center\">[latex]G_{cl}(s)=\\frac{30(s+2)}{(s+21.14)(s+18.8)(s^2 + 0.262s + 0.161)}[\/latex]<\/p>\n<p>As we can see, the closed loop transfer function has a dominant pair of complex poles, with the damping ratio [latex]\\zeta = 0.326[\/latex] and the natural frequency of oscillations\u00a0 [latex]\\omega_n = 0.4[\/latex] rad\/sec, which are very close to the model estimates of [latex]\\zeta = 0.349[\/latex] and [latex]\\omega_n = 0.426[\/latex] rad\/sec. The actual transfer function also has a zero at -2, and two poles at \u2013 21.14 and -18.8, all of which are negligible, compared to the dominant pair of closed loop poles located at [latex]-0.13\\pm j0.38[\/latex]. Thus, the assumed model is quite accurate \u2013 see the actual step response comparison, shown in Figure 13\u201121.<\/p>\n<p>Below, we compare the expected specs, based on the model, with the actual system response specs, obtained by running the \u201cstepeval\u201d function. The actual specs, compared to the model specs, are:<\/p>\n<table style=\"border-collapse: collapse;width: 100%\">\n<tbody>\n<tr>\n<td style=\"width: 33.3333%\"><\/td>\n<td style=\"width: 33.3333%\">Actual Compensated System<\/td>\n<td style=\"width: 33.3333%\">[latex]G_{mc}(s)[\/latex] \u2013 Model for the Compensated System<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 33.3333%\">PO<\/td>\n<td style=\"width: 33.3333%\">54.8%<\/td>\n<td style=\"width: 33.3333%\">31%<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 33.3333%\">[latex]e_{ss(step\\%)}[\/latex]<\/td>\n<td style=\"width: 33.3333%\">6.25%<\/td>\n<td style=\"width: 33.3333%\">6.25%<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 33.3333%\">[latex]T_{rise(0-100\\%)}[\/latex]<\/td>\n<td style=\"width: 33.3333%\">4.68 sec<\/td>\n<td style=\"width: 33.3333%\">4.82 sec<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The specs estimates from the model are very accurate, with all specs meeting the required values.<\/p>\n<figure id=\"attachment_1490\" aria-describedby=\"caption-attachment-1490\" style=\"width: 1200px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/pressbooks.library.ryerson.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_21.png\" alt=\"Figure 13\u201121: Uncompensated Closed Loop Step Response in Lag Design Example\" width=\"1200\" height=\"900\" class=\"wp-image-1490 size-full\" srcset=\"https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_21.png 1200w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_21-300x225.png 300w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_21-768x576.png 768w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_21-1024x768.png 1024w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_21-65x49.png 65w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_21-225x169.png 225w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_21-350x263.png 350w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><figcaption id=\"caption-attachment-1490\" class=\"wp-caption-text\">Figure 13\u201121: Uncompensated Closed Loop Step Response in Lag Design Example<\/figcaption><\/figure>\n<p>Now, the Lag Controller design \u2013 we can choose a simplified design or an analytical design. First, always calculate the required DC gain of the controller \u2013 this part is the same in both approaches. Based on the required error specification:<\/p>\n<p style=\"text-align: center\">[latex]e_{ss(step)c}=0.5\\cdot e_{ss(step)u} \\rightarrow \\frac{1}{K_{posu}}=\\frac{0.5}{1+K_{posu}}[\/latex]<\/p>\n<p style=\"text-align: center\">[latex]\\frac{1}{K_{posu}}=\\frac{0.5}{1+K_{posu}} \\rightarrow k_{posu}=31[\/latex]<\/p>\n<p>The compensated closed loop DC gain should be:<\/p>\n<p style=\"text-align: center\">[latex]K_{dc(comp)}=\\frac{K_{posc}}{1+K_{posc}}=\\frac{31}{32}=0.9688[\/latex]<\/p>\n<p>The controller DC gain is then:<\/p>\n<p style=\"text-align: center\">[latex]K_c = a_0 = \\frac{K_{posc}}{K_{posu}}=\\frac{31}{15}=2.067[\/latex]<\/p>\n<p>Next, \u201ctranslate\u201d the required PO spec into the equivalent closed loop damping ratio. Based on Figure 7\u20114, for PO = 10%, the required damping ratio is approximately [latex]\\zeta =0.59[\/latex]. The compensated Phase Margin, based on Figure 12\u20119 should be close to [latex]\\Phi_{m(comp)} = 60^{\\circ}[\/latex].<\/p>\n<p>What do we do next? The two approaches differentiate on how we proceed.<\/p>\n<div>\n<h3><strong>13.5.1.1 Lag Controller Design Solved Example 1: The \u201cSimplified\u201d Lag Design<\/strong><\/h3>\n<p>Recall that at the frequency of [latex]\\frac{10}{\\alpha\\tau}[\/latex] in the Lag Controller (see the graph below), we are still losing about \u00a0of [latex]5^{\\circ}[\/latex] phase, so look at the uncompensated open loop Bode plot and choose the frequency where the phase angle is ([latex]\\Phi_m + 5^{\\circ}[\/latex]) away from the [latex]-180^{\\circ}[\/latex] line. Here, if we want the compensated Phase Margin to be [latex]\\Phi_m = 60^{\\circ}[\/latex], we should look for the frequency where the phase angle reaches [latex]-115^{\\circ}[\/latex]:<\/p>\n<p style=\"text-align: center\">[latex]\\angle G(j\\omega) = -180^{\\circ}+\\Phi_m + 5^{\\circ} = -180^{\\circ}+60^{\\circ} + 5^{\\circ}[\/latex]<\/p>\n<p>That frequency is read off the plot as approximately 0.17 rad\/sec: [latex]\\omega_{co(comp)} = 0.17[\/latex] rad\/sec. <strong>Note that in the Lag Design,<\/strong> <strong>the compensated crossover frequency will always be to the left of the uncompensated frequency of the crossover<\/strong>. If it were to the right of the uncompensated frequency of the crossover, we would end up with a Lead Design. Here the uncompensated frequency is 0.38 rad\/s. Next, find the gain of the uncompensated system at that point \u2013 recall that reading it off the graph is inaccurate so it is best to substitute [latex]s = j0.17[\/latex] into G(s):<\/p>\n<p style=\"text-align: center\">[latex]\\left | G(j0.17) \\right | = 3.87\\frac{V}{V}=11.75dB[\/latex]<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/pressbooks.library.ryerson.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_a.png\" alt=\"\" width=\"672\" height=\"504\" class=\"alignnone size-full wp-image-1495\" srcset=\"https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_a.png 672w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_a-300x225.png 300w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_a-65x49.png 65w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_a-225x169.png 225w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_a-350x263.png 350w\" sizes=\"auto, (max-width: 672px) 100vw, 672px\" \/><\/p>\n<p>Remember that since we are using the DC gain of 2.0667, the total gain at the chosen crossover frequency is going to be 3.87 times 2.0667. This is the amount of the gain reduction that has to be delivered by the high frequency gain drop-off of the Lag Controller:<\/p>\n<p style=\"text-align: center\">[latex]\\alpha = \\frac{1}{2.0667\\cdot3.87}=0.125[\/latex]<\/p>\n<p style=\"text-align: left\">[latex]\\omega_{cp(comp)}[\/latex] rad\/sec becomes the right-side corner of the phase characteristic:<\/p>\n<p style=\"text-align: center\">[latex]\\omega_{cp(comp)}=0.17=\\frac{10}{\\alpha\\tau}\u00a0[\/latex]<\/p>\n<p style=\"text-align: center\">[latex]\\tau = \\frac{10}{\\alpha\\cdot\\omega_{cp}}=\\frac{10}{0.125\\cdot0.17}=4704[\/latex]<\/p>\n<p>The controller transfer function is:<\/p>\n<p style=\"text-align: center\">[latex]G_c(s)=K_c\\cdot\\frac{\\tau\\alpha s + 1}{\\tau s + 1}=2.0647\\cdot\\frac{470.4\\cdot0.125s+1}{470.4s+1}=2.0647\\cdot\\frac{58.82s+1}{470.4s+1}[\/latex]<\/p>\n<p style=\"text-align: center\">[latex]G_c(s)=\\frac{a_1 s + a_0}{b_1 s +1 }= \\frac{121.6s+2.067}{470.4s+1}\u00a0[\/latex]<\/p>\n<p>The open loop Bode plots before and after compensation and the system Phase Margin are shown in Figure 13\u201122 and the compensated Phase Margin is shown in Figure 13\u201123 \u2013 it is [latex]\\Phi_m=60^{\\circ}[\/latex] at the frequency of [latex]\\omega_{cp(comp)}=0.17[\/latex] rad\/sec, as was chosen for this design.<\/p>\n<figure id=\"attachment_1496\" aria-describedby=\"caption-attachment-1496\" style=\"width: 1200px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/pressbooks.library.ryerson.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_22.png\" alt=\"Figure 13\u201122: Open Loop Frequency Responses in Lag Design Example \u2013 Simplified Design\" width=\"1200\" height=\"900\" class=\"wp-image-1496 size-full\" srcset=\"https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_22.png 1200w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_22-300x225.png 300w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_22-768x576.png 768w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_22-1024x768.png 1024w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_22-65x49.png 65w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_22-225x169.png 225w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_22-350x263.png 350w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><figcaption id=\"caption-attachment-1496\" class=\"wp-caption-text\">Figure 13\u201122: Open Loop Frequency Responses in Lag Design Example \u2013 Simplified Design<\/figcaption><\/figure>\n<figure id=\"attachment_1497\" aria-describedby=\"caption-attachment-1497\" style=\"width: 1200px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/pressbooks.library.ryerson.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_23.png\" alt=\"Figure 13\u201123: Compensated Phase Margin in Lag Design Example \u2013 Simplified Design\" width=\"1200\" height=\"900\" class=\"wp-image-1497 size-full\" srcset=\"https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_23.png 1200w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_23-300x225.png 300w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_23-768x576.png 768w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_23-1024x768.png 1024w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_23-65x49.png 65w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_23-225x169.png 225w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_23-350x263.png 350w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><figcaption id=\"caption-attachment-1497\" class=\"wp-caption-text\">Figure 13\u201123: Compensated Phase Margin in Lag Design Example \u2013 Simplified Design<\/figcaption><\/figure>\n<p>The expected compensated closed loop response specs can be estimated using the dominant poles model again. Use the formula below, or read off the Phase Margin graph in Figure 12\u20119:<\/p>\n<p style=\"text-align: center\">[latex]\\zeta=\\frac{\\tan{\\Phi_m}}{2\\sqrt{{(\\tan\\Phi_m)}^2 + 1}} \\rightarrow \\zeta = 0.607[\/latex]<\/p>\n<p style=\"text-align: center\">[latex]\\omega_n = \\frac{\\tan{\\Phi_m}\\cdot\\omega_{cp}}{2\\zeta} = 0.24[\/latex]<\/p>\n<p>The compensated closed loop model:<\/p>\n<p style=\"text-align: center\">[latex]G_{mc}(s)=\\frac{0.054}{s^2 + 0.291s + 0.054}[\/latex]<\/p>\n<p>Model specs can be calculated as:<\/p>\n<p style=\"text-align: center\">[latex]PO=100\\cdot\\left ( e^{\\frac{-\\zeta\\pi}{\\sqrt{1-\\zeta^2}}} \\right )=9\\%[\/latex]<\/p>\n<p style=\"text-align: center\">[latex]T_{settle(\\pm2\\%)}=\\frac{4}{\\zeta\\omega_n}=27.4[\/latex]<\/p>\n<p style=\"text-align: center\">[latex]T_{rise(100\\%)}=\\frac{pi-\\cos\\zeta^{-1}}{\\omega_n\\sqrt{1-\\zeta^{2}}}=11.5[\/latex]<\/p>\n<p style=\"text-align: center\">[latex]e_{ss(step\\%)}=\\frac{1}{1+K_{pos}}\\cdot100\\%=\\frac{1}{1+31}\\cdot100\\%=3.125\\%[\/latex]<\/p>\n<p>The actual closed loop transfer function is:<\/p>\n<p style=\"text-align: center\">[latex]G_{cl}(s)=\\frac{7.753(s+2)(s+0.017)}{(s+20.59)(s+19.4)(s+0.01463)(s^2 + 0.203s + 0.047)}[\/latex]<\/p>\n<p>As we can see, the actual closed loop transfer function has a dominant pair of complex poles, with the damping ratio [latex]\\zeta=0.47[\/latex] and the natural frequency of oscillations [latex]\\omega_n = 0.22[\/latex] rad\/sec, as well as a zero at -2, another zero at -0.017, and three real poles at \u2013 20.59, -19.4 and at -0.01463.<\/p>\n<p>The dominant poles model is not as accurate as before, because now an additional pole-zero combo shows up, and both are very close to the Imaginary axis. They do not cancel out, and their net effect on the closed loop response is that the very large time constant associated with the Lag Controller causes a very slow, very visible exponential component in the step response &#8211; see the actual step response comparison in Figure 13\u201124 and the comparison of the specs below. That additional real pole has a very long decay time associated with it, which significantly affects the Settling Time.<\/p>\n<p>Below, we compare the expected specs, based on the model, with the actual system response specs, obtained by running the \u201cstepeval\u201d function. The actual specs, compared to the model specs, are:<\/p>\n<table style=\"border-collapse: collapse;width: 100%;height: 70px\">\n<tbody>\n<tr style=\"height: 14px\">\n<td style=\"width: 33.3333%;height: 14px\"><\/td>\n<td style=\"width: 33.3333%;height: 14px\">Actual Compensated System<\/td>\n<td style=\"width: 33.3333%;height: 14px\">[latex]G_{mc}(s)[\/latex] \u2013 Model for the Compensated System<\/td>\n<\/tr>\n<tr style=\"height: 14px\">\n<td style=\"width: 33.3333%;height: 14px\">PO<\/td>\n<td style=\"width: 33.3333%;height: 14px\">4.6%<\/td>\n<td style=\"width: 33.3333%;height: 14px\">9%<\/td>\n<\/tr>\n<tr style=\"height: 14px\">\n<td style=\"width: 33.3333%;height: 14px\">[latex]e_{ss(step\\%)}[\/latex]<\/td>\n<td style=\"width: 33.3333%;height: 14px\">3.125%<\/td>\n<td style=\"width: 33.3333%;height: 14px\">3.125%<\/td>\n<\/tr>\n<tr style=\"height: 14px\">\n<td style=\"width: 33.3333%;height: 14px\">[latex]T_{rise(0-100\\%)}[\/latex]<\/td>\n<td style=\"width: 33.3333%;height: 14px\">14.1 sec<\/td>\n<td style=\"width: 33.3333%;height: 14px\">11.5 sec<\/td>\n<\/tr>\n<tr style=\"height: 14px\">\n<td style=\"width: 33.3333%;height: 14px\">[latex]T_{settle(\\pm2\\%)}[\/latex]<\/td>\n<td style=\"width: 33.3333%;height: 14px\">130.4 sec<\/td>\n<td style=\"width: 33.3333%;height: 14px\">24.8 sec<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Clearly, the biggest problem with the simplified approach is that it typically generates a long-time constant that causes the closed loop system to have the real pole close to the Imaginary axis that cannot be ignored \u2013 the closed loop model is not really based on a dominant pair of complex poles alone. Unfortunately, the simplified design does not allow us to avoid this. Let\u2019s consider the analytical design next.<\/p>\n<div class=\"textbox\">\n<p>Plus of the simplified design \u2013 it will never lead to negative values of the controller parameters.<\/p>\n<p>Minus of the simplified design \u2013 it almost always results in an additional significant closed loop pole that has a strong negative effect on the Settling Time. This can be somehow ameliorated by trial &amp; error adjustments, but it would be tedious.<\/p>\n<\/div>\n<figure id=\"attachment_1499\" aria-describedby=\"caption-attachment-1499\" style=\"width: 1200px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/pressbooks.library.ryerson.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_24.png\" alt=\"Figure 13\u201124: Compensated Closed Loop Step Response in Lag Design Example \u2013 Simplified Design\" width=\"1200\" height=\"900\" class=\"wp-image-1499 size-full\" srcset=\"https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_24.png 1200w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_24-300x225.png 300w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_24-768x576.png 768w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_24-1024x768.png 1024w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_24-65x49.png 65w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_24-225x169.png 225w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_24-350x263.png 350w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><figcaption id=\"caption-attachment-1499\" class=\"wp-caption-text\">Figure 13\u201124: Compensated Closed Loop Step Response in Lag Design Example \u2013 Simplified Design<\/figcaption><\/figure>\n<h3><strong><span style=\"font-size: 1.266em\">13.5.1.2 Lag Controller Design Solved Example 1: The \u201cAnalytical\u201d Lag Design<\/span><\/strong><\/h3>\n<\/div>\n<div>\n<p>The analytical design gives us more flexibility to shape the open loop response by choosing different locations for the crossover frequency. Remember to choose the required DC gain based on the error specs \u2013 the calculations are identical to the simplified method, so the Controller DC gain ([latex]a_0[\/latex]) will be the same:<\/p>\n<p style=\"text-align: center\">[latex]e_{ss(step)c}=0.5\\cdot e_{ss(step)u} \\rightarrow\\frac{1}{1+K_posc}=\\frac{0.5}{1+K_{posu}}[\/latex]<\/p>\n<p style=\"text-align: center\">[latex]\\frac{1}{1+K_{posc}}=\\frac{0.5}{1+15}\\rightarrow K_{posc}=31[\/latex]<\/p>\n<p>The compensated closed loop DC gain should be:<\/p>\n<p style=\"text-align: center\">[latex]K_{dc(comp)}=\\frac{K_{posc}}{1+K_{posc}}=\\frac{31}{32}=0.9688[\/latex]<\/p>\n<p>The controller DC gain is again:<\/p>\n<p style=\"text-align: center\">[latex]a_0=\\frac{K_{posc}}{K_{posu}}=\\frac{31}{15}=2.067[\/latex]<\/p>\n<p>Next, we pick the Phase Margin \u2013 in this example, we decided to have the Phase Margin of [latex]60^{\\circ}[\/latex], so let\u2019s stick with this value. Next, we need to choose the crossover frequency \u2013 as long as it is less than 0.38 (the uncompensated value). First, let\u2019s choose the same value as in the simplified design:<\/p>\n<\/div>\n<p style=\"text-align: center\">[latex]\\omega_{cp(comp)}=0.17 rad\/sec[\/latex]<\/p>\n<p>To use the derived formulae for the controller constants [latex]a_1[\/latex] and [latex]b_1[\/latex], we need to calculate the uncompensated open loop Bode plot the phase and the gain at that frequency &#8211; as before, substitute [latex]s=j0.17[\/latex] into the transfer function G(s):<\/p>\n<p style=\"text-align: center\">[latex]\\angle G(j0.17)=-115^{\\circ}[\/latex]<\/p>\n<p style=\"text-align: center\">[latex]\\left | G(j0.17) \\right | = 3.87\\frac{V}{V}=11.75dB[\/latex]<\/p>\n<p style=\"text-align: left\">Next, substitute these values into the formulae:<\/p>\n<p style=\"text-align: center\">[latex]\\theta=-180^{\\circ}+\\Phi_m-\\angle G(j0.17)= -180^{\\circ}+60^{\\circ}+115^{\\circ} = -5^{\\circ}[\/latex]<\/p>\n<p>Note since this is a LAG design, the \u201clift\u201d angle is not really \u201clifting\u201d anything; it is just an intermediate step in the calculation and could be even called a \u201cdrag\u201d or \u201clag\u201d angle. Also note this calculation confirms our assumption in the \u201csimplified\u201d design that at the chosen crossover frequency, we are losing approximately 5 degrees of phase to the lag controller.<\/p>\n<p style=\"text-align: center\">[latex]a_1 = \\frac{1-a_0\\cdot\\left | G(j\\omega_{cp})\\right | \\cdot \\cos \\theta}{\\omega_{cp}\\cdot\\left | G(j\\omega)\\right |\\cdot\\sin\\theta}=126.2[\/latex]<\/p>\n<p style=\"text-align: center\">[latex]b_1 = \\frac{\\cos\\theta-a_0\\cdot\\left | G(j\\omega_{cp})\\right | }{\\omega_{cp}\\cdot\\sin\\theta}=490.6[\/latex]<\/p>\n<p>These values are very close to the ones obtained using the simplified approach, as expected. The closed loop response will also be similar, with the large value of the closed loop time constant dominating the response and adversely affecting the Settling Time. The resulting design offers some improvement over the uncompensated response, but the Settling Time spec takes a huge beating \u2013 this is not a good design and we should be able to do better.<\/p>\n<p>With the analytical design we are not stuck with the one choice of the crossover frequency, as is the case with the simplified design. We can easily choose a different frequency of the crossover (as long as it is less than the uncompensated crossover frequency) and see if the resulting closed loop step response simulations will improve. Let\u2019s consider what would happen if we chose a different value for the crossover frequency. Let\u2019s say, make [latex]\\omega_{cp(comp)}=0.2[\/latex] rad\/sec. Again, we need to find the gain of the uncompensated system at that point \u2013 recall that reading it off the graph is inaccurate so it is best to substitute [latex]s=j0.2[\/latex] into G(s):<\/p>\n<p style=\"text-align: center\">[latex]\\angle G(j0.2) = -122^{\\circ}[\/latex]<\/p>\n<p style=\"text-align: center\">[latex]\\left | G(j0.2) \\right | = 3.01\\frac{V}{V}=9.6dB[\/latex]<\/p>\n<p>Next, substitute these values into the formulae:<\/p>\n<p style=\"text-align: center\">[latex]\\theta = -180^{\\circ} + \\Phi_m - \\angle G(j0.2)= -180^{\\circ}+60^{\\circ}+122^{\\circ}=2^{\\circ}[\/latex]<\/p>\n<p style=\"text-align: center\">[latex]a_1 = \\frac{1-a_0\\cdot\\left | G(j\\omega_{cp})\\right | \\cdot \\cos \\theta}{\\omega_{cp}\\cdot\\left | G(j\\omega)\\right |\\cdot\\sin\\theta}=-215.5[\/latex]<\/p>\n<p style=\"text-align: center\">[latex]b_1 = \\frac{\\cos\\theta-a_0\\cdot\\left | G(j\\omega_{cp})\\right | }{\\omega_{cp}\\cdot\\sin\\theta}=-650.3[\/latex]<\/p>\n<p style=\"text-align: center\">[latex]G_c(s)=\\frac{a_1 s + a_0}{b_1 s +1}=\\frac{-215.5s + 2.067}{-650.3s +1}[\/latex]<\/p>\n<p>So here we have an unpleasant surprise! The controller coefficients are not acceptable, as they are negative! The controller pole in RHP is unacceptable because it means an unstable open loop transfer function \u2013 even if the resulting closed loop is stable, for safety reasons we do not want to implement that \u2013 in case if the closed loop incidentally opens (a malfunction), we would have an unstable system on our hands. The RHP location of the controller zero is also unacceptable. Even if the controller pole is in a stable location, the RHP zero will introduce an effective delay into the system, extending both the Rise Time and the Settling Time. Recall that we will never get that kind of surprise in the \u201csimplified\u201d lag design.<\/p>\n<p>Let\u2019s keep adjusting the value of the crossover frequency \u2013 we already have one \u201cpassable\u201d value, at 0.17 rad\/sec, but we want to improve on that design. By \u201ctrial &amp; error\u201d we find that values of crossover frequency that are between 0.19 and 0.38 all result in negative coefficients and are therefore unacceptable. Let\u2019s try frequencies smaller than 0.17 \u2013 some of those choices will lead to acceptable controller values. Let\u2019s see if we can get a set of controller values that would give us a better actual step response than the one seen above for [latex]\\omega_{cp(comp)} = 0.17 rad\/sec[\/latex] \u2013 remember that one was quite different from expected because it had a large time constant associated with the Lag controller.<\/p>\n<p>After some trial &amp; error with the analytical formulae, we come across quite an agreeable response \u2013 note that the formulae can be easily programmed into Matlab so that the iterations are quite easy to perform. Let\u2019s see the results for [latex]\\omega_{cp(comp)} = 0.1 rad\/sec[\/latex] \u2013 good results can be had for some other, smaller values as well. Again, we need to find the gain and phase of the uncompensated system at that frequency \u2013 recall that reading it off the graph is inaccurate so it is best to substitute [latex]s=j0.1[\/latex] into G(s):<\/p>\n<p style=\"text-align: center\">[latex]\\angle G(j0.1)=-88^{\\circ}[\/latex]<\/p>\n<p style=\"text-align: center\">[latex]\\left | G(j0.1) \\right | = 7.5\\frac{V}{V}=17.5dB[\/latex]<\/p>\n<p>Next, substitute these values into the formulae and first calculate our \u201clag\u201d angle:<\/p>\n<p style=\"text-align: center\">[latex]\\theta = -180^{\\circ}+\\Phi_m-\\angle G(j0.1)=-180^{\\circ}+60^{\\circ}+88^{\\circ}=-32^{\\circ}[\/latex]<\/p>\n<p>Note that at this point the \u201clift\u201d angle has become a \u201clag\u201d angle (negative value).<\/p>\n<p style=\"text-align: center\">[latex]a_1 = \\frac{1-a_0\\cdot\\left | G(j\\omega_{cp})\\right | \\cdot \\cos \\theta}{\\omega_{cp}\\cdot\\left | G(j\\omega)\\right |\\cdot\\sin\\theta}=30.2[\/latex]<\/p>\n<p style=\"text-align: center\">[latex]b_1 = \\frac{\\cos\\theta-a_0\\cdot\\left | G(j\\omega_{cp})\\right | }{\\omega_{cp}\\cdot\\sin\\theta}=274.7[\/latex]<\/p>\n<p>Both controller parameters are positive, so this controller will be acceptable. The open loop Bode plots before and after compensation are shown in Figure 13\u201125 and the system Phase Margin is shown in Figure 13\u201126.<\/p>\n<figure id=\"attachment_1506\" aria-describedby=\"caption-attachment-1506\" style=\"width: 1200px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/pressbooks.library.ryerson.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_25.png\" alt=\"Figure 13\u201125: Open Loop Frequency Responses in Lag Design Example \u2013 Analytical Design\" width=\"1200\" height=\"900\" class=\"wp-image-1506 size-full\" srcset=\"https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_25.png 1200w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_25-300x225.png 300w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_25-768x576.png 768w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_25-1024x768.png 1024w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_25-65x49.png 65w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_25-225x169.png 225w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_25-350x263.png 350w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><figcaption id=\"caption-attachment-1506\" class=\"wp-caption-text\">Figure 13\u201125: Open Loop Frequency Responses in Lag Design Example \u2013 Analytical Design<\/figcaption><\/figure>\n<p>The controller transfer function is:<\/p>\n<p style=\"text-align: center\">[latex]G_c(s)=\\frac{a_1 s + a_0}{b_1 s + 1}=\\frac{30.2s+2.067}{274.7s+1}[\/latex]<\/p>\n<p>Note that with a much smaller value of [latex]b_1[\/latex], this design may be actually better than the one with a higher crossover frequency, as the closed loop compensated response will be closer to the expected model \u2013 no slow exponential visible. Let\u2019s check this theory out. The expected compensated closed loop response can be estimated using the dominant poles model again. Use the formula below, or read off the Phase Margin graph in Figure 12\u20119:<\/p>\n<p style=\"text-align: center\">[latex]\\zeta = \\frac{\\tan\\Phi_m}{2\\sqrt{\\sqrt{{(\\tan\\Phi_m)}^2 + 1}}} \\rightarrow \\zeta = 0.612[\/latex]<\/p>\n<p style=\"text-align: center\">[latex]\\omega_n = \\frac{\\tan\\Phi_m\\cdot\\omega_{cp}}{2\\zeta}=0.1414[\/latex]<\/p>\n<figure id=\"attachment_1507\" aria-describedby=\"caption-attachment-1507\" style=\"width: 1200px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/pressbooks.library.ryerson.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_26.png\" alt=\"Figure 13\u201126: Compensated Phase Margin in Lag Design Example \u2013 Analytical Design\" width=\"1200\" height=\"900\" class=\"wp-image-1507 size-full\" srcset=\"https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_26.png 1200w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_26-300x225.png 300w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_26-768x576.png 768w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_26-1024x768.png 1024w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_26-65x49.png 65w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_26-225x169.png 225w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_26-350x263.png 350w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><figcaption id=\"caption-attachment-1507\" class=\"wp-caption-text\">Figure 13\u201126: Compensated Phase Margin in Lag Design Example \u2013 Analytical Design<\/figcaption><\/figure>\n<p>The compensated closed loop model:<\/p>\n<p style=\"text-align: center\">[latex]G_{mc}(s)=\\frac{0.0194}{s^2+0.173s+0.02}\u00a0[\/latex]<\/p>\n<p>Model specs can be calculated as:<\/p>\n<p style=\"text-align: center\">[latex]PO = 100\\cdot \\left ( e^{\\frac{-\\zeta\\pi}{\\sqrt{1-{\\zeta}^2}}} \\right ) = 9\\%[\/latex]<\/p>\n<p style=\"text-align: center\">[latex]T_{settle(\\pm2\\%)}=\\frac{4}{\\zeta\\omega_n}=46.2[\/latex]<\/p>\n<p style=\"text-align: center\">[latex]T_{rise(100\\%)}=\\frac{\\pi-\\cos\\zeta^{-1}}{\\omega_n\\sqrt{1-\\zeta^2}}=20[\/latex]<\/p>\n<p style=\"text-align: center\">[latex]e_{ss(step\\%)}=\\frac{1}{1+K_{pos}}\\cdot100\\%=\\frac{1}{1+31}=3.125\\%[\/latex]<\/p>\n<p>The actual closed loop transfer function:<\/p>\n<p style=\"text-align: center\">[latex]G_{cl}(s)=\\frac{3.3(s+2)(s+0.068)}{(s+20.38)(s+19.6)(s+0.063)(s^2 + 0.1469s +0.0184)}[\/latex]<\/p>\n<p>Note that the closed loop model based on the dominant poles is now more accurate than in the case of the \u201csimplified\u201d design \u2013 while the additional pole-zero combo still shows up, both very close to the Imaginary axis, their net effect on the closed loop response is almost negligible because of a much better \u201cnear-cancellation\u201d: we have a zero at -0.068, and a pole at -0.063. Before they were at -0.017 and -0.0146, respectively. The very large time constant associated with the Lag Controller is no longer visible in the step response, and the Settling Time is much as expected &#8211; see the actual step response comparison and the comparison of the specs below.<\/p>\n<p>Below, we compare the expected specs, based on the model, with the actual system response specs, obtained by running the \u201cstepeval\u201d function. The actual specs, compared to the model specs, are:<\/p>\n<table style=\"border-collapse: collapse;width: 100%;height: 70px\">\n<tbody>\n<tr style=\"height: 14px\">\n<td style=\"width: 33.3333%;height: 14px\"><\/td>\n<td style=\"width: 33.3333%;height: 14px\">Actual Compensated System<\/td>\n<td style=\"width: 33.3333%;height: 14px\">[latex]G_{mc}(s)[\/latex] \u2013 Model for the Compensated System<\/td>\n<\/tr>\n<tr style=\"height: 14px\">\n<td style=\"width: 33.3333%;height: 14px\">PO<\/td>\n<td style=\"width: 33.3333%;height: 14px\">10.6%<\/td>\n<td style=\"width: 33.3333%;height: 14px\">8.8%<\/td>\n<\/tr>\n<tr style=\"height: 14px\">\n<td style=\"width: 33.3333%;height: 14px\">[latex]e_{ss(step\\%)}[\/latex]<\/td>\n<td style=\"width: 33.3333%;height: 14px\">3.125%<\/td>\n<td style=\"width: 33.3333%;height: 14px\">3.125%<\/td>\n<\/tr>\n<tr style=\"height: 14px\">\n<td style=\"width: 33.3333%;height: 14px\">[latex]T_{rise(0-100\\%)}[\/latex]<\/td>\n<td style=\"width: 33.3333%;height: 14px\">19.7 sec<\/td>\n<td style=\"width: 33.3333%;height: 14px\">20.1 sec<\/td>\n<\/tr>\n<tr style=\"height: 14px\">\n<td style=\"width: 33.3333%;height: 14px\">[latex]T_{settle(\\pm2\\%)}[\/latex]<\/td>\n<td style=\"width: 33.3333%;height: 14px\">41.1 sec<\/td>\n<td style=\"width: 33.3333%;height: 14px\">42.1 sec<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The estimates are very accurate. Finally, let\u2019s see how much of an improvement we achieved by introducing the Lag Controller \u2013 see the comparison of the responses in Figure 13\u201128.<\/p>\n<div class=\"textbox\">\n<p>Plus of the Analytical Lag Design \u2013 it can be quickly iterated to find a much better system performance, often without the long and visible slow time constant associated with the Simplified Lag Design.<\/p>\n<p>Minus of the Analytical Lag Design \u2013 sometimes the design formulae will yield negative, i.e. unacceptable, values of controller parameters. This can be addressed by a slightly different choice of the crossover frequency and the phase margin.<\/p>\n<\/div>\n<figure id=\"attachment_1508\" aria-describedby=\"caption-attachment-1508\" style=\"width: 1200px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/pressbooks.library.ryerson.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_27.png\" alt=\"Figure 13\u201127: Compensated Closed Loop Step Response in Lag Design Example \u2013 Analytical Design\" width=\"1200\" height=\"900\" class=\"wp-image-1508 size-full\" srcset=\"https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_27.png 1200w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_27-300x225.png 300w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_27-768x576.png 768w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_27-1024x768.png 1024w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_27-65x49.png 65w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_27-225x169.png 225w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_27-350x263.png 350w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><figcaption id=\"caption-attachment-1508\" class=\"wp-caption-text\">Figure 13\u201127: Compensated Closed Loop Step Response in Lag Design Example \u2013 Analytical Design<\/figcaption><\/figure>\n<figure id=\"attachment_1509\" aria-describedby=\"caption-attachment-1509\" style=\"width: 1200px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/pressbooks.library.ryerson.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_28.png\" alt=\"Figure 13\u201128: Comparison of Closed Loop Step Responses in Lag Design Example\" width=\"1200\" height=\"900\" class=\"wp-image-1509 size-full\" srcset=\"https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_28.png 1200w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_28-300x225.png 300w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_28-768x576.png 768w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_28-1024x768.png 1024w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_28-65x49.png 65w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_28-225x169.png 225w, https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-content\/uploads\/sites\/75\/2019\/12\/figure_13_5_28-350x263.png 350w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><figcaption id=\"caption-attachment-1509\" class=\"wp-caption-text\">Figure 13\u201128: Comparison of Closed Loop Step Responses in Lag Design Example<\/figcaption><\/figure>\n","protected":false},"author":156,"menu_order":5,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-1479","chapter","type-chapter","status-publish","hentry"],"part":1043,"_links":{"self":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-json\/pressbooks\/v2\/chapters\/1479","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-json\/wp\/v2\/users\/156"}],"version-history":[{"count":29,"href":"https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-json\/pressbooks\/v2\/chapters\/1479\/revisions"}],"predecessor-version":[{"id":2724,"href":"https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-json\/pressbooks\/v2\/chapters\/1479\/revisions\/2724"}],"part":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-json\/pressbooks\/v2\/parts\/1043"}],"metadata":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-json\/pressbooks\/v2\/chapters\/1479\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-json\/wp\/v2\/media?parent=1479"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-json\/pressbooks\/v2\/chapter-type?post=1479"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-json\/wp\/v2\/contributor?post=1479"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/pressbooks.library.torontomu.ca\/controlsystems\/wp-json\/wp\/v2\/license?post=1479"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}