This plant seems to prefer poor areas such as road edges. Sulphur butterflies are attracted to the purple flowers and plant.
Wild legume ?
Maybe a Desmodium.
Can you show any seed pods?
Flower appears to be attached to main stem rather rather than an off shoot like most Desmodium appear to show. However, could this be Desmodium triflorum?