Wolfram.com
WolframAlpha.com
WolframCloud.com
Wolfram Language
Example Repository
Ready-to-use examples for the Wolfram Language
Primary Navigation
Categories
Astronomy
Audio Processing
Calculus
Cellular Automata
Chemistry
Complex Systems
Computer Science
Computer Vision
Control Systems
Creative Arts
Data Science
Engineering
Finance & Economics
Finite Element Method
Food & Nutrition
Geography
Geometry
Graphs & Networks
Image Processing
Life Sciences
Machine Learning
Mathematics
Optimization
Physics
Puzzles and Recreation
Quantum Computation
Signal Processing
Social Sciences
System Modeling
Text & Language Processing
Time-Related Computation
Video Processing
Visualization & Graphics
Alphabetical List
Submit a New Resource
Learn More about
Wolfram Language
Related Pages
Related Symbols
NonlinearStateSpaceModel
OutputResponse
ParametricPlot
LQRegulatorGains
Related Categories
Control Systems
Stabilization of Lynx and Hare Populations with LQG Control
Example Notebook
Open in Cloud
Download Notebook
The populations of the hares and lynx are modeled after predator-prey dynamics and use the following variables:
h
a
r
e
p
o
p
u
l
a
t
i
o
n
ℯ
l
y
n
x
p
o
p
u
l
a
t
i
o
n
ℓ
h
a
r
e
p
o
p
u
l
a
t
i
o
n
e
q
l
.
v
a
l
u
e
ℓ
ℯ
l
y
n
x
p
o
p
u
l
a
t
i
o
n
e
q
l
.
v
a
l
u
e
ℊ
h
a
r
e
g
r
o
w
t
h
r
a
t
e
m
a
x
.
p
o
p
u
l
a
t
i
o
n
o
f
h
a
r
e
s
ℯ
h
a
r
e
a
n
d
l
y
n
x
p
o
p
u
l
a
t
i
o
n
s
'
i
n
t
e
r
a
c
t
i
o
n
t
e
r
m
h
a
r
e
c
o
n
s
u
m
p
t
i
o
n
f
a
c
t
o
r
ℓ
ℊ
l
y
n
x
g
r
o
w
t
h
c
o
n
s
t
a
n
t
ℓ
l
y
n
x
m
o
r
t
a
l
i
t
y
r
a
t
e
I
n
[
1
]
:
=
e
q
n
s
=
′
[
t
]
(
ℊ
[
t
]
)
1
-
[
t
]
-
(
(
ℯ
[
t
]
)
ℓ
[
t
]
)
(
+
[
t
]
)
,
′
ℓ
[
t
]
-
ℓ
ℓ
[
t
]
+
(
(
(
ℯ
ℓ
ℊ
)
[
t
]
)
ℓ
[
t
]
)
(
+
[
t
]
)
O
u
t
[
1
]
=
′
[
t
]
ℊ
[
t
]
1
-
[
t
]
-
ℯ
[
t
]
ℓ
[
t
]
+
[
t
]
,
′
ℓ
[
t
]
-
ℓ
ℓ
[
t
]
+
(
ℯ
ℓ
ℊ
[
t
]
ℓ
[
t
]
)
(
+
[
t
]
)
A nonlinear state-space model of the system:
I
n
[
2
]
:
=
n
s
s
m
=
N
o
n
l
i
n
e
a
r
S
t
a
t
e
S
p
a
c
e
M
o
d
e
l
[
e
q
n
s
,
{
{
[
t
]
,
ℯ
}
,
{
ℓ
[
t
]
,
ℓ
ℯ
}
}
,
{
ℊ
[
t
]
,
ℓ
ℊ
[
t
]
}
,
{
[
t
]
,
ℓ
[
t
]
}
,
t
]
/
.
p
a
r
s
O
u
t
[
2
]
=
{
[
t
]
,
2
0
.
5
8
8
}
-
1
1
2
5
2
[
t
]
ℊ
[
t
]
+
[
t
]
(
ℊ
[
t
]
-
(
3
.
2
ℓ
[
t
]
)
/
(
5
0
+
[
t
]
)
)
{
ℓ
[
t
]
,
2
9
.
4
8
1
}
ℓ
[
t
]
(
-
0
.
5
6
+
(
3
.
2
[
t
]
ℓ
ℊ
[
t
]
)
/
(
5
0
+
[
t
]
)
)
[
t
]
ℓ
[
t
]
The lynx population is eliminated with a growth rate of zero:
I
n
[
3
]
:
=
O
u
t
p
u
t
R
e
s
p
o
n
s
e
[
{
n
s
s
m
,
{
2
3
,
2
0
}
}
,
{
0
,
0
}
,
{
t
,
0
,
4
0
}
]
;
P
l
o
t
%
,
{
t
,
0
,
4
0
}
,
p
l
o
t
O
p
t
s
O
u
t
[
3
]
=
h
a
r
e
p
o
p
u
l
a
t
i
o
n
l
y
n
x
p
o
p
u
l
a
t
i
o
n
Specify the system specification and a set noise covariance matrices and control weights:
I
n
[
4
]
:
=
c
v
s
=
{
{
}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
=
1
2
0
;
I
n
[
1
0
]
:
=
T
h
r
e
a
d
R
a
n
g
e
[
0
,
n
]
,
R
a
n
d
o
m
V
a
r
i
a
t
e
N
o
r
m
a
l
D
i
s
t
r
i
b
u
t
i
o
n
0
,
1
.
5
,
{
n
+
1
}
;
P
l
o
t
[
y
v
=
I
n
t
e
r
p
o
l
a
t
i
o
n
[
%
,
t
]
,
{
t
,
0
,
n
}
]
O
u
t
[
1
0
]
=
The closed-loop response results in a stable cyclic response:
I
n
[
1
1
]
:
=
o
r
=
O
u
t
p
u
t
R
e
s
p
o
n
s
e
[
{
c
s
y
s
,
{
2
3
,
2
0
}
}
,
{
y
v
,
0
,
0
}
,
{
t
,
0
,
1
2
0
}
]
;
P
l
o
t
%
,
{
t
,
0
,
1
2
0
}
,
p
l
o
t
O
p
t
s
O
u
t
[
1
1
]
=
h
a
r
e
p
o
p
u
l
a
t
i
o
n
l
y
n
x
p
o
p
u
l
a
t
i
o
n
The parametric plot demonstrates the limit-cycle behavior:
I
n
[
1
2
]
:
=
P
a
r
a
m
e
t
r
i
c
P
l
o
t
[
o
r
,
{
t
,
0
,
6
0
}
,
P
l
o
t
R
a
n
g
e
A
l
l
,
A
x
e
s
O
r
i
g
i
n
{
0
,
0
}
]
O
u
t
[
1
2
]
=
Obtain the controller model:
I
n
[
1
3
]
:
=
c
m
=
l
q
g
[
"
C
o
n
t
r
o
l
l
e
r
M
o
d
e
l
"
]
/
/
S
i
m
p
l
i
f
y
O
u
t
[
1
3
]
=
{
,
2
0
.
5
8
8
}
◼
{
ℓ
,
2
9
.
4
8
1
}
◼
◼
◼
The control effort reveals the equilibrium values for the hare and lynx growth rates:
I
n
[
1
4
]
:
=
O
u
t
p
u
t
R
e
s
p
o
n
s
e
[
c
m
,
J
o
i
n
[
{
0
,
0
}
,
o
r
]
,
{
t
,
0
,
1
2
0
}
]
;
P
l
o
t
[
%
,
{
t
,
0
,
1
}
,
P
l
o
t
R
a
n
g
e
A
l
l
,
P
l
o
t
L
e
g
e
n
d
s
{
,
}
]
O
u
t
[
1
4
]
=
Source Metadata
Citation:
Astrom & Murray 2009, Feedback Systems v2.10b Chapter 3, page 90 3.31
Related Symbols
NonlinearStateSpaceModel
OutputResponse
ParametricPlot
LQRegulatorGains
Publisher Information
Contributed by:
Wolfram Controls Team