Main Content

複数の仕様に対する定常状態の操作点のバッチ計算

この例では、findop コマンドを使用して、複数の操作点の仕様に対し操作点を検出する方法を説明します。操作点を使用してモデルをバッチ線形化し、モデルの動作の変化を調べることができます。

findop を呼び出すたびに、ソフトウェアは Simulink モデルをコンパイルします。複数の仕様の操作点を検出するには、for ループ内で findop を繰り返し呼び出すのではなく、findop に操作点の仕様の配列を指定します。ソフトウェアはモデルのコンパイルを 1 回のみ実行して複数の操作点を計算します。これは特に、再コンパイルの繰り返しに時間がかかるモデルに効果的です。

Simulink モデルを開きます。

sys = 'scdspeed';
open_system(sys)

既定の操作点の仕様オブジェクトの配列を作成します。

opspec = operspec(sys,3);

rad/s to rpm ブロックへの出力が固定される定常状態の操作点を見つけるには、各操作点の仕様オブジェクトに既知の出力仕様を追加します。

opspec = addoutputspec(opspec,[sys '/rad//s to rpm'],1);
for i = 1:3
    opspec(i).Outputs(1).Known = true;
end

各操作点仕様について異なる既知の出力値を指定します。

opspec(1).Outputs(1).y = 1500;
opspec(2).Outputs(1).y = 2000;
opspec(3).Outputs(1).y = 2500;

あるいは、モデル線形化器を使用して操作点の仕様を構成し、その仕様を MATLAB ワークスペースにエクスポートすることもできます。詳細については、操作点探索に用いる仕様のインポートとエクスポートを参照してください。

3 つの出力仕様をそれぞれ満たす操作点を検出します。findop は、1 回のモデル コンパイルですべての操作点を計算します。

ops = findop(sys,opspec);
 Operating point search report 1:
---------------------------------

opreport = 


 Operating point search report for the Model scdspeed.
 (Time-Varying Components Evaluated at time t=0)

Operating point specifications were successfully met.
States: 
----------
   Min         x         Max       dxMin        dx       dxMax   
__________ __________ __________ __________ __________ __________
                                                                 
(1.) scdspeed/Throttle & Manifold/Intake Manifold/p0 = 0.543 bar
   -Inf     0.59562      Inf         0      3.4112e-09     0     
(2.) scdspeed/Vehicle Dynamics/w = T//J w0 = 209 rad//s
   -Inf     157.0796     Inf         0      -5.572e-07     0     

Inputs: 
----------
  Min      u      Max  
_______ _______ _______
                       
(1.) scdspeed/Throttle  perturbation
 -Inf   -1.6086   Inf  

Outputs: 
----------
Min   y   Max 
____ ____ ____
              
(1.) scdspeed/rad//s to rpm
1500 1500 1500

 Operating point search report 2:
---------------------------------

opreport = 


 Operating point search report for the Model scdspeed.
 (Time-Varying Components Evaluated at time t=0)

Operating point specifications were successfully met.
States: 
----------
    Min          x          Max        dxMin        dx         dxMax   
___________ ___________ ___________ ___________ ___________ ___________
                                                                       
(1.) scdspeed/Throttle & Manifold/Intake Manifold/p0 = 0.543 bar
   -Inf       0.54363       Inf          0      2.6649e-13       0     
(2.) scdspeed/Vehicle Dynamics/w = T//J w0 = 209 rad//s
   -Inf      209.4395       Inf          0      -8.4758e-12      0     

Inputs: 
----------
   Min        u        Max   
_________ _________ _________
                             
(1.) scdspeed/Throttle  perturbation
  -Inf    0.0038183    Inf   

Outputs: 
----------
Min   y   Max 
____ ____ ____
              
(1.) scdspeed/rad//s to rpm
2000 2000 2000

 Operating point search report 3:
---------------------------------

opreport = 


 Operating point search report for the Model scdspeed.
 (Time-Varying Components Evaluated at time t=0)

Operating point specifications were successfully met.
States: 
----------
    Min          x          Max        dxMin        dx         dxMax   
___________ ___________ ___________ ___________ ___________ ___________
                                                                       
(1.) scdspeed/Throttle & Manifold/Intake Manifold/p0 = 0.543 bar
   -Inf       0.51066       Inf          0      1.3297e-08       0     
(2.) scdspeed/Vehicle Dynamics/w = T//J w0 = 209 rad//s
   -Inf      261.7994       Inf          0      -7.8334e-08      0     

Inputs: 
----------
 Min     u     Max  
______ ______ ______
                    
(1.) scdspeed/Throttle  perturbation
 -Inf  1.4971  Inf  

Outputs: 
----------
Min   y   Max 
____ ____ ____
              
(1.) scdspeed/rad//s to rpm
2500 2500 2500

ops は、scdspeed モデルで opspec にある仕様に対応する操作点のベクトルです。各操作点の出力値は、対応する操作点の仕様で指定された既知の値に一致します。

参考

|

関連するトピック