Drawing impedances
The Interpreter can also draw impedance functions, with a choice of linear, log-lin or Bode diagrams.
Starting with the RL circuit shown below, we will use the Interpreter’s LOG-LIN diagram to draw the impedance as a function of frequency. We are
after the impedance that the source sees looking into the network from its
terminals. Note that we have two identically named and valued inductors and two
identically named and valued resistors. If the resistors had different values, we
would have to label them with different reference designators in order for the
Interpreter to pick up the correct values.
Drawing the impedance in the frequency domain
Before plotting the impedance function, we have to setup some parameters in
the Interpreter’s Drawing Preferences dialog.
- Set the left and the right limit parameter in the Drawing Preferences dialog. Set this parameter to the AC
analysis start and end frequency.( 10k and 10M )
- Set the name of parameter to s.
- Set the name of result to ZAbs.
- Set the unit of parameter to f
- Set the unit of result to Ohm
- Set the type to LOG-LIN.
We can draw the desired function:
Function Z(u);
Begin
Z := u*L+Replus( R, R+u*L );
End;
Draw( Z(s), Impedance )
At first we define a function to hold the impedance expression. Note in the
function that u is a parameter that is replaced with s when the function is actually “called” in the Draw statement. We use here the built-in Replus function to calculate the impedance of two parallel connected impedances. The Replus function accepts either complex or real arguments. Then, using this function
in the Draw statement, and relying on the current component values of the
underlying schematic, we draw the impedance function in the Diagram Window.
Two new pages are created in the Diagram Window--the amplitude and the phase
diagrams of the given function.