Trajectory Based Traffic Analysis and Control Utilizing Connected Autonomous Vehicles