eeros_architecture:control_system:time_domains
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
eeros_architecture:control_system:time_domains [2017/03/17 15:11] – [Time domains] graf | eeros_architecture:control_system:time_domains [2017/10/19 18:19] – [Transitions from one Time Domain to another] graf | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Time domains | + | ====== Time Domains |
Time domains comprise blocks which run with the same periodicity. Each time such a time domain executes everyone of its blocks runs in a predetermined way. A control system may have one or several time domains running with different periods. | Time domains comprise blocks which run with the same periodicity. Each time such a time domain executes everyone of its blocks runs in a predetermined way. A control system may have one or several time domains running with different periods. | ||
- | [{{: | + | [{{ : |
+ | A time domain must be defined as follows: | ||
+ | <code cpp> | ||
+ | eeros:: | ||
+ | </ | ||
+ | The last parameter which is of type boolean indicates whether the time domain has to be run in realtime. After creation you can add blocks to it. Please make sure to add these blocks in the order in which they must be executed. Currently, no reordering of those blocks is done. | ||
+ | <code cpp> | ||
+ | td.addBlock(const1); | ||
+ | td.addBlock(gain1); | ||
+ | ... | ||
+ | </ | ||
+ | Finally, you have to add the time domain to the executor, refer to [[eeros_architecture: | ||
+ | If a block no longer has to run - this could be the case for blocks used solely for initializing - it can be removed with | ||
+ | <code cpp> | ||
+ | td.removeBlock(const1); | ||
+ | </ | ||
===== Time Stamps ===== | ===== Time Stamps ===== | ||
Line 8: | Line 23: | ||
The timestamp can be changed by blocks, if the algorithm influences the time base of the signal. This is typically the case in differentiation, | The timestamp can be changed by blocks, if the algorithm influences the time base of the signal. This is typically the case in differentiation, | ||
- | The timestamp is needed for instance for operations | + | The timestamp is needed for instance for operations |
+ | ===== Execution of Time Domains ===== | ||
+ | Generally, time domains have to be executed with their periods having a fixed relationship, | ||
+ | |||
+ | ===== Catching Faults in Time Domains ===== | ||
+ | Time domains are responsible to run their blocks in a predetermined way. However, if a block fails to run properly due to a fault within this block the time domain must catch this fault and be able to trigger a safety event. In order to do this you can assign a time domain a reference to the safety system together with a certain safety event which should be triggered whenever such a fault occurs, e.g. | ||
+ | <code cpp> | ||
+ | td.registerSafetyEvent(& | ||
+ | </ | ||
+ | The safety system will change to a safe level for this condition and might stop the time domain with | ||
+ | <code cpp> | ||
+ | td.stop(); | ||
+ | </ | ||
+ | As soon as the faulting condition is amended the time domain can be restarted with | ||
+ | <code cpp> | ||
+ | td.start(); | ||
+ | </ | ||
+ | |||
+ | ===== Transitions from one Time Domain to another ===== | ||
+ | The control system offers a special transition block whenever a signal crosses from one time domain to another. Such a transition block has two different manifestations depending on the two time domains involved. | ||
+ | * Signal passing from slow time domain to fast time domain: In this case the transition block does interpolate the signal in the fast time domain. | ||
+ | * Signal passing from fast time domain to slow time domain: The transition block filters the incoming signal according to a desired timestamp. | ||
+ | For further details of the transition block, see [[eeros_architecture: |
eeros_architecture/control_system/time_domains.txt · Last modified: 2021/05/16 15:27 by ursgraf