Salta al contenuto
Note per Studenti Speed PI Control Improvements for a DC Servomotor Report

Speed PI Control Improvements for a DC Servomotor

Lab activity 4 adds two ingredients to the basic PI speed loop of the DC servomotor (Lab Activity - Speed P and PI Control Loop SimulationSimulation tasks to close a speed loop around the Simulink servomotor model, first with a proportional controller that cannot give zero steady-state error and then with a PI controller that does, using a square-wave speed reference of plus and minus 250 rpm and the three speed filters.Lab Activity - Speed P and PI Control Loop Simulation →): a feedforward action (FFWD) and an anti-windup mechanism (AWU). The motor model comes from Modeling a DC ServomotorA permanent-magnet DC motor is modeled by an electrical equation with a back-EMF term and a mechanical equation with inertia and viscous friction, a gearbox just adds the load inertia and friction divided by N squared on the motor side, and for the laboratory servomotor (voltage driver plus gearmotor plus disc) this gives a transfer function from input voltage to load angle that reduces to a first-order lag times an integrator.Modeling a DC Servomotor →; the digital implementation is treated in Sampled-Data Control Design - Emulation and Direct DesignA digital control system is a continuous-time plant controlled by a digital controller, and it can be designed either by emulation (design C(s) in continuous time then discretize it) or by direct digital design (exactly discretize the plant and design in discrete time), with poles mapped by z = e^{sT}.Sampled-Data Control Design - Emulation and Direct Design →.

1. Feedforward compensation

Why feedback is not enough

Using feedback (closed loop) in a control system allows to:

  • reduce the sensitivity to parameter variations and external disturbances;
  • stabilise unstable plants;
  • enhance both the control precision and the speed of response.

Using feedforward (open loop) allows to:

  • pre-filter the reference signal to match the overall transfer function;
  • improve the control accuracy and the speed of response;
  • compensate known (measured or estimated) input or output disturbances.

The two are complementary: feedforward acts immediately but only as well as the model is accurate; feedback corrects what the model misses (see The Feedback Control Scheme and RequirementsThe basic control scheme feeds the plant G(s) with the output of a controller C(s) acting on the tracking error e = r - y, giving the closed-loop transfer function W(s) = C(s)G(s) / (1 + C(s)G(s)); the requirement y close to r splits into steady-state conditions (small error for some references, disturbances, model uncertainty) and transient conditions on rise time, settling time and overshoot, which become a region of the complex plane where the poles of W(s) must lie.The Feedback Control Scheme and Requirements →).

1.1 Pre-filtering the reference

Put a filter H1(s)H_1(s) before the closed loop made by C(s)C(s) and P(s)P(s):

 r --> [ H1(s) ] --r'--> (+)--e--> [ C(s) ]--u--> [ P(s) ]--y-->
                          ^-                              |
                          +-------------------------------+

With T′(s)=Y(s)R′(s)=C(s)P(s)1+C(s)P(s)T'(s)=\dfrac{Y(s)}{R'(s)}=\dfrac{C(s)P(s)}{1+C(s)P(s)} the overall transfer function is

Y(s)=T′(s) H1(s) R(s).Y(s)=T'(s)\,H_1(s)\,R(s).

Choosing

H1(s)=1T′(s)H_1(s)=\frac{1}{T'(s)}

gives Y(s)≃R(s)Y(s)\simeq R(s): the filter inverts the closed loop.

Handwritten example, inverting a plant. Let P(s)=2(s+1)(s+2)P(s)=\dfrac{2}{(s+1)(s+2)}. The inverse is

P−1(s)=(s+1)(s+2)2=s2+3s+22=12s2+32s+1.P^{-1}(s)=\frac{(s+1)(s+2)}{2}=\frac{s^2+3s+2}{2}=\frac12 s^2+\frac32 s+1 .

Feeding the plant with r′=P−1rr'=P^{-1}r gives y=ry=r (the cascade is 11). In the time domain

r′(t)=(12d2dt2+32ddt+1)r(t).r'(t)=\left(\frac12\frac{d^2}{dt^2}+\frac32\frac{d}{dt}+1\right)r(t).

For a sinusoidal reference r(t)=Asin⁡ωtr(t)=A\sin\omega t one has r˙(t)=Aωcos⁡ωt\dot r(t)=A\omega\cos\omega t and r¨(t)=−Aω2sin⁡ωt\ddot r(t)=-A\omega^2\sin\omega t, hence

r′(t)=−12Aω2sin⁡ωt+32Aωcos⁡ωt+Asin⁡ωt.r'(t)=-\frac12 A\omega^2\sin\omega t+\frac32 A\omega\cos\omega t+A\sin\omega t .

(The reference derivatives are needed, so the reference must be known in advance, or be smooth enough to be differentiated.)

Handwritten example, static plant. With P(s)=aP(s)=a (a pure gain) and an integral controller kI/sk_I/s in feedback, the feedback response yFB(t)y_{FB}(t) to a step rr rises exponentially towards rr, whereas the feedforward 1/a1/a in front of the plant gives yFF(t)=r(t)y_{FF}(t)=r(t) immediately (cascade a/a=1a/a=1): the benefit is exact tracking of r(t)r(t) "also in the future". If the plant gain is only known approximately, a0≠aa_0\ne a, the open-loop cascade is a/a0≠1a/a_0\ne1 and yFFy_{FF} settles at the wrong level, while the integral feedback (kI/sk_I/s, i.e. the PI structure with the integrator) still drives the error to zero; also a constant disturbance d(t)d(t) acting at the plant input is rejected by the feedback but not by the open-loop path. This is the reason to combine the two: u=HFF r+C(s) (r−y)u=H_{FF}\,r+C(s)\,(r-y), a feedforward path in parallel with the feedback controller.

 r ---> [ H_FF(s) ] --------(+)--u--> [ P(s) ] ---+--> y
   |                          ^+                   |
   |                          |                    |
   +--(+)--> [ C(s) ] --------+                    |
        ^ -                                        |
        +------------------------------------------+

Handwritten example, non-minimum phase. For T(s)=s−1(s+2)(s+3)T(s)=\dfrac{s-1}{(s+2)(s+3)} (a zero at s=1s=1 in the right half plane) the filter H1(s)=(s+2)(s+3)(s−1)(1+τs),τ≪0.1,H_1(s)=\frac{(s+2)(s+3)}{(s-1)(1+\tau s)},\qquad \tau\ll0.1, gives H1(s)T(s)=11+τsH_1(s)T(s)=\dfrac{1}{1+\tau s}. On paper the zero is cancelled, but H1H_1 itself has a pole at s=1s=1 (unstable): this is why a minimum-phase plant is required below. The factor 1+τs1+\tau s makes H1H_1 proper.

1.2 Perfect tracking: feedforward of the plant inverse

Add a feedforward path H2(s)H_2(s) from the reference directly to the plant input:

          +----------[ H2(s) ]---- u_ff,2 ---+
          |                                  v
 r -------+--(+)-e->[ C(s) ]-- u_c -------->(+)-- u -->[ P(s) ]--+--> y
              ^ -                                               |
              +-------------------------------------------------+

Then

Y(s)=C(s)P(s)+H2(s)P(s)1+C(s)P(s) R(s) ⟹ H2(s)=1P(s)Y(s)=\frac{C(s)P(s)+H_2(s)P(s)}{1+C(s)P(s)}\,R(s)\ \Longrightarrow\ H_2(s)=\frac{1}{P(s)}

makes Y=RY=R ("perfect tracking"): the numerator becomes (C+H2)P/(1+CP)(C+H_2)P/(1+CP) with H2P=1H_2P=1, so T=CP+11+CP=1T=\frac{CP+1}{1+CP}=1.

Conditions (slide): P(s)P(s) must be minimum phase, i.e. without zeros with positive real part (otherwise 1/P1/P is unstable). The conditions that can be relaxed are:

  • P(s)P(s) is a proper transfer function;
  • the plant dynamics does not contain relevant input-output (I/O) time delays.

1.3 Compensating known disturbances

Two disturbance paths are considered, with dd measurable or estimated and the disturbance model known:

  • output disturbance: dd enters through Pyd(s)P_{y_d}(s) and adds (with the sign of the diagram) to the plant output; the compensator H3(s)H_3(s) feeds uff,3=H3du_{ff,3}=H_3 d to the plant input, together with ucu_c;
  • input disturbance: dd enters through Pud(s)P_{u_d}(s) and is subtracted from the plant input uu; the compensator H4(s)H_4(s) adds uff,4=H4du_{ff,4}=H_4 d to ucu_c.

The closed-loop expressions are

Y(s)=C(s)P(s)1+C(s)P(s)R(s)+H3(s)P(s)−Pyd(s)1+C(s)P(s)D(s) ⟹ H3(s)=Pyd(s)P(s),Y(s)=\frac{C(s)P(s)}{1+C(s)P(s)}R(s)+\frac{H_3(s)P(s)-P_{y_d}(s)}{1+C(s)P(s)}D(s)\ \Longrightarrow\ H_3(s)=\frac{P_{y_d}(s)}{P(s)},

Y(s)=C(s)P(s)1+C(s)P(s)R(s)+H4(s)P(s)−Pud(s)P(s)1+C(s)P(s)D(s) ⟹ H4(s)=Pud(s).Y(s)=\frac{C(s)P(s)}{1+C(s)P(s)}R(s)+\frac{H_4(s)P(s)-P_{u_d}(s)P(s)}{1+C(s)P(s)}D(s)\ \Longrightarrow\ H_4(s)=P_{u_d}(s).

In both cases the coefficient of D(s)D(s) is made zero.

1.4 Application to the DC gearmotor with torque disturbance

The gearmotor model (blocks as in the slides, NN gearbox ratio, τd\tau_d a load torque disturbance):

        tau_d
          |
        [1/N]
          |
          v  -
 u --[k_drv]--u_drv--(+)--[k_t/R_eq]--tau_m--(+)--[1/(J_eq s+B_eq)]--w_m--+--[1/N]--> w_l
                      ^ -                      ^ -                       |
                      |                                                  |
                      +------------------[ k_e ]<------------------------+
  • uu: command, kdrvk_{drv}: voltage driver gain, udrv=kdrvuu_{drv}=k_{drv}u;
  • kek_e: back-EMF constant (feedback of ωm\omega_m on the armature voltage), ktk_t: torque constant, ReqR_{eq}: equivalent armature resistance;
  • JeqJ_{eq}, BeqB_{eq}: equivalent inertia and viscous friction at the motor shaft; ωm\omega_m motor speed, ωl=ωm/N\omega_l=\omega_m/N load speed.

Moving the disturbance to the input. A torque τd/N\tau_d/N at the motor shaft is equivalent to a voltage disturbance at the input uu:

ud=Pud(s) τd=Reqkt kdrv N τd,u_d=P_{u_d}(s)\,\tau_d=\frac{R_{eq}}{k_t\,k_{drv}\,N}\,\tau_d ,

(the torque produced by udrvu_{drv} through kt/Reqk_t/R_{eq} must equal τd/N\tau_d/N, so kdrvud kt/Req=τd/Nk_{drv}u_d\,k_t/R_{eq}=\tau_d/N). The loop becomes

Ωl(s)=P(s)[U(s)−Ud(s)]=P(s)[U(s)−Pud(s) τd(s)],\Omega_l(s)=P(s)\big[U(s)-U_d(s)\big]=P(s)\big[U(s)-P_{u_d}(s)\,\tau_d(s)\big],

with the plant from the command to the load speed

P(s)=1N⋅kmTms+1,km=kdrv ktReqBeq+ktke,Tm=ReqJeqReqBeq+ktke.P(s)=\frac1N\cdot\frac{k_m}{T_m s+1},\qquad k_m=\frac{k_{drv}\,k_t}{R_{eq}B_{eq}+k_t k_e},\qquad T_m=\frac{R_{eq}J_{eq}}{R_{eq}B_{eq}+k_t k_e}.

Feedforward of the reference (H2=1/PH_2=1/P):

H2(s)=1P(s)=Nkm (Tms+1).H_2(s)=\frac{1}{P(s)}=\frac{N}{k_m}\,(T_m s+1).

With r=ωl∗r=\omega_l^* the speed reference, this corresponds to

uff,2=N Tmkmdωl∗dt+Nkm ωl∗.u_{ff,2}=\frac{N\,T_m}{k_m}\frac{d\omega_l^*}{dt}+\frac{N}{k_m}\,\omega_l^* .

  • It is not implementable in practice as a filter, since it needs the derivative of the reference signal.
  • When the reference is known in advance, the derivative can be computed offline and the feedforward is implemented as a simple algebraic expression of the reference and of its pre-computed derivative.

Feedforward of the disturbance (H4=PudH_4=P_{u_d}):

H4(s)=Pud(s)=Reqkdrv kt N.H_4(s)=P_{u_d}(s)=\frac{R_{eq}}{k_{drv}\,k_t\,N}.

Here dd is the static friction torque τd=τsf sign(ωl)\tau_d=\tau_{sf}\,\text{sign}(\omega_l), so

uff,4=Reqkdrv kt N τsf sign(ωl∗)u_{ff,4}=\frac{R_{eq}}{k_{drv}\,k_t\,N}\,\tau_{sf}\,\text{sign}(\omega_l^*)

(the measured speed is replaced by the reference in the sign, since the reference is available).

Total feedforward uff=uff,2+uff,4u_{ff}=u_{ff,2}+u_{ff,4}:

uff=NReqJeqkdrvktdωl∗dt+N (ReqBeq+ktke)kdrvkt ωl∗+ReqkdrvktN τsf sign(ωl∗),u_{ff}=\frac{N R_{eq}J_{eq}}{k_{drv}k_t}\frac{d\omega_l^*}{dt}+\frac{N\,(R_{eq}B_{eq}+k_tk_e)}{k_{drv}k_t}\,\omega_l^*+\frac{R_{eq}}{k_{drv}k_tN}\,\tau_{sf}\,\text{sign}(\omega_l^*),

which, splitting the coefficient of ωl∗\omega_l^* into a friction part and a back-EMF part, is regrouped as

uff=NReqJeqkdrvktdωl∗dt⏟inertia compensation+ReqkdrvktN[N2Beq ωl∗+τsf sign(ωl∗)]⏟friction compensation+Nkekdrv ωl∗⏟BEMF compensation.u_{ff}=\underbrace{\frac{N R_{eq}J_{eq}}{k_{drv}k_t}\frac{d\omega_l^*}{dt}}_{\text{inertia compensation}}+\underbrace{\frac{R_{eq}}{k_{drv}k_tN}\Big[N^2B_{eq}\,\omega_l^*+\tau_{sf}\,\text{sign}(\omega_l^*)\Big]}_{\text{friction compensation}}+\underbrace{\frac{N k_e}{k_{drv}}\,\omega_l^*}_{\text{BEMF compensation}} .

(Check of the regrouping: N(ReqBeq+ktke)kdrvkt=NReqBeqkdrvkt+Nkekdrv\frac{N(R_{eq}B_{eq}+k_tk_e)}{k_{drv}k_t}=\frac{N R_{eq}B_{eq}}{k_{drv}k_t}+\frac{Nk_e}{k_{drv}} and ReqkdrvktNN2Beq=NReqBeqkdrvkt\frac{R_{eq}}{k_{drv}k_tN}N^2B_{eq}=\frac{NR_{eq}B_{eq}}{k_{drv}k_t}.)

Implementation scheme. Inputs: reference acceleration al∗a_l^* and reference speed ωl∗\omega_l^*. Three parallel branches are summed with the PI output ucu_c to produce uu:

 a_l* ------------------------------------[ N Req Jeq/(kdrv kt) ]-- Inertia comp. -----+
                                                                                      |
 w_l* --+--[ N^2 Beq ]--(+)--[ Req/(kdrv kt N) ]---------------- Friction comp. ---+   |
        |                ^                                                         |   |
        +--[ tau_sf sign(.) ]                                                      |   |
        |                                                                          |   |
        +----------------------------------[ N ke/kdrv ]------ BEMF comp. ---+     |   |
                                                                               v     v   v
 w_l* --(+)-e->[ C(s) PI ]-- u_c -----------------------------------------------(+)-(+)-(+)--> u
        ^ -
        +------------------------------------------------------------------ w_l

On the slide, the inertia branch (which needs the future reference signal) is marked "future reference signal exploitation", and the friction and BEMF branches "disturbance compensation".

1.5 Trapezoidal speed profile to validate the scheme

The test reference is a trapezoidal speed profile whose derivative is piecewise constant:

al∗(t)≜dωl∗(t)dt={900 rpm/s0≤t<0.5 s0 rpm/s0.5≤t<1 s−900 rpm/s1≤t<2 s0 rpm/s2≤t<2.5 s900 rpm/s2.5≤t<3 sa_l^*(t)\triangleq\frac{d\omega_l^*(t)}{dt}=\begin{cases}900\ \text{rpm/s}&0\le t<0.5\ \text{s}\\ 0\ \text{rpm/s}&0.5\le t<1\ \text{s}\\ -900\ \text{rpm/s}&1\le t<2\ \text{s}\\ 0\ \text{rpm/s}&2\le t<2.5\ \text{s}\\ 900\ \text{rpm/s}&2.5\le t<3\ \text{s}\end{cases}

so ωl∗\omega_l^* goes up to 900×0.5=450 rpm900\times0.5=450\ \text{rpm}, stays constant for 0.5 s0.5\ \text{s}, goes down to −450 rpm-450\ \text{rpm} and repeats (periodic with period 3 s3\ \text{s}). The slide shows the two time-histories (acceleration and speed reference) over 9 s9\ \text{s}, followed by two columns of results (speed ωl\omega_l, error ee in rpm, command uu in V over 3 s3\ \text{s}). In the first column the tracking error shows offsets of the order of ±20 rpm\pm20\ \text{rpm} (changing sign with the direction of motion) and spikes, in the second the error stays close to zero. The columns are not labelled on the slide; the reading consistent with the theory is PI only on the left and PI plus feedforward on the right. The slide notes that the behaviour is the same both in simulation and in the real experiment.

2. Anti-windup

The problem

  • In any real control system the actuator output has a limited dynamic range.
  • Whenever the actuator saturates, the command provided to the plant is constant, regardless of the tracking error: the feedback loop is effectively disabled and both the plant and the PI controller act in open loop.

With the actuator saturation in a PID scheme (controller with branches KPK_P, KDsK_D s, KI/sK_I/s followed by an actuator saturation and the plant P(s)P(s)):

  1. windup: the integrator still continues to integrate the (positive) tracking error;
  2. the controller output keeps growing (ineffective for the plant, because the actuator is saturated);
  3. when the tracking error is back to zero the actuator is still saturated (because of the windup);
  4. only when the tracking error stays negative for enough time does the actuator desaturate (unwinding).

The slide shows an example: the process output overshoots the set point and oscillates for a long time, the control signal remains at its limit well past the moment the error changes sign, and the integral term grows during saturation and takes a long time to come back.

The remedy: saturation detection and back-calculation

A saturation detection mechanism is added inside the controller:

  1. a "simulated saturation" is implemented within the controller (a copy of the actuator saturation);
  2. when saturation is detected, the integration is stopped/compensated;
  3. the compensation is proportional to the amount of saturation occurring;
  4. a local feedback around the integrator is used: a first-order low-pass filtering action.
                +-----------[ K_P ]---------------------+
 e ------+------+-----------[ K_D s ]-------------------+--(+)-- u~ --+--[ sat (simulated) ]--+-- u --> [ actuator sat ]-->[ P(s) ]--> y
         |      +--(+)-[ K_I ]--(+)--[ 1/s ]------------+            |                      |
         |         (integrator input corrected by K_W times the amount of saturation u~ - u)
         +--------------------------------------------------[ K_W ]<--(difference u~ and u)--+

The gain KWK_W of the local loop around the integrator acts as a design parameter; the handwritten remark says to make this local loop time scale faster than the original closed loop, so that the integrator is pulled back quickly while the real loop is not disturbed. With anti-windup the same scenario as above settles after the saturation without the long recovery: the integral term stays bounded and the output has no large overshoot.

Versione ripasso

Feedforward vs feedback (see The Feedback Control Scheme and RequirementsThe basic control scheme feeds the plant G(s) with the output of a controller C(s) acting on the tracking error e = r - y, giving the closed-loop transfer function W(s) = C(s)G(s) / (1 + C(s)G(s)); the requirement y close to r splits into steady-state conditions (small error for some references, disturbances, model uncertainty) and transient conditions on rise time, settling time and overshoot, which become a region of the complex plane where the poles of W(s) must lie.The Feedback Control Scheme and Requirements →)

  • Feedback: less sensitivity to parameters and disturbances, stabilises, improves precision and speed.
  • Feedforward: pre-filter the reference, improve accuracy and speed, compensate known (measured or estimated) disturbances.

Pre-filter: Y=T′H1RY=T'H_1R, T′=CP1+CPT'=\dfrac{CP}{1+CP}, so H1=1T′H_1=\dfrac1{T'} gives Y≃RY\simeq R. Example P=2(s+1)(s+2)P=\dfrac2{(s+1)(s+2)}: P−1=12s2+32s+1P^{-1}=\dfrac12s^2+\dfrac32s+1, r′=12r¨+32r˙+rr'=\dfrac12\ddot r+\dfrac32\dot r+r.

Perfect tracking: Y=CP+H2P1+CPRY=\dfrac{CP+H_2P}{1+CP}R, so H2=1PH_2=\dfrac1P. Needs PP minimum phase; proper and no relevant delays can be relaxed. A non-minimum-phase zero (e.g. at s=1s=1) cannot be cancelled by an unstable inverse.

Disturbances: H3=PydPH_3=\dfrac{P_{y_d}}{P} (output disturbance), H4=PudH_4=P_{u_d} (input disturbance).

DC gearmotor (NN ratio, τd\tau_d load torque)

  • P(s)=1NkmTms+1P(s)=\dfrac1N\dfrac{k_m}{T_ms+1}, km=kdrvktReqBeq+ktkek_m=\dfrac{k_{drv}k_t}{R_{eq}B_{eq}+k_tk_e}, Tm=ReqJeqReqBeq+ktkeT_m=\dfrac{R_{eq}J_{eq}}{R_{eq}B_{eq}+k_tk_e}.
  • ud=Pudτdu_d=P_{u_d}\tau_d, Pud=ReqkdrvktNP_{u_d}=\dfrac{R_{eq}}{k_{drv}k_tN}; Ωl=P[U−Pudτd]\Omega_l=P[U-P_{u_d}\tau_d].
  • H2=1P=Nkm(Tms+1)H_2=\dfrac1P=\dfrac N{k_m}(T_ms+1): not implementable online (derivative of the reference), fine offline if the reference is known.
  • Static friction: τd=τsf sign(ωl)\tau_d=\tau_{sf}\,\text{sign}(\omega_l), uff,4=ReqkdrvktNτsf sign(ωl∗)u_{ff,4}=\dfrac{R_{eq}}{k_{drv}k_tN}\tau_{sf}\,\text{sign}(\omega_l^*).
  • Total feedforward: uff=NReqJeqkdrvktω˙l∗⏟inertia+ReqkdrvktN[N2Beqωl∗+τsfsign(ωl∗)]⏟friction+Nkekdrvωl∗⏟BEMFu_{ff}=\underbrace{\frac{NR_{eq}J_{eq}}{k_{drv}k_t}\dot\omega_l^*}_{\text{inertia}}+\underbrace{\frac{R_{eq}}{k_{drv}k_tN}\big[N^2B_{eq}\omega_l^*+\tau_{sf}\text{sign}(\omega_l^*)\big]}_{\text{friction}}+\underbrace{\frac{Nk_e}{k_{drv}}\omega_l^*}_{\text{BEMF}}
  • Added to the PI output ucu_c. Validation: trapezoidal profile, acceleration ±900 rpm/s\pm900\ \text{rpm/s} for 0.50.5 or 1 s1\ \text{s}, speed up to ±450 rpm\pm450\ \text{rpm}; error close to zero with the feedforward.

Anti-windup

  • Saturated actuator: loop open, integrator keeps integrating (windup), actuator stays saturated after the error returns to zero, desaturates only after a negative error for long enough (unwinding).
  • Cure: simulated saturation inside the controller, stop/compensate the integration in proportion to the saturation, local feedback KWK_W around the integrator (first-order low-pass), time scale faster than the closed loop.

Typical error: forgetting that the inertia term needs the derivative of the reference, or that the feedforward is computed from the reference (not from the measured speed) and added to the PI output.

Passi della feedforward:

  1. Pre-filtro: H1=1/T′H_1 = 1/T' rende Y≃RY \simeq R; se T′T' ha uno zero a parte reale positiva, H1H_1 ha un polo instabile e il metodo non vale.
  2. Tracking perfetto: H2=1/PH_2 = 1/P, con PP a fase minima e senza ritardi rilevanti. Nel gearmotor H2=Nkm(Tms+1)H_2 = \dfrac{N}{k_m}(T_ms+1) e uff,2=NTmkmω˙l∗+Nkmωl∗u_{ff,2} = \dfrac{NT_m}{k_m}\dot\omega_l^* + \dfrac{N}{k_m}\omega_l^*.
  3. Disturbo di coppia: τd/N\tau_d/N sull'albero equivale a un disturbo di tensione ud=ReqktkdrvNτdu_d = \dfrac{R_{eq}}{k_tk_{drv}N}\tau_d; attrito statico τsf sign(ωl∗)\tau_{sf}\,\mathrm{sign}(\omega_l^*) compensato con uff,4=ReqkdrvktNτsf sign(ωl∗)u_{ff,4} = \dfrac{R_{eq}}{k_{drv}k_tN}\tau_{sf}\,\mathrm{sign}(\omega_l^*).
  4. Somma delle tre componenti (inerzia, attrito, BEMF) e aggiunta a ucu_c del PI.

Anti-windup, sequenza del problema: attuatore saturo, anello di fatto aperto; l'integratore continua a sommare l'errore; l'attuatore resta saturo anche quando l'errore torna a zero; si sblocca solo dopo un errore negativo per abbastanza tempo.

Rimedio: saturazione simulata dentro il regolatore; l'integrazione viene compensata in proporzione alla saturazione (u∼−uu_\sim - u) con un guadagno KWK_W; la dinamica di questo anello locale è più veloce di quella del loop.

Validazione: profilo trapezoidale con dωl∗dt=±900\dfrac{d\omega_l^*}{dt} = \pm 900 rpm/s per 0.50.5 s, 00 per 0.50.5 s, periodo 33 s; ωl∗\omega_l^* sale fino a ±450\pm 450 rpm. L'errore di inseguimento con solo PI oscilla di circa ±20\pm 20 rpm, con feedforward resta vicino a zero; il comportamento è lo stesso in simulazione e in laboratorio.

Errori tipici:

  • Calcolare la feedforward dalla velocità misurata invece che da quella di riferimento.
  • Usare H1=1/T′H_1 = 1/T' quando T′T' ha uno zero a parte reale positiva: il filtro risulta instabile.
  • Dimenticare che la compensazione d'inerzia richiede la derivata del riferimento: va calcolata offline se il riferimento è noto.

Teoria collegata