Identification and Control of Mechatronic Systems Philadelphia University, Jordan NATO - ASI Advanced All-Terrain Autonomous Systems Workshop August 15 24, 2010 Cesme-Izmir, Turkey
Overview Mechatronics Engineering System Identification Control Techniques Hardware-in-the-Loop (HIL) Design Procedure Case Studies 2
Philadelphia University, Jordan Philadelphia is the ancient name of Amman named by Ptolemaeus Philadelphus in the year 285 B.C 3
Definition: What is Mechatronics? Mechatronics Engineering is the Analysis Design Manufacturing Integration and maintenance of mechanics with electronics through intelligent computer control. 4
Mechatronics Main Components 5
Mechatronic System Overview Actuators Electrical Motors, Pneumatic, Hydraulic Mechanical system Sensors Inductive, Capacitive, Resistive, Ultrasonic, Photo Graphical display LED, LCD, CRT Conditioning & Interface Output: D/A, Power Circuit Input: A/D, Filter, Amplifier Control Architectures mcontroller, PLC, PC, DSP Control Algorithm 6
System Identification Tarek A. Tutunji
Modeling / Identification Communities Statistics Econometrics and Time Series Analysis Machine Learning Process Control Data Mining Artificial Neural Networks System Identification 8
Dynamic Models Classification SISO vs. MIMO Linear vs. nonlinear Parametric vs. nonparametric Time invariant vs. time variant Time domain vs. frequency domain Discrete vs. continuous Deterministic vs. stochastic 9
System Identification Mathematical models can be constructed using analytical approach, such as physics laws, or using experimental approach. System identification is the field of approximating dynamic system models from input/output patterns acquired through physical experiments. The target is to establish a mathematical model that mimics the original system and therefore minimizes the error between the system and model outputs. 10
Two Main Theories Realization Theory of how to realize linear state space models from impulse responses (Ho-Kalman 1966) Prediction-Error Prediction of the output at certain time depends previous measured input and output (Astrom-Bohlin 1965) 11
Deterministic Realization Theory State-space realization problem is stated as follows: Construct a minimal state-space realization x y t1 t Cx Ax t t Bu For the input-output model t y t k 1 H k u tk described by its impulse response matrices, H k 12
Deterministic Realization Theory The problem is to replace the infinite description H z k1 H k z k with a finite description so that H( z ) C 1 zi A B 13
Maximum Likelihood Theory Algorithmic derivation of ML identification for ARMA (Auto-Regressive Moving-Average) models. A( z 1 1 1 )yt B( z )ut C( z ) e t ML notations such as cost criteria and parameter estimate V N 0. 5 t1 2 t ˆ min V 14
Maximum Likelihood to Prediction Error Maximization of the likelihood function is equivalent to minimizing the sum of the squared prediction errors. under the assumption of white Gaussian noise in the ARMAX model 15
Ljung, Stoica, and Soderstrom Major work: 1980 s Two independent concepts: The choice of a parametric model structure y t G z, u t H z, e t The choice of an identification criterion V N N N 1,Z f N t1 t 16
Breakthroughs: 1975-1985 Multi-Input Multi-Output (MIMO) systems Identifiability of closed-loop systems 17
Identification as a Design Problem Identification can be viewed as an approximation Estimated models are used for a specific purpose The model error should be controlled in order not to penalize the goal for which the model was built for. Goal-oriented design problem 18
Identification for Control In 1990, identification and control design were looked as a combined design problem. 19
System Identification Steps 1. Experiment design. This includes the choice of lab equipment to be used such as computers, DAQ, and interface. 2. Model structure determination. The choice of the model can range from nonparametric models, such as transient and frequency analysis, to parametric methods, such as difference equations and neural networks. 3. Experiment run. This is usually done by exciting the system with an input signal (pulse, sinusoid, or random) and measuring the output signal over a specified time interval. 20
System Identification Steps 4. Algorithm choice and run. The algorithm used for convergence can vary from simple one-shot least squares, recursive least squares to advanced multistructures such as back propagation. 5. Validation of results. The output of the identified model is compared to the original system through different and new input signals. 21
System Identification Input Real System Actual Output System Model Model Output - + Error 22
23 System Identification: ARMA Models The standard Auto-Regressive Moving-Average model (ARMA) is given below m i i k i n j j k j k u b y a ŷ 0 1 where u k is the system input, y k is the system output ^y k is the predicted output, a and b are the ARMA parameters. The goal is to minimize the error between the desired and predicted outputs K k k k K k k y y e E 1 2 1 ˆ min
System Identification: ARMA Models Coefficients updates using steepest descent E(k) a(j) y(k) ˆ y(k) y(k j) e(k)y(k j) a( j) a( j) y( k j) e( k) E(k) b(i) y(k) ˆ y(k) x(k i) e(k)u(k i) b(i ) b(i ) u( k i )e( k ) ARMA to Transfer Functions Zy(k) n j 1 a(j)y(k j) Z m i 0 b(i)u(k i) H(z) Y(z) U(z) b a 0 0 b 1 a 1 z z 1 1... b... a M N z z m n 24
Control Techniques Tarek A. Tutunji
Control Techniques / Strategies Classical Control Adaptive Control Robust Control Optimal Control Variable Structure Control Intelligent Control 26
Classical Control Classical control design are used for SISO systems. Most popular concepts are: Bode plots Nyquist Stability Root locus. PID is widely used in feedback systems. 27
Classical Control: PID Proportional-Integral-Derivative (PID) is the most commonly used controller for SISO systems u(t ) K p e(t ) K I e(t )dt K D de(t dt ) 28
Classical vs. Modern Control In contrast to the frequency domain analysis of the classical control theory, modern control theory utilizes the time-domain state space representation. A mathematical model of a physical system as a set of input, output and state variables related by first-order differential equations. The variables are expressed as vectors and the differential and algebraic equations are written in matrix form. The state space representation provides a convenient and compact way to model and analyze systems with multiple inputs and outputs. 29
Adaptive Control Adaptive control involves modifying the control law used by a controller to cope with the fact that the parameters of the system being controlled are slowly time-varying or uncertain. Such controllers use on-line identification of the process parameters. For example, as an aircraft flies, its mass will slowly decrease as a result of fuel consumption; we need a control law that adapts itself to such changing conditions. 30
Robust Control Robust control is a branch of control theory that explicitly deals with uncertainty in its approach to controller design. Robust control methods are designed to function properly so long as uncertain parameters or disturbances are within some set. The state-space methods were sometimes found to lack robustness, prompting research to improve them. This was the start of the theory of Robust Control, which took shape in the 1980's and 1990's and is still active today. 31
Adaptive vs. Robust Control Adaptive control does not need a priori information about the bounds on uncertainties or time-varying parameters. Robust control guarantees that if the changes are within given bounds the control law need not be changed, while adaptive control is precisely concerned with control law changes. 32
Optimal Control Optimal control is a set of differential equations describing the paths of the state and control variables that minimize a cost function For example, the jet thrusts of a satellite needed to bring it to desired trajectory that consume the least amount of fuel. Two optimal control design methods have been widely used in industrial applications, as it has been shown they can guarantee closed-loop stability. Model Predictive Control (MPC) Linear-Quadratic-Gaussian control (LQG). 33
Variable Structure Control Variable structure control, or VSC, is a form of discontinuous nonlinear control. The method alters the dynamics of a nonlinear system by application of a high-frequency switching control. The main mode of VSC operation is sliding mode control (SMC). 34
Intelligent Control Intelligent Control is usually used when the mathematical model for the plant is unavailable or highly complex. The most two commonly used intelligent controllers are Artificial Neural Networks Fuzzy Logic 35
Intelligent Control: Fuzzy Fuzzy set theory provides mathematical tools for carrying out approximate reasoning processes when available information is uncertain, incomplete, imprecise, or vague. Fuzzy logic controllers manage complex control problems through heuristics (IF THEN) and mathematical models provided by fuzzy logic, rather than via mathematical models provided by differential equations. This is particularly useful for controlling systems whose mathematical models are nonlinear or for which standard mathematical models are simply not available 36
Fuzzy Control 37
Intelligent Control: ANN Artificial Neural networks (ANN) are nonlinear mathematical models that are used to mimic the biological neurons in the brain. ANN are used as black box models to map unknown functions ANN can be used for: Identification and Control 38
ANN: Single Neuron x 1 x 2 w 0 w 1 w M f(net) y x M M y f x m w m m1 39
ANN Architecture x 1 x 2 x M v ij 1 2 Q w jk 1 2 N z 1 z 2 z M E k 1 2 N n1 z n d n 40
ANN: System Identification In the identification process, the neural network is used to approximate the nonlinear function. The structure of the neural network plant model is given below, where the blocks labelled TDL are tapped delay lines that store previous values of the input and output signals. Plant Output Plant Input TDL TDL Weights Weights + Activation Weights + Function Activation Function Net Output First Layer Second Layer 41
ANN: Identification and Control Control Identification 42
ANN: Identification and Control 43
Hardware-in-the-Loop Tarek A. Tutunji Ashraf Saleem
Hardware-in-the-Loop (HIL) Classical Mechatronic systems are composed of controllers, actuators, and sensors. Some components can be substituted by its model and simulated in real time. The simulated components can be run in conjunction with real components under the same environment. This environment is regarded as HIL 45
HIL 46
Three-Stage Design Procedure Tarek A. Tutunji Ashraf Saleem
Three-Stage Design Procedure Stage 1 online identification The system-under-test is identified online using ARMA models Stage 2 controller design Models are used in simulation runs to design the controller Stage 3 online control The designed controllers are tuned and applied to the systemunder-test in Hardware-In-The-Loop (HIL) environment 48
Three-Stage Design Procedure Start Connect PC/DAQ to the system Disconnect system Re-connect PC/DAQ to the system Apply Impulse and Measure Response Design Controller using software simulation Apply Computer as Controller Approximate Transfer Function using ARMA / RLS Tune and Optimize Controller Fine-Tune the Controller End 49
Stage 1: Online Identification PC / DAQ System Identification Simulink Impulse Drive Circuit Electro-mechanical system under test Sensor ARMA Model RLS Algorithm A/D System Response 50
Stage 2: Controller Design Computer Simulation (using Simulink/Matlab) Reference Error Controller Design Control Signal Identified Transfer Function Model Response 51
Stage 3: Online Control PC / DAQ Designed Controller Control Signal Drive Circuit Electro-mechanical system under test Sensor Simulink A/D System Response 52
Case Studies Tarek A. Tutunji Ashraf Saleem
Experimental Setup Computer P4, 3GHz desktop MATLAB / Simulink National Instruments DAQ card 6036E Sampling rate of 200 ks/s Input voltage range of ± 10 V Input signal to the system-under-test (PC output) was a voltage pulse. The system response is the output (PC input) 54
Experimental Setup 55
Case Study: Induction Motor 56
Induction Motors Due to their simple structure, reliability of operation and modest cost, the squirrel cage induction motors are the most widely used electrical drive motors. Induction motors exhibit nonlinear dynamic behavior and therefore it is a challenge to establish an adequate mathematical model for controller design purposes. The parameters of the induction motor may change during the operation of the drive system, causing deviations between the corresponding signals of the model and the motor. 57
Stage 1: Online Identification 58
Stage 1: Online Identification 6 th order model 22 nd order model 59
Stage 1: Online Identification 60
Testing of Open-loop Responses 61
Stage 2: Controller Design 62
Stage 2: Control Design 63
Stage 3: Online Control 64
Online Control 65
Stage 3: Online Control 66
Advantages of the Proposed Procedure Accuracy in the identification model. Flexibility in the controller design. Optimizing time resources and minimizing the cost The induction motor to be controlled will not be used during the experimentation of the controller design and parameter tuning and therefore the down time of the induction motor will be minimized. This might be a crucial time saving issue when the motor is used production line. Equally important, damage to the motor due to inappropriate parameter values is avoided. 67
Case Study: Pneumatic System 68
Pneumatic Systems Pneumatic servo-drives play an important role in industrial mechatronic systems. This is due to their cost effectiveness, easy maintenance, and clean operating conditions. However, pneumatic actuators are characterized by high order time variant dynamics, nonlinearities due to compressibility of air, internal and external disturbances and payload variation 69
Experiment Setup 70
System Identification 71
Displacement (cm) Online Control 10 9 8 Real System Respnse with Kp=14, Ki=6, Kd=0.2 Steady State Error 7 6 5 Real System Disp 4 3 Demand Position 2 1 0 0 100 200 300 400 500 600 700 800 900 1000 Time (ms) 72
Particle Swarm 73
Position Cascade Control 8 7 6 5 4 3 Simulated Position Real Position 2 1 0 0 500 1000 1500 2000 2500 3000 Dr. Tarek Time(ms) A. Tutunji 74
Conclusions Identification and control play an essential role in the design of mechatronic systems System identification methods that use linear models, such as Auto-Regressive Moving-Average (ARMA), as well as nonlinear models, such as Artificial Neural Networks (ANN), were presented and compared. Control methods that range from PID to intelligent controllers, such as fuzzy controllers, were presented and compared. 75
Conclusions A three-stage procedure for the identification and control of mechatronic systems was presented. 1. The system-under-test is identified online using ARMA models. 2. These models are used in simulation runs to design the controller. 3. The designed controllers are applied to the system using HIL. Experimental results for two case studies were presented in order to demonstrate the advantages of the procedure. Finally, an UAV project that used a similar procedure was presented to illustrate the procedure s practicality. 76