Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

ACS6116 Advanced Control: Assignment

P. Trodden

Spring 2022–23

Assignment weighting

25% of the total mark for ACS6116.

Assignment released

15:00 on Friday 3rd March 2023 (Week 4).

Assignment due

23:59 on Thursday 23rd March 2023 (Week 7).

Penalties for late submission

Late submissions will incur the usual penalties of a 5% reduction in the mark for ev-  ery working day (or part thereof) that the assignment is late and a mark of zero for  submission more than 5 working days late. For more information see https://studentssheffield.ac.uk/assessment/results/submission#If-you-submit-your-work-late.

Feedback

This will include the overall mark, individual component marks and comments on performance on the assignment. The attached assessment criteria (at the back of this document) provide a guide to the areas on which the feedback will be provided. Note that marks may be subject to change as a result of unfair means.

Unfair means

The assignment must be completed individually. You must not work together to com- plete the assignment—it must be wholly your own work. References must be pro- vided to any other work that is used as part of this assignment. Any suspicions of the use of unfair means will be investigated and may lead to penalties. See https: //www.sheffield.ac.uk/new-students/unfair-meansfor more information.

Extenuating circumstances

If you have extenuating circumstances that cause you to be unable to submit this assignment on time or that may have affected your performance, please complete and submit an extenuating circumstances form—see https://students.sheffield.ac.uk/ extenuating-circumstancesfor information.

• If you are an ACSE student, download and complete the form athttps://students .         sheffield.ac.uk/media/221/downloadand email it to[email protected].

• If you are an IPE student, complete the online form at https://docs.google.com/             forms/d/e/1FAIpQLSdATJ6z9evTIXOw0wVbzq2Q-4zTM8xiOT6PWNV-SCuXytKr5w/viewform.

Assignment brieng

This assignment will assess your fundamental understanding of model predictive control and your ability to design MPC controllers and simulate and analyse MPC-controlled systems. The assignment comprises an open-ended design and/or analysis exercise: you are asked to choose one of the three listed topics, and tackle the described problem. Each problem includes elements of design, simulation, and analysis.

Produce a report (limit: 4 pages in the provided template) containing your answer.

In order to create a level playing eld between candidates’ submissions, you are asked to prepare your submission using the document templates supplied on Blackboard. This is a 10pt, two-column format, which allows ample space for this assignment even with the 4-page limit. (Please note that no appendices are necessary.)

It is up to you how you tackle the problem and stucture your answer. However, it is suggested that you look at (i) the help below and (ii) the attached assessment criteria (at the back of this document) for guidance on what to include.

Assessment criteria

The assessment criteria for this exercise are derived from the module learning outcomes, which are:

1. Describe and explain the principles of more than one advanced control technique.

2. Analyse practical performance specifications and convert these into functional requirements on controllers.

3. Design, implement and evaluate an advanced control system against these require- ments.

4. Compare and contrast different advanced control solutions to a particular control problem or application.

5. Describe the receding-horizon principle, and hence compare and contrast LQ- optimal control and MPC.

6. Construct a constrained nite-horizon optimal control problem—including con- straint, model and cost definition—re-formulate it as an optimization problem, and recall and evaluate the analytical expression for the control law in the uncon- strained case.

7. Analyse, design, implement and simulate MPC controllers with guaranteed prop- erties, including feasibility, stability and offset-free tracking.

In particular, learning outcomes 2, 3, 6 and 7 are relevant to this assessment, and the attached assessment criteria—the marksheet that will be used to assess the assignment— are derived from these. The marksheet indicates the criteria that will be used in assessing your answer, and also the expectation for each criterion in order to achieve a mark within the specified ranges. It is suggested that you study this marksheet before completing the assignment.

These assessment criteria are deliberately broad in order to accommodate the differ- ent topics available. Some topics may require more emphasis on certain criteria than others; however, no student will be disadvantaged by topic choice.

Please note that a 4-page limit, using the supplied template, applies to your report, and you should consider carefully how you can effectively meet the assessment criteria within this limit.

Guidance

• This assignment briefing and the module lecture notes provide the main infor- mation that is required to complete this assignment. Although we will cover in lectures the basic theory and techniques needed to complete the assignment, you may need to read ahead of the lectures—if you wait entirely until we cover” a particular topic (e.g., tracking and disturbance rejection), you might not leave enough time for a comprehensive attempt at the assignment.

• You may also wish to consult the literature relevant to your problem and review it in your report.

• Basic MATLAB programming is required, including the use of functions and loops; however, in tackling the assignment you may use the MPC-specific MATLAB functions (used in the computer exercises) available on the Blackboard page for ACS6116, plus any code you have developed to answer the computer exercises. You should not use the MPC toolbox in MATLAB/SIMULINK .

• The non-assessed computer exercises are good preparation for this assignment. However, the computer exercises were structured, whereas this assignment is open-ended: you need to decide what is the most appropriate approach to solve this assignment, and also how to present your results.

• For the report, you are recommended to consult the attached assessment criteria (at the back of this briefing) for guidance on what to include and to what level of detail. In particular, the assessment criteria suggest that your report might need to include, among other things,

 Details of the optimal control problem / MPC formulation you used, includ- ing the correct identification and implementation of constraints.

 A description and explanation of how the controller was designed and tuned in order to meet the specification, including the selection of all parameters, with correct explanations and justifications.

 Clear reporting and discussion of results (including clear, labelled plots), and critical evaluation of the controller. (Think about more than just, for example, “Did my controller meet the spec.?” — what are the strengths and weaknesses of your solution? What could be improved?)

 Some analysis and evaluation of your design, including its theoretical prop- erties (if any) and its performance under different scenarios.

This is not an exhaustive list, and what you should include will vary depending on the topic you choose. However, a suggested outline for any report is

1. Abstract

2. Introduction

3. Problem statement

4. Design

5. Results

6. Analysis and discussion

7. Conclusion

This might not be the ideal structure for your report, however, and you may wish to combine or change some of these sections, depending on the topic you choose and the progress you make.

You do not need to include the code that you write, but you may do so (e.g. snippets of code) if you think it adds particular value to your report.

Please note that, in order to achieve the very highest marks, you will need to go beyond simply implementing the methods that you have learned in the lectures and practised in the computer exercises. Surprise me!

• If you do not manage to achieve a working controller or simulation, simplify things, get something simpler working, and build systematically towards a comprehensive solution. In fact, I advise in all cases to start tackling the problem without constraints, in order that you can get something working without having to wrestle with infeasibility and instability issues (which often arise from incorrect implementation of constraints). If your problem involves tracking and disturbance rejection, solve the regulation problem,from a non-zero initial state, first.

• Should you need clarification or have questions on any part of the assignment then please just ask! (Talk to me in classes, post to the discussion board, or email me at [email protected]).

Topic 1: Power system frequency control with demand response

Demand response has been proposed as a means to helping maintain balance between supply and demand in future electrical power systems. Balance has traditionally been achieved by controlling the power outputs of dispatchable production units in the network in order to match demand, but the shift to modern, clean grids—characterized by the presence of significant renewable, but uncontrollable, generation—is beginning to necessitate a different approach.

Apload

Demand response

sTdr + 1                         

Power

system

1

Ms + D

 

 

R

Regulator

Figure 1: Power system with proposed demand response.

Fig. 1shows a block diagram of a power system with the proposed demand response function. In this system, a steam turbine produces mechanical power, pm, which is subsequently converted to electrical power at the synchronous frequency fs  = 50 Hz via a synchronous generator connected to the grid. The dynamics of the system cause the frequency f (t) to move away from the synchronous frequency whenever the power supplied does not match the power demanded by consumers; this is expressed in terms of deviation variables in the following linearized model:

 + DAa(t) = Apm(t) - (Apload(t)ì/(-) Apdr(t))

Net power demand

Af (t) = 50Aa(t),

where Af (t) expresses (in Hertz) the deviation from the synchronous frequency fs  = 50 Hz at time t, Apm(t) (in per unit (p.u.) — that is, normalized with respect to a base value of power) is the deviation from the nominal mechanical power output of the steam turbine at time t, and Apload  (in p.u.) is the deviation from the nominal net power demand (i.e., the difference between power demanded by consumers and power produced by uncontrollable renewable sources) at time t. The effect of the demand response is to reduce the latter; the physical mechanism for this is paying consumers to curtail their consumption: the (deviation in) net power demand is then Apload(t) - Apdr (t).

The control objective is to maintain frequency deviations, Af (t), close to zero despite perturbations to the load, i.e., non-zero values of Apload(t). To aid this, a governor controls the steam ow input to the turbine in response to the error between a reference mechanical power Apm,ref(t) and the regulated angular frequency deviation Aa(t)/R, where R > 0 is a regulation factor (i.e., feedback gain). This primary frequency control loop present does not, unfortunately, offer offset-free frequency control. (Why?) The aim is therefore to design a secondary frequency control loop that will adjust the reference power for the steam turbine, Apm,ref (t), and also the desired amount of load curtailment via demand response, Apdr,ref (t). To this end, a continuous-time state-space model of the system is given as:

d  !!      t       1/(0)Tt           10(/)M  ! !! dt  !A(A)p(p)dr(v)((tt!' =  /(0)Tdr!' !A(A)p(p)dr(v)((tt!'

Ac

+ !!1 Tg               !! A(A)p(p)r(r)e(e)f(f)t(t)+ !!-1M!! Apload(t)

 

ì/                                                                                                                                              ì/

Bc                                                                                    Ec

Af (t) = 50   0ìCc(/) 0   0!!!!' .

For the particular power system under consideration, the model parameters are M = 8, D = 0.8, R = 0.05, Tt  = 0.5, Tg  = 0.2, Tdr  = 0.25.

The steam turbine is limited in the amount of additional power it can provide, and the grid code specifies that the system frequency must remain at all times between the statutory limits of 49.5 Hz and 50.5 Hz. Moreover, the demand response cannot be negative, i.e., consumers may only reduce their usage and not deliberately increase it. This implies the constraints

IApm,ref(t)I < 0.5   and   Apdr,ref  > 0   and    IAf (t)I < 0.5.

Your task is to design, implement and tune an MPC controller for this system in order to meet this specification and provide offset-free frequency control in the presence of non-zero load perturbations Apload . Your design should adhere to the following guidelines:

 You may assume that the full state is measurable at each sampling instant.

• To obtain the discrete-time prediction model for controller, use a sampling time of 0.1 seconds and zero-order hold sampling. In MATLAB,

sysc  =  ss(Ac,[Bc  Ec],Cc,zeros(p,n));

sysd  =  c2d(sysc,0 .1);

[A,BandE,C]  =  ssdata(sysd);

B  =  BandE(:,1:m);

E  =  BandE(:,m+1:end);

• When simulating your controller, you may assume that the discrete-time model is an accurate representation of the plant; you do not need to simulate the effect of a sampled-data MPC controller on a continuous-time plant.

• In response to disturbances caused by step changes in Apload, the frequency may but ideally should not stray outside of the operational limits of 49.8 Hz and 50.2 Hz (IAf I < 0.2); it should settle back to 50 Hz with limited oscillation and as quickly as possible. The statutory limits of Af < 0.5 must be satisfied at all times.

• You should investigate the range of (step or otherwise) perturbations Apload that your design permits.

• Your design should consider the fact that using demand response to curtail the demand is much more expensive than using the steam turbine to meet the demand. For example, the recent trial of demand response run in the UK by Octopus Energy and National Grid ESO paid consumers £3.37 per kWh of demand reduction, whereas the daily system price paid to power producers is typically around £0.12 per kWh. How could your design take this into account?

• Your investigation could consider the effects of speeding up or slowing down the demand response (via changing the time constant Tdr). [25 marks]

Topic 2: Rocket landing control

The SpaceX company achieved the rst successful propulsive vertical landing of an orbital-class rocket stage in December 20151. The rocket in question, Falcon 9, is equipped with Merlin 1D rocket engines, capable of vectored thrust, and grid ns which deploy from the stage-1 fuselage following separation; these actuators allow sufficient control- lability of the rocket to permit a safe vertical landing. From a technical point of view, the successful landings were also enabled by theoretical advances in how the kind of nonlinear optimal control problem associated with safe rocket landing can be modelled and solved.2

A simplified model of the rocket landing problem—assuming that nose-up” stabi- lization is handled separately—views the rocket as a point mass, m, with position r  =  rx     ry     rz T   e  R3  and velocity v  =  vx     vy     vz T   e  R3 . The coordinates (x, y, z) e R3 are defined with z measured vertically upwards from ground (so z = 0 is sea level) and so that (x, y) is the lateral plane parallel to ground. The net thrust vector emerging from the engine is f = fx     fy     (fz - mg) T —where the z component is explicitly accounting for gravity—which causes acceleration of the mass according to the (discretized) dynamics

= ┐ ┌+  f + │(┌)y(x)

where I is the 3 x 3 identity matrix, 0 is the 3 x 3 matrix of zeros, and T is the sampling time, which you may assume to be 0.5 s, and wx, wy are the x and y components of a force exerted on the rocket by winds.

The aim is to steer the rocket from an initial position r(0) and velocity v(0) to the target ground position rt  = 0 at rest (vt  = 0). This should be done safely and at minimum fuel cost; that is, a number of constraints should be met during the mission:

 The engines are capable of exerting a thrust satisfying:

 limits on vertical thrust: 0 < fz/m < 12 N kg-1 .

 limits on lateral thrust:

Ifx I < fz tan 9   and    Ify I < fz tan 9

where 9 = 10 degrees is the maximum angle for thrust vectoring.

 The vertical speed shall not exceed 15 m s-1 in descent.

The lateral speeds, Ivx I and Ivy I, shall not exceed 20 m s-1 .

• In order to avoid premature ground collision, the positional trajectory shall respect a glide-slope constraint

IrxI < tan(rz) + 50   and    IryI < tan(rz) + 50

where  is the glide-slope angle, and is 30 degrees. Additionally, the altitude of the rocket must remain positive at all times:

rz  > 0.

Your task is to design, implement and tune an MPC controller for this system in order to achieve safe landing from initial altitudes up to 500 m and initial lateral distances up to 600 m from the target. You should investigate the feasibility of the mission for a range of different initial positions, non-zero initial velocities—representing the real situation of the rocket already having downward and lateral speed at the commencement of landing control—and wind scenarios. You might wish to consider that, although it is desired to minimize fuel, the landing should complete in nite (as opposed to infinite) time. You might wish to investigate whether the control performance benefits from specifying and tracking a reference trajectory. [25 marks]

Topic 3: Soft constraints

As seen in the lectures, the presence of state or output constraints on a system raises signficant challenges for the operation of an MPC controller; unless special care is taken, an MPC controller can take the system state into a region of the state space where the optimal control problem has no solution. At such a point, the controller fails and the system may violate the state constraints and lose stability.

On the other hand, it was argued in Chapter 1 that state or output constraints often represent soft requirements on the system: they are constraints that are undesirable but possible to violate. (Compare with input constraints, which often arise from physical limitations on actuators and may be impossible to violate.)

Your task is to design, implement and investigate an MPC formulation that allows soft state or output constraints. For example, if a system is subject to a constraint on x e Rn

Pxx < qx

then your MPC controller will model this as

Pxx < qx + e

where e > 0 is an additional variable (scalar or vector) in the MPC optimization problem; the idea is that e (and any other variables you introduce) are penalized in the objective function, such that constraint satisfaction is promoted (by preferring to keep e = 0 where possible) but constraint violation is allowed (by permitting e > 0 so that the

limits on x are relaxed). This could be achieved, for example, via the modied stage cost

xT Qx + uT Ru + eT Se + cT e.

Some relevant questions to consider:

• What additional variables, objective function terms, and constraints need to be introduced, and how should they be incorporated into the standard MPC objective function and constraints? How should S and c be chosen/tuned?

• How does the performance of the controlled system compare with that of a con- ventional hard-constrained setup? Does this controller x the problems caused by state constraints seen in the examples given in lecture notes? Are there any drawbacks?

• Is performance the same as that of a traditional hard constrained controller when the constraints are inactive?

• What properties does the soft-constrained controller have? Can stability guaran- tees be attained? [25 marks]