Home

Caspoc from Scratch An Engineers workbook

image

Contents

1. For each heatsink model R and have to be defined where Ry is the thermal resistance C W and Cth Ws C models the heat transport delay Cy tdetay Rin The values for and can be calculated using the tool Heatsink from the tools section in Caspoc User defined functions In the Expression block a user defiend function can be defined This block is aimed for simple algebraic equations and is faster than the Cscript block Depending on the number of inputs to the block the inputs areavailable as a b c d Use can be made of Although supported the operator can be used for raising power However it is recommended not to use operator since it is not supported in the ANSI C language To model for example Y Y Output X X use the following equation and define it at the edit field text Text d c b a Text2 File EXPRESSION4 x1 EXPRESSION41 2 a b Y1 EC Y2 Always use enough brackets to structure your equations Store files related to a project To acces various files that belong to one project from the project manager you can simply put them in a directory which has the same name as the main simulation file Both the simulation file csi and thedirectory have to reside in the same directory For example a project ca
2. Both variables iVarl and iVar2 are declared for all Cscripts in simulation In this simulation we will use the default value and replace it with a new value In the Cscript the value of iVarl and iVar2 is added and returned as the output of the Cscript block The variables iVarl and iVar2 get a new value being iVarl 3 iVar2 4 and thereby replacing the previous values These new values are set at the outputs of the CVAR blocks The Cscript is shown below int y main y iVarl iVar2 iVarl 3 iVar2 4 return After running the simulation the output of the Cscript block becomes equal to 7 except for the first time step where the output will equal the summation of the default values 1 2 CVAR CVAR CVAR1 CVAR2 3 000 4 000 CSCRIPT a The outputs of the blocks CVAR are equal to 3 and 4 because of the assignment in line 5 and 6 in the Cscript CSCRIPT1 7 000 Heatsink modeling All the dynamic semicondutor models from the library have on the right side a connection for a heatsink model The upper connection represents the losses in the model the lower connection represents the temeprature at the case Select a heatsink model from the library heatsink and connect it to the right side of the semiconductor model More heatsink models can be placed after each other but at the end a block Ambient from the library heatsink has to be placed SCOPE3
3. for i 0 i lt 2 print 5 1 1 1 print ok loop2 main int i first test for and statement on the same line puts for and statement on same line for i 0 i lt 10 i 1 1 1 amp 1 puts now with a line break puts line break between for and statement for i 0 i lt 10 i i 1 print 2 puts block instead of statement puts block instead of statement fox m s POF a e print 3 puts no initialisation statement in for puts no initialisation statement 1 0 for 1 lt 10 i 1 1 print 4 puts for 5 A print 5 puts print ok loop4 main Int s for i 0 i lt 100000 i i 1 print wi recursive main recurs 0 recurs int level int 1 i level 1 print i if level 5 print level 5 reached else recurs i return test print i main puts calling function test 4 puts function has returned return 0 puts ERROR this line comes AFTER main has returned test int val if val 1 Pf val cs 2 4 if val gt 3 puts about to return from function return 77 puts ERROR int i j global vars char ch main int i j puts Demo Program print alpha do puts enter a number 0 to q
4. Mul and ChangeE block MULTISIM ADD MUL CHANGEE MULTISIM1 ADD1 MUL1 CHANGEE1 gt 559 i1 z 17 2 1 MN The ChangeE block changes the value of R1 during the simulation as long as the second input of he block is equal to 0 Set the second input of the ChangeE blobk to zero by selecting it with the right mouse button and typing 0 Label Label d Cancel Delete node Open the ChangeE blobk by clicking it with the right mouse button and type R1 in the text box following Textl Edit Component x CHANGEE Parameters Block Diagram CHANGE Pi Value P3 Initial Condition P5 Test Texti ri Text2 Remark Labels Pig Picture Function nmm 23 907 if i2 gt 0 then the value of circuit component is changed to i1 see the Reference Guide m H otate _ to Since the time response will be around Sms set Tscreen to 20ms and set dt to 100us Select Simulation Simulation parameters to set the simulation parameters Simulation Parameters X r Numerical Integration Method Circuit Euler Trapezoidal C Gear Numerical Integration Method Block Diagram 0 p Tscreen Runge Kutta 4th order Tscreen 20 00m Screen width dt 100 0u Integration step size Show each 1 000 timestep simulation results Wait After Screen OK Cancel
5. logcfg m Add a directory to the path 6 43 PM Whenever you make a change in the Caspoc model don t forget to first export it for Simulink with the menu item Tools Export to Simulink in Caspoc Advance Topic Small Signal Analysis A small signal analysis is a synonym for determining an approximated linear model of a non linear system The small signal analysis in Caspoc determines a linear model by approximating a linear response during a simulation Therefore the method is applicable to any type of converter but with the restriction that a linear model can in theory be derived and exists When performing a small signal analysis there are two things we have to keep in mind First the small signal analysis is a linear approximation of the steady state Therefore before the small signal analysis is started the steady state of the converter has to be determined by a simulation Secondly any perturbation disturbing the linear behavior will lead to erroneous results Performing the linearization on a switched mode power supply means the averaging of the voltages and currents over the switching intervals To perform a small signal analysis of a power converter you need the block smsg for the perturbation This block can be added to a control signal or placed in series with a voltage source using a controlled voltage source B You can insert as many smsg block as you want In each scope you can calculate the smal
6. Getting Started guide we will give a brief resume of the basic operations in Caspoc Both the circuit and the block diagram are drawn in the same schematic So your model contains the electric circuit the control the electrical load or electrical machine plus an eventually mechanical system in one workspace The difference between the electric circuit and the block diagram models is indicated by the appearance of the nodes Electric circuit In the electric circuit you can model your power circuit and calculate voltages over components or between nodes and currents through components The nodes are indicated by round dots One node should be assigned to be the reference ground node which always has a voltage level of 0 volts Caspoc automatically inserts a ground label which you can replace afterwards By clicking the node with the right mouse button a dialog box pops up where you can type the label of the node For a ground reference label type 0 or ground To remove the label press the DEL key Block diagram In the block diagram you can model a dynamic system by using blocks which perform an operation on the inputs of the block For example an ADD block would add the signals at the two inputs and the result is available at the output Block diagram blocks are always operating from the inputs to the output and are automatically sorted by Caspoc The nodes in the block diagram are indicated by square dots Conne
7. Mal ZE 2 Euge 88 New Features e Key Visual C e Finding Information El e Samples Visual C Books e Knowledge Base 8 9 Accessibility Inform README for Micro It You Want to Cor Resource Template Binary File Bitmap File Icon File Cursor File Select Project Workspace and select OK This will invoke a new project Select Dynamic Link Library Microsoft Developer Studio File Edit View Insert Build Tools Window Help alsje e sz wal fei aal post Peers New Features 8 9 Key Visual C e Finding Information El e Samples 8 9 Visual C Books SDKs e Knowledge Base at e Accessibility Inform README for Micro It You Want to Con New Project Workspace Type r MFC AppWizard Console Application PScaspoczooT mpc Browse Type the directory where you want to have the files installed at Location for example d caspoc2001 MyC Type the name of the project file at Name for example and click Create Open the explorer and copy the templates standardML c and standardML def to your newly created directory Rename them to the same name as the project file for convenience for example MyC c and My
8. Fortran and must conform to S function standards t x u and flag are automatically passed to the S function by Simulink Extra parameters may be specified in the 5 function parameters field Parameters S function name Caspoc2S imulink S function parameters Cancel Apply Before running the simulation in Simulink first create the netlist in Caspoc by selecting the menu item Tools Export to Simulink in Caspoc To prevent synchronization problems never let both the simulations in simulink and Caspoc started in Caspoc run at the same time Therefore be careful to first select the start button in Caspoc and second to select the pause button to stop the simulation After that Start simulink by selecting Start from the Simulation menu If you have no file opened in Caspoc and selected the start buttton in Caspoc Simulink will generate an error if you try to attempt to start a simulation If the input width of the MUX block in Simulink and the number of FromSLNK blocks are not matching a warning will be displayed in the Matlab Command Window If the output width of the DEMUxX block in Simulink and the number of ToSLNK blocks are not matching a warning will be displayed in the Matlab Command Window You can run the simulation but it is not clearly defined which signals between Caspoc and Simulink are interchanged You can directly place a scope in Simulink and
9. Rf erro Sra teken 37 COUPLING TO SPIGE 40 EXPORT EMBEDDED C CODE FROM THE BLOCK DIAGRAM 41 CALCULATING PARASITIC INDUCTANCE IN COMPARE 42 TIPS AND TRICK FOR SPICE dean dee 43 THERMAL MODELING dau tea cuap el a yoga ie Fassa 44 NUMERICAL METHODS esa eae 45 qq e cT 46 MODELING ELECTRICAL 8 47 dcbet 48 Cscript sample programs 48 Introduction The applications notes in this book will guide you through the process of modeling and simulation in Caspoc Their sole purpose is to guide you on your way exploring the possibilities of the program You can read them to get a general overview of the possibilities of Caspoc or use them as a reference during your own simulation projects Each chapter is written to stand on its own We recommend you to first read or follow our Getting Started guide to get acquainted with the program This will take you about 15 30 minutes but covers most of the topics The topics on these chapters are advanced topics which could be useful during your won modeling and simulation projects Also the FAQ list on www caspoc com gives answers to many of your questions The very basics Although explained in the
10. can be set This Release version which runs without debugger is much faster Set the Release compile option for creating your final dll in the toolbar Project SES EAE EN KOE B Aj e oo ave 3 In the project settings Build Settings ALT F7 you can specify where the dll is created Project Settings General Debug Custom Build C C i Category Executable for debug session Working directory Program arguments ee Remote executable path and file name Settings For MyC Wi 32 Debug MyC dll Release MyC dll The function int ML C void return 1 has to be defined to let Caspoc know that this is a C file and not a Delphi file Microsoft Developer Studio MyC MyC c lol xi File Edit view Insert Build Tools Window Help 181 Bol tale eel ojee A esae include lt windows h gt files def int ML C void return 1 double _stdcall STANDARDML double input double bus double x0 double x double dxdt PL Build Debug Find in Files X Profile ELS Lni Coli OVR READ Z The explanation of the source code for this example is found in the manual under User guide Chapter 14 Multil
11. connect it to the output from the S function block Caspoc2Simulink All signals from ToSLNK block in Caspoc are displayed in this scope Installation of the coupling between Caspoc and Simulink Although it looks very simple you have to take a number of steps to let Matlab Simulink know where Caspoc is installed Start Matlab from the start menu or by double clicking the Matlab Icon on your desktop and select File Set Path Select the button Browse and select the directory where Caspoc is installed Path Browser B imi xj File Edit View Path Tools Help Current Director c caspocz001 Browse Path aang MATLABRII toolbox matlab general MATLABRII toolbox matlab ops MATLABRII toolbox mat lab lang MATLABRII toolbox matlab elmat MATLABRII toolbox matlab el fun MATLABRII toolbox matlab spec fun MATLABRII toolbox matlab mat fun MATLABRII toolbox matlab datafun MATLABRII toolbox matlab polyfun MATLABRII toolbox mat lab fun fun MATLABRII toolbox matlab spar fun MATLABRII toolbox matlab graphZd MATLABRII toolbox matlab graph3d MATLABRII toolbox matlab specgraph MATLABRII toolbox matlab graphics MATLABRII toolbox matlab uitools MATLABRII toolbox matlab str fun MATLABRII toolbox matlab iofun MATLABRII toolbox matlab time fun MATLABRII toolbox matlab datatypes MATLABRII toolbox
12. lt b gt b lt i gt italic lt i gt i x lt sup gt 2 lt sup gt x lt sub gt 0 lt sub gt Xo You can use tables or ordered lists in the HTML format lt table gt lt tr gt lt td gt R lt td gt lt td gt 1 ohm lt td gt lt tr gt lt tr gt lt td gt C lt td gt lt td gt 10mF lt td gt lt tr gt lt tr gt lt td gt L lt td gt lt td gt 10nH lt td gt lt tr gt lt table gt lt ol gt lt li gt remark 1 lt li gt lt li gt remark 2 lt li gt lt li gt remark 3 lt li gt lt ol gt Create a Cscript For complex models or modeling a control the Cscript block allows you to create your own blocks The function of the block is defined by ANSI C code see the appendix for the details on the syntax The input for the block Cscript is a and is defined as a local int variable inside the scripts Main function TIME CSCRIPT SCOPE1 CSCRIPT1 m 1 int iCount Local declaration of iCount 2 int Local declaration of 3 Main function 6 Opening brace 5 1Count 10 4 6 y a iCount Set iCount to 1 7 return y Add iCount to the input a 8 Set the output of the block to y Closing brace Local variable can be defied outside the main function as is done in lines 1 and 2 There has to be one main function with opening and closing braces see lines 3 4 and 8 The variable a is defined as being the input of the block It do
13. to be changed Create the block diagram as indicated in the figure below 2 4 COPE1 CHANGEP MULTISIM ADD MUL CHANGEP1 MULTISIM1 AD E JM 7 0 The first input should be connected to the block in which we want to vhange the parameter In this case we want to change the third parameter in the block INF which is the time constant tau of the first order differential equations modeled in the block INF Edit Component Value Bitmap Labels owt DEI JD Dy utate The second input is the new value which we want to place in the block INF using the ChangeP block Set the third input to 0 so Caspoc will automatically determine when to change the parameter To indicate which parameter to change in the block connected to the first input of the block ChangeP we have to specify the parameter p n in the block ChangeP Since we want to change the third parameter tau specify 3 Edit Component CHANGEP m Parameters Block Diagram CHAN GEP1 p n 3 n 4 Bitmap Remark D 2 Labe Function En gt 0 replace parameter pin by p in Block i 0 replace parameter pin ER 180 9 mo Help El z CASPOC 2001 A Simulation Od 8
14. 0 Start the small signala analysis by selecting the menu item Simulation Start Small Signal Analysis Simulation Options Help Start Simulation Pause Simulation Continue Simulation Simulation Parameters Multiple Simulation Parameters Start Multiple Simulation Small Signal Parameters Start Small Signal Analysis The simulation will start and when finished you can open the scopes by clicking it with the right mouse button The scope will open and first an analysis is performed You will see a progress bar in the status bar of the scope SCOPE1 File Trace Scale Options 4 4 gt 1 2 1 D 4 1 D 4 1 1 1 1 1 2 The output is displayed a linear frequency scale or on logarithmic frequency scale You set this by selecting in the scope Scale Edit left Scale and mark the checkbox Log Freq Scale The amplitude is displayed in dB Note Using the cursor keys the value of the amplitude and phase can be read The cross is however not displayed in the correct position for the logarithmic representation The upper frequency limit for displaying the Bode diagram is specified at Scale DFT Parameters Specify the number of harmonics to be displayed After changing the number of harmonics you have to select the menu item View DFT to recalculate the transfer function and redisplay all harmonics You can have up to 20 traces in
15. 5 CaspocSetComponentIC C1 Vc CaspocStartSimulation Some Description CaspocContinueSimulation notice a CaspocGetOutput VoutmV Veza 1000 Caspocfprinef3 dot Caspocfcelose cseoraspt output txt usuris cag CE Sinead at e Ca CaspocMessageBox Title Cscript Message Cscript finished return a The API calls are explained below These Calls are beta functions and are subject to changes improvements You always need a main function which called in the first place Inside the you can define integer variables and initialize them as deined in the ANSI C standard The total time of the simulation is defined using CaspocSetTscreen int Tscreen Tscreen is defined in ms a 500 CaspocSetTscreen a Open text file for storing results from the simulation The argument is the file name void CScript output txt Write numerical results to message window at bottom of the Caspoc User Interface Display a text message to the message window at the bottom of the Caspoc User Interface void prine ine 1 print script finished at i Set a parameter in block The arguments are to be filled as 1 Name of the block 2 Number of the parameter 3 Value to be set CaspocSetParameter D 1 i Set a circuit component value The arguments are to be filled as 1 Name of the circuit component 2 Value to be s
16. C def Include these two files in your project by selecting Insert Files into Project Select All Files at Files of type Select the c and the def files for example MyC c and MyC def Microsoft Developer Studio MyC x File Edit Insert Build Tools Window Help alsje Sjef Fraser Sala x e e gigs Debug asle as ca MyC files Insert Files into Project xj Filename MyC def MyC c Files of type Al Fies C 7 _ Cancel Help Addto project z E lt gt Build K Debug Find in Files Profile Ready Select Add to include the files in your project workspace By double clicking the files folder in the left window you can select the c or the def files for editing The exported function should be specified in the def file Microsoft Developer Studio MyC MyC def xl Ele Edit view Insert Buld Tools Window Help 1 asiels eae gt imuse A epe wc wezoes A ee salsales ES files LIBRARY StandardML B MyC c CODE PRELOAD MOVEABLE DISCARDABLE DATA PRELOAD MOVEABLE EXPORTS STANDARDML TEI Debug X Find in Files X Profile EIN in amp CaS REC COL OVA READ The dll which you use during debugging should not be used as final release Therefore the Release option
17. Help To specify number of multiple simulations select Simulation Multiple Simulation Parameters and enter 5 for the number of simulations x 5 lt 20 Number of Simulations Use Initial Condition Instead of selecting the start button select Simulation Start Multiple Simulation After running 6 times the scope shows the responses for all 6 runs Clicking on the scope with the right mouse button shows you the detailed responses r3 CASPOC 2001 A Simulation Odyssey multiplesim csi Modified jaj x File Edit View Insert Tools Simulation Options Help inf aia SCOPE1 File View Trace Scale Options 5 t t t D D D D D T G D T t c Ic Ic Ic 1 sma t 1 010 1 658 t 1 010m y 1 604 t 1 010 y 1 531 t 1 010 y 1 423 t 1 010 y 1 252 t 1 010 y 934 2m Voltage at 2 Run 5 Voltage at 2 Run 4 Voltage at 2 Run 3 Voltage at 2 Run 2 Voltage at 2 Run 1 Voltage at 2 Run 0 N Tscreen 20 00ms 10 00us run 5 t 0 0199999999999994 You can use the arrow keys to step through the wave forms IN 3 B 4 You can use many Multisim blocks in your simulation to control the value of components or parameters For changing parameters in the block diagram use the block ChangeP where the first input of the block ChangeP is connected to the block where the parameter has
18. Pes 9 42500000000E 0003 9 01400000000E 0001 1 80300000000 0000 E PERSONAL 8 99800000000E 0001 1 80000000000 0000 8 98300000000E 0001 1 79700000000 0000 8 96800000000 0001 1 79400000000 0000 8 95200000000E 0001 1 79000000000E 0000 8 33700000000 0001 1 78700000000 0000 8 92100000000 0001 1 78400000000 0000 SUE prar psc 8 90600000000E 0001 1 78100000000E 0000 8 89000000000 0001 1 77800000000 0000 8 87500000000 0001 1 77500000000 0000 ee 8 85900000000 0001 1 77200000000 0000 8 84400000000 0001 1 76900000000 0000 8 82800000000 0001 1 76600000000 0000 8 81300000000 0001 1 76300000000 0000 8 79800000000 0001 1 76000000000 0000 8 78200000000 0001 1 75600000000 0000 8442 9 44100000000E 0003 8 76700000000 0001 1 75300000000 0000 8443 9 44200000000E 0003 8 75100000000E 0001 1 75000000000 0000 8444 9 44300000000E 0003 8 73600000000E 0001 1 74700000000E 0000 9 44400000000 0003 8 72000000000 0001 1 74400000000 0000 8 70500000000 0001 1 74100000000 0000 Emi 9 44600000000 0003 8 68900000000 0001 1 73800000000E 0000 1 8 67400000000 0001 1 73500000000 0000 9 44800000000 0003 8 65800000000E 0001 1 73200000000 0000 9450 9 44900000000 0003 8 64300000000 0001 1 72900000000 0000 Close Open Save el sel Magnetic characteristic D caspoc2003 SomePr
19. STANDARD r3 SCOPE1 0 2188 X EIER IET B eejo 222 ale ef File View Trace Scale Options CHANGEP1 MULTISIM ADD MUL MULTISIMt ADDI MULI No 5 qm e 1M 9 7 500 1000 1250 15 00 17 50 L1 ol Siel dl Ready Tscreen 20 00ms 10 00us run 5 t 0 0199999999999994 N 0 5 Advanced Topic Experimenter Using a Cscript you can control the Simualtion in Caspoc All you need is to define a Cscript file using ANSI C where you define what actions should be taken to control the simulation Store this file with a cs extension in the project directory belonging to your simulation file If your simulation file is called C Caspoc2003 MySamples MyExperiment csi store the Cscript file in the directory C Caspoc2003 MySamples MyExperiment for example as C Caspoc2003 MySamples MyExperiment MyFirstExperiment cs In the project manager you have access to this file under the Project Files where you can double click the file to open it in a text editor To run the experimenter 1 Open the simulation file csi 2 Create or edit the cs file 3 Run the experimenter by selecting Tools Start Cscript from the menu main ine a ap 500 MEE CaspocSetTscreen a output txt ere Le e stes L0 gt PEINE CaspocSetParameter D 1 i CaspocSetComponentValue R1
20. Simulation and Animation of Power Electronics and Electrical Drives Caspoc from Scratch An Engineers workbook gt Easy access to the key functions gt Clear Concise examples gt Jumpstart into simulation eerdere 4 THE VERY BASO 5 SETTING THE MYDOCUMENTS 22 44 0 7 MULTIPLE SIMULATIONS WITH PARAMETER VARIATIONS 8 EXPERIMEN TERR 13 IDEAL SEMICONDUCTOR 16 MODEL DATABASE 18 CREATE A REPORT FROM YOUR 20 CREATE A genentaart neten 21 SHARE VARIABLES AMONG CSCRIPTS eene 22 HEATSINK MODELING Hah atado ieden 24 5 2025 sued and 25 STORE FILES RELATED A 26 MODELING LANGUAGE IN C 28 GENERATE AUTO HTML 00002 32 SIMULINK CASPOC COUPLING eene nnns 33 SMALL SIGNAL ANALYSIS nup cuarta
21. Taq My Network Files of type casPoc Schematic Files C51 Cancel 2 Advanced Topic Multiple simulations with parameter variations Suppose we want to make a simulation where we are interested in the dependence of the system on one or more parameters Instead of changing the parameter and restarting the simulation manually we use the Multiple Simulation option In a multiple simulation project you use the block Multisim where the output indicates the number of the simulation If wewant the multiple simulation to run 5 times the output of the block Multisim will be equal to 0 1 2 5 depending on the number of the simulation Using the block daigram any parameter value can be constructed from the output of the block Multisim In the dialog box Multiple Simulation Parameters which you open by selecting Simulation Multiple Simulation Parameters you can specify the number of simulations The results from each simulation are stored in the Scopes In the following example the transient response for various values of the resistor in the circuit is simulated Create the RLC circuit using the components V 1volt L lmH C 100uF R 10ohm and one Scope Place a scope at the output node of the RLC circuit as indicated in the figure below SCOPE1 L1 V1 1 C1 100uF 10 GROUND e Create a block diagram with a Multisim
22. ared These variables can only be accessed within the code defined in the filename c file The function caspocInit void should be called during initialization There is no memory allocated so no cleaning of memory is required The function caspocFunction void should be called each time from in the loop in your control application It simply executes all the calcluations of the blocks and at the end updates the simulation time t with the step size h A sample main program could look like void main void default console application caspocInit while 1 Read input caspocFunction Set output Delay h Advanced Topic Calculating parasitic inductance in Compare In Compare you can calculate inductance s for complicated 3 dimensional wire frames and bus bars See the user manual for Compare The calculated inductance s can be used in the simulation by specifying their value at the component L and the coupling for the component K Advanced Topic Tips and Trick for Spice First aid for simulating Power Circuits by A Ehle describes some general tips to increase the convergence of Spice and how to model parasitic components in Spice Improving simulation performance of switched mode power supplies by Bill Pascoe gives more tips and tricks on how to avoid the problems occurring in Spice SPICE and SPICE like Simulators have become the de facto standard simulators for analog and mixed signal desig
23. ct a S Function block from the tree list and place it in your simulink model Select a MUX block and place it in front of the S Function block Select a DEMUX block and place it behind the S Function block CASPOC In Caspoc you use the block ToSLNK block to send data to Simulink Use the FromSLNK block to read data from Simulink In the ToSLNK block first parameter specify the number of the outputs in the DEMUX block in Simulink In the FromSLNK block first parameter specify the number of the inputs in the MUX block in Simulink The number of ToSLNK blocks should equal the width of the DEMUX block in Simulink Change the width of the DEMUX block by double clicking it with the left mouse button and specify the number of ToSLNK blocks The number of FromSLNK blocks should equal the width of the MUX block in Simulink Change the width of the MUX block by double clicking it with the left mouse button and specify the number of FromSLNK blocks For example if 4 ToSLNK and 3 FromSLNK blocks are specified in Caspoc the MUX block has 3 inputs and the DEMUX block has 4 outputs iid File Edit View Simulation Format 10 tele gt S Function The integration step size which is specified in Simulink is also used for the Caspoc simulation Select a fixed step size at Solver options Simulation Parameters test_dtsmc2 lof xl Solver Workspace 1 0 Diagnostics Simulation time Start ti
24. ction between the circuit and the block diagram You can measure voltages and currents from the electric circuit using the blocks VOLTAGE and CURRENT or one of the probes from the library Using the controlled voltage source B or controlled current source A a signal from the block diagram is used a current or voltage in the electric circuit Getting output Use the Scope block to display any voltage current or block diagram signal You can insert a Scope in by clicking the first button on the bottom button bar 41 all ale tal RealInsert a Scope And place the input of the Scope right on top of a circuit or block diagram node You can resize the Scope by clicking and dragging the right bottom corner The number of inputs automatically increases while resizing the Scope SCOPE1 To display a current through a circuit component click with the left mouse button over the input of the Scope drag the mouse and release the left mouse button over the circuit component A dashed line indicates the connection SCOPE1 Scopes are automatically scaling the results the end of the simulation when pressing the F5 function key when continuing the simulation when pressing ENTER Component values You can assign values to components or edit parameters if you double or right click the component with the mouse For numerical values you can u
25. esn t have to be declared as it is done automatically by Caspoc as a local variable that is defined inside the scope of the main function The argument of the return function in this case y in line 7 is the output of the block The blocks Cscript2 Cscript3 Cscript20 have more inputs labeled from a until t Inside the Cscript block you can use loops like for while do and if then else structures Functions can be called recursively and you can pass local variables as function arguments Variables are declared from the type int Features of Cscript include Parameterized functions with local variables Recursion The if statement The do while while and for loops Integer and character variables Global variables Integer and character constants String constants limited implementation The return statement both with and without a value A limited number of standard library functions Operators lt gt lt gt unary unary amp and Support for amp amp and in comparisons Functions returning integers Comments and Share variables among Cscripts To exchange variables between Cscripts blocks or have more inputs and outputs the CVAR block is used Using the CVAR block global variables are defined that are accessible in all Cscript blocks in your simulation Use this block to 1 Send parameters to the Cscript blocks 2 Get numer
26. et CaspocSetComponentValue R1 5 Set the initial condition for a circuit component The arguments are to be filled as 1 Name of the block 2 Initial value to be set Initial voltage for a capacitor initial current for an inductor CaspocSetComponentIC C1 Ve Start the simulation The argument is not used CaspocStartSimulation Some Description Continue the simulation The argument is not used CaspocContinueSimulation notice When the simulation is finished you can get the output values from the blocks in the block diagram by calling CaspocGetOutout where the argument is the name of the block This function returns the value as an integer int CaspocGetOutput VoutmV Writes numerical results to the file opened previously with Caspocfopen The first argument is reserved for the file pointer and is not used in this beta version The other arguments are written as numerical values in the text file opened with Caspocfopen A newline constant is added by this function Caspocf print Close text file for storing results from the simulation The argument is not used in this beta version void Caspocfopen cscript output txt Displays a message box on the screen The first argument is the title of the message box and the second argument is the displayed message CaspocMessageBox Title Cscript Message Cscript finished Advanced Topic Ideal semicond
27. evel modeling and syntax Advanced Topic Generate Auto HTML Reports From each simulation you can create an HTLM report which includes the schematic and the simulation results Before creating the report you have to run the simulation to obtain the results If you would need to generate a large number of reports this could be a tedious job Instead you can use the auto generation tool which creates all the reports with simulations results from all the simulations in one directory Generate Auto HTML Export Directory D caspoc2001 In the edit field directory specify the directory which contains all your simulations Select Start to start the simulations and report generations Each simulation file with the extension csi is opened simulated and the report is generated When all simulations are finished and all reports are generated an index file is created with the name index html For each simulation Wait After Screen in the dialog box Simulation Parameters is enabled so each simulation is limited to Tscreen seconds Advanced Topic Simulink Caspoc Coupling You can couple the models in Caspoc and Simulink This is advantageous when modeling power electronics since Caspoc is better suited for modeling switching circuits especially power electronics Caspoc is running in the background and data can be interchanged between Caspoc and Simulink with the use of a S Function block SIMULINK In Simulink sele
28. f a buck converter Build the circuit as indicated below SCOPE1 L2 6 i 159 15494 SM ER 59 u 4 D1 C2 159 15494uF R2 5 V1 10 GROUND PWM11 10K The buck converter has a fixed frequency of 10kHz and fixed dutycycle of 50 Although this circuit can be analyzed easily with the state space averaging in this example the Bode Diagram of the input output transfer function is calculated beyond the switching frequency This shows that the method is independent on any switching frequency and dutycycle The resulting Bode Diagram will show the filter characteristics for a second order filter First simulate the converter until the steady state is reached Use Tscreen 1ms and dt lus for the simulation After reaching the steady state save the initial condition for this steady state by selecting Tools Save Initial Condition and save it under the same name as the csi file but with the ic extension The parameters for the small signal analysis have to be set in the dialog box Small signal Parameters which can be found in the menu simulation Select the pulse width to be equal to the simulation time step dt In theory the simulation is limited to half the sample frequency so the upper frequency limit is in this case 500kHz The amplitude of the perturbation is set to 1 which means that the input voltage of 10 volts is perturbed by 10 Small Signal Analysis B x dt 1 000u 1 00
29. fault This will create a model where the forward voltage drop over the diode equals 1 volt and the resistance of the diode equals 10mOhm The diode will turn on when the forward voltage is larger than VthOn and the diode will turn off as soon as the voltage over the diode is below VthOff All diodes where MyModel is specified at the edit field Value will have the forward voltage and on resistance as defined in the Model description ofa The following simulation shows the forward voltage and on resistance SCOPE1 When the current through the diode equals 10A the voltage drop over the diode equals the voltage VthOff 10 Ron 1 1 volt lox File View Trace Scale Options lele 4 o Model Database Parameterscan ebe defined in CON blocks but ir is more convenient to store them in a database In thissection we will discuss how to use the Model database to create user specific models Suppose we would need 2 parameters to create the offset y a I b Open the commands editor by selecting Tools Commands Editor and add the following line model offset user a 2 b 3 model offset user a 2 b 3 Default models Model Diode Dswitch Model SCR SCR Model GTO GTO Model MOSFET MOSFET Model IGBT IGBT Model ZENER Dswitch 10 Model SCHOTTKY Dswitch Model TRIAC TRIAC Model DIAC DIAC Cancel Default Help The model offset must be of
30. gnal supply voltage and load current by controlled voltage sources with the value FILE caspoc data file instead of a numerical value Specify the name of the saved text file from the Caspoc scope instead of caspoc data file Run the simulation in Spice to obtain the waveforms during the switching of the semiconductors Advanced Topic Export Embedded C Code from the block diagram You can create ANSI C Code from you block diagram which you can use in any controlling microcontroller DSP or microprocessor which has a compiler for ANSI code Since only the function of the block diagram is exported the input and output routines in your control application have to programmed separately This makes the exported code hardware independent Caspoc will export the file filename c which has the same name as your Caspoc file You have to include this file by adding it in the file list in the program manager of your compiler It starts with the variable declarations The global public variables are declared first Here all labels defined at the nodes in the block diagram are exported as double You can access these variables in your main code by using the extern variable declaration After the public variables the Private variables are declared They start with the static prefix and are declared only within the scope of the filename c file Generally speaking the two variables t and h for the simulation time and the step size respectively are decl
31. h name under My documents directory Set Options Show simulation time Show Nodes Directory 1 fe caspoc2001 samples Black White v Background bitmap Alias 2 HTML Viewer Default Caspoc HTML viewer Standard HTML Viewer Directory 2 Alias 3 Directory 3 Export figure C Export BMP Export EMF My documents directory fa caspoc2001 Ysamples Switch On Resistance 1 000U Number of digits for numerical export Switch Off Resistance 1 000M Bo 2 Cod Background Coo If you select the File Open dialog box Caspoc will by default show you the simulation files in the directory specified at My documents directory Open 21 x Look in C SAMPLES emer 57 analogmeter csi cadfem srm2001 csi FlyBack csi Animation buck csi i car csi hps buck csi B6a csi conveyorbelt csi hps_shunt_animation B6a half csi crane csi hps_vectordrive csi BLDCM csi cuk csi hps rect3pha csi i boost csi 7 dc2ac csi IM csi BreakdownVoltageDiode csi dem csi Key amp LED csi buboost csi D control csi linearsupply csi buck csi edge detection csi linearsupply2 csi ie Buck_Moving_Average csi i elevator4 csi meter analog csi cadfem IM PWM drive csi example csi mono csi History Desktop 2 My Documents a Vs My Computer
32. ical values from the Cscript block 3 Exchange numerical values between Cscript blocks 4 Provide more inputs amp outputs for the Cscript blocks Per global variable one CVAR is used Define the name of the variable at the edit field of the block In the ANSI C language both variables a and A can exist and have different values In other words a and A are not equal At pl in the properties you can also define the initial value The declared variable can be used in all Cscript blocks in your simulation In the example below two global variables are declared iVarl and iVar2 both of the type integer Their default value is set to iVarl 1 iVar2 2 by defining the default value at pl eat component x x CVAR Parameters Block Diagram 1 CVAR Parameters Block Diagram 1 Name evant pi Name CVAR2 pl 2 P2 p2 P3 PA P4 Initial Condition P5 Ihitial P5 rin RE Test Text Edit p7 Tent Vaz Text2 Pg Text2 File pa Remak es Pa in 10 Picture nction Function Global variable all Cscripts 1 Global variable in all Cscripts 0 1 Color Embedded C Type Embedded Type E Ctype static v double static 71 double zl Help Not Exported Edit in Tesla Not Exported Edit in Tesla Gees f 5
33. l signal transfer function relative to the input smsg block The basic steps for perform the small signal analysis are outlined below 1 Set the parameters for the analysis Define the frequency range Fmin and Fmax Set Tscreen equal to 1 Fmin Set the pulse width dt equal to 1 2Fmax in the dialog box small signal parameters Set dt equal to or less than the pulse width Set the pulse hight A to an appropriate value in the dialog box small signal parameters for example if the input voltage is 10 volt Remember that is a perturbation 2 Simulate the circuit until steady state 3 Save the initial conditions in ic file 4 Start the small signal analyses by selecting the small signal start button or selecting Simulation Start small signal analysis 5 The simulation will run two times First for the steady state and secondly for the perturbation 6 Open the scope with the right mouse button 7 The small signal calculation is performed automatically 8 The number of harmonics calculated is equal to Scale DFT Parameters Number of harmonics in the scope and is not adjusted automatically 9 Set the number of harmonics for example 100 or 1000 and select View DFT The small signal transfer function is recalculated and displayed 10 Each time a new small signal analysis is carried out where one of the circuit parameters is changed proceed with step 2 In the next example we will perform a small signal analysis o
34. lled MyProject contains one main simulation file MyProject csi a text file data txt and an excel sheet calc xls The simulaiton file MyProject csi is in the directory samples Create the directory MyProject in the directory Samples and save there the text and excel files Samples MyProject csi MyProject data txt calc xls Opening the Files section in the Project section in the project manager after opening the MyProject csi simulation file wil show the files and subdirectories in the Files section You can open these files by double clicking them If the simulation file MyProject csi is opened the files in the directory with the same name in this case MyProject are placed in the project manager Double click the Projects in the project manager and double click on Files All files from the directory MyProject are listed in the project manager t3 CASPOC 2003 A Simulation Experience MyHPSProject csi Modified z jaj x File Edit View Insert Tools Simulation Options Help mu il i EET M ER seis ave abl Default Scope D caspoc2003 SomeProjects MyHPSProject SCOPEZdat 2 Components Edit View Trace Scale Options E PROJECT E Fies 444 SCOPE2 dat ol Compare H H 1 IMmodeler 2 i H H 1 i H E BIET TOOLS 9 42400000000E 0003 9 02900000000E 0001 1 80600000000 0000 25 A 0
35. mat lab winfun MATLABRII toolbox matlab demos MATLABRII toolbox powersys powerdemo MATLABRII toolbox powersys powersys MATLABRII toolbox stateflow sfdemos MATLABRII toolbox sbZsl MATLABRII toolbox stateflow stateflouw MATLABRII toolbox simulink simalink MATLABRII toolbox simalink blocks MATLABRII toolbox simalink simdemos MATLABRII toolbox simulink dee Select Path Add to Path to include the path Files in simulink Cd private adams m E add_block m add line m addterms m check mdl precedence m close system m Contents m delete block m delete line m dlinmod m dtf2ss m m find system m findblib m frameedit m qcb m gcbh m qcs m gear m get_param m get fullname mm get fullname p zl eol eod ad Je p n B 6 40 7 Path Browser File Edit View Path Tools Help EEn Remove from Path Current Direct Refresh C caspoc20 Restore Defaults private adams m add_block m add line m Path C MATLABR11 toolbox matlab general C MATLABR11 toolbox matlab ops C MATLABR11 toolbox matlab lang C MATLABRII toolbox matlab elmat C MATLABRII toolbox matlab el fun C MATLABRII toolbox matlab specfun C MATLABRII toolbox matlab mat fun C MATLABR11 toolbox matlab datafun C MATLABR11 toolbox matlab pol
36. me 0 0 Stop time 1 Solver options Type Fixed step ode4 Runge Kutta Fixed step size B 4e 5 Mode SingleT asking Dutput options Hefine factor 1 Refine output OK Cancel Help Apply The total simulation time is specified at Stop time The integration step size is specified at Fixed step size The type of solver can be any as long it supports continuous time steps Preferred solvers are odel Euler 1 order or ode4 Runge Kutta 4 order If unit delays are used in Simulink select Single Tasking as Mode The selected step size has to be equal to the selected step size in Caspoc Also in Caspoc a fixed step size has to be selected In the above figure a step size of 64us is selected while the total simulation time equals 1 second Open the S functions properties dialog box by double clicking it Specify the name of the Caspoc2Simulink dll in the S function name field Be careful not to include the full path name since Matlab Simulink has no idea what to do with it If Simulink reports an error indicating that the number of input ports is unequal to the number in Simulink or that there is a general error with the simulink block please first open the example in Caspoc and select the menu item Tools Export to Simulink in Caspoc Block Parameters S Function r S Function User definable block Blocks may be written in M C or
37. ns This is true for both Integrated Circuit and board level designs Unfortunately SPICE has not always proven reliable when simulating Switched Mode Power Supplies SMPS Over the past twenty years numerous solutions at the model level have been put forth to increase the reliability of SMPS simulations While these solutions do mitigate some of the more egregious problems involved with SMPS simulation often they add other problems Recently simulation and design tools have been introduced that are specifically designed to address the problem of SMPS simulation In addition new algorithms have been added to some SPICE Simulators to make the simulation proceed more smoothly This paper discusses some of the better known model solutions and their limitations how to increase the reliability of the SPICE simulator with respect to SMPS simulation and some of the tools that are specifically aimed at design and simulation of SMPS Advanced Topic Thermal modeling Thermal modeling of power electronic systems by M Marz and P Nance describe how to use thermal modeling to predict losses in Mosfet models The article describes new SPICE and SABER simulation models which contain a dynamic link between electrical and thermal component descriptions On the one hand operating states in which a relevant inherent heating occurs can be simulated under a good approximation of actual conditions On the other hand the models offer defined nodes which
38. oet worden gedaan met de computer en niet met een theorieboek Alvorens echter met een pakket kan worden gewerkt dient de basiskennis van het opzetten begrenzen en weergeven van een model aanwezig te zijn Dit dictaat geeft een eerste aanzet in die richting INLEIDING IN DE MODELVORMING EN SIMULATIE VAN DYNAMISCHE SYSTEMEN ir Willem Dekkers In Dutch only Publications Small signal modeling using time domain models Selection of semiconductor models in power electronics simulations Rapid application development tool Tesla for fast prototyping of electrical machines Generation of embedded C code for drive applications Modeling Electrical Drives In Dutch only Appendix Cscript sample programs main ine J m y CI C IC I C I C I for i 0 i lt 10 i j 1 print x and or main test 0 test 10 0 test 0 10 test 10 10 test int i int j 4 0 1 puts wit print i print j puts if i amp amp j puts both i and j are non zero else if i puts either i and j are non zero else if 0 amp amp 1 0 puts both i and j are zero block main int d if i 1 print 1111111 else print 0000000 break continue main int 1 puts loopl for break for 0 lt 6 1 print print i if i gt 3 break print b puts p
39. ojects MyHPSProject SCOPE2 dat Tscreen 10 000ms dt 1000 000ns t 0 0099999999999991 2 Depending on the extension of the file the file is opened in the associated application Files with the dat extension are opened in the default Scope in Caspoc where you can edit its content with the numerical table editor Advanced Topic Modeling Language in C code You can build your own blocks in C using Microsoft Visual C version 4 2 or higher A template is provided which models a first order differential equation like described in the manual The example standardml csi which is provided for this template calls the modeling language file standardml dll three times and the results are compared with the results from an INF block You can run this example from the debugger and also put breakpoints in the source code to debug your modeling language r3 CASPOC 2001 A Simulation Odyssey standardml csi Modified E 4 1 xi File Edit Insert Tools Simulation Options Help ele R Ra SIGNAL 6 5 B c D E D G D H n TOML FROMML SCOPE4 Microsoft Developer Studio break standardml StandardME loj xi f A E File Edit View Insert Debug Tools Window Help 2181 xl E standardml Win32 Debug alala TOML 2 2 E FH 2 alef B iNTMultiUser 1 amp input 1 tau input 2 s
40. provide a link to the thermal environment of the component and enable for example the study and optimization of heat sink options Following a list of the basic properties of the two common thermal equivalent circuit diagrams is a description of the implementation of a dynamic temperature dependent model in SPICE and SABER using a power MOSFET model as an example Various possibilities for determining the thermal parameters are demonstrated The possibilities and limitations of the new models are presented with application based examples Theoretical topic Numerical Methods Everything should be made as simple as possible but not simpler Einstein Een model dat niet werkt is erg Veel erger echter is een model dat werkt maar waarvan niemand weet waarom Melvin Asin Dit dictaat gaat over de techniek van modelvorming en simulatie Met de huidige snelle en relatief goedkope computers wordt simulatie van systemen en componenten steeds belangrijker voor de professionele praktijk De term CASD Computer Aided System Design komt steeds vaker voor in de literatuur en illustreert het belang van het onderwerp Simulatie kan in het bijzonder helpen om inzicht te verkrijgen in het dynamische gedrag van systemen tijdens de ontwerpfase In het onderwijs wordt simulatie meer en meer gebruikt om de theorie beter te leren begrijpen en vanwege de mogelijkheid voor studenten om zelf de beschreven verschijnselen te onderzoeken Simulatie m
41. puts in the scope Both the magnitude and phase have the same color as the connection of the scope and the same color as the trace during the time domain simulation and multiple simulation Advanced Topic Coupling to Spice There is no doubt that Spice is an industry standard for circuit simulation Therefore there exist a possibility to create simple coupling between Spice and Caspoc Since Spice simulations tend to be slow and plagued with convergence problems it is not advised create a co simulation between Caspoc and Spice However Spice can be valuable when one wants to simulate one switching stack in a power converter and thereby using existing spice models for the semiconductors The following method is advised A system simulation in Caspoc for a long time period followed by a spice simulation for only one switching interval 1 Perform a system simulation of the power converter with load and control and thereby using ideal switch models for the semiconductors Run the simulation until the steady state is achieved Reset to one or two switching intervals and continue the simulation for this short period Store the waveform for the control signals supply voltages and load current This is done by displaying each of these waveforms in a scope and than saving them in ASCII text files by selecting File Save in each Scope 2 Build a Spice model using the detailed semiconductor models and model the control si
42. se the following abbreviations T 1e12 G 1e9 MEG 1e6 K 1e3 MIL 25 4e 6 M 1e 3 U 1e 6 N 1e 9 P 1e 12 F 1e 15 For example a 10000ohm resistor is written as 10k and a capacitor of 100 micro Farad as 100uF Simulation parameters Two parameters have to be set to control the simulation The parameter Tscreen defines the width of the Scope window For displaying the simulation results in seconds 1 Tscreen The parameter dT defines the integration time step As rule of thumb you can set it to approximately 1 10 to 1 00 of the reciprocal of the highest frequency occurring in your simulation For example use dT 100us and Tscreen 100ms for a line commutated converter operating 50Hz or at 60Hz or set dT 1us and Tscreen to 1ms for a Switched Mode Power Supply operating at 10kHz Starting the simulation Start the simulation by pressing the Play button gt or pressing the Enter key You can vary parameters during the simulation and simply continue by selecting the ul pause continue button or pressing the Enter key Now that you understand the basic commands of the program you are ready to start your own simulation projects Basic topic Setting the MyDocuments directory If you are opening Caspoc files from a typical directory it is convenient if the File Open dialog box automatically points to this directory You can specify this path in he Option dialog box Select Options Options and type the full pat
43. tep input 3 dxdt 1 1 tau kxstep x 1 if t gt 5 k 1 LIBML SCOPE2 LIBML SCOPE3 os NAM os NAM bus 4 x 1 mme Ms reak SCOPE 1 xj View Trace Scale Options 4444 gt Context STANDARDML double double z Name 1 input 1 input 2 bus 1 Ready Break at location breakpoint Ln 42 Coli ne E 2 In the above figure a breakpoint is inserted when t exceeds 5seconds The code for the above example is in the template standardml c Open this template by opening the standardML mdp project workspace file If you want to use the debugger place you simulation file in the same directory as standardML dll in debug mode is created This is mostly in the debug directory although you can change this in the options for the compiler If you run the example from another directory where another standardML dll is already present the debugger will not work correctly Remove the old standardML dll file before compiling a new version and debugging it in the compiler You can use this temple standardML c and standardML def for defining your own C code dlls The template contains the correct function calls and prototypes If you want to create a new C code dil start Visual C and select File New Microsoft Developer Studio EES File Edit View Insert Build Tools Window Help sels ojee memos gt
44. the type user if we want to have access to a b Create ablock diagram as shown below TIME TIME1 MUL ADD SCOPE1 MPAR MUL1 ADD1 m O D MPAR MPAR2 In the block define a in edit field and offset in text2 edit field Text Text s E dit Text2 File A default value can be defined at pl case the parameter a in the offset model is not found In the block define b in the edit field and offset in text2 edit field Also a default value can be specified at p1 The inputs of both MPAR block can be left undefined Running the simulation with Tscreen 10s and a stepsize dt 10ms gives the results as shown below r 3 SCOPE1 File Edit View Trace Scale Options lele alef af oe E Suppose we want to create another offset we could change the values in model line We can also add more offset models and select them by modelname Add the following lines in the command editor model offset user 1 b 3 model offset2 user a 2 b 3 model offset3 user 3 b 4 Adding a MNAME block to the block diagram as shown below TIME TIME1 MUL ADD SCOPE1 MNAME MPAR 69 MUL1 D ADD1 F geg i a D d MPAR 5 Starting simulation with Tscreen 10 and dt 10ms gi
45. uctor parameters The ideal semiconductor parameters are optimized for a high simulation speed and no convergence problems You can set these parameters by using the Model library In the properties dialog box for a diode Select it by right clicking the diode you can specify the name of the Model As default the model Diode is used for the ideal switch model of the diode Edit Component Parameters Block Dia 01 Name P1 Edit in Delphi Es Edit in Visual Help Lib Initial Condition Edit Help j Edit Test P7 Text2 File ae Bitmap Remark Pg D 3 4 Labels 10 Picture Function Color Rotate Ges Help C 180 90 9 Type here for example MyModel Edit Component D Name 01 Value MyMode Secondly you have to define your new MyModel Therefore you open the dialog box for the commands by selecting Insert Edit Commands In the edit field add the following line Model MyModel Dswitch Ron 10m VthOff 1 VthOn 1 2515 Default Command Netlist c Simulation Research 2001 Default models MyModel Dswitch Ron 10m VthOff 1 VthOn 1 Model Diode Dswitch Model SCR SCR Model GTO GTO Model MOSFET MOSFET Model IGBT IGBT Model ZENER Dswitch 10 Model SCHOTTKY Dswitch Cancel De
46. uit i getnum TE a D s puts numbers must be positive try again else for j 0 j lt i j j 1 print j print summed is print sum j puts while i 0 Sum the values between 0 and num sum int num int running sum running sum 0 while num running sum running sum num num 1 j return running sum Print the alphabet print alpha for ch A ch lt Z ch ch 1 putch ch puts ys 5
47. uts loop2 for break in for 1 0 1 lt 6 1 1 print a print i if i gt 3 break print b puts puts loops tor continue for i 0 i 6 i i41 print print i if i gt 3 continue print b puts puts 1 4 while break i 0 while 1 lt 6 print print i i i 1 if i gt 3 break print b puts puts loops while continue i 0 while i lt 6 print print i i i 1 if i gt 3 continue print b puts puts 1 6 do continue 1 0 do print print i 1 1 if i gt 3 continue print b while i lt 6 puts puts loop7 do break i 0 eob if do print a print i i i 1 if i gt 3 break print b while i lt 6 puts print ok main int ip J7 for 1 0 1 lt 3 1 1 1 for j 0 j lt 3 j J 1 print j i if i 1 do i i 1 while i gt 5 i i 10 For i 0 i lt 10 i i 1 else print 0000000 print i puts print execution ended without problems main if 1 1 3 2 7 print 1 else print 0 if 11 143 2 7 print 0 else print 1 if 1 1 3 2 7 print 1 else print 0 if 1 1 print if 1 1 print b loop print 4 1 1 1
48. ves offset specified by model offset3 By changing the model name in the text1 edit field in the block MNAME changes the user model Create a report from your simulation Caspoc has a build in report generator to create internet enabled reports from yopur simulation After finishing your simulations select Tools Export HTML for creating your report HTML Export _ Title Type the title here Include Workscreen Components Here you can specify the used components where you can use tables or ordered lists in the HTML format lt table gt lt tr gt lt td gt R lt td gt lt td gt 1 ohm lt td gt lt tr gt tr td Cc td gt lt td gt 1OmF lt td gt lt tr gt tr ctd Ltd td 10nH lt td gt lt tr gt lt table gt Questions Remarks Here you can type your remarks Use can be made of an ordered list ob li remark 1 li li remark 2 li li remark lt gt lt ol gt Fill the edit fields with a title of your report b Component details c Remarks Select the Export button to create your report The report will be saved under the same filename as your simulation file with html extension The worksscreen schematic will be saved as an Enhanced Meta File EMF with the emf exension All scope output will be saved with the extension scope emf You can use HTML editing commands for formatting the text in your report lt b gt bold
49. yfun C MATLABR11 toolbox matlab funfun C MATLABR11 toolbox matlab spar fun C MATLABR11 toolbox matlab graphZd C MATLABR11 toolbox matlab graph3d C MATLABR11 toolbox matlab specgraph C MATLABR11 toolbox matlab graphics C MATLABRII toolbox matlab uitools C MATLABRII toolbox matlab str fun C MATLABR11 toolbox matlab iofun C MATLABR11 toolbox matlab timefun C MATLABR11 toolbox matlab datatypes C MATLABR11 toolbox matlab winfun addterms m autoline m bdclose m bdroot m boolean m busselect m check mdl precedence m close systen m Contents m delete block m delete line m dlinmod m dtfZss m m 2 m E find system m findblib m frameedit m C MATLABR11 toolbox matlab demos 92 C MATLABRII toolbox powersys powerdemo gcbh m C MATLABRII toolbox powersys powersys gcs m MATLABR11 toolbox stateflow sfdemos gear n C MATLABR11 toolbox sbZsl C MATLABR11 toolbox stateflow stateflow gi et par getfullname m getfullname p hasmask m C MATLABR11 toolbox simulink simdemos C MATLABRII toolbox simulink dee C MATLABR11 toolbox tour C MATLABR11 work C caspocZ00lnew C MATLABR11 toolbox local hasmaskdlg m hasmaskdlg p hasmaskicon m iconedit m libbrowse m libinfo m linmod m linmod2 m cl ol ro c C rl rol nr rol o rc o rl ro za ro C rl ol n rd eol zo rl ol linsim m load

Download Pdf Manuals

image

Related Search

Related Contents

TE15 - Dana Corporation  Sun StorEdge D1000 Storage Guide  取扱説明書はこ  Samsung MAX-DC640 Manual de Usuario  Rollei 140 User's Manual    25年度 ジャボラNPO 文化庁委託事業  JVC rc-st3sl User's Manual  6 - Ricoh  取扱説明書 ローダウンフロント ローダウンフロント フォークスプリング  

Copyright © All rights reserved.
Failed to retrieve file