A Flexible Linear Control Algorithm for Wireless Sensor Networks Synchronization