Generators are an important part of the power system, and their reliable operation is of great significance to ensure the stability of the power system. The data recorded by the generator fault recording device provides a reliable basis for the staff to correctly analyze the cause of the generator failure, study the accident countermeasures, and deal with the accident in time. At the same time, according to the fault recording data, the fault parameters of the system and the change law of each electrical quantity can be analyzed, and the fault location can be performed, which plays a very important role in ensuring the safe and reliable operation of the power system. As a computer dedicated to industrial control, the programmable logic controller (PLC) has been increasingly widely used in industrial control sites in machinery, chemical industry, rubber, electricity and other industries due to its simple structure, excellent performance, good anti-interference performance and high reliability. It has become the most important control device for real-time control in industrial control sites. This article introduces a method of realizing generator fault recording using a programmable controller and an extended analog module.
2. System composition and working principle
The block diagram of the system is shown in Figure 1. It consists of a host computer and a PLC measurement and control system. The PLC is connected to the generator set through an external transmitter and a transformer. The generator terminal voltage U and stator current I are three-phase AC power, which are converted into three-phase 100V, 5A secondary signals through a voltage transformer (PT) and a current transformer (CT) respectively. The generator rotor excitation current is converted into a 75mV signal through a shunt RS, and then converted into a proportional 0-10V voltage signal through a three-phase power (including active and reactive) transmitter, a three-phase voltage transmitter, and a DC current transmitter, and then input into the analog module of the PLC. The analog quantity is converted by A/D, and then the unit operation quantity such as the terminal voltage U, rotor current If, active power P and reactive power Q is calculated according to the conversion ratio of the transformer and the transmitter. The PLC samples every 20 milliseconds and saves the sampled data in the fault data area every 40 milliseconds. When a fault occurs, the PLC records the data for 13 seconds after the fault occurs, and the fault data recording process ends. When the PLC receives the transmission command sent by the host computer, the PLC transmits the recorded fault data to the host computer through serial communication. The host computer receives the data completely, and after data processing, it displays the waveform curves of the unit operation quantities U, If, P, Q, and Ug (voltage setting) 7 seconds before and 13 seconds after the fault, so that the generator fault can be analyzed. In this system, the PLC uses SIMATIC S7-226; the analog module uses the EM235 product that matches the S7-226; the PLC and the computer communicate in serial mode through a PC/PPI cable connection.
Figure 1 Block diagram of generator fault recording system
3. Lower computer program design
PLC is a lower computer, and its program is divided into three modules, namely initialization subroutine, wave recording subroutine and communication subroutine. The design ideas of each module will be explained below.
3.1 Initialization subroutine
The initialization subroutine includes initializing the free port communication parameters, setting the start and end conditions of the receive command RCV, assigning initial values to the data pointer, and connecting the 20ms sampling, receiving and sending interrupts.
3.2 Waveform recording subroutine
The recording subroutine is called in the 20ms sampling interruption and is responsible for recording the data of the unit's operating quantities U, If, P, Q, and Ug 7 seconds before and 13 seconds after the fault.
A continuous data area VW4000~VW8998 is defined in PLC to store fault data. Each running data occupies a 1000-byte data block, and the address allocation is as follows: U: VW4000~VW4998 If: VW5000~VW5998 P: VW6000~VW6998 Q: VW7000~VW7998 Ug: VW8000~VW8998.
The wave recording subroutine sends the sampled data to the respective data blocks every 40 milliseconds. A data pointer is defined for each data block, and its initial value points to the first address of each data block. Each time data is transmitted, each pointer moves down 2 bytes. The data of 7 seconds before the fault (350 bytes) is recorded cyclically, that is, if the data is full before the fault occurs, each data pointer will point to the first address of the data block again. The pointer index is defined to record the starting position of the 20-second fault data. When the fault occurs, the data pointer points to the data 13 seconds after the fault (the last 650 bytes). At this time, the pointer index divides the first 7 seconds of data into two parts, and the correct order is to swap the front and back parts. When the last 13 seconds of data are recorded, the wave recording subroutine ends. The program flow chart is shown in Figure 2.
3.3 Communication subroutine
The communication subroutine is responsible for communicating with the host computer and transmitting the fault data stored in the data area to the host computer in batches through the serial port. Each time the host computer sends a transmission command (represented by an integer 255), the PLC determines in the receiving interrupt program whether the received character is a transmission command. If so, the transmission command flag M6.0 is set and the communication subroutine is called in the main program.
Define the pointer tran_pointer to point to the first address of the data to be transmitted, and its initial value is &VW4000, which points to the first address of the data area. Define the variable count to record the number of transmissions. In the communication subroutine, first stop the free port reception, then transfer the data with the pointer tran_pointer as the first address and a size of 200 bytes to the transmission buffer, and then send it out through the serial port with the send command. Each time the data is sent, the pointer tran_pointer moves down 200 bytes, the variable count value increases by 1, and M6.0 is reset. When the host computer sends the 26th transmission command, the 5000 bytes of the data area VW4000~VW8998 in the PLC have been sent, and then the rated voltage, rated current, rated active power, rated reactive power and pointer index are sent out, the count value is cleared, the pointer tran_pointer is reinitialized, and M6.0 is reset. At this point, a complete fault data transmission process is completed.
Figure 2. Wave recording subroutine flow chart
4. Host computer program design
The host computer program design is based on Visual Basic 6.0 platform, using MS Comm controls to achieve serial communication between computer and PLC in an event-driven manner to complete data exchange. The host computer program includes user interface design, communication and data processing programs, display programs, etc.
4.1 User Interface Design
In this system, two forms (Form1 and Form2) are designed. Form1 is the main interface, and Form2 is the waveform display interface. In Form1, an MSComm control, a timer control (Timer1), and two button controls (Command1 and Command2) are designed. Command1 is the start button, which starts communicating with the PLC and reading the data when pressed. Command2 is the display button, which calls Form2 when pressed to display the waveform curve of each running quantity. A picture box control (Picture1) is designed in Form2 to display graphics.
4.2 Communication and data processing program design
Set the Interval property of Timer1 to 500, the InputMode property of MSComm to binary mode, and the RThreshold property to 5010. The timer sends a transmission command every 500 milliseconds. When it is sent for the 26th time, the timer is turned off. At this time, the receiving buffer will receive 5010 bytes of data and trigger the OnComm event of MSComm. In the OnComm event subroutine, the data in the receiving buffer is allocated to the global arrays U_data, If_data, P_data, Q_data, and Ug_data in turn, and then the percentage value is calculated based on the rated value of each operating quantity. The first 350 bytes of each array need to be adjusted according to the pointer Index. The specific method is to move the data in the array subscript range Index to 349 to the front and the data in the subscript range 1 to Index-1 to the back.
4.3 Display Programming
Write a graphics display program in the Form_Load event of the Form2 form. First, set a custom coordinate system in the picture box control Picture1. Set the ScaleMode property value to 3, that is, use pixels as the unit of measurement. Then draw the coordinate axis in this coordinate system. The X-axis is in seconds, and the time interval between two points on the curve is 40 milliseconds, which is equivalent to 1.47 pixels. The Y-axis is in percentages, and each unit scale is equivalent to 2.1 pixels. Finally, draw the waveform diagrams of the corresponding operating quantities according to the arrays U_data, If_data, P_data, Q_data and Ug_data. Taking the machine-end voltage waveform as an example, the written program is given as follows:
Picture1.DrawWidth = 1 'The line width is 1
Picture1.CurrentX = 0 'Specify the current coordinate position
Picture1.CurrentY = U_data(0) * 2.1
For i= 1 To 499 'Draw the curve
Picture1.Line - (1.47 * i, U_data (i) * 2.1), vbBlue
Next i
5. System operation and experimental results
Before the system is running, the communication parameters of the PLC must be set, including baud rate, check mode, number of data bits and number of stop bits, etc. This setting must be consistent with the host computer. When using the free port mode in S7-226 to communicate with the host computer through the serial port, it can be set through the special register SMB30 (port 0) or SMB130 (port 1). The following takes the generator no-load shutdown experiment as an example to illustrate the operation process of the system.
When the generator stops under normal no-load, the PLC detects the shutdown signal, sets the fault flag, and then records the data 13 seconds after the shutdown. Run the host computer program, press the "Transfer" button on the main interface, and the host computer starts to read the data in the PLC. After the program prompts "Data transfer completed", press the "Display" button, and the "Waveform Display" window will pop up as shown in Figure 3. As can be seen from the figure, the curve reflects the changes in the terminal voltage and excitation current before and after the generator stops.
Figure 3 Waveform display window
6. Conclusion
This system has been successfully applied to the excitation systems of medium and small synchronous generators. Through the dynamic simulation experiments and actual applications of the generators, it can be seen that the system has reliable performance, easy operation, and a user-friendly interface, and can better meet the needs of the power system for fault recording and fault analysis.
Generally speaking, it is easier to realize fault recording of generator operating parameters by using industrial embedded generator excitation regulators that use microcomputer control or microprocessor as the core. Using PLC as the hardware platform of the generator excitation regulator has the characteristics of low application cost, high operating reliability but high difficulty in program design. The fault recording of important generator operating parameters successfully embedded in it has great practical value, which is especially suitable for hydro-turbine generator sets in small and medium-sized hydropower stations that are currently being developed in large quantities. It is of great significance to ensure the safe, stable and reliable operation of the generator sets.
Previous article:Design of multi-layer lifting and lateral shifting parking garage control based on PLC
Next article:CNC high-speed corner protection machine based on Delta motion control PLC
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- CGD and Qorvo to jointly revolutionize motor control solutions
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Nidec Intelligent Motion is the first to launch an electric clutch ECU for two-wheeled vehicles
- Bosch and Tsinghua University renew cooperation agreement on artificial intelligence research to jointly promote the development of artificial intelligence in the industrial field
- GigaDevice unveils new MCU products, deeply unlocking industrial application scenarios with diversified products and solutions
- Advantech: Investing in Edge AI Innovation to Drive an Intelligent Future
- CGD and QORVO will revolutionize motor control solutions
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- EEWORLD University ---- HVI Series: Demystifying Active Clamp Flyback Compensation
- Several issues worth noting in DSP development
- Unpacking a Uni-T UTI260B
- How to perform non-destructive testing on chip circuit boards
- Please help me find out what type of SOT23 device with silk screen "UB17" and "WB14" is
- I would like to ask if there is any interference noise when measuring the ground line with an oscilloscope
- The microcontroller sends a string to the host
- VirtualBox-5.2.12 Environment Guide
- Working principle and function of encoder
- Help