fig1 shows a motor controller designed according to configuration three , i . e . having a current transducer in the high - side dc - link and a desaturation protection circuit placed in the gate driver of the low - side switches of the inverter . a brake circuit comprising two diodes and a switch with a desaturation protection circuit is via the desaturation protection connected to an or gate ( brake resistor not showed ). the or gate goes high , if one of the desaturation protection - circuits signals a saturation condition across a switch . in a conventional manner , the motor controller further comprises a three - phase rectifier and coils inserted in the high - and low - side dc - link buses . the coils act as chokes to reduce mains retroaction . an optional radio - frequency interference ( rfi ) filter is placed on the input to the rectifier . the control section of the motor controller comprises a digital signal processor ( dsp ), which performs the overall motor control and generates the pwm control signals , which are led to a galvanic isolation consisting of seven optocouplers , one optocoupler for each inverter switch and one for the brake switch . correspondingly , the signals from the desaturation protection circuits are galvanically isolated by an optocoupler and fed to a desaturation control circuit , which is connected to the dsp . a current - control circuit is connected to the current transducer and to the dsp . the control section is electrically referenced to ground . in operation , the inverter switches are pulse - width modulated , and electrically connected to a three phase ac motor . if a short circuit between one of the three motor phases and earth incidentally arises ( fig1 shows such a fault on the output between switch q 3 and q 4 ), an item b problem has emerged , i . e . an earth - fault with current - limiting impedance in the earth loop . the coils in the dc - link function as the current limiting impedance , until saturation occurs . due to the reduced amperage of the current , the acceptable reaction time is in the millisecond range and not in the microsecond range . this fault condition may be detrimental to the rectifier due to repetitive spikes on the pulsating dc voltage . according to fig5 the short circuit to earth occurs during a voltage vector 110 , i . e . high - side switches q 1 and q 3 on , and switch q 5 off . correspondingly , q 2 and q 4 are off , and q 6 on . fig2 shows the conventional vector circle , which is also used in sfavm . vectors 000 or 111 result in a differential - mode no - current condition in the dc - link , i . e . the motor currents are flowing in the inverter bridge only . the current rise due to the earth connection is measured by the current transducer and detected by the current - control circuit , which signals to the dsp . the dsp acknowledges that the motor controller is in an error condition and will now do one of two , based on the amperage of the error current . 1 . if the amplitude of the error current is relatively low normal operation is maintained , where normal operation includes the steps in fig4 . 2 . if the amplitude is high , the controller stops the pulse width modulation of the switches . in this case , operation ceases , and the motor is coasting for a short time . this coasting time may be almost arbitrarily chosen , but a time period corresponding to 1 or more switching period ( s ) is a good practical choice . before resuming operation with pwm control signals on the inverter switches , the step of applying the fault detection vector is performed . the dsp imposes the 111 vector ( because the current transducer is placed in the high side ; vice versa if it was placed in the low side ) and expects a zero - current signal from the current transducer . however , due to the earth - fault connection , a current will flow , and the dsp will stop operation of the motor , because the type of error was identified as an earth - fault . generally , the fault signal can be other signals than current signals ; it can also be an over - or under - voltage of the dc - link ( dc voltage sensor not shown in the figure ). if the fault signal came from the desaturation protection circuit of q 4 instead of coming from the current transducer , the desaturation control circuit would signal this to the dsp , which would act in the same way as just described . thus , the motor controller of fig1 is able to dispense operation upon either of two fault signals . if the low - side desaturation circuits are trigged , an earth - fault test may also be made by simply applying the opposite zero - voltage vector 000 . this gives an earth - fault test independent on the current sensing . in the following , the timing and the generation of the test vector will be described in detail . fig3 a and b shows a conventional sfavm switching period comprising four different switch states ; two zero vectors ( 000 , 111 ) and two active vectors ( 100 , 110 ). the vectors are symmetrically placed around the 180 degrees centre axis of the switching period . fig3 a shows the situation where the output voltage of the motor controller is high . the u - phase is on for nearly the whole period , while the w - phase is on for only a short time . as a part of the conventional modulation scheme , zero vectors are applied in the middle ( 111 ) and at the start and end of the period ( 000 ). the same applies for the situation in fig3 b , where the output voltage to the motor is lower . in fig5 , the high voltage sfavm pattern on fig3 a is repeated . during the fifth vector , 110 , the over - current signal described above ( or any alternative violation ) reaches the dsp , which stops operation . no switching occurs for a period a little longer than a switching period in order — maybe — to remove the cause of the fault , which could be moisture which evaporates during this pause . also , cooling of the switch itself might relieve the problem . shortly before commencing operation again , vector 111 is applied . this test zero vector is different from the zero vector applied in the start of the sfawm scheme of fig3 a because the test zero vector is followed by a current measurement in order to identify the type of fault . also , the pulse length may be different . the duration of the applied test vector is larger than a minimum value to ensure that the earth - fault can be detected in any operating point of the motor ; typically it has a duration equal to a fraction of the switching period . the duration may be from 5 to 50 μs , such as between 15 μs and 45 μs , such as between 20 μs and 40 μs , such as between 25 μs and 35 μs . after having applied the test vector , the current is measured , and , if an earth - fault is detected , the inverter operation is again paused before a new test is applied . alternatively , the drive is tripped permanently . the number of iterations before the test result is accepted as an earth - fault , may be set as desired . if an earth - fault is not detected , the normal operation can be continued providing the ride - through capability . the test vector in fig5 is sketched as being positioned prior to the normal pwm . alternatively , the test vector may be placed in the first pwm period after the re - enabling also , for example as a simple duty - cycle reduction similar to fig4 . this is purely a matter of implementation easiness . the important issue is to measure the earth current before an active vector is applied giving differential - mode currents in the dc - link , which may coast the drive again before the earth - fault test can be made . fig4 shows in a diagram form the duty - cycle curves for the high - side switches for each of the three phases u , v and w . the y - axis goes from − 1 to 1 . the actual duty cycles , which in a known manner is calculated as ton /( ton + toff ), may be obtained by the curves in fig4 by adding 1 and dividing by 2 . the x - axis is the time in seconds . the phase sequence in fig4 is phase u , v and w . at a time of approximately 0 . 185s , the test vector is applied by modifying phase w , which graphically is shown by a triangle in the bottom of the figure . 120 degrees later , the next test vector is applied by modifying phase u , shown by the bullet in the bottom of the figure . and again 120 degrees later a third test vector is applied by modifying phase v shown with the square . applying the test vector introduces an error in the planned switching period . this problem is evident during high voltage demand , and typically results in a lowered output voltage . to make space for the test vector , the planned duty cycle must be modified , i . e . increased . this is seen in fig4 , where the duty cycle of phase w is increased during application of the test vector at approx . 0 . 185s . the duty cycle is increased from for example 0 . 06 to 0 . 12 , but to compensate for this , the duty cycle is reduced 180 degrees later ( at approx . 0 . 195s ) from 0 . 94 to 0 . 88 . thus , the test vector is applied at times where the duty cycle is low , and correction is made when the duty cycle is high . preferably , the earth - fault test vector for current sensing including the correction is made with quarter - wave and half - wave symmetry giving minimum distortion in the 3 - phase pwm system . the method of applying a test vector and introducing a correction of the duty cycle as shown in fig4 can be executed without using the method described in fig5 . in fact , each of the methods of fig4 and 5 are independent , but can be combined giving the preferred protection quality . the method of fig4 is running always meaning that the earth - fault current is measured continuously at a rate which is maximum in the millisecond range regardless of a fault condition or not . the duty - cycle modification is applied if necessary at the same rate to obtain the test vector . the method of fig4 is necessary for earth - fault conditions where the amperage of the error current is relatively low , say 20 - 30 % of the nominal value . this is the case , if the earth - fault connection has a high impedance of e . g . 100 ohm between the motor phase and earth . preferably , the rate of applying the test vector in fig4 is lower than the rate of the switching frequency , typically 1 to 10 , i . e . 1 . 5 khz in relation to a switching frequency of 15 khz .