87
Feedforward Design Strategy for Improving Motion Simulator Performance A. Ayemlong Fokem DCT 2008.147 Traineeship report Coach(es): Ir. Frans Wijnheijmer Supervisor: Prof.Dr.Ir. Maarten Steinbuch Technische Universiteit Eindhoven Department Mechanical Engineering Dynamics and Control Technology Group Eindhoven, February, 2009

Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

  • Upload
    others

  • View
    8

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Feedforward Design Strategy forImproving Motion Simulator

Performance

A. Ayemlong Fokem

DCT 2008.147

Traineeship report

Coach(es): Ir. Frans Wijnheijmer

Supervisor: Prof.Dr.Ir. Maarten Steinbuch

Technische Universiteit EindhovenDepartment Mechanical EngineeringDynamics and Control Technology Group

Eindhoven, February, 2009

Page 2: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Abstract

A motion simulator or motion platform is a mechanism that encapsulates rid-ers and creates the effect/feelings of being in a moving object. Motion and sim-ulation, traditionally applied to racing simulation and flight simulation, have longbeen associated with one another. However, motion applications have moved be-yond auto racing and flight simulation to include high tech simulation, where themotion of some base structure (such as tanker in the war zone, car on test track,etc...) are reproduced to test its top side response (such as a turret, a dummy), thereal base structure being replaced by a motion base simulator’s structure and themeasured motion profile being played back with the simulator.

The reproduction of the motion profile during play-back places increasing de-mands upon accuracy, resolution, and response of motion- base structure. Thismotion base structure is typically controlled via closed-loop proportional gain uti-lizing precision axis position transducers (e.g. Resolvers, optical encoders, etc.) tomeasure axis motion.

The control strategy developed in this project, and discussed in this document,brings an answer to those demands, providing greater accuracy to trajectory track-ing, and enabling more precise control of the axis to result in better performance ofthe simulator. The development of that control strategy is achieved in three steps.Plant model of the motion base structure, obtained by a SISO(single input/singleoutput) black box modeling approach; feedforward controller, designed using theknowledge of the tracking error to anticipate, or to reduce the deviation in the track-ing position; and the experimental testing, set to validate the correctness and thefeasibility of our design.

Page 3: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Contents

1 Introduction 11.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Goals of this Project . . . . . . . . . . . . . . . . . . . . . . . . . . 21.3 Assignments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.4 Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.5 Literature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2 Modeling 82.1 Black box Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2.1.1 Setup Measurements . . . . . . . . . . . . . . . . . . . . . 102.1.2 Output Sensitivity and Process Sensitivity measurements . 112.1.3 Plant Model Estimation . . . . . . . . . . . . . . . . . . . . 12

2.2 Controlled plant model evaluation and validation . . . . . . . . . . 122.2.1 Frequency Response model evaluation . . . . . . . . . . . . 122.2.2 Time response model validation . . . . . . . . . . . . . . . 142.2.3 Influence of parameter’s changes on the dynamical model 15

2.3 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

3 Open loop Stability and Performance analyses 163.1 Setpoint Trajectory generation . . . . . . . . . . . . . . . . . . . . . 163.2 Stability analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173.3 Performance analysis . . . . . . . . . . . . . . . . . . . . . . . . . 18

3.3.1 Influence of Physical limitations on the performance . . . . 183.4 Feedforward design’s choice . . . . . . . . . . . . . . . . . . . . . 183.5 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

4 Iterative Learning Controller 204.1 Learning Filter Design (L) . . . . . . . . . . . . . . . . . . . . . . . 21

4.1.1 Discrete Model of the Process Sensitivity . . . . . . . . . . 214.2 Learning gain γ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214.3 Convergence criteria of the ILC . . . . . . . . . . . . . . . . . . . . 22

4.3.1 Convergence of the ILC with the plant model and the FRD 224.3.2 Convergence of ILC with the robust filter . . . . . . . . . . 23

4.4 Multi SISO ILC Simulation . . . . . . . . . . . . . . . . . . . . . . 254.5 Analyses of a disturbed plant with the ILC . . . . . . . . . . . . . . 26

4.5.1 Simulation of the ILC action on a disturbed plant model . . 274.6 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

i

Page 4: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

CONTENTS CONTENTS

5 Lifted Iterative Learning Controller 295.1 Lifted actuator plant Model . . . . . . . . . . . . . . . . . . . . . . 29

5.1.1 Singular value decomposition of J matrix . . . . . . . . . . 305.2 Inverse model control design . . . . . . . . . . . . . . . . . . . . . 315.3 LQ Optimal control design . . . . . . . . . . . . . . . . . . . . . . 325.4 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

6 Experiments 356.1 Setup experiments . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

6.1.1 Problem related to experiments . . . . . . . . . . . . . . . . 366.2 Experiments Result with a dead beat ILC implementation . . . . . 36

6.2.1 Comparison between the ILC experiment’s Convergence er-ror and the ILC simulation convergence error . . . . . . . . 37

6.2.2 Comparison between the feedback control results and theILC experiment’s results . . . . . . . . . . . . . . . . . . . 37

6.3 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

7 Conclusions and Recommendations 397.1 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397.2 Recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

Bibliography 41

Appendices I

A Micro Motion System IA.1 Micro motion system descriptiion . . . . . . . . . . . . . . . . . . . IA.2 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IIIA.3 Micro motion assembly base . . . . . . . . . . . . . . . . . . . . . IV

A.3.1 Motion platform . . . . . . . . . . . . . . . . . . . . . . . . IVA.3.2 Motion actuator . . . . . . . . . . . . . . . . . . . . . . . . IVA.3.3 Universal joint units . . . . . . . . . . . . . . . . . . . . . . IV

A.4 Electronic Control System . . . . . . . . . . . . . . . . . . . . . . . IV

B Computation of Inputs/Outputs variables of the Controlled plant VI

C SISO actuators Model VIIC.1 SISO Measurement of the Six actuators . . . . . . . . . . . . . . . VIII

C.1.1 Plant models of the Six actuators . . . . . . . . . . . . . . . IXC.1.2 Sensitivity evaluation of the Six actuators in the frequency

domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IXC.1.3 Process Sensitivity evaluation of the Six actuators in the fre-

quency domain . . . . . . . . . . . . . . . . . . . . . . . . . XC.1.4 Process Sensitivity validation of the Six actuators with in the

time domain . . . . . . . . . . . . . . . . . . . . . . . . . . XC.1.5 Sensitivity evaluation of the Six actuators in the time domain XI

D ILC design for six actuators XIID.1 Process sensitivity, Model, Discrete, FRD . . . . . . . . . . . . . . . XIID.2 Learning filter, Inverse Discrete Process sensitivity . . . . . . . . . XIII

ii

Page 5: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Contents Contents

E Matlab Files XIVE.1 Output Sensitivity and Output Process Sensitivity Measurements . XIVE.2 Model estimation Mfile . . . . . . . . . . . . . . . . . . . . . . . . XIXE.3 Learning filter design Mfile . . . . . . . . . . . . . . . . . . . . . . XXIIIE.4 Robust Q filter design Mfile . . . . . . . . . . . . . . . . . . . . . . XXVIE.5 Convergence criterion . . . . . . . . . . . . . . . . . . . . . . . . . XXVIE.6 Offline Feedforward controller Computation Mfile . . . . . . . . . XXVIII

E.6.1 Reading trajectory from motion file and Computing the track-ing error . . . . . . . . . . . . . . . . . . . . . . . . . . . . XXVIII

E.6.2 Simulation of The ILC with the plant Model . . . . . . . . . XXXIIIE.6.3 Implementation of the ILC on the six actuators . . . . . . . XXXVIII

iii

Page 6: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Chapter 1

Introduction

1.1 MotivationBosch Rexroth develops manufacturers and tests motion systems. Lately more andmore requests come from this motion market, for systems that can iteratively im-prove their performance when running a repetitive setpoint.Some of these motions systems are simulators that reproduce, in a high tech sim-ulation environment, the motion of some base structure (such as tanker in thewar zone, car on test track, etc...) to test its top side response (such as a turret, adummy). In those cases the real base structure is replaced by a motion simulatorto the base structure. The measured motion profile of the base structure are playedback with the simulator.

Figure 1.1: Motion system impression

0See Appendix A for a full description of the Micro Motion Simulator system

1

Page 7: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Goals of this Project Introduction

The motion system is based upon the proven "6 DOF motion system" technol-ogy that consists of:

• A Motion platform

• Motion actuators

• Universal joint units

• A Base frame

A payload can be mounted to the top of the motion platform to play back thetrajectory. Nevertheless, this simulation is achieved with some practical difficulties:

• Trajectory deviation due to difference in dynamics between the base structuremotion and the simulator

• Delays due to the feedback controlled loop

1.2 Goals of this ProjectThe goals of this project are:

• To create a micro motion plant model.

• To design an feedforward control algorithm using Matlab Simulink

• To show by illustration using simulation and experimental results that thelatter algorithm can indeed improve the performances of the system.

A multi-siso measurement and a multi-siso feedforward control algorithm are de-veloped in the course of this project respectively to model the plant’s dynamics andto improve the system’s performances.

1.3 AssignmentsThrough brainstorming sessions, the following assignments were defined as theguideline of the project:

1. Literatures

• Through the literature, study and understand algorithms including theset point trajectory Setpoint trajectory Tuning, Feedforward tuning, andIterative learning control, etc.

2. ModelingStudy the Structure of a Micro Motion Simulator and create its simplifieddynamical model based on 1 degree of freedom.

• Carry several test measurements on the base structure to determinethe bandwidth, the resonance frequencies, the DC gain, and the dis-turbances that will be used in the system model during the controllerdesign

2

Page 8: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Outline Introduction

• Create a frequency response data set for the reference trajectory

3. Design and simulationDesign the control algorithm to achieve performances using Matlab Simulink.

• Based on the mismatch between the setpoint and the response of thefeedback control loop, design a feedforward controller with an offlinetuning algorithm for the setpoint trajectory.

4. Implementation and Testing

• Implement the control algorithm on the real setup simulator system

• Perform testing for different trajectory with the Designed control algo-rithm

• Draw conclusion based on test results and observations

• Validation Perform an evaluation of the latter algorithm using simula-tion and experimental’s results and formulate conclusions and recom-mendations for further developments.

5. documentation

• make a documentation of the process, the design, implementation andResults of the project.

1.4 OutlineChapter I is the Introduction chapter of this report and it contains the problemdescription, the assignments, objectives and literature sections. Chapter II on theother hand, documents the method used to obtain the plant model and its valida-tion. Chapter III studies the stability and the performance of the controlled plantand identifies the feedback control problem. Chapter IV gives details about theIterative Learning Controller design and simulation based on the micro motionsimulator model, while Chapter V gives details about the Lifted Iterative learn-ing controller design and simulation, based on the Micro motion simulator model.Chapter VI shows the experiment’s results that serve as strong base for the achieve-ment of this project. Finally, Chapter VII documents the conclusions and recom-mendations based on the previous chapter’s discussion’s sections.

3

Page 9: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Literature Introduction

1.5 LiteratureThis project required some prior knowledge about System’s models, and Controllerdesign. Some of these prior knowledge were gained during some control’s coursesand through some literature’s reading( papers, thesis, lecture’s notes). This docu-ment contains short summaries about each literature.

Time Scales and Model Approximation

The formulation of models [1] for cases where the model includes phenomena thatoriginally were thought to be relevant, but which may turn out not to contributeto the overall dynamic behavior in a significant fashion. There are different rea-sons for a dynamic phenomenon not to contribute significantly to the input-outputbehavior of the overall model:

1 The phenomenon may evolve on a time scale which is significantly differentfrom the main or dominating time scales in the model. In that case the timescale of the phenomenon can be idealized as being so slow that it can beconsidered infinitely slow (freezed, stationary) or so fast that it is consideredto be instantaneous, i.e., it reaches equilibrium instantaneously.

2 The phenomenon may contribute little to the input-output behavior of thesystem, and thus it can be neglected and eliminated from the model.

3 The input-output behavior of the system can be represented approximately bya simpler expression, i.e., the model can be mathematically approximated bya simpler model. These cases are be considered in more detail in the sequel.The first case is studied by considering modal approximation of linear mod-els and time-scale separation in nonlinear models. The second case occurse.g., when phenomena turn out to be almost uncontrollable or unobservable,and this is studied under the name of input/output model reduction by bal-ancing and truncation.

This paper is a chapter of the course physical Modeling for system and control,for which the main objective is to provide some basis about time scales approxima-tion and Model approximation of dynamical systems.

Fixed structure feedforward controller tuning exploiting iterative trials, appliedto a high-precision electromechanical servo system

In this paper [2], the feedforward controller design problem for high-precision elec-tromechanical servo systems that executes finite time tasks is addressed. The pre-sented procedure combines the selection of the fixed structure of the feedforwardcontroller and the optimization of the controller parameters on the basis of mea-surement data from iterative trials. A linear parameterization of the feedforwardcontroller in a two-degree of-freedom control architecture is chosen, which for alinear time-invariant (LTI) plant results in a feedforward controller that is applica-ble to a class of motion profiles as well as in a convex optimization problem withthe objective function being a quadratic function of the tracking error. Optimiza-tion by iterative trials results in the controller parameter values that are optimalwith respect to the actual plant, which leads to a high tracking performance.

4

Page 10: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Literature Introduction

Pro’s:The controller can be used with both time invariant trajectory and time varying

trajectory.The Controller’s parameters adapts easily on the trajectory change withfew iteration.The parameters estimation is performed automatically online base onthe feedback error’s data. Thus, no need of an exact inverse plant model.This con-trol strategy is also robust against uncertainty .

Con’s: Most mechanical systems are nonlinear and have complex dynamics (stribeck effect, stick slip, etc) which require high order trajectory ( jerk, snap, pop,etc) to reduce their effect considerably.

Iterative Learning Control, with applications to a wafer stage

This paper [3] is a Master Thesis that deals with the application of Iterative Learn-ing Control in general and the application on a wafer-stage specifically. The mainobjective was to Develop a systematic design method for robustly stable IterativeLearning Control that deals with non-repetitive signals(like noise) and the sec-ondary objective was to explore the relations between Iterative Learning Control,and trajectory design.

Design strategies for iterative learning control based on optimal control

This paper [4] deals with the analysis and synthesis of Iterative Learning Control(ILC) systems using a lifted representation of the plant. In this lifted representationthe system dynamics are described by a static map whereas the learning dynamicsare described by a difference equation. The properties of the lifted system and inparticular the role of non minimum phase zeros and system delays are investi-gated. Based on the internal model principle a general, integrating update law issuggested. Two methods are proposed for the design of the learning gain, basedon optimal control theory. In the latter, a multi-objective design, the convergencespeed is optimized subject to a bound on the closed loop variance due to stochasticinitial conditions, process disturbances and measurement noise. Efficient tailor-made solutions to the design problems are presented, making optimal use of thespecific and nice structure of the lifted system ILC representation. The potential ofthe design methods is demonstrated on a realistic example.

Introduction to singular value decomposition, Lifted Iterative Learning Control

These are the lectures [5] notes from the course ’Capita selecta in Control’ from theTechnical University of Eindhoven. These notes provide the basis on the lifted ILCand its design steps.

Zero phase error tracking algorithm for digital control( ZPETC)

A digital feedforward control algorithm [6] for tracking desired time varying signalsis presented. The feedforward controller cancels all the closed-loop poles and can-cellable closed-loop zeros. For uncancellable zeros, which include zeros outside theunit circle, the feedforward controller cancels the phase shift induced by them. Thephase cancellation assures that the frequency response between the desired outputexhibits zero phase shift for all frequuencies. The algorithm is particular suited

5

Page 11: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Literature Introduction

to the general motion control problems including robotic arms and positioning ta-bles( repetitive tasks).The feedforward controller(ZPETC) that assures zero phaseerror in the sense of frequency response is proposed in this paper.

ZPETC utilizes the (d+s)-step ahead desired output, yd(k+d+s), where d is thenumber of delay steps in the loop zeros which are unacceptable for pole/zero can-cellation. The drawback of this algorithm is that since ZPETC is base on pole/zerocancellation and phase cancellation, the tracking performance under ZPETC issensitive to modelling errors and plant parameter variations. The solution to thisdrawback is to develop an adaptive ZPETC to ensure good tracking when the plantparameters are poorly known or vary during operation.

Comparison of standard and lifted ILC on a motion system

Iterative Learning Control (ILC)[7] is a technique for improving the performance ofsystems or processes that operate repetitively over a fixed time interval. The basicidea of ILC is that it exploits every possibility to incorporate past repetitive controlinformation, such as tracking errors and control input signals into the constructionof the present control action. Past control information is stored and then used inthe control action in order to ensure that the system meets the control specificationssuch as convergence. The goal of the research presented in this paper is to comparetwo different ILC techniques applied to the wafer stage of a wafer scanner motionsystem. Namely, we consider briefly the concepts of standard and lifted ILC and weevaluate the ILC performance in terms of tracking errors.

The technique of lifting refers to a construction whereby one ’lifts’ a continuous-time signal to a discrete-time one, see (Bamhieh et al, 1991).the idea of signal andsystem lifting is the basis of sampled data system system analysis and control andit is extremely well applicable to the analysis and synthesis of the ILC.Standard ILC is a technique which is defined in the frequency domain and makesuse of frequency response data.Lifted ILC is defined in the trial domain and requires impulse response data of thesystem. the stability criterion of Lifted ILC, defned in a finite time setting, is lessconservative than that of Standard ILC, which is defined in an infinite time set-ting. This greatly increases the fexibility of controller design. Furthermore, LiftedILC can be applied to SISO as well as MIMO systems and it is rather easy to applyweightings and time windows.

As stated before, the model-based technique Lifted ILC is defined in the trial-domain. In the lifted representation, the input and output of the system are dis-crete finite vectors of length N. The length of the vectors equals the trial length.The continuous dynamics of the plant are ’lifted’ to a static, discrete-time mappingfunction and the ILC feedforward becomes a feedback action in the trial domain.Stabilization of this feedback system is equivalent to convergence of the ILC in thetime domain. Lifted ILC can be used as an add-on feedforward controller whichimproves the tracking performance of a system that performs repetitive tasks. Thissystem usually is a closed-loop system with a stabilizing feedback controller, butmay also be a stable plant. In the lifted setting it is possible to make use of op-timal control techniques and to tune the convergence behavior with a weightingparameter, resulting in a trade-of between input effort/noise amplifcation and con-vergence/stability.

The design of the feedforward signal in case of the lifted ILC is achieved withthe following steps:

6

Page 12: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Literature Introduction

• Based on the impulse response of the process sensitivity, the hankel matrixis created and the process sensitivity is next represent by lower triangularmatrix( toeplitz matrix)

• The learning filter is obtained from the latter process sensitivity matrix usingsome linear algebra technique (no need of inverse plant model)

• An optimal control technique is next applied to ensure the convergence cri-terion

some drawback of Lifted ILC are:

• For long trials the procedure becomes numerically very intensive.

• The process sensitivity matrix may be a (nearly) singular matrix (when theunderlying plant contains delays or non-minimum phase zeros). In this casethe system is not fully observable, which is a problem fora n optimal controlsolution. As solution for this problem, the lifted ILC with SVD deviation andlifted ILC with adjustment for observable part of Ps need to be consideredduring the design.

• A strong prior knowledge of linear algebra technique is recommended Ingeneral, applying standard ILC, good tracking error along the entire scan-ning pattern is achieved. The low pass butterworth filter is used to ensure therobustness against position-dependent dynamics, high-frequent noise andPlant/model mismatch. The Lifted ILC can handle both convergence andnoise amplification better in practical setting and is more robust against un-certainty due to its parameter tuning that controls the balance between thetracking error performance and noise influence on the input signal.

Hankel Iterative Learning Control for residual vibration suppression with MIMOflexible structure experiments

This paper presents [8] the study of residual vibration suppression on a MIMOflexible structure performing a point-to-point motion, based on Hankel ILC. Afterextensively discussing the different design steps, it is experimentally showed thatHankel ILC is capable of suppressing residual vibrations in a relatively complexMIMO flexible structure. The versatility in choice of the actuation and observa-tion time windows turned out to be essential for the successful implementation ofHankel ILC on this flexible structure. Next to vibration suppression results, the ex-perimental results also demonstrated the possibilities of Hankel ILC to manipulatethe command signal form.

7

Page 13: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Chapter 2

Modeling

Modeling according to physical relations such as balance relations i.e. force balanceequations in mechanics and flow balance equations in hydraulics, has two impor-tant advantages as compared to the so-called black box experimental identification.First, as the structure of the model points at the underlying physical propertiesof the system, analysis and (constructional)design considerations are performedmuch easier. Secondly, modeling of a nonlinear system such as the micro motionsimulator platform, does not impose additional difficulties.The mechanics and hy-draulics are considered the main subsystems to be taken into account.Added complexity(internal relation, details parameter, cross talks) usually improvesthe fit of a model, but it can make the model difficult to understand and to workwith, and can also pose computational problems, including Numerical instability.Therefore, to avoid the model complexity involved in the trade-off between simplic-ity and accuracy of the modeling, the black box modeling method based on outputsensitivity and output process sensitivity was used to obtain the plant model of themicro motion system.

Mass

Piston

Upper joint Cylinder

Lower joint

Attached based

Figure 2.1: actuator simplified model

8

Page 14: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Black box Model Modeling

The simplified model in figure 2.1 shows that the actuator is very similar to anhydraulic servo with an attached mass.The hydraulic part consists of :

- A piston attached to the upper joint

- A cylinder attached to the lower joint

The mechanical part consists of:

- A lower joint attached to the based frame

- A upper joint attached to the motion platform

- A mass or payload placed on the motion platform

2.1 Black box ModelThe black box modeling has as objective to estimate both the functional form ofrelations between variables and the numerical parameters in those functions.The method used in this project (Output sensitivity and Output Process sensitivityfrequency response) provides a good knowledge of the plant including the dynam-ics of the valve, the measurements devices(sensors or encoders)and the build inproportional gain controller in its linear region.

Phisical System

Kp Kv Ksg eAT

Space Coordinate

Switch

Gen1

u’

d

u= u’+d y

valve Feedback Plant Sensor

IAT

Metric

Space Coordinate

Gen2

Figure 2.2: Measurement block of 1 dof actuator

g : plant K p : Feeback gain control Kv : V alve gain Ks : Sensor gain

e : tracking error u : control signal u′ : measured control signal

d : disturbance input y : output tra jectory signal

AT : Axis trans f ormation I AT : I nverse axis trans f ormation

Gen1 : I nput setpoint signal Gen2 : I nput Feed f orward signal

9

Page 15: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Black box Model Modeling

2.1.1 Setup MeasurementsSome setups are made before carrying the measurements to define:

• The type of input signal

• The amplitude and the frequency of the signal

• The length of the signal

• The sample data point per period and the total sample data point per mea-surement based on the sampling frequency of the digital I/O of the card orthe computer used for measurements.

Input signal

The choice of the type of the input signal for measurements depends on the typeof the valve used in the system.

The valve used in the micro motion’s actuator is an underlap valve, and is notsensitive to noise signal for small valve’s openings. Therefore, square wave inputis used instead of noise input.

The square wave is a periodic waveform signal consisting of instantaneous tran-sition between two levels.This signal can be compared to a heavy side step signalwith positive edge( -5 to 5),and negative edge( 5 to -5) as illustrated on the figure be-low. The fourier series of the square wave signal demonstrates that an ideal squarecontains an infinite series of odd harmonics.

xsquare(t) =4π

∞∑k=1

sin((2k − 1)2π f t(2k − 1)

=4π(sin(2π f t)+

13

sin(6π f t)+15

sin(10π f t)+ · · ·).

This function shows that the square wave signal is built on infinite smooth functionand therefore can be used to estimate the dynamics of the system in the low fre-quent and also high frequent region of the controlled plant without a deteriorationof the valve.

-5

5

T = 4s Time [s]

Ampl.

Figure 2.3: Measurement input signal

10

Page 16: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Black box Model Modeling

Input frequency

The defined frequency is the fundamental frequency of the input signal, thus shouldbe chosen as low as possible to allow estimation of the dynamics in a very low fre-quency region(a large time horizon).

F =1T=

14= 0.25H z

Sampling frequency

Rule of Thumb

Ts =T

(2× 5)=

410= 0.4s

Fs =1Ts=

10.4= 2.5H z

Fs < 500H z (I/Osampling f requency)

FI/O = 500H z TI/O =1

500= 0.002s

Number of samples data for one period

Ndata =T

TI/O=

40.002

= 2000 samples/period

Total number of samples for t = 40s (time for one measurement)

NT = Ndata ×tT= 2000×

404= 20000 data points

2.1.2 Output Sensitivity and Process Sensitivity measurements

0 5 10 15 20 25 30 35 40−10

−5

0

5

10

t [s]

PS

[m

/vo

lts]

Time response Process sensitivity actuator 1

0 5 10 15 20 25 30 35 40−20

−10

0

10

20

t [s]

S [

volt

s]

Time response Sensitivity actuactor 1

(a) Zoom out

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8

−5

0

5

x 10−3

t [s]

PS

[m

/vo

lts]

Time response Process sensitivity actuator 1

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8−10

0

10

t [s]

S [

volt

s]

Time response Sensitivity actuactor 1

(b) Zoom In

Figure 2.4: Time response measurement from actuator 1

11

Page 17: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Controlled plant model evaluation and validation Modeling

The time response of the sensitivity and the process sensitivity from a single actua-tor’s measurements is shown on figure 2.4 a and b. The response of other actuatorscan be found in appendix C.

2.1.3 Plant Model Estimation

10−1

100

101

102

103

0.7

0.8

0.9

1

Hz

Coherent of Sensitivity Actuator 1

10−1

100

101

102

103

0

0.5

1

X: 15Y: 0.9175

Hz

Coherent of Process Sensitivity Actuator 1

(a) Coherence of S and PS

−150

−100

−50

0

Mag

nitu

de (

dB)

100

101

102

−180

−90

0

90

180

Pha

se (

deg)

Plant − Model and Measurement Actuator 1

Frequency (Hz)

ModelMeas

(b) Plant and Model

Figure 2.5: Frequency Response Model Estimation

The coherence plot (a) of figure 2.5 shows that the region in the frequency do-main of the input/output measurement’s data that are reliable to estimate the plantmodel lies between 1 hz and 20 hz.

The model is approximated in the coherent frequency region as shown in plot(b), using the bode plot analysis(phase, roll off,and gain) of the frequency responsedata (FRD) of the plant. Based on the Engineering intuition, the order of themodel(number of poles) is defined,followed by the number of zeros and the num-ber of integrators.This information is filled in a special tool in matlab called frequency responsefit(frsfit), and by manual shaping, the approximated plant model is obtained.

2.2 Controlled plant model evaluation and validationThe obtained controlled model is then evaluated in the frequency domain by com-paring the response of the plant model and the controller with the FRD. This isfollowed by the validation of the complete controlled model by comparing in thetime domain the sensitivity and the process sensitivity with those of the FRD.

2.2.1 Frequency Response model evaluationFigure 2.6 shows the plant model which is a fit of the real plant data obtainedfrom the inverse of the transfer function estimate of measured sensitivity timesthe transfer function estimate of measured process sensitivity; and the controllermodel which is derived from the inverse process sensitivity times the inverse sen-sitivity minus the unit.

12

Page 18: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Controlled plant model evaluation and validation Modeling

−150

−100

−50

0M

agni

tude

(dB

)

100

101

102

−180

−90

0

90

180

Pha

se (

deg)

Plant − Model and Measurement Actuator 1

Frequency (Hz)

ModelMeas

(a) Plant model Vs Plant’s FRD

−20

0

20

40

60

80

Mag

nitu

de (

dB)

System: untitled2Frequency (Hz): 20Magnitude (dB): 56.8

10−1

100

101

102

103

−180

−90

0

90

180

Pha

se (

deg)

Closed loop Gain :: model Vs Frf data for actuator 1

Frequency (Hz)

ModelFrf data

(b) Controller Model Vs Loop gain FRD

Figure 2.6: Frequency Response Model Vs Plant’s Measurements

Observing the left hand of figure 2.6, the plant model approximately fits theFRD till 20 Hz, where the mismatch increases due to the noise level, which be-comes significant, and the incoherent data.This can be well understood by observ-ing the right hand plot of the same figure that shows the control gain of the closedloop system which has a roll off of -2 at approximately 20 Hz(cut-off frequency ofthe sensors).

13

Page 19: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Controlled plant model evaluation and validation Modeling

2.2.2 Time response model validation

0 5 10 15 20 25 30 35 40−15

−10

−5

0

5

10

15Sensitivity :: Model Vs Measurements actuator 1

Time [s]

S [

volt

s]

FrFModel

(a) Sensitivity: Simulation Vs Measurements

0 1 2 3 4 5 6 7

−10

−5

0

5

10

Sensitivity :: Model Vs Measurements actuator 1

Time [s]

S [

volt

s]

FrFModel

(b) Zoom in sensitivity

0 5 10 15 20 25 30 35 40−8

−6

−4

−2

0

2

4

6

8x 10

−3Process Sensitivity :: Model Vs Measurements actuator 1

Time [s]

PS

[m

/vo

lts]

FrFModel

(c) Process sensitivity: Simulation Vs Measurements

0 1 2 3 4 5 6 7

−6

−4

−2

0

2

4

6

x 10−3Process Sensitivity :: Model Vs Measurements actuator 1

Time [s]

PS

[m

/vo

lts]

FrFModel

(d) Zoom in Process sensitivity

Figure 2.7: Time Response Model Vs Plant’s Measurements

Figure 2.7 illustrates the evaluation between the time response of the simulationmodel(red dashed line) and the time response of the measurements data (bluestraight line). The right hand side of this figure (figure 2.7(b)and (d)) illustratesthe details of each evaluation.from the figures, one can observe that the sensitivity of the model and its processsensitivity fit those of the measurements data in the linear region only. The mostsignificant difference between the measurements and the simulation is a slightdrifting of the measurement. This is caused by the dead band of the valve and in-ternal leakage. Due to internal leakage in the valve, the load will cause the actuatorto slip a bid,this is compensated by the controller, but due to the dead band,thesystem drifts a few mm before the controller comes into action. This effect is (un-derstandable) not modeled.

14

Page 20: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Discussion Modeling

2.2.3 Influence of parameter’s changes on the dynamical modelThe change of load (dummy) on the platform of the simulator can modify itsdynamics considerably. As observed on figure 2.8, the dummy with a mass of(M = 170) has all the poles and zeros on the left half plane (minimum phase), buta heavier dummy ( M = 271) has all its poles in the left half plane but also has twocomplex zeros in the right half plane(non minimum phase zero).This shows that parameters such as eigen frequency, order of the system and nonminimum phase are important for the dynamics.

−150

−100

−50

0

50

Mag

nitu

de (

dB)

10−2

100

102

−180

−90

0

90

180

Pha

se (

deg)

Plant Model with M = 170kg

Frequency (Hz)

−60 −40 −20 0 20−200

−150

−100

−50

0

50

100

150

200

250

Root Locus with M = 170 kg

Real Axis

Imag

inar

y A

xis

(a) Plant model with left half plane zero

−150

−100

−50

0

50

Mag

nitu

de (

dB)

10−2

100

102

−180

−90

0

90

180P

hase

(de

g)

Plant Model with M = 271kg

Frequency (Hz)

−60 −40 −20 0 20−250

−200

−150

−100

−50

0

50

100

150

200

250Root Locus for M =271 kg

Real Axis

Imag

inar

y A

xis

(b) Plant model with Right half plane zero

Figure 2.8: Plant model with different loads

2.3 DiscussionObtaining the plant model was the main goal of this chapter, and it was achievedusing a black box experimental approach.Due to the structure of the actuator’s valve, a square wave signal was used to per-form the output measurement of the sensitivity and the process sensitivity, thatserved later to identified the plant model using a transfer function estimate toolfrom Matlab environment.The plant model was then evaluated in the frequency domain by comparing withthe frequency response data on the same figure.Its validation was also done usingthe time domain evaluation of the output and process sensitivity from the model’ssimulation and real data measurements.

15

Page 21: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Chapter 3

Open loop Stability andPerformance analyses

This chapter discusses the stability and performance analyses are used to identifythe existing problem in the feedback control loop. Before diving in the analyses, theSetpoint trajectory generation is first studied and the chapter ends with the choiceof the Feedforward strategy that is designed and implemented in this project.

3.1 Setpoint Trajectory generationUsing the axes transformation of the system, the space coordinate(yaw,roll,pitch)trajectory is translated into a plan coordinate trajectory with six vectors(time,reference)for the six actuators, the units are transformed from radian or radian/sec into me-ter or meter/sec. All the vectors of the six actuators have the same length, butdifferent time and trajectory.Figure 3.1 shows the six actuator’s trajectories from data’s measured positions ofthe turret of a Leopard tank driving through rough terrain.

16

Page 22: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Stability analysis Open loop Stability and Performance analyses

0 50 100-0.06

-0.04

-0.02

0

0.02

0.04

0.06

t[s]

YR

EF

[m]

yref1

0 50 100-0.06

-0.04

-0.02

0

0.02

0.04

0.06

0.08

t[s]

YR

EF

[m]

yref2

0 50 100-0.06

-0.04

-0.02

0

0.02

0.04

0.06

0.08

t[s]

YR

EF

[m]

yref3

0 50 100-0.1

-0.05

0

0.05

0.1

t[s]

YR

EF

[m]

yref4

0 50 100-0.06

-0.04

-0.02

0

0.02

0.04

0.06

t[s]

YR

EF

[m]

yref5

0 50 100-0.06

-0.04

-0.02

0

0.02

0.04

0.06

0.08

t[s]

YR

EF

[m]

yref6

Figure 3.1: Setpoint Trajectories 1 degree of freedom

3.2 Stability analysis

Open loop :: model Vs Frf data for actuator 1

Frequency (Hz)10

010

110

2−180

−90

0

90

180

System: untitled1Phase Margin (deg): 65.9Delay Margin (sec): 0.0644At frequency (Hz): 2.84Closed Loop Stable? Yes

Pha

se (

deg)

−150

−100

−50

0

50

System: untitled1Gain Margin (dB): 7.93At frequency (Hz): 10.2Closed Loop Stable? Yes

Mag

nitu

de (

dB)

ModelFrf data

Figure 3.2: Stability analyses

Plot (a) of figure 3.2 shows the open loop of the FRD and the model.From this illustration, one can observe that the controlled plant is globally stablewithin a bandwidth of 2.84 Hz, with a phase margin of 65.90 and a gain margin of7.93 dB around 10 Hz.

17

Page 23: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Performance analysis Open loop Stability and Performance analyses

3.3 Performance analysis

0 10 20 30 40 50 60 70 80−0.1

−0.05

0

0.05

0.1Setpoint trajectory with ILC, actuator 1

Pos

ition

[m]

Yref1Yout1

0 10 20 30 40 50 60 70 80−0.01

−0.005

0

0.005

0.01

0.015

Tra

ckin

g e

rro

r [m

]

time [s]

error1

(a) Tracking error

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5

0.5

1

1.5

2

2.5x 10

−3 Amplitude Error Spectrum E1(t) from actuator 1

Frequency (Hz)

|E(f

)|(b) Error Spectrum analysis

Figure 3.3: Feedback Tracking Error

According to figure 3.3, the tracking error is approximately 20 percent of the tra-jectory consequently, the simulator’s performances are relatively low,despite thestability of the closed loop system.The amplitude spectrum of this error on the right plot of this figure shows that allthe tracking errors are located within the bandwidth of the closed loop, thus aremainly caused by the delays occurring in the feedback control loop.

3.3.1 Influence of Physical limitations on the performanceThe performance of this micro motion simulator also depends on the structuresof the input device (actuator’s valve), the output device (position sensors)and theparameter’s changes (change of dummy).

Valve dynamics and position sensor resolution

• To stabilize the system globally with the linear feedback control loop, theusage of the valve is limited in its linear region only.

• The accuracy of the controlled position depends on the resolution of the po-sition sensor and its signal to noise ratio. Therefore for a 12 bits sensor, anda sample frequency of 500 Hz, this accuracy cannot exceed 10−4m/samplefor a noiseless case, thus the tracking error is limited by that factor.

3.4 Feedforward design’s choiceThree main feedforward design strategy for improving the performance of the mo-tion simulation were studied in chapter 1.5:

Fixed structure feedforward controller tuning exploiting iterative trials This designstrategy focuses on parameters estimation’s algorithm exploiting iterative tri-als to update the feedforward action. Its advantage is that it computes the

18

Page 24: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Discussion Open loop Stability and Performance analyses

new parameters( mass, coulomb friction, viscous friction,...) for every trajec-tory without a need of a model compare to a model based controller whichneeds a model to estimate the feedforward signal or to the standard feedfor-ward which has fixed parameters. But its practical implementation fails onthe order of the setpoint trajectory which requires a higher order for eachparameter.This latter point limits the investigation of this design strategy in this project.

Iterative Learning Control This design strategy is a frequency based feedforwardcontrol, which uses the knowledge of the inverse process sensitivity and therepetitive errors present in the bandwidth to update the feedforward signalfor improving the performance of the system(reduction of the tracking error).Contrarily to the earlier, its requires a plant model for its design. Its designalgorithm is further investigation for the purposes of this project.

Lifted Iterative Learning Control This design strategy is a time domain based feed-forward control which is defined in the trial domain and requires impulseresponse data of the system.The stability criterion of Lifted ILC, defned in afinite time setting, is less conservative than that of Standard ILC, which isdefined in a frequency domain. But,the implementation of the latter failed inthis project due to a long trial of the setpoint trajectory.

The next chapters provide details about the design and implementation of the Iter-ative learning control in frequency domain and in time domain.

3.5 DiscussionThe stability and performance analyses of the open loop(controlled plant) were themain tasks of this chapter. Through those analyses, the performance problem wastechnically investigated with the given setpoint trajectory, followed with some un-derstanding of the physical limitations on the performance.In this chapter, the iterative learning control feedforward design algorithm waschosen to tackle the identified problem.

19

Page 25: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Chapter 4

Iterative Learning Controller

According to the Literature from section 1.5, two control algorithm can be imple-mented offline to improve the performance of the micro motion simulator.

The iterative learning control is a solution to reduce the tracking error of arepetitive operating system (printer, robot manipulator etc.) to the noise level byiteratively updating the ILC control action based on the learning information (L fil-ter) and the loop shaping (Q filter). The design of the latter will also be investigatedin this section to solve the performance’s problem of the micro motion simulator.

Y

ILC

C PU

v

R + ek

Fk

L(s)

+ +

M

Q(s)

Fk+1

+ +

Figure 4.1: Iterative learning control diagram

Consider the tracking error in the feedback loop in discrete time [1] ,

ek = r1

1+ PC︸ ︷︷ ︸S

−P

1+ PC︸ ︷︷ ︸Sp

fk (4.1)

and the learning update [1]

fk+1 = Q( fk + Lek) (4.2)

Error propagation due to feedforward with r = 0

ek+1 = −Sp fk+1 (4.3)

20

Page 26: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Learning Filter Design (L) Iterative Learning Controller

= Q(1− Sp fk L)ek,

by using the ILC learning update and fk = −Sp−1ek

4.1 Learning Filter Design (L)The learning filter is literally the inverse of the process sensitivity of the plantmodel, but inverting the process sensitivity can lead to unstable poles for the fil-ter if the system is non minimum phase zeros.The inverse of the process sensitivity also becomes proper (not realizable) if theprocess sensitivity is strictly proper. This problem is solved using the Zero phasestracking error algorithm (ZPTEC).

L ≈ Sp−1, by using the Z PT EC algori thm1

4.1.1 Discrete Model of the Process Sensitivity

Sp(z−1) =z−d B(z−1)

A(z−1)=

z−d Bs(z−1)Bu(z−1)

A(z−1)(4.4)

With λ(Bs) ⊂ D minimum phase zero and λ(Bu) ∩ D = φ the non minimumphase zeros.

Discrete Model Learning Filter

L(z−1=

zd+phd A(z−1 B∗(z−1)

Bs(z−1)β(4.5)

With gain correction β and z phd B∗(z−1) = Bu(z)

4.2 Learning gain γAn additional learning gain can be added

fk+1 = fk + γ Lek (4.6)

Error propagation;ek+1 = (1− γ SpL)ek (4.7)

• γ = 1 and L = Sp−1 yields ek+1 = 0, deadbeat solution. However there isno robustness against modeling errors.

• γ 6= 1 and γ ∈ (0, 2) reduces the convergence speed, but provides robustnessagainst model uncertainties over the complete frequency range and is lesssensitive to non-repetitive disturbances.

1M. Tomizuka. Zero phases tracking error algorithm for digital control journal of Dynamics Sys-tems,Measurement and Control, 109:65-68,March 1987

21

Page 27: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Convergence criteria of the ILC Iterative Learning Controller

−150

−100

−50M

agni

tude

(dB

)

100

101

102

−180

−90

0

90

180

Pha

se (

deg)

Discretized Process Sensitivity with ZOH

Frequency (Hz)

modeldiscretedata

(a) Model Vs Discrete Vs Measured Process sensitivity

50

100

150

Mag

nitu

de (

dB)

10−1

100

101

102

103

−180

−90

0

90

180

Pha

se (

deg)

Inverse discrete PS Vs Learning Filter with γ =1

Frequency (Hz)

1/SPD1

L1

(b) Learning Filter Vs Process sensitivity

Figure 4.2: Process sensitivity and Learning filter with γ = 1

4.3 Convergence criteria of the ILCThe convergence criteria guarantees the stability of the controlled plant with a feed-forward signal.The unity circle criterion |1− SpL| < 1,∀ f is used to test that convergence.

4.3.1 Convergence of the ILC with the plant model and the FRD

−50

−40

−30

−20

−10

0

Mag

nitu

de (

dB)

10−1

100

101

102

103

−180

−90

0

90

180

Pha

se (

deg)

Model: Convergence Without Robust filter

Frequency (Hz)

(a) Model: |1 − Spmodel L| < 1,∀ f → convergenceguaranteed

−40

−20

0

20

40

60

Mag

nitu

de (

dB)

10−1

100

101

102

103

−180

−90

0

90

180

Pha

se (

deg)

Data: Convergence Without Robust filter

Frequency (Hz)

(b) FRF: |1 − Spmeasured L| > 1, f or f > 20H z noconvergence guaranteed

Figure 4.3: Convergence test without Robustness filter

In theory the convergence criteria is always satisfied as shown on figure 4.3 (a)(the gain stays below 0 for all frequencies).In practice, however, this convergencecriteria is not always guaranteed because of the following factors:

• noise level increasing at higher frequencies

• model mismatch for higher order dynamics

22

Page 28: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Convergence criteria of the ILC Iterative Learning Controller

Therefore the system stability is no longer robust.As a solution to this problem azero gain low pass filter is used to guarantee a local robust stability

4.3.2 Convergence of ILC with the robust filterRobust Q Filter design

The Q filter is a Butterworth low pass filter that provides robustness against non-repetitive signals (modeling error, noise) at high frequencies with no zero dB gainbandwidth.

10−1

100

101

102

103

−600

−500

−400

−300

−200

−100

0

100

Mag

nitu

de (

dB)

Low−pass robutness filter Fbw

= 5hz

Frequency (Hz)

Figure 4.4: Robust Q filter

The phase of the filter remains zero when the "filtfilt" command from Matlabis used.

With additional robust low pass filter, the convergence theorem becomes|Q(1− SpL)| < 1,∀ fUnder the assumption that the ILC converges for k → ∞ ,the feedforward signalfk = fk−1 and the errorek = ek−1.The converged feedforward f∞ equals

f∞ =QL

1− Qe∞ (4.8)

and the remaining tracking error e∞ after convergence equals

e∞ =1

1+ PCr −

P1+ PC

f∞

e∞ =1− Q

(1− Q)(1+ PC)+ P QLr (4.9)

The filter Q ∈ C ∀ fFor e∞ = 0→ Re(Q) = 1 and I m(Q) = 0→ Q zero phase

23

Page 29: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Convergence criteria of the ILC Iterative Learning Controller

−200

−150

−100

−50

0

Mag

nitu

de (

dB)

10−1

100

101

102

103

−180

−90

0

90

180

Pha

se (

deg)

Model: Convergence with a robust filter ,Fc = 5hz

Frequency (Hz)

(a) Model: |Q(1 − Spmodel L)| < 1,∀ f → conver-gence guaranteed

−1 −0.5 0 0.5 1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

Convergence plot

Re

Im

unityModel

(b) Model Vs Unity circle criterion

−600

−500

−400

−300

−200

−100

0

Mag

nitu

de (

dB)

10−1

100

101

102

103

−180

−90

0

90

180

Pha

se (

deg)

Data: Convergence with a robust filter ,Fc = 5hz

Frequency (Hz)

(c) FRF: |Q(1 − Spmeasured L)| < 1,∀ f → conver-gence guaranteed

−1 −0.5 0 0.5 1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

Convergence plot

Re

Im

unityData

(d) frf Measurements Vs Unity circle criterion

Figure 4.5: Convergence test with Robustness filter

Figure 4.5 shows a convergence test with the Q filter. One can observe on figure4.5 (c) that the filter rolls out the noise and the model’s error. Thus, the convergencecriteria of the plant is satisfied on a wider frequency range without any modificationof the open loop gain.

24

Page 30: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Multi SISO ILC Simulation Iterative Learning Controller

4.4 Multi SISO ILC Simulation

MICRO-MOTION MODELWIth Multi-SISO- ILC

actuator6

num6

den6

actuator5

num5

den5

actuator4

num4

den4

actuator3

num3

den3

actuator2

num2

den2

actuator1

num1

den1

Y Ref 6

[t6 yref6]

Y Ref 5

[t5 yref5]

Y Ref 4

[t4 yref4]

Y Ref 3

[t3 yref3]

Y Ref 2

[t2 yref2]

Y Ref 1

[t1 yref1]

Y Out 6

y6

Y Out 5

y5

Y Out 4

y4

Y Out 3

y3

Y Out 2

y2

Y Out 1

y1

FF_update 6

[t6 ff6]

FF_update 5

[t5 ff5]

FF_update 4

[t4 ff4]

FF_update 3

[t3 ff3]

FF_update 2

[t2 ff2]

FF_update 1

[t1 ff1]

E6

error6

E5

error5

E4

error4

E3

error3

E2

error2

E1

error1

Controller6

numc6

denc6

Controller5

numc5

denc5

Controller4

numc4

denc4

Controller3

numc3

denc3

Controller2

numc2

denc2

Controller1

numc1

denc1

Figure 4.6: Multi SISO ILC Simulation Model

Given a certain setpoint trajectory, the simulation of the ILC is performed usingthe controlled plant model and Matlab Simulink toolbox.

25

Page 31: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Analyses of a disturbed plant with the ILC Iterative Learning Controller

0 10 20 30 40 50 60 70 80−0.05

0

0.05

0.1

0.15P

ositi

on [m

]Setpoint trajectory with ILC simulation actuator 1

0 10 20 30 40 50 60 70 80−4

−2

0

2

4x 10

−4

Tra

ckin

g e

rror

[m]

time [s]

Yout1Yref1

error1

(a) Simulation: Tracking error

1 1.5 2 2.5 3 3.5 4 4.5 510

−4

10−3

10−2

X: 4Y: 0.0003291

Repetitive Error actuator 1

Iteration [k]

Tra

ckin

g er

ror

[m]

(b) Error convergence

Figure 4.7: Simulation: Motion performances with ILC

Figure 4.7 illustrates on the left the tracking error of a certain trajectory usingthe ILC offline update algorithm, and on the right the error convergence Vs the up-date iterations. One can observe that after few iterations(4 iterations),the error con-vergence becomes constant at the level of the sensor resolution(10−4m/sample),causedby the step in the measured setpoint trajectory.

4.5 Analyses of a disturbed plant with the ILCMore often, some disturbances due to load (different loads or inertia), or to themeasurements (low accuracy of measurement devices caused by waring) affect thecontrol action. Therefore, the analysis of these factors have to be considered in thedesign of the feedforward action.

yk

ILC

C(s) Pu(s)r + ek

Fk

L(s)

+ +

M

Q(s)

Fk+1

+ +

dk

+

+

+

+

nk

Figure 4.8: Iterative learning control with load and measurements disturbances

Error propagation The feedback control loop

ek = Sr − Sdk − Spnk − Sp fk (4.10)

ILC update fk+1 = Q( fk + Lek)

Therefore, the ILC update becomes

fk+1 = Q( fk + Lek)

26

Page 32: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Analyses of a disturbed plant with the ILC Iterative Learning Controller

= Q( fk + L Sr)− Q(L Sdk + L Spnk + L Sp fk)

Error propagation due to feedforward with r=0

ek+1 = −Sdk+1 − Spnk+1 − Sp fk+1 (4.11)

Error convergence with a disturbed plant model

Recall equation (4.8), the convergence feedforward f∞ equals

f∞ =QL

1−Q e∞

And the remaining error after convergence equals

e∞ =1

1+ PCr −

11+ PC

d∞ −P

1+ PCn∞ −

P1+ PC

f∞

⇒ e∞(1+P QL

(1+ PC(1− Q)=

11+ PC

(r − d∞ − Pn∞)

⇒ e∞ =(1− Q)(1+ PC)

(1+ PC)[(1+ PC)(1− Q)+ P QL(r − d∞ − Pn∞)

e∞ =(1− Q)

(1+ PC)[(1+ PC)(1− Q)+ P QL(r − d∞ − Pn∞) (4.12)

Assumptions:

For F ≤ Fc Re(Q) ≈ 1,⇒ e∞ ≈ 0

For F ≥ Fc Re(Q) ≈ 0,⇒ e∞ ≈ 1(1+PC)(1+PC) (r − d∞ − Pn∞)

The remaining error depends on the correctness of the low pass filter at lowfrequency, and on the robustness of the feedback loop at high frequency accordingto these assumptions.

4.5.1 Simulation of the ILC action on a disturbed plant model

Figure 4.9: ILC with a Disturbed plant

27

Page 33: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Discussion Iterative Learning Controller

The disturbance considered in this simulation is an additional periodic force onthe actuator’s valve caused by the inertia force that increases the deviation on tra-jectory(target position). This force is converted into a disturbed input voltage of1volt@5H z as shown on figure 4.9.

0 10 20 30 40 50 60 70 80-0.06

-0.04

-0.02

0

0.02

0.04

0.06

0.08

time [s]

Po

siti

on

[m

]

ILC simulation with a disturbed plant - Fd =1v @ 5 Hz

0 10 20 30 40 50 60 70 80-1

-0.5

0

0.5

1

1.5x 10

-3

Tra

ckin

g e

rro

r [m

]

time [s]

Yout1

Yref1

error1

(a) Disturbed plant: Tracking error

1 1.5 2 2.5 3 3.5 4 4.5 5

10-2.9

10-2.8

10-2.7

10-2.6

10-2.5

10-2.4

10-2.3

X: 4Y: 0.001203

Error Convergence with a disturbance input

Iteration [k]

Tra

ckin

g e

rro

r [m

]

(b) Error convergence with a disturbed plant

Figure 4.10: Simulation: Motion performances with a disturbed plant

4.6 DiscussionThe design of the Iterative learning controller based on the Micro Motion Simu-lator was described in this chapter. The improved performance of some real datasetpoint trajectory was illustrated based on the tracking error and the error conver-gence using simulation.Furthermore, the analysis of the latter design with somedisturbances on the plant model was achieved.

28

Page 34: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Chapter 5

Lifted Iterative LearningController

In this section, the ILC control design is studied using the lifted setting. In thissetting, the behavior of a discrete-time linear time invariant (LTI) system J dur-ing a trial (one period of measurement’s length) is represented by its convolutionmatrix. This matrix contains the systems impulse reesponse data H(t) for timet = 0, 1, · · · , N − 1, with N total number of samples(see section 3.2.1) in a trial.

J =

H(0) 0...

. . .

H(N − 1) · · · H(0)

(5.1)

5.1 Lifted actuator plant ModelFor lifted ILC, the convolution matrix J that represents the time domain behavior ofthe process sensitivity is required for time t = kts , here ts is the sampling time, k =0, 1, 2, · · · , N−1. Matrix J is filled with the Markov parameters,hi of Sp(z)(discreteprocess sensitivity).

29

Page 35: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Lifted actuator plant Model Lifted Iterative Learning Controller

Figure 5.1: Convolution matrix of the lifted actuator model

5.1.1 Singular value decomposition of J matrixIn linear algebra the singular value decomposition (SVD) is an important factor-ization of a rectangular real or complex matrix. This SVD is used to understandthe singularity of the system response, to apply the controller adequately without aneed of the inverse process sensitivity. Therefore, the presence of a non minimumphase zero or a time delay does not put any limitation on the control action.

Consider J, the convolution matrix of impulse response H(t)

J =(

U1 U2) ( 61 0

0 62

)(V T

1V T

2

)(5.2)

Where the rank of J is the dimension of 61 and 62 ≈ 0

The decomposed f , the input to J as

J f = J f1 + J f2

Where

f1 ∈ imV 1, f2 ∈ imV 2

Thus

J f = U161V T1 f1 as V T

1 f2 = 0 V T2 f1 = 0 and replace f1 by V1 f

30

Page 36: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Inverse model control design Lifted Iterative Learning Controller

0 200 400 600 800 1000 1200 1400 1600 1800 200010

-8

10-7

10-6

10-5

10-4

10-3

10-2

10-1

100

X: 1000Y: 0.0005749

Singular value of J

(J)

Ene

rgy

leve

l [dB

]

Figure 5.2: Singular values of J

Figure 5.2 shows that most of the energy of the response of the controlled plantis in the first 500 singular values (61) and the remaining singular values (62)havethe lowest energy level,thus can be approximated to zero.

5.2 Inverse model control design

1w1JV

L

r

u 1jf f jy

j j j

Figure 5.3: Lifted ILC configuration

The inverse model controller is designed as follows,

f j+1 = (I − L J V1) f j + Lr with f0 = 0e j = (r − J V1) f j

If

L J V1 = α I 0 < α < 2

31

Page 37: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

LQ Optimal control design Lifted Iterative Learning Controller

LU161V T1 V1 = α I

Then

L Db = α

(61 00 62 ≈ 0

)−1 (U1 . . .

)T= α6−1

1 U T1 (5.3)

If α = 1, then dead-beat. The output response y follows the reference trajectoryonly in the subspace im J V1 = imU1 and the controller L contains high gains forsmall singular of 61

0 100 200 300 400 500 600 700 800 900 100010

-1

100

101

102

103

104

Ldb controller =0.9

(J)

Ene

rgy

leve

l [dB

]

L

db

1/ 1

Figure 5.4: Dead-beat controller

5.3 LQ Optimal control designAlternative to the inverse model control is the design of a linear quadratic optimalcontroller, which has the advantage of providing an approximate dead-beat perfor-mance for large singular values of 61 whereas the gain in the feedback loop isalmost zero for small singular values.

f j+1 = f j + u j f0 = 0y j = J V1 f j

LQ criterion:

Crit = 6∞j=0(yTj Qy j + uT

j Ru j )

= 6∞j=0( f Tj V T

1 J T Q J V1 f j + uTj Ru j )

Solution to the discrete-time LQ-Optimal problem (A, B, R, Q) is

32

Page 38: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

LQ Optimal control design Lifted Iterative Learning Controller

u j = −(R + BT P B)−1 BT P A f j

Let R = β I and find P , the stabilizing solution to the discrete Riccati equation(DARE),

P = AT P A + Q − AT P B(R + BT P B)1 BT P A (5.4)

by approximation with the weighting matrix Q

Q = V T1 J T J V1(β I + V T

1 J T J V1)−1V T

1 J T J V1

= V T1 J T J V1[I − β I (β I + V T

1 J T J V1)−1]

Which is closed to V T1 J T J V1 for small β. For this choice of Q, the DARE has

the stabilizing solution

P = V T1 J T J V1 (5.5)

and the corresponding state feedback law L is,

u j = (β I + V T1 J T J V1)

−1V T1 J︸ ︷︷ ︸

L

e j

Thus

Llq = α(β I + V T1 J T J V1)

−1V T1 J (5.6)

0 100 200 300 400 500 600 700 800 900 100010

0

101

102

103

104

Lq controller =1 =0.0001

(J)

Ene

rgy

leve

l [dB

]

L

lq

1/ 1

Figure 5.5: LQ Optimal Controller

The closed loop system matrix is,

I − L J V1 = I − (β I + V T1 J T J V1)

−1V T1 J T J V1

33

Page 39: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Discussion Lifted Iterative Learning Controller

= β(β I + V T1 J T J V1)

−1)

= β(β I +621)−1

Hence the closed loop poles equal

λi =β

β + σ 2i

So that

λi ≈β

σ 2i≈ 0 f orσ 2

i � β

λi ≈ 1 f orσ 2i � β

Thus for large singular values, LQ Optimal control approximately provides dead-beat performance whereas for small singular values, the gain in the feedback loopis almost zero.

5.4 DiscussionThis chapter describes the design of the Lifted iterative learning control with theMicro motion simulator plant’s model. Despite the advantages of this feedforwardalgorithm for improving performance, the long trial period of the available realdata setpoint trajectory made its implementation impossible to achieve within thisproject and further investigation on this matter is recommended.

34

Page 40: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Chapter 6

Experiments

6.1 Setup experimentsThe testing of the designed algorithm was achieved with the micro motion simula-tor based on a multi-siso control approach.

Motion Computer MCC

Motion base assembly

Interconnecting hoses

HPU

Interconnecting cabling Manual (CDRom)

Figure 6.1: Micro motion system overview

Based on the overview provided by figure 6.1, the Feedforward data and the Set-point trajectory data are both interpolated from 500H z (I/O frequency using UTPcross cable) into 50H z (Micro Motion executable frequency) and then transferredinto the memory of the Motion Computer via a cross link UTP cable.The files are therefore ready to be played using the graphical user interface of theMotion computer. A disk logger on the Motion computer allows the saving of theplatform simulator made during the playback.The recorded trajectory is therefore used to determine the tracking error and tocompute the next feedforward trial action offline on a computer running the algo-rithm. This new feedforward vector updates the trajectory made by the platformsimulator for a particular setpoint trajectory and thus improves the performance ofthe Micro motion Simulator.The next section discusses the results obtained during our experiments using thesetpoint trajectory from chapter 3.1.

35

Page 41: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Experiments Result with a dead beat ILC implementation Experiments

6.1.1 Problem related to experimentsAs already discussed in chapter 3.3.1, the performance of the Micro motion systemis limited by some physical factors, This session also experienced software relatedproblem (data overlapping or data losses) during the disk logging or data transferbetween the host computer and the Motion computer.Due to these limitations, only the dead-beat control design was implemented.

6.2 Experiments Result with a dead beat ILC imple-mentation

The dead beat ILC accelerates the convergence of the tracking error to decrease butis very sensitive to uncertainty(model error,parameter uncertainty).

0 10 20 30 40 50 60 70 80−0.1

−0.05

0

0.05

0.1

Po

siti

on

[m

]

Setpoint trajectory with ILC, Iteration 1

Yref1Yout1

0 10 20 30 40 50 60 70 80−10

−5

0

5x 10

−3

time [s]

Tra

ckin

g e

rro

r [m

]

error1

(a) iteration 1

0 10 20 30 40 50 60 70 80−0.1

−0.05

0

0.05

0.1P

osi

tio

n [

m]

Setpoint trajectory with ILC, Iteration 2

Yref1Yout1

0 10 20 30 40 50 60 70 80−2

−1

0

1

2x 10

−3

time [s]

Tra

ckin

g e

rro

r [m

]

error1

(b) iteration 2

0 10 20 30 40 50 60 70 80−0.1

−0.05

0

0.05

0.1

Po

siti

on

[m

]

Setpoint trajectory with ILC, Iteration 3

Yref1Yout1

0 10 20 30 40 50 60 70 80−2

−1

0

1

2x 10

−3

time [s]

Tra

ckin

g e

rro

r [m

]

error1

(c) iteration 3

0 10 20 30 40 50 60 70 80−0.1

−0.05

0

0.05

0.1

Po

siti

on

[m

]

Setpoint trajectory with ILC, Iteration 4

Yref1Yout1

0 10 20 30 40 50 60 70 80−5

0

5

10x 10

−3

time [s]

Tra

ckin

g e

rro

r [m

]

error1

(d) iteration 4

Figure 6.2: Experiment: Micro motion performances with ILC

36

Page 42: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Experiments Result with a dead beat ILC implementation Experiments

6.2.1 Comparison between the ILC experiment’s Convergence er-ror and the ILC simulation convergence error

1 1.5 2 2.5 3 3.5 4 4.5 510

−4

10−3

10−2

X: 4Y: 0.0003291

Repetitive Error actuator 1

Iteration [k]

Tra

ckin

g er

ror

[m]

(a) Error convergence Simulation

1 1.5 2 2.5 3 3.5 4 4.5 510

−3

10−2

10−1

X: 4Y: 0.00151

Experimental results, Repetitive Error actuator 1

Iteration [k]T

rack

ing

Err

or

[m]

(b) Error convergence Experiment

Figure 6.3: Error Convergence: Simulation Vs Experiments

Figure 6.3 illustrates the tracking error convergence from the simulation modeland the experiment data. The simulation results show that the error should de-crease continuously or should remain constant for infinite trials, but observing theexperiment’s result one can quickly notice that the error converges only for a finitenumber of trials, thus more attention should be payed on the last trial.This limita-tion in error convergence in the experimental setup is caused by the modeling error(mismatch between the learning filter and the plant process sensitivity). That alsodemonstrates the lack of robustness against model error in the ILC when using adead beat learning gain.A solution to this problem is to consider as last trial, the k − 1 trial whenever theerror start to increase to ensure that the tracking error always remains at the lowestof the valley.

6.2.2 Comparison between the feedback control results and theILC experiment’s results

The goal of this project was to reduce the tracking error, to improve the perfor-mance of the Micro motion simulator. This section evaluates the achievement ofthat goal by comparing the tracking error obtained from the feedback control loop,and the tracking error obtained when our feedforward algorithm is added as illus-trated in figure 6.4 below.

37

Page 43: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Discussion Experiments

0 10 20 30 40 50 60 70 80−0.1

−0.05

0

0.05

0.1Setpoint trajectory with ILC, actuator 1

Pos

ition

[m]

Yref1Yout1

0 10 20 30 40 50 60 70 80−0.01

−0.005

0

0.005

0.01

0.015

Tra

ckin

g e

rro

r [m

]

time [s]

error1

(a) Feedback Tracking error

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5

0.5

1

1.5

2

2.5x 10

−3 Amplitude Error Spectrum E1(t) from actuator 1

Frequency (Hz)

|E(f

)|

(b) Feedback Error Spectrum

0 10 20 30 40 50 60 70 80−0.1

−0.05

0

0.05

0.1Setpoint trajectory with ILC, Experiment actuator 1

Pos

ition

[m]

Yref1Yout1

0 10 20 30 40 50 60 70

−1

0

1

x 10−3

Tra

ckin

g er

ror

[m]

time [s]

error1

(c) Tracking error with ILC

0 1 2 3 4 5

0.5

1

1.5

2

2.5

3x 10

−5 Experiments, Amplitude Error Spectrum E1(t) from actuator 1

Frequency (Hz)

|E(f

)|

(d) Error Spectrum with ILC

Figure 6.4: Experiment: Micro motion performances with ILC

The tracking error (figure 6.4 (c) is improved by a factor of 5 compared to thosefrom the feedback control loop.the tracking error spectrums also show that the spectrum goes from a significantconcentrated error region to a flat spectrum Therefore, the remaining error is al-most bound at the top.

6.3 DiscussionThis chapter describes the implementation and testing of the designed feedforwardalgorithm on the Micro motion simulator. It also evaluates the obtained experimen-tal results by comparing them with the simulation’s result for error convergenceand the feedback control’s results for performance analysis.

38

Page 44: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Chapter 7

Conclusions andRecommendations

7.1 ConclusionsThe main contribution of this project is the development and testing of a multi-sisofeedforward strategy for improving the motion simulator performance in additionto the existing feedback controller.In order to achieve that, the plant model of the micro motion simulator based on ablack box experimental method was obtained.Using that model, the stability and performance of the open loop plant were in-vestigated.Then follow the choice of some proper feedforwad controllers (IterativeLearning Control, Lifted Iterative Learning Control), based on the investigated per-formance and the evaluation of some feedforward control’s strategies.Further on, the latter were designed based on the Iterative learning error algorithm,and some simulations were made with available real data setpoint trajectory forreevaluation and validation of the correctness of those designs to improve the sim-ulator’s performance .Furthermore, the main issues of the time based feedforward strategy(Lifted ILC)related to the simulator’s plant were identified, and the best suited Feedforwardstrategy (Iterative Learning Control) was then implemented and tested on the micromotion simulator setup using a multi single input/single output control method.Based on the results of those experiments,the feasibility of the chosen control’smethod (Multi SISO) was shown and the performance of the Micro Motion Simu-lator was proven to be 5 times better than those obtained from a feedback controlloop after 3 trials only as observed in table 7.1.

Trials k = 0 k = 1 k = 2 k = 3 k = 4Feedback Contrl 0.01 - - - -ILC Simulation 0.01 0.0051 0.00063 0.00033 0.00033ILC experiment 0.01 0.004 0.00157 0.00151 0.006

Table 7.1: Tracking error performance in [m]

39

Page 45: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Recommendations Conclusions and Recommendations

7.2 RecommendationsThe experiments chapter discussed the test results of this project. Those resultsshow the improvement of the simulator performance, nonetheless, there is stillroom for improvement. This section outlines some suggestions for further work.

White box modeling approach The low convergence of the experimental’s track-ing error, illustrated the importance of having a very accurate model whenimplementing the Iterative learning control algorithm.This modeling approach, regardless of its complexity, will help to identify thecross talk in the plant, which contribute to the model and plant mismatch.

Use different trajectories to investigate the robustness of the designed controllerThe Robustness of the system with the ILC implemented, plays a key role forthe validation of the controller. This project focuses on demonstrating theimproved performance when using the feedforward controller with an itera-tive learning on the Micro motion simulator.

Online Tuning algorithm So far the available algorithm can only be tune offline,this limit its utilization to expert only. Design an online tuning algorithmcan help to have a build in Micro Motion simulator with an iterative learningcontroller.

Recommendation based on the setup problemThe practical problems discussed in section 6.1.1 limit performance of the ILC

in improving the tracking error. The following suggestions are given to counterthis limitation:

1. Investigate and tackle the problem of reading and writing the data from thedisk logger of the motion computer

2. Investigate the position sensor for better resolution. The sensors used in thisproject were 12 bits resolution only.

40

Page 46: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Bibliography

[1] O.H.Brosgra, "Time Scales and Model Approximation",Phisical Modelling forSystem and Control Chapter 3 @ TUD - TU/e 2006-2007.

[2] Stan van der Meulen, Rob Tousain, and Okko Bosgra, "Fixed structure feedfor-ward controller tuning exploiting iterative trials, applied to a high-precision elec-tromechanical servo system",journal of Dynamic Systems, Measurement, andControl, Copyright@ 2008 by ASME.

[3] B.G.Dijkstra, "Iterative Learning Control, with applications to a waferstage",Mechanical Engineering, System and Control Group, Delft Universityof Technology,Mekelweg 2, 2628 CD Delft, The Netherlands, 23-January-2003, CONCEPT VERSION 1.1.

[4] Rob Tousain, Eduard Van Der Meche and Okko Bosgra, "Design strategies foriterative learning control based on optimal control", Mechanical Engineering Sys-tems and Control Group, Delft University of Technology, Mekelweg 2, 2628CD, Delft, The Netherlands, Vol. 12, September 2001.

[5] Jeroen Van De Wijdeven, " Introduction to Singular Value Decomposition",Capita Selecta van de regeltechniek, Techniche Universiteit Eindhoven, 2006-2007.

[6] Jeroen Van De Wijdeven , Okko H. Bosgra, "Lifted Iterative Learning Control",4k140 Capita Selecta in Control 2006/2007.

[7] Masayoshi Tomizuka, "Zero Phase Error Tracking Algorithm for Digital Con-trol",Department of Mechanical Engineering, University of California, Berke-ley, CA 94720, Journal of Dynamic Systems,Measurement,and Control,March 1987,Vol. 109/105.

[8] I. Rotariu, B.G.Dijkstra, M.Steinbuch, "Comparison of Standard and Lifted ILCon a motion system", 3rd IFAC Symposium on Mechatronic Systems, Syd-ney(2004).

[9] Jeroen Van De Wijdeven , Okko H. Bosgra, "Hankel Iterative Learning Con-trol for residual vibration suppression with MIMO flexible structure experiments",Technische Universiteit Eindhoven, Dept. of Mechanical Engineering, P.O.Box 513, 5600 MB Eindhoven, The Netherlands,Proceedings of the 2007American Control Conference,Marriot Marquis Hotel at Times Square, NewYork City, USA, July 11-13,2007.

41

Page 47: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Appendix A

Micro Motion System

This chapter describes the micro motion system unit (600-6DOF-200-MK6) usedto implement this project from Bosch Rexroth, Systems and Engineering Depart-ment.The micro motion system is a complete self-supporting product. The motion baseshall be delivered with one complete Hydraulic Power Unit (HPU) and electroniccontrols needed to generate and control motion. All parts delivered are pre-testedand adjusted at the factory to enable fast and easy installation on site.

Figure A.1: Motion system impression

A.1 Micro motion system descriptiionThe motion system is based upon the proven "6 DOF motion system" technology.The motion system shall consist of the following main components:

• Motion base assembly, consisting of:

I

Page 48: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Micro motion system descriptiion Micro Motion System

- Motion platform

- Motion actuators

- Universal joint units

- Base frame

• Hydraulic Power Unit (HPU).

• Motion Control Cabinet (MCC).

• Motion Computer (MC).

• Interconnecting cabling and hoses.

A payload can be mounted to the top of the motion platform. The Motion Com-puter will calculate the motion commands for the mounted object. The MotionComputer will have multiple software modules operating in real-time which allsupport operation of the motion system.

Motion Computer MCC

Motion base assembly

Interconnecting hoses

HPU

Interconnecting cabling Manual (CDRom)

Figure A.2: Micro motion system overview

The control architecture for the motion system is:

• HOST computer (customer supplied).In case of real time (interactive) communication it generates and outputs thestate commands and acceleration-, velocity- and position setpoints in degreesof freedom resulting from operator inputs and computations of the vehiclemodel that is running in the Host. In case of a show control solution (file playand replay only), it generates and outputs the state commands in response tooperator inputs.

• Motion Computer.Receives the acceleration, velocity and position setpoint information (depend-ing on the application) and converts the information into data for the six (6)individual actuators. This data is transmitted through the D/A output boardto the actuators.

II

Page 49: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Definitions Micro Motion System

A.2 DefinitionsIn general, the following definitions are used in describing the various planes andcoordinate systems.

1. Joint Planes.The plane through the rotation points of the joints of the moving platformis called the upper joint plane. The plane through the rotation points of thejoint of the mounting pads is called the lower joint plane.

2. Coordinate systems.The coordinate systems used in this motion system are shown in Figure 2-1. This figure also shows the numbering convention for the upper and thelower joints. All coordinate systems are right-handed rectangular coordinatesystems. Looking in the positive direction of each of the axes, the positiverotation around the axes is clockwise.

3. Moving Platform Coordinate System.The Moving Platform Coordinate System is fixed to the moving platform ofthe motion system. The origin of the xy plane of the Moving Platform Coordi-nate System lies in the upper joint plane. The origin of the Moving PlatformCoordinate System is located in the centroid of the triangle formed by theupper joint rotation points and is called the Motion Reference Point (MRP).

4. Earth Fixed Coordinate System.The Earth Fixed Coordinate System is fixed to the world. The xy plane of theEarth Fixed Coordinate System lies in the lower joint plane. The origin ofthe Earth Fixed Coordinate System is located in the centroid of the triangleformed by the lower joint rotation points.

5. Neutral position.The motion system neutral position is defined as the position of the movingplatform when all the actuators are at mid stroke. The distance betweenthe top surface of the platform and the underside of the mounting pads isapproximately 699 mm, when the system is in the neutral position.

6. Settled position.The motion system settled position is defined as the position of the mov-ing platform when all the actuators are completely retracted. The distancebetween the top surface of the platform and the underside of the mountingpads is approximately 581 mm, when the system is in Settled Position.

7. NomenclatureThe following names are used for six (6) degrees of freedom:

- Surge : translation in x direction

- Sway : translation in y direction

- Heave : translation in z direction

- Roll : rotation around x-axis

- Pitch : rotation around y-axis

- Yaw : rotation around z-axis

III

Page 50: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Micro motion assembly base Micro Motion System

A.3 Micro motion assembly baseThe motion base is a self contained integrated unit. The base frame is a structure,which can easily be bolted to the floor. Six joints are connected to the base frame,the six hydraulic actuators are connected to these joints. The other ends of theseactuators are connected to the joints on the moving platform. This platform is thestructure on which the payload is mounted.

A.3.1 Motion platformThis is a frame with mechanical interface locations for mounting the payload.When designing a support structure for the payload’s interface, all structural partsmust be located above the top of platform surface.

A.3.2 Motion actuatorEach motion actuator features a hydraulic asymmetric cylinder with low frictionbearings. A central valve manifold provides the hydraulic power to each of the ac-tuators. Each actuator has a built-on proportional valve. A displacement transduceris built-in at the bottom-side of the piston rod. Total stroke of the actuator is 200mm. Soft end stops are incorporated in the design of the actuator, to prevent peakor shockloads on the payload or passengers in case of control- or operator failures.

A.3.3 Universal joint unitsEach actuator is equipped with two Universal Joint Units. The design allows theplatform to move freely within the maximum excursion envelope without mechan-ical interference. The joints are equipped with roller bearings to assure clearance-free rotation under specified loading conditions. These bearings provide a long lifecycle of the motion base.

A.4 Electronic Control SystemThe Motion Computer controls the Motion Base. This computer contains the D/A,A/D, digital I/O and Ethernet interface boards which controls the state of the mo-tion base and communicates with the host control computer, using an Ethernetinterface. As an alternative the Host communicates only through digital IO con-nected directly to the MCC (SShow control applicationT). The MC also contains thesix "leg-control-loops" (in software) for the motion base and the appropriate valvedrivers for the hydraulic valves. Feedback signals from the built-in position sensorsare connected to the conditioning electronics in the MCC for use in the positioncontrol loop. The MCC has also two discrete interface signals:

• Motion enable signal (For use as hard wired E-stop signal from facility)

• Readiness State of the motion base.

The following software functions will reside on the motion computer:

• State control of the motion base and the HPU

IV

Page 51: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Electronic Control System Micro Motion System

• Axis transformation from "degrees of freedom data" from host computer tothe six individual leg position setpoint signal.

• Inverse Axis transformation from the six individual leg position signals tothe actual platform position in degree of freedom for use in fixed screen /projection systems.

• Control loops for six actuators, including various parameter settings.

• Motion cueing software for the most realistic motion within the system’s ca-pabilities.

• Digital I/O interface. This forms the interface between the digital functionsof the system like valves, signal lights and the motion control computer.

V

Page 52: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Appendix B

Computation of Inputs/Outputsvariables of the Controlled plant

e = −y u′ = kpe = kp y

u = d + u′ = d − kp y

u = d − kvgkskpu ⇒ u(1+ ks gkvkpks) = d

G = kvgks

⇒ud=

11+ Gkp

= S (B.1)

y = ukvgks = (d − kp y)G ⇒ y(1+ Gkp) = dG

⇒yd=

G(1+ Gkp

= P S (B.2)

1− S = 1−1

(1+ Gkp)=(1+ Gkp)− 1(1+ Gkp)

=Gkp

(1+ Gkp= T (B.3)

kp = T P S−1 (B.4)

⇒Gkp

(1+ Gkp(

G(1+ Gkp

)−1=

Gkp

(1+ Gkp)[1+ Gkp

G] = kp

VI

Page 53: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

VII

Page 54: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

SISO Measurement of the Six actuators SISO actuators Model

Appendix C

SISO actuators Model

C.1 SISO Measurement of the Six actuators

0 20 40−20

−10

0

10

20

t [s]

S [v

olts

]

S − actuator 1

0 20 40−20

−10

0

10

20

t [s]

S [v

olts

]

S − actuator 2

0 20 40−20

−10

0

10

20

t [s]

S [v

olts

] S − actuator 3

0 20 40−20

−10

0

10

20

t [s]

S [v

olts

]

S − actuator 4

0 20 40−20

−10

0

10

20

t [s]

S [v

olts

]

S − actuator 5

0 20 40−20

−10

0

10

20

t [s]

S [v

olts

]

S − actuator 6

SENSITIVITY

(a) Measured Sensitivity

0 20 40−0.01

−0.005

0

0.005

0.01

t [s]

PS

[m/v

olts

]

PS − actuator 1

0 20 40−0.01

−0.005

0

0.005

0.01

t [s]

PS

[m/v

olts

]

PS − actuator 2

0 20 40−0.01

−0.005

0

0.005

0.01

t [s]

PS

[m/v

olts

]

PS − actuator 3

0 20 40−0.01

−0.005

0

0.005

0.01

t [s]

PS

[m/v

olts

]

PS − actuator 4

0 20 40−0.01

−0.005

0

0.005

0.01

t [s]

PS

[m/v

olts

]

PS − actuator 5

0 20 40−0.01

−0.005

0

0.005

0.01

t [s]

PS

[m/v

olts

]

PS − actuator 6

PROCESS−SENSITIVITY

(b) Measured Process Sensitivity

Figure C.1: SISO Measurements of the six actuatorsVIII

Page 55: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

SISO Measurement of the Six actuators SISO actuators Model

C.1.1 Plant models of the Six actuators

−150

−100

−50

0

Mag

nitu

de (

dB)

100

−180

0

180

Pha

se (

deg)

Plant 1

Frequency (Hz)

ModelFRD

−150

−100

−50

0

Mag

nitu

de (

dB)

100

−180

0

180

Pha

se (

deg)

Plant 2

Frequency (Hz)

−150

−100

−50

0

Mag

nitu

de (

dB)

100

−180

0

180

Pha

se (

deg)

Plant 3

Frequency (Hz)

−150

−100

−50

0

Mag

nitu

de (

dB)

100

−180

0

180

Pha

se (

deg)

Plant 4

Frequency (Hz)

−150

−100

−50

0M

agni

tude

(dB

)

100

−180

0

180

Pha

se (

deg)

Plant 5

Frequency (Hz)

−150

−100

−50

0

Mag

nitu

de (

dB)

100

−180

0

180

Pha

se (

deg)

Plant 6

Frequency (Hz)

Figure C.2: Plant models of the six actuators

C.1.2 Sensitivity evaluation of the Six actuators in the frequencydomain

−30

−20

−10

0

10

Mag

nitu

de (

dB)

100

−450

4590

135180

Pha

se (

deg)

Sensitivity 1

Frequency (Hz)

ModelFRD

−30

−20

−10

0

10

Mag

nitu

de (

dB)

100

−45

0

45

90

135

Pha

se (

deg)

Sensitivity 2

Frequency (Hz)

−30

−20

−10

0

10

Mag

nitu

de (

dB)

100

−450

4590

135180

Pha

se (

deg)

Sensitivity 3

Frequency (Hz)

−30

−20

−10

0

10

Mag

nitu

de (

dB)

100

−450

4590

135180

Pha

se (

deg)

Sensitivity 4

Frequency (Hz)

−30

−20

−10

0

10

Mag

nitu

de (

dB)

100

−450

4590

135180

Pha

se (

deg)

Sensitivity 5

Frequency (Hz)

−30

−20

−10

0

10

Mag

nitu

de (

dB)

100

−450

4590

135180

Pha

se (

deg)

Sensitivity 6

Frequency (Hz)

Figure C.3: Frequency domain, Sensitivity evaluation

IX

Page 56: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

SISO Measurement of the Six actuators SISO actuators Model

C.1.3 Process Sensitivity evaluation of the Six actuators in the fre-quency domain

−140

−120

−100

−80

−60

−40

Mag

nitu

de (

dB)

100

−180

−90

0

90

180

Pha

se (

deg)

Process sensitivity 1

Frequency (Hz)

ModelFRD

−150

−100

−50

Mag

nitu

de (

dB)

100

−180

−90

0

90

180

Pha

se (

deg)

Process sensitivity 2

Frequency (Hz)

−140

−120

−100

−80

−60

−40

Mag

nitu

de (

dB)

100

−180

−90

0

90

180

Pha

se (

deg)

Process sensitivity 3

Frequency (Hz)

−140

−120

−100

−80

−60

−40

Mag

nitu

de (

dB)

100

−180

−90

0

90

180

Pha

se (

deg)

Process sensitivity 4

Frequency (Hz)

−140

−120

−100

−80

−60

−40

Mag

nitu

de (

dB)

100

−180

−90

0

90

180

Pha

se (

deg)

Process sensitivity 5

Frequency (Hz)

−140

−120

−100

−80

−60

−40

Mag

nitu

de (

dB)

100

−180

−90

0

90

180

Pha

se (

deg)

Process sensitivity 6

Frequency (Hz)

Figure C.4: Frequency domain, Process sensitivity evaluation

C.1.4 Process Sensitivity validation of the Six actuators with in thetime domain

0 10 20 30 40−8

−6

−4

−2

0

2

4

6

8x 10

−3

t [s]

PS

[m

/vo

lts]

Process sensitivity 1

FRDModel

0 10 20 30 40−8

−6

−4

−2

0

2

4

6

8x 10

−3

t [s]

PS

[m

/vo

lts]

Process sensitivity 2

0 10 20 30 40−8

−6

−4

−2

0

2

4

6

8x 10

−3

t [s]

PS

[m

/vo

lts]

Process sensitivity 3

0 10 20 30 40−8

−6

−4

−2

0

2

4

6

8x 10

−3

t [s]

PS

[m

/vo

lts]

Process sensitivity 4

0 10 20 30 40−8

−6

−4

−2

0

2

4

6

8x 10

−3

t [s]

PS

[m

/vo

lts]

Process sensitivity 5

0 10 20 30 40−8

−6

−4

−2

0

2

4

6

8x 10

−3

t [s]

PS

[m

/vo

lts]

Process sensitivity 6

Figure C.5: Time domain, Process sensitivity validation

X

Page 57: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

SISO Measurement of the Six actuators SISO actuators Model

C.1.5 Sensitivity evaluation of the Six actuators in the time domain

0 10 20 30 40−15

−10

−5

0

5

10

15

t [s]

S [

volt

s]

Sensitivity 1

FRDModel

0 10 20 30 40−15

−10

−5

0

5

10

15

t [s]

S [

volt

s]

Sensitivity 2

0 10 20 30 40−15

−10

−5

0

5

10

15

t [s]

S [

volt

s]

Sensitivity 3

0 10 20 30 40−15

−10

−5

0

5

10

15

t [s]

S [

volt

s]

Sensitivity 4

0 10 20 30 40−15

−10

−5

0

5

10

15

t [s]

S [

volt

s]

Sensitivity 5

0 10 20 30 40−15

−10

−5

0

5

10

15

t [s]

S [

volt

s]

Sensitivity 6

Figure C.6: Time domain, Sensitivity validation

XI

Page 58: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Appendix D

ILC design for six actuators

D.1 Process sensitivity, Model, Discrete, FRD

−200

−150

−100

−50

0

Mag

nitu

de (

dB)

100

−180

0

180

Pha

se (

deg)

PS1

Frequency (Hz)

−400

−300

−200

−100

0

Mag

nitu

de (

dB)

100

−180

0

180

Pha

se (

deg)

PS2

Frequency (Hz)

−200

−150

−100

−50

0

Mag

nitu

de (

dB)

100

−180

0

180

Pha

se (

deg)

PS3

Frequency (Hz)

−200

−150

−100

−50

0

Mag

nitu

de (

dB)

100

−180

0

180

Pha

se (

deg)

PS4

Frequency (Hz)

−200

−150

−100

−50

0

Mag

nitu

de (

dB)

100

−180

0

180

Pha

se (

deg)

PS5

Frequency (Hz)

−200

−150

−100

−50

0

Mag

nitu

de (

dB)

100

−180

0

180

Pha

se (

deg)

PS6

Frequency (Hz)

SpM

SpD

SpFRF

Figure D.1: Process sensitivity , Model, Discrete, FRD

XII

Page 59: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Learning filter, Inverse Discrete Process sensitivity ILC design for six actuators

D.2 Learning filter, Inverse Discrete Process sensitivity

50

100

150

Mag

nitu

de (

dB)

100

−180

0

180

Pha

se (

deg)

inv(SpD1

) & L1

Frequency (Hz)

50

100

150

Mag

nitu

de (

dB)

100

−180

0

180

Pha

se (

deg)

inv(SpD2

) & L2

Frequency (Hz)

50

100

150

Mag

nitu

de (

dB)

100

−180

0

180

Pha

se (

deg)

inv(SpD3

) & L3

Frequency (Hz)

50

100

150

Mag

nitu

de (

dB)

100

−180

0

180

Pha

se (

deg)

inv(SpD4

) & L4

Frequency (Hz)

50

100

150

Mag

nitu

de (

dB)

100

−180

0

180

Pha

se (

deg)

inv(SpD5

) & L5

Frequency (Hz)

50

100

150

Mag

nitu

de (

dB)

100

−180

0

180

Pha

se (

deg)

inv(SpD6

) & L6

Frequency (Hz)

1/SpD

L

Figure D.2: Learning filter, Inverse Discrete Process sensitivity

XIII

Page 60: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Appendix E

Matlab Files

E.1 Output Sensitivity and Output Process SensitivityMeasurements

% SISO IDENTIFICATION MAT FILE% I/O SENSITIVITY - PROCESS SENSITIVITY

% act1_T : time input signal actuator 1% act(*)_d(*) : disturbance input actuator (*)% act(*)_u(*)+act(*)_d(*) : output sensitivity actuator(*)% act(*)_y(*) : output process sensitivity actuator(*)% textread : read data from dat file

id = 0;if (id == 1)clear all;close all;clc;

%%% Read data from the measurement file data1

datalength=20000;

fid = fopen(’data1.m’, ’r’);

[act1_T,act1_d,act1_u,act1_y]=textread(’data1.m’,...’ %f %f %f %f ’,50000);

fclose(fid);

act1_t = act1_T-act1_T(1,1);t1 = act1_t(1:datalength);d1 = act1_d(1:datalength);u1 = act1_u(1:datalength)+d1;y1 = act1_y(1:datalength);

XIV

Page 61: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Output Sensitivity and Output Process Sensitivity Measurements Matlab Files

%%% Read data from the measurement file data2

fid = fopen(’data2.m’, ’r’);

[act2_T,act2_d,act2_u,act2_y]=textread(’data2.m’,...’ %f %f %f %f ’,50000);

fclose(fid);

act2_t = act2_T-act2_T(1,1);t2 = act2_t(1:datalength);d2 = act2_d(1:datalength);u2 = act2_u(1:datalength)+d2;y2 = act2_y(1:datalength);

%%% Read data from the measurement file data3

fid = fopen(’data3.m’, ’r’);

[act3_T,act3_d,act3_u,act3_y]=textread(’data1.m’,...’ %f %f %f %f ’,50000);

fclose(fid);

act3_t = act3_T-act3_T(1,1);t3 = act3_t(1:datalength);d3 = act3_d(1:datalength);u3 = act3_u(1:datalength)+d3;y3 = act3_y(1:datalength);

%%% Read data from the measurement file data4

fid = fopen(’data4.m’, ’r’);

[act4_T,act4_d,act4_u,act4_y]=textread(’data1.m’,...’ %f %f %f %f ’,50000);

fclose(fid);

act4_t = act4_T-act4_T(1,1);t4 = act4_t(1:datalength);d4 = act4_d(1:datalength);u4 = act4_u(1:datalength)+d4;y4 = act4_y(1:datalength);

%%% Read data from the measurement file data5

fid = fopen(’data5.m’, ’r’);

XV

Page 62: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Output Sensitivity and Output Process Sensitivity Measurements Matlab Files

[act5_T,act5_d,act5_u,act5_y]=textread(’data1.m’,...’ %f %f %f %f ’,50000);

fclose(fid);

act5_t = act5_T-act5_T(1,1);t5 = act5_t(1:datalength);d5 = act5_d(1:datalength);u5 = act5_u(1:datalength)+d5;y5 = act5_y(1:datalength);

%%% Read data from the measurement file data6

fid = fopen(’data6.m’, ’r’);

[act6_T,act6_d,act6_u,act6_y]=textread(’data1.m’,...’ %f %f %f %f ’,50000);

fclose(fid);

act6_t = act6_T-act6_T(1,1);t6 = act6_t(1:datalength);d6 = act6_d(1:datalength);u6 = act6_u(1:datalength)+d6;y6 = act6_y(1:datalength);

%% SIMULATION TIME RESPONSE SENSITIVTY & PROCESS SENSITIVITY

T =[t1 t2 t3 t4 t5 t6 ];D =[d1 d2 d3 d4 d5 d6 ];U =[u1 u2 u3 u4 u5 u6 ];Y =[y1 y2 y3 y4 y5 y6 ];

save data D U Y T

clear all;

elseload data

%% for i=1:6%% figure% subplot(2,1,1); plot(T(:,i),D(:,i),’r-’,T(:,i),Y(:,i));% grid; xlabel(’t [s]’,...% ’FontWeight’,’bold’);ylabel(’PS [m/volts]’,...% ’FontWeight’,’bold’);% title([’Time response Process sensitivity actuator ’,num2str(i)],...

XVI

Page 63: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Output Sensitivity and Output Process Sensitivity Measurements Matlab Files

% ’FontWeight’,’bold’);% subplot(2,1,2); plot(T(:,i),D(:,i),’r-’,T(:,i),U(:,i));% xlabel(’t [s]’,...% ’FontWeight’,’bold’); ylabel(’S [volts]’,...% ’FontWeight’,’bold’);% title([’Time response Sensitivity actuactor ’,num2str(i)],...% ’FontWeight’,’bold’);grid;%% end

figuresubplot(2,3,1); plot(T(:,1),Y(:,1));grid; xlabel(’t [s]’,...

’FontWeight’,’bold’);ylabel(’PS [m/volts]’,...’FontWeight’,’bold’);title([’ PS - actuator ’,num2str(1)],...’FontWeight’,’bold’);

subplot(2,3,2); plot(T(:,2),Y(:,2));grid; xlabel(’t [s]’,...’FontWeight’,’bold’);ylabel(’PS [m/volts]’,...’FontWeight’,’bold’);title([’ PS - actuator ’,num2str(2)],...’FontWeight’,’bold’);

subplot(2,3,3); plot(T(:,3),Y(:,3));grid; xlabel(’t [s]’,...

’FontWeight’,’bold’);ylabel(’PS [m/volts]’,...’FontWeight’,’bold’);title([’ PS - actuator ’,num2str(3)],...’FontWeight’,’bold’);

subplot(2,3,4); plot(T(:,4),Y(:,4));grid; xlabel(’t [s]’,...’FontWeight’,’bold’);ylabel(’PS [m/volts]’,...’FontWeight’,’bold’);title([’ PS - actuator ’,num2str(4)],...’FontWeight’,’bold’);

subplot(2,3,5); plot(T(:,5),Y(:,5));grid; xlabel(’t [s]’,...’FontWeight’,’bold’);ylabel(’PS [m/volts]’,...’FontWeight’,’bold’);title([’ PS - actuator ’,num2str(5)],...’FontWeight’,’bold’);

subplot(2,3,6); plot(T(:,6),Y(:,6));grid; xlabel(’t [s]’,...’FontWeight’,’bold’);ylabel(’PS [m/volts]’,...’FontWeight’,’bold’);

XVII

Page 64: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Output Sensitivity and Output Process Sensitivity Measurements Matlab Files

title([’ PS - actuator ’,num2str(6)],...’FontWeight’,’bold’);figure

subplot(2,3,1); plot(T(:,1),D(:,1),’r-’,T(:,1),U(:,1));grid; xlabel(’t [s]’,...

’FontWeight’,’bold’);ylabel(’S [volts]’,...’FontWeight’,’bold’);title([’ S - actuator ’,num2str(1)],...’FontWeight’,’bold’);

subplot(2,3,2); plot(T(:,2),D(:,2),’r-’,T(:,2),U(:,2));grid; xlabel(’t [s]’,...’FontWeight’,’bold’);ylabel(’S [volts]’,...’FontWeight’,’bold’);title([’ S - actuator ’,num2str(2)],...’FontWeight’,’bold’);

subplot(2,3,3); plot(T(:,3),D(:,3),’r-’,T(:,3),U(:,3));grid; xlabel(’t [s]’,...’FontWeight’,’bold’);ylabel(’S [volts]’,...’FontWeight’,’bold’);title([’ S - actuator ’,num2str(3)],...’FontWeight’,’bold’);

subplot(2,3,4); plot(T(:,4),D(:,4),’r-’,T(:,4),U(:,4));grid; xlabel(’t [s]’,...’FontWeight’,’bold’);ylabel(’S [volts]’,...’FontWeight’,’bold’);title([’ S - actuator ’,num2str(4)],...’FontWeight’,’bold’);

subplot(2,3,5); plot(T(:,5),D(:,5),’r-’,T(:,5),U(:,5));grid; xlabel(’t [s]’,...’FontWeight’,’bold’);ylabel(’S [volts]’,...’FontWeight’,’bold’);title([’ S - actuator ’,num2str(5)],...’FontWeight’,’bold’);

subplot(2,3,6); plot(T(:,6),D(:,6),’r-’,T(:,6),U(:,6));grid; xlabel(’t [s]’,...’FontWeight’,’bold’);ylabel(’S [volts]’,...’FontWeight’,’bold’);title([’ S - actuator ’,num2str(6)],...’FontWeight’,’bold’);

end

XVIII

Page 65: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Model estimation Mfile Matlab Files

E.2 Model estimation Mfileclear all;

close all;clc;

% Load data from Measurement data filerecall =1;load data

%Parameters

fs=500; % Frequencynfft=1500;noverlap = round(nfft/2);

if (recall==0)for i=1:6

% Estimate the Sensitivity - The Process Sensitivity - The Coherence

[Sfe(:,i),hz]=tfestimate(D(:,i),U(:,i),hanning(nfft),noverlap,nfft,fs);[Co_S(:,i),hz]=mscohere(D(:,i),U(:,i),hanning(nfft),noverlap,nfft,fs);[PSfe(:,i),hz]=tfestimate(D(:,i),Y(:,i),hanning(nfft),noverlap,nfft,fs);Co_PS(:,i)=mscohere(D(:,i),Y(:,i),hanning(nfft),noverlap,nfft,fs);

%Compute the plant model estimation and the control gain%estimation

TSfe(:,i)=1-Sfe(:,i);P_meas(:,i)=PSfe(:,i)./(Sfe(:,i));C_meas(:,i)=TSfe(:,i)./PSfe(:,i);

%Compute the frequency response of from the data

P_frf(i) = frd(P_meas(:,i),hz*2*pi);S_frf(i) = frd(Sfe(:,i),hz*2*pi);PS_frf(i) = frd(PSfe(:,i),hz*2*pi);C_frf(i) = frd(C_meas(:,i),hz*2*pi);

end%Fit the plant model and the control gain

[a_P1,b_P1,c_P1,d_P1]= frsfit(P_meas(:,1),hz,[6,4,2],1);P1 = ss(a_P1,b_P1,c_P1,d_P1);[a_P2,b_P2,c_P2,d_P2]= frsfit(P_meas(:,2),hz,[6,4,2],1);P2 = ss(a_P2,b_P2,c_P2,d_P2);[a_C1,b_C1,c_C1,d_C1]= frsfit(C_meas(:,1),hz,[2,0,0],2);C1 = ss(a_C1,b_C1,c_C1,d_C1);[a_C2,b_C2,c_C2,d_C2]= frsfit(C_meas(:,2),hz,[2,0,0],2);

XIX

Page 66: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Model estimation Mfile Matlab Files

C2 = ss(a_C2,b_C2,c_C2,d_C2);

[a_P3,b_P3,c_P3,d_P3]= frsfit(P_meas(:,3),hz,[6,4,2],1);P3 = ss(a_P3,b_P3,c_P3,d_P3);[a_P4,b_P4,c_P4,d_P4]= frsfit(P_meas(:,4),hz,[6,4,2],1);P4 = ss(a_P4,b_P4,c_P4,d_P4);[a_C3,b_C3,c_C3,d_C3]= frsfit(C_meas(:,3),hz,[2,0,0],2);C3 = ss(a_C3,b_C3,c_C3,d_C3);[a_C4,b_C4,c_C4,d_C4]= frsfit(C_meas(:,4),hz,[2,0,0],2);C4 = ss(a_C4,b_C4,c_C4,d_C4);

[a_P5,b_P5,c_P5,d_P5]= frsfit(P_meas(:,5),hz,[6,4,2],1);P5 = ss(a_P5,b_P5,c_P5,d_P5);[a_P6,b_P6,c_P6,d_P6]= frsfit(P_meas(:,6),hz,[6,4,2],1);P6 = ss(a_P6,b_P6,c_P6,d_P6);[a_C5,b_C5,c_C5,d_C5]= frsfit(C_meas(:,5),hz,[2,0,0],2);C5 = ss(a_C5,b_C5,c_C5,d_C5);[a_C6,b_C6,c_C6,d_C6]= frsfit(C_meas(:,6),hz,[2,0,0],2);C6 = ss(a_C6,b_C6,c_C6,d_C6);%-------------------------------------------------------------------------%Compute the sensitivity and the process sensitivity from the%estimated model and control gain

PS1 = P1/(1+P1*C1); PS2 = P2/(1+P2*C2); PS3 = P3/(1+P3*C3);PS4 = P4/(1+P4*C4); PS5 = P5/(1+P5*C5); PS6 = P6/(1+P6*C6);

S1 = 1/(1+P1*C1); S2 = 1/(1+P2*C2); S3 = 1/(1+P3*C3);S4 = 1/(1+P4*C4); S5 = 1/(1+P5*C5); S6 = 1/(1+P6*C6);P =[P1 P2 P3 P4 P5 P6];C =[C1 C2 C3 C4 C5 C6];PS=[PS1 PS2 PS3 PS4 PS5 PS6];S=[S1 S2 S3 S4 S5 S6];%-------------------------------------------------------------------------

% Transfer functions[num1 den1]= ss2tf(P1.a,P1.b,P1.c,P1.d);Ptf1 =tf(num1,den1,’v’);P1b=zpk(Ptf1);

[numc1 denc1]= ss2tf(C1.a,C1.b,C1.c,C1.d);Ctf1 =tf(numc1,denc1,’v’);C1b=zpk(Ctf1);

%------------------------------------------------------------------------

[num2 den2]= ss2tf(P2.a,P2.b,P2.c,P2.d);Ptf2 =tf(num2,den2,’v’);P2b=zpk(Ptf2);

[numc2 denc2]= ss2tf(C2.a,C2.b,C2.c,C2.d);Ctf2 =tf(numc2,denc2,’v’);C2b=zpk(Ctf2);

%------------------------------------------------------------------------

XX

Page 67: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Model estimation Mfile Matlab Files

[num3 den3]= ss2tf(P3.a,P3.b,P3.c,P3.d);Ptf3 =tf(num3,den3,’v’);P3b=zpk(Ptf3);

[numc3 denc3]= ss2tf(C3.a,C3.b,C3.c,C3.d);Ctf3 =tf(numc3,denc3,’v’);C3b=zpk(Ctf3);

%------------------------------------------------------------------------[num4 den4]= ss2tf(P4.a,P4.b,P4.c,P4.d);

Ptf4 =tf(num4,den4,’v’);P4b=zpk(Ptf4);

[numc4 denc4]= ss2tf(C4.a,C4.b,C4.c,C4.d);Ctf4 =tf(numc4,denc4,’v’);C4b=zpk(Ctf4);

%-----------------------------------------------------------------------[num5 den5]= ss2tf(P5.a,P5.b,P5.c,P5.d);Ptf5 =tf(num5,den5,’v’);P5b=zpk(Ptf5);

[numc5 denc5]= ss2tf(C5.a,C5.b,C5.c,C5.d);Ctf5 =tf(numc5,denc5,’v’);C5b=zpk(Ctf5);

%-----------------------------------------------------------------------[num6 den6]= ss2tf(P6.a,P6.b,P6.c,P6.d);Ptf6 =tf(num6,den6,’v’);P6b=zpk(Ptf6);

[numc6 denc6]= ss2tf(C6.a,C6.b,C6.c,C6.d);Ctf6 =tf(numc6,denc6,’v’);C6b=zpk(Ctf6);

%-----------------------------------------------------------------------

PSfrf =[PS_frf(1) PS_frf(2) PS_frf(3) PS_frf(4) PS_frf(5) PS_frf(6)];

save Plant Ptf1 Ptf2 Ptf3 Ptf4 Ptf5 Ptf6 hz...num1 den1 num2 den2 num3 den3 num4 den4 num5 den5 num6 den6

save Controller Ctf1 Ctf2 Ctf3 Ctf4 Ctf5 Ctf6...numc1 denc1 numc2 denc2 numc3 denc3 numc4 denc4 numc5 denc5 numc6 denc6

save PSfrf PSfrfsave modelplot P C S PS P_frf C_frf S_frf PS_frf Co_S Co_PS hz PSfe

else

load modelplot

endfigure;

XXI

Page 68: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Model estimation Mfile Matlab Files

subplot 231bode(P(:,1),P_frf(:,1),’r--’);title(’Plant 1’);legend(’Model’,’FRD’)subplot 232bode(P(:,2),P_frf(:,2),’r--’);title(’Plant 2’);legend(’Model’,’FRD’)subplot 233bode(P(:,3),P_frf(:,3),’r--’);title(’Plant 3’);legend(’Model’,’FRD’)subplot 234bode(P(:,4),P_frf(:,4),’r--’);title(’Plant 4’);legend(’Model’,’FRD’)subplot 235bode(P(:,5),P_frf(:,5),’r--’);title(’Plant 5’);legend(’Model’,’FRD’)subplot 236bode(P(:,6),P_frf(:,6),’r--’);title(’Plant 6’);legend(’Model’,’FRD’)

figure;subplot 231bode(S(:,1),S_frf(:,1),’r--’);title(’Sensitivity 1’);legend(’Model’,’FRD’)

subplot 232bode(S(:,2),S_frf(:,2),’r--’);title(’Sensitivity 2’);legend(’Model’,’FRD’)

subplot 233bode(S(:,3),S_frf(:,3),’r--’);title(’Sensitivity 3’);legend(’Model’,’FRD’)

subplot 234bode(S(:,4),S_frf(:,4),’r--’);title(’Sensitivity 4’);legend(’Model’,’FRD’)

subplot 235bode(S(:,5),S_frf(:,5),’r--’);title(’Sensitivity 5’);legend(’Model’,’FRD’)

subplot 236bode(S(:,6),S_frf(:,6),’r--’);title(’Sensitivity 6’);legend(’Model’,’FRD’)

figure;subplot 231bode(PS(:,1),PS_frf(:,1),’r--’);title(’Process sensitivity 1’);legend(’Model’,’FRD’)

subplot 232

XXII

Page 69: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Learning filter design Mfile Matlab Files

bode(PS(:,2),PS_frf(:,2),’r--’);title(’Process sensitivity 2’);legend(’Model’,’FRD’)

subplot 233bode(PS(:,3),PS_frf(:,3),’r--’);title(’Process sensitivity 3’);legend(’Model’,’FRD’)

subplot 234bode(PS(:,4),PS_frf(:,4),’r--’);title(’Process sensitivity 4’);legend(’Model’,’FRD’)

subplot 235bode(PS(:,5),PS_frf(:,5),’r--’);title(’Process sensitivity 5’);legend(’Model’,’FRD’)

subplot 236bode(PS(:,6),PS_frf(:,6),’r--’);title(’Process sensitivity 6’);legend(’Model’,’FRD’)

figure ;subplot 211semilogx (hz, Co_S(:,1),’r’);grid;xlabel(’Hz’);title (’Coherent of Sensitivity ’,...

’FontWeight’,’bold’);subplot 212semilogx (hz, Co_PS(:,1),’r’);grid;xlabel(’Hz’);title (’Coherent of Process Sensitivity ’,...

’FontWeight’,’bold’);

E.3 Learning filter design Mfile%Creating a learning filter L

%clear all;close all;clc;

%%% --------------Process sensitivity computation--------------------------load Controller.matload Plant.matload PSfrf

Fs =500;Ts=1/Fs;

% Process sensitivity Model

SP1=Ptf1/(1+Ptf1*Ctf1); SP_min1=minreal(SP1);SP2=Ptf2/(1+Ptf2*Ctf2); SP_min2=minreal(SP2);

XXIII

Page 70: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Learning filter design Mfile Matlab Files

SP3=Ptf3/(1+Ptf3*Ctf3); SP_min3=minreal(SP3);SP4=Ptf4/(1+Ptf4*Ctf4); SP_min4=minreal(SP4);SP5=Ptf5/(1+Ptf5*Ctf5); SP_min5=minreal(SP5);SP6=Ptf6/(1+Ptf6*Ctf6); SP_min6=minreal(SP6);

% Discretized process sensitivity

SP_D1=c2d(SP_min1,Ts,’zoh’);SP_D2=c2d(SP_min2,Ts,’zoh’);SP_D3=c2d(SP_min3,Ts,’zoh’);SP_D4=c2d(SP_min4,Ts,’zoh’);SP_D5=c2d(SP_min5,Ts,’zoh’);SP_D6=c2d(SP_min6,Ts,’zoh’);

% Illustration of Process sensitivity: Model - Discrete - FRDfigure;subplot 231bode(SP1,’g-’,SP_D1,’b--’,PSfrf(:,1),’r-.’);title(’PS1’);subplot 232bode(SP2,’g-’,SP_D2,’b--’,PSfrf(:,2),’r-.’);title(’PS2 ’);subplot 233bode(SP3,’g-’,SP_D3,’b--’,PSfrf(:,3),’r-.’);title(’PS3 ’);subplot 234bode(SP4,’g-’,SP_D4,’b--’,PSfrf(:,4),’r-.’);title(’PS4’);subplot 235bode(SP5,’g-’,SP_D5,’b--’,PSfrf(:,5),’r-.’);title(’PS5 ’);subplot 236bode(SP6,’g-’,SP_D6,’b--’,PSfrf(:,6),’r-.’);title(’PS6 ’);legend(’Sp_M’,’Sp_D’,’Sp_F_R_F’);

% Compute the transfer functions data of the Process sensitivity

[num_SP1,den_SP1] = tfdata(SP_D1,’v’);[num_SP2,den_SP2] = tfdata(SP_D2,’v’);[num_SP3,den_SP3] = tfdata(SP_D3,’v’);[num_SP4,den_SP4] = tfdata(SP_D4,’v’);[num_SP5,den_SP5] = tfdata(SP_D5,’v’);[num_SP6,den_SP6] = tfdata(SP_D6,’v’);

%%% --------------Learning Filter Design-----------------------------------

% Defining the learning gain

gamma=1; %dead beat

% Compute the transfer function data of the learning filter

[num_L1,den_L1,phd1] = ZPETC(num_SP1,den_SP1,gamma);

XXIV

Page 71: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Learning filter design Mfile Matlab Files

[num_L2,den_L2,phd2] = ZPETC(num_SP2,den_SP2,gamma);[num_L3,den_L3,phd3] = ZPETC(num_SP3,den_SP3,gamma);[num_L4,den_L4,phd4] = ZPETC(num_SP4,den_SP4,gamma);[num_L5,den_L5,phd5] = ZPETC(num_SP5,den_SP5,gamma);[num_L6,den_L6,phd6] = ZPETC(num_SP6,den_SP6,gamma);

% Define a discrete variablez=tf(’z’,Ts);

% Compute the learning filter transfer functionL1=tf(num_L1,den_L1,Ts)*z^phd1; l1=tf(num_L1,den_L1,Ts);L2=tf(num_L2,den_L2,Ts)*z^phd2; l2=tf(num_L2,den_L2,Ts);L3=tf(num_L3,den_L3,Ts)*z^phd3; l3=tf(num_L3,den_L3,Ts);L4=tf(num_L4,den_L4,Ts)*z^phd4; l4=tf(num_L4,den_L4,Ts);L5=tf(num_L5,den_L5,Ts)*z^phd5; l5=tf(num_L5,den_L5,Ts);L6=tf(num_L6,den_L6,Ts)*z^phd6; l6=tf(num_L6,den_L6,Ts);

% Save in Lfilter mat file

save Lfilter L1 L2 L3 L4 L5 L6 l1 l2 l3 l4 l5 l6 Ts...hz SP1 SP2 SP3 SP4 SP5 SP6SP_D1 SP_D2 SP_D3 SP_D4 SP_D5 SP_D6phd1 phd2 phd3 phd4 phd5 phd6

% Illustrate the inverse discrete process sensitivity and the learning% filterfigure;subplot 231bode(1/SP_D1,L1,’r--’);title(’inv(Sp_D_1) & L1’);

subplot 232bode(1/SP_D2,L2,’r--’);

subplot 233bode(1/SP_D3,L3,’r--’);

subplot 234bode(1/SP_D4,L4,’r--’);

subplot 235bode(1/SP_D5,L5,’r--’);

subplot 236bode(1/SP_D6,L6,’r--’);legend(’1/Sp_D’,’L’);

%

XXV

Page 72: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Robust Q filter design Mfile Matlab Files

E.4 Robust Q filter design Mfile%Robust Q filter - Low pass butterworth filter

%butter(order,(2*bandwidth*sampling time),type);

clear all; close all;clc;Fs =500;Ts =1/Fs;% Define the bandwidthFbw =5;[numQ, denQ] = butter(4,(2*Fbw*Ts),’low’);Q=tf(numQ,denQ,Ts);

save Qfilter Q

figure;bodemag(Q^2);title([’Low-pass robutness filter F_b_w = ’,num2str(Fbw),’hz’]);

E.5 Convergence criterion%%

clear all;close all;clcload Qfilterload Lfilterload modelplot

% Convergence without Robust filterConv=(1-(L4*SP_D4));Conv_c=d2c(Conv,’tustin’,Ts);

figure; bode(Conv_c);title(’Model: Convergence Without Robust filter ’);%%w=2*pi*hz;

Lresp=freqresp(L4,w);PS_frf4 =PS_frf(:,4);

Conv_M=(1-(Lresp*PS_frf4));figure;%bode(Conv_M);title(’Data: Convergence Without Robust filter ’);

%%%%Model Convergence with Robust Q filter

Qc=d2c(Q,’tustin’,Ts);Conv_Q= Q*(Conv);

XXVI

Page 73: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Convergence criterion Matlab Files

%-----------------Convergence criterion model----------------------------Cov=freqresp(Conv_Q,w);% model convergence verificationco(:,1) = Cov(1,1,:);real_conv=real(co);im_conv=imag(co);

theta = linspace(0,2*pi,length(w));x = cos(theta);y = sin(theta);

figureplot(x,y);axis(’equal’);hold onplot(real_conv,im_conv,’g*’);title(’Convergence plot’...

,’fontweight’,’b’);legend(’unity’,’Model’);xlabel(’Re’);ylabel(’Im’);gridhold off

figure; bode(Conv_Q);title([’Model: Convergence with a robust filter ,F_c = 5hz’]);

%-----------------Convergence criterion FRD----------------------------Qresp=freqresp(Q^2,w);

Conv_mQ= Qresp*(Conv_M);Conv_m=freqresp(Conv_mQ,w);Co_data(:,1)=Conv_m(1,1,:);

real_meas=real(Co_data);im_meas=imag(Co_data);

figure;plot(x,y);axis(’equal’);hold onplot(real_meas,im_meas,’r*’)title(’Convergence plot’...

,’fontweight’,’b’);legend(’unity’,’Data’);xlabel(’Re’);ylabel(’Im’);gridhold off

figure;

bode(Conv_mQ);title([’Data: Convergence with a robust filter ,F_c = 5hz ’]);

XXVII

Page 74: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Offline Feedforward controller Computation Mfile Matlab Files

E.6 Offline Feedforward controller Computation Mfile

E.6.1 Reading trajectory from motion file and Computing the track-ing error

%clear all;close all;clc;

%% Read data from the motion filesfid = fopen(’motion1’, ’r’);%[T1,yref1,y1]=textread(’motion1.m’,...

’ %f %f %f ’,50000);

fid = fopen(’motion2.m’, ’r’);%[T2,yref2,y2]=textread(’motion2.m’,...

’ %f %f %f ’,50000);fid = fopen(’motion3.m’, ’r’);%[T3,yref3,y3]=textread(’motion3.m’,...

’ %f %f %f ’,50000);

fid = fopen(’motion4.m’, ’r’);%[T4,yref4,y4]=textread(’motion4.m’,...

’ %f %f %f ’,50000);

fid = fopen(’motion5.m’, ’r’);%[T5,yref5,y5]=textread(’motion5.m’,...

’ %f %f %f ’,50000);

fid = fopen(’motion6.m’, ’r’);%[T6,yref6,y6]=textread(’motion6.m’,...

’ %f %f %f ’,50000);

fclose(fid);

%% Compute the time vector (T), setpoint trajectory vector (Yref),%% simulator trajectorory vector (Y)

% Time Vectorsw1=length(T1); w2=length(T2); w3=length(T3); w4=length(T4);w5=length(T5); w6=length(T6);

% %End1 =max(w1); End2 =max(w2); End3 =max(w3); End4 =max(w4);

XXVIII

Page 75: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Offline Feedforward controller Computation Mfile Matlab Files

End5 =max(w5); End6 =max(w6);t1 = T1(1:End1 );t1 = t1-t1(1,1);%t2 = T2(1:End2 );t2 = t2-t2(1,1);%%t3 = T3(1:End3 );t3 = t3-t3(1,1);%t4 = T4(1:End4 );t4 = t4-t4(1,1);%%t5 = T5(1:End5 );t5 = t5-t5(1,1);%%t6 = T6(1:End6 );t6 = t6-t6(1,1);%% Ref Vectors

yref1 = yref1(1:End1 );yref2 = yref2(1:End2 );yref3 = yref3(1:End3 );yref4= yref4(1:End4);yref5 = yref5(1:End5 );yref6 = yref6(1:End6 );

% Simulator trajectory vectorsy1 = y1(1:End1);y2 = y2(1:End2 );y3 = y3(1:End3);y4 = y4(1:End4);y5 = y5(1:End5);y6 = y6(1:End6);

%% Compute start and Stop of the trajectory from the read datai1=1; i2=1; i3=1; i4=1; i5=1; i6=1;j=100;rl1=0; rl2=0; rl3=0; rl4=0; rl5=0; rl6=0;

rr=0;m1=0; m2=0; m3=0; m4=0; m5=0; m6=0;n=0;% %while (i1<=End1)&& (m1~=1)

XXIX

Page 76: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Offline Feedforward controller Computation Mfile Matlab Files

if (abs(yref1(i1+1))>abs(yref1(i1)))rl1=i1; m1=1;

elsem1=0;

endi1=i1+1;

end% %while (i2<=End2)&& (m2~=1)

if (abs(yref2(i2+1))>abs(yref2(i2)))rl2=i2; m2=1;

elsem2=0;

endi2=i2+1;

end% %while (i3<=End3)&& (m3~=1)

if (abs(yref3(i3+1))>abs(yref3(i3)))rl3=i3; m3=1;

elsem3=0;

endi3=i3+1;

end% %while (i4<=End4)&& (m4~=1)

if (abs(yref4(i4+1))>abs(yref4(i4)))rl4=i4; m4=1;

elsem4=0;

endi4=i4+1;

end% %while (i5<=End5)&& (m5~=1)

if (abs(yref5(i5+1))>abs(yref5(i5)))rl5=i5; m5=1;

elsem5=0;

endi5=i5+1;

end% %while (i6<=End6)&& (m6~=1)

if (abs(yref6(i6+1))>abs(yref6(i6)))rl6=i6; m6=1;

elsem6=0;

end

XXX

Page 77: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Offline Feedforward controller Computation Mfile Matlab Files

i6=i6+1;end% %

t1 =t1(rl1-100:End1); t1=t1-t1(1,1); t1=t1(1:35100);yref1=yref1(rl1-100:End1); yref1=yref1(1:35100);y1 =y1(rl1-100:End1); y1 =y1(1:35100);errorm1 =yref1-y1;

% %

t2 =t2(rl2-100:End2); t2=t2-t2(1,1); t2=t2(1:35100);yref2=yref2(rl2-100:End2); yref2=yref2(1:35100);y2 =y2(rl2-100:End2); y2 =y2(1:35100);errorm2 =yref2-y2;

% %

t3 =t3(rl3-100:End3); t3=t3-t3(1,1); t3=t3(1:35100);yref3=yref3(rl3-100:End3); yref3=yref3(1:35100);y3 =y3(rl3-100:End3); y3 =y3(1:35100);errorm3 =yref3-y3;

% %

t4 =t4(rl4-100:End4); t4=t4-t4(1,1); t4=t4(1:35100);yref4=yref4(rl4-100:End4); yref4=yref4(1:35100);y4 =y4(rl4-100:End4); y4 =y4(1:35100);errorm4 =yref4-y4;

% %

t5 =t5(rl5-100:End5); t5=t5-t5(1,1); t5=t5(1:35100);yref5=yref5(rl5-100:End5); yref5=yref5(1:35100);y5 =y5(rl5-100:End5); y5 =y5(1:35100);errorm5 =yref5-y5;

% %t6 =t6(rl6-100:End6); t6=t6-t6(1,1); t6=t6(1:35100);

yref6=yref6(rl6-100:End6); yref6=yref6(1:35100);y6 =y6(rl6-100:End6); y6 =y6(1:35100);errorm6 =yref6-y6;

%% Illustrate the trajectories and the tracking errorsfiguresubplot 211plot(t1,yref1,’b-’,t1,y1,’r--’);title(’Setpoint trajectory with ILC, actuator 1 ’,’fontweight’,’b’);ylabel(’Position [m]’);legend(’Yref1’,’Yout1’);gridsubplot 212plot(t1,errorm1,’k’);ylabel(’Tracking error [m]’,’fontweight’,’b’);xlabel(’time [s]’,’fontweight’,’b’);legend(’error1’);grid

XXXI

Page 78: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Offline Feedforward controller Computation Mfile Matlab Files

figuresubplot 211plot(t2,yref2,t2,y2);legend(’yref’,’y’);title(’Setpoint trajectory with ILC, Iteration 1 ’,’fontweight’,’b’);ylabel(’Position [m]’,’fontweight’,’b’);legend(’Yref1’,’Yout1’);grid;subplot 212plot(t2,errorm2,’k’);legend(’error’);ylabel(’Tracking error [m]’,’fontweight’,’b’);xlabel(’time [s]’,’fontweight’,’b’);legend(’error1’);grid

% %figuresubplot 211plot(t3,yref3,t3,y3);legend(’yref’,’y’);title(’Setpoint trajectory with ILC, Iteration 2 ’,’fontweight’,’b’);ylabel(’Position [m]’,’fontweight’,’b’);legend(’Yref1’,’Yout1’);grid;

subplot 212plot(t3,errorm3,’k’);legend(’error’);ylabel(’Tracking error [m]’,’fontweight’,’b’);xlabel(’time [s]’,’fontweight’,’b’);legend(’error1’);grid

% %figuresubplot 211plot(t4,yref4,t4,y4);legend(’yref’,’y’);title(’Setpoint trajectory with ILC, Iteration 3 ’,’fontweight’,’b’);ylabel(’Position [m]’,’fontweight’,’b’);legend(’Yref1’,’Yout1’);grid;subplot 212plot(t4,errorm4,’k’);legend(’error’);ylabel(’Tracking error [m]’,’fontweight’,’b’);xlabel(’time [s]’,’fontweight’,’b’);legend(’error1’);grid

% %figuresubplot 211plot(t5,yref5,t5,y5);legend(’yref’,’y’);title(’Setpoint trajectory with ILC, Iteration 4 ’,’fontweight’,’b’);ylabel(’Position [m]’,’fontweight’,’b’);legend(’Yref1’,’Yout1’);grid;subplot 212plot(t5,errorm5,’k’);legend(’error’);ylabel(’Tracking error [m]’,’fontweight’,’b’);xlabel(’time [s]’,’fontweight’,’b’);legend(’error1’);grid

% %figure

XXXII

Page 79: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Offline Feedforward controller Computation Mfile Matlab Files

subplot 211plot(t6,yref6,t6,y6);legend(’yref’,’y’);gridsubplot 212plot(t6,errorm6,’k’);legend(’error’);grid

YREF =[yref1 yref2 yref3 yref4 yref5 yref6];Y =[y1 y2 y3 y4 y5 y6];ERROR=[errorm1 errorm2 errorm4 errorm3 errorm5 errorm6];T =[t1 t2 t3 t4 t5 t6];

%% Create an error spectrumE1 =ERROR(:,1);Fs = 500; % Sampling frequencyT = 1/Fs; % Sample timeL = 35100; % Length of signal

NFFT = 2^nextpow2(L); % Next power of 2 from length of yY = fft(E1,NFFT)/L;f = Fs/2*linspace(0,1,NFFT/2);% Plot single-sided amplitude spectrum.figureplot(f,2*abs(Y(1:NFFT/2)))title(’Amplitude Error Spectrum E1(t) from actuator 1 ’,’fontweight’,’b’)xlabel(’Frequency (Hz)’)ylabel(’|E(f)|’)grid%

%% Compute the trial error Vs iteration

for i=1:5max_error_count(i) = abs(max(ERROR(:,i)));iter(i)=i;

endfiguresemilogy(max_error_count);title(’Experimental results, Repetitive Error actuator 1’,’fontweight’,’b’);xlabel(’Iteration [k]’,’fontweight’,’b’);ylabel(’Tracking Error [m]’,’fontweight’,’b’);

save trajectory YREF Y ERROR T

E.6.2 Simulation of The ILC with the plant Model%% Feedforward update

clear all;close all;clc

load Qfilter

XXXIII

Page 80: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Offline Feedforward controller Computation Mfile Matlab Files

load Lfilterload trajectory.matload Controller.matload Plant.mat% load F_update%---------------------Compute the feedforward controller-------------------yref1=YREF(:,1);yref2=YREF(:,2);yref3=YREF(:,3);yref4=YREF(:,4);yref5=YREF(:,5);yref6=YREF(:,6);t1=T(:,1);t2=T(:,2);t3=T(:,3);t4=T(:,4);t5=T(:,5);t6=T(:,6);N= length(yref2)/500;W =length(yref2);

[b_Q ,a_Q]=tfdata(Q^2,’v’);[b_L1 ,a_L1]=tfdata(l1,’v’);[b_L2 ,a_L2]=tfdata(l2,’v’);[b_L3 ,a_L3]=tfdata(l3,’v’);[b_L4 ,a_L4]=tfdata(l4,’v’);[b_L5 ,a_L5]=tfdata(l5,’v’);[b_L6 ,a_L6]=tfdata(l6,’v’);

ff1=zeros(W,1);ff2=zeros(W,1);ff3=zeros(W,1);ff4=zeros(W,1);ff5=zeros(W,1);ff6=zeros(W,1);

for i=1:5sim(’Plant_ILC’);

% sim(’Plant_ILC_D’);

error_k1=filter(b_L1,a_L1,error1);error_k2=filter(b_L2,a_L2,error2);error_k3=filter(b_L3,a_L3,error3);error_k4=filter(b_L4,a_L4,error4);error_k5=filter(b_L5,a_L5,error5);error_k6=filter(b_L6,a_L6,error6);

% Learn the tracking error with the leaning filter, the feedback error% (error_k) and the delay (phd)

error_L1=[error_k1(phd1+1:length(t1));zeros(phd1,1)];error_L2=[error_k2(phd2+1:length(t2));zeros(phd2,1)];error_L3=[error_k3(phd3+1:length(t3));zeros(phd3,1)];error_L4=[error_k4(phd4+1:length(t4));zeros(phd4,1)];error_L5=[error_k5(phd5+1:length(t5));zeros(phd5,1)];error_L6=[error_k6(phd6+1:length(t6));zeros(phd6,1)];

% Compute the new feedforward with the non causal filtfilt filter

ff_new1=filtfilt(b_Q,a_Q,(ff1+error_L1));ff_new2=filtfilt(b_Q,a_Q,(ff2+error_L2));ff_new3=filtfilt(b_Q,a_Q,(ff3+error_L3));ff_new4=filtfilt(b_Q,a_Q,(ff4+error_L4));ff_new5=filtfilt(b_Q,a_Q,(ff5+error_L5));ff_new6=filtfilt(b_Q,a_Q,(ff6+error_L6));

XXXIV

Page 81: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Offline Feedforward controller Computation Mfile Matlab Files

max_error_count(i) = abs(max(error1))max_ff_update(i) = max(ff_new1-ff1)iter(i)=i;

% Illustrate the trajectory, error and feedforward controllerfigure(94);subplot(2,1,1),plot(t1,y1);hold onplot(t1,yref1,’r--’);hold offlegend(’out’,’xref’)title(’ILC SIMULATION’);

ylabel(’Position [m]’);grid;subplot(2,1,2),plot(t1,error1);

ylabel(’ Error [m]’);legend(’error ’)xlabel(’time [s]’);grid;figure(95);subplot(2,1,1),plot(t2,y2);hold onplot(t2,yref2,’r--’);hold offlegend(’out’,’xref’)title(’ILC SIMULATION’);

ylabel(’Position [m]’);grid;subplot(2,1,2),plot(t2,error2);

ylabel(’ Error [m]’);legend(’error ’)xlabel(’time [s]’);grid;

figure(96);subplot(2,1,1),plot(t3,y3);hold onplot(t3,yref3,’r--’);hold offlegend(’out’,’xref3’)title(’ILC SIMULATION’);

ylabel(’Position [m]’);grid;subplot(2,1,2),plot(t3,error3);

XXXV

Page 82: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Offline Feedforward controller Computation Mfile Matlab Files

ylabel(’ Error [m]’);legend(’error3 ’)xlabel(’time [s]’);grid;

figure(94);subplot(2,1,1),plot(t4,y4);hold onplot(t4,yref4,’r--’);hold offlegend(’out’,’xref4’)title(’ILC SIMULATION’);

ylabel(’Position [m]’);grid;subplot(2,1,2),plot(t4,error4);

ylabel(’ Error [m]’);legend(’error4 ’)xlabel(’time [s]’);grid;

figure(98);subplot(2,1,1),plot(t5,y5);hold onplot(t5,yref5,’r--’);hold offlegend(’out’,’xref5’)title(’ILC SIMULATION’);

ylabel(’Position [m]’);grid;subplot(2,1,2),plot(t5,error5);

ylabel(’ Error [m]’);legend(’error5 ’)xlabel(’time [s]’);grid;

figure(99);subplot(2,1,1),plot(t6,y6);hold onplot(t6,yref6,’r--’);hold offlegend(’out’,’xref6’)title(’ILC SIMULATION’);

ylabel(’Position [m]’);grid;

XXXVI

Page 83: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Offline Feedforward controller Computation Mfile Matlab Files

subplot(2,1,2),plot(t6,error6);

ylabel(’ Error [m]’);legend(’error6 ’)xlabel(’time [s]’);grid;

figure(100);subplot 231plot(t1,(ff_new1-ff1),’k-’);title(’ILC update’);ylabel(’ Magnitude [Volts/sample]’);legend(’ILC-ffw’)xlabel(’time [s]’);grid;

subplot 232plot(t2,(ff_new2-ff2),’k-’);grid;subplot 233plot(t3,(ff_new3-ff3),’k-’);grid;

subplot 234plot(t4,(ff_new4-ff4),’k-’);grid;

subplot 235plot(t5,(ff_new5-ff5),’k-’);grid;

subplot 236plot(t6,(ff_new6-ff6),’k-’);grid;ff1 = ff_new1;ff2 = ff_new2;ff3 = ff_new3;ff4 = ff_new4;ff5 = ff_new5;ff6 = ff_new6;

end

% Illustrate the repetitive error Vs iteration

figure(101)semilogy(max_error_count);title(’Repetitive Error’);xlabel(’Iteration [k]’);ylabel(’Error [m]’);

XXXVII

Page 84: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Offline Feedforward controller Computation Mfile Matlab Files

figure(102)semilogy(max_ff_update);title(’ILC update’);xlabel(’Iteration [k]’);ylabel(’Amplitude [volts/sample]’);

E.6.3 Implementation of the ILC on the six actuators%% Feedforward update

clear all;close all;clc

load Qfilterload Lfilterload trajectory.matload Controller.matload Plant.mat

r=2;%---------------------Compute the feedforward controller-------------------yref1=YREF(:,1);yref2=YREF(:,2);yref3=YREF(:,3);yref4=YREF(:,4);yref5=YREF(:,5);yref6=YREF(:,6);t1=T(:,1);t2=T(:,2);t3=T(:,3);t4=T(:,4);t5=T(:,5);t6=T(:,6);N= length(yref2)/500;W =length(yref2);

[b_Q ,a_Q]=tfdata(Q^2,’v’);[b_L1 ,a_L1]=tfdata(l1,’v’);[b_L2 ,a_L2]=tfdata(l2,’v’);[b_L3 ,a_L3]=tfdata(l3,’v’);[b_L4 ,a_L4]=tfdata(l4,’v’);[b_L5 ,a_L5]=tfdata(l5,’v’);[b_L6 ,a_L6]=tfdata(l6,’v’);

if (r==1)ff1=zeros(W,1);ff2=zeros(W,1);ff3=zeros(W,1);ff4=zeros(W,1);ff5=zeros(W,1);ff6=zeros(W,1);end

if(r==2)

load F_update

ff1=ff1;ff2=ff2;ff3=ff3;ff4=ff4;ff5=ff5;ff6=ff6;

end

XXXVIII

Page 85: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Offline Feedforward controller Computation Mfile Matlab Files

for i=1:1

% Add some zero for initial time and final time to the error vectorsERROR1=[zeros(5000,1);ERROR(:,1);zeros(5000,1)];ERROR2=[zeros(5000,1);ERROR(:,2);zeros(5000,1)];ERROR3=[zeros(5000,1);ERROR(:,3);zeros(5000,1)];ERROR4=[zeros(5000,1);ERROR(:,4);zeros(5000,1)];ERROR5=[zeros(5000,1);ERROR(:,5);zeros(5000,1)];ERROR6=[zeros(5000,1);ERROR(:,6);zeros(5000,1)];

error_k1=filter(b_L1,a_L1,ERROR1);error_k2=filter(b_L2,a_L2,ERROR2);error_k3=filter(b_L3,a_L3,ERROR3);error_k4=filter(b_L4,a_L4,ERROR4);error_k5=filter(b_L5,a_L5,ERROR5);error_k6=filter(b_L6,a_L6,ERROR6);

error_L1=[error_k1(phd1+1:length(t1)+10000);zeros(phd1,1)];error_L2=[error_k2(phd2+1:length(t2)+10000);zeros(phd2,1)];error_L3=[error_k3(phd3+1:length(t3)+10000);zeros(phd3,1)];error_L4=[error_k4(phd4+1:length(t4)+10000);zeros(phd4,1)];error_L5=[error_k5(phd5+1:length(t5)+10000);zeros(phd5,1)];error_L6=[error_k6(phd6+1:length(t6)+10000);zeros(phd6,1)];

% Add some zero for initial time and final time to the feedforward vectorsff1_tmp=[zeros(5000,1);ff1;zeros(5000,1)];ff2_tmp=[zeros(5000,1);ff2;zeros(5000,1)];ff3_tmp=[zeros(5000,1);ff3;zeros(5000,1)];ff4_tmp=[zeros(5000,1);ff4;zeros(5000,1)];ff5_tmp=[zeros(5000,1);ff5;zeros(5000,1)];ff6_tmp=[zeros(5000,1);ff6;zeros(5000,1)];

ff_new1=filtfilt(b_Q,a_Q,(ff1_tmp+error_L1));ff_new2=filtfilt(b_Q,a_Q,(ff2_tmp+error_L2));ff_new3=filtfilt(b_Q,a_Q,(ff3_tmp+error_L3));ff_new4=filtfilt(b_Q,a_Q,(ff4_tmp+error_L4));ff_new5=filtfilt(b_Q,a_Q,(ff5_tmp+error_L5));ff_new6=filtfilt(b_Q,a_Q,(ff6_tmp+error_L6));

% Remove the added zero from the feedforward vectorff_new1=ff_new1(5001:end-5000);ff_new2=ff_new2(5001:end-5000);ff_new3=ff_new3(5001:end-5000);ff_new4=ff_new4(5001:end-5000);ff_new5=ff_new5(5001:end-5000);ff_new6=ff_new6(5001:end-5000);

%% Illustrate the feedforward actionfigure(100);

XXXIX

Page 86: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Offline Feedforward controller Computation Mfile Matlab Files

subplot 231plot(t1,(ff_new1-ff1),’k-’);title(’ILC update’);ylabel(’ Magnitude [Volts/sample]’);legend(’ILC-ffw’)xlabel(’time [s]’);grid;

subplot 232plot(t2,(ff_new2-ff2),’k-’);grid;subplot 233plot(t3,(ff_new3-ff3),’k-’);grid;

subplot 234plot(t4,(ff_new4-ff4),’k-’);grid;

subplot 235plot(t5,(ff_new5-ff5),’k-’);grid;

subplot 236plot(t6,(ff_new6-ff6),’k-’);grid;%% Update for the next trialff1 = ff_new1;ff2 = ff_new2;ff3 = ff_new3;ff4 = ff_new4;ff5 = ff_new5;ff6 = ff_new6;

save F_update ff1 ff2 ff3 ff4 ff5 ff6

end

% Resample the feedforward vection

fw1 =resample(ff1,50,500);fw2 =resample(ff2,50,500);fw3 =resample(ff3,50,500);fw4 =resample(ff4,50,500);fw5 =resample(ff5,50,500);fw6 =resample(ff6,50,500);

feed = [fw1’;fw2’;fw3’;fw4’;fw5’;fw6’];

%% Write Modified data to ffeedforward motion file

XL

Page 87: Feedforward Design Strategy for Improving Motion Simulator ... · Iterative Learning Controller design and simulation based on the micro motion simulator model, while Chapter V gives

Offline Feedforward controller Computation Mfile Matlab Files

fid = fopen(’FF.mot’, ’wt’);fprintf(fid, ’ %8.4f %8.4f %8.4f %8.4f %8.4f %8.4f\n’, feed);fclose(fid)

% Resample the setpoint trajectoryyref1 = resample(yref1,50,500);yref2 = resample(yref2,50,500);yref3 = resample(yref3,50,500);yref4 = resample(yref4,50,500);yref5 = resample(yref5,50,500);yref6 = resample(yref6,50,500);traject = [yref1’;yref2’;yref3’;yref4’;yref5’;yref6’];%% Write Modified data to trajectory motion filefid = fopen(’Traj.mot’, ’wt’);fprintf(fid, ’ %8.4f %8.4f %8.4f %8.4f %8.4f %8.4f\n’, traject);fclose(fid)

XLI