I need to connect capacitor bank to a 240VAC supply. I understand at the instance of switching on the capacitor bank there will be an inrush current since capacitor act like a short to ground. I'm thinking of just connecting an inductor in series with the capacitor to reduce the current. Will this practically work? If so, for a 1 microfarad capacitor, is there any formula to calculate the inductance I need to connect so the inrush current can be reduced to a certain level?
Using a current limiting resistor burns off the energy that is otherwise held in the inductor and potentially turned into an unwanted surge voltage across the capacitor bank. You have to be careful of this; the peak voltage across the capacitor bank could be nearly double the supply voltage.
I recommend that you simulate this and see for yourself.
You can use a resistive network to control the magnitude of the inrush current and to distribute the power dissipation over several resistors. But you don't want that network to stay in series with the power supply once inrush is complete. You can use a MOSFET in parallel with the network, letting it block current during start-up and pass current after that. It's on-resistance will be very low and so essentially all current will bypass the resistors once the transistor is switched on. You can use a processor to operate the MOSFET, but if you don't want to include one you could use an RC timer circuit to control the duration of the inrush phase and a comparator's output to operate the transistor's gate when the capacitor's voltage is high enough..
You're probably looking for something like Hitachi Power Dynacomp. They describe the internals of the design there too.
In most cases, unless the load is very static, you'll need several steps of compensation, i.e. several capacitor-reactor banks that can be switched into and out of the power supply. The step size could be say 5% to 10% of the peak reactive load [var] you want to compensate.
In a nutshell: use static switches (thyristors, triacs or mosfets) to do zero-current switching. Turn the switch on when the phase-to-capacitor voltage is zero. Turn the switch off when the switch current has decayed to zero. Thyristors and triacs do this automatically.
The circuit to control the switch cycling can be a simple analog one. A top-level controller needs to measure the reactive power of the load, and select a capacitor combination that will compensate for it. The controller selects the capacitors, and the low-level switch controls ensure that the switching is transient-free.
To make it practical, you'll likely also need the detuning reactors in series with the capacitors.
The circuit can compensate for not only the reactive load, but also for line voltage sag due (see the Dynacomp pamphlet).