Overview of the Technical Approach for Derivatives in HFSS
HFSS can compute the derivatives of S-parameters and related matrix quantities with respect to design parameters you have defined. The variables of differentiation could be geometric parameters, such as the length of a waveguide, or material parameters, such as the relative permittivity of a dielectric.
To make use of this feature, you must first create design or project variables and use them in the definition of an object or a material. You must also enable derivative calculation in the solution setup. After HFSS solves for the nominal value of an output quantity, for example S12, it will also compute its derivative ∂S12/∂p with respect to the parameter you defined.
There are several possible applications of derivatives. One use is to estimate how much the quantity of interest will change if the parameter is varied: ΔS12@((∂S12)⁄∂p)Δp. Such an estimate can provide guidance on how to best choose a parameter value, or can help to decide which parameters require tighter control of tolerance. Another possible use is to compute the derivatives with respect to several design parameters to see which parameters are more effective in controlling the quantity of interest.
The basic approach in HFSS can be described as follows. For the nominal solution of a problem, HFSS forms a finite element matrix A and computes a solution vector x (containing fields and S-parameters) for a given excitation vector b. If the problem is parameterized, then the entries of the matrix depend on the design parameter p. The nominal problem is therefore a linear system of the form
A(p)x(p)=b
Now if we are interested in the derivatives of the solution quantities with respect to p, we can differentiate the original equation:
∂A/∂p x(p)+A(p) ∂x/∂p=0
We have assumed here that the excitation vector b is independent of the design parameter. The derivative of the solution vector is then obtained by solving
A(p) ∂x/∂p=-∂A/∂p x(p)
In practice, many problems in HFSS are analyzed with a direct matrix solver which computes an LU factorization of the matrix A. Once the LU factors have been obtained, it is very efficient to solve additional right-hand side vectors, such as the one produced in the derivative calculation above. We already have the solution x(p) for the nominal problem, so to form the right-hand side vector the only additional requirement is the derivatives of the matrix entries with respect to p. In HFSS this is done analytically for the most part. Thus a matrix assembly algorithm has been crafted that fills ∂A⁄∂p in a manner similar to how A itself is filled.
It is worth mentioning that the derivatives of the matrix entries ∂A⁄∂p are computed analytically for the most part in HFSS. Therefore the computed derivatives of the output quantities are nearly exact. This should be contrasted with the alternative approach where the design parameter is perturbed from p to p+Δp and a new solution x+Δx is calculated by solving a new finite element system A(p+Δp). That approach is computationally more expensive, because a new finite element system must be formed and factorized, and it is less accurate because Δx/Δp is not a true partial derivative.
Some technical details on the implementation of derivatives in HFSS may be found in: "Sensitivity Analysis of S-parameters Including Port Variations Using the Transfinite Element Method", L. Vardapetyan, J. Manges, Z. Cendes, 2008 IEEE International Microwave Symposium, Atlanta, Georgia, June 2008.
Units for Calculated Derivatives
Note: The derivatives calculated by HFSS are dependent on the units of the design parameters. For example, if the design parameter p is originally defined with units of millimeters, then the value of the derivative gives the (linearized) change in the output quantity when p is varied by one unit (1 mm). If the units of p are changed to an equivalent value in micrometers, and the derivative is recomputed, then it will appear to drop in magnitude by a factor of 1000 because it now represents how much the output changes when p is varied by one unit (now 1 micrometer.) Therefore, when reporting derivative values it is necessary to record the units of the output quantity as well as the units for the variable of differentiation.