JP2011165052A - Simulation device and method - Google Patents
Simulation device and method Download PDFInfo
- Publication number
- JP2011165052A JP2011165052A JP2010028930A JP2010028930A JP2011165052A JP 2011165052 A JP2011165052 A JP 2011165052A JP 2010028930 A JP2010028930 A JP 2010028930A JP 2010028930 A JP2010028930 A JP 2010028930A JP 2011165052 A JP2011165052 A JP 2011165052A
- Authority
- JP
- Japan
- Prior art keywords
- function
- block
- control
- execution
- function block
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
Abstract
【課題】複数の関数から構成される制御プログラムをシミュレーションさせる装置において、ユーザービリティを向上させ、開発効率の向上を図ることの可能なシミュレーション装置を提供する。
【解決手段】制御プログラムの処理関数をブロックアイコンとして配置、結線して記述するシミュレーション装置であって、表示中の制御関数ブロックに含まれる内部関数の中から実行関数を前記ユーザに選択させるための関数選択欄を表示させる演算処理部を備え、実行関数の選択と連動して、その関数に対応するインターフェイスのポートを自動的に表示させる機能を備える。これにより、多数の関数ブロックを作成しなくても、1つのブロックにて複数の内部関数にアクセスでき、ブロックの管理を容易にすることができる。
【選択図】図1In a device for simulating a control program composed of a plurality of functions, a simulation device capable of improving usability and improving development efficiency is provided.
A simulation apparatus in which a processing function of a control program is arranged and connected as a block icon and is described so that the user can select an execution function from internal functions included in a control function block being displayed. An arithmetic processing unit for displaying a function selection field is provided, and a function for automatically displaying a port of an interface corresponding to the function in conjunction with selection of an execution function is provided. As a result, a plurality of internal functions can be accessed in one block without creating a large number of function blocks, and the management of the blocks can be facilitated.
[Selection] Figure 1
Description
本発明は、シミュレーション装置及び方法に関する。 The present invention relates to a simulation apparatus and method.
近年では、車両制御用ECU(Electric Control Unit)の開発において、ECUに実装すべき制御プログラムの複雑化に伴い、開発効率の向上が求められている。そこで、シミュレータ上で、ブロック図や状態遷移図などの制御モデルを作成して制御仕様の検証(シミュレーション)を行い、検証された制御モデルを基にECUに実装すべき制御プログラムのソースコードを自動生成して効率化を図るモデルベース開発が進められている。 In recent years, in the development of vehicle control ECUs (Electric Control Units), improvement in development efficiency has been demanded as control programs to be installed in ECUs become more complicated. Therefore, a control model such as a block diagram or state transition diagram is created on the simulator, and control specifications are verified (simulated). Based on the verified control model, the source code of the control program to be installed in the ECU is automatically Model-based development is underway to generate and improve efficiency.
モデルベース開発に用いられるシミュレータ(例えばMathworks社が提供しているMATLAB/Simulink(登録商標)など)には、各種機能を有するブロック要素が多数収められたブロックライブラリが用意されており、ユーザは、所望のブロック要素を選択してモデリングウインドウに移動させ、このモデリングウインドウ上で各ブロック要素を結線することで制御モデルを作成することができる。 A simulator used for model-based development (for example, MATLAB / Simulink (registered trademark) provided by Mathworks) has a block library containing a large number of block elements having various functions. A desired block element is selected and moved to the modeling window, and a control model can be created by connecting each block element on the modeling window.
新規に制御プログラムの開発を行う場合には、シミュレータ上で制御仕様に応じた制御モデルの作成を一から行い、モデルベース開発のプロセスを適用することが可能であるが、実際のECU開発では、既存の設計資産(例えば、既存のECUに実装された制御プログラムのソースコードであるC言語プログラム)を基に、機能の変更や追加を繰り返す差分開発の形態であることが多い。このような場合では、下記特許文献1に説明されているようなSILS(Software In the Loop Simulation)により、ECUに実装された既存の制御プログラムをシミュレータアプリケーションに組み込むことで、新規開発の制御モデルや制御対象モデルと結合してシミュレーションを実施するケースや、リバースモデリングにより置き換えたモデルと既存プログラムの演算値との一致性を確認するケース等がある。
When developing a new control program, it is possible to create a control model according to the control specifications on the simulator from scratch and apply the model-based development process, but in actual ECU development, In many cases, it is a form of differential development in which functions are changed and added repeatedly based on existing design assets (for example, a C language program which is a source code of a control program installed in an existing ECU). In such a case, the newly developed control model and the existing control program implemented in the ECU are incorporated into the simulator application by SILS (Software In the Loop Simulation) as described in
上記のようなECUに実装された制御プログラムをソフトウェアシミュレータで動作させるには、既存のソースコードであるC言語プログラムと、ユーザが作成したインターフェイスプログラム(C言語プログラムを構成する関数とシミュレータ間での値の受け渡しを実現するプログラム)とをシミュレータ用コンパイラを用いてコンパイルすることで、シミュレータが実行可能な関数ブロックを生成し、シミュレータアプリケーションと結合する方法などが採られている。 In order to operate a control program installed in the ECU as described above with a software simulator, an existing source code, a C language program, and an interface program created by the user (a function between the simulator and the functions constituting the C language program) A function block that can be executed by a simulator is generated by compiling a program that realizes value passing) using a simulator compiler, and is combined with a simulator application.
これにより、ユーザは、所望のブロック要素及び関数ブロックを選択してモデリングウインドウに移動させ、このモデリングウインドウ上で各ブロック要素と関数ブロックを結線することで、ECUの制御機能と合わせて、センサや機械的駆動部の機能も含む車両制御システム全体を模擬した制御システムモデルを作成することができるようになる。 As a result, the user selects a desired block element and function block, moves them to the modeling window, and connects each block element and function block on the modeling window, so that the sensor and the function block are combined with the control function of the ECU. A control system model simulating the entire vehicle control system including the function of the mechanical drive unit can be created.
ところで、一般的に、制御プログラムのソースコードであるC言語プログラムは、上位関数とこれに呼び出される下位関数とが入れ子状態で定義された関数コールツリー構造で表現することが可能である。従って、シミュレータ上でECU全体の機能を模擬する場合、C言語制御プログラムの最上位関数(最も外側で定義されている関数)に対応する関数をコールしてシミュレーションできれば良い。 By the way, in general, a C language program which is a source code of a control program can be expressed by a function call tree structure in which an upper function and a lower function called by the upper function are defined in a nested state. Therefore, when simulating the functions of the entire ECU on the simulator, it is only necessary to simulate by calling a function corresponding to the highest-order function (a function defined on the outermost side) of the C language control program.
一方、近年では、車両制御の複雑化に伴い、ソフトウェア規模が増大し、単体レベル、システムレベルといった具合に段階的にシミュレーションが行われている。例えば、単体レベルのシミュレーションとして、シミュレータ上において、C言語プログラムを構成する一部の関数に対応する関数ブロックと、その関数を基にユーザが既存のブロック要素を用いて作成した(リバースモデリングした)ブロック図モデルとに同一のテスト信号を入力し、両者から同一の出力信号が得られるか否かを確認することで、C言語プログラムのコンパイルによって得られた関数ブロックと、リバースモデリングによって得られたブロック図モデルとの一致性を検証するなどのケースがある。 On the other hand, in recent years, with the complexity of vehicle control, the software scale has increased, and simulations are performed in stages, such as a single level and a system level. For example, as a single-level simulation, a function block corresponding to a part of functions constituting a C language program is created on the simulator and a user uses an existing block element based on the function (reverse modeling). By inputting the same test signal to the block diagram model and confirming whether or not the same output signal can be obtained from both, the function block obtained by compiling the C language program and obtained by reverse modeling There are cases such as verifying the consistency with the block diagram model.
これに対して、C言語プログラムを構成する各関数に対応する関数ブロックを個別に作成しておき、必要に応じて検証対象関数に対応する関数ブロックを使用することも考えられるが、関数の数が多い場合、ユーザによる関数ブロックの作成作業が増え、さらに、ソースコードの変更に伴う関数ブロックの管理も複雑になるため、開発効率の低下につながる虞がある。 On the other hand, it is conceivable that function blocks corresponding to the respective functions constituting the C language program are individually created and the function blocks corresponding to the verification target function are used as necessary. If there are many, the creation work of the function block by the user increases, and further, the management of the function block accompanying the change of the source code becomes complicated, which may lead to a decrease in development efficiency.
本発明は、上述した事情に鑑みてなされたものであり、複数の関数から構成される制御プログラムをシミュレーションする際のユーザービリティを向上させ、開発効率の向上を図ることの可能なシミュレーション装置及び方法を提供することを目的とする。 The present invention has been made in view of the above-described circumstances, and is a simulation apparatus and method capable of improving usability and improving development efficiency when simulating a control program composed of a plurality of functions. The purpose is to provide.
上記目的を達成するために、本発明に係るシミュレーション装置は、制御プログラムの処理関数をブロックアイコンとして配置、結線して記述するシミュレーション装置であって、表示中の制御関数ブロックに含まれる内部関数の中から実行関数を前記ユーザに選択させるための関数選択欄を表示させる演算処理部を備えることを特徴とする。 In order to achieve the above object, a simulation apparatus according to the present invention is a simulation apparatus in which processing functions of a control program are arranged and connected as block icons and described, and the internal functions included in the control function block being displayed are described. An arithmetic processing unit is provided that displays a function selection field for allowing the user to select an execution function from the inside.
また、本発明に係るシミュレーション装置において、前記演算処理部は、前記関数選択欄を介して前記ユーザに選択された実行関数に応じて、前記制御関数ブロックのポート設定を自動的に行うことを特徴とする。
また、本発明に係るシミュレーション装置において、前記演算処理部は、前記ユーザによるブロック複製操作に応じて、同一の実行関数が選択された前記制御関数ブロックを複数複製した場合、当該複製した各制御関数ブロックをそれぞれ独立して演算可能なブロックとして取り扱うことを特徴とする。
In the simulation apparatus according to the present invention, the arithmetic processing unit automatically sets the port of the control function block according to the execution function selected by the user via the function selection field. And
Further, in the simulation apparatus according to the present invention, when the plurality of control function blocks having the same execution function selected are duplicated in response to the block duplication operation by the user, the arithmetic processing unit The block is handled as a block that can be calculated independently.
本発明では、表示中の制御関数ブロックに含まれる内部関数の中から実行関数を前記ユーザに選択させるための関数選択欄を表示させるため、ユーザは表示画面上にて自由に制御関数ブロックの実行関数(すなわち、検証対象関数)を選択することができるようになる。従って、本発明によれば、従来のように関数毎に関数ブロックを作成する必要がなくなり、関数ブロック作成作業が削減される。また、プログラムの変更に伴う関数の追加や削除の際に、関数ブロックの管理が単純化され、ユーザービリティを向上させることが可能であり、開発効率の向上を図ることが可能となる。 In the present invention, since the function selection column for allowing the user to select an execution function from the internal functions included in the displayed control function block is displayed, the user can freely execute the control function block on the display screen. A function (that is, a function to be verified) can be selected. Therefore, according to the present invention, there is no need to create a function block for each function as in the prior art, and function block creation work is reduced. In addition, when a function is added or deleted in accordance with a program change, the management of the function block is simplified, usability can be improved, and development efficiency can be improved.
以下、本発明の一実施形態について、図面を参照しながら説明する。
図1は、本実施形態におけるシミュレーション装置1のブロック構成図である。この図1に示すように、本実施形態におけるシミュレーション装置1は、例えば、車両制御用ECUに実装すべき制御プログラムのモデルベース開発に用いられるシミュレータが実装されたパーソナルコンピュータであり、操作入力装置10、表示装置20、記憶装置30及び演算処理装置40を備えている。なお、モデルベース開発用のシミュレータとしては、例えばMathworks社が提供しているMATLAB/Simulink(登録商標)などを使用することができる。
Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
FIG. 1 is a block configuration diagram of a
操作入力装置10は、例えばキーボードやマウス等のユーザインターフェイスから構成されており、ユーザによる操作入力に応じた信号(以下、操作入力信号と称す)を演算処理装置40に出力するものである。表示装置20は、例えば液晶ディスプレイ、或いは有機ELディスプレイ等であり、演算処理装置40から入力される画像信号に応じた画像を表示するものである。
The
記憶装置30は、例えばHDD(Hard Disk Drive)、或いはフラッシュメモリ等の書き換え可能な不揮発性の記憶媒体であり、OS(Operating System)プログラムやシミュレータ(MATLAB/Simulink(登録商標))としての機能をパーソナルコンピュータに実現させるシミュレータプログラム31を記憶している。また、この記憶装置30は、シミュレータプログラム31と共に、シミュレータとしての機能をパーソナルコンピュータに実現させるために必要な制御システムモデル32を記憶している。
The
この制御システムモデル32には、センサ、アクチュエータなどの制御対象ブロック32aと、制御機能を処理する関数ブロック32bが含まれる。この関数ブロック32bは、既存のソースコードであるC言語プログラムとインターフェイスプログラムとをシミュレータ用コンパイラを用いてコンパイルすることで生成されたDLL(Dynamic Linking Library)などを利用している。以下では、関数ブロック32bとして、5つの関数ブロックFB1、FB2、FB3、FB4、FB5が含まれているものと仮定する。
The
演算処理装置40(演算処理部)は、例えばCPU(Central Processing Unit)であり、操作入力装置10から入力される操作入力信号に応じて(ユーザによる操作入力に応じて)、記憶装置30に記憶されているシミュレータプログラム31を実行することにより、シミュレータとしての機能をパーソナルコンピュータ上で実現するものである。
The arithmetic processing device 40 (arithmetic processing unit) is, for example, a CPU (Central Processing Unit), and is stored in the
図2(a)は、関数ブロックFB1、FB2、FB3、FB4、FB5の元となったC言語プログラムの一例を示し、図2(b)は、C言語プログラムの視覚的な理解を容易とするために、図2(a)に示すC言語プログラムをブロック図で表したものである。これら図2(a)及び(b)に示すように、C言語プログラムは、最上位の関数「FuncA」と、この関数「FuncA」に呼び出される下位の関数「FuncB」及び「FuncC」と、関数「FuncC」に呼び出される最下位の関数「FuncC1」及び「FuncC2」から構成されている。 2A shows an example of a C language program that is the basis of the function blocks FB1, FB2, FB3, FB4, and FB5, and FIG. 2B facilitates visual understanding of the C language program. Therefore, the C language program shown in FIG. 2A is represented by a block diagram. As shown in FIGS. 2A and 2B, the C language program includes the highest-level function “FuncA”, lower-level functions “FuncB” and “FuncC” called by this function “FuncA”, It is composed of the lowest functions “FuncC1” and “FuncC2” called by “FuncC”.
つまり、関数ブロックFB1は、C言語プログラムを構成する最上位関数「FuncA」に対応する(言い換えれば実行関数を「FuncA」とする)関数ブロックであり、関数ブロックFB2は、C言語プログラムを構成する関数「FuncB」に対応する関数ブロックであり、関数ブロックFB3は、C言語プログラムを構成する関数「FuncC」に対応する関数ブロックであり、関数ブロックFB4は、C言語プログラムを構成する最下位関数「FuncC1」に対応する関数ブロックであり、また、関数ブロックFB5は、C言語プログラムを構成する最下位関数「FuncC2」に対応する関数ブロックである。 That is, the function block FB1 is a function block corresponding to the highest-level function “FuncA” constituting the C language program (in other words, the execution function is “FuncA”), and the function block FB2 constitutes the C language program. The function block FB3 is a function block corresponding to the function “FuncC”, the function block FB3 is a function block corresponding to the function “FuncC” constituting the C language program, and the function block FB4 is the lowest function “ Function block FB5 is a function block corresponding to the lowest function “FuncC2” constituting the C language program.
上述したように、関数ブロックFB1は、C言語プログラムを構成する最上位関数「FuncA」に対応する(言い換えれば実行関数を「FuncA」とする)関数ブロックであり、演算処理装置40は、実行関数「FuncA」が有する各変数のインターフェイス種別に応じて、モデリングウインドウMDW上で表示する関数ブロックFB1のポート設定を自動的に行う。 As described above, the function block FB1 is a function block corresponding to the top-level function “FuncA” constituting the C language program (in other words, the execution function is “FuncA”). Port setting of the function block FB1 displayed on the modeling window MDW is automatically performed according to the interface type of each variable included in “FuncA”.
関数ブロックFB1の実行関数「FuncA」は、入力変数として「Bin」及び「Cin」を有し、出力変数として「Cout」を有している。そのため、演算処理装置40は、関数ブロックFB1のポート設定として、図3(a)に示すように、入力変数「Bin」に対応する入力ポートPi1と、入力変数「Cin」に対応する入力ポートPi2と、出力変数「Cout」に対応する出力ポートPo1の設定を行う。
The execution function “FuncA” of the function block FB1 has “Bin” and “Cin” as input variables and “Cout” as output variables. Therefore, as shown in FIG. 3A, the
さらに、演算処理装置40は、図3(a)に示すように、モデリングウインドウMDW上にて表示中の関数ブロックFB1上に、当該関数ブロックFB1の実行関数をユーザに選択させるための関数選択ボックスSB(関数選択欄)を表示させる。この関数選択ボックスSBには、現在選択中の実行関数(つまり関数「FuncA」)が表示されており、演算処理装置40は、ユーザによって関数選択ボックスSBのカーソルがクリックされると(図3(a)参照)、選択可能な実行関数(つまり、関数「FuncB」、「FuncC」、「FuncC1」、「FuncC2」)の一覧を表示させる(図3(b)参照)。
Further, as shown in FIG. 3A, the
そして、演算処理装置40は、ユーザによって、例えば選択可能な実行関数の一覧から実行関数「FuncB」が選択されると、実行関数「FuncB」が有する各変数のインターフェイス種別に応じて、モデリングウインドウMDW上で表示する関数ブロックFB2のポート設定を自動的に行う。
When the execution function “FuncB” is selected from the list of selectable execution functions by the user, for example, the
関数ブロックFB2の実行関数「FuncB」は、入力変数として「Bin」を有し、出力変数として「Bout」を有し、モニタ変数(シミュレータ上で関数内部の演算値をモニタするための変数)として「Bmon」を有し、パラメータ変数(実行関数による演算実行中に固定値が設定される変数)として「P1」を有している。そのため、演算処理装置40は、関数ブロックFB2のポート設定として、図3(c)に示すように、入力変数「Bin」に対応する入力ポートPi3と、出力変数「Bout」に対応する出力ポートPo2と、モニタ変数「Bmon」に対応するモニタポートPm1と、パラメータ変数「P1」に対応するパラメータポートPp1の設定を行う。なお、この時、関数ブロックFB2上の関数選択ボックスSBには、現在選択中の実行関数「FuncB」が表示されることになる。
The execution function “FuncB” of the function block FB2 has “Bin” as an input variable, “Bout” as an output variable, and is used as a monitor variable (a variable for monitoring a calculation value inside the function on the simulator). “Bmon” and “P1” as a parameter variable (a variable in which a fixed value is set during execution of an execution function). Therefore, the
同様に、演算処理装置40は、関数ブロックFB2上の関数選択ボックスSBを介して、例えば実行関数「FuncC」が選択されると、実行関数「FuncC」が有する各変数のインターフェイス種別に応じて、モデリングウインドウMDW上で表示する関数ブロックFB3のポート設定を自動的に行う。
Similarly, when the execution function “FuncC” is selected, for example, via the function selection box SB on the function block FB2, the
関数ブロックFB3の実行関数「FuncC」は、入力変数として「Bout」及び「Cin」を有し、出力変数として「Cout」を有している。そのため、演算処理装置40は、関数ブロックFB3のポート設定として、図3(d)に示すように、入力変数「Bout」に対応する入力ポートPi4と、入力変数「Cin」に対応する入力ポートPi5と、出力変数「Cout」に対応する出力ポートPo3の設定を行う。なお、関数ブロックFB3上の関数選択ボックスSBには、現在選択中の実行関数「FuncC」が表示されることになる。
The execution function “FuncC” of the function block FB3 has “Bout” and “Cin” as input variables and “Cout” as output variables. Therefore, as shown in FIG. 3D, the
なお、図4に示すように、入力ポート及び出力ポートは変数毎にポートを作成する形態の他、複数の変数を1ポートにまとめたバス信号として扱うことも可能である。また、パラメータポート、モニターポートを省略し、シミュレータツール上で一括して取り扱う形態も可能である。さらに、各信号は論理値、物理値のいずれかの選択が可能である(図4参照)。モデリングウインドウMDW上で上記のように選択された関数ブロックと各汎用ブロックの結線処理を行うことで、ECUの機能だけでなく、センサや機械的駆動部の機能も含む車両制御システム全体を模擬した制御システムモデルを作成することが可能である。 As shown in FIG. 4, the input port and the output port can be handled as a bus signal in which a plurality of variables are combined into one port in addition to a mode in which a port is created for each variable. In addition, it is possible to omit the parameter port and the monitor port and handle them collectively on the simulator tool. Furthermore, each signal can be selected from either a logical value or a physical value (see FIG. 4). By connecting the function block selected as described above and each general-purpose block on the modeling window MDW, the entire vehicle control system including not only the function of the ECU but also the function of the sensor and the mechanical drive unit is simulated. It is possible to create a control system model.
以上説明したとおり、本実施形態におけるシミュレーション装置1では、モデリングウインドウMDW上にて表示中の関数ブロック上に、当該関数ブロックの実行関数をユーザに選択させるための関数選択ボックスSBを表示させるため、ユーザはモデリングウインドウMDW上にて自由に関数ブロックの実行関数(すなわち、検証対象関数)を選択することができるようになる。従って、従来のように関数毎に関数ブロックを作成する必要がなくなり、関数ブロック作成作業が削減でき、関数ブロックの管理が単純化されるため、ユーザービリティの向上及び開発効率の向上を図ることが可能となる。
As described above, in the
<変形例>
なお、本発明は上記実施形態に限定されず、以下のような変形例が挙げられる。
(1)上記実施形態では、モデリングウインドウMDW上に関数ブロックを1つだけ配置する場合を例示したが、この関数ブロックは汎用ブロックと同様に、ユーザによるブロック複製操作(例えばコピー操作)によって、複数複製することができる(図5参照)。ここで、モデリングウインドウMDW上において、ユーザによるブロック複製操作に応じて、同一の実行関数が選択された関数ブロックを複数複製した場合、当該複製した各関数ブロックをそれぞれ独立して演算可能なブロック(インスタンス)として取り扱う機能を演算処理装置40に設けることが望ましい。これにより、制御関数を複数個使用できるように拡張したい場合などに利便性を図ることが可能となる。なお、この機能は、複製した各関数ブロックに対して別個のメモリ領域を割り当てることで実現することができる。
<Modification>
In addition, this invention is not limited to the said embodiment, The following modifications are mentioned.
(1) Although the case where only one function block is arranged on the modeling window MDW has been exemplified in the above embodiment, a plurality of function blocks can be obtained by a block duplication operation (for example, a copy operation) by a user in the same manner as a general-purpose block. It can be duplicated (see FIG. 5). Here, in the modeling window MDW, when a plurality of function blocks having the same execution function selected are duplicated in accordance with a block duplication operation by the user, the duplicated function blocks can be independently calculated ( It is desirable to provide the
(2)上記実施形態では、車両用ECUに実装すべき制御プログラムのモデルベース開発に用いられるシミュレーション装置1を例示して説明したが、本発明は車両用の制御プログラムに限らず、様々な制御プログラムのモデルベース開発に用いられるシミュレーション装置に適用することができる。また、シミュレーション装置1に実装するモデルベース開発用のシミュレータとしては、MATLAB/Simulink(登録商標)以外のシミュレータを用いても良い。
(2) In the above embodiment, the
(3)上記実施形態では、モデリングウインドウMDWにて表示中の関数ブロック上に、当該関数ブロックの実行関数をユーザに選択させるための関数選択欄として、図3に示すような関数選択ボックスSBを表示させる場合を例示したが、例えば、実行関数名を直接入力するためのボックスや、或いはチェックボックスなどを関数選択欄として表示させるようにしても良い。 (3) In the above embodiment, the function selection box SB as shown in FIG. 3 is used as a function selection column for allowing the user to select an execution function of the function block on the function block being displayed in the modeling window MDW. For example, a box for directly inputting an execution function name or a check box may be displayed as a function selection column.
<適用例>
次に、既存の設計資産を利用した車両制御プログラムのモデルベース開発に対し、本実施形態におけるシミュレーション装置1を適用した一例について説明する。なお、以下では、図6に示すような車両に作用する加速度を検出するセンサ部100と、このセンサ部100によって検出された加速度を基に衝突判定を行い、その衝突判定結果に応じてエアバッグに点火信号を出力するエアバッグ制御用ECU200とから構成されたエアバッグ制御システムを想定し、このエアバッグ制御用ECU200に実装されたエアバッグ制御用プログラムのソースコード(C言語プログラム)を既存の設計資産として利用する場合を例示する。
<Application example>
Next, an example in which the
図6に示すように、本適用例のエアバッグ制御システムにおいて、センサ部100は、車両に作用する加速度を検出するサテライト加速度センサ101及びメイン加速度センサ102から構成されている。また、エアバッグ制御用ECU200は、LPF201、LPF202、セーフィング判定部203、中高速衝突判定部204、低速衝突判定部205、OR処理部206及びAND処理部207から構成されている。
As shown in FIG. 6, in the airbag control system of the application example, the
LPF201は、サテライト加速度センサ101から出力される加速度信号に含まれる高周波ノイズ成分を除去する。LPF202は、メイン加速度センサ102から出力される加速度信号に含まれる高周波ノイズ成分を除去する。セーフィング判定部203は、LPF201から出力される加速度信号の区間積分処理を行うと共に、区間積分値とセーフィング判定閾値とを比較することでセーフィング判定を行う。
The
中高速衝突判定部204は、LPF202から出力される加速度信号の区間積分処理を行うと共に、区間積分値と中高速衝突判定閾値とを比較することで衝突判定を行う。低速衝突判定部205は、LPF202から出力される加速度信号の累積積分処理を行うと共に、累積積分値と低速衝突判定閾値とを比較することで衝突判定を行う。OR処理部206は、中高速衝突判定部204及び低速衝突判定部205の衝突判定結果の論理和処理を行う。AND処理部207は、セーフィング判定部203のセーフィング判定結果とOR処理部206の論理和処理結果との論理積処理を行い、論理積処理結果をエアバッグ点火信号として出力する。
The medium / high speed
つまり、既存の設計資産として利用するC言語プログラムとは、上記のLPF201、LPF202、セーフィング判定部203、中高速衝突判定部204、低速衝突判定部205、OR処理部206及びAND処理部207の機能をエアバッグ制御用ECU200に実現させるためのプログラムである。
That is, the C language program used as an existing design asset includes the
図7に、上記C言語プログラムの記述例を示す。図7において、関数「CrashDetection」は、LPF201、LPF202、セーフィング判定部203、中高速衝突判定部204、低速衝突判定部205、OR処理部206及びAND処理部207の全ての機能を実現させるための最上位関数である。関数「SafingDetection」は、セーフィング判定部203の機能を実現させるための下位関数である。関数「MidSpeedDetection」は、中高速衝突判定部204の機能を実現させるための下位関数である。
FIG. 7 shows a description example of the C language program. In FIG. 7, the function “CrashDetection” is for realizing all the functions of the
関数「LowSpeedDetection」は、低速衝突判定部205の機能を実現させるための下位関数である。関数「SatelliteLPF」は、LPF201のの機能を実現させるための下位関数である。関数「MainLPF」は、LPF202のの機能を実現させるための下位関数である。なお、図7において、OR処理部206及びAND処理部207の機能を実現させるための下位関数の記述については省略している。
The function “LowSpeedDetection” is a subordinate function for realizing the function of the low-speed
このようなC言語プログラムをインターフェイスプログラムと共にシミュレータ用コンパイラを用いてコンパイルすることで、シミュレータ上で実行可能な関数ブロックを生成する。以下では、関数「CrashDetection」に対応する関数ブロック(言い換えれば、実行関数を「CrashDetection」とする関数ブロック)をFB10、関数「SafingDetection」に対応する関数ブロックをFB11、関数「MidSpeedDetection」に対応する関数ブロックをFB12、関数「LowSpeedDetection」に対応する関数ブロックをFB13、関数「SatelliteLPF」に対応する関数ブロックをFB14、関数「MainLPF」に対応する関数ブロックをFB15とする。 By compiling such a C language program together with the interface program using a simulator compiler, a function block that can be executed on the simulator is generated. In the following, a function block corresponding to the function “CrashDetection” (in other words, a function block whose execution function is “CrashDetection”) is FB10, a function block corresponding to the function “SaftingDetection” is FB11, and a function corresponding to the function “MidSpeedDetection”. The block is FB12, the function block corresponding to the function “LowSpeedDetection” is FB13, the function block corresponding to the function “SatliteLPF” is FB14, and the function block corresponding to the function “MainLPF” is FB15.
そして、ユーザは、図8に示すように、モデリングウインドウMDW上で関数ブロックFB10と、制御対象ブロックの一種であるセンサブロックB10及びB11とを結線することで、図6に示したエアバッグ制御システムを模擬した制御モデルを作成し、当該作成した制御モデルを用いてシミュレーションを行うことができる。なお、図8に示すように、関数ブロックFB10上の関数選択ボックスSBには、現在選択中の実行関数「CrashDetection」が表示されることになる。 Then, as shown in FIG. 8, the user connects the function block FB10 and the sensor blocks B10 and B11, which are a kind of control target blocks, on the modeling window MDW, thereby the airbag control system shown in FIG. Can be created, and a simulation can be performed using the created control model. As shown in FIG. 8, the currently selected execution function “CrashDetection” is displayed in the function selection box SB on the function block FB10.
さらに、図9に示すように、関数ブロックFB10上に表示される関数選択ボックスSBを利用して、関数ブロックFB10を、例えば関数「LowSpeedDetection」を実行関数とする関数ブロックFB13に置換し、この関数ブロックFB13と、その実行関数を基にユーザが既存の汎用ブロックを用いて作成した(リバースモデリングした)ブロック図モデル300とに同一のテスト信号を入力し、両者から同一の出力信号が得られるか否かを確認することで、C言語プログラムのコンパイルによって得られた関数ブロックFB13と、リバースモデリングによって得られたブロック図モデル300との一致性を検証することもできる。
Further, as shown in FIG. 9, by using a function selection box SB displayed on the function block FB10, the function block FB10 is replaced with, for example, a function block FB13 having a function “LowSpeedDetection” as an execution function. Can the same test signal be input to the block FB 13 and the
1…シミュレーション装置、10…操作入力装置、20…表示装置、30…記憶装置、31…シミュレータプログラム、32…制御システムモデル、32a…制御対象ブロック、32b…関数ブロック、40…演算処理装置(演算処理部)
DESCRIPTION OF
Claims (4)
表示中の制御関数ブロックに含まれる内部関数の中から実行関数を前記ユーザに選択させるための関数選択欄を表示させる演算処理部を備えることを特徴とするシミュレーション装置。 A simulation device in which processing functions of a control program are arranged and connected as block icons and described.
A simulation apparatus comprising: an arithmetic processing unit that displays a function selection field for allowing the user to select an execution function from internal functions included in a control function block being displayed.
表示中の制御関数ブロックに含まれる内部関数の中から実行関数を前記ユーザに選択させるための関数選択欄を表示させることを特徴とするシミュレーション方法。 A simulation method in which processing functions of a control program are arranged and connected as block icons and described.
A simulation method, comprising: displaying a function selection field for allowing the user to select an execution function from internal functions included in a control function block being displayed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010028930A JP2011165052A (en) | 2010-02-12 | 2010-02-12 | Simulation device and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010028930A JP2011165052A (en) | 2010-02-12 | 2010-02-12 | Simulation device and method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2011165052A true JP2011165052A (en) | 2011-08-25 |
Family
ID=44595638
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010028930A Pending JP2011165052A (en) | 2010-02-12 | 2010-02-12 | Simulation device and method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2011165052A (en) |
-
2010
- 2010-02-12 JP JP2010028930A patent/JP2011165052A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US12216886B2 (en) | User interface logical and execution view navigation and shifting | |
US11733669B2 (en) | Task based configuration presentation context | |
JP6220882B2 (en) | Self-test graphic component algorithm specifications | |
US7865350B1 (en) | Partitioning a model in modeling environments | |
US9152393B1 (en) | Dynamic entities for a model of a graphical modeling environment | |
US10318251B1 (en) | Code generation and simulation for graphical programming | |
US11775142B2 (en) | Preferential automation view curation | |
US9424005B1 (en) | Templatized component | |
JP4965634B2 (en) | SIMULATION SYSTEM OPERATION CONTROL METHOD, PROGRAM, AND SYSTEM | |
JP6567164B2 (en) | Virtual machine piping joint development system and joint development method | |
KR102023782B1 (en) | Computer-implemented method for defining initial conditions for dynamic simulation of an assembly of objects in a three-dimensional scene of a system of computer-aided design | |
JP2012208843A (en) | Development support device | |
CN106874562B (en) | Conversion system and method for converting architecture model into static calculation model | |
KR20140045101A (en) | Three-dimensional modeling method using parametric data | |
CN116070305A (en) | Digital twin modeling realization system, method and storage medium | |
US20120072820A1 (en) | Systems and Computer Program Products for Conducting Multi-Window Multi-Aspect Processing and Calculations | |
US10970183B1 (en) | System and method for improving model performance | |
US20190146457A1 (en) | System and method for finite element analysis of parts having variable spatial density graded regions produced via 3d printers | |
CN112016692A (en) | Display method and system for automatic modeling process of machine learning | |
US9378562B1 (en) | Management of variants in a graphical modeling environment | |
JP2011165052A (en) | Simulation device and method | |
US10969933B1 (en) | Graphical representation of ordered model items based on solver information | |
JP7233611B2 (en) | Manufacturing system design verification device | |
Lagartinho-Oliveira et al. | Integrated Development of Embedded Systems With Remote Graphical User Interfaces | |
Turner et al. | Simulating Interaction Sequences |