how to simulate an audio amplifier using ltspice - diyAudio
Go Back   Home > Forums > Design & Build > Software Tools

Software Tools SPICE, PCB CAD, speaker design and measurement software, calculators

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 23rd July 2012, 03:01 PM   #1
diyAudio Member
 
Join Date: Jul 2012
Location: Verona
Smile how to simulate an audio amplifier using ltspice

I've made a project of an amplifier and now i've made some simulations but I don't know if they are completely right.
So my biggest worry is about stability: the feedback network of my amplifier is made of two simple resistors the one wich goes from the output to the imput of the differential pair is 20k while the other is 1k and goes from the diff input to ground giving a closed loop gain of 26 dB. In order to valutate stability I changed the 20k resistor with a 1M ohm one thus i have increased a lot the closed loop gain to expose the open loop gain.
After that i did an AC analysis and i checked the phase at the point where the gain is 26dB and it's 110 giving 70 of phase margin. Is right to check stability in this way or is wrong? I say that because if I do an AC analysis of the amplifier with the normal value of the feedback resistors when the gain falls at 0dB the phase lag is more than 135. This analysis has been done with the AC signal connected directly on the base of the input stage (without any low pass and high pass filters) and in series with it a DC generator in order to make the output voltage 0 at quiescent conditions, while at the output i connected a 8 ohm resistor directly without any zobel network and the usual inductor.
Then how to check the slew rate?
Usually a square wave input is used where the rise and fall time are really small like 10ns but how can i choose the right frequency and amplitude?
To find the slew rate is right to do a transient analysis and then put two cursors at a distance of 1us in the point of the plot where the output goes from the max value to the min and the slope of that is the slew rate?
Last question, when i do a transient analysis with square wave input the output waveform presents spikes just after the rising edge and after the falling edge wich decay in a small time. What's that mean?
Tell me if what i did is right or if i've made a lot of errors.
thanks everybody
  Reply With Quote
Old 25th July 2012, 01:35 AM   #2
fas42 is offline fas42  Australia
diyAudio Member
 
fas42's Avatar
 
Join Date: Jun 2012
Location: NSW, Australia
Blog Entries: 11
Have a look at this thread: General power amplifier stability discussion (using Spice) . Should give you a few ideas - as they say, Google is your friend ...

Frank
  Reply With Quote
Old 22nd October 2012, 03:22 PM   #3
AndrewT is offline AndrewT  Scotland
diyAudio Member
 
Join Date: Jul 2004
Location: Scottish Borders
How does the win7 directory structure work with LTspice.

I tried to run an asc with the models in the text file that was in the same directory. Cannot find model.

Copied the asc and the text files to LTC/LTspiceiv
re-opened LTspice and the asc. Again cannot find model.

I downloaded the pdf of how to use ltspice all 308 pages of it.
Where do I find an explanation of where to locate files to enable ltspice to run?
__________________
regards Andrew T.
  Reply With Quote
Old 22nd October 2012, 05:31 PM   #4
diyAudio Member
 
Join Date: Jun 2011
Might be easiest to simply put the directory where you have put the model files in your PATH.

How to set the windows path in Windows 7
  Reply With Quote
Old 22nd October 2012, 11:50 PM   #5
fas42 is offline fas42  Australia
diyAudio Member
 
fas42's Avatar
 
Join Date: Jun 2012
Location: NSW, Australia
Blog Entries: 11
Have you sorted it out, Andrew? If not, do you have a .include Spice directive somewhere in the .asc pointing to the text file? If you think it's there but can't find it easily use <Ctrl> F for a Find dialogue box, the found items are highlighted ...

308 page pdf? Is this scad3.pdf, mine is 206 pages ... ? In my copy of scad3.pdf the relevant page is 69, .INCLUDE -- Include Another File.

Frank

Last edited by fas42; 23rd October 2012 at 12:15 AM. Reason: Get the name right, son ...!!
  Reply With Quote
Old 23rd October 2012, 01:09 AM   #6
fas42 is offline fas42  Australia
diyAudio Member
 
fas42's Avatar
 
Join Date: Jun 2012
Location: NSW, Australia
Blog Entries: 11
Okay, correction needed ... up until recently a .pdf version of the help file that comes with the program was available on the Linear website, was called scad3.pdf. This no longer exists there but can be found elsewhere on the net, will therefore be very slightly out of sync with the current executable.

Annoying, because I don't like .chm files, hopeless things to move around in easily ...

Getting back to an answer about including files, this is in the help .chm, in the Contents window under LTspice, and then Dot Commands ...

Sorry,
Frank
  Reply With Quote
Old 23rd October 2012, 03:59 AM   #7
fas42 is offline fas42  Australia
diyAudio Member
 
fas42's Avatar
 
Join Date: Jun 2012
Location: NSW, Australia
Blog Entries: 11
Quote:
Originally Posted by fas42 View Post
Annoying, because I don't like .chm files, hopeless things to move around in easily ...
But, there are myriads of ways of creating a .pdf from a .chm, so long since I've done this I had forgotten I had installed something called PrimoPDF that does the job -- my version is rather primitive and doesn't do a full job of it, I'm sure there's plenty better out there if one hunts around ...

Frank
  Reply With Quote
Old 23rd October 2012, 08:58 AM   #8
AndrewT is offline AndrewT  Scotland
diyAudio Member
 
Join Date: Jul 2004
Location: Scottish Borders
the file is a working version kindly passed on by a Member.
I thought all I had to do was start up clicked on the .asc and RUN.
But it came back saying cannot find model for ONE transistor. The text file includes that transistor and I don't expect the file to be corrupted.
I tried again, still cannot find.
I then looked for and found the LTspice program. It was in LTC/LTspiceiv
I copied the extracted files from the .zip to this directory and started the .asc
RUN showed the same cannot find model

I can't see an include directive, but the other non standard models are not flagged as missing eg there is a Bob79 model.
__________________
regards Andrew T.
  Reply With Quote
Old 23rd October 2012, 06:17 PM   #9
euro21 is offline euro21  Hungary
diyAudio Member
 
Join Date: Sep 2004
Location: Budapest
Andrew, it would be easier if you copy the asc.
  Reply With Quote
Old 23rd October 2012, 11:09 PM   #10
fas42 is offline fas42  Australia
diyAudio Member
 
fas42's Avatar
 
Join Date: Jun 2012
Location: NSW, Australia
Blog Entries: 11
Hmmm ... in my workings with LTspice I always need an .include statement to pull in outside files; if I comment it out then I also get such an error message. I would suggest adding a Spice directive to do it in the .asc, very easy to make happen: click on the funny looking .op button on the right end of the toolbar, comes up with a textbox for entry, type in ".include <name of file>". OK it, cursor changes to I bar and border of the text entered, just click anywhere, in open space, on the schematic to paste the directive. Then, you should be right to Run ...

Frank
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to simulate OPT in LTspice? Akita Tubes / Valves 15 29th December 2013 04:39 PM
how to simulate an audio amplifier using ltspice davidel94 Solid State 5 6th March 2013 04:10 PM
Anybody willing to simulate ? east electronics Solid State 28 24th January 2012 10:51 AM
LTspice square wave and audio amp test maouna Solid State 2 11th December 2010 09:34 AM
With which can i Simulate a Zen Amplifier! bulrot Parts 6 31st May 2006 02:14 PM


New To Site? Need Help?

All times are GMT. The time now is 10:20 AM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright 1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2