下面這篇文章,是講述如何利用試用版的電路模擬軟體,來分析電子電路的電壓電流狀況,或是在交流電源下的頻率響應等等。文章最後附的超連結,是我在當電工學助教時,給同學上課用的投影片,供大家參考看看。

  The following article is to describe how to analyze the performance of circuit with the simulator of trial version. This analysis includes voltage/current/power level, transient analysis, frequency response and etc. We also attach the corresponding slide by the link in the end of this article. It is made by myself and instructed in the course of Electrical Mechanism when I was TA before. Just for your reference.

 

  關鍵字:Cadence、OrCAD、PSpice、Simulation、Tutorial


image  這套電路分析軟體,OrCAD,是由 Cadence 這家有名的 EDA 公司所推出的產品,其目的主要在於可以模擬並分析,由電源、電阻、電容、電感、二極體、電晶體或是運算放大器等基本電子元件,所組合而成的微電路。分析的內容包括,基本的電壓、電流大小、直流工作點、暫態分析以及頻率響應等等,透過這些分析,我們可以不用上麵包板作實驗,就能夠直接知道電路的工作情況,進而加速我們的研究或開發。

  This circuit simulator,  is developed by the famous EDA company, CadenceTM. The purpose of this software is to simulate and analyze the microelectronic circuit, which is composed of source, resistor, capacitor, inductor, diode, transistor, operational amplifier and etc. It includes the analysis of voltage/current bias, DC sweep, transient analysis and frequency response. Instead of experiment of hardware, we can understand the behavior  of the circuit in advance and enhance the research or development process.

 

  雖然整套軟體,是屬於付費的商業軟體,但幸運的是,他有提供官方的試用版,可供使用者下載安裝使用。儘管在功能上有限制,但對於一般簡單的電路來說,已足以滿足我們的模擬需求。所以我在上課的時候,是建議台下的同學,直接到官網下載試用版來使用,而不需特地花時間去找盜版。

  However, this circuit simulator is not free. It costs a lot for license. But fortunately, there is trial version provided by the official. The users may download the file, install the software, execute the simulator and it is good enough for ordinary circuit. This is the reason why I suggest the audiences downloading the trial version directly instead of searching for piracy with lots of efforts.

 

  關於上面這幾段的內容,主要是在簡介 PSpice 這套軟體的用途,而在下面章節,我們才會介紹一些使用上的概念,至於詳細的操作步驟,請參考最後一行超連結內的投影片內容。

  The above is to describe the purpose of the software, PSpice. In the next chapter, we will introduce the concept for the manipulation. For the detailed steps, please refer to the content of the slide attached in the final link.


  主要的操作流程,可以分成下列幾步:

  The main steps for manipulation are listed below: 

  •   1. 建立新專案   | Create a new project
  •   2. 新增資料庫   | Renew the cell libraries
  •   3. 在圖上加入元件 | Add elements on layout
  •   4. 連接元件及接地 | Connecting and grounding
  •   5. 設定模擬環境  | Setup the environment
  •   6. 進行模擬    | Run the simulation
  •   7. 觀察圖表設定  | Display the desire curve

  一開始,先建立一個新專案,用來儲存相關的電路資訊。由於預設的資料庫不敷使用,所以我們得另外新增路徑,這樣才能使用更多的電子元件。在圖中的空白區域內加入好電子元件後,還須用電線將其連接再一起,並且作接地的動作,如此一來,基本的電路圖才算完成。

  At the beginning, user should create a new project for storage of all the information used. Due to the lack of default electrical elements, it is necessary to add a new path for cell libraries. After all the elements are added in the blank region of the layout, connection and grounding is essential. After these procedures are done, the circuit is finished.

 

image image image

    加入元件 Add elements   連結元件 Connection wire     接地 Grounding

 

  接下來,便是對模擬環境加以設定,是為了作時間上的暫態分析,還是要做頻率上的頻率響應。設定完成之後,便是開始進行模擬。而完成模擬之後,還不能直接看到任何有意義的圖形。這是因為欲觀察的曲線,還需使用者自行設定該縱軸橫軸,電腦才能根據模擬結果作圖。

  In the next step, it is to setup the simulation environment. The parameters for analysis are different between the transient analysis in time domain and frequency response in frequency domain. After these are done, it is to start the simulation. However, there is nothing shown in the screen after the simulation is completed. This is because the user should figure out what the horizontal/vertical axis is and therefore the software can generate the corresponding plot according the result of simulation.


  關於分析的環境設定,主要分成下列四項:

  There are four environments setup for simulation:

  1.   1. 工作偏壓   | Bias Point
  2.   2. 直流振盪   | DC Sweep
  3.   3. 暫態分析   | Transient Analysis
  4.   4. 交流振盪   | AC Sweep

 

  首先是第一項,工作偏壓。其目的在於,分析該電路在穩態下,各元件的直流電壓或是電流,藉以得到其工作點的訊息。而關於第二項分析,直流振盪,則是用於分析不同的直流電源下,該電路各元件的電壓電流狀況。

  First, it is “Bias Point.”The purpose of this mode is to analyze the DC voltage/current under the steady state and hence the bias information is known. The second one is “DC Sweep” which is to analyze the voltage/current of each element with different output voltage/current of the source.

 

image           image

  工作偏壓Bias Point                                           直流振盪 DC Sweep

 

  這兩者有點相似,而最主要的差別,在於工作偏壓環境下的電源,通常是固定的,所以是分析該狀況下的電路;而直流振盪則不然,藉由設定電源的振盪範圍,藉以分析不同電源輸出下的電路狀況。舉個簡單的例子,如果用工作偏壓去分析二極體,則只會得到順向時或逆向時兩種結果,但是如果用直流偏壓來分析,則可以得到該二極體,電壓與電流成指數成長的曲線。

  It seems similar between the two modes. The main difference lies in the fact that the source is fixed when Bias Point is run and the simulation will generate the result under that condition. However, the output voltage/current of the source is varying when DC Sweep is applied. It is to analyze the circuit behavior under different voltage/current value of the source. For example, if we try to analyze the diode with Bias Point mode, there are only two situations, one for forward bias or the other one for reverse bias. Instead, i-v exponential curve of diode will be generated  if we apply the DC Sweep mode.

 

image              image

     暫態分析 Transient Analysis                             交流振盪 AC Sweep

 

  再來是第三項,暫態分析。該項分析的特色在於,此項模擬會去紀錄不同時間點的電壓電流變化。主要的用途,用於觀察在交流電源下,因為電容電感等主動元件所造成的充放電情形。最後是交流振盪。目的則是在於,觀察不同頻率下的電壓電流狀況,通常是用在,欲得知該電路在各個頻率下的增益情況,換句話說,也就是頻率響應。

  The third one is “Transient Analysis.”The characteristic of this mode is that this simulation will record the voltage/current level in time domain. It is used to observe the phenomenon of charging/discharging due to the active component such as capacitor or inductor when the AC source is applied. The final is “AC Sweep.”This mode is used to observe the voltage/current gain during each frequency. In the other words, it is used for analysis of frequency response.

 

  總結這四項分析,各自有其特色存在:工作偏壓是為了分析固定電源下的狀況;直流振盪的目的,在於分析不同直流電源輸出大小的電路;暫態分析,用於觀察時間軸上的電路變化;而交流振盪,則是用在觀察不同頻率下的電壓電流增益,也就是頻率響應。這邊要注意的是,不同的分析模式,必須用相對應的電源才行,如果兩者之間不吻合的話,可能會出現錯誤訊息,導致模擬失敗。

  Summarizing these four analysis mode, there are own characteristics:Bias Point is to analyze the circuit with fixed voltage/current source;DC Sweep is to analyze the circuit for varying voltage/current of the source;Transient Analysis is to record the voltage/current variation in the time axis;AC Sweep is to plot the frequency response. By the way, it should be denoted that the each analysis mode corresponds to the specific voltage/current source. If it is not matched, the error message may show and cause the simulation failed.


  最後附上該投影片,內容主要是實際操作時的步驟說明,而關於概念的部分,則是已經在上面幾段裡呈現。

  Finally, we attach the presentation slide in the following link. It is about the detailed steps of how to run the simulation. For the concept of simulation, we have illustrated in above paragraph.

image

                            投影片(Slide)


  這是第一次用中英文同時寫,感覺還蠻新鮮的,只是如此一來,整體開發的速度又慢了一截。分享這篇的目的,主要是不希望當時花心力所準備的東西,就這樣束之高閣,於是特地寫了這篇文章。

文章標籤

創作者介紹
創作者 uxijgil 的頭像
uxijgil

作自己

uxijgil 發表在 痞客邦 留言(3) 人氣()