SimEvents Conveyor System with continuous speed source

19 views (last 30 days)
I am modeling a system of conveyor belts with SimEvents. The issue is that those conveyor belts have continuous speed curves coming from the PLC that they follow. Is there any clever way to model this with the conveyor belt block in SimEvents?
What is the best way to link the continuous speed curves with a discontinuous material flow simulation?
I would be grateful for any ideas!

Answers (1)

Hari
Hari on 16 Jan 2024
Hi Dan,
I understand that you are trying to model a conveyor belt system using SimEvents in MATLAB, where the conveyor belts are controlled by continuous speed curves from a PLC, and you' want a method to integrate these continuous speed profiles with the discrete nature of material flow in SimEvents.
  1. To model a conveyor system with a continuous speed source, you can use the 'Entity Server' block to generate entities representing the items on the conveyor belt.
  2. The 'Time-Based Entity Generator' can be used to simulate the continuous arrival of items.
  3. For the continuous speed curves, you can use MATLAB functions to define the speed profile over time and then use the 'MATLAB Function' block to integrate this into your SimEvents model. This block can dynamically adjust the speed of the 'Entity Server' block by sending messages or using function calls to change its parameters during simulation.
  4. The 'Signal-Based Entity Generator' can be used to modulate the generation rate based on the speed curve. Another approach is to use the 'Simulink Function' block to create a custom function that can be called by other blocks in your model, including the logic that controls the conveyor speed.
  5. To link the continuous speed curves with the discrete material flow, you can discretize the speed profile into time intervals that are small enough to approximate the continuous behavior. Then, within each interval, use the 'Event-Based Sequence' block to schedule changes in speed according to the discretized profile.
Here's a hypothetical example using MATLAB code to define a continuous speed function:
function speed = conveyorSpeed(t)
% Conveyor speed function based on time
% Combination of sinusoidal functions for variable speed
% and a linear component
speed = 2.5 * sin(0.5 * pi * t) + 1.5 * sin(0.25 * pi * t) + 0.05 * t;
end
You would then call this function within a 'MATLAB Function' block in your SimEvents model to set the speed of the conveyor belt.
Refer to the documentation of the 'Entity Server' block for generating entities in SimEvents.
For creating custom MATLAB functions within your SimEvents model, refer the 'MATLAB Function' block documentation.
To learn more about discretizing continuous signals for event-based systems, the 'Signal-Based Entity Generator' block documentation may be useful.
Event based modeling documentation can provide insights into scheduling discrete events based on time or conditions.
Hope this helps!

Categories

Find more on Discrete-Event Simulation in Help Center and File Exchange

Products


Release

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!