lecture 13 - handling nonlinearity - stanford university · lecture 13 - handling nonlinearity •...
TRANSCRIPT
EE392m - Winter 2003 Control Engineering 13-1
Lecture 13 - Handling Nonlinearity• Nonlinearity issues in control practice• Setpoint scheduling/feedforward
– path planning replay - linear interpolation
• Nonlinear maps– B-splines– Multivariable interpolation: polynomials/splines/RBF– Neural Networks– Fuzzy logic
• Gain scheduling• Local modeling
EE392m - Winter 2003 Control Engineering 13-2
Nonlinearity in control practiceHere are the nonlinearities we already looked into• Constraints - saturation in control
– anti-windup in PID control– MPC handles the constraints
• Control program, path planning• Static optimization• Nonlinear dynamics
– dynamic inversion– nonlinear IMC– nonlinear MPC
One additional nonlinearity in this lecture• Controller gain scheduling
EE392m - Winter 2003 Control Engineering 13-3
Dealing with nonlinear functions
• Analytical expressions– models are given by analytical formulas, computable as required– 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
• Advanced approximation methods– neural networks
EE392m - Winter 2003 Control Engineering 13-4
Path planning
• Real-time replay of a pre-computed reference trajectoryyd(t) or feedforward v(t)
• Reproduce a nonlinear function yd(t) in a control system
Path planner,data arrays Y ,Θ
yd(t)t
jj
jj
jj
jjd
tY
tYty
θθθ
θθθ
−−
+−−
=+
++
+
11
1
1)(
=Θ
=
==
=
nndn
d
d
yY
yYyY
Y
θ
θθ
θ
θθ
MM2
1
22
11
,
)(
)()(
Code:1. Find j, such that2. Compute
1+≤≤ jj t θθ
EE392m - Winter 2003 Control Engineering 13-5
Linear interpolation vs. table look-up• linear interpolation is more accurate• requires less data storage• simple computation
EE392m - Winter 2003 Control Engineering 13-6
Example
TEF=Trailing Edge Flap
Empirical models• Aerospace - most developed nonlinear approaches
– automotive and process control have second place
• Aerodynamic tables• Engine maps
– jet turbines– automotive
• Process maps, e.g., insemiconductormanufacturing
• Empirical map for aattenuation vs.temperature in anoptical fiber
EE392m - Winter 2003 Control Engineering 13-7
Approximation• Interpolation:
– compute function that will provide given values in the nodes– not concerned with accuracy in-between the nodes
• Approximation– compute function that closely corresponds to given data, possibly
with some error– might provide better accuracy throughout
jθjY
EE392m - Winter 2003 Control Engineering 13-8
B-spline interpolation
• 1st-order– look-up table, nearest neighbor
• 2nd-order– linear interpolation
• n-th order:– Piece-wise n-th order polynomials, matched n-2 derivatives– zero outside a local support interval– support interval extends to n nearest neighbors
∑=j
jjd tBYty )()(
EE392m - Winter 2003 Control Engineering 13-9
B-splines
• Accurate interpolation of smoothfunctions with relative few nodes
• For 1-D function the gain fromusing high-order B-splines is notworth an added complexity
• Introduced and developed in CADfor 2-D and 3-D curve and surfacedata
• Are used for definingmultidimensional nonlinear maps
EE392m - Winter 2003 Control Engineering 13-10
Multivariable B-splines
• Regular grid in multiple variables• Tensor product B-splines• Used as a basis of finite-element models
∑=kj
kjkj vBuBwvuy,
, )()(),(
EE392m - Winter 2003 Control Engineering 13-11
Linear regression for nonlinear map• Linear regression
• Multidimensional B-splines• Multivariate polynomials
• RBF - Radial Basis Functions
)()()( xxxy T
jjj φθϕθ ⋅==∑
nkn
knj xxxx )()(),,( 1
11 ⋅⋅= KKϕK+++++= 214
21322110 )( xxxxxy θθθθθ
( ) 2
)( jcxajj ecxRx −−=−=ϕ
=
nx
xx M
1
EE392m - Winter 2003 Control Engineering 13-12
Linear regression approximation
• Nonlinear map data– available at scattered nodal points
• Linear regression map
• Linear regression approximation– regularized least square estimate of the weight vector
• Works just the same for vector-valued data!
( ) TT YrI Φ+ΦΦ= −1θ̂
[ ])()1(
)()1(
N
N
xxyyY
K
K=
[ ] Φ=⋅= TNT xxY θφφθ )()( )()1( K
EE392m - Winter 2003 Control Engineering 13-13
Nonlinear map example - Epi• Epitaxial growth (semiconductor process)
– process map for run-to-run control
EE392m - Winter 2003 Control Engineering 13-14
Linear regression for Epi map• Linear regression model for epitaxial grouth
)()1()( 22112110 xpxcxpxcy −+=
324
2232101 )()( xwxwxwwp +++=
{ { { {3
21042
21032101100110 )()(4321
xxcwxxcwxxcwxcwpxcθθθθ
+++=
{ { { {3
21042
21032111110
2211
))(1())(1()1()1()()1(
8765
xxcwxxcvxxcvxcvxpxc
−+−+−+−
=−
θθθθ
),(),(),( 212121 xxxxxxy T
jjj φθϕθ ⋅==∑
EE392m - Winter 2003 Control Engineering 13-15
Neural Networks
• Any nonlinear approximator might be called a Neural Network– RBF Neural Network– Polynomial Neural Network– B-spline Neural Network– Wavelet Neural Network
• MPL - Multilayered Perceptron– Nonlinear in parameters– Works for many inputs
+=
+= ∑∑
jjjj
jjj xwfwyywfwxy ,20,2
11,10,1 ,)(
Linear in parameters
xexf −+
=1
1)(x
y y=f(x)
EE392m - Winter 2003 Control Engineering 13-16
Multi-Layered Perceptrons
• Network parameter computation– training data set– parameter identification
• Noninear LS problem
• Iterative NLS optimization– Levenberg-Marquardt
• Backpropagation– variation of a gradient descent
);()( θxFxy =
min);(2)()( →−=∑
j
jj xFyV θ
[ ])()1(
)()1(
N
N
xxyyY
K
K=
EE392m - Winter 2003 Control Engineering 13-17
Fuzzy Logic
• Function defined at nodes. Interpolation scheme• Fuzzyfication/de-fuzzyfication = interpolation• Linear interpolation in 1-D
• Marketing (communication) and social value• Computer science: emphasis on interaction with a user
– EE - emphasis on mathematical computations
∑∑
=
jj
jjj
x
xyxy
)(
)()(
µ
µ1)( =∑
jj xµ
EE392m - Winter 2003 Control Engineering 13-18
Neural Net application• Internal Combustion Engine
maps• Experimental map:
– data collected in a steady stateregime for various combinationsof parameters
– 2-D table
• NN map– approximation of the
experimental map– MLP was used in this example– works better for a smooth
surface
RPMsparkadvance
EE392m - Winter 2003 Control Engineering 13-19
)(),(),( xyxuxk dff
• Control design requires
• These variables arescheduled on x
Linear feedback in a nonlinear plant• Simple example
• Linearizing property of feedback for
)())(()()(
xuyyxkuuxgxfy
ffd +−−=+=
1)( >>xk( ) ( )dffd yuxgxfxgxkyy −+++= − )()()()(1 1
Plant
Controller
y
yd
u
Example:varyingprocessgain
EE392m - Winter 2003 Control Engineering 13-20
Gain scheduling
• Single out severalregimes - modellinearization orexperiments
• Design linear controllersin these regimes:setpoint, feedback,feedforward
• Approximate controllerdependence on theregime parameters
Nonlinear system
∑ Θ=Θj
jjYY )()( ϕ
=
)vec()vec()vec()vec(
DCBA
Y
Linear interpolation:
EE392m - Winter 2003 Control Engineering 13-21
Gain scheduling - example• Flight control• Flight envelope
parameters are usedfor scheduling
• Shown– Approximation nodes– Evaluation points
• Key assumption– Attitude and Mach are
changing much slowerthan time constant ofthe flight control loop
EE392m - Winter 2003 Control Engineering 13-22
Local Modeling Based on Data
Outdoortemperature
Timeof day
Heatdemand
ForecastedForecastedvariablevariable
ExplanatoryExplanatoryvariablesvariables
Query pointQuery point( What if ? )( What if ? )
RelationalDatabase
MultidimensionalData Cube
Heat LoadsHeat Loads• Data mining in the loop• Honeywell product