Gap between two domain ·反应式系统 A/D Control-law D/A computation -Stimulus-Response:FSM ·同步组合 logical concurrency true i sync:temporally deterministic true pedestrian flow-analysis:response-time,e2e delay none waiting ·实时系统 sigG sigR crossing multitask models:concurrent tasks ·Event-driven ·priority,deadline IArchitecture Application schedulability analysis physical concurrency async:nondeterminism arrival order/computation time RTOS Core
Gap between two domain • 反应式系统 – Stimulus-Response:FSM • 同步组合 – logical concurrency • sync:temporally deterministic • flow-analysis:response-time,e2e delay • 实时系统 – multitask models:concurrent tasks • Event-driven • priority,deadline • schedulability analysis – physical concurrency • async:nondeterminism • arrival order/computation time
内容提要 ·控制系统设计过程 。 软件设计:软件体系结构(组件及其关系),任务抽象,实现 -Event-action模型 ·识别事件和动作,任务=功能o时间聚合 -DARTS方法:Design Approach for Real--Time Systems ·基于系统的DFG进行任务划分 ·实时软件分析设计方法DARTS:Hassan Gomaa提出 。 实时编程范式(programming paradigms)/编程模型 Real-Time Software -编程范式:way of thinking about programming Design for IEmbedded Systems 一同步方法/异步方法:同步/异步语言 COMAA ·参考资料 Real-Time Software Design for Embedded Systems,2016/18 ·采用SysML、UML和MARTE,从用例到完整软件体系结构,COMET A Practitior's RTE设计方法。 Handbook¥ Real-Time Analysis SEI@CMU推荐教材 学分的海一 -A Practitioner's Handbook for Real-Time Analysis:Guide to Rate Monotonic Analysis for Real-Time Systems,1993
内容提要 • 控制系统设计过程 • 软件设计:软件体系结构(组件及其关系),任务抽象,实现 – Event-action模型 • 识别事件和动作,任务=功能or时间聚合 – DARTS方法:Design Approach for Real-Time Systems • 基于系统的DFG进行任务划分 • 实时软件分析设计方法DARTS:Hassan Gomaa提出 • 实时编程范式(programming paradigms)/编程模型 7/100 • 实时编程范式(programming paradigms)/编程模型 – 编程范式:way of thinking about programming – 同步方法/异步方法:同步/异步语言 • 参考资料 – Real-Time Software Design for Embedded Systems,2016/18译 • 采用SysML、UML和MARTE,从用例到完整软件体系结构,COMET /RTE设计方法。 • SEI@CMU推荐教材 – A Practitioner’s Handbook for Real-Time Analysis: Guide to Rate Monotonic Analysis for Real-Time Systems,1993
control systems设计流程 The capture/convert design process:two steps the control engineer:将数学模型转换成控制模型 modeling of the plant behavior and disturbances - deriving and optimizing control laws validating functionality and performance of the model through analysis and simulation 0 the software engineer decomposing the necessary computational activities into periodic tasks assigning tasks to CPUs and setting task priorities to meet the desired hard real-time constraints under the given scheduling mechanism and hardware performance achieving the desired degree of fault tolerance through replication and error correction code integration,testing,and optimization
control systems设计流程 • The capture/convert design process:two steps • the control engineer:将数学模型转换成控制模型 – modeling of the plant behavior and disturbances – deriving and optimizing control laws – validating functionality and performance of the model through analysis and simulation • the software engineer – decomposing the necessary computational activities into periodic tasks – assigning tasks to CPUs and setting task priorities to meet the desired hard real-time constraints under the given scheduling mechanism and hardware performance – achieving the desired degree of fault tolerance through replication and error correction – code integration, testing, and optimization
Controller:Control System Control a device using actuator,based on sampled sensor data Control loop compares measured value y(t)and reference r(t) Depends on correct control law computation,reference input,accuracy of measurements - Time between measurements of y(t),r(t)is the sampling period,T Small T better approximates analogue control but large T needs less processor time; if T is too large,oscillation will result as the system fails to keep up with changes in the input Control-law Vertical axis Left Aileron Reference computation Rudder nput:r间明 Elevator Right Aileron Longitudinal axis y() Lateral axis Sensor Device Actuator
Controller: Control System • Control a device using actuator, based on sampled sensor data – Control loop compares measured value y(t) and reference r(t) • Depends on correct control law computation, reference input, accuracy of measurements – Time between measurements of y(t), r(t) is the sampling period, T • Small T better approximates analogue control but large T needs less processor time; • if T is too large, oscillation will result as the system fails to keep up with changes in the input !
Control Law computation sampling period,T (kT)=Gx(T)》 reads its inputs u, ((k+1)T)F(x(kT).u(kT)) computes its outputs y, n up dates its state x write (0) write (1) write y(2) 小 control equations 0 T 2T 套time output equation ·ykT可,zkT) read u(0) read u(1) read u(2) state equation ·x(k+1)T,w(k+1)T) set timer to interrupt periodically with period T; 一时序假设(两种同步语义): at each timer interrupt do ·one-step delay同步:Moore do analog-to-digital conversion to gety; compute control output u; ·zero time同步:Mealy output u and do digital-to-analog conversion; control systems composition od 2(kT)G1(w(kT),u(kT)) y(kT)=G2(x(kT)) w((k +1)T)=Fi(w(kT),u(kT)) x((k+1T)=F2(x(kT),z(kT))
Control Law computation • sampling period, T – reads its inputs u , – computes its outputs y , – up dates its state x • control equations – output equation • y(kT),z(kT) – state equation • x((k+1)T),w((k+1)T) – 时序假设(两种同步语义): • one-step delay同步:Moore • zero time同步:Mealy • control systems composition