<<

Lecture 9 – Modeling, , and

• Development steps • Model-based • Systems platform: hardware, systems .

EE392m - Spring 2005 Control Engineering 9-1 Gorinevsky Control Engineering Technology • Science – abstraction – concepts – simplified models • Engineering – building new things – constrained resources: time, money, • Technology – repeatable processes

• Control platform technology • Control engineering technology

EE392m - Spring 2005 Control Engineering 9-2 Gorinevsky Controls development cycle • and modeling – Control design using a simplified model – trade study - defines overall system design • Simulation – Detailed model: physics, or empirical, or data driven – Design validation using detailed performance model • System development – Control application software – Real-time software platform – Hardware platform • Validation and verification – Performance against initial specs – Software verification – Certification/commissioning

EE392m - Spring 2005 Control Engineering 9-3 Gorinevsky /Analysis Much more than real-time control computations • modeling • identification • tuning • optimization • feedforward • feedback • estimation and navigation • • diagnostics and system self-test • system level logic, mode change

EE392m - Spring 2005 Control Engineering 9-4 Gorinevsky Model-based Control Development

Conceptual Control design model: Conceptual control sis algorithm: y Analysis x(t+1) = x(t) + u(t) u = -k(x-xd)

Application Detailed simulation Detailed control application: code: Simulink model saturation, initialization, BIT, Controls anal Controls fault recovery, bumpless transfer

Systems platform: Validation and Hardware-in-the- Prototype Run-time code, OS verification loop sim Hardware platform controller

Deployed Deployment Physical plant stem and software controller y S

EE392m - Spring 2005 Control Engineering 9-5 Gorinevsky Controls Analysis

Conceptual Identification & tuning Analysis Accomodation x(t+1)Fault = x( tmodel) + u(t) algorithm: Control design model: Conceptualu = -k(x-xd control) algorithm: x(t+1) = x(t) + u(t) u = -k(x-xd)

Application Detailed Detailed control application: code: simulation saturation, initialization, BIT, model fault recovery, manual/auto Simulink mode, bumpless transfer, startup/shutdown

EE392m - Spring 2005 Control Engineering 9-6 Gorinevsky The rest of the lecture

• Modeling and Simulation • Deployment Platform • Controls

EE392m - Spring 2005 Control Engineering 9-7 Gorinevsky Modeling in Control Engineering

Physical system • Control in a Measurement Control computing handles system Sensors Actuators perspective

• Control analysis Physical perspective system Control computing

Measurement System model Control model handle model

EE392m - Spring 2005 Control Engineering 9-8 Gorinevsky Models

• Why spend much time talking about models? – Modeling and simulation could take 80% of control analysis effort. • Model is a mathematical representations of a system – Models allow simulating and analyzing the system – Models are never exact • Modeling depends on your goal – A single system may have many models – Large ‘libraries’ of standard model templates exist – A conceptually new model is a big deal (economics, biology) • Main goals of modeling in control engineering – conceptual analysis – detailed simulation

EE392m - Spring 2005 Control Engineering 9-9 Gorinevsky Modeling approaches

• Controls analysis uses deterministic models. Randomness and uncertainty are usually not dominant. • White box models: physics described by ODE and/or PDE • Dynamics, Newton x& = f (x,t) • Space flight: add control inputs u and measured outputs y x& = f (x,u,t) y = g(x,u,t)

EE392m - Spring 2005 Control Engineering 9-10 Gorinevsky Orbital mechanics example

• Newton’s mechanics – fundamental laws – dynamics = −γ ⋅ r + v& m 3 Fpert (t) r v 1643-1736 r r& = v ⎡ r1 ⎤ • Laplace ⎢r ⎥ ⎢ 2 ⎥ – computational dynamics ⎢r3 ⎥ (pencil & paper computations) x& = f (x,t) x = ⎢ ⎥ v – deterministic model-based ⎢ 1 ⎥ prediction ⎢v2 ⎥ 1749-1827 EE392m - Spring 2005 Control Engineering 9-11 ⎢ ⎥ Gorinevsky ⎣v3 ⎦ Sampled and continuous time

• Sampled and continuous time together • Continuous time physical system + digital controller – ZOH = Zero Order Hold

A/D, Sample Control D/A, ZOH computing

Sensors Physical Actuators system

EE392m - Spring 2005 Control Engineering 9-12 Gorinevsky Servo-system modeling

• Mid-term problem • First principle model: electro-mechanical + computer sampling • Parameters follow from the specs

c F u g m M β b

m&y& + βy& + b( y& − x&) + c( y − x) = F M&x& + b(x& − y&) + c(x − y) = 0 = + = F fI, TI I& I gu

EE392m - Spring 2005 Control Engineering 9-13 Gorinevsky Finite state machines

• TCP/IP State Machine

EE392m - Spring 2005 Control Engineering 9-14 Gorinevsky Hybrid systems

• Combination of continuous-time dynamics and a state machine • Thermostat example • Analytical tools are not fully established yet • Simulation analysis tools are available – Stateflow by Mathworks

offx = 70 on = = − x 72 x& = −Kx x& K (h x)x x ≥ 70 x ≤ 75 x = 75

EE392m - Spring 2005 Control Engineering 9-15 Gorinevsky PDE models

• Include functions of spatial Example: sideways heat equation variables x – electromagnetic fields

– mass and heat transfer Tinside=u Toutside=0 – fluid dynamics – structural deformations • For ‘controls’ simulation, model y heat flux reduction step is necessary – Usually done with FEM/CFD data ∂T ∂2T = k – Example: fit step response ∂t ∂x2 T (0) = u; T (1) = 0 ∂T y = ∂ x x=1 EE392m - Spring 2005 Control Engineering 9-16 Gorinevsky Simulation

• ODE solution – dynamical model: x& = f (x,t) – Euler integration method: x(t + d ) = x(t) + d ⋅ f ()x(t),t – Runge-Kutta method: ode45 in Matlab • Can do simple problems by integrating ODEs • Issues with modeling of engineered systems: – stiff systems, algebraic loops – mixture of continuous and sampled time – state machines and hybrid logic (conditions) – systems build of many subsystems – large , many people contribute different subsystems

EE392m - Spring 2005 Control Engineering 9-17 Gorinevsky Simulation environment • Simulink by Mathworks • Matlab functions and analysis • Stateflow state machines

• Ptolemeus - UC Berkeley • Block libraries • Subsystem blocks developed independently • Engineered for developing large simulation models • Controller can be designed in the same environment • Supports generation of run-rimeEE392m control - Spring 2005code Control Engineering 9-18 Gorinevsky Model development and validation

• Model development is a skill

• White box models: first principles • Black box models: data driven • Gray box models: with some unknown parameters • Identification of model parameters – necessary step – Assume known model structure – Collect plant data: special experiment or normal operation – Tweak model parameters to achieve a good fit

EE392m - Spring 2005 Control Engineering 9-19 Gorinevsky First Principle Models - Aerospace

Airbus 380: $13B development • Aircraft models • Component and subsystem modeling and testing • CFD analysis • Wind tunnel tests – to adjust models (fugde factors) • Flight tests – update aerodynamic tables and flight dynamics models NASA Langley – 1998 HARV – F/A-18

EE392m - Spring 2005 Control Engineering 9-20 Gorinevsky Step Response Model - Process

• Dynamical control inputs matrix control (DMC) • Industrial processes measured outputs

EE392m - Spring 2005 Control Engineering 9-21 Gorinevsky Approximate Maps

• Analytical expressions are rarely sufficient in practice • Models are computable off line – pre-compute simple approximation – on-line approximation • Models contain data identified in the experiments – nonlinear maps – interpolation or look-up tables – AI approximation methods • Neural networks • Fuzzy logic • Direct data driven models

EE392m - Spring 2005 Control Engineering 9-22 Gorinevsky Empirical Models - Maps • Aerospace and automotive – have most developed modeling approaches Example • Aerodynamic tables • Engine maps – turbines – jet engines – automotive - ICE

TEF=Trailing Edge Flap

EE392m - Spring 2005 Control Engineering 9-23 Gorinevsky Empirical Models - Maps

mostly uses empirical models

• Process maps in semiconductor manufacturing • Epitaxial growth (semiconductor process) – process map for run-to-run control

EE392m - Spring 2005 Control Engineering 9-24 Gorinevsky Multivariable B-splines

• Regular grid in multiple variables • Tensor product of B-splines • Used as a basis of finite-element models

= y(u,v) ∑ w j,k B j (u)Bk (v) j,k

EE392m - Spring 2005 Control Engineering 9-25 Gorinevsky Neural Networks

• Any nonlinear approximator might be called a Neural Network – RBF Neural Network – Polynomial Neural Network Linear in parameters – B-spline Neural Network – Wavelet Neural Network • MPL - Multilayered Perceptron – Nonlinear in parameters – Works for many inputs ⎛ ⎞ ⎛ ⎞ y(x) = w + f ⎜ w y1 ⎟, y1 = w + f ⎜ w x ⎟ 1,0 ⎜∑ 1, j j ⎟ j 2,0 ⎜∑ 2, j j ⎟ ⎝ j ⎠ ⎝ j ⎠ 1− e− x y f (x) = y=f(x) 1+ e−x x EE392m - Spring 2005 Control Engineering 9-26 Gorinevsky Multi-Layered Perceptrons

• Network parameter computation [ (1) ( N ) ] – training data set Y = y K y – parameter identification (1) ( N ) x K x y(x) = F(x;θ ) • Noninear LS problem 2 V = ∑ y( j) − F(x ( j);θ ) → min j • Iterative NLS optimization – Levenberg-Marquardt • Backpropagation – variation of a gradient descent

EE392m - Spring 2005 Control Engineering 9-27 Gorinevsky Neural Net application

• Internal Combustion Engine maps • Experimental map: – data collected in a steady state regime for various combinations spark of parameters advance RPM –2-D table • NN map – approximation of the experimental map – MLP was used in this example – works better for a smooth surface

EE392m - Spring 2005 Control Engineering 9-28 Gorinevsky Fuzzy Logic

• Function defined at nodes. Interpolation scheme • Fuzzyfication/de-fuzzyfication = interpolation • Linear interpolation in 1-D

µ ∑ y j j (x) y(x) = j µ (x) = 1 µ ∑ j ∑ j (x) j j

• Marketing (communication) and social value • : emphasis on interaction with a user – EE - emphasis on mathematical analysis EE392m - Spring 2005 Control Engineering 9-29 Gorinevsky Local Modeling Based on Data Heat Loads • Data mining in the loop • Honeywell Prague product Multidimensional Data Cube

Relational

Heat demand

Forecasted Time variable of day Query point Outdoor ( What if ? ) temperature Explanatory variables

EE392m - Spring 2005 Control Engineering 9-30 Gorinevsky System platform for control computing

• Workstations – advanced process control – enterprise optimizers – computing servers (QoS/admission control) • Specialized controllers: – PLC, DCS, motion controllers, hybrid controllers

EE392m - Spring 2005 Control Engineering 9-31 Gorinevsky System platform for control computing

MPC555 • Embedded: µP + software •DSP

•FPGA

• ASIC / SoC

EE392m - Spring 2005 Control Engineering 9-32 Gorinevsky Embedded processor range

EE392m - Spring 2005 Control Engineering 9-33 Gorinevsky System platform, cont’d

• Analog/mixed electric circuits – power controllers – RF circuits • Analog/mixed other – Gbs optical networks

EM = Electr-opt Modulator AGC = Auto Gain Control

EE392m - Spring 2005 Control Engineering 9-34 Gorinevsky Control Software

• Algorithms • Validation and Verification

EE392m - Spring 2005 Control Engineering 9-35 Gorinevsky System development cycle

Ford Motor Company EE392m - Spring 2005 Control Engineering 9-36 Gorinevsky Control application software development cycle

• Matlab+toolboxes • Simulink •Stateflow • Real-time Workshop

EE392m - Spring 2005 Control Engineering 9-37 Gorinevsky Real-time Embedded Software

• Mission critical • RT-OS with hard real-time guarantees • C-code for each thread generated from Simulink • Primus Epic, B787, A380

EE392m - Spring 2005 Control Engineering 9-38 Gorinevsky Hardware-in-the-loop simulation

• Aerospace • Process control • Automotive

EE392m - Spring 2005 Control Engineering 9-39 Gorinevsky System development cycle

EE392m - Spring 2005 Control Engineering 9-40 Gorinevsky Cadence