Cyber-Physical Systems Modeling Physical Dynamics IECE 553/453– Fall 2020 Prof. Dola Saha 1
Modeling Techniques Ø Models that are abstractions of system dynamics (how system behavior changes over time) § Modeling physical phenomena – differential equations § Feedback control systems – time-domain modeling § Modeling modal behavior – FSMs, hybrid automata, … § Modeling sensors and actuators –calibration, noise, … § Hardware and software – concurrency, timing, power, … § Networks – latencies, error rates, packet losses, … 2
Modeling of Continuous Dynamics Ø Ordinary differential equations, Laplace transforms, feedback control models, … 3
Example CPS System Ø Helicopter Dynamics 4
Modeling Physical Motion Ø Six Degrees of Freedom § Position: x, y, z § Orientation: roll ( ! ! ), yaw ( ! " ), pitch ( ! # ) 5
Notation Orientation can be represented in the same form Ø Functions of this form are known as continuous-time signals 6
Notation 7
Newton’s Second Law 8
Orientation 9
Torque: Angular version of Force T y (t ) = r f (t ) angular momentum, momentum Just as force is a push or a pull, a torque is a twist. Units: newton-meters/radian, Joules/radian 10
Rotational Version of Newton’s Law If the object is spherical, this reluctance is the same around all axes, so it reduces to a constant scalar I (or equivalently, to a diagonal matrix I with equal diagonal elements I ). 11
For a spherical object 12
Simplified Model Ø Model-order Reduction 13
Simplified Model of Helicopter Ø the force produced by the tail rotor must counter the torque produced by the main rotor Ø Assumptions: § helicopter position is fixed at the origin § helicopter remains vertical, so pitch and roll are fixed at zero Ø the moment of inertia reduces to a scalar that represents a torque that resists changes in yaw 14
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. 15
<latexit sha1_base64="5MPsh1nmYyghzWxkNOX/rSjxWkI=">AB7XicbVDLSsNAFL2pr1pfVZdugkVwVZIqPnZFNy4r2Ae0oUymk3bsZCbMTIQ+g9uXCji1v9x5984SYOo9cCFwzn3cu89fsSo0o7zaZWldW18rlY3Nre2d6u5eR4lYtLGgnZ85EijHLS1lQz0oskQaHPSNefXmd+94FIRQW/0lEvBCNOQ0oRtpInekwbcySYb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JvJkOBY/Uy8T+vl2Bw6aVcxgkySecfBYmwMbKz2+0hV4yimBpCqOJmV5uOiSIUTUOVvISrDOfJy+S9kndPa2f3p3VGtdFHWU4gEM4BhcuoAG30IQWUJjAIzDixVbT9ar9TYfLVlFZh9+wXr/AtnVkAs=</latexit> <latexit sha1_base64="gtp8sD+lMa51KX4tUFxd5uzmA=">AB9HicbVDLSsNAFJ3UV62vqks3g0VwVRMrPhZC0Y3LCvYBbSiTyaQdOnk4c1MIod/hxoUibv0Yd/6NkzSIrwMDh3Pu4d45TiS4AtP8MEoLi0vLK+XVytr6xuZWdXuno8JYUtamoQhlzyGKCR6wNnAQrBdJRnxHsK4zuc787pRJxcPgDpKI2T4ZBdzjlICW7IEbQprMLt3kyIVhtWbWzRz4L7EKUkMFWsPqu87T2GcBUEGU6ltmBHZKJHAq2KwyiBWLCJ2QEetrGhCfKTvNj57hA6242AulfgHgXP2eSImvVOI7etInMFa/vUz8z+vH4J3bKQ+iGFhA54u8WGAIcdYAdrlkFESiCaGS61sxHRNJKOieKnkJFxlOv78l3SO61aj3rg9qTWvijrKaA/to0NkoTPURDeohdqIonv0gJ7QszE1Ho0X43U+WjKzC76AePtEwlIkmg=</latexit> Linear System Ø Block with mass M connected to a wall through spring Ø Velocity y = dy/dt ˙ Ø Friction (static, Coulomb, Viscous) is not a linear function of ˙ y Ø For simplicity, we only consider viscous friction k 1 ˙ y ( t ) Ø Spring force (linear in operating range ) k 2 y Ø Thus we can model it as a linear system 16
Transfer Function Ø Description of the input-output relation for a linear system Ø Ratio of the output of a system to the input of a system Ø Laplace domain considering its initial conditions and equilibrium point to be zero Ø Time domain representation is Impulse Function 17
<latexit sha1_base64="ywk6eNQFEyNYuU6yNj4Fq16s48A=">ACKnicbZDLSsNAGIUn9VbrLerSzWAR6sKStOJlIVTduKxgL9DGMJlO2qGTCzMTIYQ8jxtfxU0XSnHrg5ikQVrgYGPc/5h5j+Wz6iQmjZVCiura+sbxc3S1vbO7p6f9AWXsAxaWG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zvzulQrIweIAkoraPRwHzGMGgpKGuD9wQ0mR27SY1OD5xYahXzbqZw1gkVkGqEBrqH+oJ0js0wAIx1L2LTMCO8UCGOF0VhnEkaYTPCI9hUNsE+lneabz4wjpbiGFwpVARi5+nMixb6Uie+oTh/DWP71MvE/rx+Dd2mnLIhioAGZf+TF3IDQyGIwXCYoAZ4ogolgaleDjLHABFRYlTyEqwzn3ycvks5p3WrUG/dn1eZNEUcZHaBDVEMWukBNdIdaqI0ImqJH9IxetFR70l61t3lrStm9tEvaO9fKmWTfA=</latexit> <latexit sha1_base64="tROhjtHLJpavwygwOUi5YON6YM=">ACAnicbZDLSsNAFIYn9VbrLepK3ASLUDc1acXLQi6cVnBXqCNZTKZtkMnF2ZOhBCG1/FjQtF3PoU7nwbkzSIWn8Y+PjPOZw5v+VzJkHXP5XC3PzC4lJxubSyura+oW5utaUXCEJbxOe6FpYUs5c2gIGnHZ9QbFjcdqxJpdpvXNHhWSewOhT0Hj1w2ZARDYg3Unb5texCF8bl9G9XisAIHhzakOFDLelXPpM2CkUMZ5WoO1I+7ZHAoS4QjqXsGboPZoQFMJpXOoHkvqYTPCI9hJ0sUOlGWUnxNp+4tja0BPJc0HL3J8TEXakDB0r6XQwjOXfWmr+V+sFMDw1I+b6AVCXTBcNA6Bp6V5aDYTlAPE8BEsOSvGhljgQkqZWyEM5SHX+fPAvtWtWoV+vXR+XGR5HEe2iPVRBjpBDXSFmqiFCLpHj+gZvSgPypPyqrxNWwtKPrONfkl5/wL6cJdK</latexit> Transfer Function Ø Newton’s Law y = d 2 y ( t ) /dt 2 ¨ y = dy ( t ) /dt ˙ m ¨ y = u − k 1 ˙ y − k 2 y Ø Applying Laplace Transform with zero initial condition ms 2 ˆ y ( s ) = ˆ u ( s ) − k 1 s ˆ y ( s ) − k 2 ˆ y ( s ) Ø Transfer Function 18
State Space Representation Ø Mathematical model of a physical system § Set of input, output and state variables § Related by first-order differential equations or difference equations 19
<latexit sha1_base64="yb+L/rDFG98hp2zIdwHprx3Mdxk=">ACHicbVDLSsNAFJ34rPUVdenCYBHcWJWfCyEohuXFewD2hAmk0k7dDIJMxMhCzd+CtuXCji1k9w5984SYOo9cDAuefcOzP3uBElQprmpzY3v7C4tFxZqa6urW9s6lvbXRHGHOEOCmnI+y4UmBKGO5JIivsRxzBwKe65k6vc791hLkjIbmUSYTuAI0Z8gqBUkqPvBUPC2WaZBfx0cRJrWw4LfOikSWOXjPrZgFjlglqYESbUf/UBegOMBMIgqFGFhmJO0UckQxVl1GAscQTSBIzxQlMEACzstFsmMA6V4h9ydZg0CvXnRAoDIZLAVZ0BlGPx18vF/7xBLP0zOyUsiVmaPqQH1NDhkaeiuERjpGkiSIQcaL+aqAx5BJlV21COE8x8n3yrOk26hbzXrz5rjWuizjqIBdsA8OgQVOQtcgzboATuwSN4Bi/ag/akvWpv09Y5rZzZAb+gvX8BnaWafQ=</latexit> State Space Equation Ø Let’s consider displacement and velocity as state variables Ø Using Newton’s Law: m ¨ y = u − k 1 ˙ y − k 2 y Ø In Matrix form: 20
Actor Model Ø Mathematical Model of Concurrent Computation Ø Actor is an unit of computation Ø Actors can § Create more actors § Send messages to other actors § Designate what to do with the next message Ø Multiple actors may execute at the same time 21
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 . 22
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. 23
Composition of Actor Model 24
Actor Models with Multiple Inputs 25
Recommend
More recommend