Relay protection transient dual-rate sampling measurement method

By employing a dual-rate sampling method in the power system, combined with linear interpolation and filtering, the storage and computation challenges posed by high sampling frequencies are resolved. This enables accurate transient signal measurement and parameter calculation, reducing costs and improving testing efficiency.

CN122487802APending Publication Date: 2026-07-31CHUZHOU POWER SUPPLY CO OF STATE GRID ANHUI ELECTRIC POWER CORP
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHUZHOU POWER SUPPLY CO OF STATE GRID ANHUI ELECTRIC POWER CORP
Filing Date
2026-06-11
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

During transient processes, the high sampling frequency of existing power system relay protection devices leads to massive data storage and processing requirements, increasing system costs and design complexity. At the same time, the high sampling rate throughout the process cannot accurately reproduce the rapid change curve at the beginning of the transient process, resulting in inaccurate calculations of response time and response rate.

Method used

A relay protection transient dual-rate sampling method is adopted, with a preset threshold triggering the sampling rate switching. During the transient initial stage, the signal response curve is collected at a high sampling frequency, and during the overshoot stage, the sampling frequency is switched to a low sampling frequency to collect the steady-state signal. The data is processed by combining linear interpolation and a finite-length unit impulse response filter to calculate the transient performance parameters.

Benefits of technology

It achieves accurate capture of overshoot and steady-state signals while reducing storage and processing costs, improving test efficiency and parameter calculation accuracy. It is suitable for portable test devices and reduces hardware costs and design complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122487802A_ABST
    Figure CN122487802A_ABST
Patent Text Reader

Abstract

This invention provides a transient dual-rate sampling measurement method for relay protection, belonging to the field of power system relay protection testing. The method includes: S1: Presetting a threshold for triggering sampling rate switching and initiating real-time acquisition of transient voltage and / or current signals output by the relay protection device; S2: At the beginning stage of the transient process, high-speed sampling of the transient signal is performed at a first sampling frequency to fully capture the signal response curve of the transient process; S3: After detecting that the amplitude of the transient signal exceeds the preset threshold and determining that it has entered the overshoot stage, the sampling frequency is automatically switched to a second sampling frequency for low-speed sampling to acquire the steady-state signal amplitude for one or more cycles after the fault; wherein, the second sampling frequency is lower than the first sampling frequency; S4: Calculating the transient performance parameters of the relay protection device using the data acquired in S2 and S3. This method balances accuracy and resources, accurately captures overshoot, improves testing efficiency, and reduces costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power system relay protection testing technology, specifically to a transient dual-rate sampling measurement method for relay protection. Background Technology

[0002] During transient processes in a power system (such as short-circuit faults), voltage and current signals change drastically. Accurately capturing and measuring these transient signals is crucial for evaluating the dynamic performance of relay protection devices.

[0003] Existing testing methods often employ a single high sampling frequency to acquire transient signals to ensure signal fidelity. However, transient signals have high frequencies, requiring extremely high sampling rates to satisfy the sampling theorem, resulting in the generation of massive amounts of data in a very short time. This poses a significant challenge to the data storage, transmission, and processing capabilities of the testing system, often necessitating the expansion of expensive memory or the adoption of complex data compression algorithms, increasing system cost and design complexity.

[0004] Furthermore, overshoot is a common phenomenon during the rise or fall of transient signals. While using a uniformly high sampling rate throughout can record overshoot details, it consumes a significant amount of storage resources to store non-critical post-steady-state data. Conversely, using a lower sampling rate throughout fails to accurately reconstruct the rapid change curve at the beginning of the transient phase, leading to inaccurate calculations of key parameters such as response time and response rate. Summary of the Invention

[0005] The purpose of this invention is to provide a transient dual-rate sampling measurement method for relay protection. This method balances accuracy and resources, can accurately capture overshoot, and improves testing efficiency while reducing costs.

[0006] To achieve the above objectives, embodiments of the present invention provide a transient dual-rate sampling measurement method for relay protection, the method comprising: S1: Presets a threshold for triggering sampling rate switching and initiates real-time acquisition of transient voltage and / or current signals output by the relay protection device. S2: At the beginning of the transient process, the transient signal is sampled at high speed at the first sampling frequency to fully capture the signal response curve of the transient process; S3: After detecting that the amplitude of the transient signal exceeds the preset threshold and determining that it has entered the overshoot stage, the sampling frequency is automatically switched to the second sampling frequency for low-speed sampling to collect the steady-state signal amplitude for one or more cycles after the fault; wherein, the second sampling frequency is lower than the first sampling frequency. S4: Calculate the transient performance parameters of the relay protection device using the data collected in S2 and S3.

[0007] Preferably, the first sampling frequency in S2 is not less than 1MHz, which is used to ensure that sufficient data points can be collected within the response time window during the transient process of increasing signal frequency, so as to accurately plot the response process curve.

[0008] Preferably, the second sampling frequency in S3 is 500kHz, which is used to reasonably arrange the amount of data to be collected by reducing the sampling rate after the signal overshoot stage, and to accurately collect the true amplitude of the signal, thereby avoiding the influence of overshoot on amplitude calculation.

[0009] Preferably, the transient performance parameters calculated in S4 include response time and response rate; wherein, The response time is determined by calculating the time it takes for the response curve to reach the steady-state value for the first time from time zero, or by calculating the time required for the response curve to rise from 10% to 90% of the amplitude value. The response rate is calculated based on the magnitude of the signal change per unit time and is inversely proportional to the response time.

[0010] Preferably, when calculating the response time, linear interpolation is used to process the data points obtained by high-speed sampling in order to accurately estimate the time corresponding to the zero-crossing point or the target amplitude point on the response curve.

[0011] Preferably, the method further includes: processing the initial phase data of the AC signal in the acquired transient signal using a sine interpolation method to improve the sampling rate and reduce the sampling interval, thereby finding the zero-crossing value of the signal more accurately.

[0012] Preferably, the method further includes: performing digital filtering on the acquired transient signal data using a finite-length unit impulse response filter to ensure the accuracy of the amplitude and phase of the sampled signal.

[0013] Preferably, the method is applied to a test system, which includes a dynamic fault simulation system, a relay protection tester, and an intelligent simulated circuit breaker. The method further includes: during the test, the dynamic fault simulation system generates data in real time and sends it to the relay protection tester; the relay protection tester feeds back the test results to the dynamic fault simulation system in real time, forming a closed-loop interaction; the intelligent simulated circuit breaker receives the action commands from the simulation system and responds.

[0014] Preferably, the method is executed using a portable testing device, which includes a data acquisition module, a data processing and control module, and a host computer module; wherein, The data acquisition module includes a filtering and conditioning circuit and a high-speed data module for performing dual-rate sampling of S2 and S3; The data processing and control module includes a DSP and an FPGA, which are used to control the switching of the sampling rate and perform data processing and calculations. The host computer module is used to realize system control, analysis, calculation and storage of test data, and simulation of transient voltage and current signals; Furthermore, the total weight of the testing device should not exceed 10kg.

[0015] Preferably, the method is stored in a computer-readable storage medium in the form of a computer program, and when the computer program is executed by a processor, S1 to S4 are implemented.

[0016] According to the above technical solution, by employing high-speed sampling during the high-frequency transient phase to ensure the accuracy of response curve plotting, and low-speed sampling during the steady-state phase to reduce data volume, the contradiction between high precision and low storage requirements is perfectly resolved. Simultaneously, this variable-speed sampling strategy enables the system to capture both overshoot peaks and accurately measure the final steady-state amplitude of the signal at an appropriate rate after overshoot, improving the accuracy of parameter calculation. Furthermore, the reasonable data arrangement allows subsequent data processing algorithms such as FFT and FIR filtering to run more efficiently. In addition, this method achieves high-performance transient signal acquisition without requiring a large-capacity memory, reducing the hardware cost and design complexity of the testing device and facilitating its portability.

[0017] Other features and advantages of the embodiments of the present invention will be described in detail in the following detailed description section. Attached Figure Description

[0018] The accompanying drawings are provided to further illustrate embodiments of the present invention and form part of the specification. They are used together with the following detailed description to explain the embodiments of the present invention, but do not constitute a limitation thereof. In the drawings: Figure 1 This is a schematic flowchart of the relay protection transient dual-rate sampling measurement method provided by the present invention. Detailed Implementation

[0019] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the scope of the present invention.

[0020] It should be noted that the acquisition, transmission, storage, use, and processing of data in the technical solution of this application all comply with relevant laws and regulations. In the embodiments of this application, certain existing industry solutions such as software, components, and models may be mentioned. These should be considered exemplary, intended only to illustrate the feasibility of implementing the technical solution of this application, and do not imply that the applicant has already used or necessarily used such solutions.

[0021] See Figure 1This invention provides a transient dual-rate sampling measurement method for relay protection, the method comprising: S1: Presets a threshold for triggering sampling rate switching and initiates real-time acquisition of transient voltage and / or current signals output by the relay protection device. S2: At the beginning stage of the transient process, the transient signal is sampled at a high speed at a first sampling frequency to fully capture the signal response curve of the transient process; S3: After detecting that the amplitude of the transient signal exceeds the preset threshold and determining that it has entered the overshoot stage, the sampling frequency is automatically switched to the second sampling frequency for low-speed sampling to collect the steady-state signal amplitude for one or more cycles after the fault; wherein, the second sampling frequency is lower than the first sampling frequency; S4: Calculate the transient performance parameters of the relay protection device using the data collected in S2 and S3.

[0022] The above technical solution perfectly resolves the contradiction between high precision and low storage requirements by employing high-speed sampling during the high-frequency transient phase to ensure the accuracy of response curve plotting and low-speed sampling during the steady-state phase to reduce data volume. Simultaneously, this variable-speed sampling strategy enables the system to capture overshoot peaks and accurately measure the final steady-state amplitude of the signal at an appropriate rate after overshoot, improving the accuracy of parameter calculations. Furthermore, the reasonable data arrangement allows subsequent data processing algorithms such as FFT and FIR filtering to run more efficiently. In addition, this method achieves high-performance transient signal acquisition without requiring a large-capacity memory, reducing the hardware cost and design complexity of the testing device and facilitating its portability.

[0023] In power system transient processes (such as short-circuit faults and lightning strikes), voltage / current signals contain abundant high-frequency components, with frequencies reaching hundreds of kHz or even higher. According to the Nyquist sampling theorem, the sampling frequency should be at least twice the highest frequency component of the signal to recover the original signal without distortion. If the sampling frequency is lower than 1MHz, spectral aliasing will occur after sampling for high-frequency components with frequencies close to 500kHz, leading to waveform distortion, amplitude attenuation, and phase distortion. Consequently, the subsequently calculated parameters such as response time and response rate will deviate significantly from the true values. Therefore, in this embodiment, the first sampling frequency in S2 is preferably not lower than 1MHz to ensure that sufficient data points can be collected within the response time window during transient processes where the signal frequency increases, so as to accurately plot the response process curve. In this way, a sampling rate of ≥1MHz can effectively cover the main high-frequency components of common transient signals, ensuring that the collected data can accurately reconstruct the transient waveform and provide a true and reliable input for the dynamic performance evaluation of relay protection devices. Meanwhile, a sampling frequency of ≥1MHz ensures that sufficient data points are collected within the transient response window, enabling the achievement of performance targets such as ≤10μs of asynchronous time and ≤1ms of action time measurement error when using post-processing methods such as linear interpolation and waveform fitting.

[0024] In transient processes (such as short-circuit faults), signals often overshoot after a rapid rise or fall—the amplitude momentarily exceeds the final steady-state value before falling back to normal levels. If high-speed sampling (e.g., 1MHz) is maintained throughout the process, the system will record the overshoot peak value. However, without rate switching, subsequent data processing algorithms may be unable to distinguish between "transient overshoot" and "true steady-state," leading to an overestimation of the amplitude. In this embodiment, the second sampling frequency in S3 is preferably 500kHz. This is used to reasonably arrange the amount of data collected after the signal overshoot stage by reducing the sampling rate, and to accurately collect the true amplitude of the signal, thereby avoiding the influence of overshoot on amplitude calculation. In this way, the peak data during the overshoot stage (recorded by high-speed sampling) and the steady-state data after the overshoot (recorded by low-speed sampling) are clearly separated in time, avoiding the contamination of statistical algorithms such as average value and RMS value by overshoot values ​​within the same dataset, and ensuring the authenticity and reliability of the test results of the relay protection device's operating characteristics (such as operating threshold).

[0025] In this embodiment, preferably, the transient performance parameters calculated in S4 include response time and response rate. The response time is determined by calculating the time it takes for the response curve to first reach its steady-state value from time zero, or by calculating the time required for the response curve to rise from 10% to 90% of its amplitude. The response rate is calculated based on the amplitude of signal change per unit time and is inversely proportional to the response time. Thus, this invention provides two definitions of response time, enhancing the method's versatility and anti-interference capabilities. Definition 1 (from time zero to first steady-state value) is suitable for step response scenarios and is intuitive to calculate; Definition 2 (10%~90% rise time) is an international standard, avoiding measurement errors caused by overshoot, noise, and differences in steady-state threshold settings, ensuring repeatable results. Simultaneously, the introduction of a response rate inversely proportional to the response time quantifies the steepness of signal changes, forming a complementary evaluation dimension with the response time. Combined with the high-density data obtained from dual-rate sampling, accurate calculation of both types of parameters is ensured, comprehensively characterizing the transient response speed and sensitivity of the relay protection device.

[0026] Furthermore, preferably, when calculating the response time, linear interpolation is used to process the data points obtained from high-speed sampling to accurately estimate the time corresponding to the zero-crossing point or target amplitude point on the response curve. Using linear interpolation can compensate for the time quantization error caused by discrete sampling, significantly improving the measurement accuracy of the response time. Although high-speed sampling (e.g., 1MHz) can obtain dense data points, critical moments on the response curve (e.g., 10%, 90% amplitude points or zero-crossing points) often fall between two sampling points. Linear interpolation, by back-calculating the precise time through the amplitude ratio of adjacent points, can improve the time resolution from 1μs (sampling interval) to nanosecond-level estimation accuracy, ensuring that the response time measurement error meets the requirement of ≤1ms. This method has low computational complexity, is easy to implement in embedded real-time systems, requires no iteration or complex calculations, and achieves the best balance between accuracy and efficiency.

[0027] Furthermore, in this embodiment, the preferred method further includes processing the initial phase data of the AC signal in the acquired transient signal using a sine interpolation method to increase the sampling rate and reduce the sampling interval, thereby more accurately finding the zero-crossing point value of the signal. Sine interpolation is used to achieve higher precision zero-crossing point detection based on the periodic characteristics of the AC signal. While linear interpolation is simple, it suffers from fitting errors for sinusoidal waveforms; sine interpolation, based on the periodic model of the signal, can more accurately restore the true shape of the sine curve between sampling points, thus improving the zero-crossing point positioning accuracy to the sub-microsecond level. This is crucial for the accurate measurement of parameters such as the initial phase and closing angle, as zero-crossing point deviation directly leads to errors in the closing angle calculation. Simultaneously, the increased equivalent sampling rate can compensate for insufficient hardware sampling intervals, meeting the requirement of ≤10μs asynchronous time without upgrading the AD device, thus balancing cost and accuracy.

[0028] In this embodiment, the preferred method further includes: digitally filtering the acquired transient signal data using a finite-length unit impulse response (FIR) filter to ensure the accuracy of the sampled signal amplitude and phase. Using an FIR filter can precisely maintain the amplitude-frequency and phase-frequency characteristics of the signal while filtering out high-frequency noise. The FIR filter has a strictly linear phase response; the phase delay of each frequency component after signal transmission is proportional to the frequency, and it does not produce nonlinear phase distortion, thus ensuring that the waveform shape, zero-crossing position, and phase relationship of the transient signal remain unchanged. This is crucial for accuracy-sensitive parameters such as closing angle and initial phase in relay protection testing. Compared to IIR filters, FIR filters have no feedback structure, no stability issues, and small cumulative errors. They can achieve high-fidelity filtering with a finite-precision algorithm, ensuring that the measurement of the sampled signal amplitude and phase meets the requirement of a synchronization time ≤10μs.

[0029] Secondly, the present invention applies the method to a testing system, which includes a dynamic fault simulation system, a relay protection tester, and an intelligent simulated circuit breaker; the method further includes: during the test, the dynamic fault simulation system generates data in real time and sends it to the relay protection tester, the relay protection tester feeds back the test results to the dynamic fault simulation system in real time, forming a closed-loop interaction; the intelligent simulated circuit breaker receives the action commands from the simulation system and responds.

[0030] Thirdly, the present invention preferably employs a portable testing device to execute the method, the testing device comprising a data acquisition module, a data processing and control module, and a host computer module; wherein... The data acquisition module includes a filtering and conditioning circuit and a high-speed data module for performing dual-rate sampling of S2 and S3; The data processing and control module includes a DSP and an FPGA, which are used to control the switching of the sampling rate and perform data processing and calculations. The host computer module is used to realize system control, analysis, calculation and storage of test data, and simulation of transient voltage and current signals; Furthermore, the total weight of the testing device should not exceed 10kg.

[0031] Fourthly, the present invention preferably stores the method in the form of a computer program in a computer-readable storage medium, and when the computer program is executed by a processor, it implements S1 to S4.

[0032] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0033] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0034] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0035] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0036] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0037] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0038] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0039] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0040] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A transient dual-rate sampling measurement method for relay protection, characterized in that, The method includes: S1: Presets a threshold for triggering sampling rate switching and initiates real-time acquisition of transient voltage and / or current signals output by the relay protection device. S2: At the beginning of the transient process, the transient signal is sampled at high speed at the first sampling frequency to fully capture the signal response curve of the transient process; S3: After detecting that the amplitude of the transient signal exceeds the preset threshold and determining that it has entered the overshoot stage, the sampling frequency is automatically switched to the second sampling frequency for low-speed sampling to collect the steady-state signal amplitude for one or more cycles after the fault; wherein, the second sampling frequency is lower than the first sampling frequency; S4: Calculate the transient performance parameters of the relay protection device using the data collected in S2 and S3.

2. The relay protection transient dual-rate sampling measurement method according to claim 1, characterized in that, The first sampling frequency in S2 is not less than 1MHz, which is used to ensure that sufficient data points can be collected within the response time window during the transient process of increasing signal frequency, so as to accurately plot the response process curve.

3. The relay protection transient dual-rate sampling measurement method according to claim 1, characterized in that, The second sampling frequency in S3 is 500kHz, which is used to reasonably arrange the amount of data to be collected by reducing the sampling rate after the signal overshoot stage, and to accurately collect the true amplitude of the signal, thereby avoiding the influence of overshoot on amplitude calculation.

4. The relay protection transient dual-rate sampling measurement method according to claim 1, characterized in that, The transient performance parameters calculated in S4 include response time and response rate; wherein, The response time is determined by calculating the time it takes for the response curve to reach the steady-state value for the first time from time zero, or by calculating the time required for the response curve to rise from 10% to 90% of the amplitude value. The response rate is calculated based on the amplitude of signal change per unit time and is inversely proportional to the response time.

5. The relay protection transient dual-rate sampling measurement method according to claim 4, characterized in that, When calculating the response time, linear interpolation is used to process the data points obtained by high-speed sampling in order to accurately estimate the time corresponding to the zero-crossing point or the target amplitude point on the response curve.

6. The relay protection transient dual-rate sampling measurement method according to claim 1, characterized in that, The method further includes: processing the initial phase data of the AC signal in the acquired transient signal using a sinusoidal interpolation method to improve the sampling rate and reduce the sampling interval, thereby finding the zero-crossing value of the signal more accurately.

7. The relay protection transient dual-rate sampling measurement method according to claim 1, characterized in that, The method further includes: performing digital filtering on the acquired transient signal data using a finite-length unit impulse response filter to ensure the accuracy of the amplitude and phase of the sampled signal.

8. The relay protection transient dual-rate sampling measurement method according to claim 1, characterized in that, The method is applied to a testing system, which includes a dynamic fault simulation system, a relay protection tester, and an intelligent simulated circuit breaker. The method further includes: during the test, the dynamic fault simulation system generates data in real time and sends it to the relay protection tester; the relay protection tester feeds back the test results to the dynamic fault simulation system in real time, forming a closed-loop interaction; the intelligent simulated circuit breaker receives action commands from the simulation system and responds.

9. The relay protection transient dual-rate sampling measurement method according to claim 1, characterized in that, The method is executed using a portable testing device, which includes a data acquisition module, a data processing and control module, and a host computer module; wherein... The data acquisition module includes a filtering and conditioning circuit and a high-speed data module, used to perform dual-rate sampling in S2 and S3; The data processing and control module includes a DSP and an FPGA, used to control the switching of the sampling rate and perform data processing and calculation; The host computer module is used to realize the functions of system control, analysis, calculation and storage of test data, and simulation of transient voltage and current signals; Furthermore, the total weight of the testing device is no more than 10 kg.

10. The relay protection transient dual-rate sampling measurement method according to claim 1, characterized in that, The method is stored in a computer-readable storage medium in the form of a computer program, and when the computer program is executed by a processor, it implements S1 to S4.