Wide DHMPC EAMPCC

From HYCON2
Jump to: navigation, search

Contents

Energy-Aware Model Predictive Control

This class provides an implementation of an explicit MPC controller, where communications between controller and sensor nodes are subject to an energy-aware policy intended to lower the number of transmissions and, utlimately, save sensor nodes battery.

Problem setup

The overall control system is assumed to have the following configuration. A number of wireless sensor nodes collect noisy state measurements for disturbance rejection, compute an estimated state value, and transmit this estimation to the controller according to a transmission policy. This policy is based on a threshold logic. Namely, at every time step the estimated state value Ymean is transmitted to the controller if and only if there exists i such that


|Y_{mean} (i) - \hat X(i) | \geq th(i)

where th is a vector of user-defined thresholds, and Xhat is the predicted states buffer, which is precomputed by the controller and transmitted beforehand to the sensor nodes. Updated state predictions are computed and transmitted to the sensors every time new measurements are received by the controller. It is assumed that every sensor node collects a (noisy) measurement of the complete state vector, and that the energy cost of a (short-range) transmission between sensors is negligible with respect to a (long-range) transmission between sensors and controller.

Class description

The input arguments to create an EAMPC object are:

  • the matrices A and B of the controlled plant model, which is a discrete-time LTI system.
  • the WSN configuration, namely the number of sensor nodes to use, the thresholds for the transmission policy, and the length of the state predictions buffer.
  • the desired constraints on inputs and outputs.
  • the weight matrices and other parameters which define the MPC objective function.


Public properties

Net : specifies the network configuration. It is a structure with fields:

  • nodes : number of wireless sensor nodes used;
  • th : threshold vector for measurement transmission policy. Note: if th is a vector with all zero entries, then a standard MPC control law is implemented, where at every time step measurements are sent to controller regardless to the threshold-based transmission policy;
  • Ne : estimation horizon for state predictions computation.


Output (read-only) properties

  • nu : number of inputs of the controlled system.
  • ny : number of outputs of the controlled system.
  • Plant : controlled plant, modeled as a discrete-time LTI system. It is a structure with fields
    • A : state matrix (ny x ny);
    • B : input matrix (ny x nu).
  • Net : network configuration. It is a structure with fields
    • nodes : number of wireless sensor nodes used;
    • th : threshold vector for measurement transmission policy. Note: if th is a vector with all zero entries, then a standard MPC control law is implemented, where at every time step measurements are sent to controller regardless to the threshold-based transmission policy;
    • Ne : estimation horizon for state predictions computation.
  • Limits : element-wise constraints on outputs and inputs. It is a structure with fields:
    • yin : lower bounds on output (ny x 1);
    • ymax : upper bounds on output (ny x 1);
    • cumin : lower bounds on input (nu x 1);
    • umax : upper bounds on input (nu x 1);
    • cumin : lower bounds on input rate (nu x 1). Optional;
    • dumax : upper bounds on input rate (nu x 1). Optional.
  • Weights : weight matrices to be used in the MPC objective function. It is a structure with fields:
    • Qu : input weight (nu x nu);
    • Qy : output weight (ny x ny);
    • Qn : terminal state weight (ny x ny). Optional;
    • rho : positive weight for soft output constraints (1 x 1). Optional.
  • Params : other parameters for the MPC problem design. It is a structure with fields:
    • norm : norm used in the MPC objective function;
    • N : prediction horizon;
    • Nc : control horizon. Optional.
  • Ctrl : explicit MPC controller obtained with MPT Toolbox. See mpt_control for more details.
  • Sim : Data used for simulations. It is a structure with fields:
    • Y : set of current measurements;
    • Ymean : estimated output value, taken as the mean value of Y;
    • Xhat : buffer of predicted state values;
    • tx : records transmissions from sensor nodes to controller;
    • rx : records transmissions from controller to sensor nodes.

Class Methods

Class constructor obj = eampc(Plant,Net,Limits,Weights,Params)

  • Plant : controlled plant, modeled as a discrete-time LTI system. It is a structure with fields:
    • A : state matrix (ny x ny). Mandatory.
    • B : input matrix (ny x nu). Mandatory.
  • Limits : element-wise constraints on outputs and inputs. It is a structure with fields:
    • ymin : lower bounds on output (ny x 1). Mandatory.;
    • ymax : upper bounds on output (ny x 1). Mandatory;
    • umin : lower bounds on input (nu x 1). Mandator;
    • umax : upper bounds on input (nu x 1). Mandatory;
    • dumin : lower bounds on input rate (nu x 1). Optional (default: -Inf).
    • dumax : upper bounds on input rate (nu x 1). Optional (default: Inf).
  • Weights : weight matrices to be used in the MPC objective function. It is a structure with fields:
    • Qu : input weight (nu x nu). Mandatory;
    • Qy : output weight (ny x ny). Mandatory.
    • Qn : terminal state weight (ny x ny). Optional (default: Qy);
    • rho : positive weight for soft output constraints (1 x 1). Optional (default: Inf).
  • Params : other parameters for the MPC problem design. It is a structure with fields:
    • norm : norm used in the MPC objective function. It can be 1, 2, Inf. Mandatory;
    • N : prediction horizon. Mandatory;
    • Nc : control horizon. Optional (default: N).


init_sim

obj = init_sim(obj)

Initializes EAMPC object for simulations. This method must be called before running a new simulation.


send predictions

obj = send predictions(obj,Xk,Uprev)

  • Xk: current estimated state value. Mandatory;
  • Uprev: previous input value. Mandatory if input rate constraints are imposed, otherwise ignored.

Checks if an updated prediction buffer needs to be provided to the sensor nodes. In this case, a sequence of obj.Net.Ne future state predictions are computed and transmitted to the sensor nodes. Note: if all the components of obj.Net.th are set to zero, no transmission takes place.


get measurements

[Xestim,obj] = get measurements(obj,X,V)

  • X : state value (ny x 1). Mandatory;
  • V : output noise matrix (ny x no. of nodes). Mandatory;
  • Xestim : estimated state value.

Given the actual state X and the output noise V, provides to the controller an estimation of the state vector. Measurements from all sensor nodes are gathered (assuming all the state components are measured by each node) and the average output Ymean is computed. Then, Ymean is transmitted to the controller if and only if there exists i such that |Y_{mean}(i) - \hat X(i)| \geq th(i)


get_input

Uopt = get input(obj,X,Uprev)

  • X : initial state. Mandatory;
  • Uprev : previous control move. Mandatory if input rate constraints are imposed, otherwise ignored.

Computes MPC control move given a controller and an initial state.


build_mpc

obj = build MPC(obj)

Computes the explicit solution of the MPC problem:


 J(x(0)) = \min_u \|Q_Nx(N)\|_p + \sum_{j=0}^{N-1}
         \|Q_yy(j)\|_p + \|Q_uu(j)\|_p 

\mbox{subject to }\ x(j) \in X,\ u(j) \in U

for every x(0) \in X. Assume full state-feedback.


Further readings

A detailed description of the control approach, along with simulation results, can be found in the papers:

  • D. Bernardini and A. Bemporad, Energy-aware robust model predictive control based on wireless sensor feedback, in Proc. 47th IEEE Conf. on Decision and Control, Cancun, Mexico, 2008, pp. 3342--3347.
  • D. Bernardini and A. Bemporad, Energy-aware robust model predictive control with feedback from multiple noisy wireless sensors, 10th European Control Conference, Budapest, Hungary, 2009, pp. 4308--4313.
  • D. Bernardini and A. Bemporad, Energy-aware robust model predictive control based on noisy wireless sensors, Automatica, 2011. To appear.


[Wide Main Page]

Personal tools