Home Forums Usage parameter sweep with >1 Parameters

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #6796
    Carsten
    Participant

      I would like to do a parameter sweep during which 3 components (e.g. capacitors) change their value according to a list.

      The parameter sweep has a ‘list’ mode, but this let’s me only “sweep” one value.

      #6810
      Enki
      Keymaster

        Hi Carsten,

        Is this what you want to achieve?

        Parameter sweep example

        • This reply was modified 1 year, 5 months ago by Enki.
        #6816
        Carsten
        Participant

          not quite.

          In my design, there is no formula to calculate the component values from the sweep variable. It needs to be an arbitrary lookup table. You can do this with the “list” in the parameter sweep block. But only for one parameter.

          I would like to do something like the one attached. But if I runt it, QS complains

          Error in ‘Eqn2’: Wrong index for ‘c_vec’ in equation “c_vec[setup]”.
          Error in ‘Eqn1’: Wrong index for ‘r_vec’ in equation “r_vec[setup]”.

          • This reply was modified 1 year, 5 months ago by Carsten.
          #6819
          Carsten
          Participant

            ..schematic attached

            • This reply was modified 1 year, 5 months ago by Carsten.
            Attachments:
            #6822
            zhu
            Participant

              Today, vectors do not accept symbolic arguments. I reported it some times ago in the Forum.

              #6825
              QucsStudio
              Keymaster

                Sorry, this is not yet supported, but on top of the todo list. For small lists, the if() statement could be used, but it’s very tedious.

                #6826
                Enki
                Keymaster

                  Hi Carsten,

                  There is an indirect way to do it with Matlab or octave. You can generate a netlist from your schematic with Simulation\Show Last Netlist or shift+F5, and save the file as a txt document.

                  Then flowchart would be something like this:

                  1. Load the file in Matlab or Octave
                  2. Run the simulation with a for loop to go through the lookup table
                  3. Modify the lines where the capacitor and resistor are to introduce the values you want in each step of the loop
                  4. Read the ‘dat’ files with the S parameters from simulation
                  5. Process data in a convenient way for you

                  I’ve done it in the past for other circuits and it works well. Find attached the matlab functions that will help you to run QucsStudio and read the S-parameters. I built them from the information I gathered time ago in this forum so I am not the original author, I just put the information together for my needs.

                  Remember to share the solution when you implement it 😀

                   

                  • This reply was modified 1 year, 5 months ago by Enki.
                  #6861
                  Carsten
                  Participant

                    Thank you Enki. Meanwhile, Michael sent me a preview executable, which solves the issue.

                  Viewing 8 posts - 1 through 8 (of 8 total)
                  • You must be logged in to reply to this topic.