Home Forums Usage sweep including optimizing task

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #6839
    Carsten
    Participant

      Is it possible to do a parameter sweep, which involves an optimization?

      Something like this. (also attached as project file)

      The schematic works, when L1_value is fixed. Activating the parameter sweep instead leads to

      Error in ‘Opt1’: Goal result ‘real_part_123MHz’ is not a single number.

      • This topic was modified 1 year, 4 months ago by Carsten.
      Attachments:
      #6850
      QucsStudio
      Keymaster

        This is currently not possible. I’ve never thought about such a task. Indeed it would make sense. But several things (like “apply optimized values to the circuit”) would not work then.

        #6851
        Carsten
        Participant

          So another donation? 🤔🙂

          I guess questions like the “apply optimized…” could be implemented later. necessary would be e.g. to make xy.opt an array with the size of the parameter sweep. I just don’t know if this would mess up your code base. Somebody could also probably come up next with another still unsupported combination of tasks. And of course, these things can probably be done with matlab/octave “from the outside”.

          Still, a scenario like above seems to me like a nice feature that could be useful for others. Me, however would be glad to have it.

          #6874
          QucsStudio
          Keymaster

            I had a closer look on it. The realization is quite straight forward and it is a nice idea, indeed. Now I wonder why I haven’t thought about it earlier.

            #6875
            zhu
            Participant

              QucsStudio is able to optimize several parameters at a time.

              #6878
              zhu
              Participant

                Modify the *.txt extension to *.pdf. This is a weakly determined task.

                #6879
                zhu
                Participant

                  Resent in *.png

                  Attachments:
                  #6916
                  Carsten
                  Participant

                    Hi zhu.

                    my example above was created on purpose to show the limitations of qs.

                    I find your systematic test very interesting. I would have thought that the example has no local optima, thus being an easy example.

                     

                     

                    #6942
                    Carsten
                    Participant

                      indeed, if the parameter space is sampled too sparse, a lot of local maxima appear

                      • This reply was modified 1 year, 3 months ago by Carsten.
                      #6946
                      Carsten
                      Participant

                        .. on the other hand, the optimizer algos are not limited in resolution and there should be a clear gradient towards the maximum inductance value.🤔

                        #6949
                        zhu
                        Participant

                          Hi Carsten,

                          The task has a minimum of Re(Z)=0.2 at c1=0 independent of L1. It is confirmed by plotting the analythical result. However computing with real(Z) form simulations a totally different (noisy) plot is obtained. It is not a QucsStudio issue: the same results arise from Octave and Matlab as well. The oscillating optimization results may also have the same origin.

                          Any idea?

                          #6953
                          Carsten
                          Participant

                            your formula must be wrong. At resonance frequency (e.g. 25pF / 67 nH at 123MHz), Z is a very high ohmic (real) value. I don’t see that in your plot.

                            compare with figure (2): L at resonance should be 1/(omega^2*C). This corresponds nicely with the chain of peaks.

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