# 非線形推定器の構築

モデルの入力は で，出力は である．

 In[1]:= Xpars = {\[ScriptR] -> 2.1, \[ScriptA] -> 3.2, \[ScriptB] -> 0.4, \[ScriptC] -> 50, \[ScriptD] -> 0.55, \[Kappa] -> 150};
 In[2]:= Xsys = AffineStateSpaceModel[ {{-((\[ScriptA] \[ScriptH] \[ScriptL])/(\ \[ScriptC] + \[ScriptH])) + \[ScriptH] \[ScriptR] (1 - \[ScriptH]/\ \[Kappa]), -\[ScriptD] \[ScriptL] + (\[ScriptA] \[ScriptB] \[ScriptH] \ \[ScriptL])/(\[ScriptC] + \[ScriptH])}, {{ \[ScriptH] (1 - \ \[ScriptH]/\[Kappa]) }, {0 }}, {\[ScriptL]}, {{ 0 }}}, {{\[ScriptH], \ -((\[ScriptC] \[ScriptD])/(-\[ScriptA] \[ScriptB] + \[ScriptD]))}, {\ \[ScriptL], (\[ScriptB] \[ScriptC] \[ScriptR] (-\[ScriptC] \[ScriptD] \ + \[ScriptA] \[ScriptB] \[Kappa] - \[ScriptD] \ \[Kappa]))/((-\[ScriptA] \[ScriptB] + \[ScriptD])^2 \[Kappa])}}, \ {Subscript[\[FormalU], 1]}, {Automatic}, Automatic , SamplingPeriod -> None] /. pars;

 In[3]:= Xic = {80, 25}; \[ScriptF] = 1.1 + Cos[2 \[Pi] t];

 In[4]:= Xsr = StateResponse[{sys, ic}, \[ScriptF], {t, 0, 40}]; Plot[sr, {t, 0, 40}, PlotLegends -> {"hare", "lynx"}]
 Out[4]=

このリミットサイクル挙動はパラメトリックプット上でも見ることができる．

 In[5]:= XParametricPlot[sr, {t, 0, 40}, Frame -> True, FrameLabel -> {"hare", "lynx"}]
 Out[5]=

 In[6]:= X\[ScriptG] = EstimatorGains[StateSpaceModel[sys], {-1, -2}]
 Out[6]=

 In[7]:= X\[ScriptCapitalL] = StateOutputEstimator[sys, \[ScriptG]]
 Out[7]=

オブザーバ入力は である．

 In[8]:= X\[ScriptCapitalU] = Join[{\[ScriptF]}, OutputResponse[{sys, ic}, \[ScriptF], {t, 0, 30}]]
 Out[8]=

 In[9]:= XSubscript[\[ScriptH], estim] = OutputResponse[\[ScriptCapitalL], \[ScriptCapitalU], {t, 0, 30}][[ 1]]; Plot[{sr[[1]], Subscript[\[ScriptH], estim]}, {t, 0, 5}, PlotLegends -> {"Actual", "Estimated"}]
 Out[9]=

## Mathematica

Questions? Comments? Contact a Wolfram expert »