PDV-based packet length allocation for networked control systems