• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. RF Design
  3. Parametric Sweep for PSS type analysis and MATLAB inter...

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 62
  • Views 15628
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Parametric Sweep for PSS type analysis and MATLAB interface

RFQuery
RFQuery over 13 years ago

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

 

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    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.

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RFQuery
    RFQuery over 13 years ago

    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

     

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    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.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RFQuery
    RFQuery over 13 years ago

     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)

     

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    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.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information