Real-Time Implementation RT program consists of : main, off_task, on_task Func void link_eqs(UY, t, x) Matrix UY, x; Real t; { Matrix u, y, xh; extern Matrix z; y = C*x; // Output eq. xh = Chd*z + Dhd*y; // Estimation u = - F*xh; // State feedback z = Ahd*z + Bhd*y + Jhd*u; // Observer UY = [[u][y]]; } ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ Func void on_task(){ Matrix u, y, xh; y = sensor(); // Input from sensor xh = Chd*z + Dhd*y; // Estimation u = - F*xh; // Control law z = Ahd*z + Bhd*y + Jhd*u; // Observer actuator(u); // Output to actuator }