# PI or PID-regulator for control system with hysteresis relay in inner loop

I have such control system (sorry for rough drawing :) )

$$G(s)$$ - stable object with proper transfer function. $$1/s$$ - integrator.

I need to clarify, how synthesized PI or PID controller for such object, that include inner-loop with hysteresis-relay regulator.

Is there some mathematical background?

• One way, which is "cheating" mathematically speaking, is to superimpose an additional fixed "dither" signal (such as a sinusoid, square, or triangle wave) into the inner loop, with amplitude slightly bigger than the hysteresis, and frequency high enough that this additional signal is attenuated into Y to an acceptable degree. Precision solenoid valve controls do exactly this. The hysteresis is in the magnetics, and possibly in the sticking of the valve parts. Aug 29, 2021 at 22:54
• Alternatively, to controlling directly, you would need to measure the inner loop and add gain and compensation to that loop. For example, in the case of a solenoid valve, high frequency magnetic field sensors are now available (though in my work so far, this was not necessary). Besides that, I don't know whether observers are ever used to estimate the state variable associated with the hysteresis, but it should be an easy search. Background reading would be nonlinear control. Aug 29, 2021 at 22:57
• @PeteW In books on the theory of nonlinear control, I have not come across the synthesis of a pi-controller for a nonlinear system. As for the application, such systems are found in various applications, for example, in a system with a electric motors. It seems to me that there should be some generalized approach. What you suggested - can you demonstrate by the example of choosing the parameters of the PI-controller?
– dtn
Aug 30, 2021 at 3:07
• Is the inner loop, an (variable frequency) oscillator? If so, what is it's oscillation frequency range amd what is the bandwidth of the outer loop? You may be able to treat it as a PWM modulator depending on the situation.
– AJN
Aug 30, 2021 at 12:35
• I may have a similar system (PID), controlling temperature with a heating element and a fan. I ended up in four sets of PID, (heating, cooling) x (region 1 (outside the hysteresis), and region 2). Meantime, in order to smooth the hysteresis, moved the cooling area (don't know how to describe it) to overlap with heating. I had to use similar approach for a steam & cooling water operated large (1/S) capacity system.
– jay
Aug 30, 2021 at 21:31