91
MOTOROLA APR15 Motorola Digital Signal Processors Implementation of Adaptive Controllers on the Motorola DSP56000/ DSP56001 by Pascal Renard, Ph.D. Strategic Marketing – Geneva, Switzerland Freescale Semiconductor, I Freescale Semiconductor, Inc. For More Information On This Product, Go to: www.freescale.com nc... ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2006

Freescale Semiconductor, Inc. Motorola Digital Signal Processorsapplication-notes.digchip.com/314/314-66839.pdf · 2009. 2. 8. · MOTOROLA APR15 Motorola Digital Signal Processors

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

  • MOTOROLA APR15

    Motorola Digital Signal Processors

    Implementation of Adaptive Controllers on the Motorola DSP56000/DSP56001

    byPascal Renard, Ph.D.Strategic Marketing – Geneva, Switzerland

    Fre

    esc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.

    For More Information On This Product, Go to: www.freescale.com

    nc

    ...

    Fre

    esc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.

    For More Information On This Product, Go to: www.freescale.com

    nc

    ...

    AR

    CH

    IVE

    D B

    Y F

    RE

    ES

    CA

    LE S

    EM

    ICO

    ND

    UC

    TOR

    , IN

    C. 2

    006

  • Motorola reserves the right to make changes without further notice to any products here-in. Motorola makes no warranty, representation or guarantee regarding the suitability ofits products for any particular purpose, nor does Motorola assume any liability arising outof the application or use of any product or circuit, and specifically disclaims any and allliability, including without limitation consequential or incidental damages. “Typical” pa-rameters can and do vary in different applications. All operating parameters, including“Typicals” must be validated for each customer application by customer’s technical ex-perts. Motorola does not convey any license under its patent rights nor the rights of oth-ers. Motorola products are not designed, intended, or authorized for use as componentsin systems intended for surgical implant into the body, or other applications intended tosupport or sustain life, or for any other application in which the failure of the Motorolaproduct could create a situation where personal injury or death may occur. Should Buyerpurchase or use Motorola products for any such unintended or unauthorized application,Buyer shall indemnify and hold Motorola and its officers, employees, subsidiaries, affili-ates, and distributors harmless against all claims, costs, damages, and expenses, andreasonable attorney fees arising out of, directly or indirectly, any claim of personal injuryor death associated with such unintended or unauthorized use, even if such claim allegesthat Motorola was negligent regarding the design or manufacture of the part. Motorolaand are registered trademarks of Motorola, Inc. Motorola, Inc. is an Equal Opportu-nity/Affirmative Action Employer.

    Fre

    esc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.

    For More Information On This Product, Go to: www.freescale.com

    nc

    ...

    Fre

    esc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.

    For More Information On This Product, Go to: www.freescale.com

    nc

    ...

    AR

    CH

    IVE

    D B

    Y F

    RE

    ES

    CA

    LE S

    EM

    ICO

    ND

    UC

    TOR

    , IN

    C. 2

    006

  • Table of Contents

    Fre

    esc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    TOR

    , IN

    C. 2

    006

    SECTION 1

    Introduction

    MOTOROLA

    SECTION 2

    Numerical DomainRepresentation

    For More Inf

    Go to

    For More

    GoAR

    CH

    IVE

    D B

    Y F

    RE

    E

    1.1 History of Adaptive Control 1-11.2 Theory of Adaptive Control 1-2

    ND

    UC

    2.1 Parametric Models 2-12.2 Adaptive Control Techniques 2-6

    MIC

    O

    SECTION 3

    Adaptive Controland Adaptive

    Controllers

    SC

    A

    3.1 Adaptive Control Using Reference Models 3-1 3.1.1 Introduction 3-1

    3.1.2 Closed-Loop System 3-2 3.1.3 Control Law 3-4

    3.1.3.1 Known System Parameters 3-43.1.3.2 Unknown System Parameters 3-9

    3.1.4 Determination of Controller Parameters 3-10

    3.1.5 Comment 3-14

    3.2 Generalized Predictive Control 3-15 3.2.1 Introduction 3-15 3.2.2 Closed-Loop System 3-18 3.2.3 Control Law 3-19

    3.2.3.1 Definition of Parametric Model 3-193.2.3.2 Definition of System

    Output Prediction 3-193.2.3.3 Determination of Polynomials 3-213.2.3.4 Determination of Control Law 3-21

    3.2.4 Comment 3-25

    LE S

    E

    iii

    ormation On This Product,: www.freescale.com

    Information On This Product, to: www.freescale.com

  • Table of Contents

    Fre

    esc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    TOR

    , IN

    C. 2

    006

    SECTION 4

    Implementationand Simulation of

    AdaptiveControllers UsingReference Models

    iv

    INDEXREFERENCES

    For Mor

    FoA

    RC

    HIV

    ED

    BY

    FR

    E

    4.1 Implementation 4-1

    4.1.1 Simulation 4-24.2 Generalized Prediction Controllers 4-2

    4.2.1 Implementation 4-2IC

    ON

    DU

    C

    SECTION 5

    Conclusion

    5.1 Advantages of Adaptive Control 5-15.2 Advantages of DSP56000/DSP56001

    Architecture 5-3 SE

    M

    APPENDIX

    The Least Mean-Square Principle

    A.1 Equation Formulation A-1A.2 Estimation of Model Parameters A-3A.3 The Least-Squares Estimator A-6 A.3.1 Is the LSE biased? A-6 A.3.2 How accurate is the LSE? A-7 A.3.3 Conclusion (on LSE accuracy and bias) A-7A.4 Improving the “LSE” A-8

    A.4.1 What is required to minimize LSE bias? A-8

    A.4.2 What is required to minimize LSE variance? A-8

    A.5 Conclusion A-9

    ES

    CA

    LE

    MOTOROLA

    Index-1Reference-1

    e Information On This Product,Go to: www.freescale.com

    r More Information On This Product, Go to: www.freescale.com

  • Illustrations

    MOTOROLA

    v

    Figure 1-1

    Figure 2-1

    Figure 2-2

    Figure 2-3

    Figure 2-4

    Figure 2-5

    Figure 3-1

    Figure 3-2

    Figure 4-1

    Figure 4-2

    Figure 4-3

    Figure A-1

    Basic principles of adaptive control 1-6

    Parametric model description in terms of processinput and output 2-2

    Adaptive controller in closed loop 2-6

    Standard input and disturbance signals 2-7

    Dynamic response in open loop 2-8

    Desired dynamic response in closed loop 2-9

    Adaptive control using reference models in closed loop 3-3

    Generalized predictive control using closed loop 3-18

    Simulation results for adaptive controller using 4-3parallel-serial reference models

    Generalized Predictive Controller 4-4

    Adaptive Controller 4-15

    Parametric model description in terms of processinput and output A-1

    Fre

    esc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.

    For More Information On This Product, Go to: www.freescale.com

    nc

    ...

    Fre

    esc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.

    For More Information On This Product, Go to: www.freescale.com

    nc

    ...

    AR

    CH

    IVE

    D B

    Y F

    RE

    ES

    CA

    LE S

    EM

    ICO

    ND

    UC

    TOR

    , IN

    C. 2

    006

  • F

    ree

    sca

    le S

    em

    ico

    nd

    uc

    tor,

    I

    Freescale Semiconductor, Inc.n

    c..

    .

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    , IN

    C. 2

    006

    IVE

    D B

    Y F

    RE

    For Mo

    FoA

    RC

    H

    ES

    CA

    LE S

    EM

    ICO

    ND

    UC

    TOR

    re Information On This Product,Go to: www.freescale.com

    r More Information On This Product,

    Go to: www.freescale.com

  • MOTOROLA

    “An adaptivecontrol system

    measures acertain

    performancerating of the

    system (or plant)to be controlled.”

    Introduction

    SECTION 1

    Fre

    esc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.

    For Mor G

    nc

    ...

    Fre

    esc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.

    Fo

    nc

    ...

    AR

    CH

    IVE

    D B

    Y F

    RE

    E

    R, I

    NC

    . 200

    6

    This section shows how Motorola DSP56000/DSP56001 digital signal processors can be used tosolve real-time digital control problems. After review-ing the relevant basic theory of adaptive control, welook at a number of implementations.

    1.1 History of Adaptive Control

    Computerized industrial process control has advancedby leaps and bounds over the last ten years in hard-ware and methods. The development of newmicrocontrollers and digital signal processors (DSPs)has given rise to important changes in regulation sys-tem design. The capabilities and low cost of the latestDSPs make them ideal for a wide range of regulationapplications. Further, and despite the fact that analogregulators still enjoy wide popularity, DSPs offer higherperformance than their analog predecessors.

    Very few of the microcontroller-based digital regula-tors developed to date fully exploit the keyadvantages of microprocessor technology. Most de-signers seem content to emulate the behavior oftraditional PID analog regulators. Sad though it maybe, this is indeed an accurate reflection of industrialreality, in many cases.Unfortunately, conventional PIDcontrollers, whether analog or digital, are only efficient

    SC

    ALE

    SE

    MIC

    ON

    DU

    CTO

    1-1

    e Information On This Product,o to: www.freescale.com

    r More Information On This Product, Go to: www.freescale.com

  • 1-2

    Fre

    esc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.

    For M

    nc

    ...

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    AR

    CH

    IVE

    D B

    Y F

    . 200

    6

    where the system to be controlled (the plant) — orrather the model of that system represented within thecontroller — is characterized by constant parametersapplicable at all operating points. And yet, most com-plex industrial systems are characterized byparameters that vary with the system operating point[REN-88], thus failing to meet the basic assumptionjust stated. Two examples are heat exchangers (suchas those used in the production of textile fibers) and in-ternal-combustion engines. In such cases, a controlsignal generated by a conventional PID controller (i.e.one for which the parameters are computed once andfor all on the basis of a constant-parameter systemmodel) will inevitably give rise to progressively moredegraded operation of the overall control loop as theerrors between controller and actual process parame-ters increase. This can only be corrected by modifyingthe controller coefficients . . . Which brings us to adap-tive control.

    1.2 Theory of Adaptive Control

    Together or separately, microcontrollers and DSPsenable us to design higher performance regulationsystems using more sophisticated digital control al-gorithms, many of which have already beendeveloped under and tested in industrial conditions[IRV-86]. Adaptive control represents an advancedlevel of controller design. It is recommended for sys-tems operating in variable environments and/orfeaturing variable parameters.

    RE

    ES

    CA

    LE S

    EM

    ICO

    ND

    UC

    TOR

    , IN

    C

    MOTOROLA

    ore Information On This Product, Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.com

  • F

    ree

    sca

    le S

    em

    ico

    nd

    uc

    tor,

    I

    Freescale Semiconductor, Inc.n

    c..

    .

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    NC

    . 200

    6

    Although adaptive control has only been around fora few years, it has already been successfully em-ployed in a number of industrial applications. Thebasic principles were published by Kalman, in 1958,for the stochastic approach, and later by Whitakerfor the deterministic approach. However, the tech-nique was not viable for two reasons:

    • The solutions proposed at the time were not very “robust”.

    • The hardware (computers) required forimplementation were either unavailable or fartoo expensive.

    Currently, however, the technique is rapidly gainingnew supporters. This is largely a result of recentwork that has improved algorithm robustness[SAM-83 and IRV-83] and of the development of mi-crocontrollers and/or DSPs which make it possibleto support and implement the new algorithms.

    Adaptive control is a set of techniques for the au-tomatic, on-line, real-time adjustment of control-loop regulators designed to attain or maintain agiven level of system performance where the con-trolled process parameters are unknown and/or time-varying. The use of microcontrollers and/or DSPs incontrol loops offers the following advantages:

    • Wide range of alternative strategies for controllerdesign and mathematical modelling,Freedom touse regulation algorithms that are more complexand offer higher performance than PID

    • Technique is suitable for process controlapplications involving time delaysV

    ED

    BY

    FR

    EE

    SC

    ALE

    SE

    MIC

    ON

    DU

    CTO

    R, I

    MOTOROLA 1-3

    For More Information On This Product,

    Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.com

    AR

    CH

    I

  • 1-4

    Fre

    esc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.

    For M

    nc

    ...

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    AR

    CH

    IVE

    D B

    Y F

    . 200

    6

    • Automatic estimation of process models fordifferent operating points

    • Automatic adjustment of controller parameters

    • Constant control system performance in thepresence of time-varying process characteristics

    • Real-time diagnostic capability

    Adaptive control is based entirely on the following hy-pothesis: the process to be controlled can bemathematically modelled and the structure of thismodel (delay and order) is known in advance. The de-termination of the structure of a parametric systemmodel is thus a vital step before going on to design anadaptive control algorithm. The identification tech-nique should be selected by a specialist in automaticcontrol. The capabilities of the adaptive control algo-rithm depends, to a large extent, on the faithfulnesswith which the model represents the system and itsbehavior. The chief advantage, in practical terms, ofadaptive control appears to be the capability to ensurequasi-optimal system performance in the presence ofa model with time-varying parameters.

    Once the model and its structure have been identi-fied, the next step is to select a control strategy.This choice depends in part on the nature of theproblem (regulation or tracking) and on the systemcharacteristics (minimum phase or not). The num-ber of options available depends on the extent ofour advance knowledge of these characteristics.The aim is to select a strategy yielding a satisfactorycontrol law in the case where the system model and

    RE

    ES

    CA

    LE S

    EM

    ICO

    ND

    UC

    TOR

    , IN

    C

    MOTOROLA

    ore Information On This Product, Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.com

  • F

    ree

    sca

    le S

    em

    ico

    nd

    uc

    tor,

    I

    Freescale Semiconductor, Inc.n

    c..

    .

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    NC

    . 200

    6

    its environment are fully determined. The strategiesmost commonly encountered in adaptive control are:

    • For minimum-phase systems (or for systems wherethe non-minimum phase is fully determined):“minimum-variance control” or “control usingreference models”

    • For non-minimum-phase systems: “pole-placementcontrol” or “quadratic-criterion optimal control”

    The adaptive control algorithm is then designed inaccordance with the structure of the system modeland the selected control strategy. As a rule, theadaptive control algorithm can be seen as a combi-nation of two algorithms. An identification algorithmuses measurements made on the system and gen-erates information (a succession of estimates) forinput to a control law computation algorithm. Thissecond algorithm determines, at each instant, theadaptive controller parameters and the control to beapplied to the system. This type of adaptive con-trol is termed indirect . However, the breakdowninto two parts is not always apparent. For example,no control law computation algorithm is required atall if the parameters characterizing the adaptivecontroller are directly identified. This is known as di-rect adaptive control .

    We will look first at adaptive control based on a di-rect scheme using a reference model . There aretwo main reasons for this choice: first, this type ofcontrol is relatively easy to implement; second, it hasalready found practical applications in industrial sys-tems [LAN-84], [DAH-82].V

    ED

    BY

    FR

    EE

    SC

    ALE

    SE

    MIC

    ON

    DU

    CTO

    R, I

    MOTOROLA 1-5

    For More Information On This Product,

    Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.com

    AR

    CH

    I

  • 1-6

    Comparisonsystem

    Desiredperformances

    Re

    Figure 1-1 Basic princ

    The performance ratinggoal. The adaptive sysin order to maintain the

    A

    Fre

    esc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.

    For M

    nc

    ...

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    AR

    CH

    IVE

    D B

    Y F

    . 200

    6

    A discussion follows on an adaptive control systembased on an indirect scheme which, to date, judgingfrom our bibliographic research, offers the best sys-tem response. This type of control was introducedby Clarke [CLA-84]. It produces optimal control overany system, with or without time delays and irre-spective of whether the inverse is stable orunstable. This scheme is known as generalizedpredictive control .

    The basic principle underlying adaptive controlsystems is relatively simple (see Figure 1-1). Anadaptive control system measures a certain per-formance rating of the system (or plant) to be

    PlantAdaptivecontroller

    ferenceinput

    Performancerating

    measure

    Output

    Disturbance

    iples of adaptive control

    of a system is measured and compared to the designtem modifies the parameters of the adaptive controller performance rating close to the desired value.

    djustmentsystem

    RE

    ES

    CA

    LE S

    EM

    ICO

    ND

    UC

    TOR

    , IN

    C

    MOTOROLA

    ore Information On This Product, Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.com

  • F

    ree

    sca

    le S

    em

    ico

    nd

    uc

    tor,

    I

    Freescale Semiconductor, Inc.n

    c..

    .

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    NC

    . 200

    6

    controlled. Starting with the difference between thedesired and measured performance ratings, theadjustment system modifies the parameters of theadaptive controller (or regulator) and the controllaw in order to maintain the system performancerating close to the desired value(s).

    Note that, in order to design and correctly adjust (ortune) a good controller, we must specify the desiredperformance of the regulation loop and determinethe dynamic process model describing the relationbetween variations in control signals and output.This means we must determine the representationmodel which, in turn, means that we must establishthe system's order and time delay.

    The literature on adaptive control includes hun-dreds of papers on different approaches to theproblem. As a result, engineers who are not special-ists in adaptive control theory often find it verydifficult to determine which approach they shoulduse to solve a given problem. The aim of this appli-cation note is to introduce the reader to the twomain principles of adaptive control identified to dateand to guide the design engineer in the selection ofcontrol strategies applicable to a given situation.

    The two principles selected for discussion were cho-sen on the basis of the goal of any design project,namely the determination of a real-time control lawapplicable to a given process. The total number ofoperations required to parameterize the control lawis assumed to be one of the criteria most important tothe design engineer. It is true that for high-speed in-dustrial systems using microcontrollers — such asV

    ED

    BY

    FR

    EE

    SC

    ALE

    SE

    MIC

    ON

    DU

    CTO

    R, I

    MOTOROLA 1-7

    For More Information On This Product,

    Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.com

    AR

    CH

    I

  • 1-8

    Fre

    esc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.

    For M

    nc

    ...

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    AR

    CH

    IVE

    D B

    Y F

    . 200

    6

    automotive Anti-lock Braking Systems (ABS) and ac-tive suspensions, to name but two — the totalnumber of operations assigned to the control algo-rithm cannot be very high. Given their internalstructure (Von Neumann), conventional microcon-trollers only have a limited real-time computationcapability, thus directly limiting the complexity of thecontrol algorithms.

    The architecture of Motorola DSP56000/DSP56001devices features a multi-bus processor that is highlyparallel (extended Harvard architecture) and spe-cially designed for real-time digital signalprocessing. In view of their computational power,these devices can be used to implement sophisti-cated control algorithms and thus to control high-speed industrial systems.

    Apart from the fact that digital signal processing isnow widely employed, the chief advantages of Mo-torola DSP56000/DSP56001 controllers can besummarized as follows:

    • Lower system component costs because a singleDSP56000/DSP56001 controller can replace notonly the microcontroller but also the componentsrequired for 3-D lookup tables to digitally mapmodel characteristics (as in the case of injectionsystems, active suspensions, etc.).

    • Further savings can be achieved by using digitaltechniques (e.g. an observation model) toreplace expensive sensors.

    • The computations performed by DSP56000/DSP56001 devices are more accurate than

    RE

    ES

    CA

    LE S

    EM

    ICO

    ND

    UC

    TOR

    , IN

    C

    MOTOROLA

    ore Information On This Product, Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.com

  • F

    ree

    sca

    le S

    em

    ico

    nd

    uc

    tor,

    I

    Freescale Semiconductor, Inc.n

    c..

    .

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    NC

    . 200

    6

    microcontroller interpolation between the inputsof a 3-D LUT (lookup table).

    • A single DSP56000/DSP56001 controller cananalyze and process several input parametersat a time.

    Each Motorola DSP56000/DSP56001 device isboth a high-speed microcontroller and a powerfuldigital signal processor. The DSP56001 programRAM can accommodate 512 words of 24 bits. TheRAM can be loaded, following a clear, from a 2K x8-bit EPROM or from a host processor. For mass-produced products, the DSP56000 offers a pro-gram ROM of 3.75K words of 24 bits which can befactory programmed for stand-alone applications.

    Apart from the amount of memory space allocatedto the program field, the DSP56000 and DSP56001controllers are identical, with two separate memoryspaces for data. A further feature is multiplicationwith accumulation of previous values, a capabilitymuch used by real-time control algorithms. ADSP56000/DSP56001 controller can multiply two24-bit numbers, add the 48-bit result to the contentsof the 56-bit accumulator, and simultaneously ac-cess the two data memory fields, all in a singleinstruction cycle.

    For fast input/output, DSP56000/DSP56001 devic-es feature three peripheral devices in the samepackage, namely: a host processor interface (HI), asynchronous serial interface (SSI), and a serial com-munications interface (SCI). When the SCI is notrequired for communications, the baud rate genera-tors can be used as timers. Depending on the wayV

    ED

    BY

    FR

    EE

    SC

    ALE

    SE

    MIC

    ON

    DU

    CTO

    R, I

    MOTOROLA 1-9

    For More Information On This Product,

    Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.com

    AR

    CH

    I

  • 1-10

    Fre

    esc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.

    For M

    nc

    ...

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    AR

    CH

    IVE

    D B

    Y F

    . 200

    6

    in which the peripherals are configured, DSP56000/DSP56001 can offer up to 24 I/O lines. These fea-tures make DSP56000/DSP56001 controllers idealfor a wide range of real-time control applicationswhere their processing power can be used to advan-tage. Applications include: disk drives, motorcontrol, automotive active suspensions, active noisecontrol, robotics, etc. ■

    RE

    ES

    CA

    LE S

    EM

    ICO

    ND

    UC

    TOR

    , IN

    C

    MOTOROLA

    ore Information On This Product, Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.com

  • MOTOROLA

    Numerical Domain Representation

    dnY t( )

    dtn----------------- α1

    dn –

    dtn----------+

    SECTION 2

    Fre

    esc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.

    For Mo

    nc

    ...

    Fre

    esc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.

    Fo

    nc

    ...

    AR

    CH

    IVE

    D B

    Y F

    RE

    TOR

    , IN

    C. 2

    006

    2.1 Parametric Models

    For any continuous, mono- or multi-variable physicalsystem, the search for a suitable parametric model —whether by empirical methods or on the basis of experi-mental data — leads to the use of linear differentialequations to represent the process to be identified. Theseequations are of the form:

    Eqn. 2-1

    In nature, no system is rigorously linear in the mathe-matical sense. However, most processes approachlinear behavior over a limited operating range.

    Contrary to non-parametric models (finite impulse re-sponse), parametric models depend on a specificstructure. The parametric model characterizes the dy-namic behavior of a physical system in terms of itstransmittance or transfer function. This may be de-duced using a z-transform. Applying such a transformto expression Eqn. 2-1, we obtain:

    1Y t( )1–

    --------------- … αnY t( )+ + β0dmU t( )

    dtm------------------- … βmU t( )+ +=

    ES

    CA

    LE S

    EM

    ICO

    ND

    UC

    2-1

    re Information On This Product,Go to: www.freescale.com

    r More Information On This Product,

    Go to: www.freescale.com

  • 2-2

    G z( ) Y z( )U z( )-----------=

    U(k)

    Figure 2-1 Parametric

    Fre

    esc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.

    For

    nc

    ...

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    AR

    CH

    IVE

    D B

    Y

    2006

    Eqn. 2-2

    where:

    • (a1,. . .,an) and (b0,. . .,bm) represent theparameters of the sampled model

    • d represents the time delay (for i ≤ d then, bi = 0)

    • n determines the order of the model (n ≥ m)

    • U (z) is the model input

    • Y (z) is the model output

    The most widely used parametric model is illustrat-ed in Figure 2-1:

    z d– b0 … bmzm–+ +( )

    1 a1z1– … anz

    n–+ + +------------------------------------------------------------- z

    d– B z 1–( )

    A z 1–( )--------------------------= =

    b(k)

    Y(k)q d– B q 1–( )A q 1–( )

    --------------------------

    model description in terms of process input and output

    FRE

    ES

    CA

    LE S

    EM

    ICO

    ND

    UC

    TOR

    , IN

    C.

    MOTOROLA

    More Information On This Product, Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.com

  • Fre

    esc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    C. 2

    006

    with:

    • q-1 is the time delay operator.

    • A (q-1) = 1 + a1q-1 +. . .+anq-1

    • B (q-1) = b0+. . .+bmq-1

    • b(k) represents all noise sources expressed interms of their equivalent effect on output.

    The model described by equation Eqn. 2-2 is knownin the literature as the polynomial parametric model.Expression Eqn. 2-2 is solely in terms of the pro-cess input and output. The model can also berepresented as a first-order differential equation byconverting expression Eqn. 2-1. This representa-tion is known as the parametric state model and isdefined in accordance with equation Eqn. 2-3.Throughout the remainder of this application notewe will assume that polynomial B(q-1) is of thesame degree as polynomial A(q-1).

    Eqn. 2-3

    where:

    • Xk is the state vector of dimension ((n+d) x 1)

    • P is the state matrix of dimension ((n+d) x (n+d))

    • Q is the input vector of dimension ((n+d) x 1)

    • C is the output vector of dimension (1 x (n+d))

    • n is the order of the system

    Xk 1+ P Xk⋅ Q Uk⋅+=

    Yk C Xk⋅=

    IVE

    D B

    Y F

    RE

    ES

    CA

    LE S

    EM

    ICO

    ND

    UC

    TOR

    , IN

    MOTOROLA 2-3

    For More Information On This Product,

    Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.comAR

    CH

  • 2-4

    Fre

    esc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.

    For

    nc

    ...

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    AR

    CH

    IVE

    D B

    Y

    2006

    The relation between these two representations ofthe parametric model is given by:

    Eqn. 2-4

    While it is true that the parametric model approxi-mates the behavior of the physical system, one mustbe cautious when it comes to the physical interpre-tation of the parameters contributing to the model'sstructure.

    The purpose of the parametric model is to approxi-mate as closely as possible the behavior of thesystem by ensuring the closest possible match be-tween predicted and observed output. This is done,moreover, within the limits of an accuracy vs. sim-plicity trade-off that the automatic control specialistdefines when choosing the parametric model togenerate the control law.

    The advantages of the parametric model approachlie in its structure:

    • It enables us to describe, sufficiently accurately,the dynamics of an arbitrary physical processusing fewer parameters that are required by thenon-parametric model (finite impulse response).

    0

    0

    01

    10

    0

    0

    0

    0

    0

    0

    bn

    d

    0 0P = Q = C = 1b0

    -a1

    -an

    } (vector from Eqn. 2-2)FR

    EE

    SC

    ALE

    SE

    MIC

    ON

    DU

    CTO

    R, I

    NC

    .

    MOTOROLA

    More Information On This Product, Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.com

  • … an Y k n–( )⋅– e k( )+

    F

    ree

    sca

    le S

    em

    ico

    nd

    uc

    tor,

    I

    Freescale Semiconductor, Inc.n

    c..

    .

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    C. 2

    006

    • It is relatively simple to implement on thecontroller. Using a well-known property of the z-transform (time delay theorem), we can proceedfrom the polynomial parametric model to thedifference equation of the following form:

    Eqn. 2-5

    with: • e (k) representing the generalized or residual noise

    • e (k) = b (k).(1 + a1q-1 +. . .+anq-1)

    Given that we now have the time-history of the inputand output signals, we can readily predict the modeloutput values. This important point is widely used inmodern regulation theory.The state parametricmodel is useful for describing multivariable systems.

    The chief drawback of the parametric model is thedifficulty of determining the order of the system. Ifthe designer underestimates the process order,model predictions will not match actual system be-havior. On the other hand, if the designeroverestimates the order, the increased complexity ofthe model will mean longer computation times. Thissame comment also applies to the estimation of puretime delays. The automatic control specialist musttherefore pay careful attention to this phase of themodelling procedure. With most industrial systems,we do not have access to the states values, which isa major handicap for the state parametric model.There are state observer techniques allowing the

    Y k( ) b0 U k d–( )⋅ … bn U k n– d–( )⋅ a1 Y k 1–( )⋅– –+ +=

    HIV

    ED

    BY

    FR

    EE

    SC

    ALE

    SE

    MIC

    ON

    DU

    CTO

    R, I

    N

    MOTOROLA 2-5

    For More Information On This Product,

    Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.comAR

    C

  • 2-6

    Figure 2-2 Adaptive

    This system will be useas it works to maintaindisturbance.

    Input

    r(k)PropAdaCont

    Fre

    esc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.

    For

    nc

    ...

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    AR

    CH

    IVE

    D B

    Y

    2006

    state estimation, but having a heavy penalty interms of computation time.

    2.2 Adaptive Control Techniques

    Consider the two adaptive control techniques ap-plied to a closed-loop physical system as shown inFigure 2-2:

    In these examples, G(z), the plant transfer function,is defined as follows:

    Eqn. 2-6

    controller in closed loop

    d to measure the performance of the adaptive controller (or equal) the desired response in the presence of a

    ++

    u(k)

    PlantG(z)

    osedptiveroller

    Disturbanced(t)

    Outputy(k)

    G z( )z 1– b0 b1z

    1–+( )⋅

    1 a1z1– a2z

    2–+ +------------------------------------------------ Y z( )

    U z( )-----------= =

    FRE

    ES

    CA

    LE S

    EM

    ICO

    ND

    UC

    TOR

    , IN

    C.

    MOTOROLA

    More Information On This Product, Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.com

  • ance signal: D(t)

    ime (sec.)5 10 15

    rbance signals

    F

    ree

    sca

    le S

    em

    ico

    nd

    uc

    tor,

    I

    Freescale Semiconductor, Inc.n

    c..

    .

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    C. 2

    006

    The nominal values for the process parameters are:

    b0 = 0.039

    h = 0.031

    a1 = -1.457

    a2 = 0.527

    The performance of the adaptive controls present-ed here will be evaluated on the basis of thesystem's capacity to equal the closed-loop re-sponse (Figure 2-2) with the desired performance.Before going on to make the different comparisons,we must first define the standard (input and output)signals to be used with the simulated system andthe desired closed-loop performance. The input anddisturbance signals are shown in Figure 2-3. Note,these signals will be assumed to be fixed through-out the remainder of this section.

    Reference signal: R(t) Disturb

    Mag

    nitu

    de

    Mag

    nitu

    de

    Time (sec.) T

    2

    1

    0

    -1

    -2

    0 5 10 15

    2

    1

    0

    -1

    -2

    3

    0

    Figure 2-3 Standard input and disturbance signals

    Noise free representation of the reference input and distuIVE

    D B

    Y F

    RE

    ES

    CA

    LE S

    EM

    ICO

    ND

    UC

    TOR

    , IN

    MOTOROLA 2-7

    For More Information On This Product,

    Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.comAR

    CH

  • 2-8

    Fre

    esc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.

    For

    nc

    ...

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    AR

    CH

    IVE

    D B

    Y

    2006

    In order to characterize the dynamic response ofthe uncorrected (i.e. without regulation) simulatedsystem, we apply the input signal defined in Figure2-3. The system dynamic response is illustrated inFigure 2-4.

    The function of the different regulators presented inthe following pages is to improve the dynamic be-havior of the simulated system. Two constraints areimposed on these regulators. These constraints willbe used, at first, to determine the desired perfor-mance of the closed-loop system. The constraintsare defined as follows:

    • In order to respond more rapidly to variations in thereference value and/or the level of disturbance, werequire that the simulated system have a settlingtime of no more than 2.5 seconds.

    Output signal in open loop

    Time (sec.)

    Mag

    nitu

    de2

    1

    0

    -1

    -2

    0 5 10 15

    Figure 2-4 Dynamic response in open loop

    Dynamic response of the uncorrected systemwhen it has been excited by the reference signal ofFigure 2-3.

    FRE

    ES

    CA

    LE S

    EM

    ICO

    ND

    UC

    TOR

    , IN

    C.

    MOTOROLA

    More Information On This Product, Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.com

  • Fre

    esc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    C. 2

    006

    • During the dynamic response, the variation in theoutput signal of the simulated system shall be setfor an overshoot of 70% relative to the final value.

    The desired system dynamic response is illustratedin Figure 2-5 (without disturbance):

    To illustrate and compare the performance of the dif-ferent adaptive controllers, we introduce, for eachmethod of adaptive regulation, a variation in the ref-erence value (R(t), Figure 2-3), followed, as soon asthe closed-loop system response has stabilized, bya disturbance (D(t), Figure 2-3). The impact of thedisturbance is then monitored. ■

    Desired output signal in closed loop

    Mag

    nitu

    de

    Time (sec.)

    2

    1

    0

    -1

    -2

    0 5 10 15

    Figure 2-5 Desired dynamic response in closed loop

    Dynamic response without disturbance of the closedloop system.

    IVE

    D B

    Y F

    RE

    ES

    CA

    LE S

    EM

    ICO

    ND

    UC

    TOR

    , IN

    MOTOROLA 2-9

    For More Information On This Product,

    Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.comAR

    CH

  • F

    ree

    sca

    le S

    em

    ico

    nd

    uc

    tor,

    I

    Freescale Semiconductor, Inc.n

    c..

    .

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    C. 2

    006

    IVE

    D B

    Y F

    RE

    ES

    CA

    LE S

    EM

    ICO

    ND

    UC

    TOR

    , IN

    For More Information On This Product,

    Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.comAR

    CH

  • MOTOROLA

    Adaptive Control and Adaptive Controllers

    “The mainadvantage of

    generalizedpredictive

    control is thatthe control isalways stable

    irrespective ofthe nature of the

    system to beregulated (the

    plant). “

    SECTION 3

    Fre

    esc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.

    For Mo

    nc

    ...

    Fre

    esc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.

    Fo

    nc

    ...

    AR

    CH

    IVE

    D B

    Y F

    RE

    OR

    , IN

    C. 2

    006

    3.1 Adaptive Control Using Reference Models

    3.1.1 Introduction

    An adaptive controller may be of conventional de-sign or it may be more complex in structure,including adjustable coefficients such that their tun-ing, using a suitable algorithm, either optimizes orextends the operating range of the process to beregulated. The different methods of adaptive controldiffer as to the method chosen to adjust (or tune) thecontrol coefficients.

    This section discusses adaptive control using paral-lel-serial reference models which, along with self-tuning control, are the only control schemes to havefound practical applications to date. The adaptivecontrol scheme using parallel reference models (i.e.located in parallel on the closed-loop system) wasoriginally proposed by Whitaker in 1958. The versionproposed at the time offered a solution to the trackingproblem, but not the regulation problem. Note that atracking problem is defined when the reference value

    ES

    CA

    LE S

    EM

    ICO

    ND

    UC

    T

    3-1

    re Information On This Product,Go to: www.freescale.com

    r More Information On This Product,

    Go to: www.freescale.com

  • 3-2

    Fre

    esc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.

    For

    nc

    ...

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    AR

    CH

    IVE

    D B

    Y

    2006

    (r(k)) varies and when no disturbances (d(k)) arepresent in the output (y(k)). A regulation problem isdefined when the reference value is zero or steadyand when there is a disturbance in the output suchthat its effect must be reduced by the control (u(k)).

    The parallel model structure is suitable for solvingthe tracking problem and is demonstrated by thefact that the model requires reasonable control sig-nals; the structure is not suitable for solvingregulation problems and is demonstrated by thefact that, in this case, the model requires unreason-able control signals. We obtain unreasonablecontrol signals because the estimated error (differ-ences between the output of the parallel referencemodel and that of the system) converges to zeroduring a single sampling interval. To attenuate thecontrol signal, a serial reference model (i.e. in se-ries with the estimated error) can be added to thegeneral structure. This imposes a converge-to-zerorequirement, with a chosen dynamic response, thatis less severe than in the previous case [IRV-85].Let us now look at this adaptive control method us-ing parallel-serial reference models more closely.

    3.1.2 Closed-Loop System

    An adaptive control system comprises not only afeedback-type control loop (or inner loop) includingan adaptive controller, but also an additional, or out-er, loop acting on the controller parameters in orderto maintain system performance in the presence of

    FRE

    ES

    CA

    LE S

    EM

    ICO

    ND

    UC

    TOR

    , IN

    C.

    MOTOROLA

    More Information On This Product, Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.com

  • ep -

    +

    y (k)

    eferenceodel

    losed loop

    l loop that includes an controller to maintain

    F

    ree

    sca

    le S

    em

    ico

    nd

    uc

    tor,

    I

    Freescale Semiconductor, Inc.n

    c..

    .

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    C. 2

    006

    variations in the process parameters. This secondloop also has a feedback-loop-type structure, thecontrolled variable being the performance of thecontrol system itself. The arrangement is schemat-ically shown in Figure 3-1.

    where: • ep represents the parallel estimated error

    • es represents the serial estimated error

    This type of adaptive scheme offers the advantageof being able to accommodate separately bothtracking and regulation problems. This is becausethe desired performance of the controlled systemare defined by a parallel model for a tracking prob-lem and by a serial model for a regulation problem.

    AdaptiveController

    PlantG(z)

    yref(k)

    es

    r(k) u(k)

    Serial RM

    IdentificationAlgorithm

    Figure 3-1 Adaptive control using reference models in c

    Note that this system not only has a feedback type controadaptive controller but also an outer loop that acts on theperformance in the presence of disturbances.

    Parallel ReferenceModel

    IVE

    D B

    Y F

    RE

    ES

    CA

    LE S

    EM

    ICO

    ND

    UC

    TOR

    , IN

    MOTOROLA 3-3

    For More Information On This Product,

    Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.comAR

    CH

  • 3-4

    Fre

    esc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.

    For

    nc

    ...

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    AR

    CH

    IVE

    D B

    Y

    2006

    3.1.3 Control LawThe dynamic behavior of the simulated system isdefined by a parametric model. We recall that itsgeneral structure is given by the relation:

    Eqn. 3-1

    where:

    • n = 2 (order)

    • d = 1 (time delay)

    • A(q-1) = 1 + a1.q-1 + a2.q-2

    • B(q-1) = b0 + b1.q-1

    The order of polynomials A(q-1) and B(q-1) andalso the time delay of the parametric model enableus to correctly dimension the control law. To bringus nearer to the formulation of the adaptive controllaw, we first consider the case where the systemparameters are known.

    3.1.3.1 Known System Parameters

    With the objectives of tracking and regulation beingindependent, we can formalize their respectiveequations as: A: Regulation (r(k) = 0).

    The problem here is to determine a control (u(k))that will eliminate an initial disturbance (d(k)) with adynamic response defined by the relation:

    Eqn. 3-2

    with:

    • d = 1

    • n = 2 (order)

    A q 1–( ) Y k( )⋅ q d– B q 1–( ) U k( )⋅ ⋅=

    Ar q1–( ) Y k d+( )⋅ 0=

    FRE

    ES

    CA

    LE S

    EM

    ICO

    ND

    UC

    TOR

    , IN

    C.

    MOTOROLA

    More Information On This Product, Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.com

  • F

    ree

    sca

    le S

    em

    ico

    nd

    uc

    tor,

    I

    Freescale Semiconductor, Inc.n

    c..

    .

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    C. 2

    006

    Ar(q-1) = 1 + ar1.q-1 + ar2.q-2 Eqn. 3-3

    The polynomial Ar(q-1) is determined by the designengineer to be asymptotically stable for order n.The polynomial represents the serial (or regulation)model. B: Tracking (d(k) = 0).

    The problem here is to determine a control (u(k))such that the system output (y(k)) satisfies a rela-tion of the form:

    Eqn. 3-4

    where:

    • n = 2 (order)

    • d = 1 (time delay)

    • Ap(q-1) = 1 + ap1.q-1 + ap2.q-2

    • Bp(q-1) = bp0 + bp1.q-1

    This corresponds to tracking a trajectory defined bythe following reference model:

    Eqn. 3-5

    In general, one may assume that there is some linkbetween the tracking dynamic response Ap(q-1)and the regulation dynamic response Ar(q-1). How-ever, in this application note, and for the sake ofsimplicity, we shall assume identical dynamic re-sponse to a variation in either load or referencevalue, i.e. we shall assume Ap(q-1) = Ar(q-1). We

    Ap q1–( ) Y k d+( )⋅ Bp q

    1–( ) R k( )⋅=

    Gp q1–( )

    q d– Bp q1–( )⋅

    Ap q1–( )

    -----------------------------------=

    IVE

    D B

    Y F

    RE

    ES

    CA

    LE S

    EM

    ICO

    ND

    UC

    TOR

    , IN

    MOTOROLA 3-5

    For More Information On This Product,

    Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.comAR

    CH

  • 3-6

    2

    Fre

    esc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.

    For

    nc

    ...

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    AR

    CH

    IVE

    D B

    Y

    2006

    shall further assume a reference model such thatthe output is described by the relation:

    Eqn. 3-6

    Under these conditions, the aims to be achieved bythe control signal can be expressed in the form:

    Eqn. 3-7

    The control law, with a parallel-serial referencemodel, can be deduced by minimizing the followingquadratic criterion:

    Eqn. 3-8

    In the case of unit time delay (d = 1), we can deter-mine the control law directly by minimizing criterionEqn. 3-8 relative to u(k). The problem may be differ-ent, however, if the pure time delay of the controlledsystem is equal to or greater than twice the sam-pling period. In order to obtain a causal regulator,i.e. one such that u(k) is of the form:

    Eqn. 3-9

    We must first rewrite the process output predictionin terms of the quantities measurable at time k andprior to time k. The prediction can be expressed inthe form:

    Ap q1–( ) Yref k d+( )⋅ Bp q

    1–( ) R k( )⋅=

    es k d+( ) Ap q1–( ) Y k d+( ) Yref k d+( )–[ ]⋅ 0= =

    J k d+( ) es2 k d+( ) Ap q

    1–( ) Y k d+( ) Yref k d+( )–[ ]⋅[ ]= =

    U k( ) Fu Y k( ) Y k 1–( ) ……… U k 1–( ) …, , , ,( )=

    FRE

    ES

    CA

    LE S

    EM

    ICO

    ND

    UC

    TOR

    , IN

    C.

    MOTOROLA

    More Information On This Product, Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.com

  • ) …, )

    k 1–( )

    F

    ree

    sca

    le S

    em

    ico

    nd

    uc

    tor,

    I

    Freescale Semiconductor, Inc.n

    c..

    .

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    C. 2

    006

    Eqn. 3-10

    In the literature, an expression of this form is knownas a “d-step-ahead predictive model”. An expres-sion such as Eqn. 3-10 can be obtained directlyusing the general polynomial identity:

    Eqn. 3-11

    where: • S(q-1) = 1 + s1.q-1 + . . . +sd-1.q-d+1

    • R(q-1) = r0 + r1.q-1 + . . . + rn-1.q-n+1

    This relation yields a unique solution for polynomi-als S(q-1) and R(q-1) when the degree of S(q-1) isd–1. Polynomials S(q-1) and R(q-1) can be ob-tained either recursively or by dividing polynomialAp(q-1) by polynomial A(q-1). Polynomial S(q-1)then corresponds to the quotient while q-d.R(q-1)corresponds to the remainder. Multiplying bothsides of Eqn. 3-11 by y(k+d) and taking into accountexpression Eqn. 3-1, we obtain:

    Eqn. 3-12

    This can be rewritten in the form:

    Eqn. 3-13

    where: B(q-1).S(q-1) = b0 + q-1.Bs(q-1)

    Ap q1–( ) Y k d+( )⋅ Fy Y k( ) Y k 1–( ) ……… U k( ) U k 1–(, , , ,(=

    Ap q1–( ) A q 1–( ) S q 1–( )⋅ q d– R q 1–( )⋅+=

    Ap q1–( ) Y k d+( )⋅ R q 1–( ) Y k( )⋅ B q 1–( ) S q 1–( ) U k( )⋅ ⋅+=

    Ap q1–( ) Y k d+( )⋅ R q 1–( ) Y k( )⋅ b0 U k( )⋅ Bs q

    1–( ) U⋅+ +=

    IVE

    D B

    Y F

    RE

    ES

    CA

    LE S

    EM

    ICO

    ND

    UC

    TOR

    , IN

    MOTOROLA 3-7

    For More Information On This Product,

    Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.comAR

    CH

  • 3-8

    J k d+( ) R q 1–( ) Y(⋅[=

    b0 R q1–( ) Y k( )⋅ b0+[⋅

    J k d+( )δU k( )δ

    ----------------------=

    U k( )

    Fre

    esc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.

    For

    nc

    ...

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    AR

    CH

    IVE

    D B

    Y

    2006

    Substituting Eqn. 3-13 into criterion expressionEqn. 3-8, we obtain:

    Eqn. 3-14

    The criterion can now be minimized by determiningthe control u(k) for which:

    Eqn. 3-15

    Combining this with expression Eqn. 3-14, weobtain:

    Eqn. 3-16

    Now, using expression Eqn. 3-6, we obtain the re-quired control in the form:

    Eqn. 3-17

    where polynomials Bp(q-1), R(q-1) and Bs(q-1) aredefined by:

    Bp(q-1) = bp0 + bp1.q-1

    R(q-1) = (ap1 - a1) + (ap2 - a2).q-1 = r0 + r1.q-1

    Bs(q-1) = b1 = bs0

    k) b0 U k( )⋅ Bs q1–( ) U k 1–( )⋅ Ap q

    1–( ) Yref k d+( )⋅–+ + ] 2

    J k d+( )δU k( )δ

    ---------------------- 0=

    U k( )⋅ Bs q1–( ) U k 1–( )⋅ Ap q

    1–( ) Yref k d+( )⋅–+ ] 0=

    1b0------ Bp q

    1–( ) R k( )⋅ R q 1–( ) Y k( )⋅– Bs q1–( ) U k 1–( )⋅–[ ]⋅=

    FRE

    ES

    CA

    LE S

    EM

    ICO

    ND

    UC

    TOR

    , IN

    C.

    MOTOROLA

    More Information On This Product, Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.com

  • 1) U k 1–( )⋅ ]

    F

    ree

    sca

    le S

    em

    ico

    nd

    uc

    tor,

    I

    Freescale Semiconductor, Inc.n

    c..

    .

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    C. 2

    006

    The control expressed in relation Eqn. 3-17 thushas the property of reducing criterion Eqn. 3-8 tozero while independently meeting the requirementsof both tracking and regulation.

    In other words, in the case of regulation (r(t) = 0),criterion expression Eqn. 3-8 represents a mini-mum-variance condition on the process output.Physically, this criterion implies minimizing themean energy of the “filtered error” expression in re-lation Eqn. 3-7.

    The equations presented in this section were madepossible by the fact that we knew the parameters ofthe controlled process. Let us now look at the casewhere these process parameters are unknown.

    3.1.3.2 Unknown System Parameters

    In the adaptive case, the structure of the controlleris the same as for known system parameters, ex-cept that we replace the fixed parameters byvariable ones. With the role of the adaptive, or out-er, loop being to determine the correct values ofthese parameters, the self-tuning controller equa-tion can be derived from Eqn. 3-17 and written as:

    Eqn. 3-18

    where: bo(k), ro(k),. . ., bs1(k), . . ., are the controller parameter estimates at time k

    U k( ) 1

    b̂0 k( )------------- Bp q

    1–( ) R k( )⋅ R̂ k q, 1–( ) Y k( )⋅– B̂s k q,–(–[⋅=

    IVE

    D B

    Y F

    RE

    ES

    CA

    LE S

    EM

    ICO

    ND

    UC

    TOR

    , IN

    MOTOROLA 3-9

    For More Information On This Product,

    Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.comAR

    CH

  • 3-10

    Fre

    esc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.

    For

    nc

    ...

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    AR

    CH

    IVE

    D B

    Y

    2006

    By defining the tuning vector θ(k) and the measure-ment vector Ψ(k) by the following expressions:

    Eqn. 3-19

    The controller equation can be rewritten in the form:

    Eqn. 3-20

    The next step is to determine the recursive param-eter-vector self-tuning algorithm.

    3.1.4 Determination of Controller Parameters

    The self-tuning controller parameters are deter-mined by recursive minimization of a least-squarestype criterion starting from asymptotic stability con-ditions dictated by the model-process error. Theaim then is to estimate the parameter vector at timek in such a way that it minimizes the sum of thesquares of the filtered errors between the processand the model over a time-horizon of k measure-ments. This is expressed by the relation:

    Eqn. 3-21

    θ̂T k( ) b ̂ 0 k ( ) b ̂ s0 k ( ) r ̂ 0 k ( ) r ̂ 1 k ( ) =

    Ψ k( ) U k ( ) U k 1 –( ) Y k ( ) Y k 1 –( ) =

    Bp q1–( ) R k( )⋅ θ̂T k( ) Ψ k( )⋅=

    J1 k( ) es2 i( )

    i 1=

    k

    ∑ Ap q 1–( ) Y i( ) Yref i( )–( )⋅[ ] 2i 1=

    k

    ∑= =

    FRE

    ES

    CA

    LE S

    EM

    ICO

    ND

    UC

    TOR

    , IN

    C.

    MOTOROLA

    More Information On This Product, Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.com

  • F

    ree

    sca

    le S

    em

    ico

    nd

    uc

    tor,

    I

    Freescale Semiconductor, Inc.n

    c..

    .

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    C. 2

    006

    This same condition can also be expressed in theform:

    Eqn. 3-22

    The values of θ(k) which minimize criterion Eqn. 3-22are obtained by determining the value of θ(k) whichcancels in the expression:

    Eqn. 3-23

    Applying relation Eqn. 3-23 to relation Eqn. 3-22,we obtain:

    Eqn. 3-24

    From equation Eqn. 3-24 we have:

    Eqn. 3-25

    J1 k( ) Bp q1–( ) R i( )⋅ θ̂T i( ) Ψ i( )⋅–[ ] 2

    i 1=

    k

    ∑=

    J1 k( )δ

    θ̂ k( )δ---------------- 0=

    δJ1 k( )

    δθ̂ k( )---------------- Ψ i( ) Bp q

    1–( ) R i( )⋅ θ̂T i( ) Ψ i( )⋅–[ ]⋅[ ]i 1=

    k

    ∑– 0= =

    θ̂ k( ) Ψ i( ) ΨT i( )⋅i 1=

    k

    ∑1–

    Bp q1–( ) R i( ) Ψ i( )⋅ ⋅

    i 1=

    k

    ∑⋅=

    IVE

    D B

    Y F

    RE

    ES

    CA

    LE S

    EM

    ICO

    ND

    UC

    TOR

    , IN

    MOTOROLA 3-11

    For More Information On This Product,

    Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.comAR

    CH

  • 3-12

    Fre

    esc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.

    For

    nc

    ...

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    AR

    CH

    IVE

    D B

    Y

    2006

    In the previous expression, we now let:

    Eqn. 3-26

    where:

    Expression Eqn. 3-25 corresponds to the non-re-cursive least-squares algorithm. To obtain arecursive algorithm, we recompute the optimal val-ue of θ(k+1) for the minimization condition J(k+1)and express θ(k+1) as a function of θ(k). Thisyields:

    Eqn. 3-27

    where:

    Here, F(k+1) represents the estimator tuning gain.This is an important variable since it gives us an in-dication of the quality of estimation (covariance ofparameter estimates).

    It has been shown elsewhere [LJU-83] that if k (ex-periment time) increases, the θ(k) estimates tendtowards constants. In this case, the variance of theestimates tends towards zero (F(k+1) = 0). The

    θ̂ k( ) F k( ) Bp q1–( ) R i( ) Ψ i( )⋅ ⋅

    i 1=

    k

    ∑⋅=

    F 1– k( ) Ψ i( ) ΨT i( )⋅i 1=

    k

    ∑1–

    =

    θ̂ k 1+( ) θ̂ k( ) F k 1+( ) Ψ k( ) es k 1+( )⋅ ⋅+=

    F 1– k 1+( ) F 1– k( ) Ψ k 1+( ) ΨT k 1+( )⋅+=

    FRE

    ES

    CA

    LE S

    EM

    ICO

    ND

    UC

    TOR

    , IN

    C.

    MOTOROLA

    More Information On This Product, Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.com

  • F

    ree

    sca

    le S

    em

    ico

    nd

    uc

    tor,

    I

    Freescale Semiconductor, Inc.n

    c..

    .

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    C. 2

    006

    least-squares algorithm briefly presented here hasprogressively less effect on new measurement val-ues. This is acceptable if the process is unvaryingin time. However, this is not the case in this applica-tion note since the system parameters are explicitlyassumed variable. This problem can be resolved bymodifying the J1(k) criterion. We need to arrangefor the criterion to “forget” earlier measurement val-ues by adding a suitable weighting factor. Whenthis is done, the criterion to be minimized becomes:

    Eqn. 3-28

    where: λ represents the weighting, or “forgetting factor” (0 < l ≤ 1)

    The thus modified least-squares algorithm is detailedin APPENDIX A . The main difference between algo-rithms is which variables are contained in vectorΨ(k). In the literature, this quantity is referred to asthe “measurement vector” while es(k) is termedthe “post-prediction tuning error”.

    In order to ensure the stability of the overall system,the recursive least-squares identification algorithmmust meet the following three conditions:

    • The rapid decrease in the prediction error(es(k)) must occur during the periods when θ(k),the unknown parameter of the system to beidentified, is constant.

    J2 k( ) λk i– es

    2 i( )⋅i 1=

    k

    ∑=

    IVE

    D B

    Y F

    RE

    ES

    CA

    LE S

    EM

    ICO

    ND

    UC

    TOR

    , IN

    MOTOROLA 3-13

    For More Information On This Product,

    Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.comAR

    CH

  • 3-14

    Fre

    esc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.

    For

    nc

    ...

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    AR

    CH

    IVE

    D B

    Y

    2006

    • Irrespective of any variations in the domainbounded by θ(k), the adjusted parameter θ(k) ofthe identifier must remain within the appropriatebounded domain.

    • The variation θ(k) - θ(k-1) in the estimatedparameter must decrease at the same time asthe prediction error es(k). If es(k) is below acertain threshold, then θ(k) - θ(k-1) must bezero.

    These conditions can only be met by making furtherchanges to the recursive least-squares algorithm.Several authors [IRV-85 and BOD-87] have alreadytackled this problem. We have used their results toimprove the robustness of the controller parameterestimation algorithm.

    3.1.5 Comment

    The use of a control strategy based on an output-signal minimum-variance criterion theoretically re-quires that the system to be regulated (the plant)have a stable inverse (i.e. b0 > b1). It is thereforeimportant to have some prior knowledge of the na-ture of the plant, and its behavior over its entireoperating range. Parametric identification is used todetermine not only the structure of the representa-tion model (order and time delays), but also thenature of the system to be regulated (i.e. whether itis a minimum-phase system or not). Note also thatthis type of controller can be used to define trackingand regulation performance totally independently.

    The main disadvantage of a control strategy usinga minimum-variance criterion applied to the variable

    FRE

    ES

    CA

    LE S

    EM

    ICO

    ND

    UC

    TOR

    , IN

    C.

    MOTOROLA

    More Information On This Product, Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.com

  • F

    ree

    sca

    le S

    em

    ico

    nd

    uc

    tor,

    I

    Freescale Semiconductor, Inc.n

    c..

    .

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    C. 2

    006

    to be regulated is that it always leads to a directadaptive scheme. This presents a problem for theother control strategies where the control law pa-rametering is broken down into two distinct steps,namely:

    • Estimation of parameters of the systemrepresentative model, and

    • Adjustment of controller parameters usingsystem parameters.

    This method of breaking down control law parame-tering leads to an indirect adaptive scheme. Note,however, that it can be an advantage to have ameans of monitoring system dynamic response inreal time. Thus, the estimation of process parame-ters can be used for diagnostics, monitoring, etc.Let us now look at this indirect adaptive schememore closely.

    3.2 Generalized Predictive Control

    3.2.1 IntroductionThe adaptive control scheme presented in the pre-vious section is useful when the system to becontrolled has a stable inverse. This leads to inves-tigations to see if other control schemes, associatedwith the least-squares identification method, cangenerate stable control signals irrespective of thenature of the system to be controlled. Given that theIV

    ED

    BY

    FR

    EE

    SC

    ALE

    SE

    MIC

    ON

    DU

    CTO

    R, I

    N

    MOTOROLA 3-15

    For More Information On This Product,

    Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.comAR

    CH

  • 3-16

    Fre

    esc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.

    For

    nc

    ...

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    AR

    CH

    IVE

    D B

    Y

    2006

    minimization of the mean tracking error energy(Eqn. 3-21) is not sufficient to ensure control stabil-ity in the case of a so-called “non-minimum phasesystem”, it seems fairly natural to investigate whathappens if one introduces a control weighting terminto the expression for the criterion to be minimized[SAM-83]. This is expressed by the relation:

    Eqn. 3-29

    where: α is the strictly positive weighting term

    An improvement in this criterion has been suggest-ed on the basis of the following observation. A cardriver does not need to have a complex mathemat-ical model in mind in order to be able to drive. All heneeds is the ability to recall a set of images of pos-sible trajectories produced by a corresponding setof control actions on the car steering wheel. Giventhe driver's view of the road to be followed, the hu-man control algorithm chooses the control action(or signal) that will produce the vehicle trajectoryclosest to the desired trajectory [IRV-85].

    From this we conclude, in other words, that to ob-tain a robust control scheme, we can use thepredictions obtained from the identification of thesystem to be controlled and minimize a least-squares criterion involving the difference betweenthe predicted desired trajectory and the predictedtrajectories in response to the control signals. This

    J3 k( ) Ap q1–( ) Y i( ) Yref i( )–( )⋅[ ] 2 α U k( )2⋅+

    i 1=

    k

    ∑=

    FRE

    ES

    CA

    LE S

    EM

    ICO

    ND

    UC

    TOR

    , IN

    C.

    MOTOROLA

    More Information On This Product, Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.com

  • ∆ U k 1+( )2⋅

    F

    ree

    sca

    le S

    em

    ico

    nd

    uc

    tor,

    I

    Freescale Semiconductor, Inc.n

    c..

    .

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    C. 2

    006

    criterion has been formulated by Clarke [CLA-84]and is expressed in the form:

    Eqn. 3-30

    where:

    • is the output prediction with Ny

    • Yref is the predicted output of the reference model over horizon Ny

    • U(k+i) represents the predicted control over Nu

    • Ny determines the horizon on the outputs

    • Nu determines the horizon on the control

    • α is the control weighting factor

    • ∆ represents the differentiation operator (∆ = 1-q-1)

    Thus, the control weighting term (α) ensures controlstability in all cases where the system has an unsta-ble inverse, provided the time delay is greater thanunity. The differentiation operator (∆) enables us toobtain a control that is free of static error in the vari-able to be controlled (Y) relative to the referencetrajectory (Yref).

    On the basis of our bibliographic research, general-ized predictive control is considered to be the bestcontrol technique currently available. This is whywe chose to discuss it in detail in this application

    J4 k( ) Yref yk i d+ +( ) Ŷ k i d+ +( )–[ ]2

    i 0=

    Ny 1–

    ∑ α ⋅i 0=

    Nu 1–

    ∑+=

    Ŷ k i d+ +( )

    IVE

    D B

    Y F

    RE

    ES

    CA

    LE S

    EM

    ICO

    ND

    UC

    TOR

    , IN

    MOTOROLA 3-17

    For More Information On This Product,

    Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.comAR

    CH

  • 3-18

    Processing oController

    Parameters

    AdaptiveControllerr(k)

    Figure 3-2 Generalize

    Note the presence of aprocess. The advantagthe main disadvantagecontrol law.

    Fre

    esc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.

    For

    nc

    ...

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    AR

    CH

    IVE

    D B

    Y

    2006

    note and why we made it the subject of our simula-tion studies. An industrial application of thistechnique is described in [LIM-89].

    3.2.2 Closed-Loop SystemAs with all adaptive control systems, the systemdiscussed in this section features not only a con-ventional servo-type feedback loop, but also anadditional loop designed to identify the on-line pro-cess and determine the parameters to be adjustedon the basis of the process parameters. The ar-rangement is schematically shown in Figure 3-2.

    IdentificationAlgorithm

    f

    PlantG(z)

    Parallel Reference Model

    u(k) y(k)

    yref(k)

    e +

    _

    d predictive control using closed loop

    n additional loop to perform system identification on thee is that the process parameters would be accessible with that there is an increase time in the computation of the

    FRE

    ES

    CA

    LE S

    EM

    ICO

    ND

    UC

    TOR

    , IN

    C.

    MOTOROLA

    More Information On This Product, Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.com

  • F

    ree

    sca

    le S

    em

    ico

    nd

    uc

    tor,

    I

    Freescale Semiconductor, Inc.n

    c..

    .

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    C. 2

    006

    The main advantage of this indirect adaptivescheme is that it gives access to the process pa-rameters, which is important for monitoring,diagnostics, and the like. The main disadvantage isthe increased computation time required to param-eter the control law.

    3.2.3 Control Law

    3.2.3.1 Definition of Parametric Model

    The parametric model required to formulate thecontrol law was defined earlier on. Recall that themathematical structure is of the form:

    Eqn. 3-31

    where: A(k,q-1) and B(k,q-1) are the polynomials estimated by the identifier at each samplinginterval.

    In the remainder of this application note, we willsimplify the mathematical notation by omitting the ^symbols (indicating estimated variables) and the (k)portion of the different terms indicating that the vari-able is estimated at each sampling interval k.Te.

    3.2.3.2 Definition of System Output Prediction

    The prediction of the parametric model output —which is to say the probable behavior of the processoutput between time k1 and some future time kj —is deduced using a j-step-ahead prediction model.

    Â k q 1–,( ) Y k( )⋅ q d– B̂ k q 1–,( ) U k( )⋅ ⋅=

    IVE

    D B

    Y F

    RE

    ES

    CA

    LE S

    EM

    ICO

    ND

    UC

    TOR

    , IN

    MOTOROLA 3-19

    For More Information On This Product,

    Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.comAR

    CH

  • 3-20

    Fre

    esc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.

    For

    nc

    ...

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    AR

    CH

    IVE

    D B

    Y

    2006

    The general expression for such a model is:

    Eqn. 3-32

    where:

    • j = 1..kj

    • kj is the given future time-horizon

    • Fj(q-1) = f0j + ... + f(kj-1)j.q-kj+1

    • Ej = 1 + ... + ej-1.q-j+1

    This expression is known as a Diophantine equa-tion. The expression for the predicted model outputcan be deduced by multiplying the two sides ofequation Eqn. 3-30 by Ej.∆, then substituting the ex-pression for Ej.A(q-1).∆ from equation Eqn. 3-32.This gives:

    Eqn. 3-33

    The expression for the predicted model output cannow be rewritten in the form:

    Eqn. 3-34

    where: Gj(q-1) = Ej(q-1).B(q-1)

    The sequence of predicted parametric model out-puts can now be represented by vector Y. Note thatfor all future sampling intervals smaller than or equalto the system time delay (i.e. for j ≤ d), the Y(k+j) val-ues can be computed using the input and outputdata available up to time k. For sampling intervalsgreater than the system time delay (i.e. for j > d),

    1 Ej q1–( ) A q 1–( ) ∆⋅ ⋅ q d– Fj q

    1–( )⋅+=

    1 q j– Fj q1–( )⋅–( ) Y k( )⋅ q d– Ej q

    1–( ) B q 1–( ) ∆ U k( )⋅ ⋅ ⋅ ⋅=

    Ŷ k j+( ) Fj q1–( ) Y k( )⋅ Gj q

    1–( ) ∆ U k d– j+( )⋅ ⋅+=

    FRE

    ES

    CA

    LE S

    EM

    ICO

    ND

    UC

    TOR

    , IN

    C.

    MOTOROLA

    More Information On This Product, Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.com

  • F

    ree

    sca

    le S

    em

    ico

    nd

    uc

    tor,

    I

    Freescale Semiconductor, Inc.n

    c..

    .

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    C. 2

    006

    we need to know the future control U(k+j). Theseassumptions form the basis of generalized predic-tive control.

    3.2.3.3 Determination of Polynomials

    Fj(q-1) and Gj(q-1)

    In Section 3.1.3.1 we showed that we could obtainthe polynomials S(q-1) and R(q-1) by simple divi-sion. The disadvantage, however, of this techniqueis that it is very time consuming. Clarke proposes arecursive method for the determination of polynomi-als Fj(q-1) and Ej(q-1). This is the solution we haveadopted. Readers interested in this reformulation ofthe polynomials in recursive form should refer to thebibliography, and particularly to [BOD-87], [CLA-85], and [AST-84]. Note, the control algorithm en-coded in Motorola DSP56000/DSP56001 digitalsignal processors is based on the same solution.

    3.2.3.4 Determination of Control Law

    Above, we derived an expression (Eqn. 3-34) forpredicting the behavior of the process output signal.The behavior of the reference model output signal,on the other hand, is predicted by expression (Eqn.3-35). We must now solve this equation from sam-pling time (k+d) to the chosen time-horizon(k+d+N–1).

    Eqn. 3-35

    where:

    Yref k d+( ) Ap* q 1–( )– Yref k d 1–+( )⋅ Bp q

    1–( ) R k( )⋅+=

    Ap* q 1–( ) a1 q

    1–⋅ … an qn–⋅+ +=

    IVE

    D B

    Y F

    RE

    ES

    CA

    LE S

    EM

    ICO

    ND

    UC

    TOR

    , IN

    MOTOROLA 3-21

    For More Information On This Product,

    Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.comAR

    CH

  • 3-22

    Yre

    Fre

    esc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.

    For

    nc

    ...

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    AR

    CH

    IVE

    D B

    Y

    2006

    Determining the output of the parallel referencemodel at a future time is not difficult since the poly-nomials Ap and Bp are known and are constant ateach sampling time. The sequence of referencemodel outputs from sampling time (k+d), can be ex-pressed in vector form as follows:

    Eqn. 3-36

    Recall that the parallel reference model plays thesame role as that defined for the adaptive controllerof a parallel-serial model (Section 3.1 ). In order tocompare the performance of the two adaptive regu-lators, we choose the same structure (n = 2 and d =1) for the parallel model and the same dynamicresponse.

    The prediction error at future time k+j is given by:

    Eqn. 3-37

    Proceeding as previously described, let us now de-fine the prediction error vector:

    Eqn. 3-38

    Thus:

    Eqn. 3-39

    We saw earlier that at time k, certain elements ofvector Y are functions of known and unknown data.Among the unknowns, we can define the predicted

    f Yref k d+( )……Yref k d N 1–+ +( )[ ]=

    e k j+( ) Yref k j+( ) Ŷ k j+( )–=

    e e k d+( )……e k d N 1–+ +( )[ ]=

    e Yref Y–=

    FR

    EE

    SC

    ALE

    SE

    MIC

    ON

    DU

    CTO

    R, I

    NC

    .

    MOTOROLA

    More Information On This Product, Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.com

  • F

    ree

    sca

    le S

    em

    ico

    nd

    uc

    tor,

    I

    Freescale Semiconductor, Inc.n

    c..

    .

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    C. 2

    006

    control vector (U) as follows:

    Eqn. 3-40

    A clever decomposition of expression Eqn. 3-39 en-ables us to separate the terms that depend onknown data at time k and those that are unknown attime k, such as vector U. We thus obtain:

    Eqn. 3-41

    where: G is a triangular matrix of dimension N.N

    The elements of G are generated by reformulatingthe Diophantine equation in recursive form.

    Eqn. 3-42

    U ∆.U(k)……∆.U(k+N-1)[ ]=

    e Yref G U f–⋅–=

    G

    g0 0 • • • • 0

    g1 g0 • •

    • • • • • • • • • • • • • • • • • • 0gN gN 1

    – • • • • g0

    =

    IVE

    D B

    Y F

    RE

    ES

    CA

    LE S

    EM

    ICO

    ND

    UC

    TOR

    , IN

    MOTOROLA 3-23

    For More Information On This Product,

    Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.comAR

    CH

  • 3-24

    Fd q–(

    Fd 1+ q1–( ) Y(⋅

    Fd N 1–+ q1–( ) ⋅

    Gd N 1–+[

    f =

    Fre

    esc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.

    For

    nc

    ...

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    AR

    CH

    IVE

    D B

    Y

    2006

    The elements of vector f are the components of thepart of the prediction depending on known data attime k. This vector can be written in the form:

    Eqn. 3-43

    The control vector, U, can be determined by mini-mizing criterion J4(k) as expressed in equation Eqn.3-40. In vector form, this criterion is given by:

    Eqn. 3-44

    It can be shown that this criterion has a simple opti-mal solution for:

    Eqn. 3-45

    Control u(k) is computed from

    u(k) using the fol-

    lowing expression:

    Eqn. 3-46

    The power of generalized predictive control can begauged from the fact that it allows us to reduce the

    1) Y k( ) q Gd q1–( ) g0– ∆ U k 1–( )⋅ ⋅+⋅

    k) q2+ Gd 1+ q1–( ) g0 g1– q

    1–⋅– ∆ U k 1–( )⋅ ⋅ ⋅

    Y k( ) qN.+

    q 1–( ) g0– g1 q1– ……gN 1– q

    N– 1+⋅⋅– ] ∆ U k 1–( )⋅ ⋅

    J4 eT e⋅ α UT U⋅ ⋅+=

    U GT G⋅ α I⋅+[ ] 1– GT Yref f–[ ]⋅ ⋅=

    U k( ) U k 1–( ) ∆ U k 1–( )⋅+=

    FRE

    ES

    CA

    LE S

    EM

    ICO

    ND

    UC

    TOR

    , IN

    C.

    MOTOROLA

    More Information On This Product, Go to: www.freescale.com

    For More Information On This Product,

    Go to: www.freescale.com

  • F

    ree

    sca

    le S

    em

    ico

    nd

    uc

    tor,

    I

    Freescale Semiconductor, Inc.n

    c..

    .

    F

    ree

    sc

    ale

    Se

    mic

    on

    du

    cto

    r, I

    Freescale Semiconductor, Inc.n

    c..

    .

    C. 2

    006

    control prediction time-horizon. The only difficultiesare the mathematical problems posed by the inver-sion of matrix (GT.G + a.I) of dimension N.N and theassociated computation times. But this can be over-come by defining a control prediction time-horizonsuch that Nu < N and an output prediction time-ho-rizon such that Ny = N. This reduces the numberof colu