SystemModelParametricSimulate[model,v,{p1,p2,…}]
変数 v について,パラメータ piで model のシミュレーションを行う.
SystemModelParametricSimulate[model,{v1,v2,…},{p1,p2,…}]
複数の変数 viについて model のシミュレーションを行う.
SystemModelParametricSimulate[model,vars,tmax,…]
0から tmaxまでのシミュレーションを行う.
SystemModelParametricSimulate[model,vars,{tmin,tmax},…]
tminから tmaxまでのシミュレーションを行う.
SystemModelParametricSimulate
SystemModelParametricSimulate[model,v,{p1,p2,…}]
変数 v について,パラメータ piで model のシミュレーションを行う.
SystemModelParametricSimulate[model,{v1,v2,…},{p1,p2,…}]
複数の変数 viについて model のシミュレーションを行う.
SystemModelParametricSimulate[model,vars,tmax,…]
0から tmaxまでのシミュレーションを行う.
SystemModelParametricSimulate[model,vars,{tmin,tmax},…]
tminから tmaxまでのシミュレーションを行う.
詳細とオプション
- SystemModelParametricSimulateはシステムモデルについてのパラメトリックシミュレーションの結果を返す.
- model の形は以下でよい.
-
SystemModel[…] 一般的なシステムモデル StateSpaceModel[…] 状態空間モデル TransferFunctionModel[…] 伝達関数モデル AffineStateSpaceModel[…] アフィン状態空間モデル NonlinearStateSpaceModel[…] 非線形状態空間モデル DiscreteInputOutputModel[…] 離散入出力モデル - SystemModelParametricSimulateは,ParametricFunctionオブジェクトについての結果を与える.
- SystemModelParametricSimulateにはSystemModelSimulateと同じオプションが使える.
-
InterpolationOrder Automatic イベント間の出力の連続次数 Method Automatic 使用するシミュレーションメソッド ProgressReporting $ProgressReporting 進捗表示を制御する
全オプションのリスト
例題
すべて開く すべて閉じる例 (3)
sol = SystemModelParametricSimulate[[image], "z", {"a"}]a の数値について評価すると z についての近似関数解が与えられる:
z1 = sol[1]z1[10]Plot[Evaluate[Table[sol[a][t], {a, 0, 1, .1}]], {t, 0, 10}]sol = SystemModelParametricSimulate[[image], "z", {"y"}]Plot[Evaluate[Table[sol[y][t], {y, 0, 1, .1}]], {t, 0, 10}]sol = SystemModelParametricSimulate[[image], "z", {"a"}]Plot[Evaluate[(sol[a][t] + {0, .1, -.1}D[sol[a][t], a]) /. {a -> 1}], {t, 0, 10}, Filling -> {2 -> {3}}]スコープ (5)
モデル (5)
パラメータについてSystemModelの変数についてのパラメトリック解を得る:
sol = SystemModelParametricSimulate[[image], {"x", "y"}, "theta"]ParametricPlot[Evaluate[Table[Through[sol[a][t]], {a, 0.4, 0.7, 0.1}]], {t, 0, 7}]パラメータについてAffineStateSpaceModelの変数についてのパラメトリック解を得る:
sol = SystemModelParametricSimulate[AffineStateSpaceModel[{{a + a*Cos[x2],
(-a)*x2 + Cos[a*x1^2]}, {{0}, {1}},
{x2}, {{0}}}, {x1, x2}, Automatic, {Automatic}, Automatic,
SamplingPeriod -> None], x1, {a}]Plot[Evaluate[Table[sol[a][t], {a, 0.01, 0.05, 0.01}]], {t, 0, 10}]パラメータについてNonlinearStateSpaceModelの変数についてのパラメトリック解を得る:
sol = SystemModelParametricSimulate[NonlinearStateSpaceModel[{{a*Cos[x] + 4*Sin[x/2]},
{x + Sin[x]}}, {x}, {}, {Automatic}, Automatic,
SamplingPeriod -> None], x, {a}]Plot[Evaluate[Table[sol[a][t], {a, 1, 4}]], {t, 0, 10}]パラメータについてDiscreteInputOutputModelの変数についてのパラメトリック解を得る:
diom = DiscreteInputOutputModel[{u[0], u[1] - a y[0], u[2] - a y[1]}, u, y]sol = SystemModelParametricSimulate[diom, y, {a}, <|"Inputs" -> {1 -> Table[Sin[t / 10], {t, 0, 30}]}|>]Plot[Evaluate[Table[sol[a][t], {a, 0.2, 1.8, 0.8}]], {t, 0, 30}]複数のパラメータに関してSystemModel内の変数のパラメトリック解を取得する:
sol = SystemModelParametricSimulate[[image], {"p.r[1]", "p.r[2]"}, {"k", "p.m"}]ParametricPlot[Evaluate[Flatten[Table[Through[sol[k, m][t]], {k, 10, 20, 10}, {m, 1, 2.5, 1.5}], 1]], {t, 0, 40}]オプション (1)
Method (1)
Methodを使ってもとになっているソルバを選ぶ:
model = [image];dassl = SystemModelParametricSimulate[model, "z", {"a"}, Method -> "DASSL"]ParametricNDSolveをソルバとして使う:
ndsolve = SystemModelParametricSimulate[model, "z", {"a"}, Method -> "ParametricNDSolve"]ParametricNDSolveは他のソルバよりも速いことが多い:
RepeatedTiming[ndsolve[1][10]]RepeatedTiming[dassl[1][10]]アプリケーション (2)
平衡錘投石機での投石を最大化するためにパラメータを最適化する:
model = \!\(\*GraphicsBox[«8»]\);投石のタイミングとロープの長さをさまざまに変えて,投石距離のためのパラメトリック関数を取り出す:
distance = SystemModelParametricSimulate[model, "distance", {"releaseTime", "ropeLength"}, ProgressReporting -> False]Monitor[fittedpars = NMaximize[{distance[time, length][10], 0.1 < length < 3 && 5 < time < 6.5}, {time, length}, AccuracyGoal -> 2, PrecisionGoal -> 2], {time, length}]sim = SystemModelSimulate[model, <|"ParameterValues" -> ({"releaseTime" -> time, "ropeLength" -> length} /. fittedpars[[2]])|>]sim[{"distance"}, 10]保存されているプロットを使って投げられたオブジェクトの軌跡をプロットする:
SystemModelPlot[sim, "Trajectory"]data = Import["ExampleData/inertiaTestData.dat"];pf = SystemModelParametricSimulate[\!\(\*GraphicsBox[«8»]\), "Inertia2.w", 40, {"Resistor1.R", "SpringDamper1.d"}, ProgressReporting -> False]criteriaFun[p_ ? NumericQ, q_ ? NumericQ] := Module[{f},
f = pf[p, q];
Norm[Table[data[[i, 2]] - f[data[[i, 1]]], {i, Length[data]}]]^2
]fittedpars = FindMinimum[criteriaFun[p, q], {{p, 0.1}, {q, 0.25}}, StepMonitor :> PrintTemporary[{p, q}]]sol = pf[p, q] /. fittedpars[[2]];Show[Plot[sol[t], {t, 0, 40}, PlotStyle -> Orange], ListPlot[data]]特性と関係 (1)
SystemModelSimulateSensitivityを使って簡単にパラメータ感度を計算することができる:
sim = SystemModelSimulateSensitivity[[image], 5, {"a"}];SystemModelPlot[sim, {{"y", "a", 0.1}, {"z", "a", 0.1}}]関連するガイド
関連リンク
テキスト
Wolfram Research (2018), SystemModelParametricSimulate, Wolfram言語関数, https://reference.wolfram.com/language/ref/SystemModelParametricSimulate.html (2022年に更新).
CMS
Wolfram Language. 2018. "SystemModelParametricSimulate." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/SystemModelParametricSimulate.html.
APA
Wolfram Language. (2018). SystemModelParametricSimulate. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SystemModelParametricSimulate.html
BibTeX
@misc{reference.wolfram_2026_systemmodelparametricsimulate, author="Wolfram Research", title="{SystemModelParametricSimulate}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/SystemModelParametricSimulate.html}", note=[Accessed: 03-December-2026]}
BibLaTeX
@online{reference.wolfram_2026_systemmodelparametricsimulate, organization={Wolfram Research}, title={SystemModelParametricSimulate}, year={2022}, url={https://reference.wolfram.com/language/ref/SystemModelParametricSimulate.html}, note=[Accessed: 03-December-2026]}