Download presentation
Presentation is loading. Please wait.
1
TrueTime
2
TrueTime 2.0 http://www.control.lth.se/truetime/ Reference Manual link
3
Communication Network
TrueTime is a Matlab/Simulink Event-based simulator for real-time control system. It is used for the simulation of Networked Control System (NCS). In NCS, actuators, sensors and controllers are interconnected by a communication network. Process Actuator Sensor Communication Network Controller
4
TrueTime capabilities:
Investigate the true, timely behavior of time or event-triggered control loops affected by real-time scheduling and networking Experiment with novel real-time scheduling techniques, including feedback scheduling Investigate the performance of various wired or wireless MAC protocols Simulate complex scenarios involving battery-powered mobile robots communicating over a wireless network
5
Components
6
Computation component
Simulates and event-based real- time kernel. Executes user-defined tasks and interrupt handler (C or M-files) Arbitrary user-defined scheduling policies Supports external interrupts and timers Code structured into code segments
7
Init Each kernel block must have an initialization script
The purposes of the initialization script are: Specify the number of I/O Define a scheduling policy Creating tasks Creating interrupts handlers Pre-defined priority functions exist for scheduling policies: fixed-priority rate-monotonic deadline-monotonic earliest-deadline-first scheduling
8
Example Initialize the kernel, specifying the scheduling policy
Create a periodic task Create an aperiodic task Attach an aperiodic task or interrupt handler to a network interface
9
Tasks Tasks are used to model the execution of user code
The release of task instances (jobs) may be periodic or aperiodic For periodic tasks, the jobs are created by an internal periodic timer For aperiodic tasks, the jobs must be created by the user (e.g., in response to interrupts)
10
Task code is represented by a code function in the format: [exectime,data] = function mycode(segment,data) The data input/output argument represents the local memory of the task The segment input argument represents the program counter The exectime output argument represents the execution time of the current code segment
11
All statements in a segment are executed sequentially, non- preemptively, and in zero simulation time Only the delay can be preempted by other tasks No local variables are saved between segments
12
The name of the initialization script
An optional argument to the initialization script Number of local Inputs and Outputs Number of external triggers for the kernel task Number of the node (must be unique) A constant time offset and time drift from the nominal time.
13
Communication component
Network Block Ethernet CAN TDMA FDMA Round Robin Switched Ethernet FlexRay PROFINET Wireless Network Block 802.11b WLAN ZigBee
14
Modelling wired networks
Models the medium access delay and the transmission delay. No built-in support for network and transport layer protocols
15
Modelling wireless network
Used in a similar way as the wired network block Supports two common MAC layer policies: 802.11b/g (WLAN) (ZigBee) Variable network parameters x and y inputs for node locations Generates a transmission schedule
16
The number assigned to the network block.
The number of nodes connected to the network. The speed of the network. The minimum frame size The probability that a network message is lost during transmission
17
Example Networked
18
Networked control of a DC-Servo
Controller Task Dummy Task Sensor Task Actuator Task Interfering Task Controller Sensor / Actuator Interfering Node CSMA/CD 80 kbps
19
Networked Control Loop
20
Step Response Step Response Control Signal
21
Network Schedule Control Node Sensor/Actuator Node Interfering Node
High → Sending Medium → Waiting Low → Idle
22
CPU Schedule Actuator Task Sensor Task High → Running Medium → Ready
Low → Idle
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.