Criteria for inclusion in the study of patients:  Signed written informed consent. Men or women aged 18 to 60 years after a first occurred acute cerebrovascular accident or in the recovery period after injury of the cervical and upper thoracic spinal cord. Early or late rehabilitation period of acute cerebrovascular accident by the type of ischemic stroke or the consequences of SCI in the late recovery period Diagnosis of "acute ischemic cerebrovascular accident", or a condition after spinal cord injury at the C3-C7 level, moderate or high severity ASIA A and ASIA B, according to the discharge summary, MRI or CT. For groups of patients with stroke: the degree of severity of paresis of the upper limb from 3 points to 0 (according to the 6-point MRC muscle strength scale https://cpd-program.ru/methods/mrc.htm) The patient's ability and willingness to comply with the requirements of this protocol. Expressed patient motivation for rehabilitation.  Inclusion criteria for healthy volunteers:  Signed written informed consent. Men or women between the ages of 18 and 40 Absence of somatic and psychiatric diseases (according to the reports of the subject and according to the examination of a medical specialist before the start of the study) Ability and willingness to comply with the requirements of this protocol.  Exclusion Criteria:  Severe cognitive impairment (<10 points on the Montreal Cognitive Assessment Scale). The score on the Hamilton scale is above 18 points. The rating on the Rankin scale is higher than 4 points. Concomitant diseases that cause a decrease in muscle strength or an increase in muscle tone in the upper limbs (for example, cerebral palsy, brain damage as a result of trauma) or rigidity (for example, Parkinson's disease, contracture). Late stages of arthritis or significant limitation of range of motion. The absence of a part of the upper limb due to amputation caused by various reasons. Any medical condition, including mental illness or epilepsy, that may affect the interpretation of the test results, the conduct of the test, or the safety of the patient. Alcohol abuse, medical marijuana use, or light drug use in the previous 12 months. Use of experimental drugs or medical devices within the previous 30 days prior to Visit 1. Inability to comply with research procedures, according to the researcher. The severity of the patient's condition according to the data of the neurological or somatic status, which does not allow full rehabilitation Visual acuity less than 0.2 in the weakest eye according to the table of visual acuity of Sivtsev. Unstable angina and / or heart attack during the previous month History of stroke (for patients with spinal cord injury) or recurrent stroke (for patients with acute cerebrovascular accident). Uncontrolled arterial hypertension. Ataxia. Pacemaker and / or other implanted electronic devices. Taking muscle relaxants. Peripheral neuropathy. Concomitant diseases in the stage of exacerbation or decompensation, requiring active therapy. The presence of allergic reactions and / or other skin lesions at the place of application of the heart rate electrodes at the time of the study. Acute urinary tract infections. Acute thrombophlebitis. All forms of epilepsy. Benign and malignant neoplasms.