Advanced Discrete System Settings

Navigation:  Simulator > Run Properties >

Advanced Discrete System Settings

Previous pageReturn to chapter overviewNext page

The Advanced Discrete System Settings dialog can be used to set the timing for discrete-time control loops that interact with physical continuous-time systems through sensors (analog to digital) and actuators (digital to analog). You can open the dialog by:

1.In the Simulator from the Properties menu, click Run to open the Run Properties Editor.
2.Select the Discrete System tab and click the Advanced Settings button.

In the Advanced Discrete System Settings dialog you can specify the timing of control loops with a fixed sampletime (click Global Time) and control loops with a variable sampletime (click Previous Sample Event Time).

Fixed Sampletime

When you click the Global Time option the following window appears.

AdvancedTimingFixed

Advanced settings for discrete systems.

The window shows the timing diagram for a fixed sampletime control loop. The loops starts with an clock interrupt from a timer. It will take some time before the interrupt is handled and generally some calculations are performed before the sensor signals (sample) are read. This delay is represented by the sample delay which is divided in a fixed time and a variable time part. The control loop will proceed and perform the necessary calculations to generate the actuator output (hold). These calculations will take some time, which is represented by the fixed time hold delay. After this action the control loops will come to a halt until the next clock interrupt is generated.

 

If the control loops is properly designed it will know the task it is performing when a clock interrupt is getting in. E.g. if it is still calculating the actuator outputs when clock interrupt is getting in, an error will be generated, specifying that the sampletime is too small to perform all necessary calculations.

 

Items

Sample Delay:
Fixed: Enter the fixed sample delay here.
Variable: Enter the variable delay here. You can chose from two distributions:
Uniform: The delay is uniformly distributed between the given minimum and maximum.
Gaussian: The delay has a given mean and standard deviation.
Hold Delay: Enter the fixed hold delay here.
Action on Sample Missed: An error will be generated when the total delay is larger than the sampletime or when the total delay is negative.

Variable Sampletime

When you click the Previous Sample Event Time option the following window appears.

AdvancedTimingVariable

Variable sample time.

The window above shows the timing diagram for a variable sampletime control loop. It performs the same tasks as a fixed sampletime control loop, but will start the next loop as soon as the previous loop was finished. The variable sampletime control loop does not use a clock interrupt!

Items

Sample Delay:
Fixed: Enter the fixed sample delay here.
Variable: Enter the variable delay here. You can chose from two distributions:
Uniform: The delay is uniformly distributed between the given minimum and maximum.
Gaussian: The delay has a given mean and standard deviation.
Hold Delay: Enter the fixed hold delay here.
Action on Sample Missed: Only an error will be generated when the total delay is negative.