KR102634255B1 - Dynamic adaptive buffer for distributed simulation and method controlling thereof - Google Patents

Dynamic adaptive buffer for distributed simulation and method controlling thereof Download PDF

Info

Publication number
KR102634255B1
KR102634255B1 KR1020210171623A KR20210171623A KR102634255B1 KR 102634255 B1 KR102634255 B1 KR 102634255B1 KR 1020210171623 A KR1020210171623 A KR 1020210171623A KR 20210171623 A KR20210171623 A KR 20210171623A KR 102634255 B1 KR102634255 B1 KR 102634255B1
Authority
KR
South Korea
Prior art keywords
buffer
simulation
dynamic simulation
indicator
memory space
Prior art date
Application number
KR1020210171623A
Other languages
Korean (ko)
Other versions
KR20230083538A (en
Inventor
김구
Original Assignee
(주)이노시뮬레이션
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 (주)이노시뮬레이션 filed Critical (주)이노시뮬레이션
Priority to KR1020210171623A priority Critical patent/KR102634255B1/en
Publication of KR20230083538A publication Critical patent/KR20230083538A/en
Application granted granted Critical
Publication of KR102634255B1 publication Critical patent/KR102634255B1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0631Configuration or reconfiguration of storage systems by allocating resources to storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0656Data buffering arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • G06F9/3802Instruction prefetching
    • G06F9/3816Instruction alignment, e.g. cache line crossing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

본 발명의 일 실시예에 따른 동적 시뮬레이션 버퍼는 서브 시스템과 연관된 서브 모델에 대한 시뮬레이션을 실행하여 생성된 시뮬레이션 샘플이 저장되는 메모리 공간, 읽기 동작이 실행됨에 따라 상기 메모리 공간에 시뮬레이션 샘플이 저장되면 상기 읽기 동작에 따라 변경된 메모리 위치를 지시하는 제1 지시자(front), 쓰기 동작이 실행됨에 따라 상기 메모리 공간에서 시뮬레이션 샘플이 출력되면 상기 쓰기 동작에 따라 변경된 메모리 위치를 지시하는 제2 지시자(rear) 및 상기 쓰기 동작 및 읽기 동작이 수행됨에 따라 쓰기 동작에 해당하는 제1 지시자(rear)의 위치 및 제2 지시자(front)의 위치를 이동시켜 오버플로 또는 언더플로가 발생되었는지 여부를 판단하고, 상기 판단 결과에 따라 상기 시뮬레이션 버퍼의 메모리 공간을 다시 할당하여 재정렬하거나 상기 시뮬레이션 버퍼의 끝 위치를 변경하는 메모리 공간 제어부를 포함한다.The dynamic simulation buffer according to an embodiment of the present invention is a memory space in which simulation samples generated by executing a simulation for a submodel associated with a subsystem are stored. When a read operation is performed and simulation samples are stored in the memory space, the dynamic simulation buffer is a memory space in which simulation samples are stored. A first indicator (front) indicating a memory location changed according to a read operation, a second indicator (rear) indicating a memory location changed according to the write operation when a simulation sample is output from the memory space as a write operation is executed, and As the write operation and the read operation are performed, the position of the first indicator (rear) and the second indicator (front) corresponding to the write operation are moved to determine whether overflow or underflow has occurred, and the determination is made. and a memory space control unit that reallocates and rearranges the memory space of the simulation buffer or changes the end position of the simulation buffer according to the results.

Description

분산 시뮬레이션을 위한 동적 시뮬레이션 버퍼 및 이의 제어 방법{DYNAMIC ADAPTIVE BUFFER FOR DISTRIBUTED SIMULATION AND METHOD CONTROLLING THEREOF}Dynamic simulation buffer for distributed simulation and its control method {DYNAMIC ADAPTIVE BUFFER FOR DISTRIBUTED SIMULATION AND METHOD CONTROLLING THEREOF}

본 발명은 분산 시뮬레이션을 위한 동적 시뮬레이션 버퍼 및 이의 제어 방법에 관한 것으로, 보다 구체적으로 동적 시뮬레이션 시스템에서 모델의 커플링을 최소화 하여 재사용성을 높이며, 네트워크 환경의 패킷 지연 변이와 일괄 처리의 성능 개선을 위한 분산 시뮬레이션을 위한 동적 시뮬레이션 버퍼 및 이의 제어 방법에 관한 것이다.The present invention relates to a dynamic simulation buffer for distributed simulation and its control method. More specifically, it improves reusability by minimizing model coupling in a dynamic simulation system, and improves packet delay variation and batch processing performance in a network environment. It relates to a dynamic simulation buffer for distributed simulation and its control method.

자율주행 차량은 운전자의 개입 없이 스스로 주행하면서 주변환경과 주행상황을 인식하고, 그 인식 결과에 따라 차량의 운전을 제어하여 미리 설정된 목적지까지 스스로 주행하는 차량을 의미한다. An autonomous vehicle refers to a vehicle that recognizes the surrounding environment and driving conditions while driving on its own without driver intervention, controls the vehicle's operation according to the recognition results, and drives itself to a preset destination.

최근 자율주행의 인공지능 학습데이터 생성에 관하여 시뮬레이션의 필요성과 효과에 대한 많은 연구가 이루어지고 있다. 특히, 방대한 데이터를 자율주행 시뮬레이터에서 재현 할 때 많은 연산 처리량을 분산시키는 시뮬레이션 방법에 관한 연구가 활발히 진행 중이다. Recently, much research has been conducted on the necessity and effectiveness of simulation for generating artificial intelligence learning data for autonomous driving. In particular, research is actively underway on simulation methods that distribute large computational throughput when reproducing large amounts of data in autonomous driving simulators.

자율주행은 실제 자동차끼리도 서로 통신해야 하지만, 자율주행 시뮬레이터는 성능을 위해 각 모듈을 별도의 시뮬레이터에 분산하여 처리한다. 이때, 시뮬레이터들 사이에 많은 양의 패킷들이 이동되고 시뮬레이션 제어 동기 시간이 중요하므로, 매우 낮은 통신 지연이 안정적으로 제공 되는 것을 요구하게 된다.Autonomous driving requires real cars to communicate with each other, but autonomous driving simulators process each module by distributing it to a separate simulator for performance. At this time, since a large amount of packets are moved between simulators and the simulation control synchronization time is important, it is required that very low communication delay be stably provided.

또한, 기존 객체 지향적인 시뮬레이션 접근 방식은 멀티스레딩과 같은 최적화를 어렵게 만든다. 객체가 속성 값을 소유하여 캡슐화 되고 있기 때문에 각 객체들의 속성 값들은 메모리상의 불연속적인 다른 위치로 이동하면서 시뮬레이션 해야 한다. 이는 실제 시뮬레이션에 메모리에서 속성 값 들을 읽고 쓰는 작업에 많은 시간을 소비하게 하여 전체적인 시뮬레이션 처리 성능을 저하 시키는 요인으로 인식 되고 있다. Additionally, existing object-oriented simulation approaches make optimizations such as multithreading difficult. Because objects are encapsulated by possessing property values, the property values of each object must be simulated by moving to different, discontinuous locations in memory. This is recognized as a factor that reduces overall simulation processing performance by spending a lot of time reading and writing attribute values from memory in actual simulation.

최근 들어 데이터 중심적인 시뮬레이션 방법에 관한 많은 연구가 진행되고 있으나, 네트워크 환경의 패킷 지연 변이를 고려한 가변적인 시뮬레이션 모델 구성에 있어서 시뮬레이션 성능 최적화 방법에 대한 연구가 부족한 현실이다. Recently, much research has been conducted on data-centric simulation methods, but there is a lack of research on simulation performance optimization methods in configuring variable simulation models that take into account packet delay variations in the network environment.

등록특허 제10-2126270호(2020년06월18일)Registered Patent No. 10-2126270 (June 18, 2020) 등록특허 제10-2142876호(2020년08월04일)Registered Patent No. 10-2142876 (August 4, 2020) 등록특허 제10-2103430호(2020년04월16일)Registered Patent No. 10-2103430 (April 16, 2020)

본 발명은 동적 시뮬레이션 시스템에서 모델의 커플링을 최소화 하여 재사용성을 높이며, 네트워크 환경의 패킷 지연 변이와 일괄 처리의 성능 개선을 위한 분산 시뮬레이션을 위한 동적 시뮬레이션 버퍼 및 이의 제어 방법을 제공하는 것을 목적으로 한다.The purpose of the present invention is to increase reusability by minimizing model coupling in a dynamic simulation system, and to provide a dynamic simulation buffer and its control method for distributed simulation to improve packet delay variation and batch processing performance in a network environment. do.

또한, 본 발명은 동적 시뮬레이션 버퍼의 입출력을 통한 모델 및 시스템 의존성 주입 방법 제시하여 연속된 실험 데이터의 일괄 실행으로 CPU 캐시 효율 개선 및 시뮬레이션 성능 개선 효과를 높일 수 있는 분산 시뮬레이션을 위한 동적 시뮬레이션 버퍼 및 이의 제어 방법을 제공하는 것을 목적으로 한다.In addition, the present invention proposes a model and system dependency injection method through the input and output of a dynamic simulation buffer, and a dynamic simulation buffer and its The purpose is to provide a control method.

또한, 본 발명은 동적 시뮬레이션 버퍼 알고리즘을 통한 네트워크 환경의 서비스 품질 개선 효과를 높일 수 있는 분산 시뮬레이션을 위한 동적 시뮬레이션 버퍼 및 이의 제어 방법을 제공하는 것을 목적으로 한다.Additionally, the purpose of the present invention is to provide a dynamic simulation buffer for distributed simulation and a control method thereof that can increase the effect of improving service quality in a network environment through a dynamic simulation buffer algorithm.

또한, 본 발명은 재사용성 높은 서브시스템 구성 및 분산 시뮬레이션 시스템을 구성할 수 있도록 하는 분산 시뮬레이션을 위한 동적 시뮬레이션 버퍼 및 이의 제어 방법을 제공하는 것을 목적으로 한다.Additionally, the purpose of the present invention is to provide a dynamic simulation buffer for distributed simulation and a method for controlling the same, which enables the configuration of a highly reusable subsystem and a distributed simulation system.

또한, 본 발명은 다양한 분야에서 응용 및 확장 가능한 동적 시뮬레이션 버퍼 기반 실험 데이터 관리할 수 있도록 하는 분산 시뮬레이션을 위한 동적 시뮬레이션 버퍼 및 이의 제어 방법을 제공하는 것을 목적으로 한다.In addition, the purpose of the present invention is to provide a dynamic simulation buffer for distributed simulation and a control method thereof that enables management of experimental data based on a dynamic simulation buffer that can be applied and expanded in various fields.

본 발명의 목적들은 이상에서 언급한 목적으로 제한되지 않으며, 언급되지 않은 본 발명의 다른 목적 및 장점들은 하기의 설명에 의해서 이해될 수 있고, 본 발명의 실시예에 의해 보다 분명하게 이해될 것이다. 또한, 본 발명의 목적 및 장점들은 특허 청구 범위에 나타낸 수단 및 그 조합에 의해 실현될 수 있음을 쉽게 알 수 있을 것이다.The objects of the present invention are not limited to the objects mentioned above, and other objects and advantages of the present invention that are not mentioned can be understood by the following description and will be more clearly understood by the examples of the present invention. Additionally, it will be readily apparent that the objects and advantages of the present invention can be realized by the means and combinations thereof indicated in the patent claims.

이러한 목적을 달성하기 위한 분산 시뮬레이션을 위한 동적 시뮬레이션 버퍼의 제어 방법은 서브 시스템과 연관된 서브 모델에 대한 시뮬레이션을 실행하여 실험 데이터를 생성하여 동적 시뮬레이션 버퍼의 메모리 공간에 저장하는 단계, 상기 동적 시뮬레이션 버퍼에 대한 쓰기 동작 및 읽기 동작이 수행됨에 따라 쓰기 동작에 해당하는 제1 지시자(rear)의 위치 및 제2 지시자(front)의 위치를 이동시켜 오버플로 또는 언더플로가 발생되었는지 여부를 판단하는 단계 및 상기 판단 결과에 따라 상기 동적 시뮬레이션 버퍼의 메모리 공간을 다시 할당하여 재정렬하거나 상기 동적 시뮬레이션 버퍼의 끝 위치를 변경하는 단계를 포함한다.A method of controlling a dynamic simulation buffer for distributed simulation to achieve this purpose includes the steps of running a simulation on a submodel associated with a subsystem to generate experimental data and storing it in the memory space of the dynamic simulation buffer. As a write operation and a read operation are performed, determining whether overflow or underflow has occurred by moving the position of the first indicator (rear) and the second indicator (front) corresponding to the write operation; Depending on the determination result, reallocating and rearranging the memory space of the dynamic simulation buffer or changing the end position of the dynamic simulation buffer.

또한, 이러한 목적을 달성하기 위한 동적 시뮬레이션 버퍼는 서브 시스템과 연관된 서브 모델에 대한 시뮬레이션을 실행하여 생성된 시뮬레이션 샘플이 저장되는 메모리 공간, 읽기 동작이 실행됨에 따라 상기 메모리 공간에 시뮬레이션 샘플이 저장되면 상기 읽기 동작에 따라 변경된 메모리 위치를 지시하는 제1 지시자(front), 쓰기 동작이 실행됨에 따라 상기 메모리 공간에서 시뮬레이션 샘플이 출력되면 상기 쓰기 동작에 따라 변경된 메모리 위치를 지시하는 제2 지시자(rear) 및 상기 쓰기 동작 및 읽기 동작이 수행됨에 따라 쓰기 동작에 해당하는 제1 지시자(rear)의 위치 및 제2 지시자(front)의 위치를 이동시켜 오버플로 또는 언더플로가 발생되었는지 여부를 판단하고, 상기 판단 결과에 따라 상기 동적 시뮬레이션 버퍼의 메모리 공간을 다시 할당하여 재정렬하거나 상기 동적 시뮬레이션 버퍼의 끝 위치를 변경하는 메모리 공간 제어부를 포함한다.In addition, the dynamic simulation buffer to achieve this purpose is a memory space in which simulation samples generated by executing simulations for submodels associated with the subsystem are stored. When the simulation samples are stored in the memory space as a read operation is executed, the dynamic simulation buffer is a memory space in which simulation samples are stored. A first indicator (front) indicating a memory location changed according to a read operation, a second indicator (rear) indicating a memory location changed according to the write operation when a simulation sample is output from the memory space as a write operation is executed, and As the write operation and the read operation are performed, the position of the first indicator (rear) and the second indicator (front) corresponding to the write operation are moved to determine whether overflow or underflow has occurred, and the determination is made. and a memory space control unit that reallocates and rearranges the memory space of the dynamic simulation buffer or changes the end position of the dynamic simulation buffer according to the results.

전술한 바와 같은 본 발명에 의하면, 동적 시뮬레이션 시스템에서 모델의 커플링을 최소화 하여 재사용성을 높이며, 네트워크 환경의 패킷 지연 변이와 일괄 처리의 성능 개선할 수 있다는 장점이 있다.As described above, the present invention has the advantage of increasing reusability by minimizing model coupling in a dynamic simulation system and improving packet delay variation and batch processing performance in a network environment.

또한 본 발명에 의하면, 동적 시뮬레이션 버퍼의 입출력을 통한 모델 및 시스템 의존성 주입 방법 제시하여 연속된 실험 데이터의 일괄 실행으로 CPU 캐시 효율 개선 및 시뮬레이션 성능 개선 효과를 높일 수 있다는 장점이 있다.In addition, the present invention has the advantage of providing a model and system dependency injection method through the input and output of a dynamic simulation buffer, thereby improving CPU cache efficiency and improving simulation performance by batch executing continuous experimental data.

또한 본 발명에 의하면, 동적 시뮬레이션 버퍼 알고리즘을 통한 네트워크 환경의 서비스 품질 개선 효과를 높일 수 있다는 장점이 있다.Additionally, according to the present invention, there is an advantage in that the effect of improving service quality in a network environment can be increased through a dynamic simulation buffer algorithm.

또한 본 발명에 의하면, 재사용성 높은 서브시스템 구성 및 분산 시뮬레이션 시스템을 구성할 수 있다는 장점이 있다.Additionally, according to the present invention, there is an advantage of being able to configure a highly reusable subsystem and a distributed simulation system.

또한 본 발명에 의하면, 다양한 분야에서 응용 및 확장 가능한 동적 시뮬레이션 버퍼 기반 실험 데이터 관리할 수 있다는 장점이 있다.Additionally, according to the present invention, there is an advantage in that experimental data can be managed based on a dynamic simulation buffer that can be applied and expanded in various fields.

도 1은 일반적인 동적 시뮬레이션 시스템을 설명하기 위한 블록도이다.
도 2 및 도 3은 일반적인 시뮬레이션 버퍼의 실행 가정을 설명하기 위한 예시도이다.
도 4는 본 발명의 일 실시예에 따른 동적 시뮬레이션 시스템을 설명하기 위한 도면이다.
도 5는 본 발명의 일 실시예에 따른 분산 시뮬레이션을 위한 동적 시뮬레이션 버퍼를 설명하기 위한 도면이다.
도 5 및 도 6은 본 발명의 일 실시예에 따른 분산 시뮬레이션을 위한 동적 시뮬레이션 버퍼의 실행 과정을 설명하기 위한 예시도이다.
도 7은 본 발명의 일 실시예에 따른 분산 시뮬레이션을 위한 동적 시뮬레이션 버퍼의 공유 과정을 설명하기 위한 도면이다.
Figure 1 is a block diagram for explaining a general dynamic simulation system.
Figures 2 and 3 are exemplary diagrams to explain execution assumptions of a general simulation buffer.
Figure 4 is a diagram for explaining a dynamic simulation system according to an embodiment of the present invention.
Figure 5 is a diagram for explaining a dynamic simulation buffer for distributed simulation according to an embodiment of the present invention.
Figures 5 and 6 are exemplary diagrams to explain the execution process of a dynamic simulation buffer for distributed simulation according to an embodiment of the present invention.
FIG. 7 is a diagram illustrating a process of sharing a dynamic simulation buffer for distributed simulation according to an embodiment of the present invention.

전술한 목적, 특징 및 장점은 첨부된 도면을 참조하여 상세하게 후술되며, 이에 따라 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자가 본 발명의 기술적 사상을 용이하게 실시할 수 있을 것이다. 본 발명을 설명함에 있어서 본 발명과 관련된 공지 기술에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 상세한 설명을 생략한다. 이하, 첨부된 도면을 참조하여 본 발명에 따른 바람직한 실시예를 상세히 설명하기로 한다. 도면에서 동일한 참조부호는 동일 또는 유사한 구성요소를 가리키는 것으로 사용된다.The above-mentioned objects, features, and advantages will be described in detail later with reference to the attached drawings, so that those skilled in the art will be able to easily implement the technical idea of the present invention. In describing the present invention, if it is determined that a detailed description of known technologies related to the present invention may unnecessarily obscure the gist of the present invention, the detailed description will be omitted. Hereinafter, preferred embodiments according to the present invention will be described in detail with reference to the attached drawings. In the drawings, identical reference numerals are used to indicate identical or similar components.

본 명세서에서 사용된 용어 중 "시뮬레이션 버퍼"는 서로 상이한 시스템이나 모듈 사이에 읽기 또는 쓰기를 하기 위한 장치이다. 버퍼에 대한 읽기 동작은 입력 동작을 의미하고, 버퍼에 대한 쓰기 동작은 출력 동작을 의미한다. Among the terms used in this specification, “simulation buffer” is a device for reading or writing between different systems or modules. A read operation to a buffer refers to an input operation, and a write operation to a buffer refers to an output operation.

본 명세서에서 사용된 용어 중 "시뮬레이션 버퍼"의 메모리에 아무런 시뮬레이션 샘플이 저장되어 있지 않으면 제1 지시자(rear) 및 제2 지시자(front)가 메모리의 최초 위치를 동일하게 지시하고 있다. 이 상태에서, 쓰기 동작이 발생됨에 따라 메모리에 시뮬레이션 샘플이 입력되면 입력된 시뮬레이션 샘플의 크기만큼 제1 지시자(rear)의 위치가 이동되고, 읽기 동작이 발생됨에 따라 메모리에서 시뮬레이션 샘플이 출력되면 출력된 시뮬레이션 샘플의 크기만큼 제2 지시자(front)의 위치가 이동된다. Among the terms used in this specification, if no simulation samples are stored in the memory of the “simulation buffer,” the first indicator (rear) and the second indicator (front) identically indicate the initial location of the memory. In this state, when a simulation sample is input to the memory as a write operation occurs, the position of the first indicator (rear) is moved by the size of the input simulation sample, and as a read operation occurs, the simulation sample is output from the memory. The position of the second indicator (front) is moved by the size of the simulated sample.

도 1은 일반적인 동적 시뮬레이션 시스템을 설명하기 위한 블록도이다. 도 2 및 도 3은 일반적인 시뮬레이션 버퍼의 실행 가정을 설명하기 위한 예시도이다.Figure 1 is a block diagram for explaining a general dynamic simulation system. Figures 2 and 3 are exemplary diagrams to explain execution assumptions of a general simulation buffer.

도 1을 참조하면, 동적 시뮬레이션 시스템은 시뮬레이션부(1), 중앙 모델부(2) 및 시뮬레이션 버퍼(8)를 포함한다.Referring to Figure 1, the dynamic simulation system includes a simulation unit (1), a central model unit (2), and a simulation buffer (8).

시뮬레이션부(1)는 서브 시스템(즉, 인공 지능, 동역학, 시나리오, 그래픽스)을 포함하고, 중앙 모델부(2) 중 서브 시스템과 연관된 서브 모델( AI 모델, 차량 모델, 교통 모델, 객체 모델)에 대한 시뮬레이션을 실행하여 실험 데이터를 생성한다.The simulation unit (1) includes subsystems (i.e., artificial intelligence, dynamics, scenarios, graphics), and the submodels (AI model, vehicle model, traffic model, object model) associated with the subsystem among the central model unit (2) Generate experimental data by running a simulation.

이때, 시뮬레이션부(1)는 동일 주기로 서브 시스템과 연관된 서브 모델에 대한 시뮬레이션을 반복하여 수행한다. 즉, 시뮬레이션부(1)의 각각의 서브 시스템은 서브 모델을 대상으로 시뮬레이션을 실행하여 실험 데이터를 생성하며, 실험 데이터의 실행 결과를 다시 저장한다. At this time, the simulation unit 1 repeatedly performs simulations on submodels associated with the subsystem at the same cycle. That is, each subsystem of the simulation unit 1 generates experimental data by executing a simulation targeting the submodel, and stores the execution results of the experimental data again.

상기와 같이, 서브 모델에 대한 실험 데이터는 재사용될 수 있고, 중앙 모델부(2) 및 시뮬레이션 버퍼(8) 사이에서 발생된 실험 데이터의 입출력 흐름(6)에 따라 상위 로직이 결정된다. 예를 들어, 실험 데이터는 주행 환경의 다수의 객체마다 필요할 수 있고, 시뮬레이션 입출력 시간 차이를 고려하면 연속된 메모리 공간에 유지하는 것이 유리하다.As described above, the experimental data for the sub-model can be reused, and the upper logic is determined according to the input/output flow 6 of the experimental data generated between the central model unit 2 and the simulation buffer 8. For example, experimental data may be needed for multiple objects in the driving environment, and considering simulation input/output time differences, it is advantageous to maintain it in a continuous memory space.

시뮬레이션 버퍼(8)에는 시뮬레이션 샘플이 저장된다. 즉, 특정 시간의 입출력 실험 데이터가 시뮬레이션 샘플(7)로 정의되며, 시뮬레이션 샘플의 연속된 시간 단위 집합을 관리하는 컴포넌트를 시뮬레이션 버퍼(8)로 정의된다. Simulation samples are stored in the simulation buffer 8. That is, the input/output experimental data at a specific time is defined as the simulation sample (7), and the component that manages the set of continuous time units of simulation samples is defined as the simulation buffer (8).

본 발명에서는 중앙 모델부(2) 및 시뮬레이션 버퍼(8) 사이의 입출력에 따라 발생된 실험 데이터를 시뮬레이션 샘플(7)로 정의하고, 시뮬레이션 샘플(7)의 연속된 시간 단위 집합을 관리하는 모듈을 시뮬레이션 버퍼(8)로 정의한다. In the present invention, experimental data generated according to input and output between the central model unit 2 and the simulation buffer 8 are defined as simulation samples 7, and a module that manages a set of continuous time units of the simulation samples 7 is provided. Defined as simulation buffer (8).

시뮬레이션 버퍼(8)의 메모리 크기는 시뮬레이션 샘플의 크기와 시뮬레이션 샘플의 수(버퍼 크기)로 결정되는데, 시뮬레이션 샘플에는 각 객체의 실험 데이터가 모두 포함될 수 있다.The memory size of the simulation buffer 8 is determined by the size of the simulation sample and the number of simulation samples (buffer size), and the simulation sample may include all experimental data for each object.

일 실시예에서, 시뮬레이션 버퍼(8)는 동일 시간에 처리될 모든 객체의 실험 데이터를 연속적인 메모리에서 시뮬레이션 샘플을 구성하고 있고(7), 다음 시간의 시뮬레이션 샘플을 연속적으로 구성하여 시뮬레이션 버퍼(8)를 구성한다. In one embodiment, the simulation buffer 8 configures simulation samples in a memory that is continuous with experimental data of all objects to be processed at the same time (7), and sequentially configures simulation samples for the next time in the simulation buffer (8). ).

도 2의 예를 들어, 객체의 위치에 대해 구성하고 있는 시뮬레이션 샘플(9) 및 객체의 속도에 대해 구성하고 있는 시뮬레이션 샘플(9)이 시뮬레이션 버퍼(8)의 연속된 메모리 공간에 배치될 수 있다. For example in Figure 2, simulation samples 9 plotting the position of an object and simulation samples 9 plotting the velocity of the object may be placed in a contiguous memory space of the simulation buffer 8. .

시뮬레이션 버퍼(8)의 구조에서 시뮬레이션 샘플이 연속된 메모리 공간에 배치되며, 쓰기 동작(12) 및 읽기 동작(13)을 서로 다른 시간에 수행할 수 있도록 구성된다. In the structure of the simulation buffer 8, simulation samples are placed in a continuous memory space, and the write operation 12 and the read operation 13 are configured to be performed at different times.

시뮬레이션 버퍼(8)에 대한 쓰기 동작(12)이 실행됨에 따라 상기 메모리 공간에서 시뮬레이션 샘플이 입력되면 상기 쓰기 동작(12)에 따라 제2 지시자(rear)가 지시하는 메모리 위치가 변경되고, 읽기 동작(13)이 실행됨에 따라 메모리 공간에 시뮬레이션 샘플이 출력되면 읽기 동작(13)에 따라 제1 지시가(front)가 지시하는 메모리 위치가 변경된다.As the write operation 12 for the simulation buffer 8 is executed and a simulation sample is input from the memory space, the memory location indicated by the second indicator (rear) is changed according to the write operation 12, and a read operation is performed. As (13) is executed and the simulation sample is output to the memory space, the memory location indicated by the first indicator (front) is changed according to the read operation (13).

상기와 같이, 시뮬레이션 버퍼(8)에 대한 쓰기 동작(12)으로 제1 지시자(rear)의 위치가 변경되면, 제1 지시자(rear)의 위치까지 읽기 동작(13)을 시작하는 메모리를 지시하도록 제2 지시자의 위치(front)가 이동해야 한다. As described above, when the position of the first indicator (rear) changes due to the write operation 12 for the simulation buffer 8, the memory is instructed to start the read operation 13 up to the position of the first indicator (rear). The position (front) of the second indicator must move.

이와 같이, 읽기 동작(13)을 시작하는 메모리를 지시하도록 제2 지시자의 위치(front)가 이동하는 과정 중 버퍼 크기를 초과하는 쓰기 동작(12)에서 오버플로가 발생할 수 있다.As such, an overflow may occur in the write operation 12 that exceeds the buffer size during the process of moving the position (front) of the second indicator to indicate the memory starting the read operation 13.

시뮬레이션 버퍼(8)의 메모리 크기는 시뮬레이션 샘플의 크기 및 샘플의 수에 따라 결정된다. 이때, 시뮬레이션 샘플은 각 객체의 실험 데이터를 포함할 수 있다. 이하에서는, 도 2 및 도 3을 참조하여 시뮬레이션 버퍼(8)의 동작 과정을 설명하기로 한다. The memory size of the simulation buffer 8 is determined according to the size and number of simulation samples. At this time, the simulation sample may include experimental data for each object. Hereinafter, the operation process of the simulation buffer 8 will be described with reference to FIGS. 2 and 3.

도 2(a)와 같이, 객체의 위치에 대해 구성하고 있는 시뮬레이션 샘플 및 객체의 속도에 대해 구성하고 있는 시뮬레이션 샘플이 시뮬레이션 버퍼의 연속된 메모리 공간에 배치되어 있다. As shown in Figure 2(a), simulation samples configuring the position of the object and simulation samples configuring the velocity of the object are arranged in a continuous memory space of the simulation buffer.

그 후, 도 2(b)와 같이 쓰기 동작(12) 및 읽기 동작(13)은 서로 다른 시간에 수행할 수 있도록 구성된다. 시뮬레이션 버퍼(8)에서 쓰기 동작(12)이 실행됨에 따라 상기 메모리 공간에서 시뮬레이션 샘플이 입력되면 쓰기 동작(12)에 따라 제2 지시자(rear)가 지시하는 메모리 위치가 변경되며, 도 2(c)와 같이 쓰기 동작(12)에 해당하는 제2 지시자(rear)의 위치까지 읽기 동작(13)에 해당하는 제1 지시자(front)의 위치가 이동할 수 있다. Thereafter, as shown in FIG. 2(b), the write operation 12 and the read operation 13 are configured to be performed at different times. As the write operation 12 is executed in the simulation buffer 8, when a simulation sample is input from the memory space, the memory location indicated by the second indicator (rear) changes according to the write operation 12, as shown in Figure 2 (c) ), the position of the first indicator (front) corresponding to the read operation 13 may be moved to the position of the second indicator (rear) corresponding to the write operation 12.

하지만, 도 2(c)와 같이 쓰기 동작(12)에 해당하는 제1 지시자(rear)의 위치까지 읽기 동작(13)에 해당하는 제2 지시자(front)가 이동하는 과정 중 제1 지시자(rear)가 이동할 메모리 공간이 존재하지 않아 버퍼 크기를 초과하는 쓰기 동작(12)이 발생되어 도 2(c)와 같은 오버플로(16)가 발생할 수 있다.However, as shown in Figure 2(c), during the process of moving the second indicator (front) corresponding to the read operation 13 to the position of the first indicator (rear) corresponding to the write operation 12, the first indicator (rear) Since there is no memory space to move ), a write operation 12 that exceeds the buffer size may occur, resulting in an overflow 16 as shown in FIG. 2(c).

상기와 같이, 시뮬레이션부(1)에 의해 실험 데이터가 생성되면 시뮬레이션 샘플로서 메모리 공간에 배치되며, 시뮬레이션 버퍼(8)에서 시뮬레이션 버퍼(8)에서 쓰기 동작(12)이 실행됨에 따라 상기 메모리 공간에서 시뮬레이션 샘플이 입력되면 쓰기 동작(12)에 따라 제1 지시자(rear)가 지시하는 메모리 위치가 변경되며, 도 2(c)와 같이 쓰기 동작(12)에 해당하는 제1 지시자(rear)의 위치까지 읽기 동작(13)에 해당하는 제2 지시자(front)의 위치가 이동할 수 있다. As described above, when experimental data is generated by the simulation unit 1, it is placed in the memory space as a simulation sample, and as the write operation 12 is executed in the simulation buffer 8, it is stored in the memory space. When a simulation sample is input, the memory location indicated by the first indicator (rear) changes according to the write operation 12, and the position of the first indicator (rear) corresponding to the write operation 12 is changed as shown in FIG. 2(c). The position of the second indicator (front) corresponding to the read operation 13 may be moved.

이와 같이, 쓰기 동작(12)으로 이동된 제1 지시자(rear)의 위치까지 읽기 동작(13)에 해당하는 제2 지시자(front)의 위치가 이동하는 과정 중 버퍼 크기를 초과하는 쓰기 동작(12)에서 오버플로가 발생할 수 있다. In this way, during the process of moving the position of the second indicator (front) corresponding to the read operation (13) to the position of the first indicator (rear) moved by the write operation (12), the write operation (12) exceeds the buffer size. ), overflow may occur.

이러한 문제점을 해결하기 위해서, 상기와 같이 시뮬레이션 버퍼 크기를 초과하는 쓰기 동작에서 오버플로(16)가 발생하는 상황에서, 읽기 동작(13)으로 인해 제2 지시자(front)가 이동되어야 하는 크기 만큼 가용된 가용 공간(25)에서 쓰기 동작이 수행될 수 있다. 이때, 가용 공간(25)은 읽기 동작으로 인해 제2 지시자(front)가 이동되어야하는 크기에 해당될 수 있다. To solve this problem, in a situation where overflow 16 occurs in a write operation that exceeds the simulation buffer size as described above, the second indicator (front) is available by the amount to be moved due to the read operation 13. A write operation may be performed in the available space 25. At this time, the available space 25 may correspond to the size to which the second indicator (front) must be moved due to the read operation.

이를 위해, 제2 지시자(front)가 지시하는 메모리의 위치가 시뮬레이션 버퍼의 끝(26)에 도달할 때 까지 읽기 동작이 실행된 후 부족한 시뮬레이션 샘플은 다시 시뮬레이션 버퍼의 처음 위치에서 다시 시작하여 순환한다(27).To this end, the read operation is performed until the memory location indicated by the second indicator (front) reaches the end 26 of the simulation buffer, and then the insufficient simulation samples start again from the first location of the simulation buffer and cycle. (27).

하지만, 쓰기 동작(12) 및 읽기 동작(13)이 일정한 주기로 수행 된다면 무한대로 순환 할 수 있지만, 쓰기 동작(12)에 해당하는 제1 지시자(rear)의 위치가 읽기 동작(13)에 해당하는 제2 지시자(front)의 위치를 다시 추월하는 오버플로 상황이 될 수 있다. 반대로, 읽기 동작이 쓰기 동작보다 빨리 실행되어 읽기 동작을 수행해야 하는 샘플이 비어있거나(28), 언더플로(29) 상황이 발생 할 수 있다.However, if the write operation (12) and the read operation (13) are performed at regular intervals, they can cycle indefinitely, but the position of the first indicator (rear) corresponding to the write operation (12) is the position of the first indicator (rear) corresponding to the read operation (13). There may be an overflow situation that overtakes the position of the second indicator (front) again. Conversely, because the read operation is executed faster than the write operation, a situation in which the sample for which the read operation is to be performed may be empty (28) or underflow (29) may occur.

도 4는 본 발명의 일 실시예에 따른 동적 시뮬레이션 시스템을 설명하기 위한 도면이다. Figure 4 is a diagram for explaining a dynamic simulation system according to an embodiment of the present invention.

도 4의 동적 시뮬레이션 시스템은 송신 시뮬레이터 및 수신 시뮬레이터 각각에 적용될 수 있다. 만일, 동적 시뮬레이션 시스템이 송신 시뮬레이터 및 수신 시뮬레이터 각각에 적용되더라고 송신 시뮬레이터 및 수신 시뮬레이터 사이의 클럭이 상이하여 데이터 송수신 지연 시간의 오차가 발생하게 된다. 이러한 데이터 송수신 지연 시간의 오차는 좋지 못한 시뮬레이션 결과를 만들어낼 수 있다. The dynamic simulation system of FIG. 4 can be applied to each of the transmitting simulator and the receiving simulator. Even if the dynamic simulation system is applied to each of the transmission simulator and the reception simulator, the clocks between the transmission simulator and the reception simulator are different, resulting in an error in data transmission and reception delay time. This error in data transmission and reception delay time can produce poor simulation results.

따라서, 송신 시뮬레이터는 전송 패킷에 한 프레임에서 생성된 로컬 시간의 타임 스탬프(Ts)를 기록하여 수신 시뮬레이터에 전송한다. 따라서, 수신 시뮬레이터는 전송 패킷에 기록된 타임 스탬프(Ts) 및 수신 시간(Tr)을 이용하여 지연 시간(D)을 업데이트한다. 즉, 송신 시뮬레이터는 하기의 [수학식 1]을 기초로 지연 시간(D)을 산출할 수 있다.Therefore, the transmitting simulator records the time stamp (Ts) of the local time generated in one frame in the transmission packet and transmits it to the receiving simulator. Therefore, the reception simulator updates the delay time (D) using the time stamp (Ts) and reception time (Tr) recorded in the transmission packet. That is, the transmission simulator can calculate the delay time (D) based on [Equation 1] below.

[수학식 1][Equation 1]

D(n) = Tr(n) - Ts(n)D(n) = Tr(n) - Ts(n)

D: 지연 시간, D: delay time,

Ts: 전송 패킷에 기록된 타임 스탬프Ts: Timestamp recorded on transmission packet

Tr: 수신 시간Tr: reception time

이와 같은 이유는, 송신 시뮬레이터 및 수신 시뮬레이터들이 서로 다른 시간에 초기화되었거나 전송 준비 소요의 가변 시간, 네트워크 전송 시간 등이 포함되어 있기 때문에 송신 시뮬레이터의 타임 라인 및 수신 시뮬레이터의 타임 라인의 동기가 필요하다. The reason for this is that the transmission simulator and the reception simulator are initialized at different times or include variable time for transmission preparation, network transmission time, etc., so the timeline of the transmission simulator and the timeline of the reception simulator need to be synchronized.

따라서, 송신 시뮬레이터는 송신 시뮬레이터 및 수신 시뮬레이터 각각에 대해서 두 클럭 사이의 지연 시간을 지속적으로 추적하여 [수학식 2]와 같이 최소 값으로 상대 오프셋(Offst)을 갱신한 후, [수학식 3]과 같이 송신기 타임 스탬프에 오프셋(Offset)을 추가하여 수신 시뮬레이터의 타임 라인의 시간(T)을 도출한다. Therefore, the transmission simulator continuously tracks the delay time between the two clocks for each of the transmission simulator and the reception simulator, updates the relative offset (Offst) to the minimum value as in [Equation 2], and then uses [Equation 3] and Likewise, the time (T) of the receiving simulator's timeline is derived by adding an offset to the transmitter time stamp.

[수학식 2][Equation 2]

Offset(n) = min(D(n), Offset(n-1))Offset(n) = min(D(n), Offset(n-1))

Offset: 상대 오프셋,Offset: relative offset,

min(): 상대 오프셋 중 최소값을 결정하는 함수,min(): Function to determine the minimum value among relative offsets,

D: 지연 시간,D: delay time,

[수학식 3][Equation 3]

T(n) = Ts(n) + Offset(n)T(n) = Ts(n) + Offset(n)

T: 수신 시뮬레이터의 타임 라인의 시간T: Time of the receiving simulator's timeline

Offset: 오프셋,Offset: offset,

Ts: 전송 패킷에 기록된 타임 스탬프Ts: Timestamp recorded on transmission packet

일반적으로, 송신 시뮬레이터 및 수신 시뮬레이터 사이의 클럭은 약간 다른 속도로 실행될 수 있기 때문에 시뮬레이터 버퍼의 오버플로 또는 언더플로가 발생할 수 있다.Typically, the clocks between the transmitting and receiving simulators may run at slightly different rates, which can result in overflow or underflow of the simulator buffer.

도 5는 본 발명의 일 실시예에 따른 분산 시뮬레이션을 위한 동적 시뮬레이션 버퍼를 설명하기 위한 도면이다. Figure 5 is a diagram for explaining a dynamic simulation buffer for distributed simulation according to an embodiment of the present invention.

도 5를 참조하면, 분산 시뮬레이션을 위한 동적 시뮬레이션 버퍼는 메모리 공간(110), 제1 지시자(120), 제2 지시자(130) 및 메모리 공간 제어부(140)를 포함한다. Referring to FIG. 5, the dynamic simulation buffer for distributed simulation includes a memory space 110, a first indicator 120, a second indicator 130, and a memory space control unit 140.

메모리 공간(110)에는 서브 시스템과 연관된 서브 모델에 대한 시뮬레이션을 실행하여 생성된 시뮬레이션 샘플이 저장된다. The memory space 110 stores simulation samples generated by executing simulations on submodels associated with subsystems.

제1 지시자(120)는 읽기 동작이 실행됨에 따라 상기 메모리 공간에 시뮬레이션 샘플이 출력되면 상기 읽기 동작에 따라 변경된 메모리 위치를 지시한다. When a simulation sample is output to the memory space as a read operation is performed, the first indicator 120 indicates a memory location changed according to the read operation.

제2 지시자(130)는 쓰기 동작이 실행됨에 따라 상기 메모리 공간에서 시뮬레이션 샘플이 저장되면 상기 쓰기 동작에 따라 변경된 메모리 위치를 지시한다. The second indicator 130 indicates a memory location changed according to the write operation when the simulation sample is stored in the memory space as the write operation is performed.

메모리 공간 제어부(140)는 메모리 공간(110)에 대한 쓰기 동작 및 읽기 동작이 수행됨에 따라 쓰기 동작에 해당하는 제1 지시자(rear)의 위치 및 제2 지시자(front)의 위치를 이동시켜 오버플로 또는 언더플로가 발생되었는지 여부를 판단한다. As a write operation and a read operation are performed on the memory space 110, the memory space control unit 140 moves the positions of the first indicator (rear) and the second indicator (front) corresponding to the write operation to prevent overflow. Or, determine whether underflow has occurred.

일 실시예에서, 메모리 공간 제어부(140)는 동적 시뮬레이션 버퍼에 대한 쓰기 동작이 수행되면 상기 쓰기 동작에 해당하는 제1 지시자(rear)의 위치까지 읽기 동작에 해당하는 제2 지시자(front)의 위치를 이동시키고, 상기 제2 지시자(front)의 위치가 이동하는 과정 중 상기 시뮬레이션 버퍼의 크기를 초과하면 오버플로가 발생되었다고 판단할 수 있다. In one embodiment, when a write operation on the dynamic simulation buffer is performed, the memory space control unit 140 determines the position of the second indicator (front) corresponding to the read operation up to the position of the first indicator (rear) corresponding to the write operation. is moved, and if the position of the second indicator (front) exceeds the size of the simulation buffer during the movement, it may be determined that an overflow has occurred.

상기의 실시예에서, 메모리 공간 제어부(140)는 시뮬레이션 원형 버퍼에서 오버플로가 발생하는 경우를 위해, 시뮬레이션 버퍼의 메모리 공간을 다시 할당하고, 메모리 상태를 재 정렬한다. 이때, 새로운 시뮬레이션 버퍼의 크기는 요청 크기의 절반을 추가한 크기로 계산하고, 버퍼 크기를 요청 크기로 변경한다. 이는 빈번한 메모리 동적 할당 및 복사 비용을 줄이기 위한 합리적인 선택이다. 이때, 새로운 시뮬레이션 버퍼의 크기는 이하의 [수학식 4]를 기초로 결정된다.In the above embodiment, the memory space control unit 140 reallocates the memory space of the simulation buffer and rearranges the memory state in case an overflow occurs in the simulation circular buffer. At this time, the size of the new simulation buffer is calculated by adding half of the requested size, and the buffer size is changed to the requested size. This is a reasonable choice to reduce the cost of frequent memory dynamic allocation and copying. At this time, the size of the new simulation buffer is determined based on [Equation 4] below.

[수학식 4][Equation 4]

다른 일 실시예에서, 메모리 공간 제어부(140)는 상기 동적 시뮬레이션 버퍼에 대한 쓰기 동작이 수행되면 상기 쓰기 동작으로 이동되는 제1 지시자(rear)의 위치의 이전에 읽기 동작에 해당하는 제2 지시자(front)가 위치하는 경우 언더플로가 발생되었다고 판단할 수 있다.In another embodiment, when a write operation on the dynamic simulation buffer is performed, the memory space control unit 140 displays a second indicator (rear) corresponding to the read operation before the position of the first indicator (rear) to be moved to the write operation. front), it can be determined that underflow has occurred.

상기의 실시예에서, 메모리 공간 제어부(140)는 동적 시뮬레이션 버퍼의 크기의 절반에 해당하는 값을 지연 추정치로 산출하고, 상기 지연 추정치를 반영하여 상기 동적 시뮬레이션 버퍼의 크기를 변경할 수 있다. 즉, 메모리 공간 제어부(140)는 원형 시뮬레이션 버퍼에서 언더플로가 발생할 때, 메모리 재 할당 없이 시뮬레이션 버퍼의 크기를 줄이기 위해 시뮬레이션 버퍼의 끝 위치를 요청 크기로 변경한다. In the above embodiment, the memory space control unit 140 may calculate a value corresponding to half the size of the dynamic simulation buffer as a delay estimate, and change the size of the dynamic simulation buffer by reflecting the delay estimate. That is, when underflow occurs in the circular simulation buffer, the memory space control unit 140 changes the end position of the simulation buffer to the requested size in order to reduce the size of the simulation buffer without reallocating memory.

이때, 원형 시뮬레이션 버퍼의 특성상 읽기 동작의 시작 시점은 쓰기 위치가 버퍼의 절반 위치에 있을 때 시작해야 보다 안정적으로 동작하는 것으로 알려져 있다. 즉, 시뮬레이션 버퍼 크기가 클수록 지연 시간은 증가하고, 작을수록 안정성을 확보하기 어렵기 때문에, 현재 지연 추정치를 반영하여 버퍼 크기를 변경해야 한다. 이때, 현재 지연 추정치는 이하의 [수학식 5]를 기초로 결정된다.At this time, due to the characteristics of the circular simulation buffer, it is known that the start point of the read operation operates more stably when the write position is at the halfway position of the buffer. In other words, the larger the simulation buffer size, the more the delay time increases, and the smaller it is, the more difficult it is to ensure stability, so the buffer size must be changed to reflect the current delay estimate. At this time, the current delay estimate is determined based on [Equation 5] below.

[수학식 5][Equation 5]

도 5는 본 발명의 일 실시예에 따른 분산 시뮬레이션을 위한 동적 시뮬레이션 버퍼의 실행 과정을 설명하기 위한 예시도이다.Figure 5 is an example diagram for explaining the execution process of a dynamic simulation buffer for distributed simulation according to an embodiment of the present invention.

도 5 및 도 6을 참조하면, 메모리 공간 제어부는 메모리 공간에 대한 쓰기 동작 및 읽기 동작이 수행됨에 따라 쓰기 동작에 해당하는 제1 지시자(rear)의 위치 및 제2 지시자(front)의 위치를 이동시켜 오버플로 또는 언더플로가 발생되었는지 여부를 판단한다. Referring to Figures 5 and 6, the memory space control unit moves the positions of the first indicator (rear) and the second indicator (front) corresponding to the write operation as write and read operations are performed on the memory space. to determine whether overflow or underflow has occurred.

일 실시예에서, 메모리 공간 제어부는 동적 시뮬레이션 버퍼에 대한 쓰기 동작이 수행되면 상기 쓰기 동작에 해당하는 제1 지시자(rear)의 위치까지 읽기 동작에 해당하는 제2 지시자(front)의 위치를 이동시키고, 상기 제2 지시자(front)의 위치가 이동하는 과정 중 상기 시뮬레이션 버퍼의 크기를 초과하면 오버플로가 발생되었다고 판단할 수 있다. In one embodiment, when a write operation on the dynamic simulation buffer is performed, the memory space control unit moves the position of the second indicator (front) corresponding to the read operation to the position of the first indicator (rear) corresponding to the write operation. , If the position of the second indicator (front) exceeds the size of the simulation buffer during the process of movement, it may be determined that overflow has occurred.

메모리 공간 제어부는 도 5(a)와 같이 시뮬레이션 원형 버퍼에서 오버플로가 발생하는 경우(30)를 위해, 도 5(b)와 같이 시뮬레이션 버퍼의 메모리 공간을 다시 할당하고(31), 메모리 상태를 재 정렬한다(33). 이때, 새로운 시뮬레이션 버퍼의 크기는 요청 크기의 절반을 추가한 크기로 계산하고(31), 버퍼 크기를 요청 크기로 변경한다(32). 이는 빈번한 메모리 동적 할당 및 복사 비용을 줄이기 위한 합리적인 선택이다. In case an overflow occurs in the simulation circular buffer as shown in FIG. 5(a) (30), the memory space control unit reallocates the memory space of the simulation buffer as shown in FIG. 5(b) (31) and changes the memory state. Reorder (33). At this time, the size of the new simulation buffer is calculated by adding half of the requested size (31), and the buffer size is changed to the requested size (32). This is a reasonable choice to reduce the cost of frequent memory dynamic allocation and copying.

다른 일 실시예에서, 메모리 공간 제어부는 상기 동적 시뮬레이션 버퍼에 대한 쓰기 동작이 수행되면 상기 쓰기 동작으로 이동되는 제1 지시자(rear)의 위치의 이전에 읽기 동작에 해당하는 제2 지시자(front)가 위치하는 경우 도 6(a)와 같이 언더플로가 발생되었다고 판단할 수 있다.In another embodiment, when a write operation on the dynamic simulation buffer is performed, the memory space control unit sets a second indicator (front) corresponding to a read operation before the position of the first indicator (rear) moved by the write operation. If it is located, it can be determined that underflow has occurred, as shown in FIG. 6(a).

상기의 실시예에서, 메모리 공간 제어부는 도 6(b)와 같이 동적 시뮬레이션 버퍼의 크기의 절반에 해당하는 값을 지연 추정치로 산출하고, 상기 지연 추정치를 반영하여 상기 동적 시뮬레이션 버퍼의 크기를 변경할 수 있다. In the above embodiment, the memory space control unit may calculate a value corresponding to half the size of the dynamic simulation buffer as a delay estimate, as shown in FIG. 6(b), and change the size of the dynamic simulation buffer by reflecting the delay estimate. there is.

즉, 메모리 공간 제어부는 원형 시뮬레이션 버퍼에서 언더플로가 발생할 때, 메모리 재 할당 없이 시뮬레이션 버퍼의 크기를 줄이기 위해 시뮬레이션 버퍼의 끝 위치를 요청 크기로 변경한다(36). That is, when underflow occurs in the circular simulation buffer, the memory space control unit changes the end position of the simulation buffer to the requested size to reduce the size of the simulation buffer without reallocating memory (36).

도 7은 본 발명의 일 실시예에 따른 분산 시뮬레이션을 위한 동적 시뮬레이션 버퍼의 공유 과정을 설명하기 위한 도면이다. FIG. 7 is a diagram illustrating a process of sharing a dynamic simulation buffer for distributed simulation according to an embodiment of the present invention.

도 7을 참조하면, 시뮬레이션의 중요한 목적은 모델을 지속적으로 시뮬레이션하고 그 결과를 통해 실험 모델을 검증하는 데 있다. 실험자는 모니터링 도구와 같이 직관적이고 반복적으로 결과를 확인할 수 있는 실험 틀이 필요하다. 실험자가 실험 틀을 통해 시뮬레이션에 개입할 수 있는 사용자 인터페이스와 실험 결과의 가시화 또는 데이터 로깅이 대표적이다.Referring to Figure 7, the important purpose of simulation is to continuously simulate the model and verify the experimental model through the results. Experimenters need an experimental framework that can intuitively and repeatedly check results, such as a monitoring tool. Representative examples include a user interface that allows the experimenter to intervene in the simulation through an experiment framework, and visualization or data logging of experiment results.

이 시스템들은 실험 데이터를 읽기 전용으로 단순 전송을 수행 하거나 일대다의 흐름 제어를 위해 사용되는데, 시뮬레이션 버퍼간의 입출력이 가능 하도록 데이터 공유 버퍼(40) 및 참조 버퍼(41) 기능으로 확장한다.These systems are used to perform simple read-only transfer of experimental data or for one-to-many flow control, and are extended to the data sharing buffer (40) and reference buffer (41) functions to enable input and output between simulation buffers.

실시예의 공유 버퍼(40)의 데이터를 참조 버퍼(41)에서 공유한다고 할 때, 공유 시점은 공유 버퍼(40)에 쓰기 동작(43) 또는 읽기 동작(45)이 발생 할 때 마다 관리되는 모든 참조 버퍼(41)에 동일한 데이터 쓰기 동작을 수행한다(44, 46).When data in the shared buffer 40 of the embodiment is shared in the reference buffer 41, the sharing point is all managed references whenever a write operation 43 or a read operation 45 occurs in the shared buffer 40. The same data writing operation is performed in the buffer 41 (44, 46).

또한, 참조 버퍼(41)의 쓰기 동작(48)은 공유 버퍼(40)에 의해 수행되지만(47), 읽기 동작은 컴포넌트의 실행 시점에 입력 데이터 읽기에 의해 수행 된다(49).In addition, the write operation 48 of the reference buffer 41 is performed by the shared buffer 40 (47), but the read operation is performed by reading input data at the time of component execution (49).

시뮬레이션 로직은 주로 갱신 모델들 사이에서 이루어지고, 입출력 버퍼는 대부분 공유 되므로 버퍼의 수를 최적화하는데 어려움이 없다. 하지만, 분산 시뮬레이션 환경에서 패킷 송수신 버퍼와 다양한 모니터링용 출력 버퍼의 수가 증가하여 전체 시스템 로직이 점점 복잡해 질 수 있기 때문에, 중복된 버퍼의 수를 줄이고 공유버퍼의 활용으로 불필요한 입출력의 오버헤드를 줄이는 노력이 필요하다. Simulation logic is mainly performed between update models, and most input and output buffers are shared, so there is no difficulty in optimizing the number of buffers. However, in a distributed simulation environment, the overall system logic can become increasingly complex as the number of packet transmission/reception buffers and various output buffers for monitoring increases, so efforts are being made to reduce unnecessary input/output overhead by reducing the number of duplicate buffers and utilizing shared buffers. This is needed.

한정된 실시예와 도면에 의해 설명되었으나, 본 발명은 상기의 실시예에 한정되는 것은 아니며, 이는 본 발명이 속하는 분야에서 통상의 지식을 가진 자라면 이러한 기재로부터 다양한 수정 및 변형이 가능하다. 따라서, 본 발명 사상은 아래에 기재된 특허청구범위에 의해서만 파악되어야 하고, 이의 균등 또는 등가적 변형 모두는 본 발명 사상의 범주에 속한다고 할 것이다.Although the present invention has been described with reference to limited embodiments and drawings, the present invention is not limited to the above embodiments, and various modifications and variations can be made by those skilled in the art from these descriptions. Accordingly, the spirit of the present invention should be understood only by the scope of the claims set forth below, and all equivalent or equivalent modifications thereof shall fall within the scope of the spirit of the present invention.

Claims (10)

분산 시뮬레이션을 위한 동적 시뮬레이션 버퍼의 제어 방법에 있어서,
서브 시스템과 연관된 서브 모델에 대한 시뮬레이션을 실행하여 실험 데이터를 생성하여 동적 시뮬레이션 버퍼의 메모리 공간에 저장하는 단계;
상기 동적 시뮬레이션 버퍼에 대한 쓰기 동작 및 읽기 동작이 수행됨에 따라 쓰기 동작에 해당하는 제1 지시자(rear)의 위치 및 읽기 동작에 해당하는 제2 지시자(front)의 위치를 이동시켜 오버플로 또는 언더플로가 발생되었는지 여부를 판단하는 단계; 및
상기 판단 결과에 따라 상기 동적 시뮬레이션 버퍼의 메모리 공간을 다시 할당하여 재정렬하거나 상기 동적 시뮬레이션 버퍼의 끝 위치를 변경하는 단계를 포함하는 것을 특징으로 하는
분산 시뮬레이션을 위한 동적 시뮬레이션 버퍼의 제어 방법.
In a method of controlling a dynamic simulation buffer for distributed simulation,
Running a simulation on a submodel associated with a subsystem to generate experimental data and storing it in the memory space of a dynamic simulation buffer;
As write and read operations are performed on the dynamic simulation buffer, the position of the first indicator (rear) corresponding to the write operation and the position of the second indicator (front) corresponding to the read operation are moved to cause overflow or underflow. determining whether has occurred; and
Characterized in that it includes the step of reallocating and rearranging the memory space of the dynamic simulation buffer or changing the end position of the dynamic simulation buffer according to the determination result.
Control method of dynamic simulation buffer for distributed simulation.
제1항에 있어서,
상기 오버플로 또는 언더플로가 발생되었는지 여부를 판단하는 단계는
상기 동적 시뮬레이션 버퍼에 대한 쓰기 동작이 수행되면 상기 쓰기 동작에 해당하는 제1 지시자(rear)의 위치까지 읽기 동작에 해당하는 제2 지시자(front)의 위치를 이동시키는 단계; 및
상기 제2 지시자(front)의 위치가 이동하는 과정 중 상기 동적 시뮬레이션 버퍼의 크기를 초과하면 오버플로가 발생되었다고 판단하는 단계를 포함하는 것을 특징으로 하는
분산 시뮬레이션을 위한 동적 시뮬레이션 버퍼의 제어 방법.
According to paragraph 1,
The step of determining whether overflow or underflow has occurred is
When a write operation on the dynamic simulation buffer is performed, moving the position of a second indicator (front) corresponding to a read operation to the position of a first indicator (rear) corresponding to the write operation; and
Characterized in that it includes the step of determining that an overflow has occurred if the size of the dynamic simulation buffer is exceeded during the process of moving the position of the second indicator (front).
Control method of dynamic simulation buffer for distributed simulation.
제1항에 있어서,
상기 판단 결과에 따라 상기 동적 시뮬레이션 버퍼의 메모리 공간을 다시 할당하여 재정렬하거나 상기 동적 시뮬레이션 버퍼의 끝 위치를 변경하는 단계는
상기 오버플로에 따른 요청 크기의 절반 및 상기 요청 크기를 이용하여 동적 시뮬레이션 버퍼의 메모리 공간을 다시 할당하여 재정렬하는 단계를 포함하는 것을 특징으로 하는
분산 시뮬레이션을 위한 동적 시뮬레이션 버퍼의 제어 방법.
According to paragraph 1,
The step of reallocating and rearranging the memory space of the dynamic simulation buffer or changing the end position of the dynamic simulation buffer according to the determination result is
Characterized in that it includes the step of reallocating and rearranging the memory space of the dynamic simulation buffer using half of the request size due to the overflow and the request size.
Control method of dynamic simulation buffer for distributed simulation.
제1항에 있어서,
상기 오버플로 또는 언더플로가 발생되었는지 여부를 판단하는 단계는
상기 동적 시뮬레이션 버퍼에 대한 쓰기 동작이 수행되면 상기 쓰기 동작으로 이동되는 제1 지시자(rear)의 위치의 이전에 읽기 동작에 해당하는 제2 지시자(front)가 위치하는 경우 언더플로가 발생되었다고 판단하는 단계를 포함하는 것을 특징으로 하는
분산 시뮬레이션을 위한 동적 시뮬레이션 버퍼의 제어 방법.
According to paragraph 1,
The step of determining whether overflow or underflow has occurred is
When a write operation to the dynamic simulation buffer is performed, if the second indicator (front) corresponding to the read operation is located before the position of the first indicator (rear) moved by the write operation, it is determined that an underflow has occurred. Characterized by comprising the steps
Control method of dynamic simulation buffer for distributed simulation.
제1항에 있어서,
상기 판단 결과에 따라 상기 동적 시뮬레이션 버퍼의 메모리 공간을 다시 할당하여 재정렬하거나 상기 동적 시뮬레이션 버퍼의 끝 위치를 변경하는 단계는
상기 동적 시뮬레이션 버퍼의 크기의 절반에 해당하는 값을 지연 추정치로 산출하고, 상기 지연 추정치를 반영하여 상기 동적 시뮬레이션 버퍼의 크기를 변경하는 단계를 포함하는 것을 특징으로 하는
분산 시뮬레이션을 위한 동적 시뮬레이션 버퍼의 제어 방법.
According to paragraph 1,
The step of reallocating and rearranging the memory space of the dynamic simulation buffer or changing the end position of the dynamic simulation buffer according to the determination result is
Calculating a value corresponding to half the size of the dynamic simulation buffer as a delay estimate, and changing the size of the dynamic simulation buffer by reflecting the delay estimate.
Control method of dynamic simulation buffer for distributed simulation.
동적 시뮬레이션 버퍼에 있어서,
서브 시스템과 연관된 서브 모델에 대한 시뮬레이션을 실행하여 생성된 시뮬레이션 샘플이 저장되는 메모리 공간;
읽기 동작이 실행됨에 따라 상기 메모리 공간에 시뮬레이션 샘플이 저장되면 상기 읽기 동작에 따라 변경된 메모리 위치를 지시하는 제2 지시자(front);
쓰기 동작이 실행됨에 따라 상기 메모리 공간에서 시뮬레이션 샘플이 출력되면 상기 쓰기 동작에 따라 변경된 메모리 위치를 지시하는 제1 지시자(rear);
상기 쓰기 동작 및 읽기 동작이 수행됨에 따라 쓰기 동작에 해당하는 제1 지시자(rear)의 위치 및 읽기 동작에 해당하는 제2 지시자(front)의 위치를 이동시켜 오버플로 또는 언더플로가 발생되었는지 여부를 판단하고, 상기 판단 결과에 따라 동적 시뮬레이션 버퍼의 메모리 공간을 다시 할당하여 재정렬하거나 동적 시뮬레이션 버퍼의 끝 위치를 변경하는 메모리 공간 제어부를 포함하는 것을 특징으로 하는
동적 시뮬레이션 버퍼.
In the dynamic simulation buffer,
A memory space where simulation samples generated by running a simulation for a submodel associated with a subsystem are stored;
When a simulation sample is stored in the memory space as a read operation is performed, a second indicator (front) indicates a memory location changed according to the read operation;
When a simulation sample is output from the memory space as a write operation is performed, a first indicator (rear) indicates a memory location changed according to the write operation;
As the write and read operations are performed, the position of the first indicator (rear) corresponding to the write operation and the position of the second indicator (front) corresponding to the read operation are moved to determine whether overflow or underflow has occurred. Characterized by comprising a memory space control unit that determines, and reallocates and rearranges the memory space of the dynamic simulation buffer according to the determination result, or changes the end position of the dynamic simulation buffer.
Dynamic simulation buffer.
제6항에 있어서,
상기 메모리 공간 제어부는
상기 동적 시뮬레이션 버퍼에 대한 쓰기 동작이 수행되면 상기 쓰기 동작에 해당하는 제1 지시자(rear)의 위치까지 읽기 동작에 해당하는 제2 지시자(front)의 위치를 이동시키고, 상기 제2 지시자(front)의 위치가 이동하는 과정 중 상기 동적 시뮬레이션 버퍼의 크기를 초과하면 오버플로가 발생되었다고 판단하는 것을 특징으로 하는
동적 시뮬레이션 버퍼.
According to clause 6,
The memory space control unit
When a write operation to the dynamic simulation buffer is performed, the position of the second indicator (front) corresponding to the read operation is moved to the position of the first indicator (rear) corresponding to the write operation, and the second indicator (front) is moved to the position of the first indicator (rear) corresponding to the write operation. Characterized in that it is determined that an overflow has occurred if the size of the dynamic simulation buffer is exceeded during the process of moving the position.
Dynamic simulation buffer.
제6항에 있어서,
상기 메모리 공간 제어부는
상기 오버플로에 따른 요청 크기의 절반 및 상기 요청 크기를 이용하여 동적 시뮬레이션 버퍼의 메모리 공간을 다시 할당하여 재정렬하는 것을 특징으로 하는
동적 시뮬레이션 버퍼.
According to clause 6,
The memory space control unit
Characterized by reallocating and reordering the memory space of the dynamic simulation buffer using half of the request size due to the overflow and the request size.
Dynamic simulation buffer.
제6항에 있어서,
상기 메모리 공간 제어부는
상기 동적 시뮬레이션 버퍼에 대한 쓰기 동작이 수행되면 상기 쓰기 동작으로 이동되는 제1 지시자(rear)의 위치의 이전에 읽기 동작에 해당하는 제2 지시자(front)가 위치하는 경우 언더플로가 발생되었다고 판단하는 것을 특징으로 하는
동적 시뮬레이션 버퍼.
According to clause 6,
The memory space control unit
When a write operation to the dynamic simulation buffer is performed, if the second indicator (front) corresponding to the read operation is located before the position of the first indicator (rear) moved by the write operation, it is determined that an underflow has occurred. characterized by
Dynamic simulation buffer.
제6항에 있어서,
상기 메모리 공간 제어부는
상기 동적 시뮬레이션 버퍼의 크기의 절반에 해당하는 값을 지연 추정치로 산출하고, 상기 지연 추정치를 반영하여 상기 동적 시뮬레이션 버퍼의 크기를 변경하는 것을 특징으로 하는
동적 시뮬레이션 버퍼.
According to clause 6,
The memory space control unit
Calculating a value corresponding to half the size of the dynamic simulation buffer as a delay estimate, and changing the size of the dynamic simulation buffer by reflecting the delay estimate.
Dynamic simulation buffer.
KR1020210171623A 2021-12-03 2021-12-03 Dynamic adaptive buffer for distributed simulation and method controlling thereof KR102634255B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020210171623A KR102634255B1 (en) 2021-12-03 2021-12-03 Dynamic adaptive buffer for distributed simulation and method controlling thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020210171623A KR102634255B1 (en) 2021-12-03 2021-12-03 Dynamic adaptive buffer for distributed simulation and method controlling thereof

Publications (2)

Publication Number Publication Date
KR20230083538A KR20230083538A (en) 2023-06-12
KR102634255B1 true KR102634255B1 (en) 2024-02-06

Family

ID=86770075

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020210171623A KR102634255B1 (en) 2021-12-03 2021-12-03 Dynamic adaptive buffer for distributed simulation and method controlling thereof

Country Status (1)

Country Link
KR (1) KR102634255B1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001134629A (en) 1999-11-05 2001-05-18 Toshiba Corp Simulation method and simulation system
JP2010182140A (en) 2009-02-06 2010-08-19 Mitsubishi Electric Corp Simulation device
KR102126270B1 (en) 2017-08-28 2020-06-24 (주)이노시뮬레이션 Motion Buffer Control Method of Real-Time Motion Simulation System
KR102164698B1 (en) 2013-03-25 2020-10-14 광운대학교 산학협력단 Apparatus of processing sample adaptive offset of reusing input buffer and method of the same

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102103430B1 (en) 2018-11-08 2020-04-22 서울과학기술대학교 산학협력단 Method and system for measuring latency in cloud based virtual reallity services
KR102142876B1 (en) 2018-11-15 2020-08-10 서울과학기술대학교 산학협력단 Method and apparatus for buffer management in cloud based virtual reallity services

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001134629A (en) 1999-11-05 2001-05-18 Toshiba Corp Simulation method and simulation system
JP2010182140A (en) 2009-02-06 2010-08-19 Mitsubishi Electric Corp Simulation device
KR102164698B1 (en) 2013-03-25 2020-10-14 광운대학교 산학협력단 Apparatus of processing sample adaptive offset of reusing input buffer and method of the same
KR102126270B1 (en) 2017-08-28 2020-06-24 (주)이노시뮬레이션 Motion Buffer Control Method of Real-Time Motion Simulation System

Also Published As

Publication number Publication date
KR20230083538A (en) 2023-06-12

Similar Documents

Publication Publication Date Title
KR20200050409A (en) Artificial intelligence-enabled management of storage media access
KR102372423B1 (en) Apparatus for sharing parameter and method for using the same
US10885240B2 (en) Deterministic simulation framework for autonomous vehicle testing
CN107526534B (en) Method and apparatus for managing input/output (I/O) of storage device
CN110427284A (en) Data processing method, distributed system, computer system and medium
US11914894B2 (en) Using scheduling tags in host compute commands to manage host compute task execution by a storage device in a storage system
CN110161983B (en) Control device, control system, control method, and storage medium
CN110161984B (en) Control device, control system, control method, and storage medium
CN103324592A (en) Data migration control method, data migration method and data migration device
US20070044079A1 (en) A system and method for compiling a description of an electronic circuit to instructions adapted to execute on a plurality of processors
CN114387787B (en) Vehicle track control method and device, electronic equipment and storage medium
CN102123176A (en) Space distribution and management method and device for network storage system
CN102609990A (en) Massive-scene gradually-updating algorithm facing complex three dimensional CAD (Computer-Aided Design) model
CN105373484A (en) Memory distribution, storage and management method in network communication chip
CN113723443A (en) Distributed training method and system for large visual model
US20120102175A1 (en) Computer System, Simulation Method and Program
US8468006B2 (en) Method of combined simulation of the software and hardware parts of a computer system, and associated system
CN104537045A (en) Service distribution method and device based on distributive system
Naghshtabrizi et al. Analysis of distributed control systems with shared communication and computation resources
KR102634255B1 (en) Dynamic adaptive buffer for distributed simulation and method controlling thereof
CN101526915A (en) Method for supporting parallel input and output (I/O) of trace files in parallel simulation
US20210390405A1 (en) Microservice-based training systems in heterogeneous graphic processor unit (gpu) cluster and operating method thereof
Hua et al. Design and implementation of holistic scheduling and efficient storage for FlexRay
Zeng et al. Design space exploration of automotive platforms in metropolis
US10430215B1 (en) Method and system to transfer data between hardware emulator and host workstation

Legal Events

Date Code Title Description
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant