The operating principle of the PID regulator. Thermal controller with PID regulation for peaceful economic purposes. What is a PID controller

PID (from the English P-proportional, I-integral, D-derivative) - a regulator is a device used in control loops equipped with a feedback link. These regulators are used to generate a control signal in automatic systems where it is necessary to achieve high requirements for the quality and accuracy of transient processes.

The control signal of the PID controller is obtained by adding three components: the first is proportional to the magnitude of the error signal, the second is proportional to the integral of the error signal, and the third is its derivative. If any of these three components is not included in the addition process, then the controller will no longer be a PID, but simply proportional, proportional-differentiating, or proportional-integrating.

The first component is proportional

The output signal is given by a proportional component. This signal leads to counteracting the current deviation of the input value to be regulated from the set value. The greater the deviation, the greater the signal. When the input value of the controlled variable is equal to the specified value, the output signal becomes zero.

If you leave only this proportional component and use only it, then the value of the quantity to be controlled will never stabilize at the correct value. There is always a static error equal to such a deviation value of the controlled variable that the output signal stabilizes at this value.

For example, a thermostat controls the power of a heating device. The output signal decreases as the desired object temperature approaches, and the control signal stabilizes the power at the level of heat loss. As a result, the temperature will never reach the set value, because the heating device will simply have to be turned off and begin to cool down (the power is zero).

A larger gain between the input and output means a smaller static error, but if the gain (essentially a proportionality coefficient) is too large, then if there are delays in the system (and they are often inevitable), self-oscillations will soon begin in it, and if you increase the coefficient is even greater - the system will simply lose stability.

Or an example of positioning a motor with a gearbox. If the coefficient is small, the desired position of the working element is achieved too slowly. Increase the coefficient - the reaction will be faster. But if you increase the coefficient further, the motor will “overshoot” the correct position, and the system will not quickly move to the required position, as one would expect. If we now increase the proportionality coefficient further, then oscillations will begin around the desired point - the result will not be achieved again...

The second component is integrating

The time integral of the mismatch value is the main part of the integrating component. It is proportional to this integral. The integrating component is used precisely to eliminate the static error, since the controller takes into account the static error over time.

In the absence of external disturbances, after some time the quantity to be controlled will be stabilized at the correct value, when the proportional component is equal to zero, and the accuracy of the output will be entirely ensured by the integrating component. But the integrating component can also generate oscillations around the positioning point if the coefficient is not selected correctly.

The third component is differentiating

The rate of change in the deviation of the value to be regulated is proportional to the third component - the differentiating component. It is necessary to counteract deviations (caused by external influences or delays) from the correct position predicted in the future.

As you already understood, PID controllers are used to maintain a given value x0 of some one value by changing the value u of another value. There is a setpoint or given value x0, and there is a difference or discrepancy (mismatch) e = x0-x. If the system is linear and stationary (in practice this is hardly possible), then the following formulas are valid for specifying u:

In this formula you see the coefficients of proportionality for each of the three terms.

In practice, PID controllers use a different formula for tuning, where the gain is applied to all components at once:

The practical side of PID control

In practice, theoretical analysis of PID-controlled systems is rarely used. The difficulty is that the characteristics of the control object are unknown, and the system is almost always nonstationary and nonlinear.

Really working PID controllers always have a limitation of the operating range from below and above, this fundamentally explains their nonlinearity. Setting is therefore almost always and everywhere done experimentally, when the control object is connected to the control system.

The use of a value generated by a software control algorithm has a number of specific nuances. If we are talking, for example, about temperature control, then often not one, but two devices are required: the first controls heating, the second controls cooling. The first supplies heated coolant, the second - refrigerant. Three practical solutions can be considered.

The first is close to the theoretical description, when the output is an analog and continuous value. The second is an output in the form of a set of pulses, for example to control a stepper motor. The third is when the output from the regulator is used to set the pulse width.

Today, almost all automation systems are built, and PID controllers are special modules added to the control controller or generally implemented in software by loading libraries. To correctly configure the gains in such controllers, their developers provide special software.

Andrey Povny

). Now, as promised, we will consider the basic methods for tuning and selecting its coefficients) In general, by and large, when using a PID controller, it is necessary to build a model of the entire system as a whole and mathematically calculate the required values ​​of the coefficients. This is the right thing to do. But, naturally, no one does this 😉 In fact, the mathematical calculation of coefficients is far from a trivial task; it requires deep knowledge of the theory of automatic control, which is why other, simplified adjustment methods are used.

The most commonly used coefficient adjustment method is the Ziegler-Nichols method. It consists of the following...

Ziegler-Nichols method.

Actually, this is where the practical part of the method ends) From the obtained coefficient we calculate the proportional coefficient of the PID controller:

And from it we get the rest:

The method is quite simple, but it is not always possible to apply it. To be honest, I have never had to configure the regulator in this way 😉 But nevertheless, this method is the main one and, by and large, the only widely known one. It’s just not suitable for everyone and not always.

What to do if the Ziegler-Nichols method did not work? This is where the “analytical” tuning method comes to the rescue =)

Again, we reset all coefficients and begin to increase the proportional one. But now we don’t wait for oscillations to appear, but simply record the behavior of the system for each value of the coefficient (an excellent option would be to build a graph of the value that needs to be stabilized for each value of the coefficient). If we see that, for example, the system very slowly reaches the desired value, we increase the proportional coefficient. Does the system begin to fluctuate greatly relative to the desired value? This means that the coefficient is too high, we reduce it and move on to setting up other components.

By understanding how the PID controller works as a whole, and imagining how the system being tuned should work, you can quickly and accurately tune the controller's coefficients. Especially if it is possible to build graphical dependencies and visually monitor the behavior of the system.

Here are some rules that can help with setup:

  • An increase in the proportional coefficient leads to an increase in performance, but a decrease in system stability
  • Increasing the differential component also leads to a significant increase in performance
  • The differential component is designed to eliminate damped oscillations that occur when using only the proportional component
  • The integral component must eliminate the residual mismatch of the system with the proportional and differential components configured

By the way, it is worth adding that it is not always necessary to use all three components of the PID controller; sometimes proportional and differential are enough, for example (PD controller). What it all comes down to is that each system requires its own approach when configuring and using a PID controller.

That’s all for today, perhaps someday we’ll look at the practical implementation of a PID controller 😉

You need to keep the temperature at a certain level and change the task. There is a microcontroller to which a temperature meter is attached, and a triac for power control. Let’s not worry about TAU ​​or anything, we’ll just take it and make a “head-on” PID controller.

II. Theoretical introduction

How is a PID controller made? We take the difference between the current temperature and the desired one, multiply it by an adjustable coefficient, and get the power that needs to be output at the moment. This is a proportional component, it works at the moment a mismatch appears - that is, it instantly responds both to a change in the setpoint and to the behavior of the object. Starting to warm up? The power begins to subside. Overheated? It turned off, or even gave a cooling signal. Everything is fine, but in real life the effect of the influence appears with a delay, and the object is influenced not only by us, but also by the environment: the heated reactor is not only hot inside, but also cools down, giving off heat to the room, and therefore as soon as we turn it off power, it immediately begins to cool down. Therefore, a pure proportional controller oscillates around the maintenance point, and oscillates more strongly the higher the exposure to the environment/reactor contents.

To compensate for “external” influences on the reactor, an integral component is added to the circuit. All the mismatch that was in the system goes to the integrator (accordingly, as soon as we overheat, the amount decreases, while it is underheated, the amount increases). And the accumulated integral, with its coefficient, gives its own increase or decrease in power. As a result of this approach, with a stationary process, after some time the integral selects such a contribution to the sum with power that compensates for the loss of the environment, and the oscillations disappear - the integral becomes stable, so the amount of output power becomes constant. Moreover, since the required temperature is maintained, there is no mismatch, the proportional component does not work at all.

To compensate for the effect of delays between the impact and the system response, a differential component is added to the system. It’s just that a proportional regulator provides power all the time until the temperature reaches the desired point; a proportional-differential regulator begins to reduce the supplied power before it reaches the desired point - since the mismatch decreases, there is a negative derivative that reduces the effect. This minimizes overheating during large transitions.

So, we’ve sorted out the physical meaning, let’s move on to the basic issues of implementation.

III. Who should use the regulator?

- Technicians.

What follows from this? It follows from this that the technicians understand the physical component and have experience in setting up hardware PID regulators. This means that software implementation should be based on the ease of setup by technicians - repeating the physical model. And this is extremely important! Very often, in order to simplify the code, the coefficients are changed, for example, to their inverses - to get rid of division. As a result, tuning becomes a hell and a nightmare, requiring experience in tuning that particular regulator rather than understanding the process. From here we get that our coefficients - the constant of integration and the constant of differentiation - must have the dimension of time, that is, be specified in seconds, and not in “1/s”, as they like to do.

IV. Functioning area.

We are trying to make a universal regulator, which means it should work both on small, fast objects and on powerful, huge furnaces. This means that we should assume that the regulated temperature is generally limited by the meter. The most commonly used are XA(K) and XK(L). Their range of applicability is somewhere up to 1200°C. Cooling requires more complex equipment (cryostats), control of additional cooling (fans and openable doors of heating cabinets) is also rarely required - which means we exclude it from consideration for now. We get that the controlled temperature is from ~15°C to ~1200°C, only the power supply is controlled.

The accuracy of control is determined, firstly, by the accuracy of measurement: calibration tables are given in 0.1 degrees; The linearity within the tables is, in principle, decent, so the accuracy is limited primarily by the amplifier and current meter. In my case, I wanted to achieve an accuracy of maintaining 0.1 degrees, so the meter is set to 1/32 degrees: this gives ~3 quanta per 0.1 degree, thus, having the normal “noise” of regulation +-1 quanta, we remain within the same 0.1 degrees. Using 1/32 allows you to work with a fixed point - 5 bits = fractional part, the rest is integer. In 16 bits this can be represented from 0 to 2047 °. Instead of working with negative numbers, we will work in Kelvins instead of Celsius, thus - representing 0 to 2047 °K, which is equivalent to -273 to 1775 °C; in increments of 0.03125°.

V. Adjustability range.

To control a microreactor with a powerful power plant, it may turn out that 1% of the power is enough to heat it by 10 degrees, while for a large inert furnace, 100% of the heating power is barely enough to heat it by a degree. (In real life, it looks like this - there are several manually controlled heaters - they are turned on by a separate switch and produce initial heating, then the thermostat maintains the operating point, controlling another heater, which at full power produces a maximum of +10°C to that , that heated up constantly). Based on this, it is logical to assume that the limiting proportionality coefficient is 100% power per 1 degree. It doesn't make sense anymore since we want 0.1 degree controllability. For simplicity, I took the minimum inverse - 1% power per 100 degrees.

The ranges of time coefficients are calculated simply based on our operating conditions of the regulator. Since we control the power of the triac by calculating the delay of the turn-on moment after passing through 0, the maximum operating frequency of the regulator is 50Hz. If we are sure that we control the power, which does not matter plus or minus, we can work at 100Hz, but this is not always the case, and therefore it is better to dose an equal amount of both positive and negative half-waves each time. To make life easier, I reduced the operating time to 25Hz, thereby any calculated impact will act for 4 half-waves, and during this time I will be able to calculate a new impact.

Thus, the time constants are set every 1/25 sec, from 0 to ~2000 sec (2000*25 = 50000, just fits into 16 bits).

Well, we also have a minimum and maximum power limit, from 0 to 100%.

VI. Power management.

From this moment on, all theoretical calculations end, and bitter practice begins, tied to a specific implementation.

So, we have already decided that we control the delay in opening the triac after passing through 0. Thus, a delay of 0 means 100% power, infinite delay = 0% power.

Question: with what accuracy do we Can manage power? In general, with the accuracy of our timer. On the other hand, how much power is needed? We calculate what % of power needs to be supplied for 0.04 seconds. In principle, according to experience, power control even with an accuracy of 1% at a frequency of 0.1 sec is enough to maintain a temperature of 1 degree. Our control is 0.04 seconds (2.5 times faster). Therefore, it was decided to calculate the power table at 1/250th of the maximum (in 0.4% increments). This allows the table to be not very large (500 bytes), and at the same time have an accuracy above 1%. If your case requires greater accuracy, it is not so difficult to recalculate.

Now let's talk about calculating this table itself. Firstly, it should be taken into account that there is moment when the zero crossing signal is triggered. In my case - 12V. That is, when the input voltage drops below 12V, I will receive a signal passing through 0.

This means that for 100% power, start-up time = 12V travel time.

Let's solve the system of equations

; IntMoment:= 12V ; Max:= sqr(220*sqrt(2)) ; ( Sqr(Sin(Pi/2)*K) = Max ; ( Sqr(Sin(X)*K) = IntMoment ; ; 2*k/MaxCode = 1 - cos(T*Pi) ; cos(T*Pi) = 1-2*k/MaxCode ; T*Pi = arccos(1-2*k/MaxCode) ; T = arccos(1-2*k/MaxCode) / Pi

My processor runs at a frequency of 32786, the PLL is set to 384/2, the half-wave is 100Hz, from which we get that the code for loading a constant into the timer for time T looks like:

65536-(T*(32768*384/2)/100.0 + 773)

We need to calculate the delay time, which gives a uniform increase in the area of ​​the included part of the sinusoid. That is, we need to have timings that give a uniform increase in power. The total power we produce is the integral over the entire sine wave. [who knows how to insert formulas on the hub? no way? I write in maple notation then].

Max = int(sqr(sin(x)), x=0..Pi) int(sqr(sin(x)), x=0..T*Pi) = x/2 - sin(2*x)/ 4 + C | 0..T*PI ​​= (T*Pi)/2 - sin(2*T*Pi)/4 (T*Pi)/2 - sin(2*T*Pi)/4 = Q*Pi/2

Thus, we need to go through all Q with a given accuracy, and find T for each of them.

I solved it for myself in this stupid way:

Perl generator

#!/usr/bin/perl # (T*Pi)/2 - sin(2*T*Pi)/4 = Q*Pi/2 use constant PI => 4 * atan2(1, 1); $T = 1; for($i = 250; $i >= 0; $i--) ( $int = $i*PI/2/250; $ev = ($T*PI)/2-sin(2*$T* PI)/4; while(abs($ev-$int) > 0.0005) ( $T -= 0.0001; $ev = ($T*PI)/2-sin(2*$T*PI)/4; ) #print $i."\t".$T."\n"; $code = 65536-($T*(32768*384/2)/100.0 + 773); ; %04Xh = $i/250 of power\n", $code%256, int($code/256), $code, $i; )

That's it, at the output we received a plate of 250 values ​​corresponding to the timer loading constants until the moment of ignition after receiving a signal about passing through 0 (more precisely, through 12V, as I said above).

VII. Input Data Measurement

I'm skipping this question because it deserves its own long article. How I solved the issue with thermal resistance can be found in the archive of my late blog.

The main thing we need to know is that we measure data with the frequency we need (in this case, 25Hz), and the required accuracy (the output is a number from 0 to 2048 degrees Kelvin in 1/32 degrees). The data is assumed to be already normalized for all further calculations.

If anyone is interested, write in the comments, and next time I’ll describe how this is done for thermocouples.

VIII. Impact calculation

And now it’s happened: we have all the data to finally do what we started it all for: calculate how much power should be supplied to the control element.

Let us recall once again the formula of the PID controller:

U = K * (Err + (1/Ti)*Int + Td*dErr)

  • U- power to be delivered;
  • K- proportional coefficient (note - it is taken out of brackets, I will describe why below);
  • Ti- integration time constant. Please note that the calculations use the reciprocal value;
  • Td- differentiation time constant
  • Err- current mismatch (difference between set point and measured temperature
  • dErr- mismatch derivative (difference between current and previous error)
  • Int- accumulated mismatch integral (the sum of all Err's that we saw)

We again come to the question that was raised in section III: this will be used by technicians. Therefore, it is extremely important to avoid the classic mistake of all implementations - “dimension the coefficients as it turns out.” We do device For driving physical process, which means the model must correspond.

Let's output all dimensions. Partially looking ahead, I have already described in, but now we will reveal in more detail:

  • U- has a value in % of power. Even more precisely - at 2/5 of the % of power, since our table goes through 1/250 of 100%.
  • Err- mismatch, specified in degrees. More precisely - after 1/32 degrees.
  • Int- the integral is the sum of degrees in time - and therefore has the dimension of degree * sec. More precisely - (1/32 degrees)*(1/25 sec)
  • Ti- set after 1/25 sec
  • (1/Ti)*Int- after calculation it gives a contribution having a dimension (1/32 degrees).
  • dErr- derivative, has the dimension of degrees/sec, or more precisely (1/32 degrees)/(1/25 sec)
  • Td- set after 1/25 sec
  • Td*dErr- after the product brings the contribution to the dimension (1/32 degrees)
  • (...) - so, all terms under brackets are reduced to dimension (1/32 degrees)
  • K- agrees U And (...) , which means it has the dimension of percent-per-degree, more precisely (2/5)%/(1/32 degrees)

Now you can clearly see why the proportional coefficient is taken out of brackets - this allows you to leave the differential and int coefficients simply as time constants, as a result, when setting up the operator operates with simple and understandable numbers - percentage per degree for the proportional coefficient and seconds for the integral and differential coefficients.

And thanks to the convenient selection of the position of points and time dimensions, as we will now see, all calculations are carried out almost directly.

Except for one thing - we have the quantity Ti, and for the calculation it is required 1/Ti. A large division operation is very expensive. The multiplication operation is several times cheaper, so we will use the excellent article Division by Invariant Integers using Multiplication. After all, we have K / Ti / Td change extremely rarely, and therefore we can afford to pervert them as much as we like after they change, the main thing is that the main calculation cycle works quickly.

So instead of Ti for calculations we put them into a set Ti_m, Ti_sh1, Ti_sh2; and at each cycle we perform the calculation:
T1 = MULUH(Ti_m, Int) Q = SHR(T1+SHR(Int-T1, Ti_sh1), Ti_sh2)

Now we calculate the bit balance. To do this, let’s write out the full formula step by step:

  1. Eo = E; We need the error to pass. Errors - 16bit
  2. E = Y-X ; We calculate the new mismatch. 16bit
  3. Int = Int + (E+Eo)/2 ; Let's integrate the error. In this case, we calculate the half-sum of the difference (difference scheme). 32bit = 32bit + 16bit
  4. cI = Int * (1/Ti) ; We calculate the integral contribution - 32bit * 32bit => 32bit
  5. cD = Td * (E-Eo) ; We calculate the differential contribution - 16*16 => 32bit
  6. PID = E + cI + cD ; Subpar; 16+32+32 => 32bit
  7. U = K*PID/256 ; Coeff; 32*16/8 bit => 40bit.

For all calculations, the position of the point up to the 7th step remains at the 5th place from the right. At the last moment an interesting feint with the ears occurs. K is set in 1/256, respectively, after multiplication the point is shifted to the left to 5+8=13th place, so we must discard the low-order 8 bits of the result. And the lowest byte of the result is the power we need after 2/5%. This is another reason why the power is leveled in steps of 1/250 - this allows the result to be packed into one byte and the desired result can be easily obtained from the table.

Next, we remember that we are only interested in the power from 0 to 250 - therefore the 7th step of the calculations is very simple, as soon as we get a negative number - we immediately add uMin. As soon as we find out that any high byte is not zero, we immediately add uMax. And only if the power adds up in the range, we check for less uMin or more uMax.

In case anyone is interested:

a complete mess of calculations

; PID control CalcMainEnd: ; Computing, Go-Go. CalcPid: ; 1. Eo = E | 16bit Pid1: MOV Err0H, ErrH MOV Err0L, ErrL ; 2. E = Y-X | 16bit Pid2: CLR C MOV A, SettingL SUBB A, ThermoL MOV ErrL, A MOV A, SettingH SUBB A, ThermoH MOV ErrH, A JNB OV, Pid2Ov JB ACC.7, Pid2Max Pid2Min: MOV ErrL, #LOW(-500* 32) MOV ErrH, #HIGH(-500*32) SJMP Pid2End Pid2Max: MOV ErrL, #LOW(500*32) MOV ErrH, #HIGH(500*32) SJMP Pid2End Pid2Ov: JNB ACC.7, Pid2OvP Pid2OvN: ; Let's check for downward restriction CLR C MOV A, ErrL SUBB A, #LOW(-500*32) MOV A, ErrH SUBB A, #HIGH(-500*32) JNC Pid2End ; If > -500 => everything is ok SJMP Pid2Min Pid2OvP: CLR C MOV A, ErrL SUBB A, #LOW(500*32) MOV A, ErrH SUBB A, #HIGH(500*32) JNC Pid2Max ; If< 500 => everything is ok Pid2End: ; 3. Int = Int + (E+Eo)/2 | 32bit+16bit Pid3: JNB PowerReady, Pid3End ; If there is no network, we do not save the integral part MOV A, ErrL ADD A, Err0L MOV R0, A ; temporarily MOV A, ErrH ADDC A, Err0H MOV C, ACC.7 ; The half-sum always fits into 16 bits, so when shifting it is necessary to preserve the sign of RRC A ; Let us divide without loss of sign XCH A, R0 ; A= low-order part, R0 - high-order half-sum RRC A ; Added JNB IntS, Pid3IntPos; Int is negative, let's change the sign for R0:A, thus it will be possible to simply add with Int CLR C CPL A ADD A, #1 XCH A, R0 CPL A ADDC A, #0 XCH A, R0 Pid3IntPos: ; Int and R0:A now have consistent signs, so we add in the usual way ADD A, IntLL MOV IntLL, A MOV A, IntLH ADDC A, R0 MOV IntLH, A MOV A, R0 JB ACC.7, Pid3Neg ; Did you add a negative difference? 7, Pid5Shift ; If R3<80 -- округление не надо ANL A, #7Fh JZ Pid5Round ; Если = 80 -- округляем до нечетного MOV A, #1 ADD A, R4 MOV R4, A MOV A, R2 ; A=0 ADDC A, R5 MOV R5, A MOV A, R2 ; A=0 ADDC A, R6 MOV R6, A MOV A, R2 ; A=0 ADDC A, R7 MOV R7, A SJMP Pid5Shift Pid5Round: MOV A, R4 ORL A, #01h MOV R4, A ;JMP Pid5Shift Pid5Shift: ; R3:R2:R1:R0 = (Int-R7:R6:R5:R4) > > 1 CLR C MOV A, IntLL SUBB A, R4 MOV R0, A MOV A, IntLH SUBB A, R5 MOV R1, A MOV A, IntHL SUBB A, R6 MOV R2, A MOV A, IntHH SUBB A, R7 RRC A ; >>1 without loss of carry MOV R3, A MOV A, R2 RRC A MOV R2, A MOV A, R1 RRC A MOV R1, A MOV A, R0 RRC A ;MOV R0, A ; R3:R2:R1:R0 += R7:R6:R5:R4 ;MOV A, R0 ADD A, R4 MOV R0, A MOV A, R1 ADDC A, R5 MOV R1, A MOV A, R2 ADDC A, R6 MOV R2, A MOV A, R3 ADDC A, R7 MOV R7, A ; Now move right to sh2.<0 =>Sub ChkDiffN: JNB DiffS, Pid6Sub ; Int<0, Diff>0 => Sub ; Int<0, Diff<0 =>Add Pid6Add: ; Same sign => add them with overflow check MOV A, R0 ADD A, R4 MOV R0, A MOV A, R1 ADDC A, R5 MOV R1, A MOV A, R2 ADDC A, R6 MOV R2, A MOV A, R3 ADDC A, R7 MOV R3, A JNC Pid6Err ; If there is no carry, as a result of the addition there was no overflow MOV R3, #0FFh MOV R2, #0FFh MOV R1, #0FFh MOV R0, #0FFh SJMP Pid6Err Pid6Sub: ; The signs are different - subtract one from the other and check the sign of the result CLR C MOV A, R4 SUBB A, R0 MOV R0, A MOV A, R5 SUBB A, R1 MOV R1, A MOV A, R6 SUBB A, R2 MOV R2, A MOV A, R7 SUBB A, R3 MOV R3, A JNC Pid6Err ; If there is no borrowing, the sign of the result is equal to the sign of DiffS CPL DiffS ; If there was a borrowing, the sign of DiffS and the result must be reversed MOV R6, #0 ; R6=0 MOV A, R0 CPL A ADDC A, R6 ; R6=0, C=1 => action +1 MOV R0, A MOV A, R1 CPL A ADDC A, R6 ; +transfer MOV R1, A MOV A, R2 CPL A ADDC A, R6 MOV R2, A MOV A, R3 CPL A ADDC A, R6 MOV R3, A Pid6Err: MOV R6, #0 ; R6=0 ; In R3:R2:R1:R0 -- lies cI+cD; sum sign in DiffS; you need to add/subtract Err, written in reverse code; Let's reduce the sign of Err to DiffS MOV R4, ErrL MOV A, ErrH JB ACC.7, Pid6ChkDiffS JNB DiffS, Pid6SumErrNoInv ; Err>0, Diff>0 => NoInv SJMP Pid6SumErrInv Pid6ChkDiffS: JNB DiffS, Pid6SumErrNoInv ; Err<0, Diff>0 => NoInv Pid6SumErrInv: ; Err has a different sign from DiffS - invert SETB C ; Not sure about the status C MOV A, ErrL CPL A ADDC A, R6 ; A+=R6+C, R6=0 C=1 => A+=1 MOV R4, A ; R4=ErrL MOV A, ErrH CPL A ADDC A, R6 Pid6SumErrNoInv: MOV R5, A ; ErrH Pid6SumErr: ; So, in R5:R4 lies Err, the sign of which is consistent with DiffS; but in reverse complement code MOV A, R0 ADD A, R4 MOV R0, A MOV A, R5 CLR F0 JNB ACC.7, Pid6SubErrPos SETB F0 MOV R6, #0FFh ; Add a negative => add FFs Pid6SubErrPos: ADDC A, R1 MOV R1, A MOV A, R2 ADDC A, R6 ; +extension MOV R2, A MOV A, R3 ADDC A, R6 ; +extension MOV R3, A MOV R6, #0 ; It is necessary to check whether the sign of the total amount has changed JNC Pid6ChkF0 JB F0, Pid7 ; Err<0, был перенос =>The sign has not changed, there is no overflow SJMP Pid6SumOv ; Err>0, there was a transfer => overflow Pid6ChkF0: JNB F0, Pid7 ; Err>0, no carry => no overflow; SJMP Pid6SumUf ; Err<0, небыло переноса =>the sign has changed Pid6SumUf: ; If Err<0 и небыло переноса =>sign changed CPL DiffS MOV A, R0 CPL A ADD A, #1 ; C=?, so we add 1 using the usual method MOV R0, A MOV A, R1 CPL A ADDC A, R6 MOV R1, A MOV A, R2 CPL A ADDC A, R6 MOV R2, A MOV A, R3 CPL A ADDC A, R6 MOV R3, A SJMP Pid7 ; The sign of the result and DiffS are normalized Pid6SumOv: ; There was an overflow => round to maximum MOV R0, #0FFh MOV R1, #0FFh MOV R2, #0FFh MOV R3, #0FFh ; 7. U = K*PID/256 | 32bit*16bit/8bit => 40bit, ; | which are truncated to 10bit ; | when calculating Pid7: ; R3:R2:R1:R0 contains the result of the PID, DiffS contains its sign; We need to calculate K*PID/256, limiting the result to 10 bits; K is always positive, so if PID< 0 =>minimum JB DiffS, Pid7Umin ; since we can strictly limit the upper limit to 16 bits, ; then if R3 != ​​0 => set the maximum in any case MOV A, R3 JNZ Pid7Umax ;<>= ; we calculate, taking into account that it should turn out R7=0 R6=0, ; otherwise there is overflow, so we don’t touch R7 and R6 at all; but we check the result; R7:R6 = R2*KH MOV A, R2 JZ Pid7S1 MOV A, KH JNZ Pid7Umax ; If R2!=0 and KH!=0 => R7:R6>0 => overflow Pid7S1: ; R6:R5 = R2*KL MOV A, R2 MOV B, KL MUL AB MOV R5, A MOV A, B JNZ Pid7Umax ; If R6 > 0 => overflow; R6:R5 = R1*KH MOV A, R1 MOV B, KH MUL AB ADD A, R5 JC Pid7Umax ; If R6 > 0 => overflow MOV R5, A MOV A, B JNZ Pid7Umax ; If R6 > 0 => overflow; R5:R4 = R0*KH MOV A, R0 MOV B, KH MUL AB MOV R4, A MOV A, R5 ADD A, B JC Pid7Umax ; If R6 > 0 => overflow MOV R5, A ; R5:R4 = R1*KL MOV A, R1 MOV B, KL MUL AB ADD A, R4 MOV R4, A MOV A, R5 ADDC A, B JC Pid7Umax ; If R6 > 0 => overflow MOV R5, A ; R4:R3 = R0*KL MOV A, R0 MOV B, KL MUL AB RLC A ; C = R3>=0x80, Z=R3>0x80 MOV R3, #0FFh ; R3 0x80 => nothing JNZ Pid7S2 MOV R3, #0FEh ; R3==0x80 => round to even Pid7S2: MOV A, R4 ADDC A, B ; Add multiplication, register, and carry-round ANL A, R3 ; And also if rounding to even, we discard the least significant bit MOV R4, A MOV A, R5 ADDC A, R6 ; We've had R6=0 for a long time, even though we didn't add anything there during the multiplication JC Pid7Umax ; If R6 > 0 => overflow MOV R5, A ; R5:R4 => 16-bit limited result; Now we need to limit R5:R4 to Umax/Umin MOV A, UmaxL SUBB A, R4 ; C=0 currently MOV A, UmaxH SUBB A, R5 JC Pid7Umax ; If R5:R4>Umax => R5:R4 = Umax MOV A, UminL SUBB A, R4 ; C=0 currently MOV A, UminH SUBB A, R5 JNC Pid7Umin ; If R5:R4

R5:R4 = Umin ; Power calculated MOV UH, R5 MOV UL, R4 SETB UReady AJMP CalcExit Pid7Umax: ; Set maximum power MOV UH, UmaxH MOV UL, UmaxL SETB UReady AJMP CalcExit Pid7Umin: ; Set minimum power MOV UH, UminH MOV UL, UminL SETB UReady AJMP CalcExit

So we have a calculated impact and our job is to apply it. For this purpose, a general operating cycle operates at a frequency of 50Hz. On the even cycle, measurement and calculation are performed, on the odd cycle, the influence is applied. Thus, the general scheme is obtained: the power is set, measurements and calculations are made through one sinusoid, and a new one is used through another one.

X. Pitfalls.

Compared to the difference scheme, the direct scheme has very few pitfalls, here is a list of those that I saw:
  • Accounting for dimensions. The most important and most common mistake. You can’t just take U=K*(Err+Ki*Int+Kd*Diff), without stipulating WHAT K, Ki, Kd are. And with what accuracy? It is especially important for the coefficient Ki, which has the inverse dimension of time - if the operation is in integers, you CANNOT simply multiply by it - since there must be DIVISION, and the inverse number cannot be represented in integers.
  • Accounting for the sign. The second very important thing is to take into account the sign. All operations must be signed, the integral must accumulate sign - since it not only replaces the proportional component, but also allows it to resist external influences, for example, the release of heat from the mixture itself; and then its sign is negative.
  • Overflow accounting. It is important for us to obtain either the power from 0% to 100%, or the fact that the calculated power is greater than 100% or less than 0%. There is no need to do all the calculations if we get a negative sub-bracket result, for example. But at the same time, it is important to take into account that an overflow may occur during an addition product - and it must be taken into account as “more than 100%”, and in no way should the result be left after the overflow. This is fraught, first of all, with a lack of regulation when required - the object is below the required temperature, and power is not supplied
  • Calculation Time Accounting. The need for large-bit multiplications (with a curved implementation, also divisions) takes time, so it is extremely important to calculate the execution time of the worst-case version of the calculations, and it should be less than the free time between measurements. Failure to do so results in an unmanaged object that “seems to work, but somehow doesn’t work right.”

XI. Conclusions.

As a result, the direct implementation scheme does not have the same problems as it does, but requires more computational costs. However, if implemented correctly, the direct circuit is quite applicable even on cheap 8-bit microcontrollers, and gives more predictable results.

A PID controller is a link in a feedback control loop used to maintain a set value for a measured parameter. The PID controller measures the deviation of the stabilized value from the set value (the so-called set point) and generates a control signal, which is the sum of three terms, the first of which is proportional to this deviation, the second is proportional to the integral of the deviation and the third is proportional to the derivative of the deviation. If some of the constituent terms are not used, then the controller is accordingly called proportional-integral, proportional-derivative, proportional, etc. Figure 2 shows a simplified functional diagram of the PID controller:

Rice. 2. Functional diagram of the PID controller.

E(t) - deviation of the measured value from the setpoint (error);
u(t) is the control action generated by the controller.

Figure 3 shows a more typical representation of a PID controller in the form of a single functional block, which is typical for industrial control systems.

Rice. 3. Simplified representation of the PID controller as a single functional block.

The purpose of the PID controller is to maintain a certain value PV at a given value SP by changing another value OP, where

PV - measured parameter (process value);
SP - specified value of the measured parameter (setpoint);
OP - control action (output);
The difference (SP-PV) is called error or mismatch.

As already said, the output signal OP is determined by three terms:

OP = P + DI + TI = KP * (SP-PV) + KDI * d(SP-PV)/dt + KTI * ?(SP-PV)dt;

Where KP, KDI, KTI are the gain coefficients of the proportional, differential and integral components, respectively. ? - integration sign.

However, in most real systems they use a slightly different formula for the output signal, in which the proportional coefficient is outside the bracket:

OP = Pp * ((SP-PV) + PD * d(SP-PV)/dt + PI * ?(SP-PV)dt),

Where Pp = 1/KP (proportional band); PD = KDI (constant of differentiation); PI = 1/KTI (constant of integration).

Now let's look at the meaning of each component.

Proportional component.

The proportional component seeks to eliminate the direct error (SP-PV) in the value of the stabilized quantity observed at a given time. The value of this component is directly proportional to the deviation of the measured value from the set value (SP-PV). So if the input signal is equal to the setpoint, i.e. PV=SP, then the proportional component is zero.

When using only a proportional controller, the value of the controlled variable in practice is never set at the set value (PVset=SP). There is a so-called static error, which is equal to such a deviation of the controlled variable that provides an output signal that stabilizes the output variable at exactly this value. For example, in a temperature controller, the output signal OP, which regulates the heater power, gradually decreases as the PV temperature approaches the set point SP:

When PV -> SP, OP -> 0.

The system stabilizes at a certain OP value, at which the heater power equals the heat loss. In this case, the temperature cannot reach the set point, since in this case the heater power will become zero (OP=0), and it will begin to cool, and at the same time the temperature will drop.

As the proportionality coefficient (gain) increases, the static error decreases, however, too large a gain can cause self-oscillations, and with a further increase in the coefficient, the system can lose stability and go into overdrive.

Integral component.

To eliminate the static error, an integral component is introduced. It allows the regulator to “learn” from previous experience. If the system does not experience external disturbances, then after some time the controlled variable stabilizes at the set value. During stabilization (PV=SP), the proportional component will be equal to zero, and the output signal will be completely provided by the integral component. At a constant mismatch value (SP-PV), the integral component represents a value that increases linearly with time.

Physically, the integral component represents a delay in the controller’s response to a change in the mismatch value, introducing some inertia into the system, which can be useful for controlling objects with high sensitivity.

Differential component.

The differential component counteracts the expected deviations of the controlled quantity, as if predicting the behavior of the object in the future. These deviations can be provoked by external disturbances or a delay in the regulator’s influence on the system.

The faster the controlled variable deviates from the setpoint, the stronger the reaction created by the differential component. When the mismatch becomes a constant value, the differential component ceases to affect the control signal.

The process of tuning the PID controller mainly consists of setting the setpoint and the values ​​of the above three coefficients. There are several mathematical methods for calculating the optimal coefficients of the PID controller based on ensuring the greatest stability of the system. However, in practice, adjusting the regulator is done empirically (so to speak, “by eye”). Modern automated process control systems often use so-called self-tuning PID controllers, which, by applying a single impact to an object and analyzing the response, automatically set, if not optimal, then fairly good coefficients. Moreover, there are algorithms for adapted PID control that involve automatic adjustment (adjustment) of control coefficients during the control process. With their help, it is possible to achieve a very high quality of control even in highly nonlinear systems, but for some reason, technologists to this day treat this functionality with great suspicion.

Application.

What are PID controllers used for? It's better to explain with an example. Let's say there is an abstract technological process. The water in the container must be heated and maintained at a certain temperature. A gas burner located under the container is used to heat the water. The combustion intensity is regulated by the gas supply valve. Figure 4 shows how this can be done using PID control.

Rice. 4. Example of using a PID controller.

The temperature setpoint is set manually by the operator. The regulator, analyzing the difference between the set point and the temperature sensor reading, generates a signal to control the gas supply control valve to the burner.

As noted, the quality of control strongly depends on the settings of the controller coefficients. Figure 5 shows the behavior of the system when the PID is configured incorrectly.

Rice. 5. Transient process with poor PID controller settings.

Here the operator decided to change the setting. As can be seen from the figure, the regulator is not able to work correctly, and a diverging oscillatory process is observed. The system is clearly not stable.

Figure 6 shows the transient process with the correct controller settings. The operator again changes the temperature setpoint, but this time the regulator operates correctly. Some overshoot is observed, but overall the process converges quickly.

Rice. 6. Transient process with good PID controller settings.

Let's consider complex schemes for using PID controllers.

Cascade control.

Classic example. The furnace heater (burner in our case) has excess power, and the heating object (workpiece) can overheat on the one hand, and remain cold on the other. If such a heating mode is unacceptable, then single-circuit control will no longer be enough. To ensure uniform heating of the object, it is necessary to measure the temperature in two places: next to the heater and in the coldest place. In this case, the controller must contain two PID links connected in series. The first PID element (called the master), whose input is the cold spot temperature, will produce the setpoint value for the second element (called the slave). The temperature near the heater is supplied to the input of the slave link (see Figure 7).

Rice. 7. Example of cascade control.

Such a structure for regulating two using PID controllers connected in series, having two inputs for measurement parameters and one control output, is called cascade. For effective control, the slave PID controller must be faster than the master.

Figure 8 shows another system.

Rice. 8. Another example of cascade regulation.

The temperature inside the jacketed tank is controlled by a cascade. The master PID controller (Tc1) responds to changes in temperature in the tank, but its output is not directly connected to the valve that controls the incoming flow of the heat transfer fluid. Output Tc1 sets the setpoint for the slave controller Tc2, and Tc2, using a valve, regulates the temperature of the heat transfer fluid in the pump circuit. Thus, Tc2 deals with all temperature fluctuations around the pump that can be transmitted from the coolant source.

With such a cascade, all incoming disturbances and temperature fluctuations will be detected and processed by the Tc2 controller before they affect the temperature directly in the tank. Knowing about impending disturbances and oscillations before they directly affect the control object allows the system to take preventive actions. This approach to organizing management is called proactive regulation.

Ratio control.

Sometimes stabilizing the relationship between two or more process variables is more important than stabilizing their absolute values. In such cases, proportional control systems are used.

Typically, the process variables for which a given relationship must be maintained are component flow rates or volume values, which are most typical for combustion processes (for example, directing fuel to burner nozzles). In Figure 9, the amount of fuel in control loop 2 is maintained in the ratio FAC with the amount of air in circuit 1, set by the SP1 setpoint.

Rice. 9. Attitude management.

Attitude management is most often used in the following processes:

1. Mixing two or more streams of substances to produce mixtures of a given chemical composition;
2. Mixing two or more substances to produce mixtures that have specified physical properties;
3. Maintaining a given fuel/air ratio to achieve an optimal combustion process.

Practice

In modern automated process control systems, the PID controller is implemented in the form of a software functional block executed in the controller. Figure 10 shows a PID control block taken from the development environment of a real control system. Please note how many different parameters there are in the block (more than 30). In practice, no more than ten of them require careful configuration.

Rice. 10. PID controller function block configuration.

We list the most important parameters of the block:
1. SP - set value;
2. PV - value of the controlled variable;
3. OP - value of the output signal (control signal);
4. SL - input for setting the setpoint in automatic mode;
5. RemoteSP - input for setting the setpoint in remote mode;
6. Mode - input for setting the operating mode of the regulator;
7. XP - proportional component coefficient;
8. TD - differential component coefficient;
9. TI - integral component coefficient;
10. SL_Track - input to enable tracking mode.

Previously, we examined the first three parameters in detail, so we will not dwell on them. The Mode parameter is very interesting. The fact is that the regulator can operate in at least three modes of setting the setpoint: automatic, remote and manual.

1. Automatic mode is the most commonly used; in this mode, the controller setpoint is set manually by the operator using the SL input.

2. When operating in remote mode, the setpoint is generated programmatically in another functional block and sent to the input of the RemoteSP controller.

3. When operating in manual mode, the operator has the ability to directly set the value of the control signal by manipulating the OP output; in this mode, the controller suspends the formation of the control action OP according to the PID algorithm.

Example. Let's say we have a container of water equipped with a heater. At the moment, the water temperature is maintained at 80 C. In this case, we have:

PV is the current water temperature measured by the sensor;
SP - current setting set by the operator;
OP - heater power control signal;

Let at the moment PV=SP=80 °C, i.e. there is no mismatch. In this case, OP=65% (the heater operates at 65% of its rated power), and the PID controller is in automatic mode. Now, for some reason, the operator decides to switch the controller to manual mode and sets the new value OP=20%. Due to a decrease in heating power, after some time the water temperature drops to 35 °C. Now PV=35 °C, SP=80 °C, OP=20%. Let's imagine what happens if the regulator is switched back to automatic mode. The mismatch will become equal to SP-PV=80-35=45 °C, and, therefore, the proportional component will be equal to XP*45/100. At the moment the controller switches to automatic mode, this value XP*45/100 (together with other components) is transmitted to the OP output and causes an abrupt change in the control signal, respectively, by XP*45/100%. Such a sharp (abrupt) change in the control signal is called a “blow”. How will the heating element react to this? Probably not in the best way. Although most likely nothing will happen to the heating element. It is much worse if the positioning device acts as an actuator.

To combat this phenomenon, they came up with a cunning scheme. When the controller operates in manual mode, its SP setting constantly monitors the current PV value (tracking function), so that the error is always equal to 0 (SP=PV). In this case, when switching from manual to automatic or remote mode, no shock is observed. The SL_Track parameter is needed to enable/disable this function. As a rule, the tracking mode is left on SL_Track=1.

General information

Typically, when using a proportional-integral-derivative or PID (Proportional-Integral-Derivative) controller and properly tuning it, better control accuracy is achieved compared to an on-off (relay) controller. But for optimal adjustment of the controller and, as a result, obtaining the desired quality of control, it is necessary to understand the mechanisms and principles of operation of the PID controller.
With PID control, the control signal depends not only on the difference between the current and set value (the magnitude of the error or mismatch), but also on the accumulated error (integral) and on the rate of change of the error over time (differential). As a result, the PID controller provides a value of the control signal at which the error in steady state tends to zero. The quality of control is determined by many factors; the key ones are the non-determinism of the control object, the accuracy of the controller input-output and the intensity of external influences.

Where:
Xp - proportional band
Ei = (SP-PV) = (setpoint-current) = error (mismatch)
Td - differentiation time constant
∆Ei - difference in errors of neighboring measurements (Ei - Ei-1)
∆tmeas - time between adjacent measurements (ti - t i-1)
Ti - integration time constant
- The amount of mismatches accumulated by the i-th step (integral sum)
It is easy to see that the control signal is the sum of three components: proportional (term 1), differential (term 2), and integral (term 3).
The proportional component depends on the current error Ei and compensates the current error in proportion to its magnitude.
The differential component depends on the rate of change of the error ∆Ei / ∆tmeas and compensates for sudden disturbances.
The integral component accumulates the control error, which allows the PID controller to maintain zero error in steady state (eliminates static control error).
Typically, a PID controller has additional parameters in addition to three coefficients (Xp, Ti, Td). Let's look at them in more detail using the example of a screenshot of the PID controller parameters menu for the device “ ”.

Rice. 1

There can be several PID control channels (outputs) in the device and each of them has its own parameters. Therefore, select the desired channel in the first column.
The source of feedback from the control object (current controlled value) can be any measuring channel of the device, so you must select the desired measuring channel in the OWNER column.
The PID controller can control both according to the direct logic law (furnace control) and the reverse logic law (refrigeration unit control). Select the desired operating logic.
The set point (SP) is the desired value at which the controller should reach in steady state.
Xp - proportionality zone. It is set in units of the controlled value (for the thermostat in degrees). The proportional band is so called because only in it ((SP - Xp)…(SP + Xp)) the proportional component of the PID controller can generate the power of the output control signal in proportion to the error. And beyond its limits the power will be equal to either 0% or 100%. Thus, the narrower this zone, the faster the regulator’s response, but too high a speed can introduce the system into a self-oscillating mode.
Ti is the integration time constant.
Td is the differentiation time constant.
Current power is an information parameter.
The minimum and maximum power determine the power limits of the PID controller output.
Emergency power is the power that is generated by the regulator when a sensor or measuring channel malfunctions. This way you can ensure a negative temperature in the refrigeration chamber or prevent the oven from cooling down even in an emergency.
The last parameter is the PWM period. This parameter is the same for all PID controllers, because PWM channels are synchronized with each other from one timer. The PWM signal allows you to adjust the power by adjusting the duty cycle of the signal (the pulse width is adjusted at a constant modulation frequency). The PWM bit size (the number of power positions) is 8192 discretes (13 bits). PWM period (from 1 ms to 250 sec). This parameter depends on the type and switching capabilities of power executive switches (m.b. relay, starter, solid-state relay, triac). The higher the switching frequency (the shorter the period), the greater the heat losses in the switches (quadratic dependence of losses on frequency) and the greater the wear of mechanical switches, but the better the quality of regulation. It is important to find a middle ground.

Setting the proportional component (Xp)

Before setting the proportional band, the integral and differential components are turned off, the integration constant is set to the maximum possible (Ti = max), and the differentiation constant to the minimum possible (Td = 0). A safe setpoint value is set equal to (0.7…0.9)×SP, where SP is the actual setpoint of the system being adjusted. The proportional band is set to the minimum possible (Xp = 0).
In this case, the regulator performs the functions of a two-position relay regulator with a hysteresis equal to zero. The transient response is recorded.

Rice. 2


Tο is the initial temperature in the system;
Tsp - set temperature (set point);
∆T - range of temperature fluctuations;
∆t - period of temperature fluctuations.
Set the proportional band equal to the range of temperature fluctuations: Xp = ∆T. This value serves
first approximation for the proportionality zone.
The step response should be analyzed again and the proportional band value adjusted if necessary. Possible options for transient characteristics are shown in Fig. 3.
Rice. 3


Step response type 1: The proportional band value is very small, the step response is far from optimal. The proportional band should be significantly increased.
Transient response type 2: In the transient response, damped oscillations are observed (5 - 6 periods). If in the future it is planned to use the differential component of the PID controller, then the selected value of the proportional band is optimal. For this case, the adjustment of the proportional band is considered complete.
If the differential components will not be used in the future, it is recommended to further increase the proportional band so that transient characteristics of type 3 or 4 are obtained.
Transient response type 3: The transient response exhibits a small overshoot (overshoot) and rapidly decaying oscillations (1 to 2 periods). This type of transient response provides good performance and rapid achievement of the set temperature. In most cases, it can be considered optimal if the system allows emissions (overheating) when transitioning from one temperature to another.
Overshoots are eliminated by further increasing the proportional band so that a type 4 step response is obtained.
Transition response type 4: The temperature smoothly approaches the steady-state value without surges or fluctuations. This type of transient response can also be considered optimal, however, the speed of the controller is somewhat reduced.
Step Response Type 5: A very long approach to the steady-state value indicates that the proportional band is excessively large. The dynamic and static accuracy of regulation here is low.
Two circumstances should be noted. Firstly, in all the cases discussed above, the steady-state temperature value in the system does not coincide with the setpoint value. The larger the proportional band, the greater the residual mismatch. Secondly, the duration of transient processes is longer, the larger the proportionality zone. Thus, one should strive to choose the proportionality zone as small as possible. At the same time, the residual mismatch, characteristic of purely proportional controllers (P-controllers), is removed by the integral component of the controller.

Setting the differential component (Td)

This step is only present if a full-featured PID controller is used. If a differential component will not be used (a proportional-integral (PI) controller is used), then this step should be skipped.
At the previous stage, a proportionality zone was specified corresponding to the transient response of type 2, in which damped oscillations are present (see Fig. 3, curve 2, Fig. 4, curve 1).

Rice. 4


The differentiation time constant Td should be set so that the transition characteristic looks like curve 2 in Fig. 4. As a first approximation, the differentiation time constant is made equal to Тд = 0.2×∆t.
Interestingly, the differential component eliminates damped oscillations and makes the transient response similar to Type 3 (see Figure 3). In this case, the proportional band is smaller than for type 3. This means that the dynamic and static accuracy of regulation in the presence of a differential component (PD controller) can be higher than for a P controller.

Setting the integral component (Ti)

After adjusting the proportional component (and, if necessary, the differential component), the transient response shown in the following figure, curve 1, is obtained.

Rice. 5


The integral component is designed to remove the residual mismatch between the temperature value established in the system and the setpoint. You should start adjusting the integration time constant with the value Ti = ∆t.
Step response type 2: Occurs when the integration time constant is too large. Reaching the set point turns out to be very delayed.
Step response type 4: Occurs when the integration time constant is too small. If the integration time constant is further reduced, oscillations may occur in the system.
Step response type 3: Optimal.

Sources of information used

  • Sabinin Yu.A. Kovchin S.A. “Electric Drive Theory”
  • Shreiner R. T. “Subordinate control systems for electric drives”
  • Olsson, Piani “Digital automation and control systems”
  • Materials from the site www.asu-tp.org