A PLC control device and a PLC control method
By using intermediate relays and diodes in the PLC control device to isolate the poor signals, and combining adaptive parameter adjustment control system to optimize filters, the problem of PLC digital input module being affected by the environment is solved, and signal stability and system reliability are achieved. Improvement has improved the efficiency and energy efficiency of waste heat recovery equipment.
Patent Information
- Application Number
- CN202410888660.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-04
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2044-07-04
AI Technical Summary
Under the influence of the on-site environment and power quality, the unstable voltage and current signals of the PLC digital input module DI lead to burning, misjudgment and circuit damage, affecting the operating efficiency and energy consumption of the waste heat recovery equipment.
The PLC control device is used to isolate the poor signals through the intermediate relay and the diode, and optimize the filter with the adaptive parameter adjustment control system to achieve adaptive denoising and anti-interference.
Effectively protect the PLC digital input module DI, prevent burning and misjudgment, improve signal stability and system reliability, improve the operating efficiency of waste heat recovery equipment and reduce energy consumption.
Smart Images

Figure CN118502349B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electronic communications, and in particular to a PLC control device and a PLC control method. Background Art
[0002] At present, the electrical control mode of waste heat recovery in the third workshop is controlled by Siemens programmable controller (hereinafter referred to as PLC). PLC adopts Siemens' new generation ET200SP field distributed I / O system. The system consists of a Siemens CPU module (CPU1510SP-1NP) and several input and output modules (hereinafter referred to as I / O modules), a base unit and a server module. The I / O module is inserted into the base and connected to the CPU module through the base. The system structure is designed to be modular. The I / O module can be inserted into the passive base in any combination. It is a highly flexible and expandable system.
[0003] The I / O modules in this system include digital input modules (DI modules for short), digital output modules (DQ modules for short), analog input modules (AI modules for short) and communication modules. The PLC input module transmits various on-site switch quantities and sensor analog signals to the PLC CPU for processing. As a result, the output of the PLC output module is used to control the execution of valves, motors, etc. on site. However, in actual use, the digital input module DI of the PLC is affected by various factors such as the on-site environment (electromagnetic environment) and power quality. Unstable voltage and current signals enter the internal circuit of the digital input module DI, burning the internal components of the DI module. This situation often occurs, affecting the operation of the on-site waste heat recovery equipment, resulting in reduced waste heat recovery efficiency and increased energy consumption; in addition, there will be problems such as misjudgment caused by noise and interference in the signal, and damage to the input circuit caused by reverse voltage and overvoltage.
[0004] Therefore, there is an urgent need for a PLC control device that can prevent the PLC digital input module DI from burning out due to external factors, as well as circuit damage or system misjudgment. Summary of the invention
[0005] In order to solve the problems existing in the PLC system mentioned in the above background technology, the present invention provides a PLC control device and a PLC control method. The technical solution adopted by the present invention is as follows:
[0006] A PLC control device comprises a PLC input / output module, a field device, an intermediate relay, a diode and a filter; an equipment switch contact is arranged at the output end of the field device, and the intermediate relay, the diode and the filter are connected to the input end of the PLC input / output module and the electrical signal between the equipment switch contact; a power supply is arranged inside the intermediate relay, and the winding of the intermediate relay, the diode, the equipment switch contact and the filter are connected in series from the positive pole to the negative pole outside the power supply; the filter is controlled by an adaptive parameter adjustment control system, and the adaptive parameter adjustment control system comprises an original signal data collection unit, a PLC system monitoring unit, a data preprocessing unit, an output signal data collection unit, a feature recognition and extraction unit, a signal frequency domain comparison unit, a signal time domain comparison unit and a parameter adjustment module, and the parameter adjustment module comprises an error signal calculation unit, a coefficient calculation unit and an adaptive parameter adjustment unit.
[0007] Furthermore, the output end of the original signal data collection unit is unidirectionally connected to the input end of the data preprocessing unit, the output end of the PLC system monitoring unit is unidirectionally connected to the input end of the output signal data collection unit, the output end of the data preprocessing unit and the output end of the output signal data collection unit are unidirectionally connected to the input end of the feature recognition and extraction unit, the output end of the feature recognition and extraction unit is unidirectionally connected to the input ends of the signal frequency domain comparison unit and the signal time domain comparison unit, and the output ends of the signal frequency domain comparison unit and the signal time domain comparison unit are unidirectionally connected to the input end of the parameter adjustment module.
[0008] Further, the raw signal data collection unit is used to collect signal data of the unprocessed field signal of the field device in real time using a data collection device;
[0009] The data preprocessing unit is used to preprocess the collected raw signal data, including noise reduction and interference removal operations, to ensure the accuracy and reliability of the signal data;
[0010] The PLC system monitoring unit is used to monitor the PLC input and output modules in real time using a data acquisition device, thereby acquiring signal format data of input signals readable by the PLC system, including the frequency range, amplitude and waveform of the signals, and deriving the expected output signals;
[0011] The output signal data collection unit is used to collect data characteristics of the signal output by the filter, including the frequency range, amplitude and waveform of the signal;
[0012] The feature recognition and extraction unit is used to extract features from the preprocessed desired output signal and filter output signal data to obtain feature parameters of the signal;
[0013] The signal frequency domain comparison unit is used to perform frequency domain analysis on the field signal and the filter output signal using signal processing technology, determine the frequency components and energy distribution of the signals, and compare the frequency domain characteristics of the input signal and the output signal;
[0014] The signal time domain comparison unit is used to compare the time domain characteristics of the field signal and the filter output signal, observe the waveform changes of the signal, and determine the impact of the filter on the input signal;
[0015] The parameter adjustment module is used to apply an adaptive algorithm to calculate data, and to optimize and adjust the adaptive filter by updating the coefficients of the filter according to the calculation results.
[0016] Further, the parameter adjustment module includes an error signal calculation unit, a coefficient calculation unit and an adaptive parameter adjustment unit;
[0017] The error signal calculation unit is used to calculate the error signal through the error signal formula, and thus evaluate the performance and accuracy of the filter; the error signal is usually calculated by the following formula: error signal = expected output signal − filter output signal;
[0018] The coefficient calculation unit is used to adjust the coefficient of the filter using the minimum mean square error algorithm according to the direction and size of the error signal, so that the output signal of the filter is close to the expected output signal, thereby achieving a better filtering effect;
[0019] The adaptive parameter adjustment unit is used to adjust the coefficients of the filter according to the calculated result, so as to change the response and performance of the filter to the input signal.
[0020] A PLC control method comprises the following steps:
[0021] S1: collecting the field signal at the input end of the filter and the output signal at the output end, and collecting the expected output signal of the filter obtained by monitoring the PLC system;
[0022] S2: In the data preprocessing stage, the original signal data is processed by digital signal processing technology, including filtering and denoising, to ensure the accuracy and stability of subsequent steps;
[0023] S3: Perform feature recognition and extraction processing on the collected signal data to obtain characteristic parameters of the signal;
[0024] S4: comparing the frequency characteristics and time domain characteristics of the field signal and the filter output signal to determine the similarities or differences between them;
[0025] S5: Calculate the error signal through the error signal formula and thus evaluate the performance and accuracy of the filter;
[0026] S6: adjusting the coefficients of the filter by a minimum mean square error algorithm so that the output signal of the filter is close to the expected output signal;
[0027] S7: Adjust the coefficients of the filter according to the calculated result.
[0028] Furthermore, the specific steps of the minimum mean square error algorithm described in S6 are:
[0029] 1. Initialize the filter coefficients;
[0030] 2. Filter the input signal collected in real time to obtain the filter output;
[0031] 3. Compare the filter output with the desired output and calculate the error signal;
[0032] 4. Update the filter coefficients according to the feedback value of the error signal;
[0033] 5. Repeat steps 2 to 4 until the error signal converges or reaches a certain condition;
[0034] The updated filter coefficients in step 4 are adjusted by the following formula:
[0035] w(n+1)=w(n)+μe(n)·x(n)
[0036] Among them, w(n) represents the filter coefficient vector at the current moment, w(n+1) represents the filter coefficient vector at the next moment, μ is the step factor, e(n) is the error signal at the current moment, and x(n) is the input signal at the current moment.
[0037] The beneficial effects of a PLC control device and a PLC control method of the present invention are as follows: by adding an intermediate relay as an isolation device between the input end of the PLC digital input module DI and the signal from the field, the bad signal source at the field end is isolated, thereby protecting the DI module of the PLC, and by adding a diode in the circuit to prevent overvoltage or reverse voltage from damaging the PLC control system, and by adding a filter that realizes adaptive adjustment through adaptive parameter adjustment of the control system, it has the advantages of adaptive denoising, frequency modulation and anti-interference. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 A circuit diagram of a PLC control device and a control device of a PLC control method of the present invention;
[0039] Figure 2It is a schematic flow chart of the adaptive parameter adjustment control system of the present invention;
[0040] Figure 3 A schematic diagram of the structure of a parameter adjustment module for an adaptive parameter adjustment control system;
[0041] Among them, 1. PLC input and output module; 2. Field equipment; 3. Intermediate relay; 4. Power supply; 5. Diode; 6. Filter; 7. Equipment switch contacts. DETAILED DESCRIPTION
[0042] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0043] like Figure 1-3 As shown, a PLC control device includes a PLC input and output module 1, a field device 2, an intermediate relay 3, a diode 5 and a filter 6; an equipment switch contact 7 is provided at the output end of the field device 2, and the intermediate relay 3, the diode 5 and the filter 6 are connected to the electrical signal between the input end of the PLC input and output module 1 and the equipment switch contact 7; a power supply 4 is provided in the intermediate relay 3, and the winding of the intermediate relay 3, the diode 5, the equipment switch contact 7 and the filter 6 are connected in series from the positive pole to the negative pole outside the power supply 4; the filter 6 is controlled by an adaptive parameter adjustment control system, and the adaptive parameter adjustment control system control includes an original signal data collection unit, a PLC system monitoring unit, a data preprocessing unit, an output signal data collection unit, a feature recognition and extraction unit, a signal frequency domain comparison unit, a signal time domain comparison unit and a parameter adjustment module, and the parameter adjustment module includes an error signal calculation unit, a coefficient calculation unit and an adaptive parameter adjustment unit.
[0044] The output end of the original signal data collection unit is unidirectionally connected to the input end of the data preprocessing unit, the output end of the PLC system monitoring unit is unidirectionally connected to the input end of the output signal data collection unit, the output end of the data preprocessing unit and the output end of the output signal data collection unit are unidirectionally connected to the input end of the feature recognition and extraction unit, the output end of the feature recognition and extraction unit is unidirectionally connected to the input ends of the signal frequency domain comparison unit and the signal time domain comparison unit, and the output ends of the signal frequency domain comparison unit and the signal time domain comparison unit are unidirectionally connected to the input end of the parameter adjustment module.
[0045] The original signal data collection unit is used to collect the signal data of the unprocessed field signal of the field device 2 in real time using a data acquisition device;
[0046] The data preprocessing unit is used to preprocess the collected raw signal data, including noise reduction and interference removal operations, to ensure the accuracy and reliability of the signal data;
[0047] The PLC system monitoring unit is used to monitor the PLC input and output module 1 in real time using a data acquisition device, thereby acquiring signal format data of input signals readable by the PLC system, including the frequency range, amplitude and waveform of the signal, and deriving the expected output signal;
[0048] The output signal data collection unit is used to collect data characteristics of the signal output by the filter 6, including the frequency range, amplitude and waveform of the signal;
[0049] The feature recognition and extraction unit is used to extract features from the preprocessed desired output signal and the filter 6 output signal data to obtain feature parameters of the signal;
[0050] The signal frequency domain comparison unit is used to perform frequency domain analysis on the field signal and the output signal of the filter 6 by using signal processing technology, determine the frequency components and energy distribution of the signals, and compare the frequency domain characteristics of the input signal and the output signal;
[0051] The signal time domain comparison unit is used to compare the time domain characteristics of the field signal and the output signal of the filter 6, observe the waveform changes of the signal, and determine the influence of the filter 6 on the input signal;
[0052] The parameter adjustment module is used to calculate the data using an adaptive algorithm, and optimize and adjust the adaptive filter 6 by updating the coefficients of the filter 6 according to the calculation results.
[0053] The parameter adjustment module includes an error signal calculation unit, a coefficient calculation unit and an adaptive parameter adjustment unit;
[0054] The error signal calculation unit is used to calculate the error signal through the error signal formula, and thus evaluate the performance and accuracy of the filter 6; the error signal is usually calculated by the following formula: error signal = expected output signal − filter 6 output signal;
[0055] The coefficient calculation unit is used to adjust the coefficient of the filter 6 according to the direction and size of the error signal using the minimum mean square error algorithm, so that the output signal of the filter 6 is close to the expected output signal, thereby achieving a better filtering effect;
[0056] The adaptive parameter adjustment unit is used to adjust the coefficients of the filter 6 according to the calculated result, so as to change the response and performance of the filter 6 to the input signal.
[0057] A PLC control method comprises the following steps:
[0058] S1: collecting the field signal at the input end and the output signal at the output end of the filter 6, and collecting the expected output signal of the filter 6 obtained by monitoring the PLC system;
[0059] S2: In the data preprocessing stage, the original signal data is processed by digital signal processing technology, including filtering and denoising, to ensure the accuracy and stability of subsequent steps;
[0060] S3: Perform feature recognition and extraction processing on the collected signal data to obtain characteristic parameters of the signal;
[0061] S4: comparing the frequency characteristics and time domain characteristics of the field signal and the output signal of the filter 6 to determine the similarity or difference between them;
[0062] S5: Calculate the error signal through the error signal formula and thus evaluate the performance and accuracy of the filter 6;
[0063] S6: adjusting the coefficient of filter 6 by a minimum mean square error algorithm so that the output signal of filter 6 is close to the expected output signal;
[0064] S7: Adjust the coefficients of filter 6 according to the calculated result.
[0065] The specific steps of the minimum mean square error algorithm described in step S6 are:
[0066] (1) Initialize filter 6 coefficients;
[0067] (2) Filtering the input signal collected in real time to obtain the filter 6 output;
[0068] (3) Compare the output of filter 6 with the expected output and calculate the error signal;
[0069] (4) updating the coefficients of filter 6 according to the feedback value of the error signal;
[0070] (5) Repeat steps 2 to 4 until the error signal converges or reaches a certain condition;
[0071] The updated filter 6 coefficients in step (4) are adjusted by the following formula:
[0072] w(n+1)=w(n)+μe(n)·x(n)
[0073] Among them, w(n) represents the filter 6 coefficient vector at the current moment, w(n+1) represents the filter 6 coefficient vector at the next moment, μ is the step factor, e(n) is the error signal at the current moment, and x(n) is the input signal at the current moment.
[0074] The specific implementation is as follows: first, the field signal is collected by the original signal data collection unit, and the data features are extracted, so as to select a matching filter 6 according to the features of the extracted field signal, and set the initial parameters; then, the PLC system monitoring unit uses a data acquisition device to monitor the PLC input and output module 1 in real time, so as to collect the signal format data of the input signal readable by the PLC system, and obtain the expected output signal, and collect the data features of the signal output by the filter 6 by the output signal data collection unit, and obtain the filter 6 output signal, and extract the features of the pre-processed expected output signal and the filter 6 output signal data by the feature recognition and extraction unit, and the The signal frequency domain comparison unit is compared with the signal time domain comparison unit, and then the error signal calculation unit is used to obtain the error signal according to the formula: error signal = expected output signal - filter 6 output signal. Finally, the coefficient of filter 6 (i.e., weight vector) is calculated by the minimum mean square error algorithm. Each filter 6 coefficient is associated with a certain dimension of the input signal, which can be regarded as the response strength of filter 6 in its corresponding dimension. When the coefficient of filter 6 changes, the response of filter 6 to the input signal will also change, thereby affecting the output signal of filter 6. Therefore, by adjusting the coefficient of filter 6, the adaptive filtering processing of filter 6 can be realized, which can better adapt to the characteristics of the signal and environmental changes. When a field signal is input, the field signal passes through the filter 6 and the intermediate relay 3, and is then transmitted to the PLC system through the input end of the PLC digital input module DI; the intermediate relay 3, the diode 5 and the filter 6 are connected through the input end of the PLC input-output module 1 and the electrical signal between the device switch contacts 7, and the filter 6 is controlled by an adaptive parameter adjustment control system, so that the intermediate relay 3 isolates the bad signal source at the field end, and the diode 5 prevents overvoltage or reverse voltage from damaging the PLC control system and the adaptively adjusted filter 6 has the effect of denoising and anti-interference, which solves the problem mentioned in the background technology that "the digital input module DI of the PLC is affected by various factors such as the field environment (electromagnetic environment) and the quality of the power supply 4, and unstable voltage and current signals enter the internal circuit of the digital input module DI, burning the internal components of the DI module. This situation often occurs, affecting the operation of the on-site waste heat recovery equipment, resulting in reduced waste heat recovery efficiency and increased energy consumption; in addition, there will be noise and interference in the signal leading to misjudgment, and reverse voltage and overvoltage causing damage to the input circuit."
[0075] The present invention and its embodiments are described above, which is not restrictive. What is shown in the accompanying drawings is only one of the embodiments of the present invention, and the actual structure is not limited thereto. In short, if ordinary technicians in this field are inspired by it and do not deviate from the purpose of the invention, they can creatively design structural methods and embodiments similar to the technical scheme, which should all fall within the scope of protection of the present invention.
Claims
1. A PLC control device, characterized in that: The invention comprises a PLC input / output module (1), a field device (2), an intermediate relay (3), a diode (5) and a filter (6); an output end of the field device (2) is provided with a device switch contact (7); an input end of the PLC input / output module (1) and the device switch contact (7) are electrically connected to the intermediate relay (3), the diode (5) and the filter (6); a power supply (4) is provided inside the intermediate relay (3); the power supply (4) is externally connected in series with a winding of the intermediate relay (3), the diode (5), the device switch contact (7) and the filter (6) from the positive pole to the negative pole; the filter (6) is controlled by an adaptive parameter adjustment control system, the adaptive parameter adjustment control system comprising an original signal data collection unit, a PLC system monitoring unit, a data preprocessing unit, an output signal data collection unit, a feature recognition and extraction unit, a signal frequency domain comparison unit, a signal time domain comparison unit and a parameter adjustment module, the parameter adjustment module comprising an error signal calculation unit, a coefficient calculation unit and an adaptive parameter adjustment unit; The output end of the original signal data collection unit is unidirectionally connected to the input end of the data preprocessing unit, the output end of the PLC system monitoring unit is unidirectionally connected to the input end of the output signal data collection unit, the output end of the data preprocessing unit and the output end of the output signal data collection unit are unidirectionally connected to the input end of the feature recognition and extraction unit, the output end of the feature recognition and extraction unit is unidirectionally connected to the input ends of the signal frequency domain comparison unit and the signal time domain comparison unit, and the output ends of the signal frequency domain comparison unit and the signal time domain comparison unit are unidirectionally connected to the input end of the parameter adjustment module; The raw signal data collection unit is used to collect signal data of the unprocessed field signal of the field device (2) in real time using a data collection device; The data preprocessing unit is used to preprocess the collected raw signal data, including noise reduction and interference removal operations, to ensure the accuracy and reliability of the signal data; The PLC system monitoring unit is used to use a data acquisition device to monitor the PLC input and output module (1) in real time, thereby acquiring signal format data of an input signal readable by the PLC system, including the frequency range, amplitude and waveform of the signal, and deriving an expected output signal; The output signal data collection unit is used to collect data characteristics of the signal output by the filter (6), including the frequency range, amplitude and waveform of the signal; The feature recognition and extraction unit is used to extract features from the preprocessed desired output signal and the filter (6) output signal data to obtain feature parameters of the signal; The signal frequency domain comparison unit is used to perform frequency domain analysis on the field signal and the output signal of the filter (6) by using signal processing technology, determine the frequency components and energy distribution of the signals, and compare the frequency domain characteristics of the input signal and the output signal; The signal time domain comparison unit is used to compare the time domain characteristics of the field signal and the output signal of the filter (6), observe the waveform changes of the signal, and determine the influence of the filter (6) on the input signal; The parameter adjustment module is used to apply an adaptive algorithm to calculate data, and to optimize and adjust the adaptive filter (6) by updating the coefficients of the filter (6) according to the calculation results.
2. A PLC control device according to claim 1, characterized in that: The parameter adjustment module includes an error signal calculation unit, a coefficient calculation unit and an adaptive parameter adjustment unit; The error signal calculation unit is used to calculate the error signal through an error signal formula, and thus evaluate the performance and accuracy of the filter (6); the error signal is calculated by the following formula: error signal = expected output signal - filter (6) output signal; The coefficient calculation unit is used to adjust the coefficient of the filter (6) according to the direction and size of the error signal using a minimum mean square error algorithm, so that the output signal of the filter (6) is close to the expected output signal, thereby achieving a better filtering effect; The adaptive parameter adjustment unit is used to adjust the coefficients of the filter (6) according to the calculated result, thereby changing the response and performance of the filter (6) to the input signal.
3. A PLC control method, comprising using the PLC control device according to any one of claims 1-2, characterized in that: The following steps are involved: S1: collecting the field signal at the input end and the output signal at the output end of the filter (6), and collecting the expected output signal of the filter (6) obtained by monitoring the PLC system; S2: In the data preprocessing stage, the original signal data is processed by digital signal processing technology, including filtering and denoising, to ensure the accuracy and stability of subsequent steps; S3: Perform feature recognition and extraction processing on the collected signal data to obtain characteristic parameters of the signal; S4: comparing the frequency characteristics and time domain characteristics of the field signal and the output signal of the filter (6) to determine the similarity or difference between them; S5: Calculate the error signal through the error signal formula and thus evaluate the performance and accuracy of the filter (6); S6: adjusting the coefficients of the filter (6) by a minimum mean square error algorithm so that the output signal of the filter (6) is close to the expected output signal; S7: Adjust the coefficients of the filter (6) according to the calculated result.
4. A PLC control method according to claim 3, characterized in that: The specific steps of the minimum mean square error algorithm described in S6 are: (1) Initialize the filter (6) coefficients; (2) Filtering the input signal collected in real time to obtain the output of the filter (6); (3) Compare the output of filter (6) with the expected output and calculate the error signal; (4) Update the coefficients of the filter (6) according to the feedback value of the error signal; (5) Repeat steps 2 to 4 until the error signal converges; The coefficients of the updated filter (6) in step (4) are adjusted by the following formula: w(n+1)=w(n)+μe(n)·x(n) Wherein, w(n) represents the coefficient vector of filter (6) at the current moment, w(n+1) represents the coefficient vector of filter (6) at the next moment, μ is the step size factor, e(n) is the error signal at the current moment, and x(n) is the input signal at the current moment.
