Currently, Simscape does not support directly setting the initial targets for voltage and current sensor blocks.
As a workaround, you can add a 'resistor' block, with a very high resistance in parallel to the voltage sensor block. Let us call this new resistor the 'shunt resistor'. The following figure shows the placement of the shunt resistor 'R_Shunt' for the example problem.
Due to a very high resistance, the shunt resistor will almost behave like an open circuit. You can then set the initial voltage of this shunt resistor and that setting would reflect as the initial voltage for the voltage sensor block. To set the initial voltage for the shunt resistor and configure the model to utilize this initial voltage, please perform the following steps:
Double-click on the shunt resistor's block. In the 'Initial Targets' section, enable the 'Voltage' option. Set the initial voltage to the desired value and set it’s priority to 'High'.
Remove initial voltage targets from all other electrical blocks. They might interfere with the initial settings of the shunt resistor block.
For the ‘Solver’ block, uncheck the ‘Start simulation from steady state’ option. This is not required and will interfere with the initial value settings.
Please also note that the resistance of the shunt resistor should be very high but will still be finite. As a result, the simulation results may be affected, specifically for highly sensitive systems.