LTspice introduction - 5 Complex and AC analysis

基础
在线性系统(什么是线性系统,请自行google)分析中,为什么选取sin波作为最基础的分析原件。就是因为sin波有一个很重要的特性,就是保真(Sinusoidal
fidelity). 就是说一个sin波经过一个线性系统之后的输出也是一个sin波,和输入的波形相比,只是振幅和相位发生变化,频率保持不变。
Asin(ωt + θ1) – > LS –> Bsin(ωt + θ2)

一个sin波形,是可以有复数来表示的。
Acos(ωt) + Bsin(ωt) <==> a + jb #where A=a, B=-b
可参见这里: http://blog.csdn.net/lantianjialiang/article/details/70236947

一个复数可以有三种表示方式:
a + jb <==> M ( cosθ + jsinθ ) <==> Me^(jθ)
rectangular <==> polar <==> Exponentiation
第一种方式用来计算加减方便;
第二种方式用来计算乘除方便;

LTspice种的AC分析,就是对给定的一个电路,输入不同频率的sin波,然后计算出它的输出的sin波形,由于sin波的保真特性,对线性系统来说,输出肯定也是一个sin波,同时频率是不变的,变化的只是振幅和相位。
AC分析的结果,可以有三种方式显示图像。分别是bode,nyquist和cartesian。

  • 一般默认都是bode图, magnitude and phase versus frequency,图的左边是振幅和频率的图,右边是相位和频率的图。
  • Nyquist imaginary component versus real component
  • Cartisian real and imaginary components versus frequency

我们在LTspice中输入一个简单的LPF(low pass filter),
最后完成后的电路图
在电压源的元件将右键,弹出电压源属性输入对话框。在AC analysis中输入振幅和相位。
这里写图片描述
然后点击Simulate –> Edit Simulation Command 打开编辑仿真命令对话框,点击AC Analysis tab,输入以下参数。
这里写图片描述
然后点击Run,会出现Waveform Viewer,你可以在它当中画出你模拟的结果。如下。
bode图: 这里写图片描述
nyquist
这里写图片描述
cartesian
这里写图片描述

LTspice introduction - 3 LTspice的工作原理

LTspice的工作原理
如果学过模拟电路的话,都知道电阻,电容或者说电感都是有对应的抽象模型的.
R=V/I
i=Cdv/dt
v=L
di/dt
所以由这些元器件组成的电路的求解,就是根据KCL和KVL来列出多个微积分方程,然后求解这些方程就可以求出电路中各个地方的电压电流了。

但是要注意,电流从加电到工作,有一段不稳定时间,被称为transient state;相应的,当电路稳定后,被称为steady
state,这两种状态引出了仿真器中两个重要的仿真命令。
transient state – > .tran
steady state –> .op

瞬态分析的命令如下:
.TRAN [Tstart [dTmax]] [modifiers]

对微积分方程,先求出一个特殊解(用猜测),然后将指定的Tstep和特殊解代入这些方程组中,得出一组结果,一直迭代到指定的结束迭代时间Tstop。

使用的迭代方法是:newton-raphson iteration
当然迭代器的设计和速度,都是不同仿真器相互比较的地方,这牵扯到GPU,多线程,字节码优化等细节,你可以在下图中配置。
这里写图片描述

后面会用例子来介绍。

LTspice introduction - 2 LTspice的界面

LTspice的界面主要有两个:Schematic Capture和Waveform Viewer

  • Schematic Capture
    它主要是用来画电路图的,画完电路图之后,添加一些dot 命令同时选择一些仿真的参数,点击执行(Run)

  • Waveform Viewer
    如果你的仿真不是op point的话,一个都会打开它,在它里面你可以画图相应的图形。

Schematic的Toolbar解释

Schematic toolbar

LTspice中使用到的单位:

有两种方式可以在Viewer中画出图形:

1. 直接在Viewer中操作

  • 在执行完仿真后,直接在Schematic中将鼠标移动到相应的线路上,会出现电压探针的图标,左键点击
  • 在执行完仿真后,直接在Schematic中将鼠标移动到相应的器件上,会出现电流表的图标,左键点击
  • 在执行完仿真后,按住Alt键,同时在Schematic中将鼠标移动到相应的器件上,会出现功率温度表的图标,左键点击

2. 通过菜单来添加

先选中Viewer,然后选择菜单Plot Setting –> Add Trace,打开Add Traces to Plot
对话框,在这里选择你需要画出的变量,点击OK。注意,如果你多选的话,它可以对相应的变量进行数学计算的,具体什么计算,就看你的需求了。

Thanks Linear Technology company.

LTspice introduction - 1 Introduction

  • LTspice是什么?
    它是一个模拟电路仿真器。

  • 为什么要有仿真器?
    因为现在的电路越来越复杂,我们设计完的电路,如果直接来制造完成之后,再来测试的话,一个是很费时间,一个是费钱。但是如果有了仿真器的话,我们在device生产之前,就可以看到它的一些特性和缺陷,从而来调整我们的设计。
    我还能想到的一个用处就是,可以用它来解或者验证电路题。如果在上高中的时候就知道了这个软件,我就不用费脑子来计算什么并联,串联电阻了。直接将电路图输入,执行一个op
    point 模拟就有结果了。

  • 它的作者是谁?
    Mike Engelhardt

  • 为什么选择它?
    因为它是免费的

  • 它的下载地址
    http://www.linear.com/designtools/software/

  • 因为我不是专业出身,文章中难免有什么错误,如果你发现了,请及时指出,同时LTspice还有很多高级功能,我可能cover不到,请见谅。

DPS pin为什么需要挂电容

首相大家要知道不同的电容有不同的用途,同时现实中的电容和理想电容不一样,当频率很高的时候,由于ESL的作用,电容表现为电感。

在设计DPS pin的PCB时,一般选用以下两类电容
tantalum capacitor : maintain the stability of the DPS
ceramic capacitors : to manage the very high dI/dt of load current

如果DPS pin的高速的话(不太确定?),要牵扯到Power Distribution Network (PDN) 设计,简单来说就是给DPS
pin的外围加一对cap,来是的DPS pin的输出在比较短的时间内稳定。

DPS内部应该是一个DAC(不太确定?),将用户设定的电压转换成对应的电压输出。DPS有一个crossover频率。
为了保证所供应的电压是稳定的,所以都有四线连接,两条force,两条ground,形成一个loopback回路;
为了保证loopback回路的稳定所以会在DUT board上加上相应的cap network
但是cap network的选择是一个学问?
solition 1:所选电容的谐振频率要小于DPS的 crossover频率
solution 2: 所选电容的的ESR(等效串联电阻)足够大,使得相位的最大偏移点位于DPS的不重要的频率区域
note:将DPS连接到DUT board上,需要force sense和cap network,会导致线损,尽管很小,但是有些时候需要考虑到
note2:在设计DUB board的时候,有时会预留( spare pads )来为以后继续调优cap network来使用
note3:在设计DUB board的PCB的时候,线距要足够宽,etc
note4: 所加的cap会影响精度
note6: 如果想使用LTspice来模拟对应的DPS pin的话,需要ATE提供商提供相应的model文件,否则的话不行

how eclipse CDT find the include and macro

eclipse CDT find the include and macro from below two method:
1. Built-in Settings. CDT will try to detect built-in compiler symbols and
include paths running the compiler with special options and parse the output
of this special run. Most compilers provide such an option to print built-in
include paths and symbols. Built-in settings are implied and do not get passed
to compiler during regular compilation.
2. Build Output Parser (BOP). Another method that CDT employs is to analyze
build output of the regular build with Build Output Parser. Often, include
paths are supplied to the compiler with -I options, and macros with -D options
and BOP will try to find those in the output. That method relies on verbose
build output of your build where all these options are actually printed by
make.

how to download document from SCRIBD for free?

how to download document from SCRIBD for free?
1. use guerrillamail to create a temp mail, then create a new account for
SCRIBD
2. remember the address(URL) which you want to download
3. update a non-empty txt file to your account, then not close the page which
you update file, the paste the url in step 2 in this address bar for step 3,
hint enter, the click download button, the download dialog will show up.

ref:
https://www.youtube.com/watch?v=X1ea64vesfk
https://www.guerrillamail.com

The Scientist and Engineer's Guide to Digital Signal Processing一书的阅读总结

1. tansform
The mathematical term: transform, is extensively used in Digital Signal
Processing, such as: Fourier transform, Laplace transform, Z transform,
Hilbert transform, Discrete Cosine transform, etc.

Just what is a transform?
To answer this question, remember what a function is. A function is an
algorithm or procedure that changes one value into another value. For example,
y=2x+1 is a function. You pick some value for x, plug it into the equation,
and out pops a value for y. Functions can also change several
values into a single value, such as: y=2a + 3b + c , where a, b and c are
changed into y.

Transforms are a direct extension of this, allowing both the input and output
to have multiple values. Suppose you have a signal composed of 100 samples.
If you devise some equation, algorithm, or procedure for changing these 100
samples into another 100 samples, you have yourself a transform. If you think
it is useful enough, you have the perfect right to attach your last name to it
and expound its merits to your colleagues. (This works best if you are an
eminent 18th century French mathematician). Transforms are not limited to any
specific type or number of data. For example, you might have 100 samples of
discrete data for the input and 200 samples of discrete data for the output.
Likewise, you might have a continuous signal for the input and a continuous
signal for the output. Mixed signals are also allowed, discrete in and
continuous out, and vice versa. In short, a transform is any fixed procedure
that changes one chunk of data into another chunk of data.

2. impulse decomposition and Fourier decomposition
the fundamental concept of DSP: the input signal is decomposed into simple
additive components, each of these components is passed through a linear
system, and the resulting output components are synthesized (added). The
signal resulting from this divide-and-conquer procedure is identical to that
obtained by directly passing the original signal through the system. While
many different decompositions are possible, two form the backbone of signal
processing: impulse decomposition and Fourier decomposition. When impulse
decomposition is used, the procedure can be described by a mathematical
operation called convolution.

3. Fourier transform
any periodical signal can be represented as a linear combination of a set of
sinusoidal signals of different frequencies, amplitudes, and phase angles

3.1
Acos(x) + Bsin(x) = M*cos( x + θ)
M=sqrt(A^2 + B^2)
θ=arctan(B/A)

4. complex
Rectangular complex ==> polar complex
M=sqrt(a^2 + b^2)
θ=arctan(b/a) #if a>0
θ=arctan(b/a) + p #if a<0

polar complex ==> Rectangular complex
a=Mcosθ
b=Msinθ

e^jx = cos(x) + jsin(x) #Euler’s relation
a + jb <==> M ( cosθ + jsinθ )
a + jb <==> Me^(jθ) #plug in Euler relation
rectang vs polar

5. how to use complex to solve real problem

The idea to remember is that some physical problems can be converted into a
complex form by simply adding a j to one of the components. Converting back to
the physical problem is nothing more than dropping the j. This is the essence
of the substitution method.

6. Complex Representation of Sinusoids
能使用复数表示sine波的前提条件是:1.所有的sine波频率一样 2.系统是线性系统
Acos(ωt) + Bsin(ωt) <==> a + jb #where A=a, B=-b
(conventional representation) (complex number)
Mcos(ωt + N) <==> Me(jθ) #where M=M, θ=-N

(conventional representation) (complex number)