Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 4DIAC - Framework for Distributed Industrial Automation and Control » Using 4DIAC in a simulation system(Time management and other matters)
Using 4DIAC in a simulation system [message #1839641] Thu, 25 March 2021 01:28 Go to next message
Neil Higgins is currently offline Neil HigginsFriend
Messages: 18
Registered: September 2016
Location: Brisbane
Junior Member
I have an interesting proof-of-concept task for a power system controller. The controller would be implemented in IEC 61499, would export control commands to a power system simulator, and would import power system measurements from the power system simulator to complete the loop. The simulator has a COM API, somewhat dated, and some massaging of identifiers and values would be needed to map them between the simulator and the IEC 61499 environment.

For testing purposes, the IEC 61499 side would have to work in non-real-time, i.e. pause to await an update of the simulated power system quantities before proceeding. Because the power system simulator also has time-managed simulation capabilities, a common "simulated time" clock and (perhaps) a federated event queue would be desirable.

1. I assume that FORTE currently uses Linux time services in real-time(?) Is there an intervention mechanism, e.g. to substitute a different "clock" which would appropriately affect event and time management in FORTE? If not, does anyone want to provide hints as to which parts of the source code I should look at?

2. As mentioned in another post, I am looking at MQTT as the IPC mechanism between the power system simulator and FORTE, although this would be crude and less-than-ideal. Access to the Lua code for one or more dynamic types would provide a much more flexible alternative. Is there some way that this might be enabled?
Re: Using 4DIAC in a simulation system [message #1839655 is a reply to message #1839641] Thu, 25 March 2021 09:27 Go to previous messageGo to next message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 16
Registered: January 2021
Junior Member
I have worked with FMI, a standard simulation https://www.eclipse.org/4diac/en_help.php?helppage=html/communication/simulation.html#fmi

I basically extended the CEventChainExecutionThread class with my own (CFMUEventChainExecutionThread). This class handles the event triggering.

The CFMUEventChainExecutionThread class has a semaphore that can pause/resume it, and this pause/resume is controlled by the src/core/fmi/fmiTimerHandler.cpp:advancedTicks function. This function is called externally by means proper to the FMI standard. In this case, the advacenTicks function is implemented so it can run the CFMUEventChainExecutionThread threads for defined amount of time.


Maybe this would help you, and if your power source model can be exported as an FMU instance, then exporting your 4diac application as FMU will allow you to co-simulate them easily. That's the main idea of the FMI standard
Re: Using 4DIAC in a simulation system [message #1839665 is a reply to message #1839655] Thu, 25 March 2021 11:18 Go to previous messageGo to next message
Neil Higgins is currently offline Neil HigginsFriend
Messages: 18
Registered: September 2016
Location: Brisbane
Junior Member
Dear Jose,
Thank you for your quick reply. I will do further research on this option.
Kind regards,
Neil
Re: Using 4DIAC in a simulation system [message #1839701 is a reply to message #1839641] Fri, 26 March 2021 01:10 Go to previous messageGo to next message
Neil Higgins is currently offline Neil HigginsFriend
Messages: 18
Registered: September 2016
Location: Brisbane
Junior Member
BTW I am aware that Thomas Strasser has produced a number of publications on this general topic. I will of course be collecting these and reading them.
Re: Using 4DIAC in a simulation system [message #1839733 is a reply to message #1839701] Fri, 26 March 2021 16:21 Go to previous message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

I was about to mention that.
Previous Topic:Debugging Paho in 4DIAC FORTE
Next Topic:compile with utils and rt_events
Goto Forum:
  


Current Time: Thu Apr 25 06:54:14 GMT 2024

Powered by FUDForum. Page generated in 0.03979 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top