1 / 66

CONTINUOUS DYNAMICS & SECURITY

CONTINUOUS DYNAMICS & SECURITY. EEN 417 Fall 2013. 8/30/13, Dr. Eric Rozier , V1.0, ECE Thanks to Edward Lee and Sanjit Seshia of UC Berkeley. Course Progression. Course Progression. Plan for today’s class period. Computer Engineering and Computer Science Continuous Dynamics

iokina
Download Presentation

CONTINUOUS DYNAMICS & SECURITY

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CONTINUOUS DYNAMICS&SECURITY EEN 417 Fall 2013 8/30/13, Dr. Eric Rozier, V1.0, ECE Thanks to Edward Lee and SanjitSeshia of UC Berkeley

  2. Course Progression

  3. Course Progression

  4. Plan for today’s class period Computer Engineering and Computer Science Continuous Dynamics Wrap up

  5. COMPUTER ENGINEERING & COMPUTER SCIENCE

  6. Why are we here?

  7. Bloom’s Taxonomy Evaluation Synthesis Analysis Application Comprehension Knowledge

  8. CS and CE • What are the disciplines? • Computer Engineering? • Computer Science?

  9. What it isn’t • "What would we like our children- the general public of the future—to learn about computer science in schools? We need to do away with the myth that computer science is about computers. Computer science is no more about computers than astronomy is about telescopes, biology is about microscopes or chemistry is about beakers and test tubes. Science is not about tools, it is about how we use them and what we find out when we do." -- Ian Parberry

  10. What it isn’t • A confusion of even longer standing came from the fact that the unprepared included the electronic engineers that were supposed to design, build, and maintain the machines. The job was actually beyond the electronic technology of the day, and, as a result, the question of how to get and keep the physical equipment more or less in working condition became in the early days the all-overriding concern. As a result, the topic became —primarily in the USA— prematurely known as "computer science" —which, actually is like referring to surgery as "knife science"— and it was firmly implanted in people's minds that computing science is about machines and their peripheral equipment. -- EdsgerDijkstra

  11. What it really is • Computer science is the study of the theoretical foundations of information and computation and of practical techniques for their implementation and application in computer systems. Computer scientists invent algorithmic processes that create, describe, and transform information and formulate suitable abstractions to model complex systems. • Computer engineering is the process of analyzing, designing, and integrating the hardware and software systems needed for information processing or computation. Computer engineers are saddled with the difficult tasks of modeling, designing, and analyzing cyberphysical systems which solve interdisciplinary problems in a wide variety of domains.

  12. CONTINUOUS DYNAMICS

  13. 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).

  14. 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 model in the form of a set of definitions and mathematical formulas.

  15. Create a mathematical model of all the parts of the embedded system Physical world Control system Software environment Hardware platform Network Sensors and actuators Construct the implementation from the model Construction may be automated, like a compiler More commonly, portions are automatically constructed What is Model-Based Design?

  16. 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 Modeling Techniques in this Course

  17. Modeling of Continuous Dynamics • Ordinary differential equations, Laplace transforms, feedback control systems, stability analysis, robustness analysis, …

  18. An Example: Modeling Helicopter Dynamics

  19. Six degrees of freedom: Position: x, y, z Orientation: pitch, yaw, roll Modeling Physical Motion

  20. Notation

  21. Notation

  22. Newton’s Second Law

  23. Orientation

  24. 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. Angular version of force is torque.For a point mass rotating around a fixed axis: Ty(t )= rf (t ) angular momentum, momentum

  25. Rotational Version of Newton’s Second Law

  26. Simple Example

  27. 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.

  28. 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. Actor Model of Systems

  29. Input is the net torque of the tail rotor and the top rotor. Output is the angular velocity around the y axis. Actor model of the helicopter Parameters of the model are shown in the box. The input and output relation is given by the equation to the right.

  30. Composition of actor models

  31. Actor models with multiple inputs

  32. 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.

  33. 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? Questions

  34. State machines sequential decision logic Synchronous/reactive concurrent composition concurrent computation composes well with state machines Dataflow models exploitable parallelism well suited to signal processing Discrete-event models explicit about time Time-driven suitable for periodic, timed actions Continuous-time models models of physical dynamics extended to “hybrid systems” to embrace computation Other Modeling Techniques we will talk about

  35. Discretized ModelA 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)

  36. Hybrid Systems –Union of Continuous & Discrete A good starting point, but has limitations. E.g. Consider building a hybrid system model for software running under a multitasking real-time OS.

  37. 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.

  38. 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 Key Concepts in Model-Based Design

  39. CONTINUOUS DYNAMICS II

  40. PID Controller Proportional Integral Derivative

  41. PID Control • Proportional control • Output is proportional to current error value • Integral Control • Output is the sum of instantaneous error value over time • Derivative Control • Output is the sum of the slope of the error over time

  42. A simple system with proportional control • Control is proportional to the error • Consider a marble on a flat and perfectly leveled tabled. • Any point can be an equilibrium point. • Motion can be described with Newton’s law • F = ma • x’’ = F/m • We want to keep the marble at x=0 by applying proportional control F = -kp*x

  43. Proportional Control F = -kp*x Describe the motion of the marble under this control?

  44. Proportional Control F = -kp*x Describe the motion of the marble under this control? Unstable, oscillates about 0 due to lack of friction in our control equation.

  45. Proportional Control Error is the difference between where the object is, and where we want it to be, the set point. Set point – can be stationary, an orbit, a proscribed trajectory, etc. Objective of this control is to put the marble at x=0 from any initial condition, or if disturbed by a force. This intuition is formalized as stability.

  46. Stability • Asymptotic stability • Error will converge to 0 over time • Instability • Error will diverge without bound • Marginal stability • Error will stay within some bound

  47. Proportional Control F = -kp*x -kp-> proportional control constant Characterize the stability of the marble.

  48. Proportional Control F = -kp*x Characterize the stability of the marble. Marginally stable

  49. Determining stability • Given some linear differential equation • 3*y’’ + 4*y’ + 5*y = 0 • From calculus we know the solution is the sum of exponentials: • Y(t) = c1exp(L1t) + c2(L2t) + … • Where L1, L2, … are the eigenvalues of the system • Eigenvalues can be complex!

  50. Determining stability • Study of stability • Stability – all eigenvalues real parts are negative • Stable with oscillation that dies down, imaginary parts non-zero • Stable with no oscillation, imaginary parts are zero • Instability -- At least one eigenvalue’s real part is greater than 0 • Marginal stability – all the real parts not greater than zero, but some equal to zero.

More Related