www.久久久久|狼友网站av天堂|精品国产无码a片|一级av色欲av|91在线播放视频|亚洲无码主播在线|国产精品草久在线|明星AV网站在线|污污内射久久一区|婷婷综合视频网站

當(dāng)前位置:首頁(yè) > 嵌入式 > 嵌入式教程
[導(dǎo)讀]FDTD參數(shù)選擇程序

針對(duì)二階精度的時(shí)域有限差分程序.

  現(xiàn)可直接調(diào)用的源信號(hào)是:一個(gè)周期的正弦信號(hào),高期脈沖,ricker子波.

  其它信號(hào)可手動(dòng)修改源信號(hào)接口,或源生成函數(shù).

  ---------------

  請(qǐng)函數(shù).

  %************************************************************

  % 1. determine maximum possible spatial field discretization.

  % (in order to avoid numerical dispersion).(5 grid points per

  % minimum wavelength are needed to avoid dispersion).

  % 2. find the maximum possible time step using this dx and dz.

  % (in order to avoid numerical instability).

  % Coded by yiling. Email: yiling@email.jlu.edu.cn

  % Date: 2008

  %*************************************************************************+

  clear;

  clc;

  %--------------------------------------------------------------------------

  dx=0.02; % (m)

  dy=0.02; % (m)

  epsilonmax=25; % Epsion. maximum relative dielectric permittivity.

  mumax=1; % Mu. maximum relative magnetic permeability.

  sourcetype='ricker'; % can be 'cont_sine', 'gaussian', 'ricker'.

  freq=100e6; % (Hz)

  amp=1; % amplitude.

  thres=0.02; % threshold to determine maximum frequency in source pulse.(proposed = 0.02).

  %--------------------------------------------------------------------------

  Timewindows=528; % (ns)

  %--------------------------------------------------------------------------

  %*************************************************************************+

  %--------------------------------------------------------------------------

  vlight=0.3;

  epsilonmin=1; % Epsion. minimum relative dielectric permittivity.

  mumin=1; % Mu. minimum relative magnetic permeability.

  %--------------------------------------------------------------------------

  dt=1/(vlight*sqrt(1/dx^2+1/dy^2));

  % minwavelength=vlight/sqrt(epsilinmax);

  %--------------------------------------------------------------------------

  t=0:dt:Timewindows;

  dt=dt*1e-9;

  t=t*1e-9;

  Timewindows=Timewindows*1e-9;

  source=gprmaxso(sourcetype,amp,freq,dt,Timewindows);

  [dxmax,wlmin,fmax] = finddx(epsilonmax,mumax,source,t,thres);

  %--------------------------------------------------------------------------

  disp('----------------------------------------------------------------- ');

  disp(['Maximum frequency contained in source pulse = ',num2str(fmax/1e6),' MHz']);

  disp(['Minimum wavelength in simulation grid = ',num2str(wlmin),' m']);

  disp(['Maximum possible electric/magnetic field discretization (dx,dy) = ',num2str(dxmax),' m']);

  disp(' ');

  %--------------------------------------------------------------------------

  %--------------------------------------------------------------------------

  dtmax = finddt(epsilonmin,mumin,dxmax,dxmax);

  disp(['Maximum possible time step with this discretization = ',num2str(dtmax/1e-9),' ns']);

  disp('----------------------------------------------------------------- ');

  %**************************************************

  子函數(shù)1

  function dtmax = finddt(epmin,mumin,dx,dz);

  % finddt.m

  %

  % This function finds the maximum time step that can be used in the 2-D

  % FDTD modeling codes TM_model2d.m and TE_model2d.m, such that they remain

  % numerically stable. Second-order-accurate time and fourth-order-accurate

  % spatial derivatives are assumed (i.e., O(2,4)).

  %

  % Syntax: dtmax = finddt(epmin,mumin,dx,dz)

  %

  % where dtmax = maximum time step for FDTD to be stable

  % epmin = minimum relative dielectric permittivity in grid

  % mumin = minimum relative magnetic permeability in grid

  % dx = spatial discretization in x-direction (m)

  % dz = spatial discretization in z-direction (m)

  %

  % by James Irving

  % July 2005

  % convert relative permittivity and permeability to true values

  mu0 = 1.2566370614e-6;

  ep0 = 8.8541878176e-12;

  epmin = epmin*ep0;

  mumin = mumin*mu0;

  % determine maximum allowable time step for numerical stability

  dtmax = 6/7*sqrt(epmin*mumin/(1/dx^2 + 1/dz^2));

  子函數(shù)2

  function [dxmax,wlmin,fmax] = finddx(epmax,mumax,srcpulse,t,thres);

  % finddx.m

  %

  % This function finds the maximum spatial discretization that can be used in the

  % 2-D FDTD modeling codes TM_model2d.m and TE_model2d.m, such that numerical

  % dispersion is avoided. Second-order accurate time and fourth-order-accurate

  % spatial derivatives are assumed (i.e., O(2,4)). Consequently, 5 field points

  % per minimum wavelength are required.

  %

  % Note: The dx value obtained with this program is needed to compute the maximum

  % time step (dt) that can be used to avoid numerical instability. However, the

  % time vector and source pulse are required in this code to determine the highest

  % frequency component in the source pulse. For this program, make sure to use a fine[!--empirenews.page--]

  % temporal discretization for the source pulse, such that no frequency components

  % present in the pulse are aliased.

  %

  % Syntax: [dx,wlmin,fmax] = finddx(epmax,mumax,srcpulse,t,thres)

  %

  % where dxmax = maximum spatial discretization possible (m)

  % wlmin = minimum wavelength in the model (m)

  % fmax = maximum frequency contained in source pulse (Hz)

  % epmax = maximum relative dielectric permittivity in grid

  % mumax = maximum relative magnetic permeability in grid

  % srcpulse = source pulse for FDTD simulation

  % t = associated time vector (s)

  % thres = threshold to determine maximum frequency in source pulse

  % (default = 0.02)

  %

  % by James Irving

  % July 2005

  if nargin==4; thres=0.02; end

  % convert relative permittivity and permeability to true values

  mu0 = 1.2566370614e-6;

  ep0 = 8.8541878176e-12;

  epmax = epmax*ep0;

  mumax = mumax*mu0;

  % compute amplitude spectrum of source pulse and corresponding frequency vector

  n = 2^nextpow2(length(srcpulse));

  W = abs(fftshift(fft(srcpulse,n)));

  W = W./max(W);

  fn = 0.5/(t(2)-t(1));

  df = 2.*fn/n;

  f = -fn:df:fn-df;

  W = W(n/2+1:end);

  f = f(n/2+1:end);

  % determine the maximum allowable spatial disretization

  % (5 grid points per minimum wavelength are needed to avoid dispersion)

  fmax = f(max(find(W>=thres)));

  wlmin = 1/(fmax*sqrt(epmax*mumax));

  dxmax = wlmin/5;

  子函數(shù)3

  function [excitation]=gprmaxso(type,amp,freq,dt,total_time);

  % GPRMAXSO Computes the excitation function used in 'GprMax2D/3D'

  % simulators for ground probing radar.

  %

  % [excitation] = gprmaxso('source_type',Amplitude,frequency,Time_step,Time_window)

  % source_type can be 'cont_sine', 'gaussian', 'ricker'

  % Amplitude is the amplitude of the source

  % frequency is the frequency of the source in Hz

  % Time_step is the time step in seconds

  % Time_window is the total simulated time in seconds

  %

  % excitation is a vector which contains the excitation function.

  % If you type plot(excitation) Matlab will plot it.

  % You can use the signal processing capabilities of Matlab

  % to get a Spectrum etc.

  %

  % Copyright: Antonis Giannopoulos, 2002 This file can be distributed freely.

  RAMPD=0.25;

  if(nargin < 5)

  error('GPRMAXSO requires all five arguments ');

  end;

  if(isstr(type)~=1)

  error('First argument should be a source type');

  end;

  if(freq==0)

  error(['Frequency is zero']);

  end;

  iter=total_time/dt;

  time=0;

  if(strcmp(type,'ricker')==1)

  rickth=2.0*pi*pi*freq*freq;

  rickper=1.0/freq;

  ricksc=sqrt(exp(1.0)/(2.0*rickth));

  i=1;

  while(time<=total_time)

  delay=(time-rickper);

  temp=exp(-rickth*delay*delay);

  excitation(i)=ricksc*temp*(-2.0)*rickth*delay;

  time=time+dt;

  i=i+1;

  end;

  end;

  if(strcmp(type,'gaussian')==1)

  rickper=1.0/freq;

  rickth=2.0*pi*pi*freq*freq;

  i=1;

  while(time<=total_time)[!--empirenews.page--]
delay=(time-rickper);

  excitation(i)=exp((-rickth)*delay*delay);

  time=time+dt;

  i=i+1;

  end;

  end;

  if(strcmp(type,'cont_sine')==1)

  i=1;

  while(time<=total_time)

  ramp=time*RAMPD*freq;

  if(ramp>1.0)

  ramp=1.0;

  end;

  excitation(i)=ramp*sin(2.0*pi*freq*time);

  time=time+dt;

  i=i+1;

  end;

  end;

  if(strcmp(type,'sine')==1)

  i=1;

  while(time<=total_time)

  excitation(i)=sin(2.0*pi*freq*time);

  if(time*freq>1.0)

  excitation(i)=0.0;

  end;

  time=time+dt;

  i=i+1;

  end;

  end;

  excitation=excitation.*amp;

本站聲明: 本文章由作者或相關(guān)機(jī)構(gòu)授權(quán)發(fā)布,目的在于傳遞更多信息,并不代表本站贊同其觀點(diǎn),本站亦不保證或承諾內(nèi)容真實(shí)性等。需要轉(zhuǎn)載請(qǐng)聯(lián)系該專欄作者,如若文章內(nèi)容侵犯您的權(quán)益,請(qǐng)及時(shí)聯(lián)系本站刪除。
換一批
延伸閱讀

LED驅(qū)動(dòng)電源的輸入包括高壓工頻交流(即市電)、低壓直流、高壓直流、低壓高頻交流(如電子變壓器的輸出)等。

關(guān)鍵字: 驅(qū)動(dòng)電源

在工業(yè)自動(dòng)化蓬勃發(fā)展的當(dāng)下,工業(yè)電機(jī)作為核心動(dòng)力設(shè)備,其驅(qū)動(dòng)電源的性能直接關(guān)系到整個(gè)系統(tǒng)的穩(wěn)定性和可靠性。其中,反電動(dòng)勢(shì)抑制與過(guò)流保護(hù)是驅(qū)動(dòng)電源設(shè)計(jì)中至關(guān)重要的兩個(gè)環(huán)節(jié),集成化方案的設(shè)計(jì)成為提升電機(jī)驅(qū)動(dòng)性能的關(guān)鍵。

關(guān)鍵字: 工業(yè)電機(jī) 驅(qū)動(dòng)電源

LED 驅(qū)動(dòng)電源作為 LED 照明系統(tǒng)的 “心臟”,其穩(wěn)定性直接決定了整個(gè)照明設(shè)備的使用壽命。然而,在實(shí)際應(yīng)用中,LED 驅(qū)動(dòng)電源易損壞的問(wèn)題卻十分常見(jiàn),不僅增加了維護(hù)成本,還影響了用戶體驗(yàn)。要解決這一問(wèn)題,需從設(shè)計(jì)、生...

關(guān)鍵字: 驅(qū)動(dòng)電源 照明系統(tǒng) 散熱

根據(jù)LED驅(qū)動(dòng)電源的公式,電感內(nèi)電流波動(dòng)大小和電感值成反比,輸出紋波和輸出電容值成反比。所以加大電感值和輸出電容值可以減小紋波。

關(guān)鍵字: LED 設(shè)計(jì) 驅(qū)動(dòng)電源

電動(dòng)汽車(EV)作為新能源汽車的重要代表,正逐漸成為全球汽車產(chǎn)業(yè)的重要發(fā)展方向。電動(dòng)汽車的核心技術(shù)之一是電機(jī)驅(qū)動(dòng)控制系統(tǒng),而絕緣柵雙極型晶體管(IGBT)作為電機(jī)驅(qū)動(dòng)系統(tǒng)中的關(guān)鍵元件,其性能直接影響到電動(dòng)汽車的動(dòng)力性能和...

關(guān)鍵字: 電動(dòng)汽車 新能源 驅(qū)動(dòng)電源

在現(xiàn)代城市建設(shè)中,街道及停車場(chǎng)照明作為基礎(chǔ)設(shè)施的重要組成部分,其質(zhì)量和效率直接關(guān)系到城市的公共安全、居民生活質(zhì)量和能源利用效率。隨著科技的進(jìn)步,高亮度白光發(fā)光二極管(LED)因其獨(dú)特的優(yōu)勢(shì)逐漸取代傳統(tǒng)光源,成為大功率區(qū)域...

關(guān)鍵字: 發(fā)光二極管 驅(qū)動(dòng)電源 LED

LED通用照明設(shè)計(jì)工程師會(huì)遇到許多挑戰(zhàn),如功率密度、功率因數(shù)校正(PFC)、空間受限和可靠性等。

關(guān)鍵字: LED 驅(qū)動(dòng)電源 功率因數(shù)校正

在LED照明技術(shù)日益普及的今天,LED驅(qū)動(dòng)電源的電磁干擾(EMI)問(wèn)題成為了一個(gè)不可忽視的挑戰(zhàn)。電磁干擾不僅會(huì)影響LED燈具的正常工作,還可能對(duì)周圍電子設(shè)備造成不利影響,甚至引發(fā)系統(tǒng)故障。因此,采取有效的硬件措施來(lái)解決L...

關(guān)鍵字: LED照明技術(shù) 電磁干擾 驅(qū)動(dòng)電源

開(kāi)關(guān)電源具有效率高的特性,而且開(kāi)關(guān)電源的變壓器體積比串聯(lián)穩(wěn)壓型電源的要小得多,電源電路比較整潔,整機(jī)重量也有所下降,所以,現(xiàn)在的LED驅(qū)動(dòng)電源

關(guān)鍵字: LED 驅(qū)動(dòng)電源 開(kāi)關(guān)電源

LED驅(qū)動(dòng)電源是把電源供應(yīng)轉(zhuǎn)換為特定的電壓電流以驅(qū)動(dòng)LED發(fā)光的電壓轉(zhuǎn)換器,通常情況下:LED驅(qū)動(dòng)電源的輸入包括高壓工頻交流(即市電)、低壓直流、高壓直流、低壓高頻交流(如電子變壓器的輸出)等。

關(guān)鍵字: LED 隧道燈 驅(qū)動(dòng)電源
關(guān)閉