- This topic has 7 replies, 4 voices, and was last updated 6 months ago by
Carsten.
-
AuthorPosts
-
20. November 2022 at 22:28 #6796
Carsten
ParticipantI 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.
24. November 2022 at 12:54 #6810Enki
ParticipantHi Carsten,
Is this what you want to achieve?
-
This reply was modified 6 months, 2 weeks ago by
Enki.
25. November 2022 at 0:51 #6816Carsten
Participantnot 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 6 months, 2 weeks ago by
Carsten.
Attachments:
25. November 2022 at 7:33 #6819Carsten
Participant25. November 2022 at 8:33 #6822zhu
ParticipantToday, vectors do not accept symbolic arguments. I reported it some times ago in the Forum.
25. November 2022 at 10:28 #6825QucsStudio
KeymasterSorry, 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.
25. November 2022 at 10:29 #6826Enki
ParticipantHi 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:
- Load the file in Matlab or Octave
- Run the simulation with a for loop to go through the lookup table
- Modify the lines where the capacitor and resistor are to introduce the values you want in each step of the loop
- Read the ‘dat’ files with the S parameters from simulation
- 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 6 months, 2 weeks ago by
Enki.
Attachments:
6. December 2022 at 20:35 #6861Carsten
ParticipantThank you Enki. Meanwhile, Michael sent me a preview executable, which solves the issue.
-
This reply was modified 6 months, 2 weeks ago by
-
AuthorPosts
- You must be logged in to reply to this topic.