Frequency plot
CPGE - Analysis
This block allows to plot frequency diagrams in Bode, Black or Nyquist plans, in open or closed loop, for any linear function.
The selected transfer function is the one located between the two blocks GRANDEUR_PHYSIQUE which are specified as input and output points.
A frequency diagram is associated to each block. It is possible to plot many blocks REP_FREQ in a single diagram in ordre to obtain multiple frequency plots (typically those in open and closed loops).
In the example, it is possible to plot the Bode diagram in open loop (betwen EBO and SBO: 5/(s (1+s)), and also the Bode diagram in closed loop (between EBF and SBF).
It is also possible to obtain the plot of the gain and phase margins, when it is relevant
Nota: the temporal entry can be of any type because no temporal entry or scope is necessary for frequential plot.
The REP_FREQ block is compatible with any linear block diagram, and partially compatible with the presence of pure delays (TIME_DELAY block).
In the case of the delay block in factor of the transfer function, which means before or after or any equivalent situation, the delay is considered in an exact way with the toolbox IODELAY.
In the case of the delay blockinside of a loop, it is not possible to consider the delay in an exact way. The delay block is then approximated by a transfer function (Padé approximant) with order chosen by the user. An order of 10 is recommanded. In function of the delay and of the Padé approximant, a maximal frequency is calculated indicating that, beyond this frequency, the approximation becomes incorrect.
Diagram type: 1 ( Bode),
Input Signal :E (to modify in function of the GRANDEUR_PHYSIQUE blocks),
Output Signal :S (to modify in function of the GRANDEUR_PHYSIQUE blocks),
wmin :0.01 rad/s,
wmax :100 rad/s,
Display marges or not:0 (no margins).
CPGE_TOOLBOX/macros/REP_FREQ.sci
CPGE_TOOLBOX/macros/REP_FREQ_sim.sci
CPGE_TOOLBOX/macros/REP_FREQ_pre_simulate.sci
REP_TEMP
GRANDEUR_PHYSIQUE
Toolbox IODELAY