2012_control systems analysis and design labs with educational plants

Upload: ademargcjunior

Post on 06-Jul-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/17/2019 2012_Control Systems Analysis and Design Labs With Educational Plants

    1/6

     

    Control Systems Analysis and Design Labs with Educational Plants

    M. Sotnikova, N. Zhabko and T. Lepikhin

    Faculty of Applied Mathematics and Control Processes,

    Saint-Petersburg State University, Saint-Petersburg, Russia.

    (e-mail: [email protected])

    Abstract:  This article is devoted to using of the special laboratory plants in control education. The

    complex of control system analysis and design labs is presented, where each lab deals with one of the

    experimental control plants. The brief description of the plants is given and their main features areanalyzed from the control point of view. The substantial formulations of the labs, which are discussed in

    the paper, include the problems of system identification, digital control systems design, signal processing

    and real-time implementation. The advantages of using MATLAB environment for the problem solution

    are pointed out. Finally, the examples of the labs are presented.

    Keywords: educational plants, control design labs

    1. INTRODUCTION

    Real plants are invaluable in control education because they

    allow students to make sense of essential problems which

    appear in the control of real objects. Usually, educational

    control objects are relatively simple compared to real

    industrial control plants; nevertheless, they reveal all the

    typical control challenges such as unaccurate knowledge of

    the mathematical model, sensor noise, external disturbances,

    input and output constraints, etc.

    Educational plants are very useful for both teaching process

    and research (Veremey, 2008). Performing the labs the

    students are faced with a whole spectrum of control system

    design and implementation problems. The researches have an

    opportunity to test any control algorithm or perform the

    identification procedure, etc. for real control object.

    This article deals with the complex of control systems

    analysis and design labs. The main goal of the proposed labs

    is an application of the control theory methods to the analysis

    and design of control systems for educational plants. This

    complex can be used in educational process for teaching

    students, who specialize in the area of dynamical systemscontrol and its applications.

    The control system design problem for a particular plant

    includes a lot of sub-problems, the most serious of thembeing system identification, digital control system analysis

    and synthesis, signal processing and real-time

    implementation. A lot of different lab courses can be

    constructed on the basis of the proposed labs depending on

    the course specifics – the general understanding of control

    design problem for real plants, system identification orothers.

    The paper is organized in the following way. Firstly, a briefdescription of educational plants as control objects is

    presented, and their most important characteristics from the

    control point of view are outlined. Secondly, the substantialformulations of the labs problems are given for each of the

    areas mentioned above. Thirdly, the advantages of using

    MATLAB for the analysis and synthesis of the control

    systems are discussed. The last section contains some

    examples of labs, which are devoted to control system design

    for a magnetic levitation plant and programming movementsfor a robotic manipulator.

    2. EXPERIMENTAL EDUCATIONAL PLANTS

    In the framework of the proposed labs the following

    educational experimental plants are used:

    •  magnetic levitation plant;

    •  rotary flexible joint system;

    •  ball and beam system;

    •  robotic manipulator FANUC M-20iA.

    These plants are intensively used for control education at the

    Information Processes Modelling Laboratory at the Faculty of

    Applied Mathematics and Control Processes, Saint-

    Petersburg State University.

    Fig. 1. Magnetic levitation plant.

    Proceedings of the 9th IFAC Symposium Advances in ControlEducationThe International Federation of Automatic ControlNizhny Novgorod, Russia, June 19-21, 2012

    978-3-902823-01-4/12/$20.00 © 2012 IFAC 212 10.3182/20120619-3-RU-2024.00088

  • 8/17/2019 2012_Control Systems Analysis and Design Labs With Educational Plants

    2/6

     

    Let us consider these plants in more details. The magnetic

    levitation system is shown in Fig. 1. The main components of

    system are – an electromagnet above, a pedestal below,

    where the ball rests initially, and a steel ball. The aim of the

    control is to stabilize the ball position in a particular point

    between the electromagnet and the pedestal by means of the

    controlled voltage which is applied to the electromagnet.

    Magnetic levitation system (MAGLEV, 2007) has a current

    sensor and an optical sensor, which measure the current in the

    electromagnet and the distance between ball position and the

    electromagnet surface respectively. The optical sensor is very

    sensitive to changes in temperature and light conditions, andits measurements are very noisy. It is important to notice that

    the magnetic field created by the electromagnet is non-

    uniform, especially near the magnet surface. Consequently it

    is quite difficult to describe it mathematically. Thereby the

    corresponding mathematical model of the control process is

    essentially nonlinear. One more important feature of thesystem is the ball vertical position unstability.

    The rotary flexible joint system is an educational plant where

    a pendulum can oscillate on a rotating platform. This plant isshown in Fig. 2 (left). The motion of the pendulum is limited

    by two springs which connect it to the rotating platform. The

    goal of the control is to deflect the pendulum at the given

    angle and to stabilize it in the vicinity of the new direction. In

    order to obtain the desirable goal, it is necessary to control

    the rotations of the platform. This plant has two sensors. Thefirst of them measures the angle of the pendulum deflection,

    while the second one measures the angle of the platform

    rotation. Both sensors are very noisy, causing the main

    difficulty in the control of the considered object. Besides, the

    structure of the differential equations, which represent themathematical model of the control process, is not so evident,and it is necessary to perform the system model identification

    first. The quality of the control processes in this case is

    determined, among other things, by the level of the

    oscillations in the transient responses.

    Fig. 2. Rotary flexible joint system (left) and Ball and Beam

    system (right).

    A ball and beam system is one of the most populareducational plants. In it a steel ball rolls on the top of a long

    beam. The beam angle can be adjusted by applying control

    signal to the electrical motor. The goal of the control is to

    move the ball to the desired position and to stabilize it in the

    vicinity of that point. The ball position on the beam is

    measured by the ultrasonic range sensor. The measurements

    of this sensor are extremely noisy and can give estimations ofthe position with the essential errors. At the same time, the

    mathematical model, describing the dynamics of the control

    processes, is quite simple and suitable for educational

    purposes. The notable feature of this plant is its open-loop

    instability, i.e., if the beam angle is fixed, the ball rolls down

    until it reaches the end point of the beam.

    Each of these plants has the required hardware to transfer the

    information from the sensors to the computer and, vice versa,to bring the control signal from the computer to the plants. In

    addition, each plant has necessary software to calculate the

    control signal on the basis of the measurements and

    additional software support providing the interface with the

    MATLAB environment. Thus, the control system design and

    analysis can be performed using MATLAB, and, after that,control algorithms can be easily implemented for plants real-

    time control. It can be noted that all plants are digital control

    systems, so the methods of digital control theory must be

    used for its analysis and synthesis.

    The industrial robotic manipulator FANUC M-20iA (Fig. 3)

    is widely used in the educational process in a number of

    courses for preparing IT-specialists (Lepikhin, 2009). Thespecial significance of the proposed courses is determined by

    their practical orientation, related to the direct interactionwith real information systems. Dealing with the robotic one

    should develop software using the specific programming

    language with structures like loops, conditional statements,

    labels, special instructions and interaction with external

    interfaces of the robotic.

    Fig. 3. Robotic manipulator FANUC M-20iA.

    3. LABS PROBLEMS FORMULATION

    The basic labs directions are system identification, analysis

    and synthesis of the digital control algorithms, digital signal

    processing and real-time implementation. For each directionthe substantial formulation of the labs problems is presented

    below.

    3.1. Plant model identification

    The first problem that appears when someone starts to work

    with a new plant is to obtain its mathematical model. Most

    educational plants have no documentation where their

    mathematical models are described. In other cases, when

    some initial mathematical model is presented, it is often

    necessary to significantly improve it.

    9th IFAC Symposium Advances in Control EducationNizhny Novgorod, Russia, June 19-21, 2012

    213

  • 8/17/2019 2012_Control Systems Analysis and Design Labs With Educational Plants

    3/6

     

    In the framework of the lab, the problem of model

    identification (Ljung, 1999) can be divided into the following

    steps.

    1) Getting the structure of the equations which are constitutes

    the mathematical model of the plant in the form

    ( )kuxf x ,,,t = , (1)

    wherenEx∈ – state vector,

    mEu∈ – control input, r Ek∈  

    – vector of parameters, which values must be estimated

    during the process of identification. Equations (1) are mainly

    formed on the base of priory knowledge about the object

    dynamics and the basic physical laws.

    This problem is quite complicated for some devices, for

    example, for the magnetic levitation plant. This is due to the

    fact that the magnetic field near the magnet is extremely

    difficult to describe, thus the corresponding mathematical

    model representing ball dynamics nearby the magnet has a

    very complex structure.

    Let us consider that the structure of the equations (1) reflects

    the control object dynamics within certain limits. In

    particular, the equations (1) can be linear and represent theobject dynamics in the vicinity of equilibrium point.

    2)  Experiment design and implementation  on the plant, and

    data gathering for identification. At this stage the following

    key questions regarded to experiment design should be

    considered:

    •  method of carrying out the experiment – in an open-loop

    or in a closed-loop. For instance, for magnetic levitation

    system the experiment can be performed only in closed-loop because of the ball vertical position instability;

    •  data for identification – which data should be gathered foridentification, and which signals are considered as input

    and output. Besides, an important question is how many

    variables should be measured in order to estimate all the

    parameters of the model (1);

    •  input signal selection. The standard choice is between thestep, harmonic or random binary signals. It is important to

    note that the probabilistic properties of the estimations of

    the parameter vector k  in (1) are strongly depend on theinput signal selection. So, the problem is how to choose

    the input signal in order to remove the biases of the

    estimations and to minimize their dispersion.

    3)  Model (1) parameters identification using experimental

    data. The identification can be performed, for example, on

    the base of the standard methods, which are implemented inthe System Identification Toolbox of the MATLAB package.

    4) Verification of the obtained model. The verification is

    usually realized by comparison of the identified model output

    and the plant output for given input signal. This proceduregives the information about how obtained model reflects

    dynamics of the plant.

    Assume that the mathematical model of the form (1) is

    obtained as a result of the identification procedure. Let’s

    consider the following discrete-time analog that can be

    constructed on the base of model (1)

    ( )k k k  k  uxf x ,,1 =+ , (2)

    wheren

    k  Ex ∈ – state vector,m

    k  Eu ∈ – control input at the

    sample instantk 

    . In the further discussion model (2) is used

    as a base for analysis and synthesis of the digital control.

    3.2. Analysis and synthesis of the digital control

    The problems of digital control analysis and synthesis are

    considered in the proposed labs with the help of Control

    System Toolbox of the MATLAB package.

    Let us look at the most important questions of the control

    system analysis:

    •  stability analysis. Here the question of stability can be

    considered with respect to the nonlinear model (2) or its

    linearization in the vicinity of the operating point ortrajectory;

    •  controllability and observability analysis. Here the

    conditions of full controllability and observability are

    checked and the questions of system stabilizability and the

    necessary content of measurements are investigated.

    Now let us talk about the problems related to the synthesis of

    the digital control systems. The key problem that should be

    treated for the experimental devices is synthesis of stabilizing

    feedback control. Thus, for the magnetic levitation system,

    the feedback control law should provide ball position

    stabilization at a given distance from the electromagnet, for

    the rotary flexible joint system – fix the pendulum with the

    given rotation angle and for the ball and beam system –stabilize the ball position at the desired point on the beam.

    The other synthesis problem of interest is development of

    program control algorithms and realization of the program

    movements for the educational plants.

    When the problems of control synthesis are discussed, thefollowing important issues must be taken into account –

    closed-loop system stability, control processes quality, input

    and output constraints, external disturbances, computational

    complexity of the control algorithms from the real-time

    implementation point of view.

    Now assume that the control synthesis problem is solved.

    Then the next step, preceding practical implementation of the

    obtained control algorithm, is the mathematical modelling of

    the control processes in the closed-loop system. The mostsuitable environment for such a task is a subsystem Simulink

    of the dynamic simulation from the MATLAB package.

    3.3. Digital signal processing

    The problem of signal processing in the framework of theproposed labs appears due to the presence of the significant

    noise in the measurements of sensors, which are used on the

    experimental plants. It’s obvious that the measurement noise

    influences the quality of the control processes. Consequently,

    the main goal is the measurement noise filtering. Thefollowing questions can be considered during the labs:

    9th IFAC Symposium Advances in Control EducationNizhny Novgorod, Russia, June 19-21, 2012

    214

  • 8/17/2019 2012_Control Systems Analysis and Design Labs With Educational Plants

    4/6

     

    •  estimation of the noise spectral characteristics. This

    problem can be solved, for example, by constructing aspectrum of the signal generated by the sensor when the

    controlled object is placed at the equilibrium point;

    •  measurement signals filtering. Here the problem of filter

    design on the base of the estimated spectral characteristics

    of the noise should be treated. The standard MATLABtools can be involved for this problem solution.

    It can be noted that the designed filter should be tested by

    means of mathematical modelling using Simulink before the

    practical implementation.

    3.4. Real-time implementation

    The significance of this question is explained by the fact that

    all of the considered experimental plants are digital control

    devices operating in real-time. In this connection it is critical

    that the computational time required for calculating control

    signal should not exceed the sampling interval of the

    corresponding digital control system. This fact imposes theadditional constraint on the used control algorithm, which

    must be quite simple. If the computational consumptions,

    required for control calculations, exceed the samplinginterval, then it’s necessary either to tune control algorithm

    parameters or to optimize the algorithm in order to reduce the

    computational time.

    In the framework of the labs, each designed control algorithm

    can be tested in terms of possibility of its implementation in

    real-time. This task can also be done on the base of

    MATLAB/Simulink modelling complex with the additional

    measurements of computational time, required at each sample

    instant for control input calculating.

    4. ANALYSIS AND SYNTHESIS USING MATLAB

    All discussed plants can successfully function with the helpof modern program packages such as MATLAB. MATLAB

    is regarded as the standard instrument for supporting of

    technical calculations and can be used as the base

    environment for working with labs with the experimental

    plants. MATLAB package provides an extensive range of

    industry-standard tools and algorithms for analysis and

    design in control and signal processing and can be intensively

    exploited in different directions while preparing labs, such as

    • 

    mathematical modelling of plants;

    •  software support implementation for all methods and

    corresponding algorithms for analysis and design of the

    elements of control systems for the plants;

    •  computer models construction of all elements of the

    designed dynamic systems, including the subsystems for

    data acquisition and signal processing.

    While working in each direction the students can carry out

    numerous experiments, running different scenarios for the

    plants, which can be illustrated with graphical visualizing and

    digital performance of the processed data.

    The following problems can be solved in labs by means of

    MATLAB tools:

    •  Making simple calculations such as array operating,

    finding of eigenvalues, determinants of square matrices,solutions of the equations and the systems of equations,

    Laplace and Fourier transformations, operating with

    polynomials, integrating and etc. on the basis of the wide

    spectrum of mathematical functions, realized in MATLAB

    package.•  Executing different steps in mathematical modeling. For

    example, it can be parameter or structure identification of

    the considered linear and nonlinear systems from

    measured input-output data on the basis of System

    Identification Toolbox, where the most popular algorithms

    for identification are realized, and linearization of the

    available nonlinear models in the vicinity of the operating

    point or motion.

    •  Analysis and synthesis for continuous or discrete linear

    time-invariant models (LTI-objects) of plants with the help

    of instruments of Control System Toolbox. This toolbox

    provides a lot of standard algorithms for analyzing

    stability, controllability, observability, constructing ofdifferent characteristics, such as zeros and poles of the

    LTI-object, its frequency response, gain and phase margins

    etc. The control laws design can be based on the decisions

    of problems of modal control, LQR/LQG optimization,

    PID-control. While working with the toolbox the LTI-

    objects can be described in the different forms in time

    domain or frequency domain.

    •  Analysis, signal processing and synthesis for continuous or

    discrete models of plants, including alternative techniques

    for LTI-objects, with the help of instruments of the other

    toolboxes. On the basis of the toolboxes in MATLAB onecan provide the development of the various modern

    techniques for considered systems, such as design andsimulating model predictive controllers, design and

    simulating fuzzy logic systems. The special attention when

    exploring LTI-objects should be paid to design of robustcontrollers for plants that can have model uncertainty.

    •  Adaptation and modification of the algorithms, provided in

    MATLAB, taking into account the characteristics of the

    considered task, and implementation of the new

    computational algorithms.

    •  Simulation of the dynamic processes in continuous anddiscrete time in the designed control systems. It can be

    performed in the special system Simulink in MATLAB

    package. Simulink allows investigating the dynamics of

    the entire closed-loop systems with the designed

    controllers in the real-time operation mode. One can

    validate the constructed models of the plants and designedcontrollers by verifying the plant behavior and the graphic

    and digital representation of its dynamic parameters. To

    improve characteristics of the controller and other

    elements of the entire closed-loop system one can tune

    their parameters using the parametric optimization

    approach, which is performed by the subsystem Simulink

    Response Optimization.

    There can be noted the following aspects of using

    MATLAB/Simulink system in student’s research work

    with the experimental plants:

    9th IFAC Symposium Advances in Control EducationNizhny Novgorod, Russia, June 19-21, 2012

    215

  • 8/17/2019 2012_Control Systems Analysis and Design Labs With Educational Plants

    5/6

     

    •  The variety and simplicity of calculations, which can be

    performed in MATLAB/Simulink system, allow to realizesimply the studied notions and mathematical formalized

    tasks as well as the whole complex of actions and

    calculations that should be made when investigating the

    educational control plants, and, thus, the real industrial

    control plants.•  One of the main features of MATLAB is its orientation on

    the effectiveness of array calculations, executing in this

    environment. So, there is a great spectrum of appropriate

    embodied methods in MATLAB, and the operations with

    vectors and matrices are extremely fast and simple. The

    essential part of computing in applying the algorithms for

    LTI-objects, which form the important class of control

    plants models and certainly should be exploited during

    executing of the labs, is presented by array calculations.

    The mentioned MATLAB’s feature then provides great

    possibilities for students to handle with LTI-objects and

    study of many various tasks for such plants, easily and

    quickly performing calculations and visualizing the resultsin MATLAB.

    •  Realizing the calculations of the same type for varying

    data within the framework of some method for the

    considered educational plant, students can compare the

    results and get the peculiarities of using the studied

    approaches in practice. The necessity of applying the

    formalized mathematical methods for analyzing, signal

    processing and synthesis for the experimental control

    plants makes the students understand the advantages and

    disadvantages of the analytic approaches and algorithms,

    and the ways of getting round the appeared difficulties.

    5. LABS EXAMPLES

    Each lab is started with the brief theoretical introduction to

    the considered control problem and different well-known

    approaches for it solution. The lecturer points out the keydifficulties and discuss with the students the advantages and

    disadvantages of the different approaches. After that, the

    lecturer presents in more details some particular approach

    and has a discussion with the students how they can apply

    that method for the specified educational plant. At this stage

    students start to formulate control problem mathematicallyfor the particular plant and try to solve it using the proposed

    approach. They try to implement the obtained solution byperforming simulations in the MATLAB/Simulink

    environment. Lecturer verifies received results and guides

    students if they have some mistakes. If students perform the

    first part successfully, they attempt to implement theproposed approach to the real educational plant. At this step

    they are faced with a lot of challenges and realize that the

    simulation results differ with the ones they can see for the

    plant. It is the most interesting part of the lab when the

    students try different ways in order to avoid difficulties and

    to get satisfactory results. Usually lab is performed by severalgroups of students. At the end of the lab the students from

    each group present the work they have done.

    Lab classes have interactive form of education. Students areencouraged to have a discussion with the lecturer and each

    other, so they are very active. Labs classes are very

    interesting for both students and lecturers.

    Let us consider magnetic levitation system control design lab

    as an example. The opening challenge is the identification of

    the parameters of linear model (Sotnikova, 2009), which

    describes the process dynamics near the operating point

    009.00 =b x   . Such a linear model is varied in dependence

    of the distance from the electromagnet. The first step of

    identification is the gathering of the experimental data. The

    data that are used for the identification in this case are shown

    in fig. 4. These data include the measurements of the ball

    position and the coil current on the time interval with the

    duration of 50 sec. Here the random binary sequence was

    used as the input signal. The next step is data pre-processing,

    which results in zero mean data sequences. The obtained data

    is used further in linear model identification.

    150 155 160 165 170 175 180 185 190 195 200  7 

    10 

    11x 10 

    -3 

    t (s)

       x    b 

        (   m

        )

    Ball position and Reference signal 

    150 155 160 165 170 175 180 185 190 195 200  0.8 

    0.9 

    1

    1.1

    1.2 

    t (s)

        I    (    A    )

    Coil Current 

     

    Fig. 4. Experimental data for linear model identification.

    Parameters estimation of the linear model can be performed

    with the help of the prediction error method, which is

    implemented, for example, by the function pem  in the

    System Identification Toolbox of MATLAB package. As aresult of the identification the estimations of the parameters

    and the corresponding linear model are obtained.

    To test the adequacy of the identified model it was used toadjust the coefficients of the PID-controller in order to

    improve the quality of the control processes. This adjustment

    was implemented using the Simulink Response Optimization

    block of the MATLAB package. The experimental data,

    where the new adjusted controller is used, are presented in

    the fig. 5.

    From the comparison of figures 4 and 5, illustrating the

    results of the lab, it is easy to see that the quality of the

    control processes has improved. Therefore, it can be

    concluded that the identified model is adequate to the real

    processes dynamics and it can be used for digital controlsystem analysis and synthesis, in addition to the already

    adjusted PID-controller.

    9th IFAC Symposium Advances in Control EducationNizhny Novgorod, Russia, June 19-21, 2012

    216

  • 8/17/2019 2012_Control Systems Analysis and Design Labs With Educational Plants

    6/6

     

    0 1 2 3 4 5 6 7 8 9 10  7 

    10 

    11x 10 

    -3 

    t (s)

       x   b

       (   m   )

    Ball position 

    0 1 2 3 4 5 6 7 8 9 10  0.8 

    0.9 

    1

    1.1

    1.2 

    t (s)

       I   (   A   )

    Coil Current 

     

    Fig. 5. Experimental data with using of adjusted controller.

    The second example has to do with the programming of therobotic manipulator movements. The problem is to provide

    the movement of the robotic through the given points. The

    illustrated results of the lab correspond to the movement

    between two positions, capturing the small box and returningto the initial position. The standard program for FANUC-

    robotic is a sequence of commands. For example let us look

    at the following code:

    Table 1. Example of a linear program for robotic

    1:  J P[1: Home] 100% FINE

    2:  L P[2] 2000 mm/sec CNT100

    3: 

    L P[3] 2000 mm/sec FINE

    4:  C P[4]

    : P[5] 2000 mm/sec FINE

    5:  L P[6] 2000 mm/sec FINE

    6:  L P[7] 2000 mm/sec FINE7:

      J P[1: Home] 100% FINE 

    In this small program we can see some various structures and

    points. The letter “P” is used to determine a position of therobotic. The number in brackets is a number of the position.

    The word “Home” equals a name of start position. Then there

    is a velocity with which the robotic moves to the position.

    And the next parameter is CNT or FINE. It shows the type of

    destination position. This program provides the roboticmoves from position “1” to “7” and returns to “1” again.

    Table 2. Example of the loop

    1:  R[1]=0

    2:  LABEL1

    3:  J P[1] 100% FINE4:

      L P[2] 2000mm/sec

    5:  R[1]=R[1]+16:

      IF R[1]>=3 JUMP LABEL1 

    In order to perform a set of movements by the robotic several

    times, there exists the possibility of loops using. A loop is

    created by the operators and the conditions of transition to the

    label. Let us consider the example in the Table 2.

    In this part of the code not only conditional operators are

    used, but also registers as well as some instruction. We

    supplement the code with two more important actions – by

    closing and opening a tool such as "capture". To do this, we

    add four lines containing the robotic registers «RegisterOutput». We present below an example which contains some

    commands making robotic movement from one position to

    another, captures the cargo, moves to the next position and

    returns to home-position.

    Table 3. Example of the program for robotic movement

    1:  R[1]=0

    2:  PR[2,3]=–30

    3:  PR[3,3]=30

    4:  LABEL1

    5:  J P[1: Home] 100% FINE

    6:  L P[2] 2000 mm/sec FINE OFFSET PR[2]

    7: 

    RO[1]=ON

    8:  RO[2]=OFF

    9:  L P[3] 2000 mm/sec FINE

    10: C P[4]

    : P[5] 2000 mm/sec CNT100

    11: L P[6] 2000 mm/sec FINE OFFSET PR[3]

    12: RO[1]=OFF

    13: RO[2]=ON

    14: L P[7] 2000 mm/sec FINE

    15: J P[1: Home] 100% FINE

    16: R[1]=R[1]+1

    17: IF R[1]