淘宝官方店     推荐课程     在线工具     联系方式     关于我们  
 
 

微波射频仿真设计   Ansoft Designer 中文培训教程   |   HFSS视频培训教程套装

 

Agilent ADS 视频培训教程   |   CST微波工作室视频教程   |   AWR Microwave Office

          首页 >> Ansoft Designer >> Ansoft Designer在线帮助文档


Ansoft Designer / Ansys Designer 在线帮助文档:


Nexxim Simulator >
Support for External Models and Interfaces >
   C Model Library Support >
       C Model API Functions >
           API Functions for S-Parameter and Y-Parameter Models Only               


API Functions for S-Parameter and Y-Parameter Models Only

The 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,
double* z_real, double* z_imag, int* flags);

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,
double* data, int* return_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:
// Y = 1/(R + jwL + 1/jwC).

// Rewritten for computation:
// Y = jwC/(1 - w^2LC + jwRC).

 

double omega = TWO_PI * freq[index];
// frequency from Nexxim is in Hz

std::complex<double> Y(0.0, C * omega);
// Y = jwC

std::complex<double> denom
(1.0 - omega * omega * L * C, omega * R * C);

Y /= denom;

data[index * 3 + 1]=Y.real();

data[index * 3 + 2]=Y.imag();

}

 

(*return_num_freq) = num_freq;

 

return UDM_SUCCESS;

}

 




HFSS视频教学培训教程 ADS2011视频培训教程 CST微波工作室教程 Ansoft Designer 教程

                HFSS视频教程                                      ADS视频教程                               CST视频教程                           Ansoft Designer 中文教程


 

      Copyright © 2006 - 2013   微波EDA网, All Rights Reserved    业务联系:mweda@163.com