I am trying to match a dipole antenna to a 50Ω source. Problem is that for my frequencies (VHF) the complex impedance basically circles the 50Ω point between VSWR 2 and 3 lines. Because of that matching with a transformer or a lumped component seems impossible. To get around it I decided to use some relays to switch in different capacitors and inductors to get a good match for every frequency with some switching.
Now I'm trying to optimise these components with QUCS. I started with four sources with four different matching components. All of them go to separate sinks with the same file name.
I am running default Optimization block to try to optimise these four matching components. The problem is describing the goal for the optimiser. I can't give a formula like "max(S11)", because that would optimise one component to be good at every frequency. But I don't know how to tell QUCS that the goal is to minimise "max(min(S11, S22, S33, S44))". I am able to describe the algorithm in code, but don't know how to write it down in QUCS equations.