Crash course in control theory for neuroscientists and biologists
-
Upload
matteo-mischiati -
Category
Education
-
view
90 -
download
0
Transcript of Crash course in control theory for neuroscientists and biologists
1
Control-theoretic approach to the analysis and synthesis of sensorimotor loops
A few main principles and connections to neuroscience
Neurotheory and Engineering seminar - 05/28/2013
Matteo Mischiati
2
โข Control theory framework - linear time-invariant (LTI) case
โข Properties of feedback - internal model principle
โข Common control schemes - forward and inverse models, Smith predictor - state feedback, observers, optimal control
โข A model of human response in manual tracking tasks (Kleinman et al. 1970, Gawthrop et al. 2011)
Matteo Mischiati Control theory primer
3
Control theory framework
Assume you have a system (PLANT) for which you can control certain variables (inputs) and sense others (outputs). There may be disturbances on your inputs and your sensed outputs may be noisy.
๐ข ๐ฆPLANT
๐ข๐++
๐++
๐๐ฆ ๐
Matteo Mischiati Control theory primer
4
Control theory framework
SYNTHESIS problem: design a controller that applies the right inputs to the plant, based on the noisy outputs, to achieve a desired goal while satisfying one or more performance criteria
๐ข ๐ฆPLANT
๐ข๐++
๐++
๐๐ฆ ๐
~๐ฆCONTROLLER
Matteo Mischiati Control theory primer
5
Control theory framework
SYNTHESIS problem: design a controller that applies the right inputs to the plant, based on the noisy outputs, to achieve a desired goal while satisfying one or more performance criteria
Possible Goals: โข Output regulation (disturbance rejection, homeostasis) : keep constant despite disturbanceโข Trajectory tracking : keep
Performance criteria:โข Static performance (at steady state): e.g. โข Dynamic performance: transient time, etcโฆโข Stability: not blowing up!โข Robustness: amount of disturbance that can be toleratedโข Limited control effort
๐ข ๐ฆPLANT
๐ข๐++
๐++
๐๐ฆ ๐
~๐ฆCONTROLLER
Matteo Mischiati Control theory primer
6
Control theory framework
ANALYSIS problem: infer the functional structure of the controller, given the observed performance of the overall system in multiple tasks
Goals: โข Output regulation (disturbance rejection, homeostasis) : keep constant despite disturbance โข Trajectory tracking : keep
Performance criteria:โข Static performance (at steady state): e.g. โข Dynamic performance: transient time, etcโฆโข Stability: not blowing up!โข Robustness: amount of disturbance that can be toleratedโข Limited control effort
++๐ข
๐๐ฆ
PLANT
++
๐๐ข๐ ๐ฆ ๐
~๐ฆCONTROLLER
?
Matteo Mischiati Control theory primer
7
Example of analysis problem: uncovering the dragonfly control system
๐ ๐ซ๐ญ
๐๐๐๐
๐
โข We want to precisely characterize the foraging behavior of the dragonfly (what it does) to gain insight on its neural circuitry (how it does it).
๐ ๐ซ๐ญ
๐๐๐๐ ๐๐๐
?
, relative to dragonfly, in ref. frame
dragonfly accel.
head rotation
dragonfly head, body & wing dynamics
dragonfly visual system
๐๐๐๐๐๐? ๐๐๐๐ s?๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐
๐๐๐ ๐
๐๐๐ ๐
Matteo Mischiati Control theory primer
8
Linear time-invariant systems
,
โข Stability (of a system) have negative real partโข Performance (of a system): depends on location of poles and zeros โข Related to transfer function in frequency domain:
++๐ข
๐๐ฆ
PLANT
++
๐๐ข๐ ๐ฆ ๐
~๐ฆCONTROLLER
๐ (๐ ) ++๐ (๐ )
๐ (๐ )๐ (๐ )
PLANT
++
๐ท(๐ )๐๐ถ (๐ ) ๐ ๐(๐ )~๐ (๐ )๐ถ (๐ )
CONTROLLER
Laplace transform
Y (๐ )=๐ ( ๐ ) โ๐ (๐ )
Matteo Mischiati Control theory primer
9
Linear time-invariant systems
Laplace transform for signals:โข Final value theorem : (if limit exists)โข If then
Typical reference/disturbance signals:- Step
- Ramp
- Sinusoid
๐ (๐ ) ++๐ (๐ )
๐ (๐ )๐ (๐ )
PLANT
++
๐ท(๐ )๐๐ถ (๐ ) ๐ ๐(๐ )~๐ (๐ )๐ถ (๐ )
CONTROLLER
Y (๐ )=๐ ( ๐ ) โ๐ (๐ )
๐ก
~๐ฆ (๐ก) ๐
๐ก
~๐ฆ (๐ก) ๐๐ก
๐ก
~๐ฆ (๐ก) sin (๐ ๐ก )
Matteo Mischiati Control theory primer
10
โข Control theory framework - linear time-invariant (LTI) case
โข Properties of feedback - internal model principle
โข Common control schemes - forward and inverse models, Smith predictor - state feedback, observers, optimal control
โข A model of human response in manual tracking tasks (Kleinman et al. 1970, Gawthrop et al. 2011)
Matteo Mischiati Control theory primer
11
Feedforward (inverse model)
StabilityDepends on poles (and zeros!) of
Performance (static and dynamic)Arbitrarily good if and its inverse exists and is stable:
Robustness to disturbance (disturbance rejection)None :
๐ (๐ )๐ (๐ ) ๐ (๐ )PLANT
++
๐ท(๐ )๐๐ถ (๐ )~๐ (๐ ) ๏ฟฝฬ๏ฟฝโ1(๐ )
CONTROLLER
Y (๐ )=๐ ( ๐ ) โ๐ (๐ )U c (๐ )= ๏ฟฝฬ๏ฟฝโ1 ( ๐ ) โ~๐ (๐ )
Matteo Mischiati Control theory primer
12
Properties of Feedback
StabilityDepends on . Can potentially stabilize unstable plants.
Disturbance rejectionDepends on . Can potentially attenuate/cancel effect of
๐ (๐ )๐ (๐ ) ๐ (๐ )PLANT
++
๐ท(๐ )๐๐ถ (๐ )๐ธ (๐ )๐ถ (๐ )
CONTROLLER~๐ (๐ )
Y (๐ )=๐ ( ๐ ) โ๐ (๐ )U c (๐ )=๐ถ ( ๐ ) โ๐ธ(๐ )+-
Matteo Mischiati Control theory primer
13
Properties of Feedback
Static performance
Letโs see how different controllers perform:
๐ (๐ )๐ (๐ ) ๐ (๐ )PLANT
++
๐ท(๐ )๐๐ถ (๐ )๐ธ (๐ )๐ถ (๐ )
CONTROLLER~๐ (๐ )
+-๐ .๐ . 1
1+๐ ๐ ๐
Matteo Mischiati Control theory primer
14
Properties of Feedback
Static performance
Proportional controller: errors in tracking a step
(but small if is large)
cannot track a ramp at all
๐ (๐ )๐ (๐ ) ๐ (๐ )PLANT
++
๐ท(๐ )๐๐ถ (๐ )๐ธ (๐ )๐ถ (๐ )
CONTROLLER~๐ (๐ )
+-
๐๐
๐๐ 2
๐ .๐ . 11+๐ ๐
๐
Matteo Mischiati Control theory primer
15
Properties of Feedback
Static performance
Proportional+Integral (PI) controller: perfect in tracking a step
๐ (๐ )๐ (๐ ) ๐ (๐ )PLANT
++
๐ท(๐ )๐๐ถ (๐ )๐ธ (๐ )๐ถ (๐ )
CONTROLLER~๐ (๐ )
+-
๐๐
๐๐ 2
11+๐ ๐ ๐๐+
๐๐
๐
Matteo Mischiati Control theory primer
( but small if ๐๐ is large )
16
Properties of FeedbackStatic performance
To perfectly track: We need: Step
Ramp
How about sinusoid? We need:
๐๐
๐๐ 2
๐๐ 2+๐2
๐ (๐ )๐ถ ( ๐ )=1๐ โ (๐ ( ๐ ) ๐ถ (๐ )) โฒ
๐ (๐ )๐ถ ( ๐ )= 1๐ 2
โ (๐ ( ๐ ) ๐ถ (๐ )) โฒ
๐บ ( ๐ )
Matteo Mischiati Control theory primer
17
Internal model principleTo perfectly track: We need: Step
Ramp
Sinusoid
Internal model principle: To achieve asymptotical tracking of a reference signal (rejection of a disturbance signal) via feedback, the controller (or the plant) must contain an โinternal modelโ of the signal.
It is a necessary condition, not a sufficient condition (need also stability)
๐๐
๐๐ 2
๐๐ 2+๐2
๐ (๐ )๐ถ ( ๐ )=1๐ โ (๐ ( ๐ ) ๐ถ (๐ )) โฒ
๐ (๐ )๐ถ ( ๐ )= 1๐ 2
โ (๐ ( ๐ ) ๐ถ (๐ )) โฒ
๐ (๐ )๐ถ ( ๐ )= 1๐ 2+๐2 โ (๐ ( ๐ ) ๐ถ (๐ )) โฒ
Matteo Mischiati Control theory primer
18
Feedback vs. Feedforward
Feedbackโข is needed if plant is unstable or for disturbance rejectionโข does not require full knowledge of the plantโข incorporating the knowledge of possible reference and disturbance
signals is very useful (internal model principle)
Feedforwardโข if plant is known, and no disturbance, its performance canโt be beatโข no sensory delays
๐ (๐ )= ๐ ( ๐ ) ๐ถ (๐ )1+๐ (๐ )๐ถ (๐ )
~๐ ( ๐ )+ ๐ ( ๐ )1+๐ (๐ ) ๐ถ ( ๐ )
๐ท (๐ )๐ (๐ )=๐ (๐ ) โ (๏ฟฝฬ๏ฟฝ ยฟยฟโ1 ( ๐ ) โ ~๐ ( ๐ )+๐ท (๐ ))โ~๐ (๐ )+๐ (๐ )โ ๐ท(๐ )ยฟ
Matteo Mischiati Control theory primer
19
โข Control theory framework - linear time-invariant (LTI) case
โข Properties of feedback - internal model principle
โข Common control schemes - forward and inverse models, Smith predictor - state feedback, observers, optimal control
โข A model of human response in manual tracking tasks (Kleinman et al. 1970, Gawthrop et al. 2011)
Matteo Mischiati Control theory primer
20
Feedback + Feedforward
The feedback controller kicks in only if inverse model is incorrect.
๐ (๐ )๐ (๐ ) ๐ (๐ )PLANT
++
๐ ๐น๐ต(๐ )
๐ธ (๐ )๐ถ (๐ )~๐ (๐ )
+-
๏ฟฝฬ๏ฟฝโ1(๐ )INVERSE MODEL
FEEDBACK
๐ ๐น๐น(๐ )
Matteo Mischiati Control theory primer
21
Feedback + Feedforward
The feedback controller kicks in only if inverse model is incorrect.
The corrective command from the feedback path can be also used as a learning/adaptation signal by the inverse model.
๐ (๐ )๐ (๐ ) ๐ (๐ )PLANT
++
๐ ๐น๐ต(๐ )
๐ธ (๐ )๐ถ (๐ )~๐ (๐ )
+-
๏ฟฝฬ๏ฟฝโ1(๐ )INVERSE MODEL
FEEDBACK
๐ ๐น๐น(๐ )
Matteo Mischiati Control theory primer
22
Feedback + Feedforward
The feedback controller kicks in only if inverse model is incorrect.
The corrective command from the feedback path can be also used as a learning/adaptation signal by the inverse model.
Significant sensory delays are still a problem.
๐ (๐ )๐ (๐ ) ๐ (๐ )PLANT
++
๐ ๐น๐ต(๐ )
๐ธ (๐ )๐ถ (๐ )~๐ (๐ )
+-
๏ฟฝฬ๏ฟฝโ1(๐ )INVERSE MODEL
FEEDBACK
๐ ๐น๐น(๐ )
๐โ ๐ ๐
Matteo Mischiati Control theory primer
23
Forward model
The control signal is sent through a model of the plant (โforward modelโ) to predict the sensory output.
๐ (๐ )๐ (๐ )PLANT
๐๐ถ (๐ )๐ธ (๐ )๐ถ (๐ )~๐ (๐ )
+-
๏ฟฝฬ๏ฟฝ (๐ )FORWARD MODEL
CONTROLLER
predicted sensory output
Matteo Mischiati Control theory primer
24
Forward model
The control signal is sent through a model of the plant (โforward modelโ) to predict the sensory output.
The (delayed) sensory output can be used as a learning/adaptation signal for the forward model.
Direct use of the delayed sensory output in the control is problematic because of time mismatch.
๐ (๐ )๐ (๐ )PLANT
๐๐ถ (๐ )๐ธ (๐ )๐ถ (๐ )~๐ (๐ )
+-
๏ฟฝฬ๏ฟฝ (๐ )FORWARD MODEL
๐โ ๐ ๐
CONTROLLER
predicted sensory output
Matteo Mischiati Control theory primer
25
Smith predictor
Assuming and :
Delay has been moved outside the control loop.
PLANT
๐ (๐ )๐ (๐ )๐๐ถ (๐ )๐ธ (๐ )๐ถ (๐ )~๐ (๐ )
+- -
๏ฟฝฬ๏ฟฝ (๐ )๐โ ๐ ๐
๐โ ๐ ๏ฟฝฬ๏ฟฝ
+ -
delay model
plant model
predicted sensory output
error in sensory output prediction
CONTROLLER
Matteo Mischiati Control theory primer
26
Models of the cerebellum
1. Cerebellum as an inverse model in a feedback+feedforward motor control scheme
Wolpert, Miall & Kawato, 1998 โInternal models in the cerebellumโ Not in the sense of my presentation !
Matteo Mischiati Control theory primer
27
Models of the cerebellum
2. Cerebellum as aforward model in a Smith predictor control scheme
Wolpert, Miall & Kawato, 1998 โInternal models in the cerebellumโ
Matteo Mischiati Control theory primer
28
State feedback
๐ฆPLANT
๐ข~๐ฆCONTROLLER
๐
๐ฆPLANT
๐ข~๐ฆCONTROLLER
๐
Linear time-invariant case:
Matteo Mischiati Control theory primer
29
State feedback
If the plant is reachable, it is possible to achieve any arbitrary choice of closed-loop poles with an appropriate linear and memoryless controller:
๐ฆPLANT
๐ข~๐ฆCONTROLLER
๐
๐ฆPLANT
๐ข~๐ฆCONTROLLER
๐
Linear time-invariant case:
๐พ
๐พ ๐ +-
Matteo Mischiati Control theory primer
30
Observers
Observer: dynamical system designed to estimate the full state (when not fully available)
If the plant is observable, it is possible to achieve (with right )
๐ฆPLANT
๐ข
๐ )
OBSERVER
Matteo Mischiati Control theory primer
31
Observers
Observer: dynamical system designed to estimate the full state (when not fully available)
If the plant is observable, it is possible to achieve (with right )
Separation principle: if the plant is reachable & observable, can replace with and design independently of (use observed state just as real one)
๐ฆPLANT
๐ข
๐ )
~๐ฆ
๐พ
๐พ ๐ +-
OBSERVER
Matteo Mischiati Control theory primer
32
Optimal control
Linear Quadratic Gaussian (LQG) optimal output regulation: linear plant, additive Gaussian white noise on state (with covariance ) and output (); minimize quadratic cost :
Solution is linear observer (Kalman filter) with linear memoryless controller:
๐ฆPLANT
๐ข
๐ )
~๐ฆ=0
๐พ
+-
OBSERVER (KALMAN FILTER)
๐ ++
๐๐ฆ ๐
Matteo Mischiati Control theory primer
33
Internal model principle
Internal model principle (state space): to achieve asymptotical tracking of a reference signal (rejection of a disturbance signal) produced by an exosystem, the controller must contain an โinternal modelโ of the exosystem.(Francis & Wonham, Automatica, 1970)
It is a necessary condition, not a sufficient condition (need also stability).
General principle with extensions to nonlinear systems.
๐ฆPLANT
๐~๐ฆ ๏ฟฝฬ๏ฟฝ=๐๐ผ+๐บ๐+-๐
CONTROLLER
๐ผINT.MODELEXOSYSTEM
Matteo Mischiati Control theory primer
34
โข Control theory framework - linear time-invariant (LTI) case
โข Properties of feedback - internal model principle
โข Common control schemes - forward and inverse models, Smith predictor - state feedback, observers, optimal control
โข A model of human response in manual tracking tasks (Kleinman et al. 1970, Gawthrop et al. 2011)
Matteo Mischiati Control theory primer
35
Human response modelD. L. Kleinman, S. Baron and W. H. Levison, โAn Optimal Control Model of Human Response. Part I: Theory and Validationโ, Automatica, 1970 (revisited, more recently, by Gawthrop et al. 2011)
Task: by controlling a joystick (position, velocity or acceleration control), subject is asked to keep a cursor on the screen as close as possible to a target location, while unknown disturbances are applied by the computer.
Plant:๐๐๐๐๐ก๐๐ ๐ (๐ )
++
(computer)
๐ (๐ ) ๐๐๐ฆ๐ ๐ก๐๐๐ ๐ ๐ฝ๐ ( ๐ ) โ{๐ , ๐๐ , ๐๐ 2 }
โHuman controllerโ:
dynamics
๐ (๐ )++
๐๐๐ก๐๐ ๐๐๐๐ ๐
computation
๐ ๐ (๐ )๐ถ (๐ )๐โ ๐ ๐
Matteo Mischiati Control theory primer
36
Human response modelTask: Output regulation/disturbance rejection with linear time-invariant plant and significant delay on any potential feedback line
๐โ ๐ ๐
๐ (๐ ) ++๐ (๐ )
๐ (๐ )๐ (๐ )
++
๐ท(๐ )๐๐ถ (๐ ) ๐ ๐(๐ )๐ถ (๐ )
CONTROLLER
๐ ๐ฝ๐ ( ๐ ) โ๐๐ (๐ )
ANALYSIS problem: infer a model of the neural controller from the observed performance of the subjects tested.
Matteo Mischiati Control theory primer
37
Human response modelTask: Output regulation/disturbance rejection with linear time-invariant plant and significant delay on any potential feedback line
๐โ ๐ ๐
๐ (๐ ) ++๐ (๐ )
๐ (๐ )๐ (๐ )
++
๐ท(๐ )๐๐ถ (๐ ) ๐ ๐(๐ )๐ถ (๐ )
CONTROLLER
๐ ๐ฝ๐ ( ๐ ) โ๐๐ (๐ )
ANALYSIS problem: infer a model of the neural controller from the observed performance of the subjects tested.
So what are the performances?โข Very good and robust to disturbances up to 2Hz (sum of sinusoids), for all
three types of joystick dynamicsโข Apparently delay-free
Must be some kind of FEEDBACK + FORWARD model !
Matteo Mischiati Control theory primer
38
Human response modelHypothesis: optimal control to minimize average error & control effort
Theoretical solution * (with assumptions similar to LQG problem): - Optimal observer (Kalman filter) to estimate delayed state (as in LQG)- Optimal least mean-squared predictor to predict current state- Optimal linear memoryless controller (as in LQG)
๐ฆPLANT
๐ข
๏ฟฝฬ๏ฟฝ (๐กโ๐ )KALMAN FILTER
~๐ฆ=0
๐พ
+-
๐ ++
๐๐ฆ ๐
* D. Kleinman, โOptimal control of linear systems with time-delay and observation noiseโ, IEEE Trans. Autom. Control, 1969
๐โ ๐ ๐PREDICTOR
๏ฟฝฬ๏ฟฝ (๐ก) ๐ฆ ๐(๐กโ๐ )
Matteo Mischiati Control theory primer
39
Controller freq. response with plant Controller freq. response with plant
Matteo Mischiati Control theory primer
40
Human response modelGawthrop et al. * (2011): - Introduced, in both estimator and predictor, a copy of the exosystem
generating sinusoidal disturbances (internal model principle!)- Show that intermittent control is also compatible with results
* P. Gawthrop et al., โIntermittent control: a computational theory of human controlโ, Biol. Cybern., 2011
Actual response to sinusoid Response without int.model
Matteo Mischiati Control theory primer
41
โข Crash course in control theory (for LTI systems) - many concepts can be extended to more general settings
โข An example of control-theoretic approach to modeling sensorimotor loops
- need to iterate between modeling/experiments to discern among alternatives and improve understanding of the system
Conclusions
THANK YOU FOR YOUR ATTENTION !
Matteo Mischiati Control theory primer