TheRadioBoard

Forum for the homemade radio builder. Newbies and Experts and everyone else are welcome here!
It is currently Thu Jun 20, 2013 7:15 am

All times are UTC




Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Wed Jan 12, 2011 6:51 am 
Offline

Joined: Sun Apr 08, 2007 8:02 am
Posts: 1214
Location: Saskatoon
For those people who would like to run some circuit simulation software like LTSpice, but don't run Windows, you may be interested in the circuit simulator software called QUCS available for free here:
http://qucs.sourceforge.net/
It's apparently somewhat compatible with Spice, in that it is supposed to be able to import Spice netlists, though I haven't tried this feature yet.

I have been using the Macintosh version of the program for a while now, and am quite impressed. It also runs under Linux and of course Windows too. The biggest drawback at the moment is a severe lack of good documentation. However, I've stumbled my way through the program and am gaining a fair understanding of its operation, so I could probably answer many of the newbie questions.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 12, 2011 10:27 am 
Offline

Joined: Sun Feb 28, 2010 2:12 pm
Posts: 1025
I've also been trying QUCS for a few months and it seems quite nice indeed. It even runs on my Linux-based mobile phone, so I have something to do during those long train commutes :) Also, not having an oscilloscope, I find that QUCS is an invaluable learning tool.

I do have a couple of questions I've been wondering about though. Let's start with impedance simulations. Say you measure transistor amplifier input and output impedance using this method:

http://www.zen22142.zen.co.uk/Tina/tinainz.htm

Are the results close to reality in the HF range (say 12 MHz), where junction capacitances begin to affect impedance? I typically use 2N3904s, and QUCS has a 2N3904 model, but I wonder how close to reality the impedance measurements are.

Next, moving up in complexity... let's say you model a transistor regen (i.e. an oscillator) and want to measure impedance at a specific transistor terminal relative to ground to determine coupling requirements, e.g. winding ratio for a broadband transformer to couple signals into the detector either from a 50 ohm antenna or a preceding amp or mixer stage. Again, would the the simulated impedances at HF for a regen/oscillator circuit be close to reality and a reasonable basis for designing an impedance matching scheme?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 13, 2011 1:43 am 
Offline

Joined: Sun Apr 08, 2007 8:02 am
Posts: 1214
Location: Saskatoon
I would think that the transistor models are sufficiently accurate at all normal operating frequencies, including RF. Remember, these programs were designed to model circuits accurately. They wouldn't be used as extensively as they are if they didn't provide accurate results. Of course the old saying "garbage in, garbage out" also applies. If you don't provide an accurate model for your circuit, then you can't expect the simulator to provide accurate results. I've found it necessary in many cases, to add in discrete resistors to represent resistive losses in components, and discrete capacitors to represent stray capacitances between various parts of circuits.

One difficulty that I see in modelling radio circuits, is in getting accurate numbers for coupling coefficients for coupled inductors, but this isn't an insurmountable problem.

Maybe if Vladn is reading this, he can jump in with his opinions. He's worked in the RF industry and used Spice extensively.

BTW, it's my understanding that QUCS is based on the Spice engine, so anything that applies to one should apply to the other as well.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 13, 2011 8:54 pm 
Offline

Joined: Sun Nov 02, 2008 7:15 am
Posts: 431
Location: NJ, USA
Bob Weaver wrote:
Maybe if Vladn is reading this, he can jump in with his opinions. He's worked in the RF industry and used Spice extensively.


Just to clarify, I worked in the wireless industry but in the area of baseband digital processing, not RF (at least not seriously). RF and analog stuff is purely a hobby for me. I do use LTSpice frequently though for hobby related stuff.

Bipolar transistor models are generally quite good. Typical vendor supplied MOS models are less accurate. LTSpice does not have a dedicated impedance meter gadget (I know some other sims do have such ability). In some cases you can simply add a resistive divider to the circuit, run AC sweep and derive Z(freq) values from the resulting Bode (magnitude/phase vs frequency) plot.

Also the nice thing in these sims (LTSpice and many others have it) is the ability to auto-step arbitrary parameter (like transformation ratio, or some resistor or capacitor value in a feedback loop etc.), let it run for a while and overlay simulation results on one graph. This provides quick and dirty optimization strategy if one is lazy enough to derive the formula from basic principles or when the math is really hard.

It is also great as an educational tool. While it may not help with every subtlety of real engineering practice, it is nevertheless great in understanding the behavior of non-trivial analog circuits. Personally I hate building a circuit if I do not understand 100% how every single element works, how it's value influences operation of the circuit, and what are the exact trade-offs of design alternatives. Perfectionism I guess. Really hurts in business, trust me, but for hobby it is acceptable :)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 14, 2011 2:25 am 
Offline
User avatar

Joined: Thu Nov 30, 2006 4:16 am
Posts: 689
Location: Allentown,PA
Bob, I run a Mac and would like to learn to run QUCS. But - I know NOTHING about simulating circuits, and I’m worried that the lack of “hand holding” documentation and my electronics inexperience would doom the effort.

Do you think QUCS would be appropriate for me -- or is there something out there with “training wheels” for the beginner. I’d be happy just learning how to simulate a DC circuit and a simple amplifier just to see and explore all the interactions.

Can you guys suggest web or library reading that would be a good intro to simulation for novices ?

73, Dan


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 15, 2011 12:40 am 
Offline

Joined: Sun Nov 02, 2008 7:15 am
Posts: 431
Location: NJ, USA
Dan.

Can't help you with QUCS specifically, haven't used it. For LTSpice there is an active yahoo group. But really you should download either and just start playing with it. Learning curve is not very steep on these simple tools. If you get stuck - search sim forums and google, 90% chance you will quickly find the answer, otherwise ask me for LTSpice or Bob for QUCS.

All these sims have a simple schematic editor UI, waveform viewer UI and a UI-driven spice engine. There are usualy few circuits already drawn for you in the example section. LTSpice has pretty good (for a beginner) semiconductor library. Specific part models can be frequently downloaded from vendor websites. For tube models you search the internet. I can send you tube models that I have if you go LTSpice route.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 15, 2011 7:47 pm 
Offline

Joined: Sun Nov 12, 2006 6:09 pm
Posts: 1305
Location: N 64º 41' E 21º 14'
for really simple quick simulations try this, not even close to LTSpice or Qucs but...
http://www.falstad.com/circuit/
i have used it at work to show some quick circuits.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 16, 2011 3:07 am 
Offline
User avatar

Joined: Thu Nov 30, 2006 4:16 am
Posts: 689
Location: Allentown,PA
vladn - thanks for the advice. I'm reading through the QUCS on-line documents.

OErjan - that is an impressive site. I've played with their crystal radio simulator in the past. Kind of fun.

73, Dan


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 16, 2011 3:44 am 
Offline

Joined: Sun Apr 08, 2007 8:02 am
Posts: 1214
Location: Saskatoon
OErjan wrote:
for really simple quick simulations try this, not even close to LTSpice or Qucs but...
http://www.falstad.com/circuit/
i have used it at work to show some quick circuits.

Very interesting. Thanks for posting.

Dan, The QUCS documents have some simple tutorials that will get you started.

There is a glitch in the way that some of the controls are rendered on the Mac, and caused me some confusion for a while, because I couldn't figure out how to get into schematic drawing mode. See the following screen shot:

Image

Note that on the far left there is a button labeled Projects. There are also two other buttons below it but they don't display properly. If you go to the bottom of the black bar and click then it should activate the Components tab and then you will see the active button as shown below:

Image

This may have been fixed in the latest version. I haven't checked. I'm using version 0.0.12

-


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 17, 2011 2:52 pm 
Offline

Joined: Mon Apr 07, 2008 6:03 pm
Posts: 375
Location: Villach, Austria
Hi,
to add another option: you can also download a free version of Simetrix:
http://www.simetrix.co.uk/site/downloads/download.htm. All you need is to register.

I use this simulator almost daily in my work, compared with PSpice it is much faster and more stable, compared with LT-Spice it is easier to use (in my point of view) and easy import of PSpice models. One strength of Simetrix is the possibility to use a script language for control and data analysis which can be really time saving.

It runs under Windows and Linux.


Brösel


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 23, 2011 4:17 am 
Offline

Joined: Fri Feb 16, 2007 3:17 am
Posts: 55
Location: Irvine, CA
I understand that the author of LTSPICE is a Linux fan, and has made sure that it runs cleanly under WINE.


Top
 Profile  
 
PostPosted: Mon Nov 07, 2011 12:53 pm 
Offline

Joined: Sun Feb 28, 2010 2:12 pm
Posts: 1025
vladn wrote:
Also the nice thing in these sims (LTSpice and many others have it) is the ability to auto-step arbitrary parameter (like transformation ratio, or some resistor or capacitor value in a feedback loop etc.), let it run for a while and overlay simulation results on one graph.

Is there a way (preferably in QUCS) to do spectral analysis of time-varying signals?

I've got an Armstrong regen modeled in QUCS and it acts as expected (throttle capacitance is able to control oscillation). Next, I'd like to measure frequency response of the Q-multiplied circuit to a noise source coupled into the tank. A standard AC analysis and frequency sweep won't work because that doesn't take into account the time-varying nature of the Q multiplication.

What I'd like to do is run a transient simulation for one setting of the throttle capacitor, do a spectral analysis on the signal waveform at the source terminal of the regenerating JFET, plot the spectrogram, and repeat the procedure for varying values of throttle capacitance, showing how the regen's bandwidth tightens as threshold is approached.

Any easy way to do this? I could probably export each transient simulation's time-varying waveform to an external program for spectral analysis, but I'd like to do it all within QUCS if possible.

Once spectral analysis is working, then the fun begins - what factors affect Q by how much, and can we improve Q with multiple resonators in the feedback loop?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 11, 2011 4:58 am 
Offline

Joined: Sun Feb 28, 2010 2:12 pm
Posts: 1025
After doing some more experiments it seems a QUCS AC analysis does, contrary to my previous expectations, appear to give plausible results with my simulated Armstrong regen regarding Q-multiplied tank voltage vs. frequency, indicating a narrowing of bandwidth (i.e. a sharpening of the peak) around the tank frequency as the throttle capacitance is increased. Next is to try varying the topology with multiple resonators and see if a better shape factor can be achieved.

Anyone else tried simulating regens?

EDIT: Results of double-tuned regenerative receiver simulation here: http://theradioboard.com/rb/viewtopic.php?p=31962#31962


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 12, 2011 5:00 am 
Offline

Joined: Sun May 23, 2010 7:18 pm
Posts: 171
Location: Raleigh, NC USA
Is anyone using QUCS within Windows (with a Linux emulator)?

LTSpice is simple to use, but it is lacking in its ability to post process simulation results.

I installed the old PSPICE student version just because it is easier to post process sim results by just copying and pasting waveforms into Excel. This works, but it is a bit clunky to use.

I just installed SIMETRIX. The scripting capability looks very promising, so I'm eager to try it out for comparing the sensitivity of different diode detectors.

I'll post some results soon.

_________________
Überdyne: An extraordinary small force.
Kevin


Top
 Profile  
 
PostPosted: Sun Jul 29, 2012 2:34 am 
Offline

Joined: Sun Feb 28, 2010 2:12 pm
Posts: 1025
I'm having trouble with a transient simulation of a very simple astable multivibrator in QUCS (R=.047Mohm, C=0.1uF). Some research indicates I am not alone:
http://sourceforge.net/mailarchive/foru ... =qucs-help

From that thread:
Quote:
Bistable circuits are always a problem in transient simulation.


I'm already using real, non-generic transistor models (2N3904) as suggested in the above thread. But my simulation still frequently aborts prematurely with numerical errors.

Does anyone have any hints for simulating astable multivibrators in QUCS?

(This will be part of a PWM motor controller circuit.)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group