Demand Characterization For Real-Time Cyber-Physical Systems: Algorithms, Analysis, And Applications To Control Systems