Home > Community > Forums > RF Design > Parametric Sweep for PSS type analysis and MATLAB interface

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Parametric Sweep for PSS type analysis and MATLAB interface 

Last post Wed, Jun 27 2012 2:43 PM by Andrew Beckett. 5 replies.
Started by RFQuery 07 Jun 2012 07:28 AM. Topic has 5 replies and 4364 views
Page 1 of 1 (6 items)
Sort Posts:
  • Thu, Jun 7 2012 7:28 AM

    • RFQuery
    • Top 75 Contributor
    • Joined on Wed, Jul 20 2011
    • Posts 89
    • Points 1,270
    Parametric Sweep for PSS type analysis and MATLAB interface Reply

    Dear All,

    I want to do parametric sweep of some variables of my circuit. For example I want to find IIP3 by running PSS and PAC and I want to plot the IIP3 vs value of one parameter by sweeping that variable. This result I want to interface with MATLAB.

    I went through the MATLAB Application Note  at MMSIM10.1. But I couldn't find any PSS simulation based on parametric sweep.

    I tried below and it did not work.

    In the .scs file I wrote

    sweeppss sweep param=input_power start=-50 stop=20 step=20 {
    pss  pss  fund=800M  harms=2  errpreset=conservative
    +    method=gear2only  tstabmethod=gear2only  annotate=status
    pac  pac  start=f2  maxsideband=2  annotate=status
    }

    I ran spectre filename.scs. 

    It actually did the parametric analysis. But when I did in MATLAB as below I got:-

    RFout=cds_srr('/home/manas/work_cad/TB_DIFF_NC_LNA.raw',sweeppss_pac-sweep','RFout')

    ??? Undefined function or variable 'sweeppss_pac'.
     

    RFout is the net name where the output port is connected.

    Can anybody please tell the basic way of doing the parametric analysis with all type of RF MATLAB commands.

    Kind Regards

     

    • Post Points: 20
  • Thu, Jun 7 2012 10:24 PM

    Re: Parametric Sweep for PSS type analysis and MATLAB interface Reply

    You got that error because you missed out the leading quotation mark before the analysis name. I can see the same error if I do that myself.

    If you do:

    RFout=cds_srr('/home/manas/work_cad/TB_DIFF_NC_LNA.raw','sweeppss_pac-sweep','RFout')

    (I've added the quote before sweeppss_pac-sweep which was missing in what you posted), then it should work.

    Regards,

    Andrew.

     

    • Post Points: 20
  • Sat, Jun 9 2012 11:41 PM

    • RFQuery
    • Top 75 Contributor
    • Joined on Wed, Jul 20 2011
    • Posts 89
    • Points 1,270
    Re: Parametric Sweep for PSS type analysis and MATLAB interface Reply

    Dear Andrew,

    Sorry it was that silly mistake. I couldn't check that before sending it to the forum.

    Can you please tell:-

    I actually  want to do a Monte-Carlo simulation on this PSS/IIP.

    Can you please tell is their any way to do Monte-carlo in spectre through the MATLAB interface.

    Kind Regards

     

     

     

    • Post Points: 20
  • Wed, Jun 27 2012 6:38 AM

    Re: Parametric Sweep for PSS type analysis and MATLAB interface Reply

    The matlab "interface" doesn't control the simulation - it merely reads the results (assuming you're talking about the Spectre/Spectre RF Toolbox for Matlab). So I don't think I really understand your question...

    Andrew.

    • Post Points: 20
  • Wed, Jun 27 2012 7:28 AM

    • RFQuery
    • Top 75 Contributor
    • Joined on Wed, Jul 20 2011
    • Posts 89
    • Points 1,270
    Re: Parametric Sweep for PSS type analysis and MATLAB interface Reply

     Dear Andrew,

    Thanks a lot for your reply.

    a) OK. The Matlab interface can only read the result.

    Whether it can read a Monte Carlo simulation run by SpectreRF ?

    b) Is it possible to do through this interface ( I mean reading all types of simulated data) what Ocean script does ?

    In other words whether it has the capability to replace ocean script.

    c) Is it possible to run / control the Spectre Simulation through MATLAB. ( I am not meaning the Spectre-Matlab Interface. I got the point that this is only meant for reading the data)

     

     

     

    • Post Points: 20
  • Wed, Jun 27 2012 2:43 PM

    Re: Parametric Sweep for PSS type analysis and MATLAB interface Reply

    Answers to your questions:

    a) Yes, it can. You'd probably want to use the option to save family data so you get the curves for every iteration in the monte carlo run, and then you'll be able to read the data in Matlab (it will have "iteration" as a sweep variable. It probably wouldn't be terribly difficult to write some code to read the mcdata/mcparam scalar files that are also produced during monte carlo (there's a solution on Cadence Online Support to do this - the "abStats.il" code shows how to do that in SKILL)

    b) You can read all the simulation results, so presumably you could write functions to do whatever post-processing you need. Of course, there are convenient functions which directly operate on the waveform objects already existing in SKILL - you'll have to implement your own in Matlab to ensure they can work with family data and unevenly spaced points, etc, etc - but in theory there's no reason why you couldn't do all the post-processing in Matlab if you preferred.

    c) Yes - there are functions in Matlab to invoke commands - so you'd simply need to invoke spectre from Matlab. We don't provide anything specific to do that, but it wouldn't be hard.

    Andrew.

    • Post Points: 5
Page 1 of 1 (6 items)
Sort Posts:
Started by RFQuery at 07 Jun 2012 07:28 AM. Topic has 5 replies.