Eksperimentalno podešavanje regulatora

demonstracija jeftinog računanja

Inicijalizacija

In [1]:
%plot inline -f "svg"
In [2]:
pkg load control

Osnovni ulazni podaci, $T_0$ i $f_C$

In [3]:
T0 = tf([1], [1, 3, 3, 1])
Transfer function 'T0' from input 'u1' to output ...

                1          
 y1:  ---------------------
      s^3 + 3 s^2 + 3 s + 1

Continuous-time model.
In [4]:
fc = 10 / 2 / pi
fc =  1.5915

Podešavamo marginu faze probom, lako je

In [6]:
Hll = compensator(T0, fc, 45)
Transfer function 'Hll' from input 'u1' to output ...

      10.15 s^3 + 60.89 s^2 + 114.1 s + 63.41
 y1:  ---------------------------------------
          0.0006247 s^3 + 0.04999 s^2 + s    

Continuous-time model.
Gnuplot Produced by GNUPLOT 5.2 patchlevel 8 -10 -5 0 5 10 -60 -50 -40 -30 -20 -10 0 Imaginary Axis Real Axis Pole-Zero Map H3 H3 gnuplot_plot_2a
Gnuplot Produced by GNUPLOT 5.2 patchlevel 8 -100 -80 -60 -40 -20 0 10-2 10-1 100 101 102 103 Magnitude [dB] Bode Diagram gnuplot_plot_1a -250 -200 -150 -100 -50 0 10-2 10-1 100 101 102 103 Phase [deg] Frequency [rad/s] H3 H3
Gnuplot Produced by GNUPLOT 5.2 patchlevel 8 -100 -50 0 50 10-2 10-1 100 101 102 103 Magnitude [dB] Bode Diagram gnuplot_plot_1a -250 -200 -150 -100 10-2 10-1 100 101 102 103 Phase [deg] Frequency [rad/s] T3 T3
Gnuplot Produced by GNUPLOT 5.2 patchlevel 8 -2 -1 0 1 2 -2 -1 0 1 2 added 0 unstable poles gnuplot_plot_1a gnuplot_plot_2a gnuplot_plot_3a gnuplot_plot_4a gnuplot_plot_5a
Gnuplot Produced by GNUPLOT 5.2 patchlevel 8 0 0.2 0.4 0.6 0.8 1 1.2 0 1 2 3 4 5 6 y1 Time [s] Step Response H3 H3

prevelik overshoot

In [7]:
Hll = compensator(T0, fc, 90)
Transfer function 'Hll' from input 'u1' to output ...

      10.15 s^3 + 20.02 s^2 + 12.27 s + 2.398
 y1:  ---------------------------------------
         2.363e-05 s^3 + 0.009722 s^2 + s    

Continuous-time model.
Gnuplot Produced by GNUPLOT 5.2 patchlevel 8 -1 -0.5 0 0.5 1 -250 -200 -150 -100 -50 0 Imaginary Axis Real Axis Pole-Zero Map H3 H3 gnuplot_plot_2a
Gnuplot Produced by GNUPLOT 5.2 patchlevel 8 -120 -100 -80 -60 -40 -20 0 10-2 10-1 100 101 102 103 104 Magnitude [dB] Bode Diagram gnuplot_plot_1a -250 -200 -150 -100 -50 0 10-2 10-1 100 101 102 103 104 Phase [deg] Frequency [rad/s] H3 H3
Gnuplot Produced by GNUPLOT 5.2 patchlevel 8 -100 -50 0 50 10-2 10-1 100 101 102 103 104 Magnitude [dB] Bode Diagram gnuplot_plot_1a -250 -200 -150 -100 -50 10-2 10-1 100 101 102 103 104 Phase [deg] Frequency [rad/s] T3 T3
Gnuplot Produced by GNUPLOT 5.2 patchlevel 8 -2 -1 0 1 2 -2 -1 0 1 2 added 0 unstable poles gnuplot_plot_1a gnuplot_plot_2a gnuplot_plot_3a gnuplot_plot_4a gnuplot_plot_5a
Gnuplot Produced by GNUPLOT 5.2 patchlevel 8 0 0.2 0.4 0.6 0.8 1 0 5 10 15 20 y1 Time [s] Step Response H3 H3

spor prilaz ustaljenom odzivuč ogradili smo zonu za $\varphi_m$

In [8]:
Hll = compensator(T0, fc, 75)
Transfer function 'Hll' from input 'u1' to output ...

      10.15 s^3 + 33.4 s^2 + 36.56 s + 13.31
 y1:  --------------------------------------
          0.0001311 s^3 + 0.0229 s^2 + s    

Continuous-time model.
Gnuplot Produced by GNUPLOT 5.2 patchlevel 8 -1 -0.5 0 0.5 1 -120 -100 -80 -60 -40 -20 0 Imaginary Axis Real Axis Pole-Zero Map H3 H3 gnuplot_plot_2a
Gnuplot Produced by GNUPLOT 5.2 patchlevel 8 -140 -120 -100 -80 -60 -40 -20 0 10-2 10-1 100 101 102 103 104 Magnitude [dB] Bode Diagram gnuplot_plot_1a -250 -200 -150 -100 -50 0 10-2 10-1 100 101 102 103 104 Phase [deg] Frequency [rad/s] H3 H3
Gnuplot Produced by GNUPLOT 5.2 patchlevel 8 -50 0 50 10-2 10-1 100 101 102 103 Magnitude [dB] Bode Diagram gnuplot_plot_1a -250 -200 -150 -100 10-2 10-1 100 101 102 103 Phase [deg] Frequency [rad/s] T3 T3
Gnuplot Produced by GNUPLOT 5.2 patchlevel 8 -2 -1 0 1 2 -2 -1 0 1 2 added 0 unstable poles gnuplot_plot_1a gnuplot_plot_2a gnuplot_plot_3a gnuplot_plot_4a gnuplot_plot_5a
Gnuplot Produced by GNUPLOT 5.2 patchlevel 8 0 0.2 0.4 0.6 0.8 1 0 1 2 3 4 5 6 y1 Time [s] Step Response H3 H3

malo prebacuje

In [9]:
Hll = compensator(T0, fc, 82)
Transfer function 'Hll' from input 'u1' to output ...

      10.15 s^3 + 27.14 s^2 + 24.09 s + 7.106
 y1:  ---------------------------------------
          7.001e-05 s^3 + 0.01673 s^2 + s    

Continuous-time model.
Gnuplot Produced by GNUPLOT 5.2 patchlevel 8 -1 -0.5 0 0.5 1 -200 -150 -100 -50 0 Imaginary Axis Real Axis Pole-Zero Map H3 H3 gnuplot_plot_2a
Gnuplot Produced by GNUPLOT 5.2 patchlevel 8 -140 -120 -100 -80 -60 -40 -20 0 10-2 10-1 100 101 102 103 104 Magnitude [dB] Bode Diagram gnuplot_plot_1a -250 -200 -150 -100 -50 0 10-2 10-1 100 101 102 103 104 Phase [deg] Frequency [rad/s] H3 H3
Gnuplot Produced by GNUPLOT 5.2 patchlevel 8 -100 -50 0 50 10-2 10-1 100 101 102 103 104 Magnitude [dB] Bode Diagram gnuplot_plot_1a -250 -200 -150 -100 10-2 10-1 100 101 102 103 104 Phase [deg] Frequency [rad/s] T3 T3
Gnuplot Produced by GNUPLOT 5.2 patchlevel 8 -2 -1 0 1 2 -2 -1 0 1 2 added 0 unstable poles gnuplot_plot_1a gnuplot_plot_2a gnuplot_plot_3a gnuplot_plot_4a gnuplot_plot_5a
Gnuplot Produced by GNUPLOT 5.2 patchlevel 8 0 0.2 0.4 0.6 0.8 1 0 1 2 3 4 5 6 7 y1 Time [s] Step Response H3 H3

malo podbacuje

In [10]:
Hll = compensator(T0, fc, 80)
Transfer function 'Hll' from input 'u1' to output ...

      10.15 s^3 + 28.92 s^2 + 27.45 s + 8.679
 y1:  ---------------------------------------
          8.55e-05 s^3 + 0.01849 s^2 + s     

Continuous-time model.
Gnuplot Produced by GNUPLOT 5.2 patchlevel 8 -8e-08 -6e-08 -4e-08 -2e-08 0 2e-08 4e-08 6e-08 8e-08 -140 -120 -100 -80 -60 -40 -20 0 Imaginary Axis Real Axis Pole-Zero Map H3 H3 gnuplot_plot_2a
Gnuplot Produced by GNUPLOT 5.2 patchlevel 8 -140 -120 -100 -80 -60 -40 -20 0 10-2 10-1 100 101 102 103 104 Magnitude [dB] Bode Diagram gnuplot_plot_1a -250 -200 -150 -100 -50 0 10-2 10-1 100 101 102