ECE6374_A_Midterm_September_28_2023_solution

docx

School

Georgia Institute Of Technology *

*We aren’t endorsed by this school

Course

6374

Subject

Electrical Engineering

Date

Dec 6, 2023

Type

docx

Pages

15

Report

Uploaded by ovrovg

Georgia Institute of Technology School of Electrical and Computer Engineering ECE6374A Cyber-Physical Security in Electric Energy Systems Fall 2023 Open Book and Notes Exam 4 problems Problem P1: 10 points Problem P2: 10 points Problem P3: 10 points Problem P4: 10 points Exam Test Date: September 28, 2023, 12:30-1:45 pm Show your work (for partial credit) Name: _________TA_________ Grade: __________40________ 1
Problem P1 (10 Points) : Fermat’s Little Theorem states: 1 mod 1 p g p Where p is a prime number and g is an interget number: 1 g p A corollary of Fermat’s Little Theorem is: mod mod mod y p y x p x p Question 1 Using Fermat's Little Theorem or its corollary, compute the following: 6080 1029 mod 2027 ? 2 2026 2026 2026 2 2026 2026 2026 2 1029 1029 1029 1029 mod 2027 1029 mod 2027 1029 1029 1029 mod 2027 1029 mod 2027 747 You can do it by a calculator since the numbers are manageable Question 2 Using Fermat's Little Theorem or its corollary, compute the following: 1000000 138 mod 999983 ? 18 999982 18 138 138 mod 999983 138 mod 999983 799561 Question 3 Compute the totient of n=514 514 ? 2
514 2 257 2 1 1 257 1 256 514 1 256 256 q p       Question 4 Consider a prime number n. Given an integer number x, such that 1 1 x n Prove that the number “ 2 mod n x n ” is the modular inverse of the number x modulo n. Show your work. We know that if n is prime, then ( ) 1 n n This implies that 1 1 2 1 ( ) mod mod mod 1 n n n x n x x n x x n Thus, 2 mod n x n is the modular inverse of mod x n 3
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Problem 2 (10 points) : A GPS spoofer would like to insert a 350 microsecond delay in the GPS signals for all satellites visible in the area. Assume the position of three visible satellites are (all in meters): Satellite 1: (-19215434, 2755000, 18595445) Satellite 2: (13638546, -1942805, 20102000) Satellite 3: (12472028, 10557235, 19483099) The receiver position is: Receiver: (1813, 4,135, 6350) The spoofer position is: Spoofer: (1460, 3850, 5926) For simplicity assume that satellites, GPS receiver and spoofer are stationary. Also assume signals propagate with speed of light in free space. Also assume that the spoofer can capture the signal, delay it for a specific time and then retransmit at high power towards the receiver, i.e. the spoofer can insert a specific delay in the signal. The time delay will be different for each satellite signal. What will be the delay for each one of the satellite signals so that the receiver receives the three satellite signal with an exact 350 microsecond delay relative to the delay of direct transmission between the satellite and receiver? Assume that the spoofer has all the locational information (satellite info from the GPS almanac and the receiver and his location from measurements). Satellite 1 signal delay: ___ 347.6951____microseconds Satellite 2 signal delay: ___ 346.1790____microseconds Satellite 3 signal delay: ____ 345.8728____microseconds 4
clc; clear all ; close all ; S1 = [-19215434, 2755000, 18595445]; S2 = [13638546, -1942805, 20102000]; S3 = [12472028, 10557235, 19483099]; c = 299792458; tau = 350e-6; Rec = [1813, 4135, 6350]; Spo = [1460, 3850, 5926]; d1 = sqrt((S1(1)-Spo(1))^2 +(S1(2)-Spo(2))^2 + (S1(3)-Spo(3))^2); d2 = sqrt((S2(1)-Spo(1))^2 +(S2(2)-Spo(2))^2 + (S2(3)-Spo(3))^2); d3 = sqrt((S3(1)-Spo(1))^2 +(S3(2)-Spo(2))^2 + (S3(3)-Spo(3))^2); r1 = sqrt((S1(1)-Rec(1))^2 +(S1(2)-Rec(2))^2 + (S1(3)-Rec(3))^2); r2 = sqrt((S2(1)-Rec(1))^2 +(S2(2)-Rec(2))^2 + (S2(3)-Rec(3))^2); r3 = sqrt((S3(1)-Rec(1))^2 +(S3(2)-Rec(2))^2 + (S3(3)-Rec(3))^2); s = sqrt((Spo(1)-Rec(1))^2 +(Spo(2)-Rec(2))^2 + (Spo(3)-Rec(3))^2); t1 = (tau + (r1-d1-s)/c)*1e6 %in us t2 = (tau + (r2-d2-s)/c)*1e6 %in us t3 = (tau + (r3-d3-s)/c)*1e6 % in us 5
Problem P3 (10 points) : Assume that Jennifer and George created the following RSA cryptosystem to encrypt each entry of the ASCII characters: Jennifer: Public key: (31,19783) Private key: (secret, d=6271) George: Public key: (e,n) Private key: (secret) George sends the following encrypted message to Jennifer (in integer numbers): 19402, 13666, 9848, 77, 6320, 13666, 17981, 17981 (note this message cannot be represented with ASCII characters) What is the plaintext of George’s message (in alphanumeric – ASCII Printable Characters)? 6
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
mod mod e d C M n M C n 31, 19783, 6271 e n d 6271 6271 6271 3 6271 4 6271 5 6271 6 6271 7 6 8 1 2 19402 mod19783 71 ' ' 13666 mod19783 101 ' ' 9848 mod19783 116 ' ' 77 mod19783 32 ' ' 6320 mod19783 87 ' ' 13666 mod19783 87 ' ' 17981 mod19783 108 ' ' 17981 M G e M t M space M W M e M l M M 271 mod19783 108 ' ' l Get Well 7
Problem P4 (10 points) : Line differential protection is quite common protection function. There are several line differential schemes. We will use the differential scheme that forms the sum of the currents at the two ends of the line, i.e. the relay operating current, and acts on this current. This type of line differential is typically referred to as line percentage differential and it is illustrated in Figures P4.1 and P4.2. The settings for this relay are as follows. The relay will trip when (a) the operating current is more than 40 Amperes (rms, primary), AND (b) the operating current is more than 20% of the restraining current (rms values). Note: for simplicity we work with primary currents instead of the actual secondary values in the actual relays. For the stated settings of the relay, the relay will trip the line if for at least one phase of the line the following two conditions hold: 0 1 2 0 0, 0 1 2 1, . . 40 0.2 1 2 R R set R R I k I I assume k i e work with primary values I i A I I I 0, set i is the operating current setting (primary current), and 1 and 2 indicate the two ends of the line. The indicated line currents flow into the line. Figure P4.1 8
Figure P4.2 Assume that the GPS receiver/clock in one terminal of the line has been spoofed and the intruder successfully inserts a timing error of 8,333 microseconds continuously as shown in Figure P4.1. Assume also that the system operates under quasi-steady-state conditions, i.e. all the quantities vary sinusoidally. A fault occurs somewhere in the system and affects the currents in the transmission line. The operating point of the transmission line is given in Figure P4.3. Determine the response of the relay: (a) assuming that the GPS receiver has not been spoofed, (b) assuming that the GPS receiver has been spoofed as described above, i.e. it introduces an artificial 8,333 microseconds delay. Figure P4.3 9
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
a) Clearly, there is a fault in the middle of the line. Thus, we expect a normal relay to trip. Looking at the data, we see all phases have similar values. Thus, we expect all phases to have similar values for relay response. The code below check all phases for both conditions: 0 1 2 0 0, 0 1 2 1, . . 40 0.2 1 2 R R set R R I k I I assume k i e work with primary values I i A I I I clc; clear all ; close all ; format long I_Bus20_A_phasor = 9.262e3 * exp(j*deg2rad(-85)); I_Bus10_A_phasor = 8.958e3 * exp(j*deg2rad(- 85.08)); I_Bus20_B_phasor = 8.262e3 * exp(j*deg2rad(149.20)); I_Bus10_B_phasor = 7.987e3 * exp(j*deg2rad(149.06)); I_Bus20_C_phasor = 8.087e3 * exp(j*deg2rad(40.32)); I_Bus10_C_phasor = 7.828e3 * exp(j*deg2rad(40.22)); Io_A_phasor = I_Bus20_A_phasor + I_Bus10_A_phasor; Io_B_phasor = I_Bus20_B_phasor + I_Bus10_B_phasor; Io_C_phasor = I_Bus20_C_phasor + I_Bus10_C_phasor; % Values COND1_A = abs(Io_A_phasor) COND2_A = abs(Io_A_phasor)/ (0.5*(abs(I_Bus10_A_phasor)+ abs(I_Bus20_A_phasor))) % Condition 10
if (abs(Io_A_phasor)>40 & abs(Io_A_phasor)/ (0.5*(abs(I_Bus10_A_phasor)+ abs(I_Bus20_A_phasor)))>0.2) display( 'Trip at Phase A (Unspoofed)' ) else display( 'No Trip at Phase A (Unspoofed)' ) end COND1_B = abs(Io_B_phasor) COND2_B = abs(Io_B_phasor)/ (0.5*(abs(I_Bus10_B_phasor)+ abs(I_Bus20_B_phasor))) % Condition if (abs(Io_B_phasor)>40 & abs(Io_B_phasor)/ (0.5*(abs(I_Bus10_B_phasor)+ abs(I_Bus20_B_phasor)))>0.2) display( 'Trip at Phase B (Unspoofed)' ) else display( 'No Trip at Phase B (Unspoofed)' ) end COND1_C = abs(Io_C_phasor) COND2_C = abs(Io_C_phasor)/ (0.5*(abs(I_Bus10_C_phasor)+ abs(I_Bus20_C_phasor))) % Condition if (abs(Io_C_phasor)>40 & abs(Io_C_phasor)/ (0.5*(abs(I_Bus10_C_phasor)+ abs(I_Bus20_C_phasor)))>0.2) display( 'Trip at Phase C (Unspoofed)' ) else display( 'No Trip at Phase C (Unspoofed)' ) end Answer: COND1_A = 11
1.821999556113275e+04 COND2_A = 1.999999512747832 Trip at Phase A (Unspoofed) COND1_B = 1.624898787664024e+04 COND2_B = 1.999998507802355 Trip at Phase B (Unspoofed) COND1_C = 1.591499394162253e+04 COND2_C = 1.999999238658187 Trip at Phase C (Unspoofed) b) We apply the same strategy, except that we subtract or add a spoof delay of 8333 us. We can insert the spoof delay in either one of the buses. If you insert the spoof delay at both buses, you will get wrong answer since they will cancel out. Code: clc; clear all ; close all ; format long spoof_delay = 8333e-6; spoof_angle = spoof_delay * 60 * 360; % in degrees I_Bus20_A_phasor = 9.262e3 * exp(j*deg2rad(-85)); 12
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
I_Bus10_A_phasor = 8.958e3 * exp(j*deg2rad(-85.08 - spoof_angle)); I_Bus20_B_phasor = 8.262e3 * exp(j*deg2rad(149.20)); I_Bus10_B_phasor = 7.987e3 * exp(j*deg2rad(149.06 - spoof_angle)); I_Bus20_C_phasor = 8.087e3 * exp(j*deg2rad(40.32)); I_Bus10_C_phasor = 7.828e3 * exp(j*deg2rad(40.22 - spoof_angle)); Io_A_phasor = I_Bus20_A_phasor + I_Bus10_A_phasor; Io_B_phasor = I_Bus20_B_phasor + I_Bus10_B_phasor; Io_C_phasor = I_Bus20_C_phasor + I_Bus10_C_phasor; % Values COND1_A = abs(Io_A_phasor) COND2_A = abs(Io_A_phasor)/ (0.5*(abs(I_Bus10_A_phasor)+ abs(I_Bus20_A_phasor))) % Condition if (abs(Io_A_phasor)>40 & abs(Io_A_phasor)/ (0.5*(abs(I_Bus10_A_phasor)+ abs(I_Bus20_A_phasor)))>0.2) display( 'Trip at Phase A (Spoofed)' ) else display( 'No Trip at Phase A (Spoofed)' ) end COND1_B = abs(Io_B_phasor) COND2_B = abs(Io_B_phasor)/ (0.5*(abs(I_Bus10_B_phasor)+ abs(I_Bus20_B_phasor))) % Condition 13
if (abs(Io_B_phasor)>40 & abs(Io_B_phasor)/ (0.5*(abs(I_Bus10_B_phasor)+ abs(I_Bus20_B_phasor)))>0.2) display( 'Trip at Phase B (Spoofed)' ) else display( 'No Trip at Phase B (Spoofed)' ) end COND1_C = abs(Io_C_phasor) COND2_C = abs(Io_C_phasor)/ (0.5*(abs(I_Bus10_C_phasor)+ abs(I_Bus20_C_phasor))) % Condition if (abs(Io_C_phasor)>40 & abs(Io_C_phasor)/ (0.5*(abs(I_Bus10_C_phasor)+ abs(I_Bus20_C_phasor)))>0.2) display( 'Trip at Phase C (Spoofed)' ) else display( 'No Trip at Phase C (Spoofed)' ) end Answers: COND1_A = 3.042202279369919e+02 COND2_A = 0.033394097468386 No Trip at Phase A (Spoofed) COND1_B = 2.756437968016288e+02 14
COND2_B = 0.033927478220399 No Trip at Phase B (Spoofed) COND1_C = 2.593203985573208e+02 COND2_C = 0.032588174496679 No Trip at Phase C (Spoofed) 15
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help