- The “Main System” Subsystem performs primary simulation tasks using the parameter (A) and executes every "0.01" seconds, ensuring continuous operation without waiting for parameter estimation.
- The “Parameter Estimation” Subsystem triggers every 1000 data collection steps, operating independently with a 0.1-second execution time, unaffected by the main system's timing. A buffer accumulates 1000 data steps, and a "trigger" block initiates estimation once the buffer is full. Refer to the documentation for more details on the "trigger" block.
- After parameter estimation, update the parameter (A) in the main system using a “data store”. This ensures the main system uses the latest parameter immediately after it’s updated.
Question about simulink parallel operation
1 view (last 30 days)
Show older comments
Suppose my simulink system has 10,000 steps and a parameter A. Every time I get 1,000 steps of data, I need to use a function to estimate the latest value of parameter A (each estimation takes 0.1s). However, the calculation time of each step of the system must be within 0.01s. That is to say, the above cannot be made into a series system, because the series connection will lead to an estimated time of 0.1s>0.01s when the step size is an integer multiple of 1000. Therefore, I want to achieve:
(1) When the system obtains 1000 steps of data, when the estimation program is started, the original program continues to run as usual with the old parameters. Once the estimation is completed, it is immediately assigned to the original program to be updated;
In other words, the relationship between the two is no longer in series, but in parallel. Is it possible to implement this function in simulink?
0 Comments
Answers (1)
Nithin
on 28 Feb 2025
Edited: Nithin
on 28 Feb 2025
To achieve parallel execution in Simulink, use parallel subsystems by using two different subsystems: one for the main system operation and other for parameter estimation. This allows each part to operate independently and facilitates parallel processing.
Kindly refer to the steps below to understand the overview of the process:
For more information kindly refer to the following MathWorks documentations:
trigger block: https://www.mathworks.com/help/simulink/slref/trigger.html
Hope this resolves your issue.
0 Comments
See Also
Categories
Find more on Subsystems in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!