P. Albertos* & A. Crespo + Universidad Politécnica de Valencia * Dept. of Systems Engineering and...
-
date post
19-Dec-2015 -
Category
Documents
-
view
214 -
download
0
Transcript of P. Albertos* & A. Crespo + Universidad Politécnica de Valencia * Dept. of Systems Engineering and...
![Page 1: P. Albertos* & A. Crespo + Universidad Politécnica de Valencia * Dept. of Systems Engineering and Control, + Dept. of Computer Engineering POB. 22012 E-46071.](https://reader030.fdocuments.in/reader030/viewer/2022032703/56649d2a5503460f949feb97/html5/thumbnails/1.jpg)
P. Albertos* & A. Crespo+
Universidad Politécnica de Valencia* Dept. of Systems Engineering and Control,
+ Dept. of Computer Engineering
POB. 22012E-46071 Valencia, Spain. Fax: +34 96 3879579
e-mail: [email protected]
Embedded Control Systems:Control Kernel
![Page 2: P. Albertos* & A. Crespo + Universidad Politécnica de Valencia * Dept. of Systems Engineering and Control, + Dept. of Computer Engineering POB. 22012 E-46071.](https://reader030.fdocuments.in/reader030/viewer/2022032703/56649d2a5503460f949feb97/html5/thumbnails/2.jpg)
NoE on Embedded Systems Design
©P. Albertos 2005
Embedded Control Systems
• Embedded systems with:– hard RT constraints– guarantee of safe operation– best possible performances
• Additional issues from viewpoint of:– implementation– computation– algorithmic
![Page 3: P. Albertos* & A. Crespo + Universidad Politécnica de Valencia * Dept. of Systems Engineering and Control, + Dept. of Computer Engineering POB. 22012 E-46071.](https://reader030.fdocuments.in/reader030/viewer/2022032703/56649d2a5503460f949feb97/html5/thumbnails/3.jpg)
NoE on Embedded Systems Design
©P. Albertos 2005
RT Control Issues • RT Constraints:
– Maximize the time determinism• For many controllers a worst-case approach works well e.g.,
PI, PID, State Feedback, …
however, many exceptions:• hybrid controllers that switch between different modes with
different characteristics• model-predictive controllers (MPC)• convex optimization problem solved every sample
execution time can vary an order of magnitude
– Compensate the variations:• Measure and react• Feedback robustness
![Page 4: P. Albertos* & A. Crespo + Universidad Politécnica de Valencia * Dept. of Systems Engineering and Control, + Dept. of Computer Engineering POB. 22012 E-46071.](https://reader030.fdocuments.in/reader030/viewer/2022032703/56649d2a5503460f949feb97/html5/thumbnails/4.jpg)
NoE on Embedded Systems Design
©P. Albertos 2005
Control requirements
• Multiloop control• Non-uniform sampling• Missing data• Variable delays• Sampling period changes• Mode changes• Fault tolerant• Safe operation• CPU optimization• Battery control
Process to control
Environment
ECS
CPUBattery
S1
Si
Memory
A1
Ai
![Page 5: P. Albertos* & A. Crespo + Universidad Politécnica de Valencia * Dept. of Systems Engineering and Control, + Dept. of Computer Engineering POB. 22012 E-46071.](https://reader030.fdocuments.in/reader030/viewer/2022032703/56649d2a5503460f949feb97/html5/thumbnails/5.jpg)
NoE on Embedded Systems Design
©P. Albertos 2005
ECS: Implementation• The same resources must be shared between
different tasks
• Alternative control algorithms should be ready to get the control of the process
• Working conditions, such as priority, allocated time and memory or signals availability may change
• Variable delays should be considered
• Validation and certification
![Page 6: P. Albertos* & A. Crespo + Universidad Politécnica de Valencia * Dept. of Systems Engineering and Control, + Dept. of Computer Engineering POB. 22012 E-46071.](https://reader030.fdocuments.in/reader030/viewer/2022032703/56649d2a5503460f949feb97/html5/thumbnails/6.jpg)
NoE on Embedded Systems Design
©P. Albertos 2005
ECS: Computational viewpoint• Economic algorithms• Information updating • Optional tasks • Hybrid systems • CPU use measurement and optimisation• On-line scheduling• Memory saving • Economic hardware redundancy• Fault detection and isolation
![Page 7: P. Albertos* & A. Crespo + Universidad Politécnica de Valencia * Dept. of Systems Engineering and Control, + Dept. of Computer Engineering POB. 22012 E-46071.](https://reader030.fdocuments.in/reader030/viewer/2022032703/56649d2a5503460f949feb97/html5/thumbnails/7.jpg)
NoE on Embedded Systems Design
©P. Albertos 2005
Control Performances
• RT Constraints:– Maximize the time determinism
• For many controllers a worst-case approach works well e.g., PI, PID, …
however, a lot of exceptions:• hybrid controllers that switch between different modes with
different characteristics• model-predictive controllers (MPC)• convex optimization problem solved every sample• execution time can vary an order of magnitude
– Compensate the variations:• Feedback robustness• Measure and counteract
• Relevance of the control actions
The Control Effort concept
• Sensitive to time delays
• Changes in the sampling period:– Controller parameters– Past data
• Commutation bumping
![Page 8: P. Albertos* & A. Crespo + Universidad Politécnica de Valencia * Dept. of Systems Engineering and Control, + Dept. of Computer Engineering POB. 22012 E-46071.](https://reader030.fdocuments.in/reader030/viewer/2022032703/56649d2a5503460f949feb97/html5/thumbnails/8.jpg)
NoE on Embedded Systems Design
©P. Albertos 2005
MIMO controlled plant
ref
Hj.... .... ........
yiuj
vj
zi
Si
Process
Control
IntegrityRedundancyPerformance degrading
![Page 9: P. Albertos* & A. Crespo + Universidad Politécnica de Valencia * Dept. of Systems Engineering and Control, + Dept. of Computer Engineering POB. 22012 E-46071.](https://reader030.fdocuments.in/reader030/viewer/2022032703/56649d2a5503460f949feb97/html5/thumbnails/9.jpg)
NoE on Embedded Systems Design
©P. Albertos 2005
ECS: Control algorithm viewpoint– Reduced order models – Non-conventional sampling and updating patterns– Missing data control– Event-triggered control– Hybrid control systems – Decision and supervisory control– Multimode control– Sampling rate changes– Fault-tolerant control – Degraded and back-up (safe) control strategies– Battery monitoring and control
![Page 10: P. Albertos* & A. Crespo + Universidad Politécnica de Valencia * Dept. of Systems Engineering and Control, + Dept. of Computer Engineering POB. 22012 E-46071.](https://reader030.fdocuments.in/reader030/viewer/2022032703/56649d2a5503460f949feb97/html5/thumbnails/10.jpg)
NoE on Embedded Systems Design
©P. Albertos 2005
The kernel concept
• Basic services:– Task and time management
– Interrupt handling
– Interface to the applications (API)
– Mode changes
– Fault tolerance
OS kernel:
• Additional services– File management– Quality of service– Tracing and debugging
– Mode changes
– Fault tolerance
![Page 11: P. Albertos* & A. Crespo + Universidad Politécnica de Valencia * Dept. of Systems Engineering and Control, + Dept. of Computer Engineering POB. 22012 E-46071.](https://reader030.fdocuments.in/reader030/viewer/2022032703/56649d2a5503460f949feb97/html5/thumbnails/11.jpg)
NoE on Embedded Systems Design
©P. Albertos 2005
The OS kernel (I)The OS Kernel provides the minimal services that should be included in any embedded system.
• Task management and synchronization mechanisms • Task communication• Semaphores and monitors• Server definition (aperiodic servers, constant bandwidth servers))• Scheduling policies
• Time management• Real-time clock• High resolution timers and execution timers (limit the cpu use per task)• Absolute and relative delays
• Application interface (API)• POSIX (standard) • OSEK (automobile industry specification)• ….
![Page 12: P. Albertos* & A. Crespo + Universidad Politécnica de Valencia * Dept. of Systems Engineering and Control, + Dept. of Computer Engineering POB. 22012 E-46071.](https://reader030.fdocuments.in/reader030/viewer/2022032703/56649d2a5503460f949feb97/html5/thumbnails/12.jpg)
NoE on Embedded Systems Design
©P. Albertos 2005
The OS kernel (II)The OS Kernel provides the minimal services that should be included in any embedded control system.
• Fault tolerance • Degrade task activity (when a task does not guarantee some timing constraints, the degraded behavior is executed)• Change mode events raised when some faults can not be managed.
• Mode changes • Mode definition (set of tasks associated to a mode) • Mode change events (event to change from one mode to another) • Mode change protocol
• Security• Network access• Attacks
![Page 13: P. Albertos* & A. Crespo + Universidad Politécnica de Valencia * Dept. of Systems Engineering and Control, + Dept. of Computer Engineering POB. 22012 E-46071.](https://reader030.fdocuments.in/reader030/viewer/2022032703/56649d2a5503460f949feb97/html5/thumbnails/13.jpg)
NoE on Embedded Systems Design
©P. Albertos 2005
Hardware
Interrupt services
Task management
Mode tasks
API
Application Tasks
The OS kernel (III)
![Page 14: P. Albertos* & A. Crespo + Universidad Politécnica de Valencia * Dept. of Systems Engineering and Control, + Dept. of Computer Engineering POB. 22012 E-46071.](https://reader030.fdocuments.in/reader030/viewer/2022032703/56649d2a5503460f949feb97/html5/thumbnails/14.jpg)
NoE on Embedded Systems Design
©P. Albertos 2005
The Control Kernel concept
• Ensures control action (CA) delivering• Data acquisition of major signals• Transfer to new control structure
• Additional CA computing facilities• Communication facilities• Coordination facilities
DE driven-control
![Page 15: P. Albertos* & A. Crespo + Universidad Politécnica de Valencia * Dept. of Systems Engineering and Control, + Dept. of Computer Engineering POB. 22012 E-46071.](https://reader030.fdocuments.in/reader030/viewer/2022032703/56649d2a5503460f949feb97/html5/thumbnails/15.jpg)
NoE on Embedded Systems Design
©P. Albertos 2005
Event-driven control
F
![Page 16: P. Albertos* & A. Crespo + Universidad Politécnica de Valencia * Dept. of Systems Engineering and Control, + Dept. of Computer Engineering POB. 22012 E-46071.](https://reader030.fdocuments.in/reader030/viewer/2022032703/56649d2a5503460f949feb97/html5/thumbnails/16.jpg)
NoE on Embedded Systems Design
©P. Albertos 2005
Basic Control Loop
A/D
ControlAlgorithm
D/A
referencer(t)
Sensor ActuatorProcess
y(t) u(t)
ukyk
rkA/D
Regulator
CT
DT
![Page 17: P. Albertos* & A. Crespo + Universidad Politécnica de Valencia * Dept. of Systems Engineering and Control, + Dept. of Computer Engineering POB. 22012 E-46071.](https://reader030.fdocuments.in/reader030/viewer/2022032703/56649d2a5503460f949feb97/html5/thumbnails/17.jpg)
NoE on Embedded Systems Design
©P. Albertos 2005
Basic Control Loop
task body Controlador is Periodo : Time_Span; -- duracion Proxima_Iteracion : Time; -- tiempo absoluto begin Proxima_Iteracion := Clock; loop convertir_sensor_analogico_digital(y); calcular_accion_control(u); enviar_accion_control_convertida(u); actualizar_variables_internas(e,y,u,…); Proxima_Iteracion:=Proxima_Iteracion + Periodo; delay until Proxima_Iteracion; end loop; end Controlador;
![Page 18: P. Albertos* & A. Crespo + Universidad Politécnica de Valencia * Dept. of Systems Engineering and Control, + Dept. of Computer Engineering POB. 22012 E-46071.](https://reader030.fdocuments.in/reader030/viewer/2022032703/56649d2a5503460f949feb97/html5/thumbnails/18.jpg)
NoE on Embedded Systems Design
©P. Albertos 2005
Control Kernel• Ensures control action (CA) delivering
– Safe (back-up) CA computation– Safe CA computation based on previous data
• Data acquisition of major signals– Safe CA computation based on current data
• Transfer to new control structure– Basic control structure parameters computation– CA computation
• Full DA – Control structures evaluation and selection– CA computation (different levels)
• Communication facilities• Coordination facilities
![Page 19: P. Albertos* & A. Crespo + Universidad Politécnica de Valencia * Dept. of Systems Engineering and Control, + Dept. of Computer Engineering POB. 22012 E-46071.](https://reader030.fdocuments.in/reader030/viewer/2022032703/56649d2a5503460f949feb97/html5/thumbnails/19.jpg)
NoE on Embedded Systems Design
©P. Albertos 2005
The control kernel concept
kvku
Plant
CAdeliv
Backup CA CAuser
CAcomputation
bu
kx
kmky
DA
kr
Safe operation in any condition
![Page 20: P. Albertos* & A. Crespo + Universidad Politécnica de Valencia * Dept. of Systems Engineering and Control, + Dept. of Computer Engineering POB. 22012 E-46071.](https://reader030.fdocuments.in/reader030/viewer/2022032703/56649d2a5503460f949feb97/html5/thumbnails/20.jpg)
NoE on Embedded Systems Design
©P. Albertos 2005
Control Kernel Algorithm
• CA delivering • Backup CA bk uu
• Backup CA Computation ),( 1 kbk xufu
• Current safe b-up CA comp.
kk uv
• Basic CA computation ),(1 kkk xrfu
),( kbk xufu
• CA comp ),( kkik xrfu • CA comp. (Process model)
– Essential– Partial– Complete
),( kkk xrFu
![Page 21: P. Albertos* & A. Crespo + Universidad Politécnica de Valencia * Dept. of Systems Engineering and Control, + Dept. of Computer Engineering POB. 22012 E-46071.](https://reader030.fdocuments.in/reader030/viewer/2022032703/56649d2a5503460f949feb97/html5/thumbnails/21.jpg)
NoE on Embedded Systems Design
©P. Albertos 2005
Control Kernel Algorithm
• Model reduction:– Partial control (parts
of the plant)
modes slow : modes;fast : 21 xx
- Partial phenomena (fast/slow dynamics)
S1
S2
u y
k
kk
kkx
xCCu
B
B
x
x
AA
AA
x
x
2
121
2
1
2
1
2221
1211
12
1 y ;
![Page 22: P. Albertos* & A. Crespo + Universidad Politécnica de Valencia * Dept. of Systems Engineering and Control, + Dept. of Computer Engineering POB. 22012 E-46071.](https://reader030.fdocuments.in/reader030/viewer/2022032703/56649d2a5503460f949feb97/html5/thumbnails/22.jpg)
NoE on Embedded Systems Design
©P. Albertos 2005
Conclusions
• Control Kernel
• Variables relevance– Control effort