Based upon the 10 microsecond cycle of the waveform, we are looking at a 100 KHz square wave and this is an excellent response at that frequency. Rarely is a square wave frequency higher than 10 KHz or so used for testing audio amplifiers unless the designer is looking for some signs of high frequency instability. Run the test again with a 10 KHz square wave and I think you will see something closer to what you were expecting.
Note also that rounding of the leading and trailing edges on a square wave is normal at high frequencies; that is caused by the unavoidable high frequency roll-off in the amplifier. Low frequency square waves will generally show some tilt to the flat portions of the waveform, due to low frequency roll-off, unless the amplifier is flat down to DC. That's not necessary or even desirable in an audio amplifier.
Note also that rounding of the leading and trailing edges on a square wave is normal at high frequencies; that is caused by the unavoidable high frequency roll-off in the amplifier. Low frequency square waves will generally show some tilt to the flat portions of the waveform, due to low frequency roll-off, unless the amplifier is flat down to DC. That's not necessary or even desirable in an audio amplifier.
I'd say you are at the wrong place here. LT Spice has also a user group at Yahoo as far as I recall. Maybe there is a bigger audience (and not only from audio circles!) you could persuade...and who have the skills to do what you'd like to do.Ok, with such an enthusiasm, I give-it up. You have convinced me.[....]
I cannot understand such a program like LTspice, free or not, text based, can exists in the 21th century.[snip]
A shame. A real shame !
Not really, its a matter of perspective.
LTspice is a company-developed tool that is made available for free to external users. But it still needs to be maintained and updated and debugged. I don't think Mike E does that on himself, he probably has a small staff, for which (now) ADI must pay. Say half a million dollars per year in salaries and other cost.
Let us say that they hire a software guy for half a year to define, develop, code and certify a fancy interface; let's say $ 75,000 cost to ADI.
What does ADI gain from that investment? Gratitude of diyaudio? 😱
Don't forget, professional users take time and thinking to set up, and at the end extensively analyze, a specific simulation run. The specification of the sim parameters is thoughtful, focused on a specific result, and part of the analysis and development cycle. A GUI is not that important in such a situation.
This is not the same as we often do here to repeatedly hit Run for a distortion sim and change small things in between hoping for an improvement, without having a clear goal and method in mind.
So I don't want to disappoint you but I fear it is not going to happen, unless LTspice becomes a commercial product and you need to pay for it. I'd rather it stays the way it is.
Jan
How do you set it for 10 khz?Run the test again with a 10 KHz square wave and I think you will see something closer to what you were expecting.
Let us say that they hire a software guy for half a year to define, develop, code and certify a fancy interface; let's say $ 75,000 cost to ADI.
What does ADI gain from that investment? Gratitude of diyaudio? 😱
It already exists (in spades BTW), but is a political football. Writing virtual SPICE deck punch cards all over the schematic is not my idea of how things should be done, but that is because LTSpice is based on the original Berkeley code that was put into the public domain and it has not moved to a full command line interface.
How do you set it for 10 khz?
You calculate the period of a 10kHz signal first, which is just the reciprocal of the frequency.
So 1/10000 = 1E-4 which is the same as 0.1E-3 or 0.1 milliseconds.
If you want an equal 50:50 squarewave then you divide 1E-4 by 2 to get the on vs off time.
This is 10kHz squarewave.
Attachments
Square Wave
Here is a square wave generator that is easy to set up, since it uses parameters for amplitude, frequency, and rise time. You shouldn't need to change the rise time for most applications. With the parameters shown, it produces a 10 KHz square wave with a peak voltage of 1 volt.
How do you set it for 10 khz?
Here is a square wave generator that is easy to set up, since it uses parameters for amplitude, frequency, and rise time. You shouldn't need to change the rise time for most applications. With the parameters shown, it produces a 10 KHz square wave with a peak voltage of 1 volt.
Attachments
It already exists (in spades BTW), but is a political football. Writing virtual SPICE deck punch cards all over the schematic is not my idea of how things should be done, but that is because LTSpice is based on the original Berkeley code that was put into the public domain and it has not moved to a full command line interface.
Yes. Ironically, the fact that the entire simulation engine is not available by command line or API is probably a large part of the reason the GUI isn't very good. If you expose all of the engine with an API, then you can make a separate GUI which doesn't even have to be maintained by the same group who works on the engine. Unfortunately programmers are usually not willing to do this and it causes a lot of issues down the road. What happens is that parts of the GUI get implemented in the engine and it becomes a complicated mess. The engine becomes fundamentally unable to support a powerful interface because the code becomes impossible to efficiently manage.
Yes. Ironically, the fact that the entire simulation engine is not available by command line or API is probably a large part of the reason the GUI isn't very good.
Agreed, not that outsiders would know but ADI has that and it was developed totally in house so we could have done anything we wanted with it. I fought for years to make a "lite" version to give to customers but it was viewed as some kind of corporate jewel that someone could steal.
Not really, its a matter of perspective.
LTspice is a company-developed tool that is made available for free to external users. <snip>
So I don't want to disappoint you but I fear it is not going to happen, unless LTspice becomes a commercial product and you need to pay for it. I'd rather it stays the way it is.
Jan
Agree with all of Jan's comments, I use LTspice at home and at work, although I am not at all close to being a power user.
The versions of spice bundled with most EDA tools are expensive, less user friendly, have a rather steep learning curve, so LTspice has become quite popular even in work environments.
Indeed.Yes. Ironically, the fact that the entire simulation engine is not available by command line or API is probably a large part of the reason the GUI isn't very good.
By the way, and if this is possible, did exists a set of good formulas that users could use as defects for their work in audio, in the actual interface, in order to optimise the transients functions (distortion, FFT, number of periods shown etc.) without having to modify lot of parameters and options at each frequency changes ?
I don't know if my question is clear.
Use a set of standardized include files, to change from one to the other measurement setup you can just select a different include file (changing only one part of one line).
Ok, but where are they ?Use a set of standardized include files, to change from one to the other measurement setup you can just select a different include file (changing only one part of one line).
I would think that you set up your own sim specs and save them into an include file. So you can set up to your own ideas and requirements.
You are the one who knows what you want and need for a specific situation.
Jan
You are the one who knows what you want and need for a specific situation.
Jan
We all want the same things in Audio. To get the best compromise in LTspice between speed and accuracy.I would think that you set up your own sim specs and save them into an include file. So you can set up to your own ideas and requirements.
You are the one who knows what you want and need for a specific situation.
My main problem is to can get good FFT and Distortion numbers results without having to wait for hours the program to compute, and not spending hours to try various combinations and understand what the program is doing, while some experts like you had probably do the job for themselves.
I don't want to be an expert in LTspice, spending weeks in learning more.
Was my question unclear, or is-it impossible to get a global help here, LTspice in a nutshell style ?
Your answer looks like: "Sort this out yourself".
Last edited:
No your question is clear.
But you only can make the correct compromise between speed, accuracy, etc yourself. You may have other priorities than I have, so you don't want to copy what I do.
I don't think you can get around to learning how it works. There's several posts here how to adjust timestep, FFT length, run time etc for a specifically required freq resolution etc.
Once you decide and test, put the list of commands in a file and you can then re-use it ad infinitum.
But it has to start with you I am afraid.
Even if you had a fancy GUI, you need to decide which buttons to push and fields to set.
Look at for instance ARTA, which is a way is similar. It has a nice GUI, but still you need to figure out what to set it to. There's no single setup that is optimum for all users.
Is my answer clear ;-)
Jan
But you only can make the correct compromise between speed, accuracy, etc yourself. You may have other priorities than I have, so you don't want to copy what I do.
I don't think you can get around to learning how it works. There's several posts here how to adjust timestep, FFT length, run time etc for a specifically required freq resolution etc.
Once you decide and test, put the list of commands in a file and you can then re-use it ad infinitum.
But it has to start with you I am afraid.
Even if you had a fancy GUI, you need to decide which buttons to push and fields to set.
Look at for instance ARTA, which is a way is similar. It has a nice GUI, but still you need to figure out what to set it to. There's no single setup that is optimum for all users.
Is my answer clear ;-)
Jan
A way to accelerate your learning curve in a big way is to go through a selected amount of the many examples close to your area of interest that are available within LT Spice. Concern that as the best possible global helpWe all want the same things in Audio. To get the best compromise in LTspice between speed and accuracy.
My main problem is to can get good FFT and Distortion numbers results without having to wait for hours the program to compute, and not spending hours to try various combinations and understand what the program is doing, while some experts like you had probably do the job for themselves.
I don't want to be an expert in LTspice, spending weeks in learning more.
Was my question unclear, or is-it impossible to get a global help here, LTspice in a nutshell style ?
Your answer looks like: "Sort this out yourself".
It’s just like learning a new lanquage, not everything is logical nor easy to understand, but in the end, LT Spice can handle almost any problem, no matter how complex.
Hans
How can-you know if you don't share what is working for you ?You may have other priorities than I have, so you don't want to copy what I do.
Instead of spending time and efforts in posts like:
Installing and using LTspice IV (now including LTXVII). From beginner to advanced.
and
Installing and using LTspice IV (now including LTXVII). From beginner to advanced.
and answering to the endlessly same questions of beginners, It should be better to share and discuss the various setting of experienced users in order to propose the formulas or setting files THAT WORKS the best in the easiest way. This way, we should compare the sims in this forum made the same way. Free to users to dig further for any particular need.
But, it seems we don't have all the same definition of the word "share" and "community".
It has been done, by me, by Mooly, by others. Over and over again. But nobody bothers to read it, nobody bothers to search the thread apparently, until they all of a sudden think about it and then we all should jump through hoops.
Jan
Jan
That is the problem. How can-you dream a newbie to find the good answer all over Internet in the middle of a huge noise? This single thread has 1600 posts.It has been done, by me, by Mooly, by others. Over and over again. But nobody bothers to read it, nobody bothers to search the thread apparently, until they all of a sudden think about it and then we all should jump through hoops.
My situation is typical: I asked for links, I get philosophical comments, mainly in the style "DIY".
I give-it up on this subject, once more.
Last edited:
- Home
- Design & Build
- Software Tools
- Installing and using LTspice IV (now including LTXVII), From beginner to advanced