1. Home
  2. Explore
  3. Engineering
  4. MPC Controller Design in MATLAB

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

MPC Controller Design in MATLAB

  • 52Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: MPC Foundations
A model predictive controller chooses its control actions by solving an
during operation.

52 questions

  1. 1
    A model predictive controller chooses its control actions by solving an
    _____
    during operation.
    Hint

    Think about when the controller calculates its control moves.

    Answer

    online optimisation problem

    Explanation

    MPC repeatedly solves an optimisation problem during operation to choose control actions.

  2. 2
    To predict future process behavior, MPC relies on a
    _____
    of the system.
    Hint

    It represents how the process responds to inputs.

    Answer

    model

    Explanation

    MPC uses a model to predict future outputs and evaluate candidate control moves.

  3. 3
    The optimisation computes
    _____
    that minimise the chosen objective function.
    Hint

    These are the control actions selected by solving the cost function.

    Answer

    optimal input moves

    Explanation

    The optimisation selects input moves that minimise the chosen objective function.

  4. 4
    A key benefit of formulating control as an optimisation problem is that it can handle
    _____
    directly.
    Hint

    These specify allowable bounds or relationships for inputs and outputs.

    Answer

    constraints

    Explanation

    Because MPC is formulated as an optimisation problem, constraints can be incorporated into the calculation.

  5. 5
    Although the tutorial example is SISO, the MPC implementation can be extended to
    _____
    systems.
    Hint

    This abbreviation describes systems with multiple inputs and multiple outputs.

    Answer

    MIMO

    Explanation

    The MPC approach can be extended from single-input single-output systems to systems with multiple inputs and outputs.

  6. 6
    For a large system with many inputs and outputs, calculating the optimal solution can require substantial
    _____
    .
    Hint

    This resource demand increases for large optimisation problems.

    Answer

    computational time

    Explanation

    Larger systems with many inputs and outputs require more work to calculate an optimal solution.

  7. 7
    The optimisation problem in MPC is most often solved as a
    _____
    .
    Hint

    It is an optimisation problem whose objective is quadratic.

    Answer

    quadratic program optimisation

    Explanation

    The tutorial describes quadratic programming as the optimisation approach used most often for MPC.

  8. 8
    The meaning of an optimal input move depends on the chosen
    _____
    .
    Hint

    This function states what the controller is trying to minimise.

    Answer

    objective function

    Explanation

    An input move is optimal relative to the objective function chosen to evaluate tracking error and control effort.

  9. 9
    The number of future output steps considered by the MPC prediction is set by the
    _____
    .
    Hint

    It sets how far into the future the controller looks.

    Answer

    prediction horizon

    Explanation

    The prediction horizon is the number of future steps included in the predicted output and tracking objective.

  10. 10
    The number of independently optimised future input moves is set by the
    _____
    .
    Hint

    It determines how many input decisions are free variables.

    Answer

    control horizon

    Explanation

    The control horizon specifies how many future input moves are independently optimised.

  11. 11
    When the prediction uses gamma impulse-response coefficients but only M moves are free, the number of optimised moves is
    _____
    .
    Hint

    This symbol denotes the number of input moves chosen freely.

    Answer

    M

    Explanation

    Although the impulse-response model has gamma coefficients, only the first M input elements are optimised.

  12. 12
    For prediction steps beyond the control horizon, the input is constrained to equal
    _____
    .
    Hint

    The held value is the last freely chosen input move.

    Answer

    U of K plus M minus 1

    Explanation

    After the control horizon, the input is held at its final optimised value for the remaining prediction steps.

  13. 13
    In the described formulation, predicted output is computed using a
    _____
    model with gamma coefficients.
    Hint

    This model represents a process through a limited sequence of response coefficients.

    Answer

    finite impulse response

    Explanation

    The predicted output is calculated using an impulse-response model with a finite table of coefficients.

  14. 14
    The impulse-response prediction combines input values using the
    _____
    .
    Hint

    They are the h values in the finite response representation.

    Answer

    gamma coefficients

    Explanation

    The impulse-response coefficients weight present and past inputs to calculate predicted output.

  15. 15
    The tracking part of the MPC objective penalises the predicted output's
    _____
    .
    Hint

    It measures how far the predicted output is from the desired value.

    Answer

    deviation from setpoint

    Explanation

    The principal tracking term penalises the difference between the reference and predicted output over the prediction horizon.

  16. 16
    Alongside tracking error, the objective may include a
    _____
    term that penalises control effort.
    Hint

    This term discourages unnecessarily large control actions.

    Answer

    minimum move

    Explanation

    A control-effort term can penalise input moves, balancing tracking against changes in control effort.

  17. 17
    The relative weight assigned to the input-related objective term is adjusted using
    _____
    .
    Hint

    This tuning parameter adjusts the relative importance of a cost term.

    Answer

    lambda

    Explanation

    Lambda weights the input-related term relative to the tracking term in the objective.

  18. 18
    The optimisation can enforce upper and lower
    _____
    at each relevant time instant.
    Hint

    These bounds restrict the control signal to an allowed range.

    Answer

    input limits

    Explanation

    The tutorial applies lower and upper limits to the input at the relevant time instants.

  19. 19
    The horizon lengths and limit values should be selected to suit the individual
    _____
    .
    Hint

    The appropriate values depend on the particular process being controlled.

    Answer

    application

    Explanation

    Prediction and control horizons, as well as input limits, are selected to suit the specific application.

  20. 20
    Because the model matrices are time-invariant, the implementation can
    _____
    them before the simulation loop.
    Hint

    This avoids recalculating fixed quantities during every optimisation.

    Answer

    precompute

    Explanation

    For a linear time-invariant model, the matrices multiplying the decisions and past inputs do not change with time, so they can be calculated beforehand.

  21. 21
    The MATLAB script stores the precomputed prediction matrices as
    _____
    .
    Hint

    These are the two named matrices used to construct predicted outputs.

    Answer

    T and S

    Explanation

    The tutorial stores the precomputed matrices named T and S in the tuning structure to reduce computation time.

  22. 22
    After each optimisation, the script applies only the
    _____
    to the system.
    Hint

    The controller implements the earliest move from its optimised sequence.

    Answer

    first input variable

    Explanation

    MPC calculates several future moves but applies only the first one before updating predictions and solving again.

  23. 23
    The runMPC function uses the
    _____
    when calculating the constant part of the formulation.
    Hint

    This is the control value from the preceding time step.

    Answer

    previous iteration input

    Explanation

    The previous input is included in the function inputs and helps calculate the constant component of the MPC formulation.

  24. 24
    Along with the reference, model, tuning structure, and previous input, the optimisation receives an
    _____
    .
    Hint

    It is a starting candidate supplied to the solver.

    Answer

    initial guess

    Explanation

    The optimisation function receives an initial guess for the decision variables to start its calculation.

  25. 25
    The script uses MATLAB's
    _____
    function to repeat input bounds across the control horizon.
    Hint

    This MATLAB function creates repeated copies of an array.

    Answer

    repmat

    Explanation

    The MATLAB repmat function repeats input lower and upper limits across the control horizon.

  26. 26
    To identify plant-model mismatch, the implementation compares predicted output with the
    _____
    .
    Hint

    This is the measured or system-generated output, rather than the model estimate.

    Answer

    actual output

    Explanation

    The code calculates actual and model-predicted outputs separately so their difference can be used when the plant and model do not match.

  27. 27
    When predicted and actual outputs differ, the MPC formulation can be updated using
    _____
    .
    Hint

    This adjustment accounts for an offset between model prediction and process behavior.

    Answer

    bias correction

    Explanation

    A real-time correction based on the difference between actual and predicted output can compensate for a persistent prediction bias.

  28. 28
    The example MATLAB script sets the simulation duration to
    _____
    .
    Hint

    This is the duration specified in the example script.

    Answer

    100 seconds

    Explanation

    The example sets the simulation length to 100 seconds.

  29. 29
    With the example sampling time, the system is sampled once every
    _____
    .
    Hint

    This is the sampling interval used in the example.

    Answer

    one second

    Explanation

    The sampling time is set to one second, defining the interval between discrete-time samples.

  30. 30
    The constant reference in the initial example is a
    _____
    of 2.5.
    Hint

    This is the desired output value used in the initial case.

    Answer

    setpoint

    Explanation

    In the initial example, the reference trajectory is declared as a constant setpoint of 2.5.

  31. 31
    In the initial matched-model case, the system reaches the setpoint in about
    _____
    .
    Hint

    This is the approximate settling time described for the initial response.

    Answer

    10 to 15 seconds

    Explanation

    With the matched model and initial settings, the output reaches its setpoint fairly quickly, in roughly 10 to 15 seconds.

  32. 32
    When a penalty on squared input is added, the controller seeks to reduce
    _____
    , which can bias tracking.
    Hint

    The altered objective discourages large changes in the manipulated signal.

    Answer

    input variation

    Explanation

    Adding a penalty on the sum of squared inputs changes the controller's preference toward smaller input variation, which can introduce tracking bias.

  33. 33
    If the input penalty causes setpoint bias, its relative influence can be reduced by tuning
    _____
    .
    Hint

    Adjust the coefficient that balances tracking and input cost.

    Answer

    lambda

    Explanation

    The tutorial tunes lambda to reduce the weight on the input penalty when that penalty prevents the output from reaching its setpoint.

  34. 34
    Changing an estimated model coefficient while leaving the actual plant unchanged introduces
    _____
    .
    Hint

    This is a discrepancy between the real process and the model used for prediction.

    Answer

    plant-model mismatch

    Explanation

    An inaccurately estimated model coefficient can cause the model predictions to differ from the actual plant behavior.

  35. 35
    With a substantial model mismatch and the input constraint active, the observed response becomes
    _____
    .
    Hint

    The response repeatedly swings rather than settling smoothly.

    Answer

    oscillatory

    Explanation

    In the example, a large mismatch combined with an input constraint causes an oscillatory response.

  36. 36
    To address mismatch-related output deviation, the tutorial turns on and tunes
    _____
    .
    Hint

    This correction uses the discrepancy between actual and predicted output.

    Answer

    bias correction

    Explanation

    Enabling and tuning bias correction is used to reduce output offset caused by plant-model mismatch, though it may require further adjustment.

  37. 37
    An alternative way to handle plant-model mismatch is to estimate states online using
    _____
    .
    Hint

    These estimators update state estimates using process measurements.

    Answer

    Kalman filters

    Explanation

    A Kalman filter can estimate states online from measurements and can be coupled with MPC to improve control under model mismatch.

  38. 38
    Instead of a fixed setpoint, MPC can control a system to follow a time-varying
    _____
    .
    Hint

    This is a desired output path that changes over time.

    Answer

    reference trajectory

    Explanation

    MPC can follow a time-varying reference rather than being limited to a single constant setpoint.

  39. 39
    The demonstrated changing reference is a
    _____
    with a time constant of five seconds.
    Hint

    This standard dynamic shape approaches a final value exponentially.

    Answer

    first-order response

    Explanation

    The tutorial demonstrates a changing reference shaped as a first-order response with a five-second time constant.

  40. 40
    In the example, increasing the
    _____
    from one to three makes the input variation smoother.
    Hint

    Increasing this horizon provides more independently chosen future moves.

    Answer

    control horizon

    Explanation

    Increasing the control horizon from one to three gives the optimiser more input moves to adjust and produces a smoother variation in the example.

  41. 41
    Increasing the
    _____
    together with the control horizon can improve future approximations and control.
    Hint

    This is the horizon governing how far ahead the output is predicted.

    Answer

    prediction horizon

    Explanation

    Increasing the prediction horizon along with the control horizon can improve the approximation of future behavior and control performance.

  42. 42
    Limits requiring predicted outputs to stay between specified lower and upper bounds are called
    _____
    .
    Hint

    These restrict predicted process values to an allowed range.

    Answer

    output constraints

    Explanation

    Bounds can be placed on predicted outputs, but model mismatch and the finite impulse-response approximation may prevent exact satisfaction.

  43. 43
    If strict output limits cannot be met, relaxing them can help preserve optimisation
    _____
    .
    Hint

    A solution is possible only if the constraints can all be satisfied together.

    Answer

    feasibility

    Explanation

    Output limits may make the optimisation infeasible, so the tutorial suggests allowing some relaxation to preserve a feasible solution.

  44. 44
    Besides input and output bounds, the controller can constrain changes in input, denoted
    _____
    .
    Hint

    This denotes the change in the manipulated input between steps.

    Answer

    Delta u

    Explanation

    The tutorial identifies bounds on changes in input, Delta u, as another possible constraint.

  45. 45
    A
    _____
    constraint can force a predicted output to match the reference at a chosen future step.
    Hint

    This constraint matches a future prediction to its desired value at a selected point.

    Answer

    coincidence point

    Explanation

    A coincidence-point constraint can require a predicted output at a specified future step to equal its reference, helping the system reach the setpoint faster.

  46. 46
    Requiring the predicted output at the end of the prediction horizon to equal the reference is a
    _____
    .
    Hint

    It imposes a condition at the final prediction step.

    Answer

    terminal constraint

    Explanation

    The tutorial describes requiring the predicted output at the end of the prediction horizon to equal the reference as straightforward to implement and stabilising.

  47. 47
    According to the tutorial, a terminal constraint can help
    _____
    the controller.
    Hint

    It promotes stable behavior rather than continued oscillation.

    Answer

    stabilises

    Explanation

    The described terminal constraint helps stabilise the controller and can prevent oscillatory responses in the example.

  48. 48
    In an MPC extension to a multiple-input, multiple-output system, each impulse-response coefficient becomes a matrix for a
    _____
    system.
    Hint

    This abbreviation refers to multiple inputs and outputs.

    Answer

    MIMO

    Explanation

    For a multiple-input multiple-output system, each impulse-response coefficient becomes a matrix of input-output relationships.

  49. 49
    When MPC predictions use a nonlinear model, the resulting problem is a
    _____
    .
    Hint

    The optimisation takes the same broad mathematical form as its nonlinear model.

    Answer

    nonlinear optimisation

    Explanation

    Using a nonlinear prediction model makes the optimisation nonlinear, potentially leading to a local rather than global optimum.

  50. 50
    A potential drawback of nonlinear MPC optimisation is that the solver may find a
    _____
    instead of a global optimum.
    Hint

    This solution is optimal nearby but may not be best over the entire search space.

    Answer

    local optimum

    Explanation

    A nonlinear optimisation solver may return a local optimum rather than the global optimum.

  51. 51
    When solving with linear-programming principles, the prediction model must be
    _____
    .
    Hint

    This model type is compatible with the stated linear-programming framework.

    Answer

    linear

    Explanation

    A linear model is needed when the optimisation is solved using quadratic-programming or linear-programming principles, although the general MPC framework does not itself require a particular model type.

  52. 52
    MATLAB's dedicated package for predictive control is called the
    _____
    .
    Hint

    This is the MATLAB software package dedicated to predictive control.

    Answer

    MPC Toolbox

    Explanation

    MATLAB provides an MPC Toolbox with diagnostic facilities and additional options, alongside the hand-coded approach shown.

1 of 52
Question 1 of 52

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent