Methods, apparatus, and systems are disclosed for optimization techniques and a realistic 3D model to design optimal parameters for transcutaneous stimulation to achieve focalized stimulation of a target tissue such as the spinal cord, brain or other internal organ. The methods, apparatus, and systems include generation of a 3D model from a CT/MRI image, as well as an optimization algorithm that enables stimulation of any target location (e.g., on the dorsal root, or on the dorsal column) with any orientation at high precision.