0% ont trouvé ce document utile (0 vote)
7 vues41 pages

Diagrammes de Bode, Black et Nyquist avec TikZ

Transféré par

Seekfreedom
Copyright
© All Rights Reserved
Nous prenons très au sérieux les droits relatifs au contenu. Si vous pensez qu’il s’agit de votre contenu, signalez une atteinte au droit d’auteur ici.
Formats disponibles
Téléchargez aux formats PDF, TXT ou lisez en ligne sur Scribd
0% ont trouvé ce document utile (0 vote)
7 vues41 pages

Diagrammes de Bode, Black et Nyquist avec TikZ

Transféré par

Seekfreedom
Copyright
© All Rights Reserved
Nous prenons très au sérieux les droits relatifs au contenu. Si vous pensez qu’il s’agit de votre contenu, signalez une atteinte au droit d’auteur ici.
Formats disponibles
Téléchargez aux formats PDF, TXT ou lisez en ligne sur Scribd

Diagrammes de Bode, Black et Nyquist avec

PGF/TIKZ
Papanicola Robert∗
4 novembre 2023

version 1.6 04/11/2023 : Traduction en anglais de la documentation par Maria-


chiara Garofalo. Correction de quelques coquilles et ré-écriture des exemples.
Utilisation du package tcolorbox pour les exemples. / English translation of
the documentation by Mariachiara Garofalo. Fixed some typos and rewrote
examples. Using the tcolorbox package for examples.
version 1.5 24/06/2014 : Petites modifications pour prendre en compte les évo-
lutions de pgf. / Small modifications to take into account the developments of
pgf3.
version 1.41 08/06/2011 : Ajout de la commande \Unites{} , légère modifica-
tion du positionnement des légendes.
version 1.4 09/10/2010 : Modification du répertoire par défaut des fichiers Gnu-
plot.
version 1.3 1/05/2010 :
— Ajout de la commande \semilogNG qui permet de tracer un diagramme
semi-log sans graduation
— suppression de tous les styles (couleurs et épaisseurs) et remplacement par
des styles définis par \tikzset ;
— Ajout de la commande \BodePoint .
version 1.2.1 : 20/01/2010 : ajout de la commande \semilog* pour une grille
log plus fine.
version 1.2 : 22/08/2009,
— remplacement des commandes \BodeAmp et \BodeArg par \BodeGraph ,
ces deux commandes sont maintenues pour assurer la compatibilité avec les
anciens fichiers.
— ajout des commandes \BlackText et \NyquistText permettant d’an-
noter les courbes de Black et Nyquist ;
— ajout de la commande \BodePoint
qui permet de marquer sur les diagrammes une liste de points par une
puce (pas d’annotation de ces points) ;
∗ Merci à Germain Gondor pour ses remarques et à Mariachiara Garofalo pour la traduction

1
— ajout d’un style pour les puces ;
version 1.1 : 03/05/2009, ajout ;
— abaque temps de réponse 2nd ordre,
— abaque des dépassements d’un 2nd ordre ;
version 1 : mise en ligne de la version initiale 06/04/2009.

1 Introduction / Introduction
Ce package permet de tracer les dia- This package allows to draw Bode, Ni-
grammes de Bode, Black et Nyquist à chols and Nyquist graphs using Gnuplot
l’aide de Gnuplot et Tikz. Les fonctions and Tikz. Basic transfer functions and
de transfert élémentaires et les correc- correctors are pre-installed to be used in
teurs courants sont préprogrammés pour the tracing functions.
être utilisés dans les fonctions de tracé.

1.1 Nécessite / Need


Pour fonctionner ce package a besoin : To run this package requires :
— d’une version CVS de Pgf/Tikz — a CVS Pgf / Tikz (some com-
(certaines commandes de calculs mands calculations have sum-
ont étés modifiées ou intégrées mers modified or integrated
depuis la version 2), elle peut être since version 2) it can be
téléchargée sur le site Texample downloaded from Texample
[Link] http ://[Link]/tikz/builds/
tikz/builds/. — Gnuplot must be installed and
— que gnuplot soit installé et confi- configured to be executed when
guré pour être exécuté lors de compiling your ...file (see the doc
la compilation de votre fichier Pgf/Tikz)
LATEX(Cf. la doc de Pgf/Tikz).

2
1.2 Composition du package / Composition of Package
Ce package est constitué de trois fichiers : Package This package consists of three
— [Link] : le package pro- files :
prement dit ; — [Link] : the package itself ;
— [Link] : macro-commandes — [Link] : macros defining curves
de définition des courbes iso- iso-module
module ; — [Link] : macros definition curves
— [Link] : macro-commandes iso-arguments.
de définition des courbes iso- [Link] file, the file containing
arguments. the documentation. Gnuplot precompu-
et du fichier [Link], ce fichier ted curves are in the directory /gnuplot/.
contenant la documentation. Les courbes
gnuplot précalculées sont dans le réper-
toire /gnuplot/.

1.3 Utilisation / Use


Décompresser l’archive du package dans Unzip the archive package in your home
votre répertoire personnel. Rajouter dans directory. Add in the header control :
l’entête la commande :
\usepackage{bodegraph}

1.4 À faire / To Do
— Compléter les fonctions élémen- — Complete the basic functions
taires, — Better english !!!
— Traduction correcte en anglais, — ...
— ...

2 Les commandes / Commands


2.1 Grille semilog / semilog grid
— \semilog{décade mini}{décade maxi}{ymini}{ymaxi}
— \semilog*{décade mini}{décade maxi}{ymini}{ymaxi}
Cette commande générique, étoilée ou This generic command, starred or not
non (fig. 1) permet de tracer une grille se- (fig. 1), allows to draw a semilog grid.
milog. La commande étoilée permet d’af- When the command is starred, it allows
ficher une grille logarithmique plus pré- to attach a logarithmic grid more precise
cise (demi valeur). (semi value).

3
10
\begin{tikzpicture}
0
[yscale=2/30,xscale=7/5]
\semilog{-2}{3}{-20}{10} −10
\end{tikzpicture}
−20
10−2 10−1 100 101 102 103

10
\begin{tikzpicture}
0
[yscale=2/30,xscale=7/5]
\semilog*{-2}{3}{-20}{10} −10
\end{tikzpicture}
−20
10−2 10−1 100 101 102 103

Figure 1 – Grille semilog avec graduation

L’amplitude des coordonnées de l’abs- The amplitude of the coordinates of the


cisse doit être donnée en décade, de X axis must be given in decades, from
10décade mini à 10décade maxi , l’ordonnée va- 10minimum decade to 10maxi decade .
rie elle de ymini à ymaxi. You can use the commands of the tikz
On utilisera les commandes d’échelles de scales to adjust the grid dimension to the
tikz pour adapter les dimensions de la one of the page. Therefore, if you would
grille à celle de la page. Ainsi si on sou- like to attach an amplitude graph of 5 de-
haite afficher un diagramme d’amplitude cades of 10−1 to 104 on 7 cm and 80 dB
de 5 décades de 10−1 à 104 sur 7 cm et of −60 to 20 dB on 3 cm, phase graph of
80 dB de −60 à 20 dB sur 3 cm, le dia- −180◦ to 0◦ on 3 cm with a vertical step
gramme de phase de−180◦ à 0◦ sur 3 cm of 30◦ specifying the unites (fig. 1).
avec un pas vertical de 30◦ en précisant
les unités (fig. 1).

2.2 Grille semilog sans graduation / grid without graduation


— \semilogNG{nbdec}{y}
Cette commande permet de tracer des This command allows to draw semilog
diagrammes semi log sans graduation graphs without graduation (fig. 2), the
(fig. 2), le premier paramètre est le first parameter is the number of decade,
nombre de décade, le second l’amplitude the second the amplitude of ordinates.
des ordonnées.

4
\begin{tikzpicture}
[yscale=3/50,
xscale=0.9\textwidth/3cm]
\semilogNG{3}{50}
\end{tikzpicture}

Figure 2 – Grille semilog sans graduation

2.3 Paramètres / parameters

dB
20
\begin{tikzpicture} 10
0
[xscale=7/5] −10
\begin{scope}[yscale=3/80] −20
\UnitedB −30
−40
\semilog*{-1}{4}{-60}{20} −50
\end{scope} −60 rad/s
10◦−1 100 101 102 103 104
\begin{scope} 0
[yshift=-3cm,yscale=3/180] −30
\UniteDegre −60
\OrdBode{30} −90
\semilog*{-1}{4}{-180}{0} −120
\end{scope} −150
\end{tikzpicture} −180 rad/s
10−1 100 101 102 103 104

Figure 3 – Grille semilog avec unités

— \UnitedB
permet d’afficher les unités pour un allows to attach unites for an ampli-
diagramme d’amplitude tude graph

— \UniteDegre
permet d’afficher les unités pour un allows to attach unites for a phase
diagramme de phase. graph.

— \OrdBode{pas}

5
permet de préciser le pas des gradua- allows to specify the step of vertical
tions verticales (par défaut 10) du dia- graduations ( 10 by default) of the
gramme semilog. graph

— \Unites{label axe X}{label axe Y}


permet de préciser directement les allows to specify the label of axes
unités des axes.
— \Unitx{} et \Unity{}
permettent de choisir directement les allow to choose directly the unites to
unités à afficher, à utiliser sous la attach, to be used under the form
forme

2.3.1 Style du diagramme

Les styles de tracé par défaut sont définis Default drawing styles are defined by the
à l’aide de la commande \tikzset (voir command \tikzset ( see figure 4)
figure 4)

— Bode lines/.style={very thick, blue} :


style par défaut des tracé de bode default style of the bode plot (ampli-
(amplitude et gain) ; tude and gain) ;

— asymp lines/.style={Bode lines,thin} :


style, déduit du précédent, utilisable style, deduced by the previous one, it
pour tracer les asymptotes ; can be used to trace the asymptotes, ;

— semilog lines/.style={thin, brown} :


style par défaut de la grille semilog ; default style of the semilog grid ;
— semilog half lines/.style={semilog lines 2, dashed } :
style par défaut des demi pas de la default style of the grid half step ;
grille semilog ;

— semilog label x/.style={semilog lines,below,font=\tiny} :


style des labels de l’axe des abscisses style of the grid X axis labels ;
de la grille semilog ;
— semilog label y/.style={semilog lines,right,font=\tiny} :
idem pour l’axe des ordonnées. do the same for the Y axis

6
\begin{tikzpicture}
\begin{scope}[yscale=2/50,xscale=0.9\textwidth/2cm]
\semilog∗{0}{2}{−20}{30}
\end{scope}
\begin{scope}[yshift=−3cm,
yscale=2/50,xscale=0.9\textwidth/2cm]
\tikzset{
semilog lines/.style={thin, blue},
semilog lines 2/.style={semilog lines,red!50 },
semilog half lines/.style={semilog lines 2,dotted },
semilog label x/.style= {semilog lines, below,font=\tiny},
semilog label y/.style={semilog lines,right,font=\tiny}
}
\semilog∗{0}{2}{−20}{30}
\end{scope}
\end{tikzpicture}

30
20
10
0
−10
−20
100 101 102
30
20
10
0
−10
−20
100 101 102

Figure 4 – Modification des styles par défaut

Vous pouvez, en modifiant ces styles agir You can move the defaults drawings by
les tracés par défaut (fig. 4). modifying these styles

2.4 Tracé des diagrammes / Drawing bode graph


2.4.1 Commandes / Commands
Les commandes de tracés nécessitent que Plot commands require gnuplot (http:
gnuplot ([Link] //[Link]/) to be installed
soit installé et utilisable par votre and usable by your LATEXdistribution.
distribution LATEX.

7
Trois commandes permettent de tracer Three commands allow you to draw am-
les diagrammes d’amplitude et de phase. plitude and phase diagrams (fig. 5).
(fig. 5).

— \BodeGraph[Options]{domain}{fonction} :
pour le diagramme d’amplitude et de for the amplitude and phase graph.
phase.

— \BodeGraph*[Options]{domain}{fonction}{[options]{texte}}
réalise le tracé et ajoute le texte avec draw the graph and add the text by
les options précisées à l’extrémité. using the options at the end.

— \BodePoint[Options]{liste}{fonction}
place les points de la liste sur le dia- place the list points on the graph.
gramme.

avec / with
— domain :
le domaine du tracé précisé en puis- the graph domain precised in power
sance de 10, ainsi pour tracer une of 10 le, therefore to draw a function
fonction de 10−2 rad s−1 à 103 rad s−1 of 10−2 rad s−1 to 103 rad s−1 you will
on notera le domaine {-2 :3} . note the domain {-2 :3} .

— fonction
la fonction à tracer écrite avec la syn- the function on the drawing written
taxe gnuplot. with gnuplot syntax.

— options
Toutes les options de tracé de tikz et all the options of tikz and gnuplot
de gnuplot peuvent être utilisées et drawings can be used to replace the
substituent à celle par défaut, on no- default ones, it may be noted mainly :
tera principalement :

— spécifiques à tikz / specifics to tikz


— la couleur / the colour : [red] , [blue] , . . .
— l’épaisseur / the thickness : [thin] , [thick] , . . .
— le style / the style : [dotted] , [dashed] , . . .
— spécifiques à gnuplot / specifics to gnuplot
— nombre de points / number of points : [samples=xxx]

8
— Nom du fichier créé / File name [id=nomdufichier]
— Répertoire par défaut / default directory prefix=gnuplot/\jobname
— valeurs par défaut / default values : [samples=50, thick, blue] ) l
Il est à noter que tikz, sauvegarde It should be noticed that tikz saves
au premier appel de gnuplot la at the first order of gnuplot the
table des valeurs et que si celle- table of values and if it is not
ci est inchangée lors d’une com- modified at the time of a further
pilation ultérieure, tikz réutilise compilation, tikz reuses the table
la table précédemment sauvée. il previously saved. Therefore, it is
est donc important pour minimi- important, in order to reduce the
ser le temps de compilation de pré- compilation time, to specify a dif-
ciser un id différent pour chaque ferent id for each curve. As default
courbe, par défaut les macros sau- macros save the graphs into dif-
vegardent les graphes dans des ferent files (incrementing a coun-
fichiers différents (incrémentation ter).
d’un compteur).

— Répertoire/ directory : [prefix=repertoire/]


Le répertoire de sauvegarde des This default configuration is regu-
tables de données . Cette confi- lated by a style defined using :
guration par défaut est réglé par
un style défini en utilisant la com-
mande :

\tikzset{gnuplot def/.style={samples=50,id=\arabic{idGnuplot},prefix=gnuplot/\jobname } }

Sur certains systèmes (windows), On some systems (windows), the


le répertoire gnuplot/bodegraph gnuplot/bodegraph directory is
est créé par gnuplot, si ce n’est pas created by gnuplot, if this is not
le cas, vous devez le créer. the case, you must create it.
— pour les autres options, consulter la documentation de tikz. / for the other
options consult tikz documentation.
— styles prédéfinis / preset styles :
plusieurs styles sont prédéfinis. many styles are preset.

9
2.4.2 Exemples / Examples

Pour tracer le diagramme d’amplitude To draw an amplitude graph of the first


de la fonction du premier ordre, H(s) = 3
order function , H(s) = between
3 1 + 0.3 · s
entre 10−2 rad/s et 102 rad/s −2 2
10 rad/s et 10 rad/s on a semi loga-
1 + 0.3 · s
sur une grille semi logarithmique, on rithmic grids, you can use the commands
utilise la séquence de commandes ci- sequence below.
dessous.

dB
10

\begin{tikzpicture}
[xscale=5/4,yscale=5/30]
\NomGnuplot[orde1-] 0
\UnitedB
\semilog{-2}{2}{-20}{10}
\BodeGraph{-2:2} −10
{20*log10(abs(3/sqrt(1+(0.3*10**t)**2)))}
\end{tikzpicture}

−20 rad/s
10−2 10−1 100 101 102

Figure 5 – Utilisation de BodeGraph

Module en dB
10
\begin{tikzpicture}
[xscale=6/4,yscale=5/30]
\Unites{rad/s}{Module en dB} 0
\semilog{-2}{2}{-20}{10}
\BodePoint{0.1,0.15,0.5,1,2.5,
5,10,20,50,80}
{20*log10(abs(3/sqrt −10
(1+(0.3*10**t)**2)))}
\end{tikzpicture}
−20 rad/s
10−2 10−1 100 101 102

Figure 6 – Utilisation de BodePoint

10
2.5 Fonctions de transfert élémentaires préprogrammées /
pre-programmed elementary transfer functions
Les fonctions de base pour tracer les Basic functions to draw Bode graphs of
diagrammes de Bode des systèmes du the first, second order systems, and inte-
premier, du second ordre, et l’inté- gration, are directly implemented in the
gration, sont directement implémentées package, as well as asymptotic graphs of
dans le package ainsi que les diagrammes the same functions.
asymptotiques de ces même fonctions.

Ces fonctions ne peuvent être utilisées These functions can only be used with
qu’avec les commandes de tracé : the drawing commands :

— \BodeGraph[Options]{domaine}{fonction} ;
— \BodeGraph*[Options]{domaine}{fonction} ;
Le tracé des asymptotes présente un dé- Asymptotes graph presents a defect on
faut à la cassure, cela est du à la fi- the break, this is due to the thinness of
nesse du tracé avec gnuplot, pour amé- the graph with gnuplot. To improve this
liorer ce tracé, il est possible d’utiliser drawing, it is possible to use the option
l’option const plot qui permet de tracer const plot which allows to draw crenels
des créneaux et d’augmenter le nombre and to increase the number of points to
de points à calculer samples=xxx et mais calculate samples=xxx . However, this
cela risque d’accroître le temps de compi- risks to increase the compilation time.
lation.

11
2.5.1 Premier ordre / First order
Deux commandes implémentent les for- Two commands implement formulae
mules permettant le tracé des dia- which allow the drawing of amplitude
grammes d’amplitude et de phase par and phase graphs , through gnuplot, of
gnuplot de la fonction du premier ordre K
the first order function H1 (s) =
K 1+τ ·s
H1 (s) = et deux autres les dia- And two others for the asymptotic graphs
1+τ ·s
grammes asymptotiques (fig. 12) : (fig. 12) :

\begin{tikzpicture} 20
[xscale=7/4]
\begin{scope}[yscale=4/40] 10
\semilog{-2}{2}{-20}{20}
\BodeGraph[asymp 0
lines,red,samples=100]
{-2:2}{\POAmpAsymp{6}{0.3}} −10
\BodeGraph{-2:2}
{\POAmp{6}{0.3}} −20
\end{scope} 10−2 10−1 100 101 102

\begin{scope} 0
[yshift=-3.5cm,yscale=4/90] −10
\semilog{-2}{2}{-90}{0} −20
\BodeGraph[asymp lines, −30
red, samples=100, −40
const plot]{-2:2} −50
{\POArgAsymp{6}{0.3}} −60
\BodeGraph{-2:2} −70
{\POArg{6}{0.3}} −80
\end{scope} −90
10−2 10−1 100 101 102
\end{tikzpicture}

Figure 7 – Premier ordre

— \POAmp{K}{tau} pour le diagramme d’amplitude, avec K le gain tau la


constante de temps / for the amplitude graph, with K as gain tau constant of
time ;
— \POAmpAsymp{K}{tau} pour le diagramme asymptotique d’amplitude / for
the asymptotic amplitude graph ;
— \POArg{K}{tau} pour le diagramme de phase / for the phase graph ;
— \POArgAsymp{K}{tau} pour le diagramme asymptotique de phase / for the
asymptotic phase graph .

12
Remarque : K n’est pas utile pour tracer Note : K is not useful anymore to trace a
le diagramme de phase, il est juste main- phase graph,it is only kept to simplify the
tenu pour faciliter l’écriture de la fonc- writing od the function by a direct copy
tion par copie directe de la commande de of the module drawing.
tracer du module.

2.5.2 Second ordre / Second order

\begin{tikzpicture}[xscale=7/3]
\tikzset{
mylines/.style={very
thick, red}, dB
20
myasymp/.style={Bode
lines,thin,blue}}
\begin{scope}[yscale=4/40] 10
\UnitedB
\semilog{-1}{2}{-20}{20} 0
\BodeGraph[myasymp]{-1:1.7}
{\SOAmpAsymp{6}{0.3}{10}} −10
\BodeGraph[mylines,
samples=101]{-1:1.7} −20 rad/s
10−1 100 101 102
{\SOAmp{6}{0.3}{10}} ◦
\end{scope} 0
\begin{scope} −30
[yshift=-3cm,yscale=4/180]
\OrdBode{30} −60
\UniteDegre −90
\semilog{-1}{2}{-180}{0}
−120
\BodeGraph[myasymp,
const plot]{-1:2} −150
{\SOArgAsymp{6}{0.3}{10}} −180 rad/s
\BodeGraph[mylines]{-1:2} 10−1 100 101 102
{\SOArg{6}{0.3}{10}}
\end{scope}
\end{tikzpicture}

Figure 8 – Second ordre

13
Deux commandes implémentent les for- Two commands implement formulae
mules permettant le tracé des dia- which allow the drawing of amplitude
grammes d’amplitude et de phase par and phase graphs of the second order
gnuplot de la fonction du second ordre K
function H2 (s) = And two
K 1 + 2·z · s + s2
H2 (s) = 2
et deux pour le ωn 2
ωn
2·z
1 + ωn · s + s 2 for the asymptotic graphs (fig. 8) :
ωn
tracé des asymptotes (fig. 8) :

— Pour le diagramme d’amplitude, avec K le gain, z le coefficient d’amortissement


et Wn la pulsation propre ; / for the amplitude graph, with K the gain, z dam-
ping coefficient and Wn the natuarl pulsation :
\SOAmp{K}{z}{Wn}
— Pour le diagramme asymptotique d’amplitude / for the asymptotic amplitude
graph :
\SOAmpAsymp{K}{z}{Wn}
— Pour le diagramme de phase / for the phase graph :
\SOArg{K}{z}{Wn}
— Pour le diagramme asymptotique de phase ; / for the asymptotic phase graph :
\SOArgAsymp{K}{z}{Wn}

2.5.3 Intégrateur / Integrator


K
Hi (s) =(fig. 9)
s
— Diagramme d’amplitude ; / Amplitude graph : \IntAmp{K}
— Diagramme de phase. / Phase graph : \IntArg{K}

40
\begin{tikzpicture} 30
\begin{scope} 20
10
[xscale=7/4,yscale=2.5/80] 0
\semilog{-2}{2}{-40}{40} −10
−20
\BodeGraph{-2:2}{\IntAmp{1}} −30
\end{scope} −40
10−2 10−1 100 101 102
\begin{scope}[yshift=-2cm, 10
0
xscale=7/4,yscale=2.5/110] −10
−20
\semilog{-2}{2}{-100}{10} −30
−40
\BodeGraph{-2:2}{\IntArg{1}} −50
−60
\end{scope} −70
−80
−90
\end{tikzpicture} −100
10−2 10−1 100 101 102

Figure 9 – Intégrateur

14
2.5.4 Gain seul / Gain alone
HK (s) = K
Pour le diagramme d’amplitude (pas de diagramme de phase). / for the amplitude
graph (not the phase graph) :
\KAmp{K}

2.5.5 Premier Ordre généralisé / First order generalised


a1 + a2 · p
H(p) = K (fig. 10)
b1 + b2 · p
Courbes réelles / real curves
— \POgAmp{K}{a1}{a2}{b1}{b2}
— \POgArg{K}{a1}{a2}{b1}{b2}
Asymptotes
— \POgAmpAsymp{K}{a1}{a2}{b1}{b2}
— \POgArgAsymp{K}{a1}{a2}{b1}{b2}
a1 et b1 ne doivent pas être nuls. / a1 and b1 must not be zero.

\begin{tikzpicture}[xscale=7/4]
\begin{scope}[yscale=4/40]
10
\semilog{-2}{2}{-20}{10}
\BodeGraph{-2:2}
0
{\POgAmp{3}{4}{5}{6}{70}}
\BodeGraph[thin,red]{-2:2}
{\POgAmpAsymp{3}{4}{5}{6}{70}} −10
\end{scope}
\begin{scope} −20
10−2 10−1 100 101 102
[yshift=-4cm,yscale=4/180] 60
\OrdBode{30}
30
\semilog{-2}{2}{-90}{60}
\BodeGraph{-2:2} 0
{\POgArg{3}{4}{5}{6}{70}} −30
\BodeGraph[thin,red,const
plot]{-2:2} −60
{\POgArgAsymp{3}{4}{5}{6}{70}} −90
\end{scope} 10−2 10−1 100 101 102
\end{tikzpicture}

Figure 10 – Premier ordre généralisé

2.5.6 Retard / Delay


Hr (s) = e−Tr ·s (fig. 11)

15
\begin{tikzpicture}[xscale=12/3]
\begin{scope}[yscale=3.5/50]
\UnitedB
\semilog{0}{3}{−40}{10}
\BodeGraph{0:3}{\RetAmp{0.08}}
\BodeGraph[red]{0:3}{\POAmp{1.0}{0.08}}
\BodeGraph[black]{0:3}{\POAmp{1.0}{0.08}+\RetAmp{0.08}}
\draw [latex−](2.2,−0)−−++(−0.1,−5)node[left] {retard};
\draw [latex−](2.2,−22)−−++(−0.1,−5)node[left] {1er ordre};
\draw [latex−](2.2,−22) −−++(−0.1,−10)node[left] {1er ordre retardé};
\end{scope}
\begin{scope}[yshift=−3.5cm,yscale=3.5/180]
\UniteDegre
\OrdBode{30}
\semilog{0}{3}{−180}{0}
\BodeGraph{0:3}{\RetArg{0.08}}
\BodeGraph[red]{0:3}{\POArg{1}{0.08}}
\BodeGraph[black]{0:3}{\POArg{1}{0.08}+\RetArg{0.08}}
\draw [latex−](2.8,−50)−−++(−0.1,−10)node[left] {retard};
\draw [latex−](2.8,−88)−−++(−0.1,+10)node[left] {1er ordre};
\draw [latex−](2.8,−140) −−++(−0.1,−10)node[left] {1er ordre retardé};
\end{scope}
\end{tikzpicture}

dB
10
0
retard
−10
−20
−30
1er ordre
1er ordre retardé
−40 rad/s
10◦0 101 102 103
0
−30
−60 retard
−90
1er ordre
−120
−150 1er ordre retardé
−180 rad/s
100 101 102 103

Figure 11 – Retard et 1er ordre

— \RetAmp{Tr} :
Tracé du diagramme d’amplitude. Plotting the amplitude diagram.

16
— \RetArg{Tr} :
Tracé du diagramme de phase. Plotting the phase graph.
Sur la figure 11 on note l’effet d’un retard In the figure 11, we note the effect of a
sur une fonction de transfert du premier delay on a first order transfer function.
ordre.

2.5.7 Fonctions inverses / inverse functions

À partir des fonctions élémentaires ci- Using the basic functions above, it is pos-
dessus il est facile de tracer les fonc- sible to draw the inverse functions just by
tions inverses en changeant uniquement changing their sign.
le signe.

\begin{tikzpicture} 30
[xscale=7/4]
\begin{scope}[yscale=4/40] 20
\semilog{-2}{2}{-10}{30}
\BodeGraph[asymp 10
lines,red,samples=100]
{-2:2}{-\POAmpAsymp{1}{0.3}} 0
\BodeGraph{-2:2}
{-\POAmp{1}{0.3}} −10
\end{scope} 10−2 10−1 100 101 102
\begin{scope} 90
[yshift=-6cm,yscale=4/90] 80
\semilog{-2}{2}{0}{90} 70
\BodeGraph[asymp lines, 60
red, samples=100, 50
const plot]{-2:2} 40
{-\POArgAsymp{1}{0.3}} 30
\BodeGraph{-2:2} 20
{-\POArg{1}{0.3}} 10
\end{scope} 0
10−2 10−1 100 101 102
\end{tikzpicture}

Figure 12 – Premier ordre au numérateur

Premier ordre au numérateur / 1st order at the numerator : N1 (s) = 1 + T · s avec


/ with

17
— pour le module / for module :
\BodeGraph[Options]{domain}{-\POAmp{1}{T}}
— pour la phase / for phase :
\BodeGraph[Options]{domain}{-\POArg{1}{T}}
Second ordre au numérateur / Second order in the numerator :
2·z s2
N2 (s) = 1 + 2 ·s+ 2
ωn ωn
avec / with
— pour le module / for module :
\BodeGraph[Options]{domain}{-\SOAmp{1}{z}{Wn}}
— pour la phase / for phase :
\BodeGraph[Options]{domain}{-\SOArg{1}{z}{Wn}}
Dérivateur : Nd (s) = s avec
— Module / Module : \BodeGraph[Options]{domain}{-\IntAmp{1}}
— Phase / Phase : \BodeGraph[Options]{domain}{-\IntArg{1}}

18
2.6 Correcteurs
Les correcteurs de base sont aussi pré- Basic correctors are also pre-
programmés. programmed.

Correcteur Proportionnel P / Proportional controller P :C(p) = K


— Module / Module : \Kamp{K}
— Phase / Phase : \Karg{K} 1

Correcteur Proportionnel intégrateur (PI) / proportional-integral controller (PI)


1 + Ti · s
C(s) = Kp · (fig. 13)
Ti · s
Courbes réelles Asymptotes

— module : \PIAmp{Kp}{Ti} , — module : \PIAmpAsymp{Kp}{Ti} ,


— argument : \PIArg{Kp}{Ti} — argument : \PIArgAsymp{Kp}{Ti}

\begin{tikzpicture}[xscale=7/3]
\begin{scope}[yscale=3/40]
\UnitedB
\BodeGraph[thick]{0:3} dB
30
{\PIAmp{2}{0.08}}
\BodeGraph[black]{0:3} 20
{\PIAmpAsymp{2}{0.08}}
10
\semilog{0}{3}{-10}{30}
\end{scope} 0
\begin{scope}[yshift=-1.5cm,
yscale=3/90] −10 rad/s
10◦0 101 102 103
\UniteDegre 0
\OrdBode{15} −15
\semilog{0}{3}{-90}{0} −30
\BodeGraph[thick]{0:3} −45
{\PIArg{2}{0.08}}
−60
\BodeGraph[black
−75
,samples=201,const
−90 rad/s
plot]{0:3} 100 101 102 103
{\PIArgAsymp{2}{0.08}}
\end{scope}
\end{tikzpicture}

Figure 13 – Correcteur P.I

1. commande inutile, elle retourne 0 / Useless command, it returns 0

19
2.6.1 Correcteur Proportionnel Derivée (PD) / Derived proportional controller
(PD)
C(s) = Kp · (1 + Td · s)
Le correcteur PD programmé est un cor- Controller PD programmed is an ideal
recteur idéal, pour réaliser un correcteur corrector. To create an real corrector, you
réel, on utilisera le correcteur à avance de can use the advance phase controller
phase (fig. 14). (fig. 14)

Courbes réelles / Real curves

— Module / Module : \PDAmp{Kp}{Td} ,


— Phase / Phase : \PDArg{Kp}{Td}
Asymptotes

— Module / Module : \PDAmpAsymp{Kp}{Td} ,


— Phase / Phase : \PDArgAsymp{Kp}{Td}

\begin{tikzpicture}[xscale=7/3]
\begin{scope}[yscale=3/50]
\UnitedB
\semilog{0}{3}{0}{50} dB
50
\BodeGraph[thick]{0:3}
40
{\PDAmp{2}{0.08}}
\BodeGraph[black]{0:3} 30
{\PDAmpAsymp{2}{0.08}} 20
\end{scope} 10
\begin{scope}[yshift=-3.5cm,
0◦ rad/s
yscale=3/90] 0 101 102 103
9010
\UniteDegre
75
\OrdBode{15}
60
\semilog{0}{3}{0}{90}
45
\BodeGraph[thick]{0:3}
{\PDArg{2}{0.08}} 30
\BodeGraph[black,samples=201 15
,const plot] 0 rad/s
100 101 102 103
{0:3}{\PDArgAsymp{2}{0.08}}
\end{scope}
\end{tikzpicture}

Figure 14 – Correcteur P.D

20
2.6.2 Correcteur à Avance de phase / Advance phase corrector
1 + a · Ta · s
CAP (s) = Kp · (fig. 15)
1 + Ta · s
Courbes réelles / Real curves

— Module / Module : \APAmp{Kp}{Ta}{a} ,


— Phase / Phase : \APArg{Kp}{Ta}{a}
Asymptotes

— Module / Module : \APAmpAsymp{Kp}{Ta}{a} ,


— Phase / Phase : \APArgAsymp{Kp}{Ta}{a}

\begin{tikzpicture}
[xscale=7/3]
\begin{scope}[yscale=4/40]
\UnitedB
dB
\semilog{0}{3}{0}{30} 30
\BodeGraph{0:3}
{\APAmp{2}{0.02}{3}} 20
\BodeGraph[thick,samples=101,
red] 10
{0:3}{\APAmpAsymp{2}{0.02}{3}}
\end{scope} 0 rad/s
\begin{scope} 100 101 102 103

[yshift=-3cm,yscale=4/180] 90
\UniteDegre
\OrdBode{30} 60
\semilog{0}{3}{-30}{90} 30
\BodeGraph{0:3}
0
{\APArg{2}{0.02}{3}}
\BodeGraph[thick,samples=201, −30 rad/s
red,const plot] 100 101 102 103
{0:3}{\APArgAsymp{2}{0.02}{3}}
\end{scope}
\end{tikzpicture}

Figure 15 – Correcteur avance de phase

21
2.6.3 Correcteur à Retard de phase / Phase delay corrector
1 + Tr · p
CRP (p) = Kp · (fig. 16)
1 + a · Tr · p
Courbes réelles / Real curves

— Module / Module : \RPAmp{Kp}{Tr}{a}


— Phase / Phase : \RPArg{Kp}{Tr}{a}
Asymptotes

— Module / Module : \RPAmpAsymp{Kp}{Tr}{a}


— Phase / Phase : \RPArgAsymp{Kp}{Tr}{a}

\begin{tikzpicture}[xscale=7/3]
\begin{scope}[yscale=3/40]
\UnitedB
%\node{\tiny dB
\PIAmp{3}{0.5}}; 30
\semilog{0}{3}{-10}{30}
20
\BodeGraph[thick]
{0:3}{\RPAmp{2}{0.02}{3}} 10
\BodeGraph[,thin,samples=101,red]
0
{0:3}{\RPAmpAsymp{2}{0.02}{3}}
\end{scope} −10 rad/s
10 0 101 102 103
\begin{scope} ◦
[yshift=-3cm,yscale=3/180] 90
\UniteDegre 60
\OrdBode{30} 30
\semilog{0}{3}{-90}{90} 0
\BodeGraph[thick] −30
{0:3}{\RPArg{2}{0.02}{3}} −60
\BodeGraph[thin,samples=201, −90 rad/s
red,const plot] 100 101 102 103
{0:3}{\RPArgAsymp{2}{0.02}{3}}
\end{scope}
\end{tikzpicture}

Figure 16 – Correcteur retard de phase

22
2.6.4 Correcteur proportionnel intégral dérivateur (forme série) PID / proportio-
nal integral derivative corrector (series form) (PID)
1 + Ti · s
C(s) = Kp · · (1 + Td · s) (fig. 17)
Ti · s
Courbes réelles / Real curves

— Module / Module : \PIDAmp{Kp}{Ti}{Td}


— Phase / Phase : \PIDArg{Kp}{Ti}{Td}
Asymptotes
— Module / Module :
myverb20*log10(abs(1/(10**t)))+20*log10(Kp/Ti)-(t < log10(1./Ti) ? 20*log10(1)
: 20*log10(0.1*10.0*1/(Ti))-20*log10(10**t))-(t < log10(1./Td) ? 20*log10(1)
: 20*log10(0.1*10.0*1/(Td))-20*log10(10**t))
— Phase / Phase : \PIDArgAsymp{Kp}{Ti}{Td}

\begin{tikzpicture}[xscale=7/3]
\begin{scope}[yscale=3/40]
\UnitedB dB
\semilog{0}{3}{-10}{30} 30
\BodeGraph{0:3}
20
{\PIDAmp{2}{0.08}{0.02}}
\BodeGraph[black] 10
{0:3}{\PIDAmpAsymp{2}{0.08}{0.02}}
0
\end{scope}
\begin{scope}[yshift=-3cm,yscale=3/180]
−10 rad/s
100 101 102 103
\Unites{rad/s}{Argument Argument en degré
en degré} 90
\OrdBode{30} 60
\semilog{0}{3}{-90}{90} 30
\BodeGraph{0:3} 0
{\PIDArg{2}{0.08}{0.02}} −30
\BodeGraph[samples=2, −60
black,samples=201] −90 rad/s
100
{0:3}{\PIDArgAsymp{2}{0.08}{0.02}} 101 102 103
\end{scope}
\end{tikzpicture}

Figure 17 – Correcteur P.I.D série

23
2.7 Fonctions de transfert complexes / Complex functions of trans-
fer
Pour tracé les diagrammes de Bode d’un To trace Bode plot of a complex transfer
fonction de transfert complexe, définie function, defined by the product of ba-
par le produit de fonctions élémentaires, sic functions, you can simply sum up the
il suffit de sommer les représentations, representations, of the function graph as
aussi bien pour le tracé de la fonction que well as of the asymptotes.
pour les asymptotes.

2.7.1 Exemples / Examples


8 1
Premier ordre + intégrateur / first order + integrator : H1 (s) = = ·
s · (1 + 0,5 · s) s
8
(fig. 18)
1 + 0,5 · s

\begin{tikzpicture}
[xscale=7/4]
\begin{scope}
60
[yscale=4/100] 50
\semilog{-2}{2}{-40}{60} 40
\BodeGraph[thin,samples=100] 30
{-1.5:1.5} 20
{\POAmpAsymp{8}{0.5} 10
0
+\IntAmp{1}} −10
\BodeGraph{-1.8:1.5} −20
{\POAmp{8}{0.5}+\IntAmp{1}} −30
\end{scope} −40
10−2 10−1 100 101 102
\begin{scope}
[yshift=-2.5cm,yscale=4/200] 0
−20
\OrdBode{20}
−40
\semilog{-2}{2}{-200}{0} −60
\BodeGraph[samples=100,thin, −80
red,const plot] −100
{-2:2} −120
−140
{\POArgAsymp{8}{0.5}
−160
+\IntArg{1}} −180
\BodeGraph{-2:2} −200
{\POArg{8}{0.5}+\IntArg{1}} 10−2 10−1 100 101 102
\end{scope}
\end{tikzpicture}

Figure 18 – Premier ordre +intégrateur

24
Second ordre généralisé / Second order generalised :
1 + 0,01 · s 5
H2g = 5 · 2
= (1 + 0,01 · s) (fig. 19)
2 · 0,3 s 2 · 0,3 s2
1+ ·s+ 2 1+ ·s+ 2
15 15 15 15

\begin{tikzpicture}
[xscale=7/5]
\begin{scope}[yscale=4/80]
\semilog{-1}{4}{-50}{30} 30
\BodeGraph[red]{-1:4} 20
{\SOAmpAsymp{5}{0.3}{15}- 10
\POAmpAsymp{1}{0.01}} 0
\BodeGraph[smooth,samples=100, −10
thick]{-1:4} −20
{\SOAmp{5}{0.3}{15} −30
-\POAmp{1}{0.01}} −40
\end{scope} −50
\begin{scope} 10−1 100 101 102 103 104
[yshift=-3.5cm,yscale=4/210]
0
\OrdBode{30}
\semilog{-1}{4}{-180}{10} −30
\BodeGraph[samples=100, −60
red,const plot]{-1:4} −90
{\SOArgAsymp{5}{0.3}{15} −120
-\POArgAsymp{1}{0.01}}
−150
\BodeGraph[thick]{-1:4}
{\SOArg{5}{0.3}{15} −180
10−1 100 101 102 103 104
-\POArg{1}{0.01}}
\end{scope}
\end{tikzpicture}

Figure 19 – Second ordre généralisé

25
3 Diagramme de black nichols / black nichols diagram
Ce package permet aussi de tracer les This package also allows you to draw
diagrammes de Black avec des com- Black diagrams with commands similar
mandes analogues à celles utilisées pour to those used for Bode diagrams.
les diagrammes de Bode.

3.1 Lieu de Black-Nicols / Black-Nichols locus


Trois commandes (et 3 étoilées) et per- Three commands (and 3 starred) allow to
mettent de tracer et commenter le lieu de trace and comment the Nichols locus of a
Black d’une fonction (fig. ??). function (fig. ??).

— \BlackGraph[options de trace]{domaine}{argument,module}
— {domaine} :
c’est le domaine de tracé au sens de it’s the domain of graph in the sense
GnuPlot, il est conseillé de définir of GnuPlot, I suggest to define the
le domaine décade (entière ou non) domain in decades (integer or not)
comme {-1 :3}, GnuPlot va tracer la like {-1 :3}, GnuPlot will trace the
fonction pour ω compris entre 10−1 function for ω including between
et 103 . 10−1 et 103 .
— {argument,module} :
la fonction à tracer doit être définie the function to trace must be de-
par l’argument qui retourne l’argu- fined by the argument function
ment en ◦ et le module qui retourne which returns the argument in ◦ ,
le module en dB. On peut bien sur and the module function which re-
utiliser les fonctions définies au des- turns the module in dB. You can also
sus pour les diagrammes de Bode use the functions defined on the top
pour ces fonctions. for the bode graphs for these func-
tions.
— [options de trace] :
toutes les options tikz pour tracer des fonctions gnuplot. / all of the tikz
options to trace gnuplot functions.
— \BlackGraph*[options de trace]{domaine}{argument,module}{[options]{texte}}
cette commande permet de rajouter This command allows to add again
commentaire (nom, référence, équa- comments (name, reference, equa-
tion) à l’extrémité d’un tracé. Les pa- tion) at the bottom of a drawing. Para-
ramètres sont identiques, se rajoute meters are identical, you only re-add
uniquement {[options]{texte}}. {[options]{texte}} .
— [options] :

26
ce sont les options d’écriture du these are the options of the writing
texte (couleur, position,. . .) style of a text (colour, position,. . .),
— {texte} , le texte à écrire entre parenthèses ; / text to write between bra-
ckets ;
— \BlackPoint[options]{liste pulsations}{argument,module} :
cette commande permet de tracer this command allows to trace and
et noter des points particuliers du mark specific points of the graph, the
graphe, la valeur de la pulsation est pulsation value is placed on the side
placée à coté (droite par défaut). (on the right by default.
— [options] options de tracé (couleur, id, prefix,. . .), / tracing options (co-
lour, id, prefix,. . .),
— {liste pulsations} pulsations en rad/s séparées par une virgule, /
beats in rad/s separated by a comma,
— {argument,module} identique à / identical to \BlackGraph
— \BlackPoint*[options]{liste pulsations}{argument,module} :

la version étoilée de la commande starred version of the previous com-


précédente permet de choisir la mand. It allows to choose the posi-
position de chaque texte, comme tion of each text, like in the example
l’exemple 1/right,10/left,150/above 1/right,10/left,150/above right,. . .)
right,....)

— \BlackText[options]{pulsation/pos/texte}{argument,module} :
cette commande permet de position- this command allows to position a
ner un texte par rapport à la courbe text in relation to the curve defined
définie par {argument,module} le by {argument, module} once the text
texte étant positionné à la pulsation is positioned at the beat, the parame-
pulsation, le paramètre pos permet ter pos allows to specify the text po-
de préciser la position du texte ( right, sition (right, above, below left, . . .).
above, below left, . . .). Le point est The point is named NBlack.
nommé NBlack.

— \BlackText*[options]{pulsation/pos/texte}{argument,module} :
cette commande est identique à la this command is identical to the pre-
précédente mais ne dessine pas de vious one but it does not draw any
points. points.

27
3.1.1 Styles par défaut / Default styles

Le tracé du diagramme de Black, de la The drawing of Nichols plot, grid and


grille et de l’abaque de Black-Nichols uti- Nichols chart use different style you can
lise plusieurs styles que vous pouvez mo- modify using the command \tikzset.
difier, avec la commande \tikzset.

— Black lines/.style={very thick, blue} :


style par défaut du tracé du lieu de style for the drawing of Nyquist’s lo-
Black ; cus ;
— Black grid/.style={ultra thin,brown!50} :
Style par défaut de la grille (com- grid style ;
mande \BlackGrid) ;

— Black label points/.style={font=\tiny} :


style par défaut du label des points style used to mark the points on
marqués (commandes \BlackPoint et graph ;
\BlackText) ;

— Black label axes/.style={Black grid, font=\tiny}


style par défaut des axes du dia- style used for the axis ;
gramme ;

— Black abaque mag/.style={gray,ultra thin,dashed,smooth} :


style par défaut des contours isogains ; default style of isogain contours ;

— Black abaque phase/.style={gray,ultra thin,smooth} :


style par défaut des contours isoargu- default style of isoarguments
ments ; contours ;
— ref points/.style={circle,draw, black, opacity=0.7,fill, minimum size= 2pt, inner se
style utilisé pour marquer les points style used to mark points on the dia-
sur le diagramme. gram.

3.2 Grille et abaque de Black-Nichols / Nichols plot chart and grid


3.3 Exemples / Examples
Sur les figures 20 et 21 sont représentées In the figures 20 et 21 the following func-
les fonctions suivantes : tions are represented :

28
1 5
H1 (p) = , H3 (p) = ,
2 · 0.1 p2 2·2 p2
1+ ·p+ 1+ ·p+
1500 15002 150 1502
5 5
H2 (p) = , H4 (p) = ,
2 · 0.2 p2 1+3·p
1+ ·p+
150 1502
1 0.43 · (1 + 0.0009 · p)2
H5 (p) = ·
2 · 0.1 p2 0.0009 · p
1+ ·p+
1500 15002

\begin{tikzpicture}
\begin{scope} dB
[xscale=6/180,yscale=8/60]
\BlackGraph*[samples=150,red,
smooth,ultra thick,-<] +10
{-2:1}{\SOBlack{1}{0.1}{1500}}
{[red,right]{\footnotesize ◦
$H_1$}}
\BlackGraph*[samples=150,black, -180 -135 -90 -45 0
smooth,ultra thick]
{-1:3.5}{\SOArg{5}{0.2}{150}, -10
\SOAmp{5}{0.2}{150}}
{[right]{$H_2 $}}
\BlackGraph*[samples=150,blue, H1
smooth,ultra thick]
{-1:3.5}{\SOArg{5}{2}{150},
\SOAmp{5}{2}{150}}
{[right]{$H_3 $}}
\BlackGrid HH
2 3
\end{scope}
\end{tikzpicture}

Figure 20 – Diagrammes de Black 1

Pour les deux derniers exemples, les For the last two examples, the curves
courbes ont été graduées en pulsation were graduated in pulsation with the
avec la commande \BlackPoint et anno- command \BlackPoint and annotated
tées la commande \BlackText. with the command \BlackText.

29
\begin{tikzpicture}
\begin{scope}
[xscale=6/180,yscale=8/60]
\BlackGraph[samples=150,blue,
smooth,ultra thick] dB
{1:5}{\SOArg{1}{0.1}{1500}+
\IntArg{0.43/0.0009}-2*\POArg{1}{0.0009}, 25
\SOAmp{1}{0.1}{1500}+\IntAmp{0.43/0.0009}
-2*\POAmp{1}{0.0009}} 80
\BlackGraph*[samples=100,purple,smooth] 1500
0.1
{-3:2}{\POArg{5}{3},\POAmp{5}{3}}
+10
{[purple!50,right]{\footnotesize
$H_3$}} 1 500 ◦
\BlackPoint[purple]{0.1,1,3,12,65}
{\POArg{5}{3},\POAmp{5}{3}} -180 -135 -90 -45 0
\BlackPoint*[black]{25/right, 3
80/above right, -10
4000
500/above,1500/above,4000/right} H4
{\SOArg{1}{0.1}{1500}+\IntArg{0.43/0.0009} 12
-2*\POArg{1}{0.0009},\SOAmp{1}{0.1}{1500}+
\IntAmp{0.43/0.0009}-2*\POAmp{1}{0.0009}}
\BlackText[blue]{5000/left/{\normalsize
$H_4$}} 65
{\SOArg{1}{0.1}{1500}+\IntArg{0.43/0.0009} H3
-2*\POArg{1}{0.0009},\SOAmp{1}{0.1}{1500}+
\IntAmp{0.43/0.0009}-2*\POAmp{1}{0.0009}}
\BlackGrid
\end{scope}
\end{tikzpicture}

Figure 21 – Diagramme de Black

3.3.1 Grille / Grid


Une grille peut aussi être ajoutée avec la A grid can be added too by the com-
commande \BlackGrid qui dessine une mand \BlackGrid , which draws a grid
grille dont le pas horizontal est définie whose horizontal step is defined by the
par la variable \valgridBx (par défaut variable \valgridBx (45◦ by default, you
45◦ que l’on change si on le souhaite par can change it if you want by \def \val-
\def \valgridBx10, le pas vertical est lui gridBx10), vertical step is defined by
défini par \valgridBy (par défaut 10 dB \valgridBy (10 dB by default). This com-
). Cette commande dessine aussi le point mand also draws the critic point (-180◦ ,0
critique (-180c irc ,0 dB) et gradue les dB) and graduates axis. The starred com-
axes. La commande étoilée \BlackGrid* mand \BlackGrid* only draws the grid
, ne dessine que la grille.

30
3.3.2 Abaque de Black-Nichols / Nichols chart
\AbaqueBlack
permet de tracer les courbes isomodule allows to trace isomodule curves and
et isoargument de l’abaque de Black- isoargument of Nichols chart (figure 17).
Nichols (fig. 22).

Les seules valeurs possibles pour ces The only values possible for these curves
courbes de gain et d’argument sont les of gain and argument are the following :
suivantes :

— isomodule, gain en dB : -30, -25, -20, -15, -12, -10, -8, -6, -5, -4, -3, -2, -1, -0.5,
-0.2, 0, 0.2, 0.5, 1, 2, 2.3, 3, 4, 5, 6, 8, 10 ;
— isoargument, en ◦ : 359, 357, 354, 350, 345, 340, 330, 315, 300, 285, 270, 255,
240 , 225, 210,195, 190, 170,165, 150, 135, 120, 105, 90, 75, 60, 45, 30, 20, 15,
10, 6, 3, 1.
Deux autres commandes permettent de Two other commands allow to limit the
limiter l’affichage à quelques courbes : display to certain curves :

— \IsoModule[listedB]
cette commande permet de tracer uni- this command allows to trace only the
quement les courbes d’amplitude de amplitude curves of the list edB list,
la liste listedB, par défaut, toutes les all the curves are drawn by default.
courbes sont dessinées.

— \IsoArgument[listedeg]
cette commande permet de tracer uni- this command allows to trace only the
quement les courbes d’amplitude de amplitude curves of the listedeg list,
la liste listedeg, par défaut, toutes les all the curves are drawn by default.
courbes sont tracées.
Le style des courbes tracées est modi- The style of the traced curve can be chan-
fiable à l’aide des deux commandes : ged using two commands :

— \StyleIsoM[couleur,épaisseur, ...] pour les courbes isomodules. / for


the isomodule curves.
— \StyleIsoA[couleur,épaisseur, ...] pour les courbes isoarguments. /
for the isoargument curves.

31
Remarque : pour ne pas trop ralen- Note : do not slow down the compila-
tir la compilation, les courbes sont pré- tion too much, curves are already pre-
calculées. Elles sont définies dans les calculated. They are defined by the files
deux fichiers [Link] et [Link] (respec- [Link] and [Link] (respectively for the
tivement pour le module et l’argument). module and for the argument). If you
Si vous souhaitez ajouter de nouvelles would like to add new curves, you must
courbes, il faut les ajouter dans ces fi- add them in the files and using the same
chiers en respectant la syntaxe. syntax.

32
\begin{tikzpicture}
\begin{scope}[xscale=15/360,yscale=11/60]
\BlackGraph[samples=100,purple,smooth]{−1:1}{\IntArg{0.3}+\SOArg{3.9}{0.4}{3},
\IntAmp{0.3}+\SOAmp{3.9}{0.4}{3}}
\def\valmaxBf{−360}
\StyleIsoM[blue,dashed]
\StyleIsoA[blue]
\AbaqueBlack
\StyleIsoM[blue,thick]
\IsoModule[2.3]
\BlackGrid
\BlackText[black]{2.6/right/{\normalsize $\omega_r\approx 2.6~rad/sec$}}
{\IntArg{0.3}+\SOArg{3.9}{0.4}{3},
\IntAmp{0.3}+\SOAmp{3.9}{0.4}{3}}
\end{scope}
\end{tikzpicture}

dB
0dB

0.2dB −0.2dB

0.5dB −0.5dB

1dB
−1dB

2dB
2.3dB
3dB −2dB
+10
4dB
5dB −3dB
6dB
8dB −4dB
10dB
−5dB ◦
−6dB
-360 -315 -270 -225 -180 -135 -90 -45 0
ωr ≈ 2.6 rad/sec −8dB
−10dB
−12dB -10
−15dB

−359◦ −20dB
−1◦
−357◦◦ −3◦
−354 ◦ −6◦◦
−25dB
−350 ◦ −10◦
−345 ◦ −15

−340 ◦ −20

−330 −30
−315◦ ◦ −45◦
−300 ◦ −60◦
◦ −30dB
−285 ◦−75
−270◦ ◦ −90

−255 −105
−240◦ ◦ −120


−225 ◦ ◦ ◦ −135

−210 −190
◦ −170 −150

−195 −165

Figure 22 – Abaque de Black


33
4 Diagramme de Nyquist / Nyquist plot
Le package permet aussi de tracer le dia- The package also allows to trace Nyquist
gramme de Nyquist (fig. ??) d’une fonc- plot (fig. ??) of a linear function, the dra-
tion linéaire, le tracé est réalisé à partir wing is traced out of the polar descrip-
de la description polaire de la fonction de tion of the transfer function H(i · ω) =
transfert H(i · ω) = ∥H(i · ω)∥ · earg(H(i·ω)) . ∥H(i · ω)∥ · earg(H(i·ω)) . This allows to trace
Cela permet de tracer le diagramme de (fig. ??) Nyquist graph, starting from the
Nyquist à partir des définitions précé- previous definitions of module and argu-
dentes du module et de l’argument. ment.

\begin{tikzpicture}[scale=0.8]
\begin{scope}
\NyquistGraph[smooth,samples=81]{-1:4} I
1m
{\POAmp{3}{0.5}}{\POArg{3}{0.5}}
%\NyquistGraph[purple,smooth,samples=81,] -1 0 1 Re
%{-2:2}{\SOAmp{3}{0.5}{10}}{\SOArg{3}{0.5}{10}}
\NyquistGraph[red,samples=151,smooth,] -1
{-3:2}{\POAmp{4}{0.5}+\POAmp{1}{2}}
{\POArg{4}{0.5}+\POArg{1}{2}}
\NyquistGraph[green,samples=101,smooth,]
{0.5:2}{\SOAmp{15}{0.5}{10}+\IntAmp{1}}
{\SOArg{15}{0.5}{10}+\IntArg{1}}
\end{scope}
\NyquistGrid
\end{tikzpicture}

Figure 23 – Diagrammes de Nyquist

— \NyquistGraph[options]{domaine}{Module en dB}{Argument en degre}


trace donc le lieu de Nyquist de fonc- traces Nyquist’s locus of simple func-
tions simples ou de fonctions compo- tions or of compound functions ( see
sées (voir les exemples ci-dessous). the examples below).

— [options]
options de tracé options of drawing
— {domaine}
le domaine de tracé doit être défini domain of drawing must be indica-
en décade ted in decades
— {Module en dB}

34
\begin{tikzpicture}[scale=0.8]
\begin{scope}
{\SOArg{15}{0.5}{10}+\IntArg{1}}
\NyquistGraph[black,smooth,]{-1:2}
{\POAmp{4}{0.5}+\RetAmp{1.8}}
{\POArg{4}{0.5}+\RetArg{1.8}}

\NyquistGraph*[black,smooth,samples=2, I
only marks,mark=.]{-1:0.3} 1m
{\POAmp{4}{0.5}+\RetAmp{1.8}} -1 0 1 Re
{\POArg{4}{0.5}+\RetArg{1.8}}{[above]
{\footnotesize $H_3$}} 20 -1
\NyquistGraph[purple,smooth,samples=81,]
{-2:2}{\SOAmp{3}{0.5}{10}}{\SOArg{3}{0.5}{10}} H3
\NyquistPoint*[black,]{8/below
right,
10 Texte 8
10/below left,20/left}
{\SOAmp{3}{0.5}{10}}{\SOArg{3}{0.5}{10}}
\NyquistText[red]{8/below
left/Texte}
{\SOAmp{3}{0.5}{10}}{\SOArg{3}{0.5}{10}}
\end{scope}
\NyquistGrid
\end{tikzpicture}

Figure 24 – Diagramme de Nyquist

le module doit être écrit en dB, the module must be written in dB,
on peut bien sûr utiliser les fonc- you can also use the basic functions
tions élémentaires ci-dessus comme above such as \POAmp, \SOAmp to
\POAmp, \SOAmp pour obtenir ce obtain the module.
module.
— {Argument en degre}
l’argument doit être définie en de- the argument must be indicated in
gré, on peut utiliser les fonctions ar- degrees, you can use the argument
guments ci-dessus comme \POArg, functions above such as \POArg,
\SOArg. \SOArg.
— \NyquistGraph*[options]{domaine}{Module en dB}{Argument en degre}{[options]{texte}}

cette version étoilée permet de rajou- this allows to add again a comment at
ter un commentaire à l’extrémité du the bottom of the drawing.
tracé.

— \NyquistPoint[options]{liste pulsations}{Module en dB}{Argument en degre}

35
cette commande permet de tracer this command allows to trace and
et noter des points particuliers du msrk specific points of the graph, the
graphe, la valeur de la pulsation est pulsation value is place on the side
placée à coté (droite par défaut). (on the right side by default).

— \NyquistPoint*[options]{liste pulsations}{Module en dB}{Argument en degre}


la version étoilée permet de préciser the starred version allows to specify
la position du point. the point position.

— \NyquistText[options]{pulsation/pos/text}{Module en dB}{Argument en degre}


cette commande permet de position- this command allows to place a texte
ner un texte par rapport à la courbe in relation to the curve defined by ar-
définie par argument,module le texte gument , module the text being po-
étant positionné à la pulsation pul- sitioned to the pulsation pulsation,
sation, le paramètre pos permet de pos parameter allows to specify the
préciser la position du texte ( right, positioning of the text (right, above,
above, below left, . . .). Le point est below left, . . .). The point is named
nommé NNyquist. NNyquist.

— \NyquistText*[options]{pulsation/pos/text}{Module en dB}{Argument en degre}


commande identique à la précédente identical command to the previous
mais le point n’est pas dessiné. one, but the point is not drawn.

Une grille peut être ajoutée au tracé You can add a grid to the drawing by
par la commande \NyquistGrid, par dé- the command \NyquistGrid, the grid
faut le pas de la grille est de 1 mais step is 1 by default, but it can be modi-
peut être réglé avec les deux variables fied using the two variables \valgridNx
\valgridNx et \valgridNy. La commande and \valgridNy. The starred command
étoilée trace la grille seule sans gradua- traces only the grid without graduation,
tion, la commande simple trace en plus the simple command traces also the unit
le cercle unitaire, le point critique (-1,0). circle, the critic point (-1,0).

4.0.1 Styles par défaut / Default style


Comme pour le diagramme de Black, des styles par défaut sont proposés :
— Nyquist lines/.style={very thick, blue} :
style pour le tracé du lieu de Nyquist ; style for the drawing of Nyquist’s lo-
cus ;

36
— Nyquist grid/.style={ultra thin,brown} :
style de la grille ; : grid style ;

— Nyquist label axes/.style={Nyquist grid,font=\tiny} :


style utilisé pour les axes ; style used for the axis ;

— Nyquist label points/.style={font=\tiny} :


style utilisé pour les points ; style used for the points ;

— ref points/.style={circle,draw, black, opacity=0.7,fill, minimum size= 2pt, inner se


style utilisé pour marquer les points style used to mark the points on
sur le diagramme. graph.

4.1 Quelques exemples de tracé de lieu de Nyquist / Some examples


of Nyquist’s locus drawing
Sur les deux figures fig. 23 et 24 sont re- the following functions are represented
présentées les fonctions suivantes : on the figure 23 et 24.

1
— H1 (p) =
2 · 0.1 p2
1+ ·p+
1500 15002
5
— H2 (p) =
2 · 0.2 p2
1+ ·p+
150 1502
5
— H3 (p) =
1+3·p
1 2 · 0.1 p2 0.43 · (1 + 0.0009 · p)2
— H4 (p) = ·p+ + ·
1 1500 15002 0.0009 · p

37
5 Réponse temporelle / Time response
fig. 25
— \RepTemp[options]{domaine}{fonction}
trace la fonction, la fonction doit être traces the function, function must be
définie comme une fonction Gnuplot. defined like a gnuplot function.
— \RepTemp*[options]{domaine}{fonction}{[options]{texte}}
trace la fonction et ajoute le texte à traces the function and adds the text
l’extrémité. at the bottom.

\begin{tikzpicture}[xscale=5/2,yscale=7/2]
\RepTemp*[color=black,samples=31,
smooth,]{0:1.8} s
{-.198*exp(-35.4*x)-.638*exp(-2.28*x)
*cos(18.3*x)
-.462*exp(-2.28*x)*sin(18.3*x)+.833 1 2
}{[right]{\small 1}} 1
\RepTemp*[color=blue,samples=31,smooth
]{0:1.8}{1-.117*exp(-24.1*x)-.883*exp(-2.94*x)
*cos(7.03*x)
-.769*exp(-2.94*x)*sin(7.03*x)
}{[right]{\small 2}}
\def\valmaxx{1.8} t
0
\def\valmaxy{1.2} 0 1
\TempGrid[xstep=0.2,ystep=0.2]
\end{tikzpicture}

Figure 25 – Réponse temporelle

5.1 Styles / Styles


Plusieurs styles sont définis par défaut : Different styles are defined by default :

— Temp lines/.style={very thick, blue} : style du tracé ; / style of the


drawing ;
— Temp grid/.style={ultra thin,brown!80} : style de la grille ; / grid style ;

— Temp label axes/.style={Temp grid, font=\tiny} : style des labels des


axes ; / style of the labels of the axis ;
— Temp label points/.style={font=\tiny} : style des points marqués. /
style of marked points .

38
6 Abaques / Abacus
Ces deux dernières commandes per- These last two commands allow you to
mettent de tracer les abaques caractéris- draw the characteristic charts of a second
tiques d’un système du second ordre order system.

6.1 Temps de réponse d’un second ordre / Second order response


time chart

Tr · ωn
80

50

30

\begin{tikzpicture}
[xscale=2.5,yscale=3] 10
\AbaqueTRsecond
\end{tikzpicture} 5

z
0.05

0.1

0.2
0.3
0.4
0.5
0.7
1
1.5
2
3
4
5

10
6.2 Abaque des dépassements indiciels / Abacus of index overruns

D
1
0.8 D1
0.7
0.6 D2
0.5 D3
0.4 D4
0.3 D5
D6
0.2
\begin{tikzpicture} D7
D8
[scale=6/2]
0.1
\AbaqueDepassement D1
\end{tikzpicture} 0.05 1
D3
D4
D2

z
0.01
01

05

2
3

0.5
0.6
7
1
0.4
0.

0.
0.
0.
0.

0.

39
Table des matières
1 Introduction / Introduction 2
1.1 Nécessite / Need . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Composition du package / Composition of Package . . . . . . . . . . . 3
1.3 Utilisation / Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.4 À faire / To Do . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 Les commandes / Commands 3


2.1 Grille semilog / semilog grid . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 Grille semilog sans graduation / grid without graduation . . . . . . . . 4
2.3 Paramètres / parameters . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.3.1 Style du diagramme . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.4 Tracé des diagrammes / Drawing bode graph . . . . . . . . . . . . . . . 7
2.4.1 Commandes / Commands . . . . . . . . . . . . . . . . . . . . . 7
2.4.2 Exemples / Examples . . . . . . . . . . . . . . . . . . . . . . . . 10
2.5 Fonctions de transfert élémentaires préprogrammées /
pre-programmed elementary transfer functions . . . . . . . . . . . . . 11
2.5.1 Premier ordre / First order . . . . . . . . . . . . . . . . . . . . . 12
2.5.2 Second ordre / Second order . . . . . . . . . . . . . . . . . . . . 13
2.5.3 Intégrateur / Integrator . . . . . . . . . . . . . . . . . . . . . . 14
2.5.4 Gain seul / Gain alone . . . . . . . . . . . . . . . . . . . . . . . . 15
2.5.5 Premier Ordre généralisé / First order generalised . . . . . . . 15
2.5.6 Retard / Delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.5.7 Fonctions inverses / inverse functions . . . . . . . . . . . . . . . 17
2.6 Correcteurs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.6.1 Correcteur Proportionnel Derivée (PD) / Derived proportional
controller (PD) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.6.2 Correcteur à Avance de phase / Advance phase corrector . . . . 21
2.6.3 Correcteur à Retard de phase / Phase delay corrector . . . . . . 22
2.6.4 Correcteur proportionnel intégral dérivateur (forme série) PID
/ proportional integral derivative corrector (series form) (PID) . 23
2.7 Fonctions de transfert complexes / Complex functions of transfer . . . 24
2.7.1 Exemples / Examples . . . . . . . . . . . . . . . . . . . . . . . . 24

3 Diagramme de black nichols / black nichols diagram 26


3.1 Lieu de Black-Nicols / Black-Nichols locus . . . . . . . . . . . . . . . . 26
3.1.1 Styles par défaut / Default styles . . . . . . . . . . . . . . . . . . 28
3.2 Grille et abaque de Black-Nichols / Nichols plot chart and grid . . . . 28
3.3 Exemples / Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.3.1 Grille / Grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.3.2 Abaque de Black-Nichols / Nichols chart . . . . . . . . . . . . . 31

4 Diagramme de Nyquist / Nyquist plot 34


4.0.1 Styles par défaut / Default style . . . . . . . . . . . . . . . . . . 36
4.1 Quelques exemples de tracé de lieu de Nyquist / Some examples of
Nyquist’s locus drawing . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

40
5 Réponse temporelle / Time response 38
5.1 Styles / Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

6 Abaques / Abacus 39
6.1 Temps de réponse d’un second ordre / Second order response time
chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
6.2 Abaque des dépassements indiciels / Abacus of index overruns . . . . 39

41

Vous aimerez peut-être aussi