Code covered by the BSD License  

Highlights from
Matlab <-> PSpice Interface

Be the first to rate this file! 27 Downloads (last 30 days) File Size: 121.23 KB File ID: #25028
image thumbnail

Matlab <-> PSpice Interface

by Frank Sommerhage

 

14 Aug 2009

How to call PSpice from Matlab and import the results

| Watch this File

File Information
Description

YOU WILL NEED TO DOWNLOAD THE FREE VERSION OF PSpice 6.0 DOS (see below)!!!

The MPS Interface creates one full loop between Matlab and PSpice (you can add fitting routines later). It is a fully running function/program, but you will need to write your own code to adapt it to your problem!! Please see this tool as a demonstration that shows you, how to connect Matlab and PSpice 6.0 for DOS (works absolutely fine).

The zip-file contains the demo files test.m and test.mat and also the files

- makeNetList.m : a simple electrical circuit with variables
- writepwl.m : to write time/data files for PSpice
- readdat.m : to import data from PSpice
- PSpice60.m : to set parameters and call PSpice

and also

- setPCM.m : just a specific file for my demo problem
- writeCIR.m: shows what's necessary for a *.cir file

Extract all files and folders (!) and files to C:\ (you can change this later). Also download PSpice 6.0 (see below) and install/extract it. Copy the files PSEXEC.EXE and DOS4GW.EXE to C:\MPS\PSpice60\.

Then you're good to go, change the current Matlab directory to C:\MPS\Matlab\ and start with "test.m"

This is an early 'prototype', I will try to update it A.S.A.P. and add a detailed explanation/tutorial... However, the advanced user might like this as a template already.

MATLAB release MATLAB 7 (R14)
Other requirements PSpice 6.0 for DOS this will not work with other PSpice Versions! I found PSpice 6.0 DOS for free from http://people.seas.harvard.edu/~jones/es154/pages/PSpice/PSpice.html Alternatively you can google it with "PSpice DOS" and download whereever you want.
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (6)
03 Sep 2009 Pieter Jacqmaer

Dear,

could you please also upload pspice 6.0? On the site you mentionned, the spice installation files seem to have been removed. Also, I don't find version 6.0 using google on the Web and really looked hard for it. Thanks!!

Pieter (Pieter.JacqmaerATgmail.com )

04 Nov 2009 yilong zhu

If it can be used for pspice 16.2, it will be perfect.

11 Feb 2010 Richard Crozier

I too can't find PSpice 6.0 anywhere, will any other free version work?

06 Mar 2010 ed1pp ed1pp1

Hello, can i ask somwthing i am trying to export data from pspice which 0 to 5 volts square wave coming out from D latch and import in matlab. Do you know how to do? Can someone help me

29 Mar 2010 Alicia Lopez

Hello!
I'm trying to run pspice 9.1 and a .cir file from Matlab but i can't get it. I tried with functions system, dos, open, winopen.. but nothing.
Does somebody know something else to do??
Thank you so much.

23 Dec 2010 ThomasV Voglhuber

PSpice 6.0 for DOS is hard to find.

I think I found it on a turkish site (the last two links):

http://mimoza.marmara.edu.tr/~fboynak/DERSLER/ELC437/

enjoy

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
data Frank Sommerhage 14 Aug 2009 11:28:02
import Frank Sommerhage 14 Aug 2009 11:28:02
pspice Frank Sommerhage 14 Aug 2009 11:28:02
data import Frank Sommerhage 14 Aug 2009 11:28:02
data export Frank Sommerhage 14 Aug 2009 11:28:02
export Frank Sommerhage 14 Aug 2009 11:28:02
data Wen 28 May 2010 13:45:17
data export Wen 28 May 2010 13:45:19

Contact us at files@mathworks.com