Bode diagrams

You can define arbitrary functions in the frequency domain and plot them.

Consider the following RC circuit. Draw the AC transfer function and calculate the amplitude and phase for f=5kHz.

Run AC analysis with the given defaults. Using Symbolic Analysis we can get the AC transfer function.

e6_1.gif

Drawing the AC transfer function.

Now let
s use the Interpreter to draw the AC transfer function with the given defaults. Before plotting the result, we have to set some parameter in the Drawing Preferences dialog.

Then we can plot the desired function:

Draw( 1/(1+C*R*s), MyResult )

Two new pages will be opened in the Diagram Window, for the amplitude and the phase diagrams of the function.

e6_2.gif

Calculating the amplitude and the phase when f = 5kHz

The Interpreter provides a number of built-in functions that help in solving complicated problems. Using the Abs and the Arc functions, we can solve this problem easily.

f:=5k

ZAbs := Abs( 1/(1+C*R*j*2*pi*f) )

ZAbs =[31.8149m]

Db( ZAbs )=[-29.9474]

ZFi := Arc( 1/(1+C*R*j*2*pi*f) )

ZFi =[-1.539]

In this example, we define a variable f for frequency and set it to the given value. Then, using the Abs function, we calculate the absolute value (magnitude) of the transfer function at the given frequency. Next, using the Db function ( returns 20*log10(x), provided x>0 ), we get the amplitude in decibels. We can check these results by running an AC Analysis on the circuit in the schematic window, going to the diagram window, and placing a cursor over the amplitude or phase curves at 5kHz. Finally, we use the Arc function to get the phase angle in radians per second.

e6_3.gif