In HSPICE you can define the capacitance of a capacitor with an equation. For example:
Csensor node1 node2 c='5p*v(controlvoltage)' CTYPE=1
This will make your capacitor depend on the voltage at the node "controlvoltage". If this voltage is defined to be 1V from 0s to 500us, 2V from 500us to 1ms and back to 1V at 1ms, this will do what you want.
The "CTYPE" option controls the charge calculation method and needs to be "1" if the capacitance is supposed to vary with node voltages (the default value is "0").
Regards
This method is very useful, and I have already solve my difficulties by using this method. Thank you, maxwellequ.