<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article">
 <front>
  <journal-meta>
   <journal-id journal-id-type="publisher-id">
    jpee
   </journal-id>
   <journal-title-group>
    <journal-title>
     Journal of Power and Energy Engineering
    </journal-title>
   </journal-title-group>
   <issn pub-type="epub">
    2327-588X
   </issn>
   <issn publication-format="print">
    2327-5901
   </issn>
   <publisher>
    <publisher-name>
     Scientific Research Publishing
    </publisher-name>
   </publisher>
  </journal-meta>
  <article-meta>
   <article-id pub-id-type="doi">
    10.4236/jpee.2025.131003
   </article-id>
   <article-id pub-id-type="publisher-id">
    jpee-140199
   </article-id>
   <article-categories>
    <subj-group subj-group-type="heading">
     <subject>
      Articles
     </subject>
    </subj-group>
    <subj-group subj-group-type="Discipline-v2">
     <subject>
      Engineering
     </subject>
    </subj-group>
   </article-categories>
   <title-group>
    LQR Discrete Time Control of a Buck Converter Using a Non-Minimal State Space Representation
   </title-group>
   <contrib-group>
    <contrib contrib-type="author" xlink:type="simple">
     <name name-style="western">
      <surname>
       Richard
      </surname>
      <given-names>
       Tymerski
      </given-names>
     </name>
    </contrib>
   </contrib-group> 
   <aff id="affnull">
    <addr-line>
     aDepartment of Electrical&amp;Computer Engineering, Portland State University, Portland, Oregon, USA
    </addr-line> 
   </aff> 
   <pub-date pub-type="epub">
    <day>
     24
    </day> 
    <month>
     01
    </month>
    <year>
     2025
    </year>
   </pub-date> 
   <volume>
    13
   </volume> 
   <issue>
    01
   </issue>
   <fpage>
    32
   </fpage>
   <lpage>
    46
   </lpage>
   <history>
    <date date-type="received">
     <day>
      20,
     </day>
     <month>
      December
     </month>
     <year>
      2024
     </year>
    </date>
    <date date-type="published">
     <day>
      23,
     </day>
     <month>
      December
     </month>
     <year>
      2024
     </year> 
    </date> 
    <date date-type="accepted">
     <day>
      23,
     </day>
     <month>
      January
     </month>
     <year>
      2025
     </year> 
    </date>
   </history>
   <permissions>
    <copyright-statement>
     © Copyright 2014 by authors and Scientific Research Publishing Inc. 
    </copyright-statement>
    <copyright-year>
     2014
    </copyright-year>
    <license>
     <license-p>
      This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/
     </license-p>
    </license>
   </permissions>
   <abstract>
    This paper presents an advanced control strategy for DC-DC buck converters utilizing Non-Minimal State Space (NMSS) representation combined with Proportional-Integral-Plus (PIP) control, optimized through Linear Quadratic Regulator (LQR) design. The proposed approach leverages NMSS to eliminate the need for state observers, enhancing robustness against model mismatch and improving overall system performance. The PIP controller extends traditional PI control by incorporating additional dynamic feedback. Experimental results demonstrate that the NMSS-PIP-LQR controlled buck converter achieves excellent dynamic performance. The design procedure is fully documented, and microcontroller implementation issues are discussed.
   </abstract>
   <kwd-group> 
    <kwd>
     DC-DC Buck Converter
    </kwd> 
    <kwd>
      Non-Minimal State Space (NMSS)
    </kwd> 
    <kwd>
      Proportional-Integral-Plus (PIP) Control
    </kwd> 
    <kwd>
      Linear Quadratic Regulator (LQR)
    </kwd> 
    <kwd>
      F28069M Microcontroller
    </kwd>
   </kwd-group>
  </article-meta>
 </front>
 <body>
  <sec id="s1">
   <title>1. Introduction</title>
   <p>Digital control techniques for DC-DC converters have seen significant advancements in recent years, offering improved performance and flexibility compared to traditional analog methods. These developments have been driven by the increasing demand for more efficient and reliable power conversion systems in various applications, including electric vehicles and renewable energy systems.</p>
   <p>Several digital control methods have been applied to DC-DC converters, including <xref ref-type="bibr" rid="scirp.140199-1">
     [1]
    </xref>-<xref ref-type="bibr" rid="scirp.140199-4">
     [4]
    </xref>.</p>
   <p>1) Voltage-mode control <xref ref-type="bibr" rid="scirp.140199-5">
     [5]
    </xref></p>
   <p>2) Current-mode control <xref ref-type="bibr" rid="scirp.140199-6">
     [6]
    </xref> <xref ref-type="bibr" rid="scirp.140199-7">
     [7]
    </xref></p>
   <p>3) PID Control <xref ref-type="bibr" rid="scirp.140199-8">
     [8]
    </xref> <xref ref-type="bibr" rid="scirp.140199-9">
     [9]
    </xref></p>
   <p>4) Hysteretic control <xref ref-type="bibr" rid="scirp.140199-10">
     [10]
    </xref> <xref ref-type="bibr" rid="scirp.140199-11">
     [11]
    </xref></p>
   <p>5) Sliding mode control <xref ref-type="bibr" rid="scirp.140199-12">
     [12]
    </xref> <xref ref-type="bibr" rid="scirp.140199-13">
     [13]
    </xref></p>
   <p>6) Model predictive control <xref ref-type="bibr" rid="scirp.140199-14">
     [14]
    </xref></p>
   <p>7) Fuzzy logic control <xref ref-type="bibr" rid="scirp.140199-15">
     [15]
    </xref></p>
   <p>Among these digital control techniques, voltage-mode and current-mode control remain the most prevalent in industry due to their relative simplicity and well-established design procedures.</p>
   <p>However, the approach <xref ref-type="bibr" rid="scirp.140199-16">
     [16]
    </xref> presented in this paper, utilizing Non-Minimal State Space (NMSS) representation combined with Proportional-Integral-Plus (PIP) control and optimized through Linear Quadratic Regulator (LQR) design, offers several advantages over traditional methods. This approach merits consideration for the following reasons <xref ref-type="bibr" rid="scirp.140199-16">
     [16]
    </xref>.</p>
   <p>1). Formulation eliminates the need for state observers, reducing sensitivity to model mismatch and improving overall system robustness.</p>
   <p>2) PIP control extends traditional PI control, offering enhanced flexibility and performance, (particularly for higher-order systems or those with significant time delays).</p>
   <p>3) The integration of LQR optimization allows for systematic tuning of controller parameters, balancing control effort and system performance.</p>
   <p>By combining these advanced techniques, this paper aims to examine a control strategy for DC-DC buck converters that offers improved voltage regulation, transient response, and disturbance rejection compared to conventional methods while maintaining stability under various operating conditions.</p>
   <p>The remainder of this paper is organized as follows: Section 2 presents the converter modelling approach. This starts with the state space averaged model and leads to the NMSS model representation. Section 3 undertakes the LQR optimal controller design. An overview of the implementation of the control law using a digital microcontroller is discussed in Section 4. More detailed practical information relating to our use of the TI F28069M microcontroller is presented in Section 5. The effectiveness of the design is shown in Section 6 where the load step response is examined. The conclusion follows in Section 7.</p>
  </sec><sec id="s2">
   <title>2. System Modelling</title>
   <p>The schematic of a Buck dc-dc converter is shown in <xref ref-type="fig" rid="fig1">
     Figure 1
    </xref>. The circuit switches between two topologies depending on the position of the single pole double throw switch. The switch is operated cyclically with a period of 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         T 
       </mi> 
       <mi>
         s 
       </mi> 
      </msub> 
     </mrow> 
    </math>. The switch is in position 1 for a length of time of 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        d 
      </mi> 
      <msub> 
       <mi>
         T 
       </mi> 
       <mi>
         s 
       </mi> 
      </msub> 
     </mrow> 
    </math>, where 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       d 
     </mi> 
    </math>, 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mn>
        0 
      </mn> 
      <mo>
        &lt; 
      </mo> 
      <mi>
        d 
      </mi> 
      <mo>
        &lt; 
      </mo> 
      <mn>
        1 
      </mn> 
     </mrow> 
    </math>, is the duty ratio. During the remainder of the period of length 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mn>
          1 
        </mn> 
        <mo>
          − 
        </mo> 
        <mi>
          d 
        </mi> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <msub> 
       <mi>
         T 
       </mi> 
       <mi>
         s 
       </mi> 
      </msub> 
     </mrow> 
    </math>, the switch is in position 2. We will denote 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msup> 
       <mi>
         d 
       </mi> 
       <mo>
         ′ 
       </mo> 
      </msup> 
      <mo>
        ≡ 
      </mo> 
      <mn>
        1 
      </mn> 
      <mo>
        − 
      </mo> 
      <mi>
        d 
      </mi> 
     </mrow> 
    </math>. We use a state space mathematical description of the two topologies.</p>
   <p>During the first subinterval we have:</p>
   <fig id="fig1" position="float">
    <label>Figure 1</label>
    <caption>
     <title>Figure 1. Buck DC-DC converter.</title>
    </caption>
    <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1771182-rId28.jpeg?20250206085537" />
   </fig>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mfrac> 
       <mrow> 
        <mtext>
          d 
        </mtext> 
        <mi>
          x 
        </mi> 
       </mrow> 
       <mrow> 
        <mtext>
          d 
        </mtext> 
        <mi>
          t 
        </mi> 
       </mrow> 
      </mfrac> 
      <mo>
        = 
      </mo> 
      <msub> 
       <mi>
         A 
       </mi> 
       <mn>
         1 
       </mn> 
      </msub> 
      <mi>
        x 
      </mi> 
      <mo>
        + 
      </mo> 
      <msub> 
       <mi>
         B 
       </mi> 
       <mn>
         1 
       </mn> 
      </msub> 
      <msub> 
       <mi>
         v 
       </mi> 
       <mi>
         g 
       </mi> 
      </msub> 
     </mrow> 
    </math>(1)</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        y 
      </mi> 
      <mo>
        = 
      </mo> 
      <msub> 
       <mi>
         C 
       </mi> 
       <mn>
         1 
       </mn> 
      </msub> 
      <mi>
        x 
      </mi> 
      <mo>
        + 
      </mo> 
      <msub> 
       <mi>
         E 
       </mi> 
       <mn>
         1 
       </mn> 
      </msub> 
      <msub> 
       <mi>
         v 
       </mi> 
       <mi>
         g 
       </mi> 
      </msub> 
     </mrow> 
    </math>(2)</p>
   <p>During the second subinterval we have:</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mfrac> 
       <mrow> 
        <mtext>
          d 
        </mtext> 
        <mi>
          x 
        </mi> 
       </mrow> 
       <mrow> 
        <mtext>
          d 
        </mtext> 
        <mi>
          t 
        </mi> 
       </mrow> 
      </mfrac> 
      <mo>
        = 
      </mo> 
      <msub> 
       <mi>
         A 
       </mi> 
       <mn>
         2 
       </mn> 
      </msub> 
      <mi>
        x 
      </mi> 
      <mo>
        + 
      </mo> 
      <msub> 
       <mi>
         B 
       </mi> 
       <mn>
         2 
       </mn> 
      </msub> 
      <msub> 
       <mi>
         v 
       </mi> 
       <mi>
         g 
       </mi> 
      </msub> 
     </mrow> 
    </math>(3)</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        y 
      </mi> 
      <mo>
        = 
      </mo> 
      <msub> 
       <mi>
         C 
       </mi> 
       <mn>
         2 
       </mn> 
      </msub> 
      <mi>
        x 
      </mi> 
      <mo>
        + 
      </mo> 
      <msub> 
       <mi>
         E 
       </mi> 
       <mn>
         2 
       </mn> 
      </msub> 
      <msub> 
       <mi>
         v 
       </mi> 
       <mi>
         g 
       </mi> 
      </msub> 
     </mrow> 
    </math>(4)</p>
   <p>where 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       x 
     </mi> 
    </math> denotes a minimal length state vector, and 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         v 
       </mi> 
       <mi>
         g 
       </mi> 
      </msub> 
     </mrow> 
    </math> is the input voltage and 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       y 
     </mi> 
    </math> is the output. The state variables are typically the inductor current and capacitor voltage, such that 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        x 
      </mi> 
      <mo>
        = 
      </mo> 
      <msup> 
       <mrow> 
        <mrow> 
         <mo>
           [ 
         </mo> 
         <mrow> 
          <mtable> 
           <mtr> 
            <mtd> 
             <mi>
               i 
             </mi> 
            </mtd> 
            <mtd> 
             <mi>
               v 
             </mi> 
            </mtd> 
           </mtr> 
          </mtable> 
         </mrow> 
         <mo>
           ] 
         </mo> 
        </mrow> 
       </mrow> 
       <mtext>
         T 
       </mtext> 
      </msup> 
     </mrow> 
    </math>.</p>
   <p>To represent the system as linear and time invariant the State Space Averaging (SSA) <xref ref-type="bibr" rid="scirp.140199-17">
     [17]
    </xref> model will be used. Variables 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        d 
      </mi> 
      <mo>
        , 
      </mo> 
      <mi>
        x 
      </mi> 
      <mo>
        , 
      </mo> 
      <msub> 
       <mi>
         v 
       </mi> 
       <mi>
         g 
       </mi> 
      </msub> 
     </mrow> 
    </math> and 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       y 
     </mi> 
    </math> are assumed to undergo small variations 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mover accent="true"> 
       <mi>
         d 
       </mi> 
       <mo>
         ^ 
       </mo> 
      </mover> 
      <mo>
        , 
      </mo> 
      <mover accent="true"> 
       <mi>
         x 
       </mi> 
       <mo>
         ^ 
       </mo> 
      </mover> 
      <mo>
        , 
      </mo> 
      <msub> 
       <mover accent="true"> 
        <mi>
          v 
        </mi> 
        <mo>
          ^ 
        </mo> 
       </mover> 
       <mi>
         g 
       </mi> 
      </msub> 
     </mrow> 
    </math> and 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mover accent="true"> 
      <mi>
        y 
      </mi> 
      <mo>
        ^ 
      </mo> 
     </mover> 
    </math> around their steady state operating point denoted by the capitalized symbols 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        D 
      </mi> 
      <mo>
        , 
      </mo> 
      <mi>
        X 
      </mi> 
      <mo>
        , 
      </mo> 
      <msub> 
       <mi>
         V 
       </mi> 
       <mi>
         g 
       </mi> 
      </msub> 
     </mrow> 
    </math> and 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       Y 
     </mi> 
    </math>. The resulting small signal model is given by:</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mfrac> 
       <mrow> 
        <mtext>
          d 
        </mtext> 
        <mover accent="true"> 
         <mi>
           x 
         </mi> 
         <mo>
           ^ 
         </mo> 
        </mover> 
       </mrow> 
       <mrow> 
        <mtext>
          d 
        </mtext> 
        <mi>
          t 
        </mi> 
       </mrow> 
      </mfrac> 
      <mo>
        = 
      </mo> 
      <mi>
        A 
      </mi> 
      <mover accent="true"> 
       <mi>
         x 
       </mi> 
       <mo>
         ^ 
       </mo> 
      </mover> 
      <mo>
        + 
      </mo> 
      <mi>
        B 
      </mi> 
      <msub> 
       <mover accent="true"> 
        <mi>
          v 
        </mi> 
        <mo>
          ^ 
        </mo> 
       </mover> 
       <mi>
         g 
       </mi> 
      </msub> 
      <mo>
        + 
      </mo> 
      <msub> 
       <mi>
         B 
       </mi> 
       <mi>
         d 
       </mi> 
      </msub> 
      <mover accent="true"> 
       <mi>
         d 
       </mi> 
       <mo>
         ^ 
       </mo> 
      </mover> 
     </mrow> 
    </math>(5)</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mover accent="true"> 
       <mi>
         y 
       </mi> 
       <mo>
         ^ 
       </mo> 
      </mover> 
      <mo>
        = 
      </mo> 
      <mi>
        C 
      </mi> 
      <mover accent="true"> 
       <mi>
         x 
       </mi> 
       <mo>
         ^ 
       </mo> 
      </mover> 
      <mo>
        + 
      </mo> 
      <mi>
        E 
      </mi> 
      <msub> 
       <mover accent="true"> 
        <mi>
          v 
        </mi> 
        <mo>
          ^ 
        </mo> 
       </mover> 
       <mi>
         g 
       </mi> 
      </msub> 
      <mo>
        + 
      </mo> 
      <msub> 
       <mi>
         E 
       </mi> 
       <mi>
         d 
       </mi> 
      </msub> 
      <mover accent="true"> 
       <mi>
         d 
       </mi> 
       <mo>
         ^ 
       </mo> 
      </mover> 
     </mrow> 
    </math>(6)</p>
   <p>where</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        A 
      </mi> 
      <mo>
        = 
      </mo> 
      <mi>
        D 
      </mi> 
      <msub> 
       <mi>
         A 
       </mi> 
       <mn>
         1 
       </mn> 
      </msub> 
      <mo>
        + 
      </mo> 
      <msup> 
       <mi>
         D 
       </mi> 
       <mo>
         ′ 
       </mo> 
      </msup> 
      <msub> 
       <mi>
         A 
       </mi> 
       <mn>
         2 
       </mn> 
      </msub> 
     </mrow> 
    </math>(7)</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        B 
      </mi> 
      <mo>
        = 
      </mo> 
      <mi>
        D 
      </mi> 
      <msub> 
       <mi>
         B 
       </mi> 
       <mn>
         1 
       </mn> 
      </msub> 
      <mo>
        + 
      </mo> 
      <msup> 
       <mi>
         D 
       </mi> 
       <mo>
         ′ 
       </mo> 
      </msup> 
      <msub> 
       <mi>
         B 
       </mi> 
       <mn>
         2 
       </mn> 
      </msub> 
     </mrow> 
    </math>(8)</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        C 
      </mi> 
      <mo>
        = 
      </mo> 
      <mi>
        D 
      </mi> 
      <msub> 
       <mi>
         C 
       </mi> 
       <mn>
         1 
       </mn> 
      </msub> 
      <mo>
        + 
      </mo> 
      <msup> 
       <mi>
         D 
       </mi> 
       <mo>
         ′ 
       </mo> 
      </msup> 
      <msub> 
       <mi>
         C 
       </mi> 
       <mn>
         2 
       </mn> 
      </msub> 
     </mrow> 
    </math>(9)</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        E 
      </mi> 
      <mo>
        = 
      </mo> 
      <mi>
        D 
      </mi> 
      <msub> 
       <mi>
         E 
       </mi> 
       <mn>
         1 
       </mn> 
      </msub> 
      <mo>
        + 
      </mo> 
      <msup> 
       <mi>
         D 
       </mi> 
       <mo>
         ′ 
       </mo> 
      </msup> 
      <msub> 
       <mi>
         E 
       </mi> 
       <mn>
         2 
       </mn> 
      </msub> 
     </mrow> 
    </math>(10)</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         B 
       </mi> 
       <mi>
         d 
       </mi> 
      </msub> 
      <mo>
        = 
      </mo> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <msub> 
         <mi>
           A 
         </mi> 
         <mn>
           1 
         </mn> 
        </msub> 
        <mo>
          − 
        </mo> 
        <msub> 
         <mi>
           A 
         </mi> 
         <mn>
           2 
         </mn> 
        </msub> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mi>
        X 
      </mi> 
      <mo>
        + 
      </mo> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <msub> 
         <mi>
           B 
         </mi> 
         <mn>
           1 
         </mn> 
        </msub> 
        <mo>
          − 
        </mo> 
        <msub> 
         <mi>
           B 
         </mi> 
         <mn>
           2 
         </mn> 
        </msub> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <msub> 
       <mi>
         V 
       </mi> 
       <mi>
         g 
       </mi> 
      </msub> 
     </mrow> 
    </math>(11)</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         E 
       </mi> 
       <mi>
         d 
       </mi> 
      </msub> 
      <mo>
        = 
      </mo> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <msub> 
         <mi>
           C 
         </mi> 
         <mn>
           1 
         </mn> 
        </msub> 
        <mo>
          − 
        </mo> 
        <msub> 
         <mi>
           C 
         </mi> 
         <mn>
           2 
         </mn> 
        </msub> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mi>
        X 
      </mi> 
      <mo>
        + 
      </mo> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <msub> 
         <mi>
           E 
         </mi> 
         <mn>
           1 
         </mn> 
        </msub> 
        <mo>
          − 
        </mo> 
        <msub> 
         <mi>
           E 
         </mi> 
         <mn>
           2 
         </mn> 
        </msub> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <msub> 
       <mi>
         V 
       </mi> 
       <mi>
         g 
       </mi> 
      </msub> 
     </mrow> 
    </math>(12)</p>
   <p>The steady state vector, 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       X 
     </mi> 
    </math>, is given from the SSA DC model:</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        X 
      </mi> 
      <mo>
        = 
      </mo> 
      <mo>
        − 
      </mo> 
      <msup> 
       <mi>
         A 
       </mi> 
       <mrow> 
        <mo>
          − 
        </mo> 
        <mn>
          1 
        </mn> 
       </mrow> 
      </msup> 
      <mi>
        B 
      </mi> 
      <msub> 
       <mi>
         V 
       </mi> 
       <mi>
         g 
       </mi> 
      </msub> 
     </mrow> 
    </math>(13)</p>
   <p>The control input duty ratio to output voltage transfer function, 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mfrac> 
       <mover accent="true"> 
        <mi>
          y 
        </mi> 
        <mo>
          ^ 
        </mo> 
       </mover> 
       <mover accent="true"> 
        <mi>
          d 
        </mi> 
        <mo>
          ^ 
        </mo> 
       </mover> 
      </mfrac> 
     </mrow> 
    </math> is derived by using the state space quadruple 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mrow> 
       <mo>
         { 
       </mo> 
       <mrow> 
        <mi>
          A 
        </mi> 
        <mo>
          , 
        </mo> 
        <msub> 
         <mi>
           B 
         </mi> 
         <mi>
           d 
         </mi> 
        </msub> 
        <mo>
          , 
        </mo> 
        <mi>
          C 
        </mi> 
        <mo>
          , 
        </mo> 
        <msub> 
         <mi>
           E 
         </mi> 
         <mi>
           d 
         </mi> 
        </msub> 
       </mrow> 
       <mo>
         } 
       </mo> 
      </mrow> 
     </mrow> 
    </math>. For the Buck converter of <xref ref-type="fig" rid="fig1">
     Figure 1
    </xref> we find:</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        A 
      </mi> 
      <mo>
        = 
      </mo> 
      <mrow> 
       <mo>
         [ 
       </mo> 
       <mrow> 
        <mtable> 
         <mtr> 
          <mtd> 
           <mn>
             0 
           </mn> 
          </mtd> 
          <mtd> 
           <mrow> 
            <mo>
              − 
            </mo> 
            <mfrac> 
             <mn>
               1 
             </mn> 
             <mrow> 
              <msub> 
               <mi>
                 L 
               </mi> 
               <mi>
                 f 
               </mi> 
              </msub> 
             </mrow> 
            </mfrac> 
           </mrow> 
          </mtd> 
         </mtr> 
         <mtr> 
          <mtd> 
           <mrow> 
            <mfrac> 
             <mn>
               1 
             </mn> 
             <mrow> 
              <msub> 
               <mi>
                 C 
               </mi> 
               <mi>
                 f 
               </mi> 
              </msub> 
             </mrow> 
            </mfrac> 
           </mrow> 
          </mtd> 
          <mtd> 
           <mrow> 
            <mo>
              − 
            </mo> 
            <mfrac> 
             <mn>
               1 
             </mn> 
             <mrow> 
              <mi>
                R 
              </mi> 
              <msub> 
               <mi>
                 C 
               </mi> 
               <mi>
                 f 
               </mi> 
              </msub> 
             </mrow> 
            </mfrac> 
           </mrow> 
          </mtd> 
         </mtr> 
        </mtable> 
       </mrow> 
       <mo>
         ] 
       </mo> 
      </mrow> 
      <mo>
        , 
      </mo> 
      <mtext>
          
      </mtext> 
      <mtext>
          
      </mtext> 
      <mtext>
          
      </mtext> 
      <msub> 
       <mi>
         B 
       </mi> 
       <mi>
         d 
       </mi> 
      </msub> 
      <mo>
        = 
      </mo> 
      <mrow> 
       <mo>
         [ 
       </mo> 
       <mrow> 
        <mtable> 
         <mtr> 
          <mtd> 
           <mrow> 
            <mfrac> 
             <mrow> 
              <msub> 
               <mi>
                 V 
               </mi> 
               <mi>
                 g 
               </mi> 
              </msub> 
             </mrow> 
             <mrow> 
              <mi>
                L 
              </mi> 
              <mi>
                f 
              </mi> 
             </mrow> 
            </mfrac> 
           </mrow> 
          </mtd> 
         </mtr> 
         <mtr> 
          <mtd> 
           <mn>
             0 
           </mn> 
          </mtd> 
         </mtr> 
        </mtable> 
       </mrow> 
       <mo>
         ] 
       </mo> 
      </mrow> 
      <mo>
        , 
      </mo> 
      <mtext>
          
      </mtext> 
      <mtext>
          
      </mtext> 
      <mtext>
          
      </mtext> 
      <mi>
        C 
      </mi> 
      <mo>
        = 
      </mo> 
      <mrow> 
       <mo>
         [ 
       </mo> 
       <mrow> 
        <mtable> 
         <mtr> 
          <mtd> 
           <mn>
             0 
           </mn> 
          </mtd> 
          <mtd> 
           <mn>
             1 
           </mn> 
          </mtd> 
         </mtr> 
        </mtable> 
       </mrow> 
       <mo>
         ] 
       </mo> 
      </mrow> 
      <mo>
        , 
      </mo> 
      <mtext>
          
      </mtext> 
      <mtext>
          
      </mtext> 
      <mtext>
          
      </mtext> 
      <msub> 
       <mi>
         E 
       </mi> 
       <mi>
         d 
       </mi> 
      </msub> 
      <mo>
        = 
      </mo> 
      <mn>
        0 
      </mn> 
     </mrow> 
    </math>(14)</p>
   <p>To apply discrete time control, this continuous time system is discretized using the Matlab c2d function. The resulting discrete time state space model is then transformed into a discrete time transfer function, using the Matlab tf function. The resulting transfer function has the general form:</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mfrac> 
       <mi>
         y 
       </mi> 
       <mi>
         u 
       </mi> 
      </mfrac> 
      <mo>
        = 
      </mo> 
      <mfrac> 
       <mrow> 
        <mi>
          B 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <msup> 
           <mi>
             z 
           </mi> 
           <mrow> 
            <mo>
              − 
            </mo> 
            <mn>
              1 
            </mn> 
           </mrow> 
          </msup> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
       </mrow> 
       <mrow> 
        <mi>
          A 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <msup> 
           <mi>
             z 
           </mi> 
           <mrow> 
            <mo>
              − 
            </mo> 
            <mn>
              1 
            </mn> 
           </mrow> 
          </msup> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
       </mrow> 
      </mfrac> 
      <mo>
        = 
      </mo> 
      <mfrac> 
       <mrow> 
        <msub> 
         <mi>
           b 
         </mi> 
         <mn>
           1 
         </mn> 
        </msub> 
        <msup> 
         <mi>
           z 
         </mi> 
         <mrow> 
          <mo>
            − 
          </mo> 
          <mn>
            1 
          </mn> 
         </mrow> 
        </msup> 
        <mo>
          + 
        </mo> 
        <mo>
          ⋯ 
        </mo> 
        <mo>
          + 
        </mo> 
        <msub> 
         <mi>
           b 
         </mi> 
         <mi>
           m 
         </mi> 
        </msub> 
        <msup> 
         <mi>
           z 
         </mi> 
         <mrow> 
          <mo>
            − 
          </mo> 
          <mi>
            m 
          </mi> 
         </mrow> 
        </msup> 
       </mrow> 
       <mrow> 
        <mn>
          1 
        </mn> 
        <mo>
          + 
        </mo> 
        <msub> 
         <mi>
           a 
         </mi> 
         <mn>
           1 
         </mn> 
        </msub> 
        <msup> 
         <mi>
           z 
         </mi> 
         <mrow> 
          <mo>
            − 
          </mo> 
          <mn>
            1 
          </mn> 
         </mrow> 
        </msup> 
        <mo>
          + 
        </mo> 
        <mo>
          ⋯ 
        </mo> 
        <mo>
          + 
        </mo> 
        <msub> 
         <mi>
           a 
         </mi> 
         <mi>
           n 
         </mi> 
        </msub> 
        <msup> 
         <mi>
           z 
         </mi> 
         <mrow> 
          <mo>
            − 
          </mo> 
          <mi>
            n 
          </mi> 
         </mrow> 
        </msup> 
       </mrow> 
      </mfrac> 
     </mrow> 
    </math>(15)</p>
   <p>This represents the plant (i.e., the converter) as seen in the general block diagram of <xref ref-type="fig" rid="fig2">
     Figure 2
    </xref>.</p>
   <fig id="fig2" position="float">
    <label>Figure 2</label>
    <caption>
     <title>Figure 2. Proportional-Integral-Plus controller block diagram <xref ref-type="bibr" rid="scirp.140199-16">
       [16]
      </xref>.</title>
    </caption>
    <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1771182-rId84.jpeg?20250206085538" />
   </fig>
   <p>The remaining blocks represent the compensation, which has been termed Proportional Integral Plus (PIP) <xref ref-type="bibr" rid="scirp.140199-16">
     [16]
    </xref>. In order to reduce steady state errors, integral control has been introduced. The plant, together with integral control, (which adds an extra state variable, 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       z 
     </mi> 
    </math>), are now represented in a non-minimal state space form. The NMSS state vector is given by:</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mtable columnalign="left"> 
      <mtr> 
       <mtd> 
        <mi>
          x 
        </mi> 
        <msup> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            k 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mtext>
           T 
         </mtext> 
        </msup> 
        <mo>
          = 
        </mo> 
        <mrow> 
         <mo>
           [ 
         </mo> 
         <mrow> 
          <mtable> 
           <mtr> 
            <mtd> 
             <mrow> 
              <mi>
                y 
              </mi> 
              <mrow> 
               <mo>
                 ( 
               </mo> 
               <mi>
                 k 
               </mi> 
               <mo>
                 ) 
               </mo> 
              </mrow> 
             </mrow> 
            </mtd> 
            <mtd> 
             <mrow> 
              <mi>
                y 
              </mi> 
              <mrow> 
               <mo>
                 ( 
               </mo> 
               <mrow> 
                <mi>
                  k 
                </mi> 
                <mo>
                  − 
                </mo> 
                <mn>
                  1 
                </mn> 
               </mrow> 
               <mo>
                 ) 
               </mo> 
              </mrow> 
             </mrow> 
            </mtd> 
            <mtd> 
             <mo>
               ⋯ 
             </mo> 
            </mtd> 
            <mtd> 
             <mrow> 
              <mi>
                y 
              </mi> 
              <mrow> 
               <mo>
                 ( 
               </mo> 
               <mrow> 
                <mi>
                  k 
                </mi> 
                <mo>
                  − 
                </mo> 
                <mi>
                  n 
                </mi> 
                <mo>
                  + 
                </mo> 
                <mn>
                  1 
                </mn> 
               </mrow> 
               <mo>
                 ) 
               </mo> 
              </mrow> 
             </mrow> 
            </mtd> 
            <mtd> 
             <mrow> 
              <mi>
                u 
              </mi> 
              <mrow> 
               <mo>
                 ( 
               </mo> 
               <mrow> 
                <mi>
                  k 
                </mi> 
                <mo>
                  − 
                </mo> 
                <mn>
                  1 
                </mn> 
               </mrow> 
               <mo>
                 ) 
               </mo> 
              </mrow> 
             </mrow> 
            </mtd> 
            <mtd> 
             <mo>
               ⋯ 
             </mo> 
            </mtd> 
           </mtr> 
          </mtable> 
         </mrow> 
        </mrow> 
       </mtd> 
      </mtr> 
      <mtr> 
       <mtd> 
        <mtext>
            
        </mtext> 
        <mtext>
            
        </mtext> 
        <mtext>
            
        </mtext> 
        <mtext>
            
        </mtext> 
        <mtext>
            
        </mtext> 
        <mtext>
            
        </mtext> 
        <mtext>
            
        </mtext> 
        <mtext>
            
        </mtext> 
        <mtext>
            
        </mtext> 
        <mtext>
            
        </mtext> 
        <mtext>
            
        </mtext> 
        <mtext>
            
        </mtext> 
        <mtext>
            
        </mtext> 
        <mtext>
            
        </mtext> 
        <mtext>
            
        </mtext> 
        <mrow> 
         <mrow> 
          <mtable> 
           <mtr> 
            <mtd> 
             <mrow> 
              <mi>
                u 
              </mi> 
              <mrow> 
               <mo>
                 ( 
               </mo> 
               <mrow> 
                <mi>
                  k 
                </mi> 
                <mo>
                  − 
                </mo> 
                <mn>
                  2 
                </mn> 
               </mrow> 
               <mo>
                 ) 
               </mo> 
              </mrow> 
             </mrow> 
            </mtd> 
            <mtd> 
             <mo>
               ⋯ 
             </mo> 
            </mtd> 
            <mtd> 
             <mrow> 
              <mi>
                u 
              </mi> 
              <mrow> 
               <mo>
                 ( 
               </mo> 
               <mrow> 
                <mi>
                  k 
                </mi> 
                <mo>
                  − 
                </mo> 
                <mi>
                  m 
                </mi> 
                <mo>
                  + 
                </mo> 
                <mn>
                  1 
                </mn> 
               </mrow> 
               <mo>
                 ) 
               </mo> 
              </mrow> 
             </mrow> 
            </mtd> 
            <mtd> 
             <mrow> 
              <mi>
                z 
              </mi> 
              <mrow> 
               <mo>
                 ( 
               </mo> 
               <mi>
                 k 
               </mi> 
               <mo>
                 ) 
               </mo> 
              </mrow> 
             </mrow> 
            </mtd> 
           </mtr> 
          </mtable> 
         </mrow> 
         <mo>
           ] 
         </mo> 
        </mrow> 
       </mtd> 
      </mtr> 
     </mtable> 
    </math>(16)</p>
   <p>The dimension of the state vector is 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        n 
      </mi> 
      <mo>
        + 
      </mo> 
      <mi>
        m 
      </mi> 
     </mrow> 
    </math>, i.e., the sum of orders of the denominator and numerator. Recall that a minimal state space representation with an added integrator would have state dimension 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        n 
      </mi> 
      <mo>
        + 
      </mo> 
      <mn>
        1 
      </mn> 
     </mrow> 
    </math>, i.e., the order of the denominator plus one.</p>
   <p>The resulting NMSS state space representation of the plant augmented with an integrator is given by <xref ref-type="bibr" rid="scirp.140199-16">
     [16]
    </xref>:</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        x 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mi>
         k 
       </mi> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        = 
      </mo> 
      <mi>
        F 
      </mi> 
      <mi>
        x 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mi>
          k 
        </mi> 
        <mo>
          − 
        </mo> 
        <mn>
          1 
        </mn> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        + 
      </mo> 
      <mi>
        g 
      </mi> 
      <mi>
        u 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mi>
          k 
        </mi> 
        <mo>
          − 
        </mo> 
        <mn>
          1 
        </mn> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        + 
      </mo> 
      <mi>
        d 
      </mi> 
      <msub> 
       <mi>
         y 
       </mi> 
       <mi>
         d 
       </mi> 
      </msub> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mi>
         k 
       </mi> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math>(17)</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        y 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mi>
         k 
       </mi> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        = 
      </mo> 
      <mi>
        h 
      </mi> 
      <mi>
        x 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mi>
         k 
       </mi> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math>(18)</p>
   <p>where</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        F 
      </mi> 
      <mo>
        = 
      </mo> 
      <mrow> 
       <mo>
         [ 
       </mo> 
       <mrow> 
        <mtable> 
         <mtr> 
          <mtd> 
           <mrow> 
            <mo>
              − 
            </mo> 
            <msub> 
             <mi>
               a 
             </mi> 
             <mn>
               1 
             </mn> 
            </msub> 
           </mrow> 
          </mtd> 
          <mtd> 
           <mo>
             ⋯ 
           </mo> 
          </mtd> 
          <mtd> 
           <mrow> 
            <mo>
              − 
            </mo> 
            <msub> 
             <mi>
               a 
             </mi> 
             <mrow> 
              <mi>
                n 
              </mi> 
              <mo>
                − 
              </mo> 
              <mn>
                1 
              </mn> 
             </mrow> 
            </msub> 
           </mrow> 
          </mtd> 
          <mtd> 
           <mrow> 
            <mo>
              − 
            </mo> 
            <msub> 
             <mi>
               a 
             </mi> 
             <mi>
               n 
             </mi> 
            </msub> 
           </mrow> 
          </mtd> 
          <mtd> 
           <mrow> 
            <msub> 
             <mi>
               b 
             </mi> 
             <mn>
               2 
             </mn> 
            </msub> 
           </mrow> 
          </mtd> 
          <mtd> 
           <mo>
             ⋯ 
           </mo> 
          </mtd> 
          <mtd> 
           <mrow> 
            <msub> 
             <mi>
               b 
             </mi> 
             <mrow> 
              <mi>
                m 
              </mi> 
              <mo>
                − 
              </mo> 
              <mn>
                1 
              </mn> 
             </mrow> 
            </msub> 
           </mrow> 
          </mtd> 
          <mtd> 
           <mrow> 
            <msub> 
             <mi>
               b 
             </mi> 
             <mi>
               m 
             </mi> 
            </msub> 
           </mrow> 
          </mtd> 
          <mtd> 
           <mn>
             0 
           </mn> 
          </mtd> 
         </mtr> 
         <mtr> 
          <mtd> 
           <mn>
             1 
           </mn> 
          </mtd> 
          <mtd> 
           <mo>
             ⋯ 
           </mo> 
          </mtd> 
          <mtd> 
           <mn>
             0 
           </mn> 
          </mtd> 
          <mtd> 
           <mn>
             0 
           </mn> 
          </mtd> 
          <mtd> 
           <mn>
             0 
           </mn> 
          </mtd> 
          <mtd> 
           <mo>
             ⋯ 
           </mo> 
          </mtd> 
          <mtd> 
           <mn>
             0 
           </mn> 
          </mtd> 
          <mtd> 
           <mn>
             0 
           </mn> 
          </mtd> 
          <mtd> 
           <mn>
             0 
           </mn> 
          </mtd> 
         </mtr> 
         <mtr> 
          <mtd> 
           <mo>
             ⋮ 
           </mo> 
          </mtd> 
          <mtd> 
           <mo>
             ⋱ 
           </mo> 
          </mtd> 
          <mtd> 
           <mo>
             ⋮ 
           </mo> 
          </mtd> 
          <mtd> 
           <mo>
             ⋮ 
           </mo> 
          </mtd> 
          <mtd> 
           <mo>
             ⋮ 
           </mo> 
          </mtd> 
          <mtd> 
           <mo>
             ⋱ 
           </mo> 
          </mtd> 
          <mtd> 
           <mo>
             ⋮ 
           </mo> 
          </mtd> 
          <mtd> 
           <mo>
             ⋮ 
           </mo> 
          </mtd> 
          <mtd> 
           <mo>
             ⋮ 
           </mo> 
          </mtd> 
         </mtr> 
         <mtr> 
          <mtd> 
           <mn>
             0 
           </mn> 
          </mtd> 
          <mtd> 
           <mo>
             ⋯ 
           </mo> 
          </mtd> 
          <mtd> 
           <mn>
             1 
           </mn> 
          </mtd> 
          <mtd> 
           <mn>
             0 
           </mn> 
          </mtd> 
          <mtd> 
           <mn>
             0 
           </mn> 
          </mtd> 
          <mtd> 
           <mo>
             ⋯ 
           </mo> 
          </mtd> 
          <mtd> 
           <mn>
             0 
           </mn> 
          </mtd> 
          <mtd> 
           <mn>
             0 
           </mn> 
          </mtd> 
          <mtd> 
           <mn>
             0 
           </mn> 
          </mtd> 
         </mtr> 
         <mtr> 
          <mtd> 
           <mn>
             0 
           </mn> 
          </mtd> 
          <mtd> 
           <mo>
             ⋯ 
           </mo> 
          </mtd> 
          <mtd> 
           <mn>
             0 
           </mn> 
          </mtd> 
          <mtd> 
           <mn>
             0 
           </mn> 
          </mtd> 
          <mtd> 
           <mn>
             0 
           </mn> 
          </mtd> 
          <mtd> 
           <mo>
             ⋯ 
           </mo> 
          </mtd> 
          <mtd> 
           <mn>
             0 
           </mn> 
          </mtd> 
          <mtd> 
           <mn>
             0 
           </mn> 
          </mtd> 
          <mtd> 
           <mn>
             0 
           </mn> 
          </mtd> 
         </mtr> 
         <mtr> 
          <mtd> 
           <mn>
             0 
           </mn> 
          </mtd> 
          <mtd> 
           <mo>
             ⋯ 
           </mo> 
          </mtd> 
          <mtd> 
           <mn>
             0 
           </mn> 
          </mtd> 
          <mtd> 
           <mn>
             0 
           </mn> 
          </mtd> 
          <mtd> 
           <mn>
             1 
           </mn> 
          </mtd> 
          <mtd> 
           <mo>
             ⋯ 
           </mo> 
          </mtd> 
          <mtd> 
           <mn>
             0 
           </mn> 
          </mtd> 
          <mtd> 
           <mn>
             0 
           </mn> 
          </mtd> 
          <mtd> 
           <mn>
             0 
           </mn> 
          </mtd> 
         </mtr> 
         <mtr> 
          <mtd> 
           <mo>
             ⋮ 
           </mo> 
          </mtd> 
          <mtd> 
           <mo>
             ⋱ 
           </mo> 
          </mtd> 
          <mtd> 
           <mo>
             ⋮ 
           </mo> 
          </mtd> 
          <mtd> 
           <mo>
             ⋮ 
           </mo> 
          </mtd> 
          <mtd> 
           <mo>
             ⋮ 
           </mo> 
          </mtd> 
          <mtd> 
           <mo>
             ⋱ 
           </mo> 
          </mtd> 
          <mtd> 
           <mo>
             ⋮ 
           </mo> 
          </mtd> 
          <mtd> 
           <mo>
             ⋮ 
           </mo> 
          </mtd> 
          <mtd> 
           <mo>
             ⋮ 
           </mo> 
          </mtd> 
         </mtr> 
         <mtr> 
          <mtd> 
           <mn>
             0 
           </mn> 
          </mtd> 
          <mtd> 
           <mo>
             ⋯ 
           </mo> 
          </mtd> 
          <mtd> 
           <mn>
             0 
           </mn> 
          </mtd> 
          <mtd> 
           <mn>
             0 
           </mn> 
          </mtd> 
          <mtd> 
           <mn>
             0 
           </mn> 
          </mtd> 
          <mtd> 
           <mo>
             ⋯ 
           </mo> 
          </mtd> 
          <mtd> 
           <mn>
             1 
           </mn> 
          </mtd> 
          <mtd> 
           <mn>
             0 
           </mn> 
          </mtd> 
          <mtd> 
           <mn>
             0 
           </mn> 
          </mtd> 
         </mtr> 
         <mtr> 
          <mtd> 
           <mrow> 
            <msub> 
             <mi>
               a 
             </mi> 
             <mn>
               1 
             </mn> 
            </msub> 
           </mrow> 
          </mtd> 
          <mtd> 
           <mo>
             ⋯ 
           </mo> 
          </mtd> 
          <mtd> 
           <mrow> 
            <msub> 
             <mi>
               a 
             </mi> 
             <mrow> 
              <mi>
                n 
              </mi> 
              <mo>
                − 
              </mo> 
              <mn>
                1 
              </mn> 
             </mrow> 
            </msub> 
           </mrow> 
          </mtd> 
          <mtd> 
           <mrow> 
            <msub> 
             <mi>
               a 
             </mi> 
             <mi>
               n 
             </mi> 
            </msub> 
           </mrow> 
          </mtd> 
          <mtd> 
           <mrow> 
            <mo>
              − 
            </mo> 
            <msub> 
             <mi>
               b 
             </mi> 
             <mn>
               2 
             </mn> 
            </msub> 
           </mrow> 
          </mtd> 
          <mtd> 
           <mo>
             ⋯ 
           </mo> 
          </mtd> 
          <mtd> 
           <mrow> 
            <mo>
              − 
            </mo> 
            <msub> 
             <mi>
               b 
             </mi> 
             <mrow> 
              <mi>
                m 
              </mi> 
              <mo>
                − 
              </mo> 
              <mn>
                1 
              </mn> 
             </mrow> 
            </msub> 
           </mrow> 
          </mtd> 
          <mtd> 
           <mrow> 
            <mo>
              − 
            </mo> 
            <msub> 
             <mi>
               b 
             </mi> 
             <mi>
               m 
             </mi> 
            </msub> 
           </mrow> 
          </mtd> 
          <mtd> 
           <mn>
             1 
           </mn> 
          </mtd> 
         </mtr> 
        </mtable> 
       </mrow> 
       <mo>
         ] 
       </mo> 
      </mrow> 
     </mrow> 
    </math></p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        g 
      </mi> 
      <mo>
        = 
      </mo> 
      <msup> 
       <mrow> 
        <mrow> 
         <mo>
           [ 
         </mo> 
         <mrow> 
          <mtable columnalign="left"> 
           <mtr columnalign="left"> 
            <mtd columnalign="left"> 
             <mrow> 
              <msub> 
               <mi>
                 b 
               </mi> 
               <mn>
                 1 
               </mn> 
              </msub> 
             </mrow> 
            </mtd> 
            <mtd columnalign="left"> 
             <mn>
               0 
             </mn> 
            </mtd> 
            <mtd columnalign="left"> 
             <mo>
               ⋯ 
             </mo> 
            </mtd> 
            <mtd columnalign="left"> 
             <mn>
               0 
             </mn> 
            </mtd> 
            <mtd columnalign="left"> 
             <mn>
               1 
             </mn> 
            </mtd> 
            <mtd columnalign="left"> 
             <mn>
               0 
             </mn> 
            </mtd> 
            <mtd columnalign="left"> 
             <mo>
               ⋯ 
             </mo> 
            </mtd> 
            <mtd columnalign="left"> 
             <mn>
               0 
             </mn> 
            </mtd> 
            <mtd columnalign="left"> 
             <mrow> 
              <mo>
                − 
              </mo> 
              <msub> 
               <mi>
                 b 
               </mi> 
               <mn>
                 1 
               </mn> 
              </msub> 
             </mrow> 
            </mtd> 
           </mtr> 
          </mtable> 
         </mrow> 
         <mo>
           ] 
         </mo> 
        </mrow> 
       </mrow> 
       <mtext>
         T 
       </mtext> 
      </msup> 
     </mrow> 
    </math></p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        d 
      </mi> 
      <mo>
        = 
      </mo> 
      <msup> 
       <mrow> 
        <mrow> 
         <mo>
           [ 
         </mo> 
         <mrow> 
          <mtable columnalign="left"> 
           <mtr columnalign="left"> 
            <mtd columnalign="left"> 
             <mn>
               0 
             </mn> 
            </mtd> 
            <mtd columnalign="left"> 
             <mn>
               0 
             </mn> 
            </mtd> 
            <mtd columnalign="left"> 
             <mo>
               ⋯ 
             </mo> 
            </mtd> 
            <mtd columnalign="left"> 
             <mn>
               0 
             </mn> 
            </mtd> 
            <mtd columnalign="left"> 
             <mn>
               0 
             </mn> 
            </mtd> 
            <mtd columnalign="left"> 
             <mn>
               0 
             </mn> 
            </mtd> 
            <mtd columnalign="left"> 
             <mo>
               ⋯ 
             </mo> 
            </mtd> 
            <mtd columnalign="left"> 
             <mn>
               0 
             </mn> 
            </mtd> 
            <mtd columnalign="left"> 
             <mn>
               1 
             </mn> 
            </mtd> 
           </mtr> 
          </mtable> 
         </mrow> 
         <mo>
           ] 
         </mo> 
        </mrow> 
       </mrow> 
       <mtext>
         T 
       </mtext> 
      </msup> 
     </mrow> 
    </math></p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        h 
      </mi> 
      <mo>
        = 
      </mo> 
      <mrow> 
       <mo>
         [ 
       </mo> 
       <mrow> 
        <mtable columnalign="left"> 
         <mtr columnalign="left"> 
          <mtd columnalign="left"> 
           <mn>
             1 
           </mn> 
          </mtd> 
          <mtd columnalign="left"> 
           <mn>
             0 
           </mn> 
          </mtd> 
          <mtd columnalign="left"> 
           <mo>
             ⋯ 
           </mo> 
          </mtd> 
          <mtd columnalign="left"> 
           <mn>
             0 
           </mn> 
          </mtd> 
          <mtd columnalign="left"> 
           <mn>
             0 
           </mn> 
          </mtd> 
          <mtd columnalign="left"> 
           <mn>
             0 
           </mn> 
          </mtd> 
          <mtd columnalign="left"> 
           <mo>
             ⋯ 
           </mo> 
          </mtd> 
          <mtd columnalign="left"> 
           <mn>
             0 
           </mn> 
          </mtd> 
          <mtd columnalign="left"> 
           <mn>
             0 
           </mn> 
          </mtd> 
         </mtr> 
        </mtable> 
       </mrow> 
       <mo>
         ] 
       </mo> 
      </mrow> 
     </mrow> 
    </math></p>
  </sec><sec id="s3">
   <title>3. Optimal Controller Design</title>
   <p>In this section, an optimal proportional-integral-plus (PIP) controller will be designed. The optimal PIP control presented relies on the aforementioned (NMSS) representation. As will be seen, the design process is relatively simple and very effective. The control law takes the form <xref ref-type="bibr" rid="scirp.140199-16">
     [16]
    </xref> of full state feedback:</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        u 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mi>
         k 
       </mi> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        = 
      </mo> 
      <mo>
        − 
      </mo> 
      <msup> 
       <mi>
         k 
       </mi> 
       <mtext>
         T 
       </mtext> 
      </msup> 
      <mi>
        x 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mi>
         k 
       </mi> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math>(19)</p>
   <p>where</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msup> 
       <mi>
         k 
       </mi> 
       <mtext>
         T 
       </mtext> 
      </msup> 
      <mo>
        = 
      </mo> 
      <mrow> 
       <mo>
         [ 
       </mo> 
       <mrow> 
        <mtable columnalign="left"> 
         <mtr columnalign="left"> 
          <mtd columnalign="left"> 
           <mrow> 
            <msub> 
             <mi>
               f 
             </mi> 
             <mn>
               0 
             </mn> 
            </msub> 
           </mrow> 
          </mtd> 
          <mtd columnalign="left"> 
           <mrow> 
            <msub> 
             <mi>
               f 
             </mi> 
             <mn>
               1 
             </mn> 
            </msub> 
           </mrow> 
          </mtd> 
          <mtd columnalign="left"> 
           <mo>
             ⋯ 
           </mo> 
          </mtd> 
          <mtd columnalign="left"> 
           <mrow> 
            <msub> 
             <mi>
               f 
             </mi> 
             <mrow> 
              <mi>
                n 
              </mi> 
              <mo>
                − 
              </mo> 
              <mn>
                1 
              </mn> 
             </mrow> 
            </msub> 
           </mrow> 
          </mtd> 
          <mtd columnalign="left"> 
           <mrow> 
            <msub> 
             <mi>
               g 
             </mi> 
             <mn>
               1 
             </mn> 
            </msub> 
           </mrow> 
          </mtd> 
          <mtd columnalign="left"> 
           <mo>
             ⋯ 
           </mo> 
          </mtd> 
          <mtd columnalign="left"> 
           <mrow> 
            <msub> 
             <mi>
               g 
             </mi> 
             <mrow> 
              <mi>
                m 
              </mi> 
              <mo>
                − 
              </mo> 
              <mn>
                1 
              </mn> 
             </mrow> 
            </msub> 
           </mrow> 
          </mtd> 
          <mtd columnalign="left"> 
           <mrow> 
            <mo>
              − 
            </mo> 
            <msub> 
             <mi>
               k 
             </mi> 
             <mi>
               I 
             </mi> 
            </msub> 
           </mrow> 
          </mtd> 
         </mtr> 
        </mtable> 
       </mrow> 
       <mo>
         ] 
       </mo> 
      </mrow> 
     </mrow> 
    </math>(20)</p>
   <p>and 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        x 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mi>
         k 
       </mi> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math> is given by (16).</p>
   <p>The goal of optimal design is to minimize a quadratic cost function subject to the constraints of the system state equations. The cost function is given by <xref ref-type="bibr" rid="scirp.140199-16">
     [16]
    </xref>:</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        J 
      </mi> 
      <mo>
        = 
      </mo> 
      <munderover> 
       <mstyle mathsize="140%" displaystyle="true"> 
        <mo>
          ∑ 
        </mo> 
       </mstyle> 
       <mrow> 
        <mi>
          k 
        </mi> 
        <mo>
          = 
        </mo> 
        <mn>
          0 
        </mn> 
       </mrow> 
       <mi>
         ∞ 
       </mi> 
      </munderover> 
      <mtext>
          
      </mtext> 
      <mi>
        x 
      </mi> 
      <msup> 
       <mrow> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mi>
           k 
         </mi> 
         <mo>
           ) 
         </mo> 
        </mrow> 
       </mrow> 
       <mtext>
         T 
       </mtext> 
      </msup> 
      <mi>
        Q 
      </mi> 
      <mi>
        x 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mi>
         k 
       </mi> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        + 
      </mo> 
      <mi>
        r 
      </mi> 
      <msup> 
       <mrow> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mi>
            u 
          </mi> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mi>
             k 
           </mi> 
           <mo>
             ) 
           </mo> 
          </mrow> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
       </mrow> 
       <mn>
         2 
       </mn> 
      </msup> 
     </mrow> 
    </math></p>
   <p>where 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        x 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mi>
         k 
       </mi> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math> is the non-minimum state vector, 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        u 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mi>
         k 
       </mi> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math> is the control input, 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       Q 
     </mi> 
    </math> is the positive definite weighting matrix, and 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       r 
     </mi> 
    </math> is the positive weighting scalar. We define the matrix 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       Q 
     </mi> 
    </math> as the following diagonal matrix:</p>
   <p>
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mtable> 
      <mtr> 
       <mtd> 
        <mi>
          Q 
        </mi> 
        <mo>
          = 
        </mo> 
        <mtext>
          diag 
        </mtext> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mtable> 
           <mtr> 
            <mtd> 
             <mrow> 
              <msub> 
               <mi>
                 q 
               </mi> 
               <mn>
                 1 
               </mn> 
              </msub> 
             </mrow> 
            </mtd> 
            <mtd> 
             <mrow> 
              <msub> 
               <mi>
                 q 
               </mi> 
               <mn>
                 2 
               </mn> 
              </msub> 
             </mrow> 
            </mtd> 
            <mtd> 
             <mo>
               ⋯ 
             </mo> 
            </mtd> 
            <mtd> 
             <mrow> 
              <msub> 
               <mi>
                 q 
               </mi> 
               <mi>
                 n 
               </mi> 
              </msub> 
             </mrow> 
            </mtd> 
            <mtd> 
             <mrow> 
              <msub> 
               <mi>
                 q 
               </mi> 
               <mrow> 
                <mi>
                  n 
                </mi> 
                <mo>
                  + 
                </mo> 
                <mn>
                  1 
                </mn> 
               </mrow> 
              </msub> 
             </mrow> 
            </mtd> 
            <mtd> 
             <mo>
               ⋯ 
             </mo> 
            </mtd> 
            <mtd> 
             <mrow> 
              <msub> 
               <mi>
                 q 
               </mi> 
               <mrow> 
                <mi>
                  n 
                </mi> 
                <mo>
                  + 
                </mo> 
                <mi>
                  m 
                </mi> 
                <mo>
                  − 
                </mo> 
                <mn>
                  1 
                </mn> 
               </mrow> 
              </msub> 
             </mrow> 
            </mtd> 
            <mtd> 
             <mrow> 
              <msub> 
               <mi>
                 q 
               </mi> 
               <mrow> 
                <mi>
                  n 
                </mi> 
                <mo>
                  + 
                </mo> 
                <mi>
                  m 
                </mi> 
               </mrow> 
              </msub> 
             </mrow> 
            </mtd> 
           </mtr> 
          </mtable> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
       </mtd> 
      </mtr> 
      <mtr> 
       <mtd> 
        <mo>
          = 
        </mo> 
        <mtext>
          diag 
        </mtext> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mtable> 
           <mtr> 
            <mtd> 
             <mrow> 
              <msub> 
               <mi>
                 q 
               </mi> 
               <mi>
                 y 
               </mi> 
              </msub> 
             </mrow> 
            </mtd> 
            <mtd> 
             <mrow> 
              <msub> 
               <mi>
                 q 
               </mi> 
               <mi>
                 y 
               </mi> 
              </msub> 
             </mrow> 
            </mtd> 
            <mtd> 
             <mo>
               ⋯ 
             </mo> 
            </mtd> 
            <mtd> 
             <mrow> 
              <msub> 
               <mi>
                 q 
               </mi> 
               <mi>
                 y 
               </mi> 
              </msub> 
             </mrow> 
            </mtd> 
            <mtd> 
             <mrow> 
              <msub> 
               <mi>
                 q 
               </mi> 
               <mi>
                 u 
               </mi> 
              </msub> 
             </mrow> 
            </mtd> 
            <mtd> 
             <mo>
               ⋯ 
             </mo> 
            </mtd> 
            <mtd> 
             <mrow> 
              <msub> 
               <mi>
                 q 
               </mi> 
               <mi>
                 u 
               </mi> 
              </msub> 
             </mrow> 
            </mtd> 
            <mtd> 
             <mrow> 
              <msub> 
               <mi>
                 q 
               </mi> 
               <mi>
                 e 
               </mi> 
              </msub> 
             </mrow> 
            </mtd> 
           </mtr> 
          </mtable> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
       </mtd> 
      </mtr> 
     </mtable> 
    </math></p>
   <p>In addition, the positive weighting scalar 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       r 
     </mi> 
    </math> will be set equal to 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         q 
       </mi> 
       <mi>
         u 
       </mi> 
      </msub> 
     </mrow> 
    </math> (<xref ref-type="bibr" rid="scirp.140199-16">
     [16]
    </xref>, p. 111), which is defined next. By defining the following equations only three tuning parameters will be left to configure:</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         q 
       </mi> 
       <mi>
         y 
       </mi> 
      </msub> 
      <mo>
        = 
      </mo> 
      <mfrac> 
       <mrow> 
        <msub> 
         <mi>
           W 
         </mi> 
         <mi>
           y 
         </mi> 
        </msub> 
       </mrow> 
       <mi>
         n 
       </mi> 
      </mfrac> 
      <mo>
        ; 
      </mo> 
      <mtext>
          
      </mtext> 
      <mtext>
          
      </mtext> 
      <mtext>
          
      </mtext> 
      <msub> 
       <mi>
         q 
       </mi> 
       <mi>
         u 
       </mi> 
      </msub> 
      <mo>
        = 
      </mo> 
      <mfrac> 
       <mrow> 
        <msub> 
         <mi>
           W 
         </mi> 
         <mi>
           u 
         </mi> 
        </msub> 
       </mrow> 
       <mi>
         m 
       </mi> 
      </mfrac> 
      <mo>
        ; 
      </mo> 
      <mtext>
          
      </mtext> 
      <mtext>
          
      </mtext> 
      <mtext>
          
      </mtext> 
      <msub> 
       <mi>
         q 
       </mi> 
       <mi>
         e 
       </mi> 
      </msub> 
      <mo>
        = 
      </mo> 
      <msub> 
       <mi>
         W 
       </mi> 
       <mi>
         e 
       </mi> 
      </msub> 
     </mrow> 
    </math></p>
   <p>For many practical cases the three tuning variables ( 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         W 
       </mi> 
       <mi>
         y 
       </mi> 
      </msub> 
     </mrow> 
    </math>, 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         W 
       </mi> 
       <mi>
         u 
       </mi> 
      </msub> 
     </mrow> 
    </math>, 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         W 
       </mi> 
       <mi>
         e 
       </mi> 
      </msub> 
     </mrow> 
    </math>) can be simply set to unity. It is necessary to use an Algebraic Riccati Equation to extract the corresponding optimal controller gains. The method proposed by <xref ref-type="bibr" rid="scirp.140199-16">
     [16]
    </xref> calls for solving the following equations recursively:</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msup> 
       <mi>
         k 
       </mi> 
       <mtext>
         T 
       </mtext> 
      </msup> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mi>
         i 
       </mi> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        = 
      </mo> 
      <msup> 
       <mrow> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mi>
            r 
          </mi> 
          <mo>
            + 
          </mo> 
          <msup> 
           <mi>
             g 
           </mi> 
           <mtext>
             T 
           </mtext> 
          </msup> 
          <mi>
            P 
          </mi> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mrow> 
            <mi>
              i 
            </mi> 
            <mo>
              + 
            </mo> 
            <mn>
              1 
            </mn> 
           </mrow> 
           <mo>
             ) 
           </mo> 
          </mrow> 
          <mi>
            g 
          </mi> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
       </mrow> 
       <mrow> 
        <mo>
          − 
        </mo> 
        <mn>
          1 
        </mn> 
       </mrow> 
      </msup> 
      <msup> 
       <mi>
         g 
       </mi> 
       <mtext>
         T 
       </mtext> 
      </msup> 
      <mi>
        P 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mi>
          i 
        </mi> 
        <mo>
          + 
        </mo> 
        <mn>
          1 
        </mn> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mi>
        F 
      </mi> 
     </mrow> 
    </math></p>
   <p>where</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        P 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mi>
         i 
       </mi> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        = 
      </mo> 
      <mi>
        Q 
      </mi> 
      <mo>
        + 
      </mo> 
      <msup> 
       <mi>
         F 
       </mi> 
       <mtext>
         T 
       </mtext> 
      </msup> 
      <mi>
        P 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mi>
          i 
        </mi> 
        <mo>
          + 
        </mo> 
        <mn>
          1 
        </mn> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mi>
        F 
      </mi> 
      <mo>
        − 
      </mo> 
      <msup> 
       <mi>
         F 
       </mi> 
       <mtext>
         T 
       </mtext> 
      </msup> 
      <mi>
        P 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mi>
          i 
        </mi> 
        <mo>
          + 
        </mo> 
        <mn>
          1 
        </mn> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mi>
        g 
      </mi> 
      <msup> 
       <mi>
         k 
       </mi> 
       <mtext>
         T 
       </mtext> 
      </msup> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mi>
         i 
       </mi> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math></p>
   <p>and</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        P 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mi>
         N 
       </mi> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        = 
      </mo> 
      <mn>
        0 
      </mn> 
      <mo>
        , 
      </mo> 
      <mtext>
          
      </mtext> 
      <mtext>
          
      </mtext> 
      <mtext>
          
      </mtext> 
      <mi>
        k 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mi>
         N 
       </mi> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        = 
      </mo> 
      <mn>
        0 
      </mn> 
     </mrow> 
    </math></p>
   <p>Implementing the recursive equations in MATLAB can be done as shown in <xref ref-type="fig" rid="fig3">
     Figure 3
    </xref>.</p>
   <fig id="fig3" position="float">
    <label>Figure 3</label>
    <caption>
     <title>Figure 3. MATLAB script to solve for optimal controller gains.</title>
    </caption>
    <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1771182-rId142.jpeg?20250206085538" />
   </fig>
   <p>For the Buck converter, with parameters, 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         C 
       </mi> 
       <mi>
         f 
       </mi> 
      </msub> 
      <mo>
        = 
      </mo> 
      <mn>
        100 
      </mn> 
     </mrow> 
    </math> μF, 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         L 
       </mi> 
       <mi>
         f 
       </mi> 
      </msub> 
      <mo>
        = 
      </mo> 
      <mn>
        300 
      </mn> 
     </mrow> 
    </math> μH, 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        R 
      </mi> 
      <mo>
        = 
      </mo> 
      <mn>
        10 
      </mn> 
     </mrow> 
    </math> Ω, as used in the constructed prototype discussed in the next section, the optimal controller gains lead to the following results:</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        F 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <msup> 
         <mi>
           z 
         </mi> 
         <mrow> 
          <mo>
            − 
          </mo> 
          <mn>
            1 
          </mn> 
         </mrow> 
        </msup> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        = 
      </mo> 
      <mn>
        22 
      </mn> 
      <mo>
        − 
      </mo> 
      <mn>
        17.3 
      </mn> 
      <msup> 
       <mi>
         z 
       </mi> 
       <mrow> 
        <mo>
          − 
        </mo> 
        <mn>
          1 
        </mn> 
       </mrow> 
      </msup> 
     </mrow> 
    </math></p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        G 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <msup> 
         <mi>
           z 
         </mi> 
         <mrow> 
          <mo>
            − 
          </mo> 
          <mn>
            1 
          </mn> 
         </mrow> 
        </msup> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        = 
      </mo> 
      <mn>
        1 
      </mn> 
      <mo>
        + 
      </mo> 
      <mn>
        0.263 
      </mn> 
      <msup> 
       <mi>
         z 
       </mi> 
       <mrow> 
        <mo>
          − 
        </mo> 
        <mn>
          1 
        </mn> 
       </mrow> 
      </msup> 
     </mrow> 
    </math></p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         k 
       </mi> 
       <mi>
         I 
       </mi> 
      </msub> 
      <mo>
        = 
      </mo> 
      <mn>
        0.736 
      </mn> 
     </mrow> 
    </math></p>
   <p>A straightforward block diagram reduction of the system shown in <xref ref-type="fig" rid="fig2">
     Figure 2
    </xref> leads to that shown in <xref ref-type="fig" rid="fig4">
     Figure 4
    </xref>. We see that the equivalent compensator transfer function 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         G 
       </mi> 
       <mi>
         c 
       </mi> 
      </msub> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <msup> 
         <mi>
           z 
         </mi> 
         <mrow> 
          <mo>
            − 
          </mo> 
          <mn>
            1 
          </mn> 
         </mrow> 
        </msup> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math> is given by:</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         G 
       </mi> 
       <mi>
         c 
       </mi> 
      </msub> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <msup> 
         <mi>
           z 
         </mi> 
         <mrow> 
          <mo>
            − 
          </mo> 
          <mn>
            1 
          </mn> 
         </mrow> 
        </msup> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        = 
      </mo> 
      <mfrac> 
       <mrow> 
        <msub> 
         <mi>
           k 
         </mi> 
         <mi>
           I 
         </mi> 
        </msub> 
        <mi>
          A 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <msup> 
           <mi>
             z 
           </mi> 
           <mrow> 
            <mo>
              − 
            </mo> 
            <mn>
              1 
            </mn> 
           </mrow> 
          </msup> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
       </mrow> 
       <mrow> 
        <mrow> 
         <mo>
           [ 
         </mo> 
         <mrow> 
          <mi>
            G 
          </mi> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mrow> 
            <msup> 
             <mi>
               z 
             </mi> 
             <mrow> 
              <mo>
                − 
              </mo> 
              <mn>
                1 
              </mn> 
             </mrow> 
            </msup> 
           </mrow> 
           <mo>
             ) 
           </mo> 
          </mrow> 
          <mi>
            A 
          </mi> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mrow> 
            <msup> 
             <mi>
               z 
             </mi> 
             <mrow> 
              <mo>
                − 
              </mo> 
              <mn>
                1 
              </mn> 
             </mrow> 
            </msup> 
           </mrow> 
           <mo>
             ) 
           </mo> 
          </mrow> 
          <mo>
            + 
          </mo> 
          <mi>
            F 
          </mi> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mrow> 
            <msup> 
             <mi>
               z 
             </mi> 
             <mrow> 
              <mo>
                − 
              </mo> 
              <mn>
                1 
              </mn> 
             </mrow> 
            </msup> 
           </mrow> 
           <mo>
             ) 
           </mo> 
          </mrow> 
          <mi>
            B 
          </mi> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mrow> 
            <msup> 
             <mi>
               z 
             </mi> 
             <mrow> 
              <mo>
                − 
              </mo> 
              <mn>
                1 
              </mn> 
             </mrow> 
            </msup> 
           </mrow> 
           <mo>
             ) 
           </mo> 
          </mrow> 
         </mrow> 
         <mo>
           ] 
         </mo> 
        </mrow> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mn>
            1 
          </mn> 
          <mo>
            − 
          </mo> 
          <msup> 
           <mi>
             z 
           </mi> 
           <mrow> 
            <mo>
              − 
            </mo> 
            <mn>
              1 
            </mn> 
           </mrow> 
          </msup> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
       </mrow> 
      </mfrac> 
     </mrow> 
    </math>(21)</p>
   <fig id="fig4" position="float">
    <label>Figure 4</label>
    <caption>
     <title>Figure 4. Equivalent system block diagram explicitly showing the compensator and plant combination.</title>
    </caption>
    <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1771182-rId159.jpeg?20250206085538" />
   </fig>
   <p>The product of the compensator transfer function with that of the plant, gives the loop gain of the system. The frequency response of the loop gain is shown in <xref ref-type="fig" rid="fig5">
     Figure 5
    </xref>, which verifies the good stability margins.</p>
   <fig id="fig5" position="float">
    <label>Figure 5</label>
    <caption>
     <title>Figure 5. Bode plot of loop gain, showing a 61˚ phase margin.</title>
    </caption>
    <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1771182-rId160.jpeg?20250206085538" />
   </fig>
  </sec><sec id="s4">
   <title>4. Controller Hardware Overview</title>
   <p>A digital microcontroller, specifically the C2000 development kit for the Texas Instruments F28069M microcontroller, was used to implement the PIP controller in hardware. An overall block diagram of the system is shown in <xref ref-type="fig" rid="fig6">
     Figure 6
    </xref>. The important controller modules for the implementation are the pulse width modulator (PWM) and analog to digital converter (ADC). Not explicitly shown is the general purpose input/output (GPIO) which assigns IO pins to the internal modules. The converter requires a PWM signal, which is directly available from the microcontroller.</p>
   <fig id="fig6" position="float">
    <label>Figure 6</label>
    <caption>
     <title>Figure 6. Block diagram of the closed loop system, showing the interconnection of the microcontroller unit (MCU) and the plant (i.e. the Buck converter and output voltage resistive divider).</title>
    </caption>
    <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1771182-rId161.jpeg?20250206085538" />
   </fig>
   <fig id="fig7" position="float">
    <label>Figure 7</label>
    <caption>
     <title>Figure 7. Buck converter schematic.</title>
    </caption>
    <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1771182-rId162.jpeg?20250206085538" />
   </fig>
   <p>The PWM outputs a high voltage of 3.3 V or a low voltage of 0 V with a variable duty ratio. The ADC uses a resistor capacitor circuit to sample and hold a voltage (<xref ref-type="bibr" rid="scirp.140199-18">
     [18]
    </xref>, pp. 520-525). The output voltage of the plant is scaled down to the ADC’s input range of 0 to 3.3 V with a resistive voltage divider, as seen in the Buck converter (the plant) schematic in <xref ref-type="fig" rid="fig7">
     Figure 7
    </xref>. The ADC then converts that value to a digital number that can be read from a register in memory. The controller program then scales that value appropriately to get a precise and accurate reading of the output voltage. If a GPIO pin is in output mode, the voltage can be set to either 3.3 V or 0 V. In input mode, the voltage on the GPIO pin can be routed to an internal module, such as the ADC. The GPIO module can be configured to specify the pins to which the ADC and PWM have access.</p>
   <p>The PWM works by using an internal counter, a period register and a counter compare register (<xref ref-type="bibr" rid="scirp.140199-18">
     [18]
    </xref>, p. 244). The counter increments at each pulse of the system clock. When the counter is zero, the PWM asserts a digital output pin, i.e., sets the output pin to logical true of 3.3 V. When the counter equals the value in the PWM’s counter compare register, the PWM deasserts the same pin, i.e., sets the output pin to a logical false of 0 V. When the counter equals the value in the PWM’s period register, the counter resets to zero. The PWM also has a synchronization bit that, when written to, will reset the counter to zero. This is the most basic operation of the PWM module. There are more sophisticated counting options to synchronize with external or internal signals and ways to change the behavior of what is done at different points in the count. The basic mode of operation is sufficient for the PIP controller.</p>
   <p>The PIP program controls the output by setting the counter compare register to a value that will produce the desired duty cycle. The new counter compare value is written to a shadow register which serves as a temporary holding place for the active register (<xref ref-type="bibr" rid="scirp.140199-18">
     [18]
    </xref>, p. 244). Then, a software PWM resync is performed to load the new counter compare value from the shadow register and reset the counter to zero. There may be risks that this will result in inconsistent PWM periods. However, the processing should be precisely scheduled to ensure that this operation is done at a 100 kHz frequency, which is the switching frequency of the Buck converter. This requirement for the constant switching frequency was confirmed by measurement with the oscilloscope that showed that the PWM period was always 10 μs.</p>
   <p>As previously mentioned, the ADC uses a resistor capacitor circuit to sample and hold a voltage it receives on a designated input pin. The ADC hardware then uses a set of comparators to convert that value to a digital number that can be read from a register in memory.</p>
   <p>There are different modes of operation to control the timing of the ADC operation. For the purpose of this PIP program the ADC operates in non-continuous mode. This means a start of conversion (SOC) signal must be sent to the ADC to initiate a read of the voltage on the input pin. An adequate sample and hold time must be set such that the ADC charges its capacitor sufficiently (<xref ref-type="bibr" rid="scirp.140199-18">
     [18]
    </xref>, p. 521). Once the timer indicates the sample and hold period is over, the ADC produces a digital read of the voltage. This value is in terms of “ticks.” The F28069M controller has a 12-bit ADC register, therefore 0 ticks correspond to 0 V and 4095 ( 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mo>
        = 
      </mo> 
      <msup> 
       <mn>
         2 
       </mn> 
       <mrow> 
        <mn>
          12 
        </mn> 
       </mrow> 
      </msup> 
      <mo>
        − 
      </mo> 
      <mn>
        1 
      </mn> 
     </mrow> 
    </math>) ticks corresponds to 3.3 V. After the ADC finishes the read, it will update its register with a new value and produce an end of conversion (EOC) signal. This EOC signal is useful for minimizing delay between receiving a new digital input and processing it.</p>
  </sec><sec id="s5">
   <title>5. Program Architecture</title>
   <p>The PIP program, seen as the control law in <xref ref-type="fig" rid="fig6">
     Figure 6
    </xref>, collects input from the ADC and produces output with the PWM. A common software element, the Interrupt Service Routine (ISR), is introduced to ensure that the control law is executed periodically at a frequency of 100 kHz.</p>
   <p>The architecture of the PIP program relies upon the ISR. This is for two reasons. The first is that the ISR can trigger the ADC’s EOC signal. This will help ensure minimum delay between sampling the input and executing the difference equation, and ultimately producing a PWM output. The second is that the SOC is routed to a timer such that the ISR runs at the sampling frequency. This will ensure that the coefficients in the PIP’s difference equation will be valid for the sample period for which they were derived.</p>
   <p>Therefore, the program can be split into two main components, the main function and the ISR function. These two main components are discussed in the next two subsections.</p>
   <sec id="s5_1">
    <title>5.1. Main Function</title>
    <p>The purpose of the main function is to initialize the PIP program. This entails configuring the hardware modules previously described and mapping the ISR to the appropriate signal. The PIP program also includes libraries supplied by the F28069M software development kit. These libraries provide functions to configure clocks, phase locked loops and the default General Purpose Input Output (GPIO) pin map. Calling these functions first is a necessity for our program.</p>
    <p>The main function also handles controller configuration specific to the PIP program. The first task is to configure the Peripheral Interrupt Expansion (PIE) (<xref ref-type="bibr" rid="scirp.140199-18">
      [18]
     </xref>, p. 166). The PIE module routes external events to the processor. When an event is seen by the processor, it will switch from executing instructions from the main function to executing a function as mapped. Therefore, a function pointer for the PIP program’s ISR is written in the PIE’s table for ADC interrupt 1 so that when an ADC interrupt 1 occurs, the ISR function is called. ADC interrupt 1 will be configured as part of the ADC. After this configuration, the interrupt is enabled.</p>
    <p>The ADC for the PIP program must also be initialized, calibrated and configured. Initialization and calibration are performed by calls to functions in the development kit libraries. The PIP program configures the ADC to operate in non-continuous mode. The PIP program selects EPWM 1 as the source for the SOC. The SOC event selection register is set to 4, which on the F28069M corresponds to the EPWM 1 counter compare equal signal. EPWM 1 is used to control the ADC. However, an internal CPU timer could also be used. The sample and hold window is set to 6 clock cycles which is the lowest value allowed. The input channel is set to ADCINA4 which is GPIO pin 69 on the development kit. The ADC control’s interrupt pulse generation register is set to 1. On the F28069M this configuration means that the PIE’s ADC interrupt will be triggered by the EOC signal.</p>
    <p>After configuring the ADC and PIE as specific to the PIP program, main configures the PWM modules. Using the InitEPwmGpio function provided by the library, the GPIO mux is configured to route PWM signals to the GPIO. This way, the PWM can be attached to external hardware and viewed on an oscilloscope. Both PWM 1 and 2 are set to a period of 0x1c4 clock cycles which corresponds to 10 μs. This was validated on the oscilloscope. Both PWM modules are configured using the simple count-up mode described previously. This ends the configuration procedure.</p>
    <fig id="fig8" position="float">
     <label>Figure 8</label>
     <caption>
      <title>Figure 8. Timing sequence of ADC to PWM signal.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1771182-rId165.jpeg?20250206085540" />
    </fig>
    <p>After enabling all interrupts, the main function will continuously perform a “NO-OP” inside a while loop. Given this configuration, <xref ref-type="fig" rid="fig8">
      Figure 8
     </xref> illustrates the timing sequence between the components. First, the timer (PWM 1 in this program) triggers the ADC, which triggers the ISR, which then triggers the PWM 2. We observed an execution time of approximately 1 μs from the SOC to the start of PWM 2’s period with the new duty cycle.</p>
   </sec>
   <sec id="s5_2">
    <title>5.2. ISR Function</title>
    <p>As previously mentioned, the PIP program contains an ISR that executes the difference equation. The ISR was mapped to launch each time an EOC signal is raised. The ISR will then read the value of the ADC register. It will scale this value twice. First to convert from an unsigned integer value in ticks to a floating-point value of Volts. After that, it will perform another scaling operation to counteract the voltage divider. This final scaled value is the value of 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         y 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          k 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> in the PIP controller from <xref ref-type="fig" rid="fig9">
      Figure 9
     </xref>. The topology of the ISR is presented in the following figure and described below.</p>
    <fig id="fig9" position="float">
     <label>Figure 9</label>
     <caption>
      <title>Figure 9. Layout of ISR function.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1771182-rId168.jpeg?20250206085540" />
    </fig>
    <p>The ISR then calls a function dedicated to implementing the difference equation. The inputs are the 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         y 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          k 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> value read from the ADC and a 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          y 
        </mi> 
        <mi>
          d 
        </mi> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          k 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> value. As 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          y 
        </mi> 
        <mi>
          d 
        </mi> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          k 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> is a constant, it is hardcoded inside the PIP program to 5 V which is the desired output voltage.</p>
    <p>The difference equation function accesses two global arrays of floating-point numbers. This way, it can store previous outputs and inputs. It also has access to the constant global floating-point numbers which are the coefficients derived from the controller design script in MATLAB. The difference equation is of the form:</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mtable> 
       <mtr> 
        <mtd> 
         <mi>
           o 
         </mi> 
         <mi>
           u 
         </mi> 
         <mi>
           t 
         </mi> 
         <mi>
           p 
         </mi> 
         <mi>
           u 
         </mi> 
         <mi>
           t 
         </mi> 
         <mo>
           = 
         </mo> 
         <mi>
           u 
         </mi> 
         <mrow> 
          <mo>
            [ 
          </mo> 
          <mn>
            1 
          </mn> 
          <mo>
            ] 
          </mo> 
         </mrow> 
         <mo>
           + 
         </mo> 
         <mi>
           k 
         </mi> 
         <mo>
           ⋅ 
         </mo> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <mi>
             y 
           </mi> 
           <mi>
             d 
           </mi> 
           <mo>
             − 
           </mo> 
           <mi>
             y 
           </mi> 
           <mrow> 
            <mo>
              [ 
            </mo> 
            <mn>
              0 
            </mn> 
            <mo>
              ] 
            </mo> 
           </mrow> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mo>
           − 
         </mo> 
         <mi>
           f 
         </mi> 
         <mrow> 
          <mo>
            [ 
          </mo> 
          <mn>
            0 
          </mn> 
          <mo>
            ] 
          </mo> 
         </mrow> 
         <mo>
           ⋅ 
         </mo> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <mi>
             y 
           </mi> 
           <mrow> 
            <mo>
              [ 
            </mo> 
            <mn>
              0 
            </mn> 
            <mo>
              ] 
            </mo> 
           </mrow> 
           <mo>
             − 
           </mo> 
           <mi>
             y 
           </mi> 
           <mrow> 
            <mo>
              [ 
            </mo> 
            <mn>
              1 
            </mn> 
            <mo>
              ] 
            </mo> 
           </mrow> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mtd> 
       </mtr> 
       <mtr> 
        <mtd> 
         <mtext>
             
         </mtext> 
         <mtext>
             
         </mtext> 
         <mtext>
             
         </mtext> 
         <mo>
           − 
         </mo> 
         <mi>
           f 
         </mi> 
         <mrow> 
          <mo>
            [ 
          </mo> 
          <mn>
            1 
          </mn> 
          <mo>
            ] 
          </mo> 
         </mrow> 
         <mo>
           ⋅ 
         </mo> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <mi>
             y 
           </mi> 
           <mrow> 
            <mo>
              [ 
            </mo> 
            <mn>
              1 
            </mn> 
            <mo>
              ] 
            </mo> 
           </mrow> 
           <mo>
             − 
           </mo> 
           <mi>
             y 
           </mi> 
           <mrow> 
            <mo>
              [ 
            </mo> 
            <mn>
              2 
            </mn> 
            <mo>
              ] 
            </mo> 
           </mrow> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mo>
           − 
         </mo> 
         <mi>
           g 
         </mi> 
         <mrow> 
          <mo>
            [ 
          </mo> 
          <mn>
            1 
          </mn> 
          <mo>
            ] 
          </mo> 
         </mrow> 
         <mo>
           ⋅ 
         </mo> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <mi>
             u 
           </mi> 
           <mrow> 
            <mo>
              [ 
            </mo> 
            <mn>
              1 
            </mn> 
            <mo>
              ] 
            </mo> 
           </mrow> 
           <mo>
             − 
           </mo> 
           <mi>
             u 
           </mi> 
           <mrow> 
            <mo>
              [ 
            </mo> 
            <mn>
              2 
            </mn> 
            <mo>
              ] 
            </mo> 
           </mrow> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mtd> 
       </mtr> 
      </mtable> 
     </math></p>
    <p>where 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
        u 
      </mi> 
     </math> is the buffer of previous outputs and 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
        y 
      </mi> 
     </math> is the buffer of previous inputs. The 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
        f 
      </mi> 
     </math>, 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
        g 
      </mi> 
     </math> and 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
        k 
      </mi> 
     </math> coefficients correspond to the same values from Equation (20). For the input and output buffers, the index indicates the previous cycle, e.g. 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         y 
       </mi> 
       <mrow> 
        <mo>
          [ 
        </mo> 
        <mn>
          0 
        </mn> 
        <mo>
          ] 
        </mo> 
       </mrow> 
      </mrow> 
     </math> corresponds to the current input and 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         u 
       </mi> 
       <mrow> 
        <mo>
          [ 
        </mo> 
        <mn>
          1 
        </mn> 
        <mo>
          ] 
        </mo> 
       </mrow> 
      </mrow> 
     </math> corresponds to the output from 1 sample period ago. The difference equation function performs advances these buffers by updating them with the latest input and the new output it has generated and returns to the ISR.</p>
    <p>After receiving the new output of the difference equation, the ISR will add 0.5 to it. This corresponds to the quiescent state of the duty ratio. To produce a duty cycle with the same ratio, the difference equation output (a value between 0 and 1) must be multiplied by the period of PWM 2. That value is then written to the counter compare shadow register of PWM 2. The ISR then sends a software synchronization pulse to the PWM module to load the value from the shadow register and begin a new period. This completes the ISR function.</p>
   </sec>
  </sec><sec id="s6">
   <title>6. Hardware Prototype</title>
   <p>To complete the implementation and form the hardware prototype, the microcontroller is attached to the Buck converter as pictured in <xref ref-type="fig" rid="fig6">
     Figure 6
    </xref>. The divided output voltage of the plant, 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         v 
       </mi> 
       <mrow> 
        <mi>
          d 
        </mi> 
        <mi>
          i 
        </mi> 
        <mi>
          v 
        </mi> 
       </mrow> 
      </msub> 
     </mrow> 
    </math>, as shown in <xref ref-type="fig" rid="fig7">
     Figure 7
    </xref>, is connected to the ADCINA4 pin, which is the input for the ADC used by the controller implementation. The controller’s EPWM 2 output pin is connected to point 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       d 
     </mi> 
    </math> in <xref ref-type="fig" rid="fig7">
     Figure 7
    </xref>. The signal 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       d 
     </mi> 
    </math> drives the power mosfet of the Buck converter. The converter takes a nominal 10 V input and steps it down to 5 V. The quiescent duty ratio is thus 50%.</p>
   <fig id="fig10" position="float">
    <label>Figure 10</label>
    <caption>
     <title>Figure 10. Output voltage response to a 50 percent step change in the output load current. Top waveform: open-loop response, vertical scale: 200 mV/div., bottom waveform: closed-loop response, vertical scale: 20 mV/div.</title>
    </caption>
    <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1771182-rId197.jpeg?20250206085541" />
   </fig>
   <p>To test the efficacy of the controller, a step load disturbance signal is instigated by periodically switching an extra load across the output. This is done by turning mosfet Q3 on and off which adds and removes an additional shunt 20 Ω resistor. The results of this test are shown in <xref ref-type="fig" rid="fig10">
     Figure 10
    </xref>. The top trace shows the open loop response and the bottom trace is the closed loop response of the output voltage 
    <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       v 
     </mi> 
    </math>. The open loop response shows a large transient of 727 mV peak to peak and a non-zero steady state difference of 100 mV between switched states. The closed loop implementation greatly reduces the transient to 95 mV peak to peak and eliminates steady state difference completely. This zero steady state error is achieved by having integral control in the loop as implemented by the PIP controller. Also evident is that the transient settling time is greatly reduced in the closed loop configuration.</p>
  </sec><sec id="s7">
   <title>7. Conclusions</title>
   <p>The use of a non-minimal state space representation permits the use of output and input signals as the states thus obviating the need for a state estimator. Absent an estimator there is no need for procedures such as loop transfer recovery (LTR) needed to optimize system response.</p>
   <p>With NMSS, optimal control may more straightforwardly be implemented. In this paper we have shown its application in the design of a Buck converter controller. The resulting discrete control law can be quickly implemented. We illustrated this with a Texas Instruments F28069M microcontroller. As demonstrated by the implementation process, a microcontroller is suitable for quickly prototyping a discrete controller since it is elementary to store the discrete set of inputs and outputs as required by NMSS control. To aid in future design, some fundamental issues concerning microcontroller implementation have been discussed at length. The hardware prototype demonstrates the efficacy of this design approach through excellent disturbance rejection performance.</p>
  </sec><sec id="s8">
   <title>Acknowledgements</title>
   <p>Samuel Jacobs, a former student in the Electrical and Computer Engineering Department at Portland State University is acknowledged for his assistance in microcontroller implementation and providing the oscillogram and a number of the figures appearing in this paper.</p>
  </sec>
 </body><back>
  <ref-list>
   <title>References</title>
   <ref id="scirp.140199-ref1">
    <label>1</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Verma, S., Singh, S.K. and Rao, A.G. (2013) Overview of Control Techniques for DC-DC Converters. Research Journal of Engineering Sciences, 2, 18-21.
    </mixed-citation>
   </ref>
   <ref id="scirp.140199-ref2">
    <label>2</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Wan, K., Liao, J. and Ferdowsi, M. (2007) Control Methods in DC-DC Power Conversion—A Comparative Study. 2007 IEEE Power Electronics Specialists Conference, Orlando, 17-21 June 2007, 921-926. &gt;https://doi.org/10.1109/pesc.2007.4342111
    </mixed-citation>
   </ref>
   <ref id="scirp.140199-ref3">
    <label>3</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Lešo, M., Žilková, J., Biroš, M. and Talian, P. (2018) Survey of Control Methods for DC-DC Converters. Acta Electrotechnica et Informatica, 18, 41-46. &gt;https://doi.org/10.15546/aeei-2018-0024
    </mixed-citation>
   </ref>
   <ref id="scirp.140199-ref4">
    <label>4</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Liu, Y.-F., Meyer, E. and Liu, X.D. (2009) Recent Developments in Digital Control Strategies for DC/DC Switching Power Converters. IEEE Transactions on Power Electronics, 24, 2567-2577. &gt;https://doi.org/10.1109/tpel.2009.2030809
    </mixed-citation>
   </ref>
   <ref id="scirp.140199-ref5">
    <label>5</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Oliva, A.R., Ang, S.S. and Bortolotto, G.E. (2006) Digital Control of a Voltage-Mode Synchronous Buck Converter. IEEE Transactions on Power Electronics, 21, 157-163. &gt;https://doi.org/10.1109/tpel.2005.861193
    </mixed-citation>
   </ref>
   <ref id="scirp.140199-ref6">
    <label>6</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Chattopadhyay, S. and Das, S. (2006) A Digital Current-Mode Control Technique for DC-DC Converters. IEEE Transactions on Power Electronics, 21, 1718-1726. &gt;https://doi.org/10.1109/tpel.2006.882929
    </mixed-citation>
   </ref>
   <ref id="scirp.140199-ref7">
    <label>7</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Peng, H. and Maksimovic, D. (2005) Digital Current-Mode Controller for DC-DC Converters. 20th Annual IEEE Applied Power Electronics Conference and Exposition, Vol. 2, 899-905. &gt;https://doi.org/10.1109/apec.2005.1453091
    </mixed-citation>
   </ref>
   <ref id="scirp.140199-ref8">
    <label>8</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Seshagiri, S., Block, E., Larrea, I. and Soares, L. (2016) Optimal PID Design for Voltage Mode Control of DC-DC Buck Converters. 2016 Indian Control Conference (ICC), [Location], [Date], 99-104. &gt;https://doi.org/10.1109/indiancc.2016.7441112
    </mixed-citation>
   </ref>
   <ref id="scirp.140199-ref9">
    <label>9</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Ounnas, D., Guiza, D., Soufi, Y., Dhaouadi, R. and Bouden, A. (2019) Design and Implementation of a Digital PID Controller for DC-DC Buck Converter. 2019 1st International Conference on Sustainable Renewable Energy Systems and Applications (ICSRESA), Hyderabad, 4-6 January 2016, 1-4. &gt;https://doi.org/10.1109/icsresa49121.2019.9182430
    </mixed-citation>
   </ref>
   <ref id="scirp.140199-ref10">
    <label>10</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Nabeshima, T., Sato, T., Yoshida, S., Chiba, S. and Onda, K. (2004) Analysis and Design Considerations of a Buck Converter with a Hysteretic PWM Controller. 2004 IEEE 35th Annual Power Electronics Specialists Conference, Vol. 2, 1711-1716. &gt;https://doi.org/10.1109/pesc.2004.1355684
    </mixed-citation>
   </ref>
   <ref id="scirp.140199-ref11">
    <label>11</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Keskar, N. and Rincon-Mora, G.A. (2004) Self-Stabilizing, Integrated, Hysteretic Boost DC-DC Converter. 30th Annual Conference of IEEE Industrial Electronics Society, Vol. 1, 586-591.
    </mixed-citation>
   </ref>
   <ref id="scirp.140199-ref12">
    <label>12</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Huerta-Moro, S., Martínez-Fuentes, O., Gonzalez-Diaz, V.R. and Tlelo-Cuautle, E. (2023) On the Sliding Mode Control Applied to a DC-DC Buck Converter. Technologies, 11, Article No. 33. &gt;https://doi.org/10.3390/technologies11020033
    </mixed-citation>
   </ref>
   <ref id="scirp.140199-ref13">
    <label>13</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Ahmed, M., Kuisma, M., Tolsa, K. and Silventoinen, P. (2003) Implementing Sliding Mode Control for Buck Converter. IEEE 34th Annual Conference on Power Electronics Specialist, Vol. 2, 634-637. &gt;https://doi.org/10.1109/pesc.2003.1218129
    </mixed-citation>
   </ref>
   <ref id="scirp.140199-ref14">
    <label>14</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Leng, Z. and Liu, Q. (2017) A Simple Model Predictive Control for Buck Converter Operating in CCM. 2017 IEEE International Symposium on Predictive Control of Electrical Drives and Power Electronics (PRECEDE), Pilsen, 4-6 September 2017, 19-24. &gt;https://doi.org/10.1109/precede.2017.8071262
    </mixed-citation>
   </ref>
   <ref id="scirp.140199-ref15">
    <label>15</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Bhat, N.D., Kanse, D.B., Patil, S.D. and Pawar, S.D. (2020) DC/DC Buck Converter Using Fuzzy Logic Controller. 2020 5th International Conference on Communication and Electronics Systems (ICCES), Coimbatore, 10-12 June 2020, 182-187. &gt;https://doi.org/10.1109/icces48766.2020.9138084
    </mixed-citation>
   </ref>
   <ref id="scirp.140199-ref16">
    <label>16</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Taylor, C.J., Young, P.C. and Chotai, A. (2013) True Digital Control: Statistical Modeling and Non-Minimal State Space Design. Wiley. &gt;https://doi.org/10.1002/9781118535523
    </mixed-citation>
   </ref>
   <ref id="scirp.140199-ref17">
    <label>17</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Middlebrook, R.D. and Cuk, S. (1976) A General Unified Approach to Modelling Switching-Converter Power Stages. 1976 IEEE Power Electronics Specialists Conference, Cleveland, 8-10 June 1976, 18-34. &gt;https://doi.org/10.1109/pesc.1976.7072895
    </mixed-citation>
   </ref>
   <ref id="scirp.140199-ref18">
    <label>18</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     (2011) TMS320x2806x Microcontrollers: Technical Reference Manual. Texas Instruments Incorporated. &gt;http://www.ti.com/lit/ug/spruh18h/spruh18h.pdf
    </mixed-citation>
   </ref>
  </ref-list>
 </back>
</article>