Modelica を使用して、時間連続信号と離散時間信号 x(t) の混合時間の最大値を決定する方法について質問があります。
y(t) = max{ x(s) with s in [startTime,t] }.
これは、Modelica バグ トラッカーで未解決の問題です ( https://trac.modelica.org/Modelica/ticket/109を参照)。
SimultionX 固有のソリューションを提供します。
Modelica を使用して、時間連続信号と離散時間信号 x(t) の混合時間の最大値を決定する方法について質問があります。
y(t) = max{ x(s) with s in [startTime,t] }.
これは、Modelica バグ トラッカーで未解決の問題です ( https://trac.modelica.org/Modelica/ticket/109を参照)。
SimultionX 固有のソリューションを提供します。
SimulationX はlast
、最後に受け入れられた引数の値を返す演算子によって Modelica を拡張します。イベント時点で、イベント反復の前に積分が停止した値を返します。-演算子を使用して、現在の値の最大値と最後の最大値last
を計算できます。x
次の作業例を参照してください。
model test "test.ism"
extends SimModel;
Real x=2*sin(2*pi*time)+sin(20*pi*time)+(if time < 0.5 then 0 else 3) "some input signal with jump";
Real y=if noEvent( time > time.start ) then max(x,last(y)) else x "Calculate the maximum with the help of the last-operator";
Real z(start=0,fixed=true)=-der(z)+y "Just any dymanics.";
end test;
入力信号x
と対応する出力信号y
を次の図に示します。