Seb Zuddas

Grid control

A grid, controlled with model predictive control.

01

Overview

For the full problem definition, please see: Assignment.

The challenge is to design an MPC-based controller for maintaining the stability of an electricity grid that uses renewables for generation.

The system block diagram is given as the following:

System block diagram
Fig. 1 System block diagram

The given state-space prediction model is:

Eq. 1 Eq. 2
02

Explaining the Variables

    1. Represents the deviation of grid frequency from the synchronous frequency of , using a normalised unit.
    1. Represents the deviation from the nominal mechanical power output of the steam turbine, using a normalised unit.
    1. Represents the deviation from the governed mechanical power output of the governor, using a normalised unit.
    1. Represents the demand response, using a normalised unit. This is the value used to reduce the difference in load, ie, , and the physical means for doing this is through the transfer of money (paying users).
    1. Represents the deviation from nominal net power demand, using a normalised unit. This is the difference between the power demanded by consumers and the power generated by renewables.
03

Tuning Parameters

There are a number of tuning parameters in the given problem, both within the controller and as part of the problem formulation. Within the controller, the and matrices serve as ways for the controller to 'prioritise' different states or inputs as part of the optimisation procedure, and changing the prediction horizion changes how 'far ahead' the controller optimises for. Similarly, we have the ability to tune the demand response parameter directly within the model.

04

Unconstrained

First attempt at the unconstrained controller

unconstrained version 1
Fig. 2 unconstrained version 1

Here we can see the unconstrained controller exerting control over the system. The controller itself can be validated as stabilising through checking the spectral radius, which returns hence the controller is stabilising.

Tuning Controller Variables

Eq. 3 Eq. 4
05

Constrained

Constraint modelling requires translating the requirement into bounds on either the states or inputs . When developing an MPC controller, it is important to introduce constraints gradually, and tune the controller incrementally. This approach ensures that you can maintain the feasibility of a given controller as you tune , and .

We begin by introducing input constraints, defined as

Eq. 5

We also have output constraints, defined as

Eq. 6

We convert the input constraints into linear inequalities as follows:

Eq. 7

And, we have only output constraints, meaning we create the following linear inequalitie:

Eq. 8

Outcome

After editing the code further and making more adjustments to the matrices, the following output was achieved.

constrained_2
Fig. 3 constrained_2

This was achieved with matrices and

Eq. 9 Eq. 10
06

Disturbance Rejection

Including disturbance enhances the realism both of the model and the controller. Disturbances are modelled via state space through the addition of an matrix and a vector. However, typically we can assume .

Eq. 11 Eq. 12 Eq. 13

The disturbances have been modelled using Gaussian white noise, with and as a starting point. Using the same matrix configuration as above, we attain the following result. In the result, a price is associated with the control action. This will help when assessing the realism and cost effectiveness of any given control schema.

disturbance_included
Fig. 4 disturbance_included

Now that we have modelled disturbances, we begin with the implementation of disturbance rejection.

07

Reference Tracking