A method for configuring an intelligent electronic device connected in an electrical network for protection and control of an electrical equipment by analysis of measured electrical signal with at least one application function (105, 115) comprised in the IED and by generating a trip signal to operate a circuit breaker connected in series with the electrical equipment, characterized in that the IED is communicatively connected to a virtual model hosted on a computing system, the virtual model configured as a digital twin (210, 250) of the IED, and wherein the virtual model comprises at least one virtual application function (105, 115) corresponding to the at least one application function (105, 115) of the IED, the method comprising the computing system performing the steps: a. firstly, receiving a plurality of measured electrical signals as well as configuration parameters associated with measured electrical signals, the at least one application function (105, 115) and status of equipment from the IED; b. secondly, determining at least one first performance parameter for the at least one virtual application function using the virtual model; c. thirdly, adapting the virtual model based on the received plurality of measured electrical signals and configuration parameters for the at least one virtual application function by updating functional parameters of the at least one virtual application function; d. fourthly, determining at least one second performance parameter for the at least one virtual application function using the adapted virtual model; e. fifthly, comparing the difference between the at least one first performance parameter and the at least one second performance parameter to determine an improvement in the virtual model for the at least one application function (105, 115) with a preset performance threshold; f. finally, transmitting functional parameters of the at least one virtual application function comprised in the virtual model to configure the corresponding at least one application function (105, 115) of the IED based on significance of the difference between the at least one first performance parameter and the at least one second performance parameter. a. firstly, receiving a plurality of measured electrical signals as well as configuration parameters associated with measured electrical signals, the at least one application function (105, 115) and status of equipment from the IED; b. secondly, determining at least one first performance parameter for the at least one virtual application function using the virtual model; c. thirdly, adapting the virtual model based on the received plurality of measured electrical signals and configuration parameters for the at least one virtual application function by updating functional parameters of the at least one virtual application function; d. fourthly, determining at least one second performance parameter for the at least one virtual application function using the adapted virtual model; e. fifthly, comparing the difference between the at least one first performance parameter and the at least one second performance parameter to determine an improvement in the virtual model for the at least one application function (105, 115) with a preset performance threshold; f. finally, transmitting functional parameters of the at least one virtual application function comprised in the virtual model to configure the corresponding at least one application function (105, 115) of the IED based on significance of the difference between the at least one first performance parameter and the at least one second performance parameter.