A device for delivery of electrical pulses to a desired tissue of a mammal. The device comprises a pulse generating device and an electrode device connected to the pulse generating device. The pulse generating device is configured to determine conductance and phase angle values between one electrode and a reference electrode of the electrode device when the electrode device is inserted into the desired tissue and when pulses based on alternating currents having different frequencies are generated between the electrode and the reference electrode. Based on the determined conductance and phase angle values, the pulse generating device is configured to determine the type of tissue the electrode device penetrates, to determine one or more parameters of electrical pulses to be delivered to the desired tissue and to generate the electrical pulses having the determined one or more parameters.