Embedded Real-Time Systems

Similar documents
Embedded Systems. Stammvorlesung 9 CP. Lectures: Tuesdays, 16:15-18:00 Thursdays, 10:15-12:00 BF - ES - 2 -

Modal Models in Ptolemy

Component-Based Design of Embedded Control Systems

DESIGN AND SIMULATION OF HETEROGENEOUS CONTROL SYSTEMS USING PTOLEMY II

Hybrid System Modeling: Operational Semantics Issues

Design of a Three-Axis Rotary Platform

QUANSER Flight Control Systems Design. 2DOF Helicopter 3DOF Helicopter 3DOF Hover 3DOF Gyroscope. Quanser Education Solutions Powered by

Concurrent Models of Computation

Introduction to Embedded Systems

Embedded Software from Concurrent Component Models

Executing SyncCharts with Ptolemy

9. Representing constraint

Towards Lab Based MOOCs: Embedded Systems, Robotics, and Beyond

Ptolemy II The automotive challenge problems version 4.1

ROBOTICS 01PEEQW. Basilio Bona DAUIN Politecnico di Torino

SIMULATION ENVIRONMENT PROPOSAL, ANALYSIS AND CONTROL OF A STEWART PLATFORM MANIPULATOR

Embedded Real-Time Systems

Table of Contents. Chapter 1. Modeling and Identification of Serial Robots... 1 Wisama KHALIL and Etienne DOMBRE

Introducing Embedded Systems: A Cyber- Physical Systems Approach

1. Introduction 1 2. Mathematical Representation of Robots

Simulation. x i. x i+1. degrees of freedom equations of motion. Newtonian laws gravity. ground contact forces

3. Planar kinematics Mechanics of Manipulation

Future Directions. Edward A. Lee. Berkeley, CA May 12, A New Computational Platform: Ubiquitous Networked Embedded Systems. actuate.

Advanced Tool Architectures. Edited and Presented by Edward A. Lee, Co-PI UC Berkeley. Tool Projects. Chess Review May 10, 2004 Berkeley, CA

VIBRATION ISOLATION USING A MULTI-AXIS ROBOTIC PLATFORM G.

11. Kinematic models of contact Mechanics of Manipulation

Dynamical Modeling and Controlof Quadrotor

Anatomy of a Physics Engine. Erwin Coumans

Concurrent Component Patterns, Models of Computation, and Types

Navigational Aids 1 st Semester/2007/TF 7:30 PM -9:00 PM

Design and Development of Unmanned Tilt T-Tri Rotor Aerial Vehicle

What Is SimMechanics?

State Space System Modeling of a Quad Copter UAV

Dynamics Analysis for a 3-PRS Spatial Parallel Manipulator-Wearable Haptic Thimble

FA95e and FA130e Series

Composition of State Machines

Lesson 1: Introduction to Pro/MECHANICA Motion

10/11/07 1. Motion Control (wheeled robots) Representing Robot Position ( ) ( ) [ ] T

ROSE-HULMAN INSTITUTE OF TECHNOLOGY

14. The Oriented Plane Mechanics of Manipulation

Synchronous Dataflow Processong

Chapter 3: Kinematics Locomotion. Ross Hatton and Howie Choset

MTRX4700 Experimental Robotics

PTIDES: A Discrete-Event-Based Programming Model for Distributed Embedded Systems

Quantitative Verification and Synthesis of Systems

Model Library Mechanics

Rachel Weinstein, Joseph Teran and Ron Fedkiw

Geometric Transformations

15. Moment Labeling Mechanics of Manipulation

CAMERA GIMBAL PERFORMANCE IMPROVEMENT WITH SPINNING-MASS MECHANICAL GYROSCOPES

Lecture VI: Constraints and Controllers

CMPUT 412 Motion Control Wheeled robots. Csaba Szepesvári University of Alberta

Giotto. Thomas A. Henzinger, Benjamin Horowitz, Christoph Kirsch. UC Berkeley

Physics Tutorial 2: Numerical Integration Methods

Aircraft Stability and Performance 2nd Year, Aerospace Engineering. Dr. M. Turner

Mobile Robots Locomotion

Mechanism Kinematics and Dynamics

A simple example. Assume we want to find the change in the rotation angles to get the end effector to G. Effect of changing s

EE6102 Multivariable Control Systems

Line of Sight Stabilization Primer Table of Contents

OBSERVER BASED FRACTIONAL SECOND- ORDER NONSINGULAR TERMINAL MULTISEGMENT SLIDING MODE CONTROL OF SRM POSITION REGULATION SYSTEM

Design & Optimization Fuzzy Logic Controller for General Helicopter Model

Beikrit Samia Falaschini Clara Abdolhosseini Mahyar Capotescu Florin. Qball Quadrotor Helicopter

Parallel Robots. Mechanics and Control H AMID D. TAG HI RAD. CRC Press. Taylor & Francis Group. Taylor & Francis Croup, Boca Raton London NewYoric

Simulation in Computer Graphics. Particles. Matthias Teschner. Computer Science Department University of Freiburg

SUPPORTING LINEAR MOTION: A COMPLETE GUIDE TO IMPLEMENTING DYNAMIC LOAD SUPPORT FOR LINEAR MOTION SYSTEMS

Chapter 4 Dynamics. Part Constrained Kinematics and Dynamics. Mobile Robotics - Prof Alonzo Kelly, CMU RI

COPYRIGHTED MATERIAL INTRODUCTION CHAPTER 1

This was written by a designer of inertial guidance machines, & is correct. **********************************************************************

Component-Based Design of Embedded Control Systems

General model and control of an n rotor helicopter

Experimental Verification of Stability Region of Balancing a Single-wheel Robot: an Inverted Stick Model Approach

Formal Analysis of Timing Effects on Closed-loop Properties of Cyber Physical Systems

A Simplified Vehicle and Driver Model for Vehicle Systems Development

ITTC Recommended Procedures and Guidelines. ITTC Quality System Manual. Recommended Procedures and Guidelines

EE565:Mobile Robotics Lecture 2

The Ptolemy II Framework for Visual Languages

Chapter 1: Introduction

Math 5BI: Problem Set 2 The Chain Rule

Computer Animation and Visualisation. Lecture 3. Motion capture and physically-based animation of characters

Introduction to Electronic Design Automation. Model of Computation. Model of Computation. Model of Computation

CHAPTER 3 MATHEMATICAL MODEL

Lecture VI: Constraints and Controllers. Parts Based on Erin Catto s Box2D Tutorial

Introduction to Simulink

Interaction of Fluid Simulation Based on PhysX Physics Engine. Huibai Wang, Jianfei Wan, Fengquan Zhang

Mechanical System and SimMechanics Simulation

Real-time Image-based Reconstruction of Pipes Using Omnidirectional Cameras

Adaptive Filters Algorithms (Part 2)

Mobile Robotics. Mathematics, Models, and Methods. HI Cambridge. Alonzo Kelly. Carnegie Mellon University UNIVERSITY PRESS

13. Polyhedral Convex Cones

ROBOTICS AND AUTONOMOUS SYSTEMS

Integrated Design and Analysis Tools for Software Based Control Systems

INSTITUTE OF AERONAUTICAL ENGINEERING

IMPLEMENTATION OF BALL-AND-BEAM CONTROL SYSTEM AS AN INSTANCE OF SIMULINK TO 32-BIT MICROCONTROLLER INTERFACE

Simulation-Based Design of Robotic Systems

Syllabus Instructors:

Robotics and Autonomous Systems

Estimation of Model Parameters Using Limited Data for the Simulation of Electric Power Systems

Robotics and Autonomous Systems

INTRODUCTION CHAPTER 1

Transcription:

Embedded Real-Time Systems Reinhard von Hanxleden Christian-Albrechts-Universität zu Kiel Based on slides kindly provided by Edward A. Lee & Sanjit Seshia, UC Berkeley, All rights reserved Lecture 2: Model-Based Design Continuous Dynamics

Modeling, Design, Analysis Modeling is the process of gaining a deeper understanding of a system through imitation. Models specify what a system does. Design is the structured creation of artifacts. It specifies how a system does what it does. This includes optimization. Analysis is the process of gaining a deeper understanding of a system through dissection. It specifies why a system does what it does (or fails to do what a model says it should do). Lecture 2: Model-Based Design Continuous Dynamics, Slide 2

What is Modeling? Developing insight about a system, process, or artifact through imitation. A model is the artifact that imitates the system, process, or artifact of interest. A mathematical model is a model in the form of a set of definitions and mathematical formulas. Lecture 2: Model-Based Design Continuous Dynamics, Slide 3

What is Model-Based Design? 1. Create a mathematical model of all the parts of the embedded system (and its environment) Physical world Control system Software environment Hardware platform Network Sensors and actuators 2. Construct the implementation from the model Construction may be automated, like a compiler More commonly, portions are automatically constructed Lecture 2: Model-Based Design Continuous Dynamics, Slide 4

Modeling Techniques in this Course Models that are abstractions of system dynamics (how things change over time) Examples: Modeling physical phenomena ODEs Feedback control systems time-domain modeling Modeling modal behavior FSMs, hybrid automata Modeling sensors and actuators calibration, noise Modeling software concurrency, real-time models Modeling networks latencies, error rates, packet loss Lecture 2: Model-Based Design Continuous Dynamics, Slide 5

Modeling of Continuous Dynamics Ordinary differential equations, Laplace transforms, feedback control systems, stability analysis, robustness analysis, Lecture 2: Model-Based Design Continuous Dynamics, Slide 6

Lecture 2: Model-Based Design Continuous Dynamics, Slide 7

An Example: Modeling Helicopter Dynamics Lecture 2: Model-Based Design Continuous Dynamics, Slide 8

Modeling Physical Motion Six degrees of freedom: Position: x, y, z Orientation: pitch (nicken/stampfen), yaw (gieren), roll (wanken/rollen) Lecture 2: Model-Based Design Continuous Dynamics, Slide 9

Lecture 2: Model-Based Design Continuous Dynamics, Slide 10

Notation Lecture 2: Model-Based Design Continuous Dynamics, Slide 11

Velocity, Acceleration, Force Lecture 2: Model-Based Design Continuous Dynamics, Slide 12

Newton s Second Law Lecture 2: Model-Based Design Continuous Dynamics, Slide 13

Orientation Lecture 2: Model-Based Design Continuous Dynamics, Slide 14

Angular version of force (Kraft) is torque (Drehmoment). For a point mass rotating around a fixed axis: T y (t ) = r f (t ) angular momentum (Drehimpuls), momentum (Impuls) Just as force is a push or a pull, a torque is a twist. Units: newton-meters/radian, Joules/radian Note that radians are meters/meter (2p meters of circumference per 1 meter of radius), so as units, are optional. Lecture 2: Model-Based Design Continuous Dynamics, Slide 15

Rotational Version of Newton s Second Law Lecture 2: Model-Based Design Continuous Dynamics, Slide 16

Simple Example Lecture 2: Model-Based Design Continuous Dynamics, Slide 17

Feedback Control Problem A helicopter without a tail rotor, like the one below, will spin uncontrollably due to the torque induced by friction in the rotor shaft. Control system problem: Apply torque using the tail rotor to counterbalance the torque of the top rotor. Lecture 2: Model-Based Design Continuous Dynamics, Slide 18

Actor Model of Systems A system is a function that accepts an input signal and yields an output signal. The domain and range of the system function are sets of signals, which themselves are functions. Parameters may affect the definition of the function S. Lecture 2: Model-Based Design Continuous Dynamics, Slide 19

Actor model of the helicopter Input is the net torque of the tail rotor and the top rotor. Output is the angular velocity around the y axis. Parameters of the model are shown in the box. The input and output relation is given by the equation to the right. Lecture 2: Model-Based Design Continuous Dynamics, Slide 20

Composition of actor models Lecture 2: Model-Based Design Continuous Dynamics, Slide 21

Actor models with multiple inputs Lecture 2: Model-Based Design Continuous Dynamics, Slide 22

Proportional controller desired angular velocity error signal net torque Note that the angular velocity appears on both sides, so this equation is not trivial to solve. Lecture 2: Model-Based Design Continuous Dynamics, Slide 23

Behavior of the controller u is unit step: u(t) = 0 for t < 0, u(t) = 1 otherwise Lecture 2: Model-Based Design Continuous Dynamics, Slide 24

Exercise Reformulate the helicopter model so that it has two inputs, the torque of the top rotor and the torque of the tail rotor. Show (by simulation) that if the top rotor applies a constant torque, then our controller cannot keep the helicopter from rotating. Increasing the feedback gain, however, reduces the rate of rotation. A better controller would include an integrator in the controller. Such controllers are studied in control theory classes. Lecture 2: Model-Based Design Continuous Dynamics, Slide 25

Questions How do we measure the angular velocity? Can this controller be implemented in software? How does the behavior change when it is implemented in software? Lecture 2: Model-Based Design Continuous Dynamics, Slide 26

Other Modeling Techniques we will talk about State machines l sequential decision logic Synchronous/reactive concurrent composition l concurrent computation l composes well with state machines Dataflow models l exploitable parallelism l well suited to signal processing Discrete-event models l explicit about time Time-driven l suitable for periodic, timed actions Continuous-time models l models of physical dynamics l extended to hybrid systems to embrace computation Lecture 2: Model-Based Design Continuous Dynamics, Slide 27

Discretized Model A Step Towards Software Numerical integration techniques provided sophisticated ways to get from the continuous idealizations to computable algorithms. Discrete-time signal processing techniques offer the same sophisticated stability analysis as continuous-time methods. But it s not accurate for software controllers (fails on correctness) Lecture 2: Model-Based Design Continuous Dynamics, Slide 28

Hybrid Systems Union of Continuous & Discrete Lecture 2: Model-Based Design Continuous Dynamics, Slide 29

Understanding models can be very challenging An example, due to Jie Liu, has two controllers sharing a CPU under an RTOS. Under preemptive multitasking, only one can be made stable (depending on the relative priorities). Under non-preemptive multitasking, both can be made stable. Theory for this is lacking, so designers resort to simulation and testing. Lecture 2: Model-Based Design Continuous Dynamics, Slide 30

Key Concepts in Model-Based Design Models describe physical dynamics. Specifications are executable models. Models are composed to form designs. Models evolve during design. Deployed code may be (partially) generated from models. Modeling languages have semantics. Modeling languages themselves may be modeled (meta models) For embedded systems, this is about Time Concurrency Dynamics Lecture 2: Model-Based Design Continuous Dynamics, Slide 31

Summary Modeling: understand a system through imitation What the system does Design: structured creation of artifacts How a system does it Analysis: gain understanding through dissection Why does a system do it Model-based design: create model, construct implementation from model Main means for physical models: (continuous) mathematics, ODEs Can model (sub-) systems as actors: accept input signal, yield output signal, have parameters Signals: mapping from time to some values Lecture 2: Model-Based Design Continuous Dynamics, Slide 32