Next Article in Journal
Capturing the Asymmetry of Pitting Corrosion: An Interpretable Prediction Model Based on Attention-CNN
Previous Article in Journal
Elliptic Functions and Advanced Analysis of Soliton Solutions for the Dullin–Gottwald–Holm Dynamical Equation with Applications of Mathematical Methods
Previous Article in Special Issue
A Skill-Inspired Adaptive Fuzzy Control Framework for Symmetric Gait Tracking with Sparse Sensor Fusion in Lower-Limb Exoskeletons
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Processing the Sensor Signal in a PI Control System Using an Adaptive Filter Based on Fuzzy Logic

by
Jarosław Joostberens
1,
Aurelia Rybak
1,* and
Aleksandra Rybak
2
1
Faculty of Mining, Safety Engineering and Industrial Automation, Silesian University of Technology, 44-100 Gliwice, Poland
2
Department of Physical Chemistry and Technology of Polymers, Faculty of Chemistry, Silesian University of Technology, Strzody 7, 44-100 Gliwice, Poland
*
Author to whom correspondence should be addressed.
Symmetry 2025, 17(10), 1774; https://doi.org/10.3390/sym17101774
Submission received: 31 August 2025 / Revised: 6 October 2025 / Accepted: 13 October 2025 / Published: 21 October 2025
(This article belongs to the Special Issue Symmetry/Asymmetry in Fuzzy Control)

Abstract

This paper presents an adaptive fuzzy filter applied to processing a signal from a voltage sensor fed to the input of an object in an automatic temperature control system with a PI controller. (1) The research goal was to develop an algorithm for processing the signal from an RMS voltage sensor, measured at the terminals of a heating element in a temperature control system with a PI controller, in a way that ensures good dynamic properties while maintaining an appropriate level of accuracy. (2) The paper presents a method for designing an adaptive fuzzy filter by synthesizing a first-order low-pass infinite impulse response (IIR) filter and a fuzzy model of the dependence of this filter parameter value on the modulus of the derivative of the measured quantity. The application of a model with a symmetric input and output structure and a modified fuzzy model with asymmetry resulting from the uneven distribution of modal values of singleton fuzzy sets at the output was shown. The innovation in the proposed solution is the use of a signal from a PI controller to determine the derivative module of the measured quantity and, using a fuzzy model, linking its instantaneous value with a digital filter parameter in the measurement chain with a sensor monitoring the signal at the input of the controlled object. It is demonstrated that the signal generated by the PI controller can be used in a control system to continuously determine the modulus of the time derivative of the signal measured at the input of the controlled object, also indicating the limitations of this method. The signal from the PI controller can also be used to select filter parameters. In such a situation, it can be treated as a reference signal representing the useful signal. The mean square error (MSE) was adopted as the criterion for matching the signal at the filter output to the reference signal. (3) Based on a comparative analysis of the results of using an adaptive fuzzy filter with a classic first-order IIR filter with an optimal parameter in the MSE sense, it was found that using a fuzzy filter yields better results, regardless of the structure of the fuzzy model used (symmetric or asymmetric). (4) The paper demonstrates that in the tested temperature control system, introducing a simple fuzzy model with one input characterized by three fuzzy sets, relating the modulus of the derivative of the signal developed by the PI controller to the value of the first-order IIR filter parameter, into the voltage sensor signal-processing algorithm gave significantly better results than using a first-order IIR filter with a constant optimal parameter in terms of MSE. The best results were obtained using a fuzzy model in which an intentional asymmetry in the modal values of the output fuzzy sets was introduced.

1. Introduction

In automatic control systems for many processes, a PI controller is often used. If the automatic control system is presented as in Figure 1, the controller’s transfer function can be expressed as follows:
G C s = k p × 1 + 1 T I s
where
kp—proportional term gain;
TI—integration constant.
Figure 1. Block diagram of a linear automatic control system with the measuring path (purple color) of the input signal of the control object.
Figure 1. Block diagram of a linear automatic control system with the measuring path (purple color) of the input signal of the control object.
Symmetry 17 01774 g001
In an automatic control system, there is negative feedback from the controlled variable y processed by the measuring system H(s). The measured variable ym is compared to the setpoint r. The controller GC(s), based on the error signal e(t), i.e., the difference between the signals r and ym(t), generates a control signal u(t) that reduces the controlled signal to the setpoint level. Typically, the signal from the controller does not have sufficient energy to control the object, described in Figure 1 by the transfer function G(s). In such a case, the amplification of signal u is provided by an final control element, which, depending on u, controls the flow of energy or mass to the controlled object. In real systems, the object G(s) is affected by disturbances d, generally presented in Figure 1. The block diagram in Figure 1 refers to linear systems. However, we are dealing with nonlinear systems, primarily due to the nonlinearities inherent in the object and final control element. If the system can be linearized within its intended operating range, the diagram in Figure 1 will be appropriate.
As shown in Figure 1, the system measures the regulated signal y using a measuring and processing system with transmittance H(s), which includes a sensor and a processing system whose task is to convert the signal y to the standard supported by the controller and, if necessary, filter it. In addition to the signal y, the signal at the output of the final control element uE is often measured in industrial systems.
In automatic control systems, an actuator controls the flow of energy or mass to a facility. The instantaneous value of the uE signal at the actuator’s output should be linearly related to the signal generated by the controller. This will ensure proper operation of the control system. Monitoring the signal directly applied to the uE control facility input is essential in this context for diagnostic purposes, as it allows for the assessment of potential technical irregularities in the control system’s operation. Furthermore, in some cases, if the signal applied to the uE facility input may be subject to significant disturbances, its measurement can be used to shorten the control system’s response time to this disturbance, for example, by using a closed-open system. Monitoring the uE signal, i.e., the signal applied to the facility input, can also be used to assess energy consumption or for energy balance purposes.
Monitoring the signal uE, i.e., the signal fed to the input of the object, can be used to assess energy consumption or for balancing purposes, as well as to check the correct operation of the system. The signal uEM at the output of the sensor of quantity uE may be significantly affected by noise dn. In such a situation, the measuring system is expected to separate the useful signal component from the measured signal uEM throughout the entire operating period of the system. This means that the measuring system should be characterized by good dynamic properties while maintaining accuracy at an appropriate level so that the signal uFE represented the waveform of the useful component of the signal measured uE. For many years, fuzzy logic has been used in automatic control systems of many processes. Many works have been written in this field [1,2,3,4]. It can also be used in signal processing. In practice, industrial automation engineers typically use the simplest finite-intensity (FIR) or infinite-intensity (IIR) filters, i.e., a moving-average filter or a first-order IIR filter, respectively. The parameters of these filters are typically selected with an arbitrary cutoff frequency based on the expert’s professional experience. Due to the phase shift introduced, these simple filters are a compromise solution, maintaining accuracy at the expense of degrading the dynamic properties of the measurement system, which is often insufficient. Therefore, there is a need and opportunity to supplement a simple digital low-pass filter with a fuzzy model and use the signal generated by the PI controller to implement an adaptive form of this filter, in order to significantly improve the dynamic properties of the measurement system while maintaining its accuracy at an appropriate level. In the proposed solution, the signal generated by the PI controller is treated as a representation of the derivative of the signal at the uE object’s input, thus eliminating the difficulties of determining the derivative of a noisy signal on-the-fly. In this sense, the proposed solution is original and represents a novelty in signal processing in a control system.
This paper presents an adaptive fuzzy filter that performs signal processing using a first-order, low-pass infinite impulse response (IIR) filter with a parameter dependent on the control signal derivative modulus u, representing the time-varying useful signal uE. A method for designing an adaptive fuzzy filter is demonstrated, and the filter’s performance in a linearized temperature control system with an electrically powered heating element is tested. The results of using the adaptive fuzzy filter are compared with the performance of a classic first-order, low-pass IIR filter. Therefore, for differentiation purposes, the output signal of the fuzzy filter is designated uEFF, and that of the first-order IIR as uEF.

2. Adaptive Fuzzy Filter Used for Monitoring the Input Signal of the Control Object in a Control System with a PI Controller

2.1. First-Order IIR Low-Pass Filter

A low-pass digital filter in the form of a first-order recursive IIR filter is often used to process the sensor signal. Referring to the symbols in Figure 1, this filter, used to process the uEM measurement signal, can be described by the equation [5]:
u E F n = a × u E F n 1 + b × u E M [ n ]
where
a—filter parameter with a value in the range [0, 1];
b—filter parameter b = 1 – a;
n—sampling step with constant period Ts;
uEM—measurement signal.

2.2. Adaptive Fuzzy Filter Based on First-Order Recursive IIR Filter

Analyzing the above equation it can be easily noticed that for large values of parameter a (close to one) there will be a strong damping of the rapidly varying noise component, which simultaneously results in a deterioration of the dynamic properties of the measurement system (measurement path of the sensor with the filter). A small value of a leads to better dynamic properties of the measurement system at the expense of increased fluctuations in the filter output signal. This means that in the case of significant signal variability uE, e.g., of a step nature, a too high value of a will result in a significant dynamic error (signal changes will be damped). On the other hand, a too low value of a will result in a reduction in the dynamic error, but with an increase in the statistical error. This leads to the conclusion that in the case of sudden signal changes uE, the value of the filter parameter a should be small, and at moments close to a steady state it should be large. Therefore, the value of parameter a should be linked to the derivative of the filtered signal uE. It should be noted that duE/dt can have positive or negative instantaneous values. The value of parameter a should therefore depend on the value of the derivative, not its sign, which can be written as:
a = f d u E d t
The basic procedure of numerical differentiation is the first difference, the equation of which, with respect to Formula (3) and the block diagram in Figure 1, can be written [6]:
d u E M d t 1 T s × u E M n u E M [ n 1 ]
The difficulty of numerically determining the derivative of the measurement signal uEM lies in the fact that its interference is also differentiated. It should be noted that in the control system shown in Figure 1, the transformation of the measured signal uEM must be performed continuously. Therefore, to use Equation (3) for adaptive implementation of filter (2), the time derivative of the signal uEM must also be determined continuously, every sampling period. As a result, using Formula (4) for a noisy signal becomes useless, because the first difference in the signal uEM determined according to Equation (4) would require additional smoothing to reduce the differentiated noise, which complicates the signal-processing algorithm. There are many procedures for determining the derivative of the signal [7,8,9,10,11,12,13], but these usually introduce a phase or time shift relative to the signal uE, which can significantly limit their use in automatic control systems. Analyzing the block diagram in Figure 1 in terms of the useful signal uE, it can be seen that it is the output of the transfer function GE(s), which describes the properties of the final control element. The input signal of this transfer function is the control signal u generated by the controller. In a linear control system, there is therefore a relationship between them:
U E ( s ) = G E ( s ) × U ( s )
where
UE(s)—transform of the signal at the input of the control object—useful signal;
U(s)—transform of the signal generated by the regulator.
In a situation where the final control element is a linear proportional element that amplifies the signal u, Equation (5) can be written in the time domain as:
u E t = k E × u ( t )
where kE is the gain of the final control element, i.e., GE (s) = k.
Taking into account the relations (4) and (6), the derivative of the signal uE, observed discretely every sampling period, can be determined using the relations:
d u E d t k E × u n u [ n 1 ] T s
Due to the fact that the control signal u in the control system with the PI controller of Equation (1) does not contain a fast-changing component (no D term), the use of the first difference in this signal to determine the current derivative of the signal uE, fed to the input of the controlled object, is justified, because the signal uE is a rescaling of the signal u.
The relationship between the value of parameter a and the modulus of the time derivative of the signal uE was defined above qualitatively. A convenient way of qualitative assessment is to use the fuzzy set theory introduced by [14]. In such a case, the adaptation of the value of parameter a or b of the filter with Equation (2) depending on |du/dt| can be presented in the form of three simple rules:
  • R1: If |du/dt| = S then b = S(a = L).
  • R2: If |du/dt| = M then b = M(a = M).
  • R3: If |du/dt| = L then a = L(b = S).
In these rules, S denotes a small value, M denotes a medium value, and the symbol L denotes a large value. Due to the relationship between the parameters a and b of the filter (2), where b = 1 − a, rules R1–R3 can be presented in two ways, i.e., with respect to a or b. In this case, it is more convenient to refer to parameter b. In such a situation, the relationship (3) transformed with respect to parameter b can be relatively easily implemented using fuzzy modeling. The structure and idea of using a fuzzy model to implement adaptive filtering of the signal fed to the input of the controlled object in a system with a PI controller are shown in Figure 2.
Because in the fuzzy model the input signal is normalized in the range [−1, 1], and in the control system between signals u and uE at any time the relation (6) holds, the currently determined |du/dt| can be directly used as an input quantity of the fuzzy model without the need to take into account the amplification factor kE, which is shown in Figure 2. Then, the relation (3) can be replaced by the following relation:
b = f d u d t f Δ u T s
The proposed fuzzy model, whose structure is shown in Figure 2, is a single-input, single-output model with three fuzzy input sets.
Triangular functions were assumed as membership functions for the input fuzzy sets, while Singleton functions were assumed as membership functions for the output fuzzy sets [15]. The graphical representations of these input and output sets are presented in Figure 3.
The idea of using fuzzy logic for uEM signal filtration (Figure 2) is to supplement one of the simplest digital filters with a simple fuzzy model to develop its adaptive form. The proposed first-order adaptive IRR filter is based on the assumption that such a relatively simple modification will lead to improved dynamic properties of the measurement system without the need for significantly more complex algorithms or signal-processing systems, which justifies the adoption of a small number of model input and output fuzzy sets and membership function shapes.
As shown in Figure 2, the signal u generated by the controller is continuously differentiated based on the equation
d u d t Δ u T s = u n u n 1 T s
with the determined module of instantaneous values. The instantaneous values |Δu/Ts| are normalized in the range [−1, 1]. These values are subject to fuzzification, which consists of determining the degree of membership of the input μ (|du/dt|)i = 1, 2, 3 to fuzzy sets. In the Inference block, based on the degrees of membership μ (|du/dt|)i = 1, 2, 3, the resulting membership function μ(b) is calculated. The most important element of the Inference block is the rule base, which represents qualitative knowledge about the modeled dependency b = f (|du/dt|) in the form of a set of three rules: R1, R2, R3. At a given instant nTs, the calculation of the crisp output value of the model aN is based on the determined resulting membership function μ(a), which is the result of providing the crisp input values of the model |Du[n]/Ts|. This stage is represented by the Defuzzification block in Figure 2. The Height Method was used to accomplish this task. The continuously calculated sharp values of the bN model output have a standardized form. For this reason, in the block determining the current value of the b filter model parameter (2) requires performing an operation inverse to normalization (the Denormalization block in Figure 2). Compared to existing solutions, the proposed adaptive fuzzy filter uses the derivative of the signal u generated by the PI controller to change its parameter. This signal is treated as a good representation of the derivative of the noisy filtered signal fed to the input of the control system. Changes to the filter parameter are obtained continuously, depending on the value of the derivative modulus of the control signal, which in this situation is used as the input signal to the fuzzy model of the relationship b = f(|du/dt|). This is a new approach to signal processing, particularly using fuzzy logic.

2.3. Selection of Fuzzy Model Parameters as an Element of an Adaptive Low-Pass Filter

Selection of parameters of the fuzzy model b = f(|Δu/Ts|) comes down to determining the modal values of the input and output fuzzy sets. For the assumed fuzzy model with one input characterized by three input fuzzy sets, the number of rules is three and the number of parameters is six [16]. Therefore, the values b1, b2, b3 (Figure 3b) and |u′|1, |u′|2, |u′|3 (Figure 3a) should be determined. The modal values of the input fuzzy sets |u′|1, |u′|2, |u′|3 can be specified based on the |du/dt| course, determined using the recording of the control signal u during normal operation of the control system. Then, the variability of the control signal can be determined for a given control system, both in the situation of changes in the setpoint value r and in the presence of disturbances acting on the controlled object. In the situation of the largest changes in the signal u, the value of |Δu/Ts| will be the highest. Such a value can then be assigned to the modal value |u′|3. If |Δu/Ts| is the result of abrupt changes in the setpoint r, it can reach very high values, many times greater than in the case of other causes of changes in the signal u. The value of |u′|3 should then be reduced to take into account the range of variation in |Δu/Ts| caused by other reasons, e.g., the impact of disturbances d on the process object. In the case of automatic stabilization systems, a steady state may also occur, or more precisely, quasi-steady state, in which the control error e will be characterized by small variability, and therefore an almost constant value (in the case of PI control approximately equal to zero). In such a state, the control signal u will also be almost constant in time, so |Δu/Ts| will have a value close to zero. It follows that the modal value |u′|1 of the input fuzzy set can be assumed equal to zero in such a case. However, the modal value |u′|2 is conveniently defined as the middle value of the section between |u′|1 and |u′|3 from Figure 3a. The modal values of the output fuzzy sets will determine the range of variability of the parameter b of the adaptive filter with Equation (2).
Since the control signal u is an approximate, scaled representation of the useful component uE of the measured signal uEM, it can be used to select the modal values of the output fuzzy sets. Then, as a criterion for matching the signal at the output of the uEFF filter to the useful component uE, which is assumed to be proportional to the signal u (Equation (6)), the mean square error MSE can be assumed.
It should be noted that in the event of a step change in the control signal, i.e., when the value of |Δu/Ts| is large, the filter should also ensure a step change in the magnitude of uEM. Then, the modal value b3 can be assumed equal to one. The remaining modal values b1 and b2 can be determined by minimizing the criterion value for a certain operating interval of the control system. This operation consists of recording the characteristic time interval of uEM for a given operating interval of the control system. Then, b1 and b2 are selected iteratively in a program loop, determining the MSE criterion value for each pair of modal values, with b3 equal to one. This can be performed in two ways:
-
by selecting the modal value b1 and calculating the value b2 as the midpoint between b1 and b3, i.e., b2 = (b1 + b3)/2, thus obtaining a symmetric structure of the fuzzy model;
-
by iteratively determining both modal values, i.e., b1 and b2.
The values of b1 and b2 for which the MSE is minimal should be considered correct.
For the purposes of comparative analysis of the results of using a classic first-order IIR filter with its adaptive fuzzy version, criterion MSE can also be used. The filter that better separates the useful component uE from the measurement signal uEM should be considered the one for which the MSE value is lower.
As an auxiliary criterion, one can also use the evaluation of residuals, defined as:
ε i = u E M i u E j [ i ]  

3. Results of Bench Tests

3.1. Test Stand

The schematic diagram of the test stand is shown in Figure 4. The control system consists of the following elements:
1—24 V industrial power supply;
2—F&F voltage sensor type AC-1I (true RMS);
3—0–10 V to 4–20 mA standard converter;
4—SSR relay type SAVP2240 controlled by analog standard 4–20 mA;
5—heating element with power PN = 40 W and rated voltage UN = 230 VAC;
6—temperature sensor—K-type thermocouple;
7—NI cRIO-9074 industrial controller with analog input modules: NI 9219 (for temperature measurement); NI 9203 for measuring the voltage value at the terminals of the heating element at EM; and an NI 9263 analog output module (PI controller output) and NI 9474 digital outputs;
8—PC;
9—two-state SSR relay type SSR-4028ZD3;
10—Sunon fan type DP200A.
Figure 4. Schematic diagram of a temperature control system with an industrial controller 1—power supply; 2—voltage sensor; 3—0–10 V to 4–20 mA standard converter; 4—final control element; 5—heating element (controlled object); 6—temperature sensor; 7—industrial controller; 8—PC; 9—SSR relay for fan control; 10—fan.
Figure 4. Schematic diagram of a temperature control system with an industrial controller 1—power supply; 2—voltage sensor; 3—0–10 V to 4–20 mA standard converter; 4—final control element; 5—heating element (controlled object); 6—temperature sensor; 7—industrial controller; 8—PC; 9—SSR relay for fan control; 10—fan.
Symmetry 17 01774 g004
In the system, the industrial controller performs the function of the PI regulator (3). It also provides recording and processing of the uEM signal at the voltage sensor output (2, Figure 4) and the regulated signal (temperature). In the system, the heating element (Figure 4) is the controlled object, whose input is supplied with a supply voltage corresponding to the control signal generated by the PI controller, amplified by an SSR relay. The SSR relay (Figure 4) serves as an final control element, shown in the block diagrams (Figure 1 and Figure 2) as the operator transfer function GE(s). It allows for the conversion of 230 VAC mains voltage to values from 0 to nearly 230 VAC, depending on the value of the 0–20 mA input signal. In the control system, the electric voltage is applied to the input (terminals) of the heating element (3, Figure 4) via an SSR relay (Figure 4) depending on the value of the signal u at the analog output of the controller (NI 9263 module), developed by the PI algorithm. A sensor (Figure 4) from F&F, type AV-1I (true RMS), is used to measure the voltage at the heating element terminals. The voltage sensor (2, Figure 4) uses the 4–20 mA standard as the output signal. The AV-1I sensor symbol shown in Figure 4 contains the standard terminal markings (1–12) of this device [17]. As can be seen in Figure 4, the sensor’s output signal is connected to the NI 9203 analog input. This signal is subject to noise. The measuring output signal of the F&F AV-1l sensor is converted from the 4–20 mA analog standard value to the effective voltage value according to the relationship [17]:
u E M t = 25 × i E M ( t ) 0.1 × 10 3  
where
iEM—instantaneous value of the 4–20 mA standard current expressed in mA proportional to the value of the measured quantity uEM;
uEM—signal at the sensor output, converted in accordance with (11) into the value of the measured quantity, identical to the signals from the diagrams shown in Figure 2 and Figure 3.
The elements of the measurement chain for which the effectiveness of the adaptive fuzzy filter was tested are: an SSR relay (Figure 4), i.e., an final control element, an F&F AV-1l voltage sensor and an industrial controller (Figure 4).
In the temperature control system, external interference can be achieved by switching on the fan (8, Figure 4) using the controller’s digital output module and a voltage-controlled two-state SSR relay (7, Figure 4).

3.2. Test Conditions

The system uses a PI controller with the operator transfer function (1) and settings equal to kp = 2.002, TI = 1.020 s. The control object in the form of a heating element in the operating range was approximated by a model with the structure of a first-order inertial element:
G s = 0.83 × e 5.6 s 153.9 s + 1  
The final control element in the form of an SSR relay (Figure 4) in the control system can be treated as a static element with a strongly nonlinear characteristic. Therefore, it was linearized by introducing series with the final control element (Figure 4) an additional nonlinear element with a static characteristic compensating for the nonlinearity of the SSR relay (Figure 4). The linearized static characteristic of the final control element was identified using the least squares method. Its sample results are shown in Figure 5. In the experiment, a signal from the 0–10 V standard was fed to the input of the linearized element every 1 V, and the signal was recorded at the terminals of the uEM voltage sensor (2, Figure 4).
The best fit of the model to the empirical data was obtained for the following relationship:
u E = d 1 × u + d 0  
where
d0, d1—model parameters equal to 9.71 and 20.92, respectively.
Model (13) shows that in the case of the final control element (Figure 4) of the real control system, a modification of the criterion equation for assessing the effectiveness of noise reduction from the measurement signal of the sensor (Figure 4) is required. Due to the fact that in the control system (Figure 4) the final control element (Figure 4) has the characteristics of a static element, the time-domain relationship (13) can be treated as the equation of the reference signal uref and used in the selection of filter parameters. In such a situation, MSE criterion takes the form:
M S E j   =   1 N i   =   1 N u E j n u r e f [ n ] 2 1 N i   =   1 N u E j n d 1 × u [ n ] + d 0 2  
MSE criterion refers to the representation of the useful signal uE. In real solutions, a reference signal is obtained, which is an empirical model of the useful signal. As can be seen in Formula (14), the ideal dependence (6) is replaced by the empirical dependence (13).
It should be noted that for the selection using the reference signal (criterion (14)) to be effective, it should be carried out in a situation where there are no significant fluctuations in the effective value of the network voltage, which is a disadvantage of this method.
The results of the operation of the automatic control system with a PI controller in the form of waveforms: setpoint value r, temperature y and the control signal developed by the controller u are presented in Figure 6.
As shown in Figure 6, the control system with the PI controller and the selected settings operated correctly—the controlled signal y reached the setpoint r in every situation. The figure also shows that the signal from the RMS voltage sensor is significantly affected by noise. The qualitative similarity of the signals u and uEM is also noticeable. The control system operation time was 1000 s. A sampling period Ts of 0.1 s was assumed, so the total number of samples was 10,000. The control system operation time data from start t0 to t1 = 300 s were used to select the parameters of the adaptive fuzzy filter and the IIR filter parameter with Equation (2). Subsequent operating intervals of the system were used to verify the correctness of the filters and to comparatively analyze the results obtained as a result of using the classic IIR filter (2) and its adaptive fuzzy variant. The remaining operating time was divided into three intervals. The interval from time t2 = 300.1 s to t3 = 600 s, in which the set point r was changed twice in steps from 65 °C to 75 °C and from 75 °C to 85 °C. The range defined by times t4 = 600.1 s and t5 = 800 s includes the introduction of a significant disturbance d of a step nature (including the fan (Figure 4)). The last stage from time t6 = 800.1 s to t7 = 1000 s includes the operation of the control system after the step disappearance of the disturbance d (including the fan (Figure 4)).
In the case of the first method of selecting parameters b1, b2, b3, described in Section 2.3, i.e., for the symmetrical structure of the fuzzy model, the value of b1 was substituted from the range 0.001 to 0.1 with a step of 0.001, and at the same time the modal value of b2 was determined from the equation b2 = (b1 + b3)/2. For such a pair of parameters b1 and b2 and with b3 equal to 1, a fragment of the uEM signal was filtered, and the result was compared with the reference waveform using the MSE criterion. Then, the parameter b1 was increased by 0.001 and the calculations were repeated, etc. For the fuzzy model with an asymmetric output (the second method), the pair of modal values b1 and b2 were selected independently. Knowing the range of the b2 value changes in the situation of a symmetrical structure of the fuzzy model, the range [0.4, 0.5] of the b2 parameter was determined for the model with an asymmetric output, from which this modal value was substituted, increasing it in subsequent iterations by 0.001, while b1 was substituted from the range [0.001, 0.1]. Each time, the first fragment of the uEM signal was filtered and the MSE value was determined. The uEM signal processing for the selection of modal values was performed iteratively for the first fragment of the waveform, i.e., for the time from t0 to t1. In the case of both fuzzy models, for further signal processing, i.e., in the time range from t1 to t7, the parameters b1, b2, and b3 for which the MSE value was the lowest were adopted.

3.3. Research Results

In the first stage of the study, noise analysis was performed in the uEM measurement signal. For this purpose, the method given in [18] was used, which involved determining the residuals of the autoregressive process, identified by the least squares method, using the FPE index [19] to determine the process order. The autocorrelation function of the obtained residuals was then examined. Based on the analysis of the autocorrelation function, the hypothesis that the sequence of residuals approximates a white noise sequence with a mean of 0.03 and a variance of 60.7 V2 cannot be rejected.
In the next stage, the values of |Δu[n]/Ts| were determined. It was found that only for step changes in u they reach high values. In the remaining cases, |Δu[n]/Ts | did not exceed 2.5 V/s. The modal values of the input fuzzy sets were assumed to be equal to: |u′|1 = 0, |u′|2 = 1.25, |u′|3 = 2.5. Then, for the measurement data obtained for the first interval, i.e., from time t0 to t1, the parameters of the first-order IIR filter with Equation (2) and the adaptive fuzzy filter were selected. The results of the parameter selection of both filters are presented in Figure 7 and Figure 8.
Based on the research, it was found that in the case of the uEM course, for the time interval from t0 to t1, the value of parameter a of the first-order IIR filter with Equation (2), for which the lowest value of criterion (14) was obtained, is 0.475. On the other hand, the minimization of MSE for the adaptive fuzzy filter for the same time interval, with b3 = 1 assumed, for the modal values of the output fuzzy sets with symmetrical distribution b1 = 0.067 and b2 = 0.5335 and with asymmetry b1 = 0.073 and b2 = 0.443 were obtained. Then, the signal processing was performed for both filters in the remaining time intervals and for the entire operation time of the control system. The results are summarized in Table 1 and presented in Figure 9.
As shown by the results presented in Table 1 and Figure 9, the use of an adaptive fuzzy filter gives much better results in terms of the SME criterion compared to the first-order IIR filter, both in the considered ranges and for the entire recording time, regardless of the fuzzy model used (model with a symmetric or asymmetric output structure). However, using a filter with a fuzzy model with an asymmetric output results in slightly lower MSE values than in the case of using a fuzzy model with a symmetric structure.
A fragment of the waveforms from Figure 6 in the case of using a first-order IIR filter for two different parameters a and the signal obtained using an adaptive fuzzy filter with a symmetric structure and an asymmetric model output with parameters selected using the criterion (14) are shown in Figure 10.
Figure 11 shows the waveforms of the reference signal uref at the outputs of the first-order IIR filters uEF and the fuzzy filter uEFF against the background of the measurement signal uEM. The input signal of the fuzzy model |Δu[n]/Ts| and the resulting changes in the instantaneous values of parameter b of the adaptive fuzzy filter are shown in Figure 12.
The model residuals determined for the entire operating range of the control system for the two considered digital low-pass filtration algorithms are shown in Figure 13.

4. Discussion

The results presented in Figure 7, Figure 10 and Figure 11 show significant convergence of the reference signal uref with the measured data uE. As shown by the least squares estimation results, the relationship uE = f(u), describing the static characteristic of the final control element, is a linear function. Therefore, it is reasonable to assume that in the case of linearization of the final control element, the relationship between the useful and control signals u can be used to select filter parameters. This allows the introduction of the reference signal uref based on relationship (13).
The filter parameters: The first-order IIR and the adaptive fuzzy filter with a symmetric structure and an asymmetric output model were used for signal processing during the remaining operation time of this system. For this first range, the value of criterion (14) obtained with the well-defined parameters of the adaptive fuzzy filter with an asymmetric output was nearly 1.75 times lower than the result obtained using a first-order IIR filter with the optimal MSE parameter. In this range, a slightly worse MSE result was obtained with respect to the adaptive fuzzy filter with an asymmetric output. Based on a comparative analysis of the results summarized in Table 1 it can be concluded that the use of an adaptive fuzzy filter produces significantly better results than the use of a first-order IIR filter. This conclusion is valid for both the adaptive filter with a symmetric structure and the model with an asymmetric output. The values of criterion (14) for the control system operating ranges: t2t3, t4t5 and t6t7 determined using an adaptive fuzzy filter are several times (from 5.5 to 7.9) lower than the corresponding results obtained using a first-order IIR filter with a = 0.475. The use of the entire operating time of the control system also showed that the signal-processing algorithm using fuzzy logic allows for the separation of the useful component from the noisy signal to a much better extent than the first-order IIR filter. For the entire operating period of the control system, the value of criterion (14), determined using an adaptive fuzzy filter with an asymmetric output model, was 10.50, nearly three times lower than the result obtained for the classic filter with Equation (2). Using a fuzzy filter with a symmetric structure, the results were similar, although slightly worse, with an MSE of 10.63. Using a visualization test, it can also be concluded that the adaptive fuzzy filter is a better solution for processing the signal from the voltage sensor (2, Figure 4) than the classic first-order IIR filter. As can be seen in Figure 10a, the IIR filter with the optimal parameter in the MSE sense has good dynamic properties, but it suppresses the fast-changing component of noise to an unsatisfactory degree. In contrast, the signal at the output of the first-order IIR filter with a = 0.890, shown in Figure 10b, at moments of slight changes in the time of the uEM signal (from 145 s to 150 s and from 175 s to 190 s), demonstrates effective noise suppression, comparable to the effect obtained when using a fuzzy filter (Figure 10c,d). Based on the visualization test, it can be concluded that for the waveforms from Figure 10b, at moments of significant changes in the time of the uE signal, a large dynamic error occurs and a significant phase shift in the uEF signal relative to the reference signal is noticeable. This defect does not occur in the case of the fuzzy filter, because the signal at the output of this filter demonstrates significant convergence with the reference signal throughout the entire period of the system operation (Figure 10c). Figure 13 shows the residuals obtained using a first-order IIR filter (Figure 13a), a fuzzy filter with a symmetric structure (Figure 13b), and an asymmetric output model (Figure 13c). The standard deviations and mean values of the residuals in both cases are 4.51 V and 0.03 V, 6.95 V and 0.02 V, and 6.97 V and 0.04 V, respectively. The value of the variance of the standard deviation of the residuals is therefore more than twice, or one and a half times, higher in the case of using the fuzzy filter, while the mean values are similar and close to zero for both digital signal-processing algorithms. Combined with the results in the form of criterion (14), this clearly indicates that the use of an adaptive fuzzy filter for processing the signal from the RMS voltage sensor supplied to the input of the heating element is a significantly better solution than the use of a classic first-order IIR filter. It should be noted, however, that a disadvantage of the adaptive fuzzy filter is that, for a given value of b, the frequency characteristics have the same signal attenuation in the stopband as a first-order IIR filter. A significant limitation of the proposed method for selecting adaptive fuzzy filter parameters, which uses a reference signal generated by a PI controller, is the need to tune the filter at a constant effective value of the mains voltage. The requirement for constant mains voltage may complicate the process of selecting fuzzy filter model parameters in industrial environments, where heavy, direct starting of induction motors occurs. It should also be noted that the adaptive filter form can only be achieved for systems with a controller without a derivative term.

5. Conclusions

In automatic temperature control systems, it is often important to monitor the signal fed to the input of the controlled object. In industrial environments, measurement of such a quantity is performed using a sensor. The sensor’s output signal, with values consistent with a specific standard, is usually significantly affected by noise. In such a situation, separating the useful component from the measurement signal requires the use of a filter that operates well in the time domain, exhibits satisfactory dynamic properties while maintaining an appropriate level of accuracy. For the tested automatic temperature control system (Figure 3) with a PI controller, an adaptive fuzzy filter with a parameter dependent on the modulus of the derivative of the measured signal was used to process the signal from the RMS voltage sensor uEM, fed to the input of the heating element. The innovation employed involves using the control signal u, developed by the PI controller, to determine the time derivative of the measured quantity uEM, and applying a fuzzy model with only three fuzzy sets to change the parameter of a simple first-order IIR filter depending on the modulus of the time derivative of the measured quantity. It was demonstrated that in a control system with a linearized final control element with static object properties, the signal generated by a PI controller can be used to determine the time derivative of the output signal. The proposed procedure was found to be computationally advantageous and applicable to practical applications. This eliminates all difficulties in determining the current derivative of the EM signal, observed discretely and affected by noise. Based on experiments conducted on a test stand, it was found that the proposed adaptive fuzzy filter exhibits good dynamic properties while maintaining an appropriate level of accuracy. This observation is confirmed by a comparative analysis of the results obtained using the fuzzy model filtering algorithm and a classic first-order IIR filter. The results, in the form of criterion values (14), and an evaluation of the obtained residuals allow us to conclude that the adaptive fuzzy filter provides significantly better results in processing the signal fed to the object’s input in the considered temperature control system (with a PI controller) compared to the classic first-order IIR filter. It was shown that, compared to the classical first-order IIR filter, the improvement of dynamic properties is achieved by introducing a simple fuzzy model b = f(|Δu/Ts|) with a symmetric input and output structure or a modified fuzzy model with asymmetry resulting from the uneven distribution of modal values of singleton fuzzy sets at the output in the low-pass filtering algorithm (2). It was found that in the case of the tested control system with a sensor (2, Figure 4), introducing asymmetry in the model output leads to a slightly better reconstruction of the useful component from the noisy uEM signal than using a model with a symmetric structure. This is evidenced by the values of criterion (14) included in Table 1. However, it should be noted that the differences between the MSE values for both models are small. Due to the fact that the process of designing an adaptive fuzzy filter with a symmetric structure is simpler (selection of one parameter b1) compared to a fuzzy filter with an asymmetric output model (selection of two parameters b1 and b2), the use of a fuzzy model with a symmetric structure may be a sufficient solution.
The proposed adaptive fuzzy filter solution for real-time processing of the signal from the uE sensor in a control system is computationally advantageous and may gain acceptance in industrial solutions using PLCs. It should be noted that the process of selecting adaptive filter parameters requires the RMS value of the mains voltage to be constant over time, regardless of the model structure (symmetrical or asymmetrical output). This is particularly important in industrial environments. Further research is planned to employ more complex filters with different membership functions and other digital filters, both FIR and IIR, and to compare their performance to filters with more complex algorithms, such as the Kalman filter.

Author Contributions

Conceptualization, J.J., A.R. (Aurelia Rybak) and A.R. (Aleksandra Rybak); Methodology, J.J.; Software, J.J.; Validation, J.J.; Formal analysis, J.J.; Writing—original draft, J.J., A.R. (Aurelia Rybak) and A.R. (Aleksandra Rybak); Visualization, A.R. (Aurelia Rybak) and A.R. (Aleksandra Rybak); Funding acquisition, A.R. (Aurelia Rybak). All authors have read and agreed to the published version of the manuscript.

Funding

The work was elaborated in the framework of the statutory research 06/010/BK_25.

Data Availability Statement

The data presented in this study are available on request from the corresponding author due to privacy.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Sagdatullin, A. Improving automation control systems and advantages of the new fuzzy logic approach to object real-time process operation. In Proceedings of the 2019 1st International Conference on Control Systems, Mathematical Modelling, Automation and Energy Efficiency (SUMMA), Lipetsk, Russia, 20–22 November 2019; IEEE: Piscataway, NJ, USA; pp. 256–260. [Google Scholar]
  2. De Silva, C.W. Intelligent Control: Fuzzy Logic Applications; CRC Press: Boca Raton, FL, USA, 2018. [Google Scholar]
  3. van der Wal, A.J. Application of fuzzy logic control in industry. Fuzzy Sets Syst. 1995, 74, 33–41. [Google Scholar] [CrossRef]
  4. Juuso, E.K. Fuzzy control in process industry: The linguistic equation approach. In Fuzzy Algorithms for Control; Springer: Dordrecht, The Netherlands, 1999; pp. 243–300. [Google Scholar]
  5. Zapała, W. Seminar on Electrification and Automation of Mines; Silesian University of Technology Publishing House: Gliwice, Poland, 1994. (In Polish) [Google Scholar]
  6. Smith, S.W. Digital Signal Processing: A Practical Guide for Engineers and Scientsts; Elsevier Science: Burlington, VT, USA, 2003. [Google Scholar]
  7. Hermanowicz, E. Estimation of samples of the derivative of a signal based on the signal difference derivative. In Proceedings of the ICECS 2001 8th IEEE International Conference on Electronics, Circuits and Systems (Cat. No. 01EX483), St. Julian’s, Malta, 2–5 September 2001; IEEE: Piscataway, NJ, USA; Volume 1, pp. 63–66. [Google Scholar]
  8. Smékal, Z. Difference equations with forward and backward differences and their usage in digital signal processor algorithms. Radioengineering 2006, 15, 45. [Google Scholar]
  9. Sundararajan, D. The Laplace Transform. In Signals and Systems: A Practical Approach; Springer Nature: Cham, Switzerland, 2022; pp. 331–375. [Google Scholar]
  10. Luo, J.; Ying, K.; He, P.; Bai, J. Properties of Savitzky–Golay digital differentiators. Digit Signal Process. 2005, 15, 122–136. [Google Scholar] [CrossRef]
  11. Mishra, D.; Nayak, P.C.; Prusty, R.C.; Panda, S. An improved equilibrium optimization-based fuzzy tilted double integral derivative with filter (F-TIDF-2) controller for frequency regulation of an off-grid microgrid. Electr. Eng. 2024, 106, 2033–2055. [Google Scholar] [CrossRef]
  12. Gheisarnejad, M.; Khooban, M.H. Design an optimal fuzzy fractional proportional integral derivative controller with derivative filter for load frequency control in power systems. Trans. Inst. Meas. Control 2019, 41, 2563–2581. [Google Scholar] [CrossRef]
  13. Hosseini, R.; Mashayekhi Fard, J.; Soltani, S. Active filter design and synthesis for hybrid neuro-fuzzy and robust PID controllers. Int. J. Dyn. Control 2024, 12, 3873–3883. [Google Scholar] [CrossRef]
  14. Zadeh, L.A. Fuzzy sets. Inf. Control. 1965, 8, 338–353. [Google Scholar] [CrossRef]
  15. Cara, A.B.; Wagner, C.; Hagras, H.; Pomares, H.; Rojas, I. Multiobjective optimization and comparison of nonsingleton type-1 and singleton interval type-2 fuzzy logic systems. IEEE Trans. Fuzzy Syst. 2012, 21, 459–476. [Google Scholar] [CrossRef]
  16. Piegat, A. Fuzzy Modeling and Control; Academic Publishing House EXIT: Warsow, Poland, 2003. (In Polish) [Google Scholar]
  17. F&F—Domestic and Industrial Automation. Available online: https://www.fif.com.pl/en/io-extension-modules/424-analog-transmitter-av-1i.html (accessed on 10 December 2024).
  18. Mayne, D.Q.; Firoozan, F. Linear Identification of ARMA Processes. Automatica 1982, 18, 461–466. [Google Scholar] [CrossRef]
  19. Akaike, H. A new look at the statistical model identification. IEEE Trans. Autom. Control 1974, AC-19, 716–723. [Google Scholar] [CrossRef]
Figure 2. Block diagram of a control system with an adaptive fuzzy filter (red color) used to monitor the input signal of the control object.
Figure 2. Block diagram of a control system with an adaptive fuzzy filter (red color) used to monitor the input signal of the control object.
Symmetry 17 01774 g002
Figure 3. Membership functions of fuzzy sets (a) inputs and (b) outputs of the fuzzy dependency model (8).
Figure 3. Membership functions of fuzzy sets (a) inputs and (b) outputs of the fuzzy dependency model (8).
Symmetry 17 01774 g003
Figure 5. Example results of linearization with an actuator in the form of a relay (4, Figure 4). (a) uEM waveform at the output of the SSR relay as a result of the excitation u (b) static characteristic, blue points—measurement data, yellow line—linear function approximation.
Figure 5. Example results of linearization with an actuator in the form of a relay (4, Figure 4). (a) uEM waveform at the output of the SSR relay as a result of the excitation u (b) static characteristic, blue points—measurement data, yellow line—linear function approximation.
Symmetry 17 01774 g005
Figure 6. Courses of the setpoint value r, the controlled signal (temperature) y, the control signal u and the effective voltage value uEM at the output of the F&F AC-1I sensor.
Figure 6. Courses of the setpoint value r, the controlled signal (temperature) y, the control signal u and the effective voltage value uEM at the output of the F&F AC-1I sensor.
Symmetry 17 01774 g006
Figure 7. Waveforms of the reference signal uref and the signals at the filter output against the background of the measurement data uEM (a,c,e) and dependencies of the mean square error on the filter parameters (b,d,f) determined for the first-order IIR filter (a,b), the adaptive fuzzy filter (c,d) with a symmetric structure model and an asymmetric output model (e,f), red points—optimal filter parameter(s) (minimum criterion (14)).
Figure 7. Waveforms of the reference signal uref and the signals at the filter output against the background of the measurement data uEM (a,c,e) and dependencies of the mean square error on the filter parameters (b,d,f) determined for the first-order IIR filter (a,b), the adaptive fuzzy filter (c,d) with a symmetric structure model and an asymmetric output model (e,f), red points—optimal filter parameter(s) (minimum criterion (14)).
Symmetry 17 01774 g007aSymmetry 17 01774 g007b
Figure 8. Waveforms of the time derivative modulus of the control signal |Δu/Ts| (a,c) and the continuously determined fuzzy filter parameter (b,d) with a symmetric structure (a,b) and an asymmetric model output (c,d).
Figure 8. Waveforms of the time derivative modulus of the control signal |Δu/Ts| (a,c) and the continuously determined fuzzy filter parameter (b,d) with a symmetric structure (a,b) and an asymmetric model output (c,d).
Symmetry 17 01774 g008
Figure 9. Criterion values (14) obtained for the first-order IIR filter (1) and an adaptive fuzzy filter with a symmetric structure (2) and an asymmetric model output for processing the signal from the RMS voltage sensor, determined for individual time intervals and the entire operating period of the control system.
Figure 9. Criterion values (14) obtained for the first-order IIR filter (1) and an adaptive fuzzy filter with a symmetric structure (2) and an asymmetric model output for processing the signal from the RMS voltage sensor, determined for individual time intervals and the entire operating period of the control system.
Symmetry 17 01774 g009
Figure 10. The signal at the output of the first-order IIR filter with parameters: a = 0.475 (a) and a = 0.890 (b) compared to the results of filtering the signal from the electric voltage sensor using an adaptive fuzzy filter with a symmetric structure (c) and with an asymmetric model output (d).
Figure 10. The signal at the output of the first-order IIR filter with parameters: a = 0.475 (a) and a = 0.890 (b) compared to the results of filtering the signal from the electric voltage sensor using an adaptive fuzzy filter with a symmetric structure (c) and with an asymmetric model output (d).
Symmetry 17 01774 g010
Figure 11. The uref, uEF and uEFF waveforms against the background of the u EM measurement data in the case of using a first-order IIR filter (a) and an adaptive fuzzy filter with a symmetric structure (b) and with an asymmetric model output (c), and parameters selected in the time range from 0 to 300 s based on the criterion (14) for the remaining operating period of the control system from Figure 4.
Figure 11. The uref, uEF and uEFF waveforms against the background of the u EM measurement data in the case of using a first-order IIR filter (a) and an adaptive fuzzy filter with a symmetric structure (b) and with an asymmetric model output (c), and parameters selected in the time range from 0 to 300 s based on the criterion (14) for the remaining operating period of the control system from Figure 4.
Symmetry 17 01774 g011aSymmetry 17 01774 g011b
Figure 12. Time derivative modulus of the control signal |Δu/Ts| (a) and the fuzzy filter parameter determined in real time, with a symmetric structure (b) and with an asymmetric output model (c).
Figure 12. Time derivative modulus of the control signal |Δu/Ts| (a) and the fuzzy filter parameter determined in real time, with a symmetric structure (b) and with an asymmetric output model (c).
Symmetry 17 01774 g012
Figure 13. Residuals ε obtained using the first-order IIR filters (a) and the adaptive fuzzy filter with a symmetric structure (b) and with an asymmetric output model (c).
Figure 13. Residuals ε obtained using the first-order IIR filters (a) and the adaptive fuzzy filter with a symmetric structure (b) and with an asymmetric output model (c).
Symmetry 17 01774 g013
Table 1. Test results of the use of a first-order IIR filter and an adaptive fuzzy filter to process the signal from an RMS voltage sensor.
Table 1. Test results of the use of a first-order IIR filter and an adaptive fuzzy filter to process the signal from an RMS voltage sensor.
IIR Filter with Equation (2)Adaptive Fuzzy Filter
With a Symmetrical StructureWith a Model with an Asymmetric Output
Rangea = 0.475b1 = 0.067; b2 = 0.5335; b3 = 1.000b1 = 0.073; b2 = 0.443; b3 = 1.000
MSEMSEMSE
t0t142.2524.2324.17
t2t329.785.114.90
t4t516.472.972.89
t6t746.225.885.97
t0t729.7310.6310.50
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Joostberens, J.; Rybak, A.; Rybak, A. Processing the Sensor Signal in a PI Control System Using an Adaptive Filter Based on Fuzzy Logic. Symmetry 2025, 17, 1774. https://doi.org/10.3390/sym17101774

AMA Style

Joostberens J, Rybak A, Rybak A. Processing the Sensor Signal in a PI Control System Using an Adaptive Filter Based on Fuzzy Logic. Symmetry. 2025; 17(10):1774. https://doi.org/10.3390/sym17101774

Chicago/Turabian Style

Joostberens, Jarosław, Aurelia Rybak, and Aleksandra Rybak. 2025. "Processing the Sensor Signal in a PI Control System Using an Adaptive Filter Based on Fuzzy Logic" Symmetry 17, no. 10: 1774. https://doi.org/10.3390/sym17101774

APA Style

Joostberens, J., Rybak, A., & Rybak, A. (2025). Processing the Sensor Signal in a PI Control System Using an Adaptive Filter Based on Fuzzy Logic. Symmetry, 17(10), 1774. https://doi.org/10.3390/sym17101774

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop