Main Content

离散事件模拟万博1manbetxModels

SimEvents®integrates discrete-event system modeling into the Simulink®time-based framework. In time-based systems, a signal changes value in response to the simulation clock, and state updates occur synchronously with time. By contrast, in discrete-event or event-based systems state transitions depend on asynchronous discrete incidents calledevents.

假设您想测量普通汽车在队列中等待多长时间,以便在繁忙的加油站填充其水箱。假设您还想通过求解微分方程来对汽车的运动进行建模。您可以使用基于时间的模拟和离散事件模拟的组合,其中:

  • 基于时间的方面控制汽车轨迹的细节

  • 离散事件方面控制排队本·avior

In a Simulink model, you typically construct a discrete-event system by adding various blocks, such as generators, queues, and servers, from the SimEvents block library. These blocks are suitable for producing and processing entities, which are abstractions of discrete items of interest. Examples of entities are vehicles arriving at a gas station, packets within a communication network, planes on a runway, or trains within a signaling system. Asynchronous events correspond to motion and changes in entity attributes through the system model, and they update the states of the underlying system. Examples of states are lengths of queues or service time for an entity in a server.

一个简单的排队系统

This SimEvents model represents a simple queuing system that generates entities of interest and queues them in a specified order, services them to change their attributes, and terminates them to represent their departure from the line. To learn how to build this model, seeCreate a Discrete-Event Model.

Simple queueing model using Entity Generator, Entity Queue, Entity Server, and Entity Terminator blocks

实体发生器块用于生成具有固定或随机代间时间的实体。这Entity Queueblock queues the entities based on a specified order. TheEntity Serverblock services entities for a length of time. The entities depart the line through theEntity Terminatorblock.

Modeling Communication Delay on an Anti-Lock Braking System

Effects of Communication Delays on an ABS Control System示例提供了一个方案,用于调查汽车反锁制动系统(ABS)中的通信延迟。该系统使用组件之间的控制区域网络(CAN)通信。该模型说明了分布式系统的重载网络。

这model investigates the delay of communication between the ABS controller and the vehicle in ideal conditions and in the presence of noise.

A car anti-lock braking system)

CAN ID:5子系统由SimeVents库块组成,该库块对传输,消息队列和复制消息进行建模用于通信的缓冲区。

Transmitter and receiver models. Both models use blocks from SimEvents and Simulink.

这model is used to analyze the effect of communication delay on the slip value with the passage of time. The slip value is0when the wheel speed and the vehicle speed are equal. The slip value is1when the wheels are completely locked. The desirable slip value is0.2.

左侧的图表示在理想条件下的滑动,右侧是噪声存在下的滑动。在模型中检测到滑动性能的降低,并通过CAN消息的重新定位解决。

Two side-by-side plots that display slip in two different conditions.

For more information about the model, seeEffects of Communication Delays on an ABS Control System.

Modeling a Hybrid System with Event-Based and Time-Based Components

一个或多个离散事件系统可以与Simulink模型中的基于时间的系统共存。万博1manbetx这种共存促进了复杂混合系统的模拟。您可以将信号从基于时间的组件/系统传递给使用SimeVents块建模的离散事件组件/系统。基于时间和事件的建模的组合促进了大规模系统的模拟,这些系统结合了来自多个环境的较小子系统。大规模系统的一个示例具有针对连续时间系统(例如电气系统)的物理建模,该系统通过模型为离散事件系统的通道进行通信。Si万博1manbetxmulink模型还可以包含一个纯粹的离散事件系统,而在建模基于事件的过程时,没有基于时间的组件。这些系统在代表逻辑和制造系统的模型中很常见。

Modeling Hybrid Systems - Tank Filling示例包括基于时间和基于事件的建模,以代表排队以填充加油站的车辆的车辆。

simevents部分是介绍的模型的扩展一个简单的排队系统and it models the flow of the vehicle tanks. The tanks are generated, queued, and serviced to be filled. The Simulink part models the logic to fill the tanks. When a tank is filled to capacity, the completion of the tank filling process is detected and a message is sent to the SimEvents part to open the gate for releasing the tank. For more information, seeModeling Hybrid Systems - Tank Filling.

Related Examples

More About

外部网站