Matlab to Caspoc parameter export introduction.

NOTE!
First save all files before running them!

In Matlab you can calculate parameters and use these parameters in a simulation example that you can start in Caspoc. Both exporting the parameters in a file and starting Caspoc can be done from the same m script. Important is that in the xml file the parameters are exported exactly as shown in the examples below, in Caspoc you have to specify the filename:name with a colon : in between! <br>Click to close the image

Below is a simple example of simulation of a motor drive system, where the Power of the motor and the power factor of the motor are specified in a Matlab script and exported into a Caspoc simulation. <br>Click to close the image

Inside Caspoc you can read parameters from the exported file when you specify MyFile:MyName instead of a numeric value in a block diagram block or in a library block. The filename MyFile is the filename of the exported xml file, the parameter name MyNname is specified within the tag <name>MyName</name>.

Below an example xml file is shown


In library blocks you can directly specify the filename:name combination to get he parameters. Belwo an example how to get the parameters Kabel01.L Kabel01.R Kabel01.X from the file intelec.xml <br>Click to close the image



Matlab script for exporting the parameters to Caspoc Example:Download example RunCaspoc.m
Example:Download example buck.csi


This will produce the following parameter file <br>Click to close the image

The following line in the matlab script runs Caspoc and simulates the file buck.csi


Buck converter

Matlab script for exporting the parameters to Caspoc Example:Download example RunCaspoc.m
Example:Download example buck.csi
<br>Click to close the image

Power system load parameters

Matlab script for exporting the parameters to Caspoc Example:Download example grid.m
Example:Download example grid.csi
<br>Click to close the image

© 2018 CASPOC, All rights reserved. Home   |   Terms and Conditions   |   Legal   |   Export Compliance   |   Privacy Policy   |   Site Map