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: Tue, 28 Jul 2020 23:18:16 +0200

```> On Mon, 2020-07-27 at 21:43 +0200, N wrote:
> > > 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
> > > 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
> >
>
> For a stability analysis of the closed loop based on the Nyquist
> criterion, you need the frequency repsonce (nyquist()) of the open loop,
> not of Gry (jw), which represents the closed loop.
>
> Torsten

It must be the closed loop, if using the open loop feedback gains are not
included in the analysis.

With open loop frequency response it should however be possible to calculate
closed looop frequency response.

```