• Aucun résultat trouvé

1.2Elementarysystem 1Preliminarywork Introduction 1.1Software Predictivecontrol Practicalwork:predictivecontrolENSPS3A/MasterIRIVAR

N/A
N/A
Protected

Academic year: 2022

Partager "1.2Elementarysystem 1Preliminarywork Introduction 1.1Software Predictivecontrol Practicalwork:predictivecontrolENSPS3A/MasterIRIVAR"

Copied!
3
0
0

Texte intégral

(1)

TP ENSPS ISAV / Master IRIV 1

Practical work : predictive control ENSPS 3A / Master IRIV AR

Predictive control

Introduction

The goal of this practical work is to learn the basic concepts of predictive control. It’s the GPC (Generalized Predictive Control) that will be studied.

1 Preliminary work

1.1 Software

• Switch on the PC. Boot the Ubuntu distribution.

• Login.

• Launch a terminal.

• Download the archive on the web server (ask for the link).

• Extract the files with tar zfxv <file name>in a personal directory you created.

• Go into the extracted directory withcd gpc.

• You can compile with make -f <Makefile.xxx>where xxxis the executable you want to generate.

• You can launch Matlab by typingmatlabin a terminal.

1.2 Elementary system

We start with an elementary system constituted only by a delay. LetG(z) =z1.

• Put this system in CARMA form. Give the expressions ofA(q1)andB(q1).

• Find this system prediction equation : yˆ=G˜u+ ˆf with ˆ

y= [ˆy(t+ 1), ...,y(tˆ +N2)]T the vector of the output predictions

˜

u= [∆u(t), ...,∆u(t+Nu−1)]T the vector of the control increments ˆf = [ ˆf(t+ 1), ...,fˆ(t+N2)]T the vector of the free response samples and

G aN2×Numatrix.

IntegersN2 etNu are respectively the optimization and the control horizons..

• For λ = 0 (no influence of control signal energy in the cost function) and for Nu = N2, determineu˜opt.

• Only the first sampleu˜is applied to the system. Determine the control lawu(t) =F(u(t−1), r(t+ 1), y(t)) withr(t+ 1)the reference one step ahead in the future.

• With a constant reference equal to zero, determine the equivalent transfer functionU(z)/Y(z).

What is the class of this system ? What kind of disturbance is it able to reject ?

(2)

TP ENSPS ISAV / Master IRIV 2

1.3 System with one integrator

In this section we will treat the case of a pure integrator system : G(z) =1z−1z−1.

• Rewrite this system in the CARMA form. Give the expressions of A(q1)andB(q1).

• Write the prediction equation : yˆ=G˜u+ ˆf.

• Verify that Gis constituted by the samples of the system step response.

• Forλ= 0and forNu=N2, calculateu˜opt.

• Numeric application : N2 = 3, r = [0 1 1]T. Give the expression of u˜opt if the initial condition is null. Simulate the response of the system to the control signalujust calculated.

Conclusion ? Same question with N2 = 10, r= [0 0 0 0 0 1 1 1 1 1]T. Same question with forλ= 1. Use the scripting features ofmatlabfor this question.

2 C code simulation

This program is used to test the behavior of the GPC controller with various types of systems. It uses functions that are coded in the filegpc.c. This code is generic, it can be used on every kind of system. For example it was used to control of a medial robot for beating heart surgery. The source

can be freely downloaded from the AVR website (http://eavr.u-strasbg.fr/->Recherche->Ressources).

2.1 Integrator

• Open the fileintergrateur.c.

• Try to understand its architecture. Indications : Init_gpc Dimensions initialization

na Dimension ofA(q1)

nb Dimension ofB(q1)

nc Dimension ofC(q1)(nc >0)

m Number of inputs

n Number of outputs

hi N1(N1= 1in this practical work)

hc Ni, control horizon

hp N2, optimization horizon

Lambda Control energy ponderation

Calcul_gpc Optimal gain computation (see ingpc.c) NB_PAS_SIMULATION Number of iterations of the simulation Correcteur_gpc Current control signal computation Simu Simulation of one sampling time

• Compile this program withmake -f Makefile.integrateur.

• Launch this program withintegrateur>integrateur.out.

• Load the simulation output data in matlabwith>>load integrateur.out.

• Visualize the simulation result inmatlab with>>plot(integrateur). Check that it is the same than the one obtained in the previous section.

• Define λ= 1. Simulate. Visualize.

• Verify the expression ofGby uncommenting lines 516–517 ingpc.c. Comment them again after the simulation. Conclusion ?

(3)

TP ENSPS ISAV / Master IRIV 3

2.2 Low damped system

In this section, we will study GPC control of a system with a very small damping factor. Its transfer function is :

G(z) = 9.606.103z1+ 2.354.102z2+ 2.965.103z3 1−2.046z1+ 1.169z2−0.09z3

• Simulate the system step response in open loop using simulink.

• Open file mono.c.

• Compile this program.

• Launch the simulation and visualize the results usingmatlab. Comment.

• Simulate a step disturbance by uncommenting lines 191–193 inmono.c.

• Increase then decreaseλ. Comment.

• Increase then decreaseN2. Comment.

• Increase then decreaseNu. Comment.

• Revert to initial values (λ= 0.01,Nu = 20, N2= 70). This time, instead of a step distur- bance, program a white noise of amplitude 0.1 (man 3 randis your friend). Simulate the response with c1=−0.1 etc1=−0.999. Conclusion.

2.3 2 inputs 2 outputs system

• Open the filemulti22.c

• Compile. Simulate. Visualize. Comment.

• Try other values for the tuning parameters.

2.4 2 inputs one output system

• Open the filemulti21.c

• Compile. Simulate. Visualize. Comment.

2.5 1 input 2 outputs system

This system is uncontrollable. However, it is possible to compute a GPC control for it.

• Open the filemulti12.c

• Compile. Simulate. Visualize. Comment.

Références

Documents relatifs

Afin d’évaluer l’impact de la nature du départ sur les politiques comptables dans le contexte d’un changement de dirigeant, le tableau 5 présente les tests de différences entre

The rest of the chapter is devoted to validation. In section 6.3, we make the first steps to validate the clutch torque transmissibility model itself. To that purpose, a

We will further study the modelling and control of a passive body directly controlled by thrusters and then analyse the problem of manipulation of a passive object with two

Model Predictive Control (MPC) was used for rendezvous and docking along with collision avoidance problem using hard constraint method.. With respect to the above discussed papers

In this work, we consider the application of the Particle Swarm Optimization algorithm to the NMPC optimisation problem model applied for the quadcopter tracking trajectory

In this work, we consider the application of the Particle Swarm Optimization algorithm to the NMPC optimisation problem model applied for the quadcopter tracking trajectory

This article addresses the fast on-line solution of a sequence of quadratic programs underlying a linear model predictive control scheme.. We introduce an algorithm which is tailored

In Pa rt II of the thesis, an in-depth simulation-based investigation is car r ied out to evaluate t he performance between two control struc tures : 'model