14 posts / 0 new
Last post
#1 Oct 2, 2017
E.android
E.android's picture
Offline
Last seen: 2 weeks 1 day ago
Joined: 2017-09-20 19:01

How to Plot AC transfer Data from File?

Hello,

I'm looking to duplicate functionality from LTSpice in PSpice. The goal is to be able to plot a set of AC gain and phase data from an included text file, allowing me to compare that response to the one of a circuit I'm actively developing. In LTSpice, the text file must have four columns as shown in the first image: '+' to allow for multiple lines, frequency value, magnitude (in dB) value, and phase (in degrees) value.

The data can then be plotted with a simple B source as shown in the second image. Can anyone please advise me on how to do this in PSpice?

Wed, 2017-10-04 10:12
RobertoGb
RobertoGb's picture
Offline
Last seen: 16 hours 4 min ago
Joined: 2016-05-24 03:10

Hi,

As far as I know, the only possibility in PSpice for that is to use the component FTABLE or EFREQ from the library ABM. The only issue is that it is not possible to read the data from a text file. You have to input the frequency values in the table property. 

FTABLE:

 

EFREQ:

 

I hope it helps. Regards

Wed, 2017-10-04 12:57
E.android
E.android's picture
Offline
Last seen: 2 weeks 1 day ago
Joined: 2017-09-20 19:01

Hi RobertoGb,

Thank you very much for the suggestion! The FTABLE will work for what I need.

The only issue is that I have data with potentially over a thousand points, and it's not practical to have to add 1000 rows to the properties of the table. Is it possible to somehow declare the FTABLE via text on the schematic and be able to simply paste in all my points at once?

Wed, 2017-10-04 13:26 (Reply to #3)
E.android
E.android's picture
Offline
Last seen: 2 weeks 1 day ago
Joined: 2017-09-20 19:01

I solved the issue by declaring the FTABLE using text and the "@PSpice:" header, then dumping all the data in the text field as well. It's not pretty, but it works.

Thu, 2019-07-25 07:54 (Reply to #4)
rashwath11
Offline
Last seen: 4 days 9 hours ago
Joined: 2019-07-25 07:48

Hallo

Can you please tell me how did you solve this problem?? even i have around 15000 points on excel to plot the Ftable.

i was referiing and found that you solved, but dint queit understand how you did it. So can you please elaborate.

It will be very helpful for my studies.

Thanks in advance

Thu, 2019-07-25 11:36
E.android
E.android's picture
Offline
Last seen: 2 weeks 1 day ago
Joined: 2017-09-20 19:01

Hi rashwath11,

I've given a project showing how I did it. The data is stored in a library called "target_data.lib" within the project and there is no limit to the number of rows. The first column is frequency (Hz), second is magnitude (dB), third is phase (degrees). My example has no phase information, so that column is all zeroes.

You can instantiate multiple subcircuits in the .lib to store different data sets. Let me know if you have any questions.

Link to project: https://txn.box.com/s/2pglvkyqch8za0vmeitsl9vl6hi1hhfr

Fri, 2019-07-26 07:27 (Reply to #6)
rashwath11
Offline
Last seen: 4 days 9 hours ago
Joined: 2019-07-25 07:48

Hallo E.android

Thank you so much for your reply. i shall try with the link and let you know if it worked.

Thanks and regards

 

Sun, 2019-08-04 07:46 (Reply to #7)
rashwath11
Offline
Last seen: 4 days 9 hours ago
Joined: 2019-07-25 07:48

Hallo again E.android

I'm unable to open the link to the project. Can you please send it again if possible.

Thanks a lot in advance.

Sat, 2019-07-27 16:28
retiredEE
Offline
Last seen: 1 week 6 days ago
Joined: 2018-03-21 12:19

Have you tried "Importing Traces"?
PSpice now allows you to import the traces stored in tabular format in a text (.txt) or comma-separated (.csv) file. Using the import feature you can import waveforms generated by measuring instruments such as digital oscilloscope to PSpice . Import feature can also be used to import waveforms that can be appended to existing data file for comparing two or more traces.  Unfortunately, it doesn't work in the Lite versions.

Tue, 2019-07-30 05:01 (Reply to #9)
rashwath11
Offline
Last seen: 4 days 9 hours ago
Joined: 2019-07-25 07:48

hallo

i actually want to give these points as input to my filter circuit. so importing its data or trace would not allow me to do that.

Thanks

Mon, 2019-08-05 10:55
E.android
E.android's picture
Offline
Last seen: 2 weeks 1 day ago
Joined: 2017-09-20 19:01

Hello rashwath11,

Here is the link: https://txn.box.com/s/lwv77wl2qux9unilhpzjilauw4cdnf51

It is only good for one week.

Wed, 2019-08-07 03:11 (Reply to #11)
rashwath11
Offline
Last seen: 4 days 9 hours ago
Joined: 2019-07-25 07:48

hii again

i had to register for Box app for the link to open and then it said the link might be removed. i tried just now and it has been only 2days since you uploaded i guess.

So maybe can you please send me on email or google drive maybe.

my email id: rashwath11@gmail.com

Thanks so much for your time and help.

Wed, 2019-08-07 11:36
E.android
E.android's picture
Offline
Last seen: 2 weeks 1 day ago
Joined: 2017-09-20 19:01

Hello rashwath11, I have sent the project to you via e-mail.

Sat, 2019-08-10 17:55
retiredEE
Offline
Last seen: 1 week 6 days ago
Joined: 2018-03-21 12:19
Has anyone used this technique when placing an E_freq part with a very large data set into their schematic?  You start by editing the data set to resemble the format shown in the PSpice reference manual.  Save it as a text file.  In Capture on the schematic page assign an alias name to the node(s) that will be the output and the voltage in the expression of the E_freq part.  Use these same node names in the part definition file.  Include this file when setting up the simulation profile.
 
For example, controlled source E1 is connected to node Ec.  The voltage in the expression is at node Vc.  The header for the E_freq part file becomes:
 
E1 Ec 0 FREQ {V(Vc)} = MAG
+  0 0 0
+  1.000000000000e+000  9.803687189572e-001  -4.270525617566e-001 
+  1.001151955538e+000  9.803686649292e-001  -4.275444928837e-001
                <all the remaining data lines>  
          
I’ve used this method successfully to enter and run a simulation with an E_freq part that has 10,000 lines of frequency data.
Download PSpice Lite and try it for free! Get PSpice Lite
Cadence