- Getting started with CASPOC
- Creating the schematic
The next paragraphs describe the modeling and simulation of a simple converter in CASPOC. After going through these paragraphs (+/- 30 minutes), you will be able to model and simulate your own designs using the schematic editor and simulation program.
Open the program CASPOC by selecting Start/Programs/CASPOC in the start menu.
The schematic editor will be shown on the screen, where you can start creating your model.
In the following paragraphs the schematic entry is explained. Please follow the steps in detail. The figures show the results after each step you take.
In this paragraph we will simulate the following schematic.
We start with placing the components. Select in the list on the left side of the screen the controlled voltage source B. To do this click with the left mouse button on the B and release. We now drag the selected component to our work sheet. By clicking the left mouse button again we place the component.
In the electric circuit at least on label should be named ‘Ground’ or ‘0’. Select [Yes] in the following dialog box
All voltages are measured to this node. Later we will change the labeling of nodes.
Move the mouse cursor over the component and click the right mouse button, which brings up the following window.
The name of our component stays B1 and the direction is set to 180°. To rotate the component, click 180°. This angle gives the direction of the current through the component as in the next figure.
After pressing [OK], and selecting [Yes] for the automatic inclusion of the label ‘Ground’, we see that the component has rotated.
Next we will place the diodes. We select "D" in the list (see also the figure below) and again drag the component onto the worksheet and place it over component B1.
For this component we also can enter its properties by clicking the right mouse button over the symbol. The name stays "D1", the direction is set to 270°. The field "Value" refers to the default diode model. We leave this at the default setting. Close the window with pressing [OK].
If we now select the component with the left mouse button, it will be shown dashed.
If we now keep the left mouse button down, we can move the component. After releasing the left mouse button, the component is placed. We add the second diode by again selecting "D" from the list on the left side of the screen. The newly placed component will have the same direction as the previously placed one. Move the pointer over the work sheet and click the left button to place the diode. We also place diodes 3 and 4 in a similar way. In the following figure we have done this and also have added an inductor "L1" by selecting "L" from the list and placing it on the work sheet.
We select "L1" with the right mouse button and enter its properties.
The name is set to "Lfilter", the value to 50mH and the direction to 180°.
The "Value" field excepts the following notations:
m 1e-3 u 1e-6
k 1e3 n 1e-9
Meg 1e6 p 1e-12
Close the window by pressing [OK]
In the following figure we have placed capacitor "C".
For the capacitor we also enter its properties:
The name is set to "Cload", the value to 1mF and the direction to 90°.
The resistor "R" is placed in the same way as the other components. It has a value of 6 ohm and has the name Rload.
Our next step is to connect the components by drawing lines on the worksheet. To draw a line, start with clicking the left mouse button on a node (black dot) and dragging it to the end point of the supposed line. Releasing the left mouse button draws the line and creates a connection. Lines can only be started on nodes.
If we have made a mistake, it is easy to remove a component or line. Select the component or line by left-clicking it. Selected components or line are shown dashed. By pressing the Delete key on the keyboard, the selected component or line is removed.
To remove a node or very short line, select the node or one of the line's nodes with the right mouse button. In the dialog window select [Delete node] and the line will be removed.
After drawing all the lines we have the following figure.
In the schematic we now have to indicate a reference node by labeling it "0" or "ground". All voltages are calculated in relation to this node. In our example we take the right hand bottom node. Click this node with the right mouse button and label it "ground" as in following figure.
The input field "Label" excepts "ground" or "0" as reference node. Select [OK] to place the label. The label "Ground" is defined twice. Remove the label "Ground" at the voltage source B1 by clicking this node with the right mouse button. Press the [DEL] key on your keyboard to remove the label. Select [OK] to remove the label from the schematic.
We also define the label "out", which we will use when displaying simulation results. Click the most right upper node with the right mouse button and label it "out"
We now have the following figure.
The schematic is ready, all we have to do now is add a block diagram where the voltage of B1 is defined. This block diagram consists of a block TIME (simulation time in seconds) and a block SIGNAL (wave generator) to construct a sinusoidal voltage of 25volt. Use the vertical scroll bar in the list box to view all components and blocks.
Select the block "TIME" in the list on the left side of the screen and place it on the work sheet.
To edit the properties of the block we select the block "TIME" on the worksheet by right clicking it. In the property dialog box we give the component a name. Type "t" in the input field. This name label will also be the label of the output node of the block. Select [OK] to close the dialog box. The label "t" will also appear at the output node of the block "TIME".
Behind the block "TIME" we will place the block "SIGNAL" as shown in the next figure.
We will label the five inputs in the same way as we labeled the nodes in the circuit. Select the input nodes of the block "SIGNAL" by clicking the right mouse button over the node and enter the value as specified below.
DC voltage DC 0
Amplitude AC 25
Frequency F 50
Phase Phase 0
Duty cycle d 0
We also have to specify parameters for the block "SIGNAL". Select it by clicking the right mouse button over the block, which brings up the following window.
The third parameter p3 indicates the type of waveform. Entering 3 indicates a sinusoidal. The name of the component will be set to "Vin" at the input field Name.
The block diagram is ready. We only have to create the connection between the electric circuit and the block diagram. Draw a line between the output of the block "SIGNAL" and the input of the component "B1" (start drawing a line by clicking the left mouse button over a node).
Finally we have to add a block "SCOPE" for viewing the simulation results. Select the block "SCOPE" in the list on the left side of the screen and place it on the work sheet. Place it such that the input of the block "SCOPE" is over the circuit node.
The schematic is ready. We only have to specify the integration step size for the simulation and the length in time of the scope. Select the menu item Simulation/Simulation Parameters.
In this example the integration step size is set to 100m s and the length of the screen is defined as 100ms. The checkbox
[x]Wait After Screen
is marked, so the simulation will hold after 100ms of simulation time.
Select [OK] to close the simulation parameters dialog box..
The model is ready and we will store it on disk. Select the menu item File/Save As.
Enter the name of the file in the input field "File name", for example, "Example.csi". The extension .csi is used for the schematic. Select [Save] to store the file.
The simulation is started in the schematic editor. The simulation results are displayed directly in the schematic in the block "SCOPE". This scope is has an auto resize function. Resizing takes place each time you continue the simulation.
Start the simulation by selecting Simulation/Start simulation.
The simulation will start and immediately draw the simulation results in the scope. The scale in the scope is not defined yet.
To view the simulation results we select the block "SCOPE" on the worksheet by right clicking it. A resizable window pops-up where the output voltage is shown.
You can trace the numerical value of the signal using the arrow keys. In the list box the time and numerical value of the output voltage are shown.
The simulation can be continued by pressing [ENTER] or selecting Simulation/Continue simulation. At any time you can interrupt the simulation, make changes to the schematic, and continue the simulation by pressing [ENTER].
In this paragraph we will export the schematic and the simulation results to a text processor.
We can copy the simulation results to the clipboard, which can than be used in any text processor or drawing program. Before we copy the simulation results we set the background color of the scope to white. This will prevent a black background costing an enormous amount of toner. In the SCOPE window select Options/Background Color.
Start the simulation. If the simulation is ready, press the "PrintScreen" key on your keyboard, which copies the simulation results to the clipboard. Open your text processor, and select the menu item Edit/Paste. The simulation results are now included as figure in a text document.
We can include the schematic into a text document, by first exporting it to an Enhanced Meta File (*.EMF). This file can than be opened in a text document. To export the schematic, select File/Export EMF.
The dialog box "Save As" pops up, where you can give the name of the exported schematic.
In the dialog box, select the directory and give the name of the file (extension *.emf). Select Save to export the schematic. Open your text processor and include the figure in your document. For Example, in Microsoft Word, select the menu item Include/Figure/From file. In the dialog box set File Type to "Enhanced Meta File", select your exported schematic (*.emf) and click [Open], which will include the schematic in your text document.
If your text processor can not read files of the enhanced metafile type, you can also copy the schematic to the clipboard and paste it into your document. In the schematic editor press the key "PrintScreen" on your keyboard. In your text processor select Edit/Paste, which includes the schematic into your text document. However only the part of the schematic, which is shown on your screen, is copied into your document.
To print the schematic on paper, select File/Print.
In the dialog box, select [OK]. The schematic will be printed.
If the schematic is too small, you can enlarge it by selecting Options/Zoom. Select a higher zoom factor and select File/Print, [OK] again. The print will be enlarged.