vademecum laboratory sessions

Upload: anonymous-hmg49c

Post on 02-Jun-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/10/2019 Vademecum Laboratory Sessions

    1/31

    Control System Design

    Introduction to the laboratory sessions

    Ir J. VerspechtControl Engineering and System Analysis Department

    Faculty of Applied ScienceUniversite Libre de Bruxelles (U.L.B.)

    Brussels, Belgiumcorresponding author email: [email protected]

    september 2012

  • 8/10/2019 Vademecum Laboratory Sessions

    2/31

    ii

  • 8/10/2019 Vademecum Laboratory Sessions

    3/31

    Contents

    1 Getting Started 31.1 What to do Before Turning On the Plant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.2 The Plant Interface Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.3 The Data AcQuisition Interface (DAQ Interface) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.4 The Matlab Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

    2 The Ball and Beam 72.1 Plant description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

    2.1.1 Intrumentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.2 Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

    2.2.1 Basic requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.2.2 More advanced requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

    2.3 Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.3.1 Infra-red distance sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.3.2 Current - velocity static characteristic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

    3 The Ball in the tube 113.1 Plant description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

    3.1.1 Intrumentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113.2 Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

    3.2.1 Basic requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113.2.2 More advanced requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113.3 Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

    3.3.1 Velocity sensor: Maxon motor DCT 22 tacho . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113.3.2 Infra-red distance sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123.3.3 Current - velocity static characteristic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

    4 The Elevator 154.1 Plant description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

    4.1.1 Intrumentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154.2 Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

    4.2.1 Basic requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154.2.2 More advanced requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

    4.3 Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154.3.1 Position sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154.3.2 Voltage - current static characteristic of the DC motor . . . . . . . . . . . . . . . . . . . . . . . 16

    5 The Heat Exchanger 175.1 Plant description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

    5.1.1 Intrumentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175.2 Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

    5.2.1 Basic requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

    iii

  • 8/10/2019 Vademecum Laboratory Sessions

    4/31

    iv CONTENTS

    5.2.2 More advanced requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175.3 Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

    5.3.1 Heating - air temperature static characteristic (without recycling) . . . . . . . . . . . . . . . . 17

    6 The Fluid Mixer 196.1 Plant description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

    6.1.1 Intrumentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

    6.2 Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196.2.1 Basic requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196.2.2 More advanced requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

    6.3 Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196.3.1 Opening - flow static characteristic of the valves . . . . . . . . . . . . . . . . . . . . . . . . . . 19

    7 The Home Temperature simulator 217.1 Plant description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

    7.1.1 Intrumentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217.2 Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

    7.2.1 Basic requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217.2.2 More advanced requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

    7.3 Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217.3.1 Heating - wall temperature static characteristic . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

    8 The DC motor position control 238.1 Plant description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

    8.1.1 Intrumentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238.2 Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

    8.2.1 Basic requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238.2.2 More advanced requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

    8.3 Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238.3.1 Voltage - velocity static characteristic of the DC motor . . . . . . . . . . . . . . . . . . . . . . 23

    9 System modeling and identification for dummies 259.1 Refresher . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

    9.1.1 Response of linear time-invariant systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259.2 System modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

    9.2.1 Modeling of linear time-invariant systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269.3 Identification procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

    9.3.1 Parameter estimation: the least-squares method . . . . . . . . . . . . . . . . . . . . . . . . . . 269.4 Example of identification using Matlab: program getdataexample . . . . . . . . . . . . . . . . . . . 269.5 Deal with a real plant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

    9.5.1 Properties of the plant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279.5.2 Identification experiment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279.5.3 Validation of the model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

  • 8/10/2019 Vademecum Laboratory Sessions

    5/31

  • 8/10/2019 Vademecum Laboratory Sessions

    6/31

    2 CONTENTS

    Capability to motivate and defend your design choices

    Capability to face unexpected problem dur the real nature of the system and to formulate hypothesis able toexplain anomalous behaviors

    Quality of the oral presentation

    Quality of the written report

    Quality of the proposed question to other groups

    Capability to asnswer questions

    Involvement in the project (evaluation done by the teaching assistant during the laboratory sessions)

    The final project mark is a personal evaluation and may vary depending on the individual performances.

  • 8/10/2019 Vademecum Laboratory Sessions

    7/31

    Chapter 1

    Getting Started

    1.1 What to do Before Turning On the Plant

    Before doing anything else, it is important to carefully analyze the system to be controlled and the related requiredspecifications. In particular it is very important to:

    1. have clear which are the sensors and actuators available

    2. have clear the specifications of the control (basic objectives, more advanced ones, other possible optional ob jec-tives it can make sense to define)

    3. to have an intuition of how the system works

    Part of the above information can be found in the plants description chapters.Before starting doing anything it is in general a good idea to plan an overall strategy it can be convenient to follow

    for the rest of the day. Very probably this strategy will be partially changed as things go on, but it is a good practiceto avoid trying things with no plans and no clear ideas in mind. The above steps may seem obvious, but most ofthe time people fail to reach objectives since they have not a clear plan of what to do. Clearly the main tasks are theidentification of the system and its control. In line of principle it is possible to perform these tasks in many different

    ways and sequences. The two extreme strategies are:

    to identify the entire model and then to focus on the control

    to identify a part of the model, to control the subpart and, one after the others, to identify the model pertainingto the various external loops.

    Depending on the plant and on the goals, it is possible to choose one strategy or the other, or to do somethingintermediate. This point is a design decision that is up to the students.

    Another thing should be said on the identification phase is that one can use both a black-box approach (withoutassuming any knowledge of the physics of the system) or a white/gray-box approach where considerations on thephysics of the system are done and used in a way more or less extensive. Whatever is the choice of your modelingis a good rule to predict which should be the system dynamics on the basis of the physics of the system. To havea good physical explanation of your findings helps to validate the correctness of your results and to explain possiblenonstandard behaviors.

    1.2 The Plant Interface Panel

    All the plants have a plant input/output interface panel composed of a set of female connectors. The formalisms usedfor all the electronical equipment in the lab is the following:

    Red female Connector : signal that comes out of the connector

    3

  • 8/10/2019 Vademecum Laboratory Sessions

    8/31

    4 CHAPTER 1. GETTING STARTED

    Yellow female Connector: signal that goes into the connector

    As a consequence in the plant interface panel:

    Red Connectors identify the signals from the sensors

    Yellow Connector identify the signals to the actuators

    For some of the plants, a set of green female plugs are placed as internal electrical connection to another green interfacecloser to the DAQ interface (can be used to avoid the use of long cables or of complicate connections).

    1.3 The Data AcQuisition Interface (DAQ Interface)

    In this course, all data acquisition and control functions can be done through Matlab. Clearly this is a simplificationof what may happens in more general digital control contexts where micro-controller programmed in C or in someassembly code could be used. The interface between the analog world represented by the Plant Interface Panel andthe computer will be the data acquisition/control board. The DAQ board used in the lab is composed of eightAnalog-to-Digital and two Digital-to-Analog converters ables to :

    measure voltages from 8 analog input channels

    set a voltage command on 2 analog output channels

    Following the previous formalism we will have that:

    The yellow female plug from 1-8 are the analog input channels

    The red female plug from 1-2 are the analog output channels

    Note that, the sensors of the plant panel interface (signal coming OUT OF the plant, red plug) have to be connectedwith the input of the acquisition board (signal going INTO the acquisition board, yellow plug), while the actuators(signal going INTO the plant, yellow plug) have to be connected with the output of the acquisition board (signalcoming OUT OF the acquisition boards, red plug).

    1.4 The Matlab CodeAfter the right connections have been performed it is possible to finally start with the data acquisition and the realtime control doing in Matlab. An example code to do this is provided to the students in the RealTimeLoop.m whosemain parts will be hereafter described.

    RealTimeLoop.m

    %***********************************************************************************************%% This part corresponds to the initialization of the experiment%***********************************************************************************************%openinout% The openinout command initializes the DAQ Analogic Inputs (8) and Outputs (2). Always remember to open

    % it otherwise it will not communicate with the Acquisition BoardTcycle=0.01;% This is the Sampling Time (s) you can choose. The minimum sampling time compatible with the acquisition% board is 10 msN0=4*3600/Tcycle;Data = zeros(8,N0);DataCommands = zeros(2,N0);% This part of code initializes 2 huge matrices (up to 4 h) to store the sensors signals (in Data)

  • 8/10/2019 Vademecum Laboratory Sessions

    9/31

    1.4. THE MATLAB CODE 5

    % and the actuator signals (in DataCommands)cond=1;% this is the initialization of the condition to remain in the loop. Whenever cond is set to zero we will exit from% the loopi=0;% counter initialization

    %***********************************************************************************************%% This part corresponds to the real timed loop%***********************************************************************************************%whilecond==1,% Untill cond==1

    tic;%Tic, initialize the time clock[in1,in2,in3,in4,in5,in6,in7,in8]=anain;% anain is the function to read the Measurements. It will give in output the 8 voltage value

    % PLACE YOUR CONTROL LAW HERE. It is a good engineering practice to make it as fast as possible% The controller will compute the value of out1 and out2 in the basis of the measurments% for instanceout1= 3*in1;

    out2= 0;

    anaout(out1,out2);% anaout is the function that applies the desired voltage on the card output channels

    %***********************************************************************************************%% Save in real time%***********************************************************************************************%

    % Saving in real time without memory constraints fill a previously initalized vector/matrix.% The following part of code is meant to save all the sensor measurements and the commands respectively% in the Data and DataCommands matrices.% Please note that this is very important to save datas in order to analyze and plot your results later on

    i = i+1;Data(:,i)=[in1,in2,in3,in4,in5,in6,in7,in8];DataCommands(:,i)=[out1,out2];

    %***********************************************************************************************%% End of Experiment?%***********************************************************************************************%

    % This part of code contains end experiment conditions that set cond to zero.% In this particular code the experiment ends when a voltage bigger then 1 is placed in the 5th input channel% Other stop conditions can be implemented if wished.ifabs(in5)>1

    cond=0;

    end

    %***********************************************************************************************%% Realization of a timed loop%***********************************************************************************************%

    % This last part of the cycle contains the instructions to guarantee the correct sampling time

  • 8/10/2019 Vademecum Laboratory Sessions

    10/31

    6 CHAPTER 1. GETTING STARTED

    t=toc;% it measure how much time passed from the beginning of the cycle.ift>Tcycledisp (Sampling time to small);% in the case computation time is higher than the sampling time, launch a warning% Adapt your sampling time or improve your programming if this warning repeats themselfelse

    whiletoc Tcycleend % wait untill next sampling timeend

    % DON T PUT ANY CODE HEREend

    %***********************************************************************************************%% Conclude the experiment%***********************************************************************************************%

    closeinout% At the end of the cycle close the DAQ Inputs and Outputs% to close the communication with the board is VERY IMPORTANT to avoid strange behaviours

    % Process the acquired dataData(:,i+1:end) = [];% Discard unused memoryDataCommands(:,i+1:end) = [];% Discard unused memorytps = 0:Tcycle:(i-1)*Tcycle;% Create the time scale

    . . . % THE REST IS UP TO YOU

  • 8/10/2019 Vademecum Laboratory Sessions

    11/31

    Chapter 2

    The Ball and Beam

    2.1 Plant description

    A small ball is placed upon a longitudinal gutter that constrains the displacements of the ball along its direction. Thepurpose is to control the position of the ball along the beam by adjusting its angle. The beam is attached at one end

    to a roller support, and at the other end to a slider that can move vertically along a linear guide by means of a ballscrew drive. The shaft of the ball screw is actuated by a current-driven DC motor. The objective of this plant is tostabilize the ball at an arbitrary position of the beam.

    2.1.1 Intrumentation

    Sensors:

    The velocity of the DC motor is measured by a tachometer generator.

    The horizontal angle of the beam is measured by a potentiometer.

    The position of the ball along the beam is measured by an infra-red distance sensor.

    Actuator: The slider is moved by a voltage/current ? DC motor.

    2.2 Specifications

    2.2.1 Basic requirements

    Stabilize the ball at any available position with no steady state error.

    Reject external disturbances with minimum oscillations.

    2.2.2 More advanced requirements

    Switch between to different set points with maximum 1cm overshoot.

    Switch between to different set points with maximum 0.5cmovershoot in maximum 1s.

    7

  • 8/10/2019 Vademecum Laboratory Sessions

    12/31

    8 CHAPTER 2. THE BALL AND BEAM

    2.3 Documentation

    2.3.1 Infra-red distance sensor

    Figure 2.1: Ball and Beam: Infra-red distance sensor

    2.3.2 Current - velocity static characteristic

  • 8/10/2019 Vademecum Laboratory Sessions

    13/31

    2.3. DOCUMENTATION 9

    Figure 2.2: Ball and Beam: Current - velocity static characteristic

  • 8/10/2019 Vademecum Laboratory Sessions

    14/31

  • 8/10/2019 Vademecum Laboratory Sessions

    15/31

    Chapter 3

    The Ball in the tube

    3.1 Plant description

    A light ball is placed within a tube constrainning its displasment. A fan generates a air flux capable of lifting the ball.The objective is to control the vertical position of the ball.

    3.1.1 Intrumentation

    Sensors:

    The velocity of the fan is measured by a dedicated velocity sensor.

    The position of the ball is meassured by means of an InfraRed distance sensor

    Actuator: The fan is actuated by the current driven DC motor.

    3.2 Specifications

    3.2.1 Basic requirementsStabilize the ball at any available position with no steady state error.

    3.2.2 More advanced requirements

    Switch between to different set points with maximum 1cm overshoot.

    Switch between to different set points with maximum 1cmovershoot in maximum 2s.

    3.3 Documentation

    3.3.1 Velocity sensor: Maxon motor DCT 22 tacho

    linearity between 500 and 5000 min1: 0.2%

    Output voltage per 1000 min1: 0.52V

    11

  • 8/10/2019 Vademecum Laboratory Sessions

    16/31

    12 CHAPTER 3. THE BALL IN THE TUBE

    3.3.2 Infra-red distance sensor

    Figure 3.1: Ball in the tube: Infra-red distance sensor

    3.3.3 Current - velocity static characteristic

  • 8/10/2019 Vademecum Laboratory Sessions

    17/31

    3.3. DOCUMENTATION 13

    Figure 3.2: Ball in the tube plant: Current - velocity static characteristic

  • 8/10/2019 Vademecum Laboratory Sessions

    18/31

    14 CHAPTER 3. THE BALL IN THE TUBE

  • 8/10/2019 Vademecum Laboratory Sessions

    19/31

    Chapter 4

    The Elevator

    4.1 Plant description

    A lift is placed between two vertcical guides. This lift is connected through a cable to a DC motor shaft. The objectiveis to switch between the three available floorlevel of an elevator.

    4.1.1 Intrumentation

    Sensors:

    position sensor: 1 global sensor for the lift and local sensors at each floor

    1 velocity sensor for the motor

    1 current sensor for the motor

    Actuator: The system is actuated by the voltage driven DC motorThe load considered as a distubance in the lift may be changed.

    4.2 Specifications

    4.2.1 Basic requirements

    Move to any floor with no overshoot and zero steady state error.

    4.2.2 More advanced requirements

    Limit the acceleration of the lift

    Generate the faster solution with limited acceleration.

    4.3 Documentation

    4.3.1 Position sensor

    The sensor is calibrated in such a way than one level correspond to 3V.

    ground level: 150mV

    first floor: 3.1V

    second floor: 6.05V

    15

  • 8/10/2019 Vademecum Laboratory Sessions

    20/31

    16 CHAPTER 4. THE ELEVATOR

    third floor: 9V

    Beware that mecanical security activates when you go to low or to high. So all the test have to be realized betweenthe first and the third floor ( [3.1, 9]V).

    4.3.2 Voltage - current static characteristic of the DC motor

    Figure 4.1: Elevator: Current - velocity static characteristic

  • 8/10/2019 Vademecum Laboratory Sessions

    21/31

    Chapter 5

    The Heat Exchanger

    5.1 Plant description

    The heat exchanger is composed of two circuits. The first one is an air circuit with possibility to partially recycledair. This circuit includes a heating section. The second circuit is a water circuit. Both circuit are interconnected by

    a heat exchanger between the air and the water. The objective is to deliver water at a given temperature.

    5.1.1 Intrumentation

    Sensors:

    4 Water temperature sensors: 1 at the entry, 1 after 33% and 1 after 66% of the exchanger and 1 at the exit.

    4 Air temperature sensors: 1 at the entry and 1 at the exit of the heating section an 1 at the entry and the exitof the exchanger

    Actuator: A warming resistor is installed on the air circuit.One may manually allow partial or full recycling of the air and variation of the water flow.

    5.2 Specifications

    5.2.1 Basic requirements

    Considering the delivery water flow constant and no air recycling, warm the water flow at a given temperature withzero steady state error and no overshoot.

    5.2.2 More advanced requirements

    Follow a water temperature trajectory (Simulating a given temperature profile for a chemical reaction)

    5.3 Documentation

    5.3.1 Heating - air temperature static characteristic (without recycling)

    17

  • 8/10/2019 Vademecum Laboratory Sessions

    22/31

    18 CHAPTER 5. THE HEAT EXCHANGER

    Figure 5.1: Heat exchanger: Voltage - Ait temperature static characteristic

  • 8/10/2019 Vademecum Laboratory Sessions

    23/31

    Chapter 6

    The Fluid Mixer

    6.1 Plant description

    The plant is composed of two pressurized tank containing two substances to mix. In this case both substances arewater where one is colored. The two tank are connceted to a mixing tank. The mixture is used by client. The objective

    is to control the level and the concentration (of colorant) of water in this mixture delivered to the client.

    6.1.1 Intrumentation

    Sensors:

    1 level sensor

    3 flow sensors: 1 for the water, 1 for the colorant and 1 for the delivery flow

    1 delivery flow concentration sensor

    Actuator: The system is actuated by 3 valves: 1 for the water, 1 for the colorant and 1 for the flow at the exit ofthe cylinder.

    The valve at the exit of the cylinder is manually fixed by the operator, the corresponding flow is considered as ameasurable disturbance.

    6.2 Specifications

    6.2.1 Basic requirements

    Reach any concentration with zero steady state error for a constant delivery flow. Stabilize the level to an arbitraryvalue with an error always lower than 1cm.

    6.2.2 More advanced requirements

    Deal with a varying delivery flow.

    6.3 Documentation

    6.3.1 Opening - flow static characteristic of the valves

    19

  • 8/10/2019 Vademecum Laboratory Sessions

    24/31

    20 CHAPTER 6. THE FLUID MIXER

    Figure 6.1: Fluid mixer: Opening - flow static characteristic

  • 8/10/2019 Vademecum Laboratory Sessions

    25/31

    Chapter 7

    The Home Temperature simulator

    7.1 Plant description

    The house-temperature simulator is composed of a copper tube representinf the house wall connected to a heatingring replacing the house heating system. The objective is to stabilize the air temperature inside a cylinder to any

    admissible temperature and reject the disturbances.

    7.1.1 Intrumentation

    Sensors:

    1 air temperature sensor

    1 temperature sensor of the wall

    Actuator: The system is actuated by a warming ring and a fan.

    7.2 Specifications

    7.2.1 Basic requirements

    Considering the fan as a disturbance, reach any higher temperature without overshoot and steady state error and inthe faster possible way.

    7.2.2 More advanced requirements

    Using the fan as a controllable input, reach any temperature (higher or lower) without overshoot and steady stateerror and in the faster possible way.

    Switch between to different set points with maximum 1cm overshoot.

    Switch between to different set points with maximum 1cmovershoot in maximum 2s.

    7.3 Documentation

    7.3.1 Heating - wall temperature static characteristic

    21

  • 8/10/2019 Vademecum Laboratory Sessions

    26/31

    22 CHAPTER 7. THE HOME TEMPERATURE SIMULATOR

    Figure 7.1: Home Temperature simulator: Heating - wall temperature static characteristic

  • 8/10/2019 Vademecum Laboratory Sessions

    27/31

  • 8/10/2019 Vademecum Laboratory Sessions

    28/31

  • 8/10/2019 Vademecum Laboratory Sessions

    29/31

    Chapter 9

    System modeling and identification fordummies

    Introduction

    Given a certain system1, modeling somehow attempt to characterize the link between the inputs and the outputs.The aim of modeling and identification is to find a link one may use in order to predict the output of a system byknowing only the inputs. This model can be used for simulation, model based controller design, ...

    The present document addressed an introduction to modeling and identification. It will present only one structureof model namely the ARX model and only one method for the identification of the parameter of such a model.

    9.1 Refresher

    9.1.1 Response of linear time-invariant systems

    Consider the system with a scalar input u(t) and the scalar output y(t). The system is linear time-invariant if:

    linearity property if for a linear combination of inputs the output response is the same linear combination of theoutput responses of the individual inputs

    time-invariant property if the response of a system to a certain signal do not depend on absolute time

    Finally a a system is said to be causal if the output at a certain time only depends ont the inputs up to that time.Under all this conditions the response of the system can be described by:

    y(t) =

    0

    g()u(t )d (9.1)

    where g() is known as the impulse response. Consequently the impulse response of a linear time-invariant causalsystem completely defined its input/output response.

    Taking the Laplace transforms Y(s) = L(y(t)), U(s) = L(u(t)) and G(s) = L(g(t)), one obtains:

    Y(s) = G(s)U(s) (9.2)

    G(s) is also refered as the transfer functionof the linear system (9.1).

    1Not formally, a system is an object affected by external stimuli in which variables of different kinds interact and produce observablesignals. The observable signals of interest are calledoutputs, while the stimuli are divided in two part: the inputs (possibly manipulated)and the disturbances

    25

  • 8/10/2019 Vademecum Laboratory Sessions

    30/31

    26 CHAPTER 9. SYSTEM MODELING AND IDENTIFICATION FOR DUMMIES

    9.2 System modeling

    9.2.1 Modeling of linear time-invariant systems

    A common way of parameterizing G is to represent it as a rational function. A simple input-output relationship isobtained through an Ordinary Differential Equation (ODE):

    a0y(t) +a1 dydt

    (t) +a2 d2

    ydt2

    (t) + +ana dna

    ydtna

    =b0u(t) +b1 dudt

    +b2 d2

    udt2

    + +bnb dnb

    udtnb

    (9.3)

    The parameters are in this case:= [a0, a1, . . . , ana, b0, . . . , bnb ] (9.4)

    The corresponding transfert function is:

    G =

    nb

    i=0bis

    ina

    i=0aisi

    (9.5)

    One way to predict the output y(t) is:

    y(t, ) = L1(G(s)U(s)) (9.6)

    9.3 Identification procedure9.3.1 Parameter estimation: the least-squares method

    Considering the sampled signals u(k) (the input) and y(k) (the output) (k = 1,2,. . . ,N, the sampling instant) andusing the prediction (9.6), the prediction erroris defined by:

    (k, ) = y(k) y(k, ) (9.7)

    Using as cost function a quadratic function of the prediction error (9.8), the optimal parameters LS in the leastsquare sense is defined by (9.9).

    JLS() =

    N

    k=1

    2(k, ) (9.8)

    LS =argmin(JLS()) (9.9)

    9.4 Example of identification using Matlab: program getdataexample

    Lets consider the continuous-time system defined by its transfer function sys.

    sys(s) = Y(s)

    U(s)=

    1

    s+ 1 (9.10)

    The step response of such a system for t 0 is (9.11) when the system is at rest for t

  • 8/10/2019 Vademecum Laboratory Sessions

    31/31

    9.5. DEAL WITH A REAL PLANT 27

    9.5 Deal with a real plant

    Here is a common methodology for the identification of linear time-invariant model (LTI model):

    1. Verify the properties of the plant.

    2. Make one experiment to characterize the plant (at least)

    3. Validate the result of the identification

    9.5.1 Properties of the plant

    The first step in order to identify a LTI model is to verify that the plant is indeed linear and time-invariant.

    Linearity

    It may be sometimes quite complicate to affirm that a plant is linear. The nonlinearities of a real plant can roughlybe split in two categories: a static gain dependent of the input or a time response dependent of the input. To checkthe dependency of the static gain, one way is the static characteristicof the plant. For the dependency of the timeresponse, one should check the dynamical response for different amplitude of input signals.

    Time-invariance

    The time-invariance is often assumed to be fulfilled but from time to time some experiment are required to assess thevalidity of this assumption.

    9.5.2 Identification experiment

    Books exist on the design of a experiment in order to perform an identification. The aim of this chapter isnt topresent all the technics but only to informed about the basics properties of the experimental input.

    First,one have to use a input signal who dont violate the LTI properties. Second, the input has to fully excitethe plant. One way to achieve these properties is by using a step response between two values within the linearbehavior of the plant.

    9.5.3 Validation of the model

    After running the identification procedure, one have to validate the results they obtain. The easiest way is by visuallycompare the response of the model of the plant with some real response (with the same inputs). One can also useddifferent experiments for the identification and the validation, in this case you performed cross validation.