## Fine-Tuning the LOOPSYN Target Loop Shape Gd to Meet Design
Goals

If your first attempt at `loopsyn`

design
does not achieve everything you wanted, you will need to readjust
your target desired loop shape `Gd`

. Here are some
basic design tradeoffs to consider:

**Stability Robustness.** Your target loop `Gd`

should
have low gain (as small as possible) at high frequencies where typically
your plant model is so poor that its phase angle is completely inaccurate,
with errors approaching ±180° or more.

**Performance.** Your `Gd`

loop
should have high gain (as great as possible) at frequencies where
your model is good, in order to ensure good control accuracy and good
disturbance attenuation.

**Crossover and Roll-Off.** Your desired loop shape `Gd`

should
have its 0 dB crossover frequency (denoted ω_{c})
between the above two frequency ranges, and below the crossover frequency
ω_{c} it should roll off with a negative
slope of between –20 and –40 dB/decade, which helps
to keep phase lag to less than –180° inside the control
loop bandwidth (0 < ω < ω_{c}).

Other considerations that might affect your choice of `Gd`

are
the right-half-plane poles and zeros of the plant `G`

,
which impose ffundamental
limits on your 0 dB crossover frequency ω_{c} [12]. For instance,
your 0 dB crossover ω_{c} must be greater
than the magnitude of any plant right-half-plane poles and less than
the magnitude of any right-half-plane zeros.

$$\underset{\mathrm{Re}\left({p}_{i}\right)>0}{\mathrm{max}}\left|{p}_{i}\right|<{\omega}_{c}<\underset{\mathrm{Re}\left({z}_{i}\right)>0}{\mathrm{min}}\left|{z}_{i}\right|.$$

If you do not take care to choose a target loop shape `Gd`

that
conforms to these fundamental constraints, then `loopsyn`

will still compute the optimal
loop-shaping controller `K`

for your `Gd`

,
but you should expect that the optimal loop `L=G*K`

will
have a poor fit to the target loop shape `Gd`

, and
consequently it might be impossible to meet your performance goals.