Reactive Power management using TSC-TCR

As per my project topic here i want to improve power factor by switching in capacitor through thyristor.Here in this project I want to make hardware of this project usingproteus software and arduino but I am not getting coding to calculate the power factor and to switch the thyristor.Here thee load I want to use is Single phase induction motor 2HP,230,10A,.Plz help me I am not getting it!!!

project paper.pdf (872 KB)