![]() ![]() ![]() ![]() ![]() |
|
微波射频仿真设计 |
|
首页 >> Ansoft Designer >> Ansoft Designer在线帮助文档 |
Nexxim Simulator > API Functions for S-Parameter and Y-Parameter Models OnlyThe functions described in this section apply only to models defined with S-parameters or Y-parameters. They do not apply to IV models. Get SY Parameter Info This function provides information to Nexxim about the S-parameter or Y-parameter model. int get_sy_parameter_info(int* num_freq, int* n_ports,
If the model is well defined over a set of frequencies, it should return number of frequencies in the num_freq field. Subsequently, the model will return the actual frequencies with the corresponding S or Y data in response to a call to the function get_sy_parameter_data. If the model either does not a have a set of frequencies or is well behaved over any frequency, the model sets num_freq to 0. In this case, Nexxim will pass a list of suggested frequencies to the model with the subsequent call to get_sy_parameter_data. This function must of course be called before get_sy_parameter_data. Get SY Parameter Data This function generates the frequency-dependent S or Y data. The syntax is: int get_sy_parameter_data(double* freq, int num_freq, double* data, int* return_num_freqs); If the num_freq returned by get_sy_parameter_info was non zero, the freq field in the call to get_sy_parameter_data is NULL. In this case, the model does not fill in or use the freq field. If the num_freq returned by get_sy_parameter_info was zero, the freq field contains an array of frequencies suggested by the Nexxim engine. The data array should be based on these frequencies. Space for the SY data is allocated by the Nexxim engine of size: (1 + n_ports * n_ports * 2) * num_freq. Data should be generated in the following format: f1 s11 s12 ... s21 s22 ... The function specifies the number of frequencies in the actual data with the return_num_freq field. The return_num_freq value must beless than or equal to num_freq. Here is an example: int get_sy_parameter_data(double* freq, int num_freq,
{ // The freq list is provided by Nexxim // Data format is: f1 re1 im1 f2 re2 im2 ...
for (int index=0; index<num_freq; ++index) { // Set frequencies in the data data[index * 3]=freq[index];
// Series RLC frequency dependence: // Rewritten for computation:
double omega = TWO_PI * freq[index];
std::complex<double> Y(0.0, C *
omega); std::complex<double> denom Y /= denom; data[index * 3 + 1]=Y.real(); data[index * 3 + 2]=Y.imag(); }
(*return_num_freq) = num_freq;
return UDM_SUCCESS; }
HFSS视频教程 ADS视频教程 CST视频教程 Ansoft Designer 中文教程 |
Copyright © 2006 - 2013 微波EDA网, All Rights Reserved 业务联系:mweda@163.com |