Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP5460010B2 - Simulation method, system and program - Google Patents
[go: Go Back, main page]

JP5460010B2 - Simulation method, system and program - Google Patents

Simulation method, system and program Download PDF

Info

Publication number
JP5460010B2
JP5460010B2 JP2008253445A JP2008253445A JP5460010B2 JP 5460010 B2 JP5460010 B2 JP 5460010B2 JP 2008253445 A JP2008253445 A JP 2008253445A JP 2008253445 A JP2008253445 A JP 2008253445A JP 5460010 B2 JP5460010 B2 JP 5460010B2
Authority
JP
Japan
Prior art keywords
event
events
value
values
ecu
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.)
Expired - Fee Related
Application number
JP2008253445A
Other languages
Japanese (ja)
Other versions
JP2010086207A (en
Inventor
周一 清水
秀昭 小松
浩一 梶谷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
International Business Machines Corp
Original Assignee
International Business Machines Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by International Business Machines Corp filed Critical International Business Machines Corp
Priority to JP2008253445A priority Critical patent/JP5460010B2/en
Publication of JP2010086207A publication Critical patent/JP2010086207A/en
Application granted granted Critical
Publication of JP5460010B2 publication Critical patent/JP5460010B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Combined Controls Of Internal Combustion Engines (AREA)

Description

本発明は、自動車などに使用される電子制御ユニット(ECU)やエンジンなどのシミュレートョンに関し、より詳しくは、ソフトウェア・ベースでのシミュレーションに関するものである。   The present invention relates to simulation of an electronic control unit (ECU) and an engine used in an automobile or the like, and more particularly to software-based simulation.

自動車は、その初期の時代の20世紀初頭は、動力としてのエンジンと、ブレーキ、アクセル、ハンドル、トランスミッション、サスペンジョンを含む、機構部品からなっていたが、エンジンのプラグの点火、ヘッドライト以外は、電気的な仕組みはほとんど利用していなかった。   In the early twentieth century of the early era, automobiles consisted of mechanical parts including an engine as power and a brake, accelerator, steering wheel, transmission, and suspension. Except for the ignition of the engine plug and the headlight, Almost no electrical mechanism was used.

ところが、1970年代頃から、大気汚染、石油危機などに備えて、エンジンを効率的に制御する必要性が生じ、このためエンジンの制御に、ECUが使用されるようになってきた。ECUは、一般的に、センサからの入力信号を、例えばA/D変換する入力インターフェースと、決められた論理に従ってディジタル入力信号を処理する論理演算部(マイクロコンピュータ)と、その処理結果を、アクチュエータ作動信号に変換する出力インターフェースとから構成される。   However, since the 1970s, there has been a need to efficiently control the engine in preparation for air pollution, oil crisis, and the like, and thus ECUs have been used for engine control. The ECU generally includes an input interface for A / D conversion, for example, an input interface from a sensor, a logical operation unit (microcomputer) that processes a digital input signal in accordance with a predetermined logic, and the processing result as an actuator. And an output interface for converting into an operation signal.

いまや、エンジンやトランスミッションなどの制御システム、Anti-lock Breaking System (ABS)、Electronic Stability Control (ESC)、パワーステアリングだけでなく、ワイパー制御やセキュリティ・モニタリング・システムなどに至るまで、最近の自動車では、機構部品だけでなく、エレクトロニクス部品やソフトウエアが重要な比率を占める。後者に関する開発費は全体の25%とも40%とも言われ、ハイブリッド型の自動車では70%を占める。   Nowadays, in automobiles such as control systems such as engines and transmissions, Anti-lock Breaking System (ABS), Electronic Stability Control (ESC), power steering as well as wiper control and security monitoring system, Not only mechanical parts but also electronic parts and software account for an important proportion. The development cost for the latter is said to be 25% or 40% of the total, accounting for 70% for hybrid type vehicles.

電子制御は、ECUを複数、配置して行われる。ECU間は車載ネットワーク、例えば、Controller Area Network (CAN) で相互に接続される。また、制御の対象である、エンジンやトランスミッションなどには、それぞれのECUから直接ワイヤリングして接続する。   Electronic control is performed by arranging a plurality of ECUs. The ECUs are connected to each other via an in-vehicle network, for example, a controller area network (CAN). In addition, an engine, a transmission, or the like, which is a control target, is directly wired from each ECU and connected.

ECUは、小さなコンピュータであり、センサ入力などからの割り込みに応じて動作する。一方、エンジンなどは連続的に機械的動作を行っている。すなわち、コンピュータ系のディジタル・システムと、機械系の物理システムが、自動車という単一システムにおいて、並列に協調動作を行っている。当然、これを支えるソフトウエアは複雑さがますます増大しており、ECU単体で動作を検証するだけでなく、複数を同時に検証する仕組みの実現が急務である。   The ECU is a small computer and operates in response to an interrupt from a sensor input or the like. On the other hand, an engine or the like continuously performs a mechanical operation. That is, a computer-based digital system and a mechanical-system physical system perform a cooperative operation in parallel in a single system called an automobile. Naturally, the software that supports this is becoming increasingly complex, and it is urgent to implement a mechanism that not only verifies the operation of the ECU alone, but also verifies the plurality of ECUs.

ここで、ECUに信号を入力するセンサには、エンジンの温度などを計測する温度センサ、エンジンに吸入される圧力を推定するための圧力センサ、アクセスペダルの踏み量を測定するスロットル・ポジション・センサ、ステアリング舵角センサ、車高センサ、回転速度センサ、ノックセンサ、加速度センサ、流量センサ、酸素センサ、希薄空燃比センサなどがある。   Here, the sensor that inputs a signal to the ECU includes a temperature sensor that measures the temperature of the engine, a pressure sensor that estimates the pressure sucked into the engine, and a throttle position sensor that measures the amount of depression of the access pedal Steering angle sensor, vehicle height sensor, rotational speed sensor, knock sensor, acceleration sensor, flow sensor, oxygen sensor, lean air-fuel ratio sensor, and the like.

一方、ECUの出力信号によって駆動されるアクチュエータには、電磁ソレノイド及びモータ等がある。ソレノイドは例えば、エンジンのインジェクタ、トランスミッションのシフト・コントロール、ブレーキのバルブ制御、ドアロックなどに使用される。   On the other hand, the actuator driven by the output signal of the ECU includes an electromagnetic solenoid and a motor. Solenoids are used, for example, for engine injectors, transmission shift control, brake valve control, and door locks.

モータは、主としてサーボ機構として、エンジンのスタータ、エンジンのフューエル・コントロール、ブレーキの油圧ポンプ、舵角制御、ステアリング、ワイパ、パワーウインドウ、シートベルト、エアバックなどに使用される。   The motor is mainly used as a servo mechanism for an engine starter, engine fuel control, brake hydraulic pump, rudder angle control, steering, wiper, power window, seat belt, airbag, and the like.

このようなテストにために従来行われている技法として、HILS(Hardware In the Loop Simulation)がある。特に、自動車全体のECUをテストする環境は、フルビークルHILSと呼ばれる。フルビークルHILSにおいては、実験室内で、本物のECUが、エンジン、トランスミッション機構などをエミュレーションする専用のハードウェア装置に接続され、所定のシナリオに従って、テストが行われる。ECUからの出力は、監視用のコンピュータに入力され、さらにはディスプレイに表示されて、テスト担当者がディスプレイを眺めながら、異常動作がないかどうか、チェックする。   As a technique conventionally performed for such a test, there is HILS (Hardware In the Loop Simulation). In particular, the environment for testing the ECU of the entire vehicle is called full vehicle HILS. In the full vehicle HILS, a real ECU is connected to a dedicated hardware device that emulates an engine, a transmission mechanism, and the like in a laboratory, and a test is performed according to a predetermined scenario. The output from the ECU is input to a monitoring computer and further displayed on a display, and a tester checks whether there is an abnormal operation while looking at the display.

しかし、HILSは、専用のハードウェア装置を使い、それと本物のECUの間を物理的に配線しなくてはならないので、準備が大変である。また、別のECUに取り替えてのテストも、物理的に接続し直さなくてはならないので、手間がかかる。さらに、本物のECUを用いたテストであるため、テストに実時間を要する。従って、多くのシナリオをテストすると、膨大な時間がかかる。また、HILSのエミュレーション用のハードウェア装置は、一般に、非常に高価である。   However, HILS requires a dedicated hardware device and has to be physically wired between it and a real ECU, so preparation is difficult. In addition, the test after replacing with another ECU also takes time since it must be physically reconnected. Furthermore, since the test is performed using a real ECU, real time is required for the test. Therefore, testing many scenarios takes a huge amount of time. In addition, a hardware device for HILS emulation is generally very expensive.

そこで近年、高価なエミュレーション用ハードウェア装置を使うことなく、ソフトウェアで構成する手法が存在する。この手法は、SILS(Software In the Loop Simulation)と呼ばれ、ECUに搭載されるマイクロコンピュータ、入出力回路、制御のシナリオなどを全て、ソフトウェア・シミュレータで構成する技法である。これによれば、ECUのハードウェアが存在しなくても、テストを実行可能である。   Therefore, in recent years, there is a method of configuring with software without using an expensive emulation hardware device. This method is called SILS (Software In the Loop Simulation), and is a technique in which a microcomputer, an input / output circuit, a control scenario, etc. mounted on an ECU are all configured by a software simulator. According to this, the test can be executed without the ECU hardware.

ここで、ECUエミュレータと、物理装置シミュレータ、特にエンジン・シミュレータとが協働する例について説明する。なお、以下、便宜上、ECUエミュレータとエンジン・シミュレータではなく、実際のECUとエンジンの間の動作として説明する。先ず、クランクシャフトの回転にあわせてピストンが上死点に達する30度前のタイミングで、エンジンは、ECUに割り込みを引き起こす。その割り込みを受けたECUは、燃料噴射のタイミングを計算して、その時刻に噴射の指示を出す。それを受けたエンジンは、燃料を噴射して、引き続き、惰性で回転するクランクの動作を計算する。そして、ピストンが再び上死点の30度前に達したら、エンジンは、ECUに割り込みを引き起して、ECUに知らせる。すると、ECUは、点火のタイミングを計算して、その時刻にエンジンに指示を出す。これに応じて、エンジンは、シリンダー内の燃料を爆発させて、新たな回転の動作を計算し始める。このような動作が繰り返し行われる。   Here, an example in which an ECU emulator and a physical device simulator, particularly an engine simulator, cooperate will be described. Hereinafter, for the sake of convenience, the operation between the actual ECU and the engine will be described instead of the ECU emulator and the engine simulator. First, at a timing 30 degrees before the piston reaches top dead center in accordance with the rotation of the crankshaft, the engine interrupts the ECU. The ECU that has received the interrupt calculates the fuel injection timing and issues an injection instruction at that time. The engine receiving it injects fuel and then calculates the operation of the crank that rotates by inertia. When the piston reaches 30 degrees before the top dead center again, the engine causes an interruption to the ECU and notifies the ECU. Then, the ECU calculates the ignition timing and issues an instruction to the engine at that time. In response, the engine explodes the fuel in the cylinder and begins calculating a new rotation action. Such an operation is repeated.

このように、エンジンとECUが交互に動く動作は、クリティカル・パスとして捉えられる。従って、自動車の離散イベントを並列にシミュレーションする場合には、このようなクリティカル・パスの存在によって、計算性能の観点からみて、並列性を十分に発揮しえない。従って、マルチプロセッサ・システムのコンピュータを用いたフルビークルHILSにおいて、複数のECUエミュレータにそれぞれ、個別のCPUを割り当てたとしても、最悪の場合、1個のCPUで、複数のECUエミュレータ及びエンジン・エミュレータをシリアルに計算する程度の性能しかでないことがある。   Thus, the operation in which the engine and the ECU move alternately is regarded as a critical path. Therefore, when simulating discrete events of an automobile in parallel, due to the presence of such a critical path, the parallelism cannot be sufficiently exhibited from the viewpoint of calculation performance. Therefore, even in the full vehicle HILS using a computer of a multiprocessor system, even if individual CPUs are assigned to a plurality of ECU emulators, in the worst case, a plurality of ECU emulators and engine emulators can be obtained with one CPU. May only be of a performance that can be calculated serially.

複数の論理プロセスを並列に矛盾なく動作させるための、もっとも簡単な方法は、全体の号令にあわせて各論理プロセスを動作させることである。しかし、この方法では、割り込みなどのイベントが発生しない時刻でもすべて同期処理を行う必要があるため、処理の負荷が大きく、また、処理が遅くなる。   The simplest method for operating a plurality of logical processes in parallel without contradiction is to operate each logical process in accordance with the entire command. However, in this method, since it is necessary to perform all synchronous processing even at the time when an event such as an interrupt does not occur, the processing load is large and the processing is slow.

複数の論理プロセスを非同期的に並列に動作させる、離散イベントのシミュレーションでは、プロセス間の通信は、タイム・スタンプの付いたイベントを、メッセージとして送受信することによって行われる。このとき、タイム・スタンプは、シミュレーション・システム全体で共通の時刻が記録される。このような時刻をシミュレーション時計と呼ぶことにすると、シミュレーション時計のどの時点で処理を行うかは、各論理プロセスで独立で、必ずしも一致する必要はない。但し、各論理プロセスが協働して処理を行う場合は、必ずタイム・スタンプの順序で行う必要がある。そのように処理を進める限り、全体をシリアルに処理する場合と同じように処理を進めることができる。   In the simulation of discrete events in which a plurality of logical processes are asynchronously operated in parallel, communication between processes is performed by transmitting and receiving time-stamped events as messages. At this time, the time stamp records a common time in the entire simulation system. If such a time is called a simulation clock, the timing at which the simulation clock is processed is independent in each logical process and does not necessarily have to coincide. However, when the logical processes cooperate to perform processing, it is necessary to always perform them in the order of time stamps. As long as the process proceeds in this way, the process can proceed in the same way as when the entire process is processed serially.

非同期処理の1つに、保守的同期(conservative synchronization)がある。この方法では、必ず、タイム・スタンプの古い順位のイベントを処理する。   One asynchronous process is conservative synchronization. This method always handles events with the oldest time stamp.

保守的同期の例を説明すると、ある論理プロセスに、2つの上流プロセスからのキューがあり、その一方に、時間t1をもつイベントと、時間t2をもつイベントが届いているとする。時間t1の方が時間t2よりも古いとする。また、他方のキューには何も届いていないとする。すると、その論理プロセスは、時間t1をもつイベントから順に処理していけばよさそうなものだが、時間t1よりも古い時間をもつイベントが上流から、他方のキューに届く可能性があり、すなわち、時間t1が最古であることが保証されないため、処理を進めることができない。特に、論理プロセス間に送受信のループがある構成では、このような構成ではデッドロックを引き起こすことがある。 To explain an example of conservative synchronization, assume that a logical process has queues from two upstream processes, and an event having a time t 1 and an event having a time t 2 have arrived at one of the queues. Assume that time t 1 is older than time t 2 . Also assume that nothing has arrived in the other queue. Then, the logical process is likely to be processed in order from the event with time t 1 , but an event with a time older than time t 1 may reach the other queue from upstream, That is, since it is not guaranteed that the time t 1 is the oldest, the process cannot proceed. In particular, in a configuration where there is a transmission / reception loop between logical processes, such a configuration may cause a deadlock.

このような状況を回避するために、空メッセージ(null message)を利用した方法が知られている。この方法では、上流の論理プロセスが、ある時刻まではイベントを発生することがないことを示すために、その時刻をもつ空メッセージを、下流の論理プロセスに送る。そのような時刻は、タイム・スタンプ上の下位境界(lower bound on the timestamp:LBTS)と呼ばれる。このような空メッセージを受け取った下流の論理プロセスは、届いているイベントのタイムスタンプと、そのLBTSとを比較し、それより古いタイム・スタンプのイベントを確定とみなして処理することができる。   In order to avoid such a situation, a method using a null message is known. In this method, an upstream message with that time is sent to the downstream logical process to indicate that the upstream logical process will not generate an event until a certain time. Such a time is called the lower bound on the timestamp (LBTS). A downstream logical process that receives such an empty message compares the time stamp of the event that has arrived with its LBTS, and can process an event with an older time stamp as definite.

空メッセージを利用しない方法として、楽観的同期(optimistic synchronization)と呼ばれる手法が考え出された。この方法では、ある論理プロセスに、2つの上流プロセスからのキューがあり、時間t1をもつイベントと、時間t2をもつイベントが届いていて、時間t1の方が時間t2よりも古いとするとき、且つ他方のキューに何も届いていないときに、とりあえず時間t1をもつイベントを最も古いと仮定して処理を進める。その後で、時間t1よりも古い時刻をもつイベントが他方のキューに届いたら、先の時間t1のイベントを発端とする一連の処理を、遡及メッセージ(reverse message)を送ることによって順に取り消してから、新たに、時間t1よりも古い時刻をもつイベントを処理する。この方法では、論理プロセスから出力されるイベントは、一時的に必ずしもタイム・スタンプどおりではないが、ロールバックにより、最終的には、タイム・スタンプどおりになることが保証される。 A method called optimistic synchronization has been devised as a method not using empty messages. In this method, a logical process has queues from two upstream processes, an event with time t 1 and an event with time t 2 have arrived, and time t 1 is older than time t 2 And when nothing has arrived in the other queue, the processing is performed assuming that the event having time t 1 is the oldest for the time being. After that, when an event with a time older than time t 1 arrives in the other queue, a series of processing starting from the event at the previous time t 1 is canceled in order by sending a retroactive message (reverse message). Then, a new event having a time older than time t 1 is processed. In this method, the event output from the logical process is not necessarily temporarily in accordance with the time stamp, but rollback ensures that the event is finally in accordance with the time stamp.

このような方法で、デッドロックを回避しつつ、正しい順序でイベントが送り出されるようにすることができる。しかし、このような方法では、依然として処理の直列化は回避できず、よって処理はやはり、高速化できない。   In this way, events can be sent out in the correct order while avoiding deadlocks. However, with such a method, serialization of processes cannot be avoided, and thus the process cannot be accelerated.

特開平6−161987号公報は、ECUハードウェアを擬似的に実現して、ソフトウェアによる実機評価を可能ならしめることを目的とするものであって、マトリックス・スイッチを切り替えることによって、所望の機能のハードウェアをシミュレートすることを開示する。   Japanese Patent Laid-Open No. 6-161987 is intended to simulate ECU hardware and enable real machine evaluation by software. By switching matrix switches, a desired function can be obtained. Disclose to simulate hardware.

特開平11−14507号公報は、車両全体のロジックを机上で検証できるようにすることを課題とするものであり、エンジン制御模擬装置(ECU)と、車両制御模擬装置からなる車両シミュレーション装置を開示する。ECUは、エンジンモデルの制御パラメータを演算し、その演算結果を車両制御模擬装置に送信する。車両制御模擬装置は、ECUから送られてくる制御パラメータを用いて車両モデルの各部の状態量を演算してその演算結果をECUに返送する。車両モデルは、ドライバモデル、吸気系モデル、燃料系モデル、燃焼系モデル、エンジン温推定モデル、駆動系モデル、触媒モデル、A/Fセンサモデル、リアO2 センサモデルから構成されている。ドライバモデルは、目標車速の変化パターンを入力する車速パターン入力手段を有する。 Japanese Patent Application Laid-Open No. 11-14507 discloses a vehicle simulation apparatus that includes an engine control simulation device (ECU) and a vehicle control simulation device. To do. The ECU calculates the control parameter of the engine model and transmits the calculation result to the vehicle control simulation device. The vehicle control simulation device calculates a state quantity of each part of the vehicle model using control parameters sent from the ECU, and returns the calculation result to the ECU. The vehicle model includes a driver model, an intake system model, a fuel system model, a combustion system model, an engine temperature estimation model, a drive system model, a catalyst model, an A / F sensor model, and a rear O 2 sensor model. The driver model has vehicle speed pattern input means for inputting a change pattern of the target vehicle speed.

しかし、これらの文献には、論理プロセス間で同期をとる技術には言及はない。そこで、本願発明者らは、2008年6月18日に出願した特願2008−158995号特許出願において、各ECUエミュレータを、投機的にエミュレートする技法を提示した。すなわち、その発明によれば、クリティカル・パスを作らずに、各論理プロセスをできるだけ並列に実行させるために、ECUエミュレータや各物理装置シミュレータなどの各論理プロセスにおいて、入力イベントが届いていない場合でも、入力を予測して処理が進められる。このような投機的実行により、他の論理プロセスの出力を待つことなく、先行して処理を行うことにより、処理の並列性が高められる。そうして、もし遅れて受信する実際の入力と、予測して投機実行したときの入力が一致していない場合には、投機実行が失敗だったとして、その前の時刻に状態が戻され、その実際の入力に基づき、処理が再実行される。   However, these documents do not mention a technique for synchronizing logical processes. Accordingly, the inventors of the present application presented a technique for speculatively emulating each ECU emulator in the Japanese Patent Application No. 2008-158995 filed on June 18, 2008. That is, according to the invention, in order to execute each logical process in parallel as much as possible without creating a critical path, even if an input event does not arrive in each logical process such as an ECU emulator or each physical device simulator. The process proceeds by predicting the input. By such speculative execution, processing parallelism is improved by performing processing in advance without waiting for the output of another logical process. So, if the actual input received late and the input when speculative execution was predicted do not match, the speculation execution failed and the status is returned to the previous time, The process is re-executed based on the actual input.

特開平6−161987号公報JP-A-6-161987 特開平11−14507号公報Japanese Patent Laid-Open No. 11-14507 特願2008−158995号明細書Japanese Patent Application No. 2008-158995

特願2008−158995号明細書に記述された技法によれば、フルビークルSILSで、動作の直列性に拘束されることなく、投機的に高速にシミュレーションを行うことが可能となった。   According to the technique described in the specification of Japanese Patent Application No. 2008-158995, it has become possible to perform simulation speculatively at high speed without being constrained by the seriality of operations in the full vehicle SILS.

しかし、依然として、投機が失敗した場合は、新規入来イベントの時点までロールバックする必要があった。   However, if the speculation still failed, it was necessary to roll back to the time of the new incoming event.

従って、本発明の目的は、投機が失敗しても、新規入来イベントまでロールバックする必要のないシミュレーション技法を提供することにある。   Accordingly, it is an object of the present invention to provide a simulation technique that does not need to roll back to a new incoming event even if speculation fails.

本発明の他の目的は、新規入来イベントまでロールバックしない場合の誤差の累積を回避することができるシミュレーション技法を提供することにある。   Another object of the present invention is to provide a simulation technique capable of avoiding error accumulation when not rolling back until a new incoming event.

本発明の実施のために、必須ではないが、好適にはマルチCPUのワークステーションが用意される。また、各ECUのソフトウェア・エミュレータが用意される。一般的には、ECUのソフトウェア・エミュレータは、そのECUのメーカから入手可能である。   For implementing the present invention, a multi-CPU workstation is preferably provided, although it is not essential. In addition, a software emulator for each ECU is prepared. In general, an ECU software emulator is available from the ECU manufacturer.

各ECUのソフトウェア・エミュレータは、好適には、マルチCPUのワークステーション上で走るように、ワークステーションのオペレーティング・システムの所定のレイヤとインターフェースする。各ECUのソフトウェア・エミュレータには、好適には、マルチCPUのうちの各々のCPUが割り当てられ、以って、各CPUによって、各ECUエミュレータは独立に動作可能である。ECUの数よりもCPUの数が少ない場合は、1つのCPUに、複数のECUエミュレータが割り当てられる。いずれにしても、オペレーティング・システムは、各ECUエミュレータ毎に1つのプロセスを割り当て、以って、各ECUエミュレータは、固有の異なるクロックで動作しているように、エミュレーションを行うことができる。すなわち、各ECUエミュレータは、異種ECUであってよい。   Each ECU's software emulator preferably interfaces with a predetermined layer of the workstation's operating system to run on a multi-CPU workstation. Preferably, each of the multi-CPUs is assigned to a software emulator of each ECU, so that each ECU emulator can operate independently by each CPU. When the number of CPUs is smaller than the number of ECUs, a plurality of ECU emulators are assigned to one CPU. In any case, the operating system allocates one process for each ECU emulator, so that each ECU emulator can perform emulation so that it operates with a different clock. That is, each ECU emulator may be a heterogeneous ECU.

各ECUエミュレータには、ワークステーションのメモリの一部が、内部処理用のプライベート・メモリとして割り当てられる。さらに、ECUエミュレータは、ワークステーションの共用メモリとして割り当てられた箇所にもアクセス可能であり、この共用メモリを介して、各ECUエミュレータは、互いにデータをやりとりしたり、同期したり、通信したりすることが可能である。あるいは、ECUエミュレータは、CAN(controller area network)エミュレータで接続してもよい。   A part of the memory of the workstation is allocated to each ECU emulator as a private memory for internal processing. Furthermore, the ECU emulator can also access a portion allocated as a shared memory of the workstation, and through this shared memory, each ECU emulator exchanges data, synchronizes, and communicates with each other. It is possible. Alternatively, the ECU emulator may be connected by a CAN (controller area network) emulator.

これらのECUエミュレータから入力を受け取る、エンジン・シミュレータ、トランスミッション・シミュレータなどの、物理装置シミュレータが用意され、やはりワークステーションの共用メモリ、またはCAN(controller area network)エミュレータで、ECUエミュレータと接続される。   Physical device simulators such as engine simulators and transmission simulators that receive inputs from these ECU emulators are prepared, and are also connected to the ECU emulators using a shared memory of a workstation or a CAN (controller area network) emulator.

ここで、ECUエミュレータと、物理装置シミュレータを、統一的に論理プロセスと呼ぶことにすると、本発明によれば、論理プロセスに、今までに入来した複数のイベントの値から、未来のイベントの値を複数予測する予測モジュールが設けられる。予測モジュールは、好適には線形予測の技法により、過去の複数のイベントの値から、未来の複数のイベントの値を予測し、次に新たなイベントが入来するまでは、この予測したイベントの値に基づき先行投機する。   Here, if the ECU emulator and the physical device simulator are collectively referred to as a logical process, according to the present invention, from the values of a plurality of events that have entered the logical process, A prediction module for predicting a plurality of values is provided. The prediction module predicts the values of multiple future events from the values of multiple past events, preferably using linear prediction techniques, until the next event arrives. Speculative speculation based on the value.

次に新たなイベントが入来することに応答して、予測モジュールは、その新たなイベントと過去の入来イベントを併せて、未来の複数のイベントの値を予測し直す。すると、今回新しく予測したイベントの複数の値と、前回予測したイベントの複数の値との間には、誤差が生じる。そこで、予測モジュールは、今回新しく予測したイベントの複数の値と、前回予測した複数のイベントの値との間の誤差の累積和(累積誤差)をとり、その累積和が所定の閾値内に収まるイベントの数(ステップ数)を計算する。   Next, in response to the arrival of a new event, the prediction module re-predicts the values of a plurality of future events by combining the new event and the past incoming event. Then, an error occurs between a plurality of values of the event newly predicted this time and a plurality of values of the event predicted last time. Therefore, the prediction module calculates a cumulative sum (cumulative error) of errors between a plurality of newly predicted event values and a previously predicted plurality of event values, and the cumulative sum falls within a predetermined threshold. Calculate the number of events (number of steps).

そのようなステップ数をmとし、現在の時間に対応するステップをnとすると、予測モジュールは、好適には(n+m)まで先行投機をロールバックし、上記累積誤差を、好適にはステップn+2mに対応する時刻まで分散させて調整する。より具体的には例えば、今回新しく予測したイベントの複数の値から小分けにして差し引き、その差し引かれた差の和が、ステップ(n+m)から、例えばステップ(n+2m)までで、上記累積誤差と等しくなるようにする。   If the number of such steps is m and the step corresponding to the current time is n, the prediction module preferably rolls back the preceding speculation to (n + m), and the accumulated error is preferably stepped. Disperse and adjust until the time corresponding to n + 2m. More specifically, for example, subtracting from a plurality of values of the newly predicted event this time, the sum of the subtracted differences is from step (n + m) to step (n + 2m), for example, It should be equal to the cumulative error.

予測モジュールは、このように更新された予測したイベントの複数の値で、ステップ(n+m)から新たに先行投機するように、論理プロセスのローカル・スケジューラに指示する。   The prediction module instructs the local scheduler of the logical process to newly pre-specify from step (n + m) with the multiple values of the predicted event thus updated.

この発明によれば、フルビークルSILSなどのシミュレーション・システムにおいて、新たな入来イベントに応答して、イベントの列を予測し直す予測モジュールを論理プロセスに設け、その予測し直しの誤差に応じて、入来イベントの時点まで戻らず途中までのロールバックで済むようにしたので、シミュレーション・システムの速度を向上させることができる。また、予測し直しの累積誤差は、その後の先行投機し直しの間に解消するようにしたので、誤差の蓄積が生じない、高い精度のシミュレーション・システムが得られる。   According to the present invention, in a simulation system such as a full vehicle SILS, a prediction module that re-predicts a sequence of events in response to a new incoming event is provided in the logical process, and according to the error of the re-prediction Since it is possible to roll back halfway without returning to the time of the incoming event, the speed of the simulation system can be improved. In addition, since the re-predicted accumulated error is eliminated during the subsequent preceding speculation, a highly accurate simulation system in which no error accumulation occurs can be obtained.

以下、図面を参照して、本発明の一実施例の構成及び処理を説明する。以下の記述では、特に断わらない限り、図面に亘って、同一の要素は同一の符号で参照されるものとする。なお、ここで説明する構成と処理は、一実施例として説明するものであり、本発明の技術的範囲をこの実施例に限定して解釈する意図はないことを理解されたい。   The configuration and processing of an embodiment of the present invention will be described below with reference to the drawings. In the following description, the same elements are referred to by the same reference numerals throughout the drawings unless otherwise specified. It should be understood that the configuration and processing described here are described as an example, and the technical scope of the present invention is not intended to be limited to this example.

本発明を実現するための構成を説明する前に、その前提として、ECUについて説明する。ECUは、一般的に、センサからの入力信号を、例えばA/D変換する入力インターフェースと、決められた論理に従ってディジタル入力信号を処理する論理演算部(マイクロコンピュータ)と、その処理結果を、アクチュエータ作動信号に変換する出力インターフェースとから構成されるものである。   Before describing the configuration for realizing the present invention, the ECU will be described as a premise thereof. The ECU generally includes an input interface for A / D conversion, for example, an input interface from a sensor, a logical operation unit (microcomputer) that processes a digital input signal in accordance with a predetermined logic, and the processing result as an actuator. And an output interface for converting into an operation signal.

この発明は、説明の便宜上、以下では、自動車のECUに関連して説明するが、それには限定されず、航空機、ロボットなどその他のECUをもつメカトロニクス機構全般に適用可能であることを理解されたい。   For convenience of explanation, the present invention will be described below in connection with an ECU of an automobile. However, the present invention is not limited thereto, and it should be understood that the present invention can be applied to general mechatronic mechanisms having other ECUs such as an aircraft and a robot. .

ECUは、周辺や環境状態、エンジンなどの駆動機構の状態、及び人間による指示操作の内容をセンサで検出して、信号として入力する。具体的には、水温センサ、吸気温センサ、過給圧センサ、ポンプ角センサ、クランク角センサ、車速センサ、アクセル位置センサ、A/Tシフト・ポジション、スタータ・スイッチ、エアコンECUなどからの信号がある。   The ECU detects the surroundings, the environmental state, the state of the driving mechanism such as the engine, and the content of the instruction operation by a human with a sensor and inputs it as a signal. Specifically, signals from a water temperature sensor, intake air temperature sensor, boost pressure sensor, pump angle sensor, crank angle sensor, vehicle speed sensor, accelerator position sensor, A / T shift position, starter switch, air conditioner ECU, etc. is there.

ECUは、これらの信号を入力して、電磁スピル弁、フュエル・カット・ソレノイド、タイミング・コントロール・バルブ、吸気絞りVSV、グロー・プラグ・リレー、タコメータ及びエアコン・リレーなどを駆動する信号を出力しする。   The ECU inputs these signals and outputs signals for driving electromagnetic spill valves, fuel cut solenoids, timing control valves, intake throttle VSV, glow plug relays, tachometers, air conditioner relays, etc. To do.

1つのECUが複数の異なる機構を制御するための駆動信号を出力するようにすることは不可能ではないが、例えば、エンジンとエアコンのように、応答性やその制御の厳密性が異なるものを単一のECUで制御することは合理的でなく、従って、一般的に自動車にECUは複数個設けられる。   Although it is not impossible for one ECU to output drive signals for controlling a plurality of different mechanisms, for example, an engine and an air conditioner that have different responsiveness and strict control. It is not rational to control with a single ECU. Therefore, in general, a plurality of ECUs are provided in an automobile.

図1は、ECUの典型的な制御である、フィードバック閉ループ系の例を示す図である。すなわち、図1において、ある目標の信号が、ECUであるコントローラ102に入力され、ECUは、目標の信号を内部処理することによって、駆動信号を出力し、制御対象モデルである、エンジンなどのプラント104を駆動し、プラント104の出力は、センサ106を介して、コントローラ102の入力にフィードバックされる。   FIG. 1 is a diagram illustrating an example of a feedback closed loop system that is a typical control of the ECU. That is, in FIG. 1, a target signal is input to a controller 102 that is an ECU, and the ECU internally processes the target signal to output a drive signal, which is a model to be controlled, such as a plant such as an engine. The output of the plant 104 is fed back to the input of the controller 102 via the sensor 106.

ここで目標信号として与えられるのは、例えば、スロットル開度、アイドル・コントロール、ブレーキ力、シフト、スタータON・OFF、バッテリ電圧、インジェクション通電時間、インジェクション通電回数、デポジット、ドウェル角、進角値、吸気完了フラグ、点火完了フラグ、大気圧、車両重量、転がり抵抗係数、道路勾配、粘着係数、吸気温、などのパラメータである。   The target signal given here is, for example, throttle opening, idle control, brake force, shift, starter ON / OFF, battery voltage, injection energization time, number of times of injection energization, deposit, dwell angle, advance value, The parameters are an intake completion flag, ignition completion flag, atmospheric pressure, vehicle weight, rolling resistance coefficient, road gradient, adhesion coefficient, intake air temperature, and the like.

また、センサ信号としてフィードバックされるのは、スロットル開度、吸気圧力、吸入空気量、シフト、エンジン回転数、車速、排気温、O、冷却水温、空燃比、ノック、点火異常、などである。 Also, feedback of sensor signals includes throttle opening, intake pressure, intake air amount, shift, engine speed, vehicle speed, exhaust temperature, O 2 , cooling water temperature, air-fuel ratio, knock, ignition abnormality, etc. .

ECUが制御する対象は、ニュートンの力学方程式で解かれる、機構系システムであったり、電気回路の応答方程式で解かれる、電気駆動回路であったり、それらの組み合わせであったりする。これらは、基本的に微分方程式であり、制御工学によれば、ラプラス変換によって応答関数に変換されて、記述することができる。   An object controlled by the ECU is a mechanical system solved by Newton's dynamic equation, an electric drive circuit solved by a response equation of an electric circuit, or a combination thereof. These are basically differential equations and can be described by being converted into a response function by Laplace transform according to control engineering.

図2は、そのような応答関数による記述の例である。図2で破線202で囲った箇所が、図1のコントローラ102に対応し、破線204で囲った箇所が、図1の制御対象モデル104に対応し、センサ106が、ブロック206に対応する。なお、図2は、応答関数による表現の一例であって、特に本発明を限定する意図はないことを理解されたい。   FIG. 2 is an example of such a response function description. 2 corresponds to the controller 102 in FIG. 1, the portion surrounded by the broken line 204 corresponds to the control target model 104 in FIG. 1, and the sensor 106 corresponds to the block 206. Note that FIG. 2 is an example of expression by a response function, and it should be understood that the present invention is not particularly limited.

さて、例えば、ECUが制御する対象が、ニュートンの力学方程式で解かれる、機構系システムであるとする。すると、ある時点のECUの制御出力は、その機構系システムの可動部分の位置及び速度という内部状態変数をもち、その時点の入力だけでは決まらない。そのことは、電気回路にもあてはまり、電気回路のキャパシタに残っている電荷の量や、コイルのインダクタンスによる磁力などの内部状態変数が、やはり存在する。   Now, for example, it is assumed that an object controlled by the ECU is a mechanical system that is solved by Newton's dynamic equation. Then, the control output of the ECU at a certain time has internal state variables such as the position and speed of the movable part of the mechanical system, and is not determined only by the input at that time. This also applies to the electric circuit, and there are still internal state variables such as the amount of charge remaining in the capacitor of the electric circuit and the magnetic force due to the inductance of the coil.

従って、ECUは、図3に示すように、入力uに対して、その内部状態xを勘案した値yを出力することになる。   Accordingly, as shown in FIG. 3, the ECU outputs a value y that takes into account the internal state x with respect to the input u.

さて、前述したSILSのようなテストの目的で、自動車部品メーカーは、自社が提供する機器のECUのソフトウェア・エミュレータを提供する。すなわち、図2に示すような機能を、アセンブラまたはCなどの言語が書かれたコードをアセンブリまたはコンパイルした実行可能プログラムにより、純粋にソフトウェア的に実現する。   Now, for the purpose of the test such as SILS described above, an auto parts manufacturer provides a software emulator for ECU of equipment provided by the auto part manufacturer. That is, the functions shown in FIG. 2 are realized purely in software by an executable program obtained by assembling or compiling a code written in a language such as assembler or C.

本発明のこの実施例では、ECUのソフトウェア・エミュレータの内部状態を取り出して利用する。ソフトウェア・エミュレータによっては、内部状態が取り出し可能である場合と、そのままでは、内部状態が取り出し可能でない場合がある。   In this embodiment of the present invention, the internal state of the software emulator of the ECU is taken out and used. Depending on the software emulator, there are a case where the internal state can be taken out and a case where the internal state cannot be taken out as it is.

そこで、ECUのソフトウェア・エミュレータの内部状態がそのままでは、内部状態が取り出し可能でない場合、ソースコード解析ツールによって、次のような処理を行う。   Therefore, when the internal state of the software emulator of the ECU cannot be taken out as it is, the following processing is performed by the source code analysis tool.

もし、ECUのソフトウェア・エミュレータのソースコードが入手可能であるならそれをそのまま利用し、実行可能バイナリ・ファイルしかなければ、所定のツールで、逆アセンブルまたは逆コンパイルする。そうして、ECUのソフトウェア・エミュレータのソースコードに対して、データーフロー解析という技法を適用して、ソースコードを基本ブロックに分割する。基本ブロックとは、ソースコードを、複数の制御が合流するところ、または、制御が複数に分岐するところで分断した、各々の部分のことである。このような基本ブロックをノードとして、その分岐の制御の流れのリンクで接続すると、有向グラフ構造になる。これは特に、制御フローグラフとも呼ばれる。制御フローグラフは、始点ノードと終点ノードをもち、プログラムで実行され得るノードは全て、始点ノードからの有効エッジをもつ。基本ブロックのうち、exit()やreturnなどのステートメントを含む制御の末端ノードは全て、終点ノードへの有効エッジをもつ。   If the source code of the ECU software emulator is available, it is used as it is, and if there is only an executable binary file, it is disassembled or decompiled with a predetermined tool. Then, a technique called data flow analysis is applied to the source code of the ECU software emulator to divide the source code into basic blocks. A basic block is a portion of the source code that is divided where a plurality of controls merge or where the control branches into a plurality. When such a basic block is used as a node and connected by a link of the control flow of the branch, a directed graph structure is obtained. This is also called a control flow graph. The control flow graph has a start point node and an end point node, and all nodes that can be executed by the program have valid edges from the start point node. In the basic block, all control end nodes including exit () and return statements have a valid edge to the end node.

次に、制御フローグラフの始点ノードと終点ノードの可能な全てのパスに対して、Use/Def解析を行う。ここで、Useとは、ある変数が、別の変数に値をストアするために使用される場合をいう。典型的には、代入式の右辺である。Defとは、ある変数に、値がストアされる場合をいう。典型的には、代入式の左辺である。   Next, Use / Def analysis is performed on all possible paths of the start and end nodes of the control flow graph. Here, “Use” means a case where a variable is used to store a value in another variable. Typically, it is the right side of an assignment expression. Def means that a value is stored in a certain variable. Typically, it is the left side of an assignment expression.

この場合、個々のパス毎に、Defの前あるいは、DefなしでUseされている変数、すなわち未定義参照変数があるかどうかがチェックされ、もし未定義参照変数があると、その変数名は一旦保存される。   In this case, for each path, it is checked whether there is a variable that is used before Def or without Def, that is, there is an undefined reference variable. If there is an undefined reference variable, the variable name is temporarily Saved.

こうして、全てのパスがスキャンされた後に保存されている変数名を用いて、後述するように、ラッパ(wrapper)コードが生成される。   Thus, a wrapper code is generated using a variable name stored after all paths have been scanned, as will be described later.

ところで、実行フローのスキャンと、Use/Def解析は、データーフロー解析という技法を用いることによって、より効率的に実行することができるので、以下、それについて説明する。   By the way, execution flow scanning and use / def analysis can be executed more efficiently by using a technique called data flow analysis.

その第1ステップは、各基本ブロックにおけるdefリストの計算である。具体的にはプログラム全体で使用される変数のリストを1ビットで表現し、各基本ブロックごとに定義される変数を1されないものを0としたビットベクタで表現する。   The first step is the calculation of the def list in each basic block. Specifically, a list of variables used in the entire program is expressed by 1 bit, and a variable defined for each basic block is expressed by a bit vector where 0 is not set.

その第2ステップは、プログラム全体の到達可能なdefリストの計算である。すなわち、各基本ブロックでは、複数の入力がある場合には論理積(AND)してから,自身への入力とする。自身からの出力は、その入力と、自身で定義したdefリストの論理和(OR)をとり、後続の基本ブロックに渡す。実行していく順番は、制御フローグラフ上での深さ優先順序が効率的である。   The second step is the calculation of the reachable def list for the entire program. That is, in each basic block, when there are a plurality of inputs, the logical product (AND) is performed and then input to itself. The output from itself takes the logical sum (OR) of the input and the def list defined by itself, and passes it to the subsequent basic block. As the order of execution, the depth priority order on the control flow graph is efficient.

第3ステップは、クロージャ解析アルゴリズムにより、到達可能なdefリストのクロージャを求めることである。そして、上記第2ステップを、全ての基本ブロックの出力defリストが変化しなくなるまで、繰り返す。ここで、クロージャとは、環境と結び付けられた値のことである。   The third step is to obtain a reachable def list closure by a closure analysis algorithm. Then, the second step is repeated until the output def lists of all basic blocks are not changed. Here, the closure is a value associated with the environment.

第4ステップは、未定義変数の使用の発見である。すなわち、各基本ブロックの入力defリストが0として表現された変数が、useとして使用されているものを検出する。   The fourth step is the discovery of the use of undefined variables. That is, a variable in which the input def list of each basic block is expressed as 0 is used as a use.

なお、データフロー解析のより詳しい説明については、Alfred V. Aho, Ravi Sethi, Jeffrey D. Ullman, "Compilers Principles, Technologies, and Tools", Addison-Wesley Publishing Company, 1986, p. 608-633などを参照されたい。   For a more detailed explanation of data flow analysis, see Alfred V. Aho, Ravi Sethi, Jeffrey D. Ullman, "Compilers Principles, Technologies, and Tools", Addison-Wesley Publishing Company, 1986, p. 608-633. Please refer.

さて、例えば、元のECUシミュレーション・ソースコードが、関数 Func(x,y,z) であらわされるとする。また、未定義参照変数として、a, bが登録されていたとする。   For example, it is assumed that the original ECU simulation source code is represented by a function Func (x, y, z). Also assume that a and b are registered as undefined reference variables.

すると、例えば、_Func(x,y,z,_a,_b)という関数が用意され、
_Func(x,y,z,_a,_b)
{
a = _a;
b = _b;
Func(x,y,z);
_a = a;
_b = b;
return;
}
Then, for example, a function _Func (x, y, z, _a, _b) is prepared,
_Func (x, y, z, _a, _b)
{
a = _a;
b = _b;
Func (x, y, z);
_a = a;
_b = b;
return;
}

_Func(x,y,z,_a,_b)
{
a = _a;
b = _b;
の部分のところを、入力用ラッパコードと呼び、
_a = a;
_b = b;
return;
}
の部分のところを、出力用ラッパコードと呼ぶ。
_Func (x, y, z, _a, _b)
{
a = _a;
b = _b;
Is called the input wrapper code,
_a = a;
_b = b;
return;
}
This part is called an output wrapper code.

なお、 Func(x,y,z); のところは、関数呼び出しではなく、インライン展開でもよい。このような関数_Func(x,y,z,_a,_b)を、_a,_bに適当な値を入れて呼び出すことにより、Func(x,y,z)の内部状態をセットすることができ、また、_Func(x,y,z,_a,_b)を呼び出した結果、_a,_bに、処理後の内部状態の値がセットされるので、必要に応じて、それらの値を別途保存するなど、利用可能である。このようにラッパコードが付されたソースコードは、実行可能プログラムを生成するために、コンパイルまたはアセンブルされる。   Note that Func (x, y, z); may be inlined, not a function call. By calling the function _Func (x, y, z, _a, _b) with appropriate values in _a and _b, the internal state of Func (x, y, z) can be set. In addition, as a result of calling _Func (x, y, z, _a, _b), the value of the internal state after processing is set in _a, _b, so save those values separately if necessary Etc. are available. The source code with wrapper code in this way is compiled or assembled to produce an executable program.

また、C++など、特定の処理言語の仕様によっては、_Func(x,y,z,_a,_b)でなく、_Func(x,y,z,&_a,&_b)のように、参照演算子&をつけて関数に引数として与える必要があることもある。   Also, depending on the specifications of a specific processing language such as C ++, the reference operator & may be used as _Func (x, y, z, & _ a, & _ b) instead of _Func (x, y, z, _a, _b). Sometimes it is necessary to give it as an argument to the function.

こうして、内部状態あるいは、内部変数を取り出すことができるようになった後のECUのソフトウェア・エミュレータを図式的に、図4に示す。そこに示すように、ECUのソフトウェア・エミュレータ402は、内部ロジックfを示す部分と、内部状態または状態変数xとに好都合に分離される。   FIG. 4 schematically shows the software emulator of the ECU after the internal state or internal variable can be extracted in this way. As shown there, the software emulator 402 of the ECU is conveniently separated into a portion indicating the internal logic f and an internal state or state variable x.

すると、内部ロジックfを用いて、出力y = f(t,x,u, ...) と記述することができる。ここでtは、時間である。また、状態変数xに係るコードが分離されたことによって、任意の時点、すなわち典型的には出力がなされるタイミングで、状態変数xと、好ましくは入力uも、状態リポジトリ404として、ハードディスクドライブに書き出すことができる。   Then, the output y = f (t, x, u,...) Can be described using the internal logic f. Where t is time. In addition, since the code related to the state variable x is separated, the state variable x and preferably the input u are also stored in the hard disk drive as the state repository 404 at an arbitrary time point, that is, typically at the timing when output is performed. Can be exported.

状態変数xに係るコードを分離した効果はこれだけではない。すなわち、矢印406で示すように、ソフトウェア・エミュレータ402には、任意の時点で、状態変数xをセットすることができる。これによって、状態リポジトリ404から入力と状態変数xを選んでセットすることにより、ECUのソフトウェア・エミュレータ402を、その状態変数xが状態リポジトリ404に書き出された任意の時点の状態に戻して、そこから計算をやり直させることができる。   This is not the only effect of separating the code related to the state variable x. That is, as indicated by an arrow 406, the state variable x can be set in the software emulator 402 at an arbitrary time. Thereby, by selecting and setting the input and the state variable x from the state repository 404, the ECU software emulator 402 is returned to the state at an arbitrary time when the state variable x is written in the state repository 404. From there, you can redo the calculation.

以上説明したような処理は、ECUだけでなく、物理装置シミュレータも含む論理プロセス全般に適用することが可能である。従って、以下では、論理プロセスを、内部状態変数を取り出し可能で、且つ内部状態変数を所望の値にセット可能であるものとして扱う。   The processing as described above can be applied to all logical processes including not only the ECU but also the physical device simulator. Therefore, in the following, the logical process is treated as being able to retrieve internal state variables and set internal state variables to a desired value.

次に、図5を参照して、本発明を実施するために使用されるコンピュータのハードウェアについて説明する。図5において、ホスト・バス502には、複数のCPU0 504a、CPU1 504b、CPU2 504c、CPU3 504dが接続されている。ホスト・バス502にはさらに、CPU0 504a、CPU1 504b、CPU2 504c、CPU3 504dの演算処理のためのメイン・メモリ506が接続されている。   Next, computer hardware used to implement the present invention will be described with reference to FIG. In FIG. 5, a plurality of CPU0 504a, CPU1 504b, CPU2 504c, and CPU3 504d are connected to the host bus 502. Further connected to the host bus 502 is a main memory 506 for arithmetic processing of the CPU0 504a, CPU1 504b, CPU2 504c, and CPU3 504d.

一方、I/Oバス508には、キーボード510、マウス512、ディスプレイ514及びハードティスク・ドライブ516が接続されている。I/Oバス508は、I/Oブリッジ518を介して、ホスト・バス502に接続されている。キーボード510及びマウス512は、オペレータが、コマンドを打ち込んだり、メニューをクリックするなどして、操作するために使用される。ディスプレイ514は、必要に応じて、後述する本発明に係るプログラムをGUIで操作するためのメニューを表示するために使用される。   On the other hand, a keyboard 510, a mouse 512, a display 514, and a hard disk drive 516 are connected to the I / O bus 508. The I / O bus 508 is connected to the host bus 502 via the I / O bridge 518. The keyboard 510 and the mouse 512 are used by an operator to enter commands or click menus to perform operations. The display 514 is used to display a menu for operating a program according to the present invention, which will be described later, using a GUI as necessary.

この目的のために使用される好適なコンピュータ・システムのハードウェアとして、IBM(R)System Xがある。その際、CPU0 504a、CPU1 504b、CPU2 504c、CPU3 504dは、例えば、インテル(R)Core 2 DUOであり、オペレーティング・システムは、Windows(商標)Server 2003である。オペレーティング・システムは、ハードティスク・ドライブ516に格納され、コンピュータ・システムの起動時に、ハードティスク・ドライブ516からメイン・メモリ506に読み込まれる。   IBM (R) System X is the preferred computer system hardware used for this purpose. At that time, the CPU0 504a, the CPU1 504b, the CPU2 504c, and the CPU3 504d are, for example, Intel® Core 2 DUO, and the operating system is Windows (trademark) Server 2003. The operating system is stored in the hard disk drive 516 and is read from the hard disk drive 516 into the main memory 506 when the computer system is started.

なお、本発明を実施するために使用可能なコンピュータ・システムのハードウェアは、IBM(R)System Xに限定されず、本発明のシミュレーション・プログラムを走らせることができるものであれば、任意のコンピュータ・システムを使用することができる。オペレーティング・システムも、Windows(R)に限定されず、Linux(R)、Mac OS(R)など、任意のオペレーティング・システムを使用することができる。さらに、ECUエミュレータ・プログラム、物理装置シミュレータなどの論理プロセスを高速で動作させるために、POWER(商標)6ベースで、オペレーティング・システムがAIX(商標)のIBM(R)System Pなどのコンピュータ・システムを使用してもよい。   The hardware of the computer system that can be used for carrying out the present invention is not limited to IBM (R) System X, and any hardware that can run the simulation program of the present invention can be used. A computer system can be used. The operating system is not limited to Windows (R), and any operating system such as Linux (R) or Mac OS (R) can be used. Further, in order to operate logical processes such as an ECU emulator program and a physical device simulator at high speed, a computer system such as IBM (R) System P with an operating system of AIX (trademark) based on POWER (trademark) 6 is used. May be used.

ハードディスク・ドライブ516にはさらに、ECUエミュレータ、物理装置シミュレータなどの複数の論理プロセス、及び、複数の論理プロセスを協働して動作させるためのプログラムが格納され、キーボード510及びマウス512によって起動操作可能である。   The hard disk drive 516 further stores a plurality of logical processes such as an ECU emulator and a physical device simulator, and a program for operating the plurality of logical processes in cooperation with each other, and can be activated by a keyboard 510 and a mouse 512. It is.

好適には、フルビークルSILSを実現するために、1台の自動車で使われるすべてのECUのエミュレータ・プログラムが、ハードティスク・ドライブ516に保存されている。そのECUのエミュレータ・プログラムが、そのままでは内部の状態変数を取り出せないものてある場合は、上述したラッパコードを被せることにより、予め、状態変数をセット及び取り出し可能としておくものとする。   Preferably, in order to realize full vehicle SILS, emulator programs of all ECUs used in one automobile are stored in the hard disk drive 516. If the ECU emulator program cannot extract an internal state variable as it is, the state variable can be set and extracted in advance by covering the above-described wrapper code.

ハードティスク・ドライブ516にはさらに、後述するECUエミュレータ・プログラムのためのスケジューラ、エンジン、トランスミッション、ステアリング、ワイパなどの物理装置(プラント)シミュレータ・プログラム、全体のシステムの入力を同期させるためのグローバル・スケジューラ及び、登り坂道、高速道路、つづら折道などの様々な、テストのためのシナリオを格納したシナリオ・ジェネレータのプログラムも格納されている。   The hard disk drive 516 further includes a scheduler for an ECU emulator program to be described later, a physical device (plant) simulator program such as an engine, a transmission, a steering, and a wiper, and a global for synchronizing inputs of the entire system. A scheduler and a scenario generator program that stores various test scenarios such as climbing slopes, highways, and zigzag roads are also stored.

なお、ここでの「エミュレータ」と、「シミュレータ」の用語の使い分けであるが、もともとの、別のプロセッサで動くことを想定して書かれていたECUのコードを、CPU0〜CPU3などをターゲットとして動くようにすることを、エミュレーションと呼び、それを行うプログラムを、エミュレータと呼ぶ。一方、エンジンなどの物理的システムの動作を仮想計算するシステムを、シミュレータと呼ぶ。   Note that the terms “emulator” and “simulator” are used properly here, but the ECU code originally written on the assumption that it runs on another processor is targeted for CPU0 to CPU3, etc. Making it run is called emulation, and the program that does it is called an emulator. On the other hand, a system that virtually calculates the operation of a physical system such as an engine is called a simulator.

次に、図6を参照して、本発明のシミュレーション・システムの機能論理ブロック図を説明する。図6において、共有メモリ602は、実際は、図5に示すメイン・メモリ506の一部であってよい。共有メモリ602には、ECUエミュレータ・プログラム604a、604b、・・・604nと、グローバル・スケジューラ608と、物理装置シミュレータ・プログラム606a、・・・606mが論理的に結合されている。   Next, a functional logic block diagram of the simulation system of the present invention will be described with reference to FIG. In FIG. 6, the shared memory 602 may actually be a part of the main memory 506 shown in FIG. In the shared memory 602, ECU emulator programs 604a, 604b,... 604n, a global scheduler 608, and physical device simulator programs 606a,.

グローバル・スケジューラ608は、ECUエミュレータ・プログラム604a、604b、・・・604n及び物理装置シミュレータ・プログラム606a、・・・606mの間のイベントのタイム・スタンプに基づき、それらのイベントの間の一貫性を維持するように動作する。グローバル・スケジューラ608のより詳しい動作は、後述する。   The global scheduler 608 is based on the time stamps of events between the ECU emulator programs 604a, 604b,... 604n and the physical device simulator programs 606a,. Operate to maintain. A more detailed operation of the global scheduler 608 will be described later.

ECUのエミュレータ・プログラム604a、604b、・・・604nは、それぞれ、エンジン、ブレーキ、トランスミッション、ステアリングなど、車の異なる部分の制御に対応するもので、それぞれが異なる速度のクロックで動作するので、対応するECUのエミュレータ・プログラムも、それに比例するクロック比で動作するものとする。   The ECU emulator programs 604a, 604b,... 604n correspond to the control of different parts of the car, such as the engine, brake, transmission, steering, etc., and each operates with a clock with a different speed. It is assumed that the emulator emulator program that operates also operates at a proportional clock ratio.

一例として、スレッドを作成いることにより、複数のCPUに、ECUのエミュレータ・プログラムを割り当てるコードを、C言語を例にとって示す。
void* ecu_wrapper(void* parm)
{
...
/* define state_repository */
...
LOOP_BEGIN:
...
/* ECUのユニット処理を行う */
LOOP_END:
...
}
As an example, a code for assigning an ECU emulator program to a plurality of CPUs by creating a thread will be described by taking C language as an example.
void * ecu_wrapper (void * parm)
{
...
/ * define state_repository * /
...
LOOP_BEGIN:
...
/ * Perform ECU unit processing * /
LOOP_END:
...
}

上記のようなコードを用意しておいて、
pthread_t thread_id;
pthread_attr_t thread_attr;
pthread_attr_init(&thread_attr);
pthread_create(&thread_id, thread_attr, ecu_wrapper, NULL);
pthread_attr_destroy(&thread_attr);
とすると、オペレーティング・システムがスレッドを生成して、それをECUのエミュレータ・プログラムに割り当てる。物理的には、そのスレッドは、CPU0〜CPU3のどれかに割り当てられるが、それはオペレーティング・システムに任され、エミュレータ・プログラムにとっては、透過的である。
このような割り当て処理は、ECUエミュレータ・プログラム604a、604b、・・・604n各々に個別に行われる。
Prepare code like the above,
pthread_t thread_id;
pthread_attr_t thread_attr;
pthread_attr_init (&thread_attr);
pthread_create (& thread_id, thread_attr, ecu_wrapper, NULL);
pthread_attr_destroy (&thread_attr);
Then, the operating system creates a thread and assigns it to the emulator program of the ECU. Physically, the thread is assigned to one of CPU0 to CPU3, but it is left to the operating system and is transparent to the emulator program.
Such allocation processing is performed individually for each of the ECU emulator programs 604a, 604b,.

なお、図6に示した論理構成では、ECUエミュレータ・プログラム604a、604b、・・・604n、物理装置シミュレータ・プログラム606a、・・・606m及びグローバル・スケジューラ608は、共有メモリ602を使用してデータを交換するが、代わりに、CAN(controller area network)エミュレータを使用してもよい。   6, the ECU emulator programs 604a, 604b,... 604n, the physical device simulator programs 606a,... 606m, and the global scheduler 608 use the shared memory 602 for data. However, a CAN (controller area network) emulator may be used instead.

図示しないが、図6の構成には、登り坂道、高速道路、つづら折道などの様々な、テストのためのシナリオを格納したシナリオ・ジェネレータも接続される。   Although not shown in the figure, a scenario generator storing various test scenarios such as an uphill road, a highway, and a zigzag road is also connected to the configuration of FIG.

さて、ECUエミュレータ・プログラム604及び物理装置シミュレータ・プログラム606を総称して論理プロセスと称することは既に述べたが、本発明の処理は、論理プロセス全般に適用可能なので、以下では可能な限り、論理プロセスについての構成または処理として説明する。   Although the ECU emulator program 604 and the physical device simulator program 606 are collectively referred to as a logical process as described above, the processing of the present invention is applicable to all logical processes. The process will be described as a configuration or process.

図7は、論理プロセス700内部の、より詳細な論理ブロック図を示す。論理モジュール702は、いわゆる論理プロセスの本来のロジックを含む本体である。   FIG. 7 shows a more detailed logic block diagram within the logic process 700. The logic module 702 is a main body including the original logic of a so-called logic process.

ローカル・スケジューラ704は、ロールバック表706に保存した内部状態変数を、論理モジュール702に書き戻すことにより、論理プロセス700を所望の状態に戻す機能を持つ。ロールバック表706には、内部状態変数以外に、入力イベントの値、時間、出力イベントの値の履歴が記録される。ローカル・スケジューラ704は、ロールバック表706のエントリを探索して、論理モジュール702に、ロールバックの指示を出す。   The local scheduler 704 has a function of returning the logical process 700 to a desired state by writing the internal state variable stored in the rollback table 706 back to the logical module 702. In the rollback table 706, in addition to internal state variables, a history of input event values, time, and output event values is recorded. The local scheduler 704 searches for an entry in the rollback table 706 and issues a rollback instruction to the logic module 702.

ローカル・スケジューラ704には、共有メモリ602から、通信インターフェース・モジュール708を介して、イベント入力が提供される。一方、ローカル・スケジューラ704は、通信インターフェース・モジュール708に対して、イベント入力を出力する。   The local scheduler 704 is provided with event inputs from the shared memory 602 via the communication interface module 708. On the other hand, the local scheduler 704 outputs an event input to the communication interface module 708.

通信インターフェース・モジュール708は、共有メモリ602を介して、ECUエミュレータ604、物理装置シミュレータ606などの他の論理プロセスや、グローバル・スケジューラ608と通信する。その通信方法は、特定のメモリのアドレスに書いてシグナルするなどの方法である。このような共有メモリを介する方法以外にも、CANエミュレータを使用する方法がある。   The communication interface module 708 communicates with other logical processes such as the ECU emulator 604 and the physical device simulator 606 and the global scheduler 608 via the shared memory 602. The communication method is a method of writing at a specific memory address and signaling. In addition to such a method via a shared memory, there is a method using a CAN emulator.

論理プロセス700はさらに、予測モジュール710をもつ。予測モジュール710は、過去の複数の入来イベントを記録し、その記録された複数のイベントの値に基づき、線形予測などの手法で未来の複数のイベントを予測し、その予測された複数のイベントの列に基づき、論理モジュール702を先行投機実行させるように、ローカル・スケジューラ704に指示するコマンドを出す。   The logic process 700 further includes a prediction module 710. The prediction module 710 records a plurality of past incoming events, predicts a plurality of future events by a method such as linear prediction based on the values of the plurality of recorded events, and the plurality of predicted events Based on this column, a command for instructing the local scheduler 704 to issue the speculative speculative execution of the logic module 702 is issued.

予測モジュール710は、本発明の中心的な特徴を担うので、図8を参照して、より詳細に説明する。   The prediction module 710 bears the central feature of the present invention and will be described in more detail with reference to FIG.

図8に示すように、予測モジュール710は、予測曲線の更新モジュール802と、ロールバックの計算モジュール804と、累積誤差の配分計算モジュール806と、予測の補正モジュール808を有する。予測モジュール710はさらに、入来イベントの観測値の記録領域810と、前予測曲線の記録領域812を有する。   As shown in FIG. 8, the prediction module 710 includes a prediction curve update module 802, a rollback calculation module 804, a cumulative error distribution calculation module 806, and a prediction correction module 808. The prediction module 710 further includes an observation value recording area 810 for an incoming event and a previous prediction curve recording area 812.

観測値の記録領域810は、好適には、メイン・メモリ506内に確保された所定の領域であるが、保存的に読み書き可能な領域であるならこれに限定されず、例えば、ハードディスク・ドライブ515の所定の領域に確保された領域であってもよい。観測値の記録領域810には、ローカル・スケジューラ704を経由して入来するイベントの実測値と、そのイベントの時刻が順次記録される。   The observation value recording area 810 is preferably a predetermined area secured in the main memory 506, but is not limited to this as long as it is a readable and writable area. For example, the hard disk drive 515 It may be an area secured in the predetermined area. In the observed value recording area 810, the actual measured value of the event coming via the local scheduler 704 and the time of the event are sequentially recorded.

予測曲線の更新モジュール802は、記録領域810に記録された複数のイベントの実測値と、その時刻の値を用いて、好適には線形予測のアルゴリズムにより、複数のイベントの値と、その時刻とを予測する。   The prediction curve update module 802 uses the measured values of the plurality of events recorded in the recording area 810 and the values of the times, preferably by the linear prediction algorithm, and the values of the plurality of events and the times. Predict.

ロールバックの計算モジュール804は、モジュール802によって計算された複数のイベントの値に基づき、ロールバックすべきステップ数mを計算する。ロールバックの計算モジュール804は、下記に説明する前予測曲線の記録領域812からの値も参照する。ロールバックの計算モジュール804は、ローカル・スケジューラ704から先行(投機済み)時刻を受け取り、一方、ローカル・スケジューラ704に、ロールバックすべきステップ数を返す。   The rollback calculation module 804 calculates the number of steps m to be rolled back based on the values of the plurality of events calculated by the module 802. The rollback calculation module 804 also refers to the value from the recording area 812 of the pre-forecast curve described below. The rollback calculation module 804 receives the preceding (speculed) time from the local scheduler 704, while returning to the local scheduler 704 the number of steps to be rolled back.

前予測曲線の記録領域812には、前回、予測曲線の更新モジュール802によって予測計算され、その後、予測の補正モジュール808によって補正を受けた結果の前予測曲線の値が保存される。   The previous prediction curve recording area 812 stores the value of the previous prediction curve as a result of the prediction calculation performed by the prediction curve update module 802 and then corrected by the prediction correction module 808.

累積誤差の配分計算モジュール806は、予測曲線の更新モジュール802から受け取った今回の予測曲線の値と、前予測曲線の記録領域812から受け取った前予測曲線の値と、ロールバックの計算モジュール804から受け取ったステップ数mの値とから、今回の予測曲線の各ステップに施すべき補正の値を計算する。   The cumulative error allocation calculation module 806 receives the current prediction curve value received from the prediction curve update module 802, the previous prediction curve value received from the previous prediction curve recording area 812, and the rollback calculation module 804. From the received value of the number of steps m, a correction value to be applied to each step of the current prediction curve is calculated.

予測の補正モジュール808は、モジュール806から供給された値を用いて、予測曲線の更新モジュール802によって予測された値を補正し、その値を、ローカル・スケジューラ704に送る。ローカル・スケジューラ704は、受け取った、補正された予測値を、その後のロールバック処理に使用する。   The prediction correction module 808 corrects the value predicted by the prediction curve update module 802 using the value supplied from the module 806, and sends the value to the local scheduler 704. The local scheduler 704 uses the received corrected prediction value for subsequent rollback processing.

予測の補正モジュール808によって補正された予測値は、次回の使用のために、前予測曲線の記録領域812に記録される。   The prediction value corrected by the prediction correction module 808 is recorded in the previous prediction curve recording area 812 for the next use.

図9は、予測モジュール710のより詳細な処理を示すフローチャートである。ステップ902では、ローカル・スケジューラ704が、新たなイベント(観測値)を待つ。そこで、ローカル・スケジューラ704に新たなイベントが届き、そのイベントの時刻(ステップ数)をnとする。ローカル・スケジューラ704はその値を、予測曲線の更新モジュール802に送る。   FIG. 9 is a flowchart showing more detailed processing of the prediction module 710. In step 902, the local scheduler 704 waits for a new event (observation value). Therefore, a new event arrives at the local scheduler 704, and the time (number of steps) of the event is n. The local scheduler 704 sends the value to the prediction curve update module 802.

ステップ904では、予測曲線の更新モジュール802が、観測値の記録領域810から読み出した値と、ローカル・スケジューラ704から送られた、上記新たなイベントの値を使って、新しい予測曲線を計算する。   In step 904, the prediction curve update module 802 calculates a new prediction curve using the value read from the observation value recording area 810 and the value of the new event sent from the local scheduler 704.

このステップは、図10のフローチャートを参照して、より詳細に説明する。この実施例では、現在の値に加えて過去のn-1個の値から、線形予測の理論に従う下記の式に基づき、x~'[n+1]の予測値を計算する。

Figure 0005460010
ここで、係数wi ( i = 0,1,2,...,N-1 )を決定するために先ず、ステップ1002で、下記のベクトルxと、行列Hが計算される。具体的なNの数は、論理プロセスの動作の特性に依存するが、少なくとも3程度が望ましい。
Figure 0005460010
なお、この式は、一般的なMについて書かれており、ここでは、Mは、Nより十分大きな値とする。 This step will be described in more detail with reference to the flowchart of FIG. In this embodiment, predicted values of x˜ ′ [n + 1] are calculated from the past n−1 values in addition to the current value based on the following formula according to the theory of linear prediction.
Figure 0005460010
Here, in order to determine the coefficients w i (i = 0, 1, 2,..., N−1), first, in step 1002, the following vector x and matrix H are calculated. The specific number of N depends on the operation characteristics of the logical process, but is preferably at least about 3.
Figure 0005460010
This equation is written for general M, where M is a value sufficiently larger than N.

こうして、w = (HTH)-1Txにより、係数wが計算される。
ここで、w = [w0,w1,...,wN-1]Tである。
また、図10のルーチンは、新たなイベント(観測値)が入来する度に呼ばれるので、その度毎に、係数wi ( i = 0,1,2,...,N-1 )は再計算されることも理解されたい。
Thus, the coefficient w is calculated from w = (H T H) −1 H T x.
Here, w = [w 0 , w 1 ,..., W N−1 ] T.
Further, since the routine of FIG. 10 is called every time a new event (observed value) arrives, the coefficient w i (i = 0,1,2, ..., N-1) is calculated each time. It should also be understood that it is recalculated.

ステップ904に戻って、こうしてwが求まると、数1の式で、nを増やすことにより、
x~'[n+1], x~'[n+2], x~'[n+3],... と、新しい予測の値を順次求めることができる。
Returning to step 904, when w is obtained in this way, by increasing n in the equation (1),
x ~ '[n + 1], x ~' [n + 2], x ~ '[n + 3], ... and new prediction values can be obtained sequentially.

なお、線形予測により求めるx~'[n+1], x~'[n+2], x~'[n+3],... などの値は、一般的には、イベントの値であり、イベントは複数の値をパラメータとしてもつことがあるので、イベントの値は、ベクトル表記されることがある。そのような場合、ベクトルの異なる成分は互いに独立であるとみなして、個々の成分に、上記線形予測を適用することができる。   Note that the values of x ~ '[n + 1], x ~' [n + 2], x ~ '[n + 3], ..., etc. obtained by linear prediction are generally event values. In addition, since an event may have a plurality of values as parameters, the value of the event may be expressed as a vector. In such a case, the different components of the vector are considered to be independent from each other, and the above linear prediction can be applied to the individual components.

また、個々のイベントには、時間が関連付けられており、その時間の予測計算にも線形予測を適用することができる。すると、結果の予測されたイベントも時間をもつことになるので、その予測された時間にイベントが入ってきたものとして、シミュレーションを先行投機実行することができる。   In addition, time is associated with each event, and linear prediction can be applied to the prediction calculation for that time. As a result, the predicted event as a result also has time, so that the simulation can be executed in advance by assuming that the event has entered at the predicted time.

ステップ906では、古い予測値x~[i] (i = n+1, n+2, ...)と、今回計算された新しい予測値x~'[i] (i = n+1, n+2, ...)との差が次の式により計算される。最初の式だけは、実測値x[n]が使われている。
e[n] = x~[n] - x[n]
e~[n+1] = x~[n+1] - x~'[n+1]
e~[n+2] = x~[n+2] - x~'[n+2]
e~[n+3] = x~[n+3] - x~'[n+3]
.....
これらの値は、累積誤差の配分計算モジュール806によって保持される。
In step 906, the old predicted value x˜ [i] (i = n + 1, n + 2,...) And the new predicted value x˜ ′ [i] (i = n + 1, n) calculated this time. The difference from +2, ...) is calculated by Only the first equation uses measured values x [n].
e [n] = x ~ [n]-x [n]
e ~ [n + 1] = x ~ [n + 1]-x ~ '[n + 1]
e ~ [n + 2] = x ~ [n + 2]-x ~ '[n + 2]
e ~ [n + 3] = x ~ [n + 3]-x ~ '[n + 3]
.....
These values are held by the cumulative error distribution calculation module 806.

ステップ908では、ロールバックの計算モジュール804により、累積誤差の許容範囲(m)が下記の不等式により計算される。

Figure 0005460010
ここで、Tcは、所定の閾値であり、この不等式を満たす最大の整数mが求めるmの値である。Tcが大きいほど、mの値も大きくなる。 In step 908, the rollback calculation module 804 calculates the allowable error range (m) by the following inequality.
Figure 0005460010
Here, T c is a predetermined threshold value, and is a value of m obtained by the maximum integer m satisfying this inequality. The value of m increases as T c increases.

ステップ910では、ロールバックの計算モジュール804において、ステップ908で計算されたmの値でもって、n+mが計算され、ロールバックの計算モジュール804は、ローカル・スケジューラ704に、n+mのステップの時点までロールバックするように指示を出すコマンドを送る。   In step 910, n + m is calculated in the rollback calculation module 804 by the value of m calculated in step 908, and the rollback calculation module 804 sends the n + m step to the local scheduler 704. Send a command to instruct you to roll back to the point in time.

なお、ステップ902の時刻(ステップ)nの時点で、先行投機は、n < n + 2m < nsのような時刻nsまで進んでいることに留意されたい。
従って、n < n + m < n + 2m < nsなので、nsからn+mのステップの時点までロールバックするとは、nsから、m以上のステップを戻ることを意味する。
Incidentally, at the point of time (step) n in step 902, prior speculation Note that it has progressed to time n s as n <n + 2m <n s .
Thus, n <since n + m <n + 2m < n s, rolls and back from n s to the time step n + m, the n s, which means that returning the above steps m.

ステップ912では、予測の補正モジュール808で、新しく予測された値
x~'[n+m], x~'[n+m+1], x~'[n+m+2],... が、累積誤差の配分計算モジュール806によって保持されているe[n],e~[n+1],e~[n+2],e~[n+3]...を用いて、下記の式により補正される。
In step 912, the predicted correction module 808 uses the newly predicted value.
x ~ '[n + m], x ~' [n + m + 1], x ~ '[n + m + 2], ... are held by the cumulative error allocation calculation module 806 e [ n], e ~ [n + 1], e ~ [n + 2], e ~ [n + 3]... are corrected by the following equation.

x~''[n+m] = x~'[n+m] - e~[n+m-1]
x~''[n+m+1] = x~'[n+m+1] - e~[n+m-2]
x~''[n+m+2] = x~'[n+m+2] - e~[n+m-3]
....
....
x~''[n+2m-2] = x~'[n+2m-2] - e~[n+1]
x~''[n+2m-1] = x~'[n+2m-1] - e[n]
x~''[n+2m] = x~'[n+2m]
x ~ '' [n + m] = x ~ '[n + m]-e ~ [n + m-1]
x ~ '' [n + m + 1] = x ~ '[n + m + 1]-e ~ [n + m-2]
x ~ '' [n + m + 2] = x ~ '[n + m + 2]-e ~ [n + m-3]
....
....
x ~ '' [n + 2m-2] = x ~ '[n + 2m-2]-e ~ [n + 1]
x ~ '' [n + 2m-1] = x ~ '[n + 2m-1]-e [n]
x ~ '' [n + 2m] = x ~ '[n + 2m]

このように補正された値x~''[n+m]、x~''[n+m+1]、x~''[n+m+2]、...、
x~''[n+2m-1]、x~''[n+2m]及び、続きの新しい予測x~'[n+2m+1], x~'[n+2m+2],
x~'[n+2m+3]..が、予測の補正モジュール808からローカル・スケジューラ704に送られ、ローカル・スケジューラ704は、ステップn+mから、これらの補正された値で順次、論理モジュール702を動作させるように制御する。
The corrected values x ~ '' [n + m], x ~ '' [n + m + 1], x ~ '' [n + m + 2], ...,
x ~ '' [n + 2m-1], x ~ '' [n + 2m] and subsequent new predictions x ~ '[n + 2m + 1], x ~' [n + 2m + 2],
x ~ '[n + 2m + 3] .. is sent from the prediction correction module 808 to the local scheduler 704, and the local scheduler 704 sequentially executes the logical values with these corrected values from step n + m. The module 702 is controlled to operate.

補正された値x~''[n+m]、x~''[n+m+1]、x~''[n+m+2]、...、x~''[n+2m-1]、
x~''[n+2m]及び、続きの新しい予測x~'[n+2m+1], x~'[n+2m+2],x~'[n+2m+3]は、
前予測曲線の記録領域812にも記録される。
Corrected values x ~ '' [n + m], x ~ '' [n + m + 1], x ~ '' [n + m + 2], ..., x ~ '' [n + 2m -1],
x ~ '' [n + 2m] and the following new predictions x ~ '[n + 2m + 1], x ~' [n + 2m + 2], x ~ '[n + 2m + 3]
It is also recorded in the recording area 812 of the previous prediction curve.

図11は、本発明による予測補正スキームを説明する図である。イベントがローカル・スケジューラ704にイベントx[n]が到来した時点で、先行投機は、ずっと先のnsまで進んでいたとする。 FIG. 11 is a diagram illustrating a prediction correction scheme according to the present invention. It is assumed that when the event arrives at the local scheduler 704, an event x [n] has been advanced up to n s ahead.

このとき、...,x[n-2],x[n-1]から予測計算され補正されて既に予測の補正モジュール808によって先行投機されたイベントは、x~[n],x~[n+1],x~[n+2],...,x~[ns]であるが、イベントx[n]の到来に応答して、予測計算の更新モジュール802は、
改めて、...,x[n-2],x[n-1],x[n]に基づき新たな予測計算を行う。その結果の予測値は、x~'[n+1],x~'[n+2]...である。
At this time, the events that have been predicted and calculated from ..., x [n-2], x [n-1] and have already been speculated by the prediction correction module 808 are x ~ [n], x ~ [ n + 1], x ~ [n + 2], ..., x ~ [n s ], but in response to the arrival of the event x [n], the prediction calculation update module 802
Again, a new prediction calculation is performed based on ..., x [n-2], x [n-1], x [n]. The predicted value of the result is x ~ '[n + 1], x ~' [n + 2] ....

それでは、nまでロールバックして、x~'[n]から再実行するのは、ロールバックが大きすぎて、シミュレーション速度の低下になる。   Then, rolling back to n and re-executing from x ~ '[n] causes the rollback to be too large and decreases the simulation speed.

そこで、誤差がある閾値内であることを許容してロールバックを減らす。その結果が、n+mまでのロールバックであり、nまでのロールバックに比べて、mステップ先行していることが分かる。これは、シミュレーション速度の向上に有利である。   Therefore, rollback is reduced by allowing the error to be within a certain threshold. The result is a rollback up to n + m, and it can be seen that m steps ahead of the rollback up to n. This is advantageous for improving the simulation speed.

ところが、上記誤差を残したままであると、この誤差が累積してしまう。そこで、n+mからn+2mまでの間でその誤差を解消してしまうように、数3で示した累積誤差Eを小出しで調整するべく、補正された値x~''[n+m]、...、x~''[n+2m]を計算して、先行投機実行する。これによって、誤差の累積が生じないようにしつつ、nまでロールバックしなくてよいので、シミュレーション速度を向上させることができる。   However, if the above error remains, the error accumulates. In order to eliminate the error between n + m and n + 2m, the corrected value x˜ '' [n + m ], ..., x ~ '' [n + 2m] are calculated and the speculative execution is executed. As a result, it is not necessary to roll back to n while preventing accumulation of errors, so that the simulation speed can be improved.

尚、上記の例では、時刻n+mからそれぞれ、差分e~[n+m],...,e~[n+1],e[n]を適用したが、各ステップでの最大許容量Tが確定できるなら、EをTで割った整数部分をMとして、n+mからn+m+M-1までそれぞれTを差し引いて、時刻n+m+Mには、E-MTを差し引くと、最小の区間で誤差の配分を終えることができる。   In the above example, the differences e ~ [n + m], ..., e ~ [n + 1], e [n] are applied from time n + m, respectively. If capacity T can be determined, subtract T from n + m to n + m + M-1 with M being the integer part of E divided by T, and at time n + m + M, E-MT is When subtracted, the distribution of errors can be completed in the minimum interval.

さて、図12に示すように、グローバル・スケジューラ608は、論理プロセスLP#1〜LP#N毎にキューQ1〜Qnをもつ。論理プロセスとは各々、図7に示すECUエミュレータ#1〜#n、物理装置シミュレータ#1〜#m、のどれかである。   As shown in FIG. 12, the global scheduler 608 has queues Q1 to Qn for each of the logical processes LP # 1 to LP # N. Each of the logical processes is any of ECU emulators # 1 to #n and physical device simulators # 1 to #m shown in FIG.

キューQ1〜Qnには、対応する論理プロセスLP#1〜LP#Nから、随時にイベントが入来し、入来したイベントは、キューに一旦格納される。グローバル・スケジューラ608は、キューQ1〜Qnに格納されているイベントに基づき、確定イベントと、確定時間を出力する。   In the queues Q1 to Qn, events come from the corresponding logical processes LP # 1 to LP # N as needed, and the incoming events are temporarily stored in the queue. The global scheduler 608 outputs a fixed event and a fixed time based on the events stored in the queues Q1 to Qn.

図13は、そのためのグローバル・スケジューラ608の処理を示すフローチャートである。ステップ1802で、グローバル・スケジューラ608は、どれかのキューQ1〜Qn(図12)に、新しいイベントが到来するのを待つ。   FIG. 13 is a flowchart showing the processing of the global scheduler 608 for that purpose. In step 1802, the global scheduler 608 waits for a new event to arrive in any of the queues Q1-Qn (FIG. 12).

ステップ1304では、空のキューにイベントが届いたかどうかが判断され、そうでなければ、処理は、ステップ1302に戻る。   In step 1304, it is determined whether an event has arrived in the empty queue, otherwise processing returns to step 1302.

ステップ1304で、空のキューにイベントが届いたと判断されると、ステップ1306に行って、そこで、すべてのキューQ1〜Qnが少なくとも1つのイベントをもつかどうかが判断される。そうでなければ、やはり処理は、ステップ1802に戻る。   If it is determined in step 1304 that an event has arrived in an empty queue, the process goes to step 1306 where it is determined whether all queues Q1-Qn have at least one event. Otherwise, the process returns to step 1802.

ステップ1306で、すべてのキューQ1〜Qnが少なくとも1つのイベントをもつと判断されると、ステップ1308では、すべてのキューQ1〜Qnの中で、最も古いイベントが見出される。このことは、すべてのイベントには、タイム・スタンプがつけられていることにより可能である。   If it is determined in step 1306 that all queues Q1-Qn have at least one event, in step 1308, the oldest event is found in all queues Q1-Qn. This is possible because all events are time stamped.

ステップ1310では、見つけられた最も古いイベントが、確定イベントとされ、論理プロセスLP#1〜LP#Nに通知される。   In step 1310, the oldest event found is determined as a confirmed event and notified to the logical processes LP # 1 to LP # N.

ステップ1312では、確定イベントがキューから取り除かれる。そして、ステップ1802に戻り、グローバル・スケジューラ608は、次のイベントの到着を待つ。   In step 1312, the confirmed event is removed from the queue. Then, returning to step 1802, the global scheduler 608 waits for the arrival of the next event.

以上、自動車用の複数の論理プロセスをもつシミュレーション・システムに関連して、本発明の特定の実施例を説明してきたが、本発明はこのような特定の実施例に限定されず、飛行機用のシミュレーション・システムなど、一般的な電子機械制御系システムのシミュレーション・システムに適用可能であることを、この分野の当業者であるなら、理解するであろう。   Although specific embodiments of the present invention have been described above in connection with a simulation system having a plurality of logic processes for automobiles, the present invention is not limited to such specific embodiments and is intended for airplanes. Those skilled in the art will understand that the present invention can be applied to a simulation system of a general electromechanical control system such as a simulation system.

ECUの典型的な制御である、フィードバック閉ループ系の例を示す図である。It is a figure which shows the example of the feedback closed loop system which is typical control of ECU. フィードバック閉ループ系の、応答関数による記述の例である。It is an example of the description by a response function of a feedback closed loop system. ECUソフトウェア・エミュレータのクロック応答の時間推移を示す図である。It is a figure which shows the time transition of the clock response of ECU software emulator. 内部変数を取り出すことができるようになった後のECUのソフトウェア・エミュレータのブロック図である。It is a block diagram of the software emulator of ECU after it became possible to take out an internal variable. 本発明を実施するために使用されるコンピュータのハードウェアのブロック図である。FIG. 2 is a block diagram of computer hardware used to implement the present invention. 本発明のシミュレーション・システムの機能論理ブロック図である。It is a functional logic block diagram of the simulation system of this invention. 論理プロセスの論理ブロック図である。It is a logic block diagram of a logic process. 予測モジュールの詳細な論理ブロック図である。It is a detailed logic block diagram of a prediction module. 予測モジュールの処理のフローチャートである。It is a flowchart of a process of a prediction module. 線形予測処理のフローチャートである。It is a flowchart of a linear prediction process. 予測された投機ステップと、補正された投機ステップの関係を示す図である。It is a figure which shows the relationship between the estimated speculation step and the correct | amended speculation step. グローバル・スケジューラのキューを示す図である。It is a figure which shows the queue of a global scheduler. グローバル・スケジューラの処理のフローチャートである。It is a flowchart of a process of a global scheduler.

符号の説明Explanation of symbols

604、606・・・論理プロセス
810・・・第1の記録手段
808・・・補正する手段
812・・・第2の記録手段
604, 606 ... logic process 810 ... first recording means 808 ... means for correcting 812 ... second recording means

Claims (13)

コンピュータにより制御され、時刻と値をもつイベントの送受信により動作する複数の論理プロセスをもつシミュレーション・システムであって、
前記論理プロセスは、
入来する前記イベントの値を順次記録する第1の記録手段と、
前記イベントの入来に応答して、前記入来したイベントを含む、前記記録された複数のイベントの値に基づき、先行投機実行のための複数のイベントを予測するように計算する手段と、
前記イベントの入来に応答して予測された複数のイベントを、前回のイベントの入来に応答して予測された前の複数のイベントに関連する値と比較して、誤差をとり、その累積誤差が所定の閾値以内となる第1の時点を決定する手段と、
前記論理プロセスを、前記第1の時点までロールバックさせる手段と、
前記第1の時点より後の第2の時点に至るまでに、前記累積誤差が解消されるように、前記予測された複数のイベントの値を、前記累積誤差を分散して補正する補正手段と、
前記補正されたイベントの値を記録する第2の記録手段とを有し、
前記予測された前の複数のイベントに関連する値は、前記第2の記録手段に記録されている、1つ前の補正されたイベントの値である、
シミュレーション・システム。
A simulation system having a plurality of logical processes controlled by a computer and operated by sending and receiving events having time and value,
The logical process is
First recording means for sequentially recording the value of the incoming event;
Means for calculating to predict a plurality of events for pre-speculative execution based on the recorded values of the plurality of events including the incoming event in response to the arrival of the event;
Comparing a plurality of events predicted in response to the arrival of the event with values related to previous events predicted in response to the arrival of the previous event, taking an error and accumulating Means for determining a first time point at which the error is within a predetermined threshold;
Means for rolling back the logical process to the first time point;
Correction means for correcting the predicted values of the plurality of events in a distributed manner so that the accumulated error is eliminated before reaching the second time point after the first time point; ,
Have a second recording means for recording the value of the corrected event,
The value related to the plurality of predicted previous events is the value of the previous corrected event recorded in the second recording means.
Simulation system.
前記イベントの予測は、線形予測によって実行される、請求項1のシミュレーション・システム。   The simulation system of claim 1, wherein the event prediction is performed by linear prediction. 前記イベントの予測は、前記イベントの値と時刻を予測する、請求項1のシミュレーション・システム。   The simulation system according to claim 1, wherein the event prediction predicts a value and a time of the event. 前記補正手段は、前記予測された複数のイベントの値と、前記1つ前の補正されたイベントの値の差を用いる、請求項1のシミュレーション・システム。 The simulation system according to claim 1 , wherein the correction unit uses a difference between the predicted values of the plurality of events and the value of the previous corrected event. 前記論理プロセスは、ECUエミュレータ及び物理装置シミュレータから選ばれたものである、請求項1のシミュレーション・システム。 The simulation system according to claim 1, wherein the logical process is selected from an ECU emulator and a physical device simulator. コンピュータにより制御され、時刻と値をもつイベントの送受信により動作する複数の論理プロセスをもつシミュレーション方法であって、
前記論理プロセスに入来する前記イベントの値を順次記録するステップと、
前記イベントの入来に応答して、前記入来したイベントを含む、前記記録された複数のイベントの値に基づき、先行投機実行のための複数のイベントを予測するように計算するステップと、
前記イベントの入来に応答して予測された複数のイベントを、前回のイベントの入来に応答して予測された前の複数のイベントの値と比較して、誤差をとり、その累積誤差が所定の閾値以内である第1の時点を決定するステップと、
前記論理プロセスを、前記第1の時点までロールバックさせるステップと、
前記第1の時点より後の第2の時点に至るまでに、前記累積誤差が解消されるように、前記予測された複数のイベントの値を、前記累積誤差を分散して補正するステップと、
前記補正されたイベントの値を記録するステップを有し、
前記補正するステップは、前記予測された複数のイベントの値と、1つ前の補正されたイベントの値の差を用いる、
シミュレーション方法。
A simulation method having a plurality of logical processes controlled by a computer and operated by sending and receiving events having time and value,
Sequentially recording the values of the events coming into the logical process;
Calculating to predict a plurality of events for pre-speculative execution based on the recorded values of the plurality of events including the incoming event in response to the arrival of the event;
A plurality of events predicted in response to the arrival of the event are compared with values of a plurality of previous events predicted in response to the arrival of the previous event, and an error is taken. Determining a first time point that is within a predetermined threshold;
Rolling back the logical process to the first time point;
Correcting the predicted values of the plurality of events in a distributed manner so that the accumulated error is eliminated before reaching the second time point after the first time point;
Have a step of recording the values of the corrected event,
The correcting step uses a difference between the predicted values of the plurality of events and the value of the previous corrected event.
Simulation method.
前記イベントの予測は、線形予測によって実行される、請求項6のシミュレーション方法。   The simulation method according to claim 6, wherein the prediction of the event is executed by linear prediction. 前記イベントの予測は、前記イベントの値と時刻を予測する、請求項6のシミュレーション方法。   The simulation method according to claim 6, wherein the event prediction is to predict a value and a time of the event. 前記論理プロセスは、ECUエミュレータ及び物理装置シミュレータから選ばれたものである、請求項6のシミュレーション方法。 The simulation method according to claim 6, wherein the logical process is selected from an ECU emulator and a physical device simulator. コンピュータにより制御され、時刻と値をもつイベントの送受信により動作する複数の論理プロセスをもつシミュレーション・プログラムであって、
前記コンピュータに、
前記論理プロセスに入来する前記イベントの値を順次記録するステップと、
前記イベントの入来に応答して、前記入来したイベントを含む、前記記録された複数のイベントの値に基づき、先行投機実行のための複数のイベントを予測するように計算するステップと、
前記イベントの入来に応答して予測された複数のイベントを、前回のイベントの入来に応答して予測された前の複数のイベントの値と比較して、誤差をとり、その累積誤差が所定の閾値以内である第1の時点を決定するステップと、
前記論理プロセスを、前記第1の時点までロールバックさせるステップと、
前記第1の時点より後の第2の時点に至るまでに、前記累積誤差が解消されるように、前記予測された複数のイベントの値を、前記累積誤差を分散して補正するステップと、
前記補正されたイベントの値を記録するステップを実行させ、
前記補正するステップは、前記予測された複数のイベントの値と、1つ前の補正されたイベントの値の差を用いる、
シミュレーション・プログラム。
A simulation program having a plurality of logical processes controlled by a computer and operated by sending and receiving events having time and value,
In the computer,
Sequentially recording the values of the events coming into the logical process;
Calculating to predict a plurality of events for pre-speculative execution based on the recorded values of the plurality of events including the incoming event in response to the arrival of the event;
A plurality of events predicted in response to the arrival of the event are compared with values of a plurality of previous events predicted in response to the arrival of the previous event, and an error is taken. Determining a first time point that is within a predetermined threshold;
Rolling back the logical process to the first time point;
Correcting the predicted values of the plurality of events in a distributed manner so that the accumulated error is eliminated before reaching the second time point after the first time point;
Recording the corrected event value ; and
The correcting step uses a difference between the predicted values of the plurality of events and the value of the previous corrected event.
Simulation program.
前記イベントの予測は、線形予測によって実行される、請求項10のシミュレーション・プログラム。   The simulation program according to claim 10, wherein the prediction of the event is executed by linear prediction. 前記イベントの予測は、前記イベントの値と時刻を予測する、請求項10のシミュレーション・プログラム。   The simulation program according to claim 10, wherein the event prediction predicts a value and a time of the event. 前記論理プロセスは、ECUエミュレータ及び物理装置シミュレータから選ばれたものである、請求項10のシミュレーション・プログラム。 The simulation program according to claim 10, wherein the logical process is selected from an ECU emulator and a physical device simulator.
JP2008253445A 2008-09-30 2008-09-30 Simulation method, system and program Expired - Fee Related JP5460010B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008253445A JP5460010B2 (en) 2008-09-30 2008-09-30 Simulation method, system and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008253445A JP5460010B2 (en) 2008-09-30 2008-09-30 Simulation method, system and program

Publications (2)

Publication Number Publication Date
JP2010086207A JP2010086207A (en) 2010-04-15
JP5460010B2 true JP5460010B2 (en) 2014-04-02

Family

ID=42250120

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008253445A Expired - Fee Related JP5460010B2 (en) 2008-09-30 2008-09-30 Simulation method, system and program

Country Status (1)

Country Link
JP (1) JP5460010B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5606392B2 (en) * 2011-05-23 2014-10-15 三菱電機株式会社 Distributed simulation system
JP5821745B2 (en) * 2012-03-28 2015-11-24 富士通株式会社 Simulation method, simulation apparatus, and simulation program
JP5911395B2 (en) * 2012-07-24 2016-04-27 三菱電機株式会社 Order quantity calculation apparatus, order quantity calculation method, and order quantity calculation program

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07107559B2 (en) * 1987-02-16 1995-11-15 株式会社日立製作所 Automatic operation method and automatic operation device for nuclear power plant
JPH05101015A (en) * 1991-10-07 1993-04-23 Mitsubishi Electric Corp Device and method for simulation
JP3492105B2 (en) * 1996-08-30 2004-02-03 株式会社東芝 Hardware / software co-simulation apparatus and simulation method
JPH10260954A (en) * 1997-03-19 1998-09-29 Fujitsu Ltd Circuit simulation parallelization method and medium recording circuit simulation parallelization program
JP2002312712A (en) * 2001-04-17 2002-10-25 Mitsubishi Electric Corp Distributed simulation control method
CN102708275A (en) * 2004-07-26 2012-10-03 皇家飞利浦电子股份有限公司 Decision support system for simulating execution of an executable clinical guideline
JP4413209B2 (en) * 2006-07-21 2010-02-10 富士通テン株式会社 Simulation device
WO2008047555A1 (en) * 2006-09-27 2008-04-24 Fujitsu Ten Limited Simulation device, simulation model, and simulation model forming device

Also Published As

Publication number Publication date
JP2010086207A (en) 2010-04-15

Similar Documents

Publication Publication Date Title
US8676560B2 (en) Simulation method, system and program for simulating physical unit controlled by electronic control unit
JP5179249B2 (en) Control device simulation method, system, and program
JP5224957B2 (en) Simulation method, system and program
JP5065344B2 (en) Simulation method, system and program
US9147016B2 (en) Multi-ECU simulation by using 2-layer peripherals with look-ahead time
JP5295355B2 (en) Simulation method, system and program
CN102576325B (en) Simulation method, system and program
JP4852629B2 (en) Simulation system, method and program
JP5186290B2 (en) Simulation method, system and program
EP1703391A2 (en) Vehicle control software and vehicle control apparatus
JP5460010B2 (en) Simulation method, system and program
JP5186307B2 (en) Simulation method, system and program
KR20240093640A (en) Data processing network for data processing
JP5500820B2 (en) Simulation method, system and program
Santos et al. On the timing analysis at automotive real-time embedded systems
US20250335668A1 (en) Computer-implemented method for testing and/or developing control software, and corresponding computing environment for data processing
CHAUDRON Composition du jury
Huang for Reliable Autonomous Applications with Multiple Periods

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110805

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130625

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130710

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20131217

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140114

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees