LTspice introduction

来源:互联网 发布:天创息壤是网络集资吗 编辑:程序博客网 时间:2024/06/04 19:19
Version 4SHEET 1 1804 680WIRE 64 160 -16 160WIRE 208 160 144 160WIRE -16 192 -16 160WIRE 208 192 208 160WIRE -16 320 -16 272WIRE 208 320 208 256WIRE 208 320 -16 320WIRE -16 336 -16 320FLAG -16 336 0SYMBOL cap 192 192 R0SYMATTR InstName C1SYMATTR Value 10nFSYMBOL res 160 144 R90WINDOW 0 0 56 VBottom 2WINDOW 3 32 56 VTop 2SYMATTR InstName R1SYMATTR Value 10kSYMBOL voltage -16 176 R0WINDOW 3 24 152 Left 2WINDOW 123 24 124 Left 2WINDOW 39 0 0 Left 2SYMATTR InstName V1SYMATTR Value PULSE(0 1 0 1n 1n 0.5ms 1ms)TEXT 448 168 Left 2 ;a) The simulation time of 20ms is an integer multiple of the signal’s period time (1ms). \nb) A maximum time step(in .tran command) of 100ns is corresponding to a minimum sample frequency of 1/100ns=5MHz\nThis gives a Shannon corner frequency of 0.5 x sample frequency, this frequency >> 1MHz(input frequency)\nc) The number of true samples is 20ms / 100ns = 200 000. So we enter  131 072(=2^17) sampled data points in timeTEXT -50 380 Left 2 !.options plotwinsize=0\n.tran 0 20ms 0 100ns

将以上内容保存成1RC_lowpass_fft.asc文件。

[Transient Analysis]{   Npanes: 2   Active Pane: 1   {      traces: 1 {524290,0,"V(n001)"}      X: ('m',0,0,0.002,0.02)      Y[0]: (' ',1,0,0.1,1)      Y[1]: ('_',0,1e+308,0,-1e+308)      Volts: (' ',0,0,1,0,0.1,1)      Log: 0 0 0      GridStyle: 1   },   {      traces: 1 {524291,0,"V(n002)"}      X: ('m',0,0,0.002,0.02)      Y[0]: (' ',1,0,0.1,1)      Y[1]: ('_',0,1e+308,0,-1e+308)      Volts: (' ',0,0,1,0,0.1,1)      Log: 0 0 0      GridStyle: 1   }}
将以上内容保存成1RC_lowpass_fft.plt文件,然后执行Run进行仿真,结果如下:

然后再Waveform Viewer中右键View--> FFT,打开FFT设置对话框,输入你需要的参数,如下图:


然后点击OK,会出现FFT之后的结果:


0 0
原创粉丝点击