- This topic has 7 replies, 4 voices, and was last updated 1 year, 12 months ago by Carsten.
-
AuthorPosts
-
20. November 2022 at 22:28 #6796
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.
24. November 2022 at 12:54 #681025. November 2022 at 0:51 #6816not 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 2 years ago by Carsten.
Attachments:
25. November 2022 at 7:33 #681925. November 2022 at 8:33 #6822Today, vectors do not accept symbolic arguments. I reported it some times ago in the Forum.
25. November 2022 at 10:28 #6825Sorry, 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 #6826Hi 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 2 years ago by Enki.
Attachments:
6. December 2022 at 20:35 #6861Thank you Enki. Meanwhile, Michael sent me a preview executable, which solves the issue.
-
AuthorPosts
- You must be logged in to reply to this topic.