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

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

 

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

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


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


Nexxim Simulator >
Nexsys Discrete Time Domain Analysis >
   Nexsys MATLAB User Defined Models >
       Example MATLAB Model Files >
           Sinusoidal Source Model               


Sinusoidal Source Model

Here is a model of a sinusoidal source, sin.m. This SOURCE type model has no inputs and one output.

The model name, sin, matches the Matlab function name.

% NEXSYS FUNCTIONAL_MODEL ("sin", "0","", "", "1","r", "1","NO_DATA_REQ", "NOT_APPLICABLE", "NSAMP=256,SAMPLE_RATE=102.4e6,AMPLITUDE=1,FOSC=10e6,PHASE=0" )

Here are explanations for the entries in this line:

 


“dclock”

Model name and function name

“0”

No inputs

“”

No input type

“”

No samples needed per invocation

“1”

One output

“r”

Output is real

“NSAMP”

“NSAMP” sample to be generated per invocation (all samples are sent to the output port at once)

“NO_DATA_REQ”

No extra data reference is required

“NOT_APPLICABLE”

No probe domain

" NSAMP=256, SAMPLE_RATE=102.4e6, AMPLITUDE=1, FOSC=10e6, PHASE=0"

Parameters for the model


Here is the Matlab sin function definition.

function [ output, SV ] = sin (parameters, SV, status_in)

The input and output variables for the function are:


parameters

Parameter values of the model

SV

State variable (in)

status_in

Input status

output

Output signal

SV

State variable (out)


Get parameters.

% Get parameters from function argument p

samples = parameters(1);

sample_rate = parameters(2);

amplitude = parameters(3);

fosc = parameters(4);

phase = parameters(5)*pi/180;

Calculate and set output and return:

time = (0:samples-1)/sample_rate;

output = amplitude*cos(2*pi*fosc*time + phase);

return

The sinusoidal source does not require any state variables (SV) to be saved or retrieved.




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

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


 

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