# Using the linear sweep frequency in equations

Question asked by JERRY_MARKETOS on Dec 23, 2003
GENESYS equations are powerful and easy to implement.

On the simpler side, many already know that defining an equation variable
is as easy as opening the equations page and typing  myvariable=123

Progressing from that, typing myvariable=?123 makes myvariable tunable.

You could then enter myvariable into a component, instead of numbers.

Doing the steps above, then entering myvariable into multiple components,
so the one variable controls multiple components, is a very useful
feature called "gang tuning".

There is one variable name you should never try to define
(because it already exists within GENESYS):

FREQ  is the frequency at which the linear simulation is being analyzed.

This is very useful, because you can easily make frequency dependent
variables.  For instance, we could calculate inductive reactance:

ind=?47
ind1=ind*1e-9

XL=2*PI*FREQ*ind1

Note that FREQ inside GENESYS is held in MHz, so it is common to see FREQ
converted to Hz by typing the equation as:

XL=2*PI*FREQ*1e6*ind1   etc.

The development areas within GENESYS include units handling, so you'll want
to check the results of your calculations.  Note that the above calculation
results in swept data, so you won't be able to view it with the variable
viewer.  Instead, you can place it on a graph or, better yet, in a data table.

Open the graph or table's "properties" box, then instead of entering a measurement
such as S21, enter =XL

The = sign tells the graph / table to get the variable from GENESYS equations.