help-octave
[Top][All Lists]

Re: How Tune PID in octave using Frequency Response data

 From: N Subject: Re: How Tune PID in octave using Frequency Response data Date: Mon, 27 Jul 2020 21:43:22 +0200

```> Hello Nicklas,
>
> I have a basic understanding control system analysis, but I don't normally
> analyze control systems.
>
> "You may calculate frequency response of your PID regulator with bode(...)
> function and use numeric calculations on amplitudes and phases for your PID
> regulator and frequency response of plant."
> I would appreciate if you could help me.

G(jw) Frequency responce of your system
F(jw) Frequency response of PID regulator
Gry(jw) = F(jw)*G(jw)/(1 + F(jw)*G(jw)) Frequency response of closed system

Then you have frequency response with amplitude and angle for your system.
First you have to calculate amplitude and angle for you PID controller at same
frequencies. Calculations should be done point wise. For multiplication
amplitudess are multiplied while angles are added. Divisor require some more
thinking also by me but know value is multiplied with complex conjugate to get
absolute value in square, convert from (phase, angle) form to (real, imaginary)
should be one possibility. Calulations could be checked by doing them on a
system on polynomial form, if numerical calculation on this agree with
analytical you probably got it right.

To get Bode plot for the closed system you could use subplot(2,1,1)
semilogy(...) subplot(2,1,2) and plot(...) functions.

To get nyquist diagram for stability analysis you plot with Gry(jw) for
increasing frequencies with real part on x axis and imaginary part on y axis.
If you have data on (phase, angle) form you have to convert to (real,
imaginary) form.

Nicklas SB Karlsson

```