The Hughes & Kettner User Forum

The Unofficial guitar amp and cabinets forum for users of Hughes and Kettner products. We are not affiliated with Hughes and Kettner!!


    Spice simulation and analysis of the amp's audio performance

    Share
    avatar
    bordonbert

    Posts : 745
    Join date : 2015-01-28
    Age : 97
    Location : Southern England

    Spice simulation and analysis of the amp's audio performance

    Post by bordonbert on Mon Oct 24, 2016 6:50 pm

    Well here is the thread I promised.  I'll post my finding regarding simulating the GM36's solid state stages as accurately as I can.  They won't be perfect but they will be very close.

    Limitations will occur because of:

    1) Not having accurate Spice models of all of the components.  In terms of components, there is very little inside the GM36 which is very specialist outside of some of the digital control circuitry.  I have used existing Spice models which are close enough in performance to still give accurate results.  It's worth remembering that the guitar valve amplifier is incredibly restricted in its performance anyway.  Bandwidth is very narrow making necessary speed of devices ridiculously low.  Outside of the valve stages voltages are all low.  The circuit configurations chosen for each stage are almost always pretty standard and without any unusual aspects.  Manufacturers do not waste time trying to choose things like opamps based on some perceived sound criteria.  They go to their suppliers and see what is currently cheap!  Good quality general purpose components are fine.

    2) It will get old very quickly if I try to report on all of the simulations again and again over the whole guitar frequency range.  For those like the tonestack I will do that as frequency is the prime parameter we need to vary.  For other stages like the input buffer which is designed to clip, it is more important to vary signal level rather than frequency.  In those cases I have rerun each simulation for a lower and higher frequency and will report if there are any significant differences.  In the first instance I have had to settle on a standard frequency and test them at that frequency.  I chose 200Hz, (close to open G), as being pretty middle range.

    3) There is a limit to the number of files I can attach to each post and the size of each of them.  I will try to put sensible plot pictures into zip files and attach them in that form.  It's less convenient and I would prefer to post the pics so they show up in the posts but I have tested this and after 2 it gets unreliable.  I can also not reduce the picture size down below a certain level because the curves begin to get less distinct as JPGs.

    4) This won't be a project which is finished in a few days!  It will be ongoing.  I'll post as I get work done but it has to fit in with other stuff I have in my life.  Please be patient with me.

    The idea of this work is to be able to mod the amp to improve aspects of it with which we are not happy in terms of the sound.  There are already a lot of areas where I have questions on some of the simple decision that the designers have made.  I don't mean I think they are wrong and I know better, I certainly don't, I mean that they chose things with a certain sound in mind and it may be that I want something different which I can achieve.  I want to be able to adjust some simple aspects to get nearer to my own sound.  The amp is logical in its block layout and mostly generic in its detail so this should be possible.

    As an example just compare the GM36 power amp Phase Splitter stage with that of a JTM45 and you will find it is virtually identical right down to almost all of the component values with the exceptions of the load resistor imbalance and the small limiting capacitor across them.  The GM has a closer match at 82k/91k than the JTM45 at 82k/100k and also has 22pF instead of 47pF across these.  That's an octave of bandwidth difference.  (And there is no global feedback which may be why.)

    Please chip in with your thoughts as this work progresses.  It's the feedback and ideas from other people which make this dry work interesting.  I'm learning all the time by doing stuff like this and hopefully I'll get a sweeter amp at the end of it too.
    avatar
    bordonbert

    Posts : 745
    Join date : 2015-01-28
    Age : 97
    Location : Southern England

    Re: Spice simulation and analysis of the amp's audio performance

    Post by bordonbert on Mon Oct 24, 2016 8:42 pm

    First bit of data.  I'm looking at the Input Buffer stage.  This is an opamp stage which has two features.  First there are a pair of back to back 2.7V zeners across the input of the opamp to limit input signal size in the case of user stupidity Rolling Eyes .  Then there is a resistor and zener feedback network around the opamp.  This is a basic non-inverting amplifier with a dual gain set resistively.  The gain for Clean and Crunch is set to about 3x before clipping and it then changes to about 7x for Lead and Ultra.  The Lead and Ultra gain is made a little frequency dependent.   The zeners in the feedback serve to limit the gain and clip once the signal excursions get above a certain level.

    Plot 1)  The action of the input zener diode pair on the input signal.  Input signal is raised from 0.5V - 4.0V in 0.5V steps.  You can see the catch action begin at about 2.5V.  You should note that this is way above most signal input levels and actually has a useful effect as you will see.

    Plot 2)  The output of the stage for Clean and Crunch with input zeners in place.  Input signal is raised from 0.5V - 4.0V in 0.5V steps.  The input zeners are catching the +ve half of the signal at just over 2.5V input as before.  However, when the lower half reaches 1.5V the feedback diodes kick in and begin to limit introducing even order harmonics.  At 2.5V the input zeners also begin to act and clipping is then more abrupt.  The FFT clearly shows there is no significant distortion at all until input levels reach 1.5V when very slight traces of 3rd and above begin to show.  From 2.0V up the 2nd is some 6dB greater than the 3rd until at 3.5V the 3rd begins to match the 2nd.

    Plot 3)  The output of the stage for Clean and Crunch with the input zeners removed from the circuit.  Input signal is raised from 0.5V - 4.0V in 0.5V steps.  It is clear here that the feedback diodes cannot limit the +ve half of the signal soon enough.  The sharp clipping is inside the opamp and this is not a good thing!  That sort of action can be unpleasant sounding with any opamp.  It has to be said that this is at 4.0V input to the Clean and Crunch channels.  I guess you pays your money and takes your choice.

    Plot 4)  The output of the stage for Lead and Ultra with the input zeners in place.  Input signal is raised from 0.1V - 1.0V in 0.1V steps.  The gain is higher and there is no point in using such a large range of input signal, all of the action is demonstrated up to 1.0V.  Here it can easily be seen that the input stage is absolutely clean until over 0.3V when the -ve half of the signal begins to be clipped by the feedback network.  This gets more and more severe as the signal level increases until the +ve half of the signal also begins to be clipped.  By the gradual nature of this and the fact that it occurs at around 0.9V input it is clear the input zeners are having no effect for the Lead and Ultra channel, the feedback network is perfectly placed to take care of that.  The FFT shows distortion jumps up to a significant level with the 2nd harmonic 4 or 5dB higher than the 3rd across the board and increasing slightly to around 14dB below the fundamental at 1.0V.

    The input stage set up for Lead Ultra with the input zeners detached shows absolutely no difference at all proving our claim that the feedback diodes take care of all of the limiting action.  They are still useful to prevent accidental damage to the input stage opamp.

    Personally, I would be looking to keep this stage with its assymetric clipping but to make the clipping itself more gradual on the -ve side.  This could easily be done by introducing a new feedback network.  A handful of diodes and resistors on a tiny PCB or perf board mounted into the holes of the original diodes and voila!  I'll be testing some ideas I have when I get a chance.  It would also be easy to remove the early clipping totally and only leave a setup where internal clipping in the opamp is prevented.  You would have a true clean buffer then which could easily be set to any gain you want and which would protect you from the worst overload effects.


    EDIT:  I have run into a situation where I have used up all of my file attachment allowance.  I'm removing the direct downloads and putting them in a zip file on my Dropbox site.  I'll make sure to put a link to this every few posts and keep it up to date.

    GM36 Analysis Plots


    Last edited by bordonbert on Wed Nov 02, 2016 9:42 am; edited 7 times in total (Reason for editing : Anal correction of too many typo spelling mistakes!)
    avatar
    bordonbert

    Posts : 745
    Join date : 2015-01-28
    Age : 97
    Location : Southern England

    Re: Spice simulation and analysis of the amp's audio performance

    Post by bordonbert on Mon Oct 24, 2016 10:41 pm

    Just done a little more work with the Lead Ultra setup.  As I said that grounding arm of the feedback network which changes the gain between Clean/Crunch and Lead/Ultra is frequency dependent.  Boy is it!  Here are two more plots.  The scales of the plot axes have been kept the same in each case so as to make for easy comparison of levels.  You should compare these plots against Plot 4) described in the preceding post.  That's the same conditions but at my reference 200Hz.

    Plot 5)  The output of the stage for Lead and Ultra with the input zeners in place.  Input signal is raised from 0.1V - 1.0V in 0.1V steps.  Frequency has been reduced to 80Hz.  You can see how the bottom end is falling away.

    Plot 6)  The output of the stage for Lead and Ultra with the input zeners in place.  Input signal is raised from 0.1V - 1.0V in 0.1V steps.  Frequency has been increased to 2kHz.  Oh dear, that is a pretty hefty increase.  Clipping now kicks in just over 0.3V whereas it started at 0.9V at 200Hz and wouldn't have kicked in until about 1.3V at 80Hz.

    Is this indicative of the voicing for higher gains throughout this amp?  The shelving network which ups the gain of the input buffer for Lead and Ultra could really do with some tweaking I feel.  It is important to keep the overall gain consistent so the voices don't get out of step with each other volumewise, but I would want this to be flattened out a little I think.  This may just be the first port of call of the HMS Bodgeit!



    EDIT:  I have run into a situation where I have used up all of my file attachment allowance.  I'm removing the direct downloads and putting them in a zip file on my Dropbox site.  I'll make sure to put a link to this every few posts and keep it up to date.

    GM36 Analysis Plots


    Last edited by bordonbert on Wed Nov 02, 2016 9:42 am; edited 1 time in total
    avatar
    bordonbert

    Posts : 745
    Join date : 2015-01-28
    Age : 97
    Location : Southern England

    Re: Spice simulation and analysis of the amp's audio performance

    Post by bordonbert on Mon Oct 24, 2016 10:56 pm

    And finally for tonight, here is a plot of the frequency response for the input buffer set to Lead/Ultra and with 0.1V input.  That keeps it below the level of any clipping across the board.  And oh my word, that really doesn't look like I would have expected.  I suspect this may generate a lot of comment from experienced members!



    EDIT:  I have run into a situation where I have used up all of my file attachment allowance.  I'm removing the direct downloads and putting them in a zip file on my Dropbox site.  I'll make sure to put a link to this every few posts and keep it up to date.

    GM36 Analysis Plots


    Last edited by bordonbert on Wed Nov 02, 2016 9:43 am; edited 1 time in total
    avatar
    namklak

    Posts : 185
    Join date : 2015-01-30
    Location : Denver, CO

    Re: Spice simulation and analysis of the amp's audio performance

    Post by namklak on Tue Oct 25, 2016 10:13 pm

    Dude, you are f'in NUTS!!! Thank you soooo much, now I owe you a keg of beer. And I posted this after only reading the first post.
    avatar
    namklak

    Posts : 185
    Join date : 2015-01-30
    Location : Denver, CO

    Re: Spice simulation and analysis of the amp's audio performance

    Post by namklak on Tue Oct 25, 2016 10:34 pm

    I'm confused on Plot 3 - why didn't D4,5,6 start clipping at around 11.7v oh and + 0.6 for D3 would 12.5v - it was my assumption that those diodes would save us from hitting the rails of the op-amp.  Yes the diodes are arranged non-symmetrical for more pleasing/fun clipping, but I don't understand why the signal hit the positive rail.
    My goal with changing the values of those diodes was more od of the tubes of course but we still need to keep the op-amp from hitting the rails - a very non-pleasing sound.  Something has gone all pear shaped... (speaking a language you'll understand).
    avatar
    bordonbert

    Posts : 745
    Join date : 2015-01-28
    Age : 97
    Location : Southern England

    Re: Spice simulation and analysis of the amp's audio performance

    Post by bordonbert on Wed Oct 26, 2016 5:57 am

    Yes, it isn't immediately obvious and you wouldn't expect it but it is because of the ridiculously high input level at 4.0V.  I can be an idiot at times.  I've quoted the gain of the stage as 3x and it isn't!  That's an approximation which holds for higher levels.  At low gains like this it is wrong.  As an inverting stage it's about (3+1)x of course.  If you think of it, both of the inputs of the opamp are kept at the same level by its high gain action.  The +ve input has 4.0V signal on at that point, so the -ve starts with 4.0V on it too.  The voltage across the feedback network is added on top of that to give an ouput of about 16V.  (Still make the occasional cock up after all these years.  Embarassed  )

    It isn't really a problem with the amp as stock as the input diodes will catch things and prevent that extreme level of signal first.  It's strange to see that being a problem with the clean channel and not the high gain.  I do know now that changing those input zeners to 3.3V would probably give you the protection you need with a very large headroom over real life signals, unless you do radical things with a Clean Boost of course.

    I'm working on a simple approach to modding that stage, it isn't hard, and I've got some more plots coming soon which show the frequency response trimmed.  The important step is to clearly set out your goals not just jump in and change things willy nilly.  In terms of modding I want to achieve a couple of things if I can.

    Firstly I don't want to make extreme levels of change to the response.  It's not that it's absolutely wrong, it just has the emphasis too much to the right.  That's great metal stuff but not classic rock.  H&K are right that you need to make higher gain settings a bit more bass light to prevent them getting muddy.  I believe that is partially due to there being too much room for generation of harmonics of harmonics if you start with strong bass end signals.  I really don't like their extended HF cutoff.  There's precious little good out of a guitar and amp above about 5kHz and at that point it should be dropping, the speakers sure are.  I have always wondered if this is the reason why the GM is so fussy about speakers while Marshall's don't seem to be.  I'd try changing the upper 3dB cutoff to about 4kHz.  At the moment the simulation shows a 3dB point of 38kHz for Clean/Crunch and 33kHz for Lead/Ultra!!!  If that's correct then it's bloody pointless.  The character of overdrive changes markedly if you limit the upper harmonics in it early on.  If we clip the input severely we are putting in harmonics which sound ok there but later stages will clip them again and produce harmonics of those harmonics too.  A C note clipped produces harmonics at its octaves, and G, and E and Bb and so on.  The octaves are fine but when the others get distorted in a later stage they will produce their own harmonics like D, B, G# and these are most unmusical.  Again I believe this is part of the character of those classic old amps, their simplicity leads to musicality, what is usually described as "valve sweetness".  And people seem to want to have that then ruin it with more and more pedals and extreme front end overdrive.  A little of that is great but a lot is dire to my taste.  You're great up to the sixth or so but after that the harmonics themselves begin to interact and just produce dissonance.  Leaving that amount of HF energy in there is a big risk of harsh sounding distortion later.

    I'd like the lower middle and bass to be extended a little more but I want to preserve the basic shape of the curve with its definite tail off below about 200Hz-ish.  This aint no bass amp and we don't want any flub!  But a 3dB point around 863Hz?  Again that's a far too modern voicing for my tastes.  That's a dropping away of character below about e17, that's a top A!!!  It's so silly I can't believe I have got this right.  I keep rechecking the simulation schematic but I just can't see any error.  I know now why I get so stuck playing on the Clean and Crunch channels and am so reluctant to play through the Lead.

    I don't want to swap out caps unless I really have to unless they are both in the same pin spacing and a smaller package, I want to make any changes with only resistors if it is possible.  You can run into fitting problems with caps in a way you don't with resistors.  It's daft and of limited relevance but I hate the look of caps standing up on their legs from a PCB because they were too physically big for the pin spacing, and it's not really good for reliability in a gigging amp anyway.  H&K seem to have used decent quality components in critical places as you would have wanted them to so let's stick with them.

    I've played with values and with only 3 resistor changes for sensible values and one generic low value capacitor change, (the 330pF cap across the feedback), I have the curves here.  The green is the existing Clean/Crunch which I like except for the extended top end which should be at least trimmed back.  The blue is the existing Lead/Ultra which I don't.  The other two are what I'm working on at the moment and are getting close to what I want.  Their upper and lower -3dB points are interchangeable of course, I can trim each of those independently.  We have lower -3dB points of 367Hz and 204Hz, and upper ones of 6.57kHz and 10kHz, still maybe a bit high but I'm unsure about that.

    We have to bear in mind that this is only the input stage.  There are a few stages after this which we haven't looked at yet.  Softly softly catchey monkey as they say.  I'll have more posted later today. Wink

    Your thoughts are really welcome on any of this and are a big help in giving me a clear picture of what is best to aim for, as are everyone elses' of course.  The technical side may not be up everyone's street but the description of your own particular picture of where the sound should go is equally valid for all of us.


    EDIT:  I should have said that the simulated curves of my modded setup are without any interaction with the diode networks.  The signal level is kept below clipping at 0.1V.  I do have mods to the feedback diode network in progress too to make it much simpler and less abrupt.  I can now control the onset of clipping and its abruptness independently, (sounds clever but it's just trimming a series resistor really).


    EDIT: I have run into a situation where I have used up all of my file attachment allowance. I'm removing the direct downloads and putting them in a zip file on my Dropbox site. I'll make sure to put a link to this every few posts and keep it up to date.

    GM36 Analysis Plots


    Last edited by bordonbert on Wed Nov 02, 2016 9:43 am; edited 1 time in total
    avatar
    bordonbert

    Posts : 745
    Join date : 2015-01-28
    Age : 97
    Location : Southern England

    Re: Spice simulation and analysis of the amp's audio performance

    Post by bordonbert on Wed Oct 26, 2016 7:14 am

    Here is a bit more to whet your appetite.

    This is with a simple modified diode feedback network working with the Lead/Ultra setup.  This would also be the network for the Clean/Crunch of course and the break points and overall shape would be roughly the same but the input levels would need to be higher to reach them and there would be a frequency dependent aspect to the levels of signal. It actually only uses three diodes rather than the original 4 and has a single resistor added.  It is only two back to back 12V zeners with another smaller zener and series resistor across one of them in the same direction but it is quite effective.  Obviously the assymetric breakpoint is set by that smaller zener's voltage value, but the severity of the clipping can be controlled by altering the series resistor value.

    Plot 9) The modded diode feedback network with spot voltages to show the various stages of clipping.  The input voltages are set to 0.2V (green), 0.23V (blue), 0.5V (red), 0.55V (cyan), 1.0V (magenta), 2.0V (grey) and 3.5V (dark green).  It's probably obvious but...  0.2V is clean on both sides.  0.23V has just started to clip on the -ve side.  0.5V is more into clipping in the -ve side and only just clean on the +ve side.  0.55V shows we now have just achieved clipping on both sides.  1.0V and 2.0V show the progress of clipping, harder on the upper half and gradual on the lower half.  Finally at 3.5V we now have solid clipping on both edges by the larger zeners preventing the opamp from clipping internally.

    Plot 10) The modded diode feedback network with input voltage just enough to clip on the +ve half.  The series resistor in the diode feedback network is varied across 1k8, 3k9, 8k2, 12k, 18k, 27k and 39k to adjust the level of severity of clipping.  Lower values give more sharp clipping.


    EDIT: I have run into a situation where I have used up all of my file attachment allowance. I'm removing the direct downloads and putting them in a zip file on my Dropbox site. I'll make sure to put a link to this every few posts and keep it up to date.

    GM36 Analysis Plots


    Last edited by bordonbert on Wed Nov 02, 2016 9:43 am; edited 1 time in total
    avatar
    namklak

    Posts : 185
    Join date : 2015-01-30
    Location : Denver, CO

    Re: Spice simulation and analysis of the amp's audio performance

    Post by namklak on Thu Oct 27, 2016 7:38 am

    Plot 8.  Agreed that H&K was going for a modern tone, and I think I will go with your idea of shifting that - probably as far as the red mod.  You're spot on with the comment of not wanting HF energy early in these stages.  The only thing I use Ultra for is Soldano, and that definitely does not have a lot of HF content.  Also, I am not against standing a cap up on a board as long as it doesn't interfere with anything when the GM is assembled, so please include those options if they make sense.  For instance referring the the red mod line, I may be interested in dropping the HF response another 1 or 2 KHz (one octave I guess), without shifting the whole pass band more.  But I think the red mod line is a very good starting point.

    Let's also get rid of about 3-6dB of gain on Lead/Ultra - I don't think anyone interested in these mods ever sets the Gain knob over half way on the Lead or Ultra channels.  And I still think there'd be plenty room for channel level matching.

    Plot 10.  I like the choice you've given of resistance vs symmetry of clip.  Personally, the only thing I want these zeners to do is keep the op-amp from clipping, but I will go slightly asymmetrical anyway.  I want to limit the silicon distortion in my Lead and Ultra channels.   Repeating myself, I no longer use any type of external input overdrive with the gm.  The silicon blocks can't handle it.  Maybe even the EMG Active pickup players might want 3-6dB removed on the Lead/Ultra too.  But the move to more classic may not include some EMG players.

    I'm liking it!
    Thanks!
    avatar
    bordonbert

    Posts : 745
    Join date : 2015-01-28
    Age : 97
    Location : Southern England

    Re: Spice simulation and analysis of the amp's audio performance

    Post by bordonbert on Thu Oct 27, 2016 8:01 am

    Yes, it's proving to be a useful exercise isn't it? I've got the next stage, (the SS active Gain control), well on the way and I have stuff to post but there are restrictions on uploads which won't let me post the plots direct. I'm going to put some stuff up on Dropbox and correct it later if we can.

    Some of what you say may well change when you see the Gain side of things. We have the option of changing gain in either the input stage or in the Gain control itself. Personally I lean at the moment towards your way of thinking, drop it down as early as possible, but there may be consequences to that. Have a look at the latest plots and do a bit of thinking on that side.
    avatar
    bordonbert

    Posts : 745
    Join date : 2015-01-28
    Age : 97
    Location : Southern England

    Re: Spice simulation and analysis of the amp's audio performance

    Post by bordonbert on Thu Oct 27, 2016 8:01 am

    Ok, next please...

    I've moved on to looking at the Gain stage next.  This is a single opamp stage with a twin pot, (that's a double acting one - two pots tracking each other), with one on the input of the stage and one at the output acting in the feedback path.  There are a fair few shaping components around this setup and there are 3 switching options altering them according to certain settings.  After seeing the input stage response I have become used to looking at frequency up to 100kHz!  That seems ridiculous to me in a guitar amp but that's the way it is.  I settled on 2Vpk for input level from the Input stage as it does not cause any clipping throughout the Gain stage.  This represents around 500mV signal input to the amp on Clean/Crunch and 250mV on Lead/Ultra so is a realistic level, (not that that is really important).  Plotting has been worked by simulating the gain setting as 1-10 settings on the control from bottom to top.

    The response of the Gain stage is trimmed mainly according to the Channel and Boost selections.  For the majority of amp settings there are no switches engaged and the circuit behaves as Plot 11.  When the mysterious "C-Gain1-A-Switch" kicks in it resets as Plot 12.  When the Crunch or Lead Boost is switched on it changes to Plot 13.  When the Ultra Boost is selected we have Plot 14.

    Plot 11) Normal profile used for most selection combinations.  No local switches are engaged.  This seems pretty sensible and what I would have expected.  Looks like the input stage sets the basic curve for the chosen guitar sound and then this stage just does what it needs to tweak it for certain selections.

    Plot 12) Labelled as "C-Gain1-A-Switch".  The others are clear but if anyone can say what this represents let me know as I don't really know what it is either!  It's the label on the control line for that particular option.  It's in the Gain1-A, (first pot), section of the stage on the input but what does "C" stand for?  Clean, Crunch, Clean/Crunch?  Who knows?  It travels back into the digital circuitry until it vanishes in the processor so no clues there.  My best guess is that it is the Clean Boost option, as the others are for the Boost of the other channels.  I'll put up the plots for it anyway but cannot be certain when it would be engaged.  There is only a minor difference in a lift to the upper mid area anyway.

    Plot 13) "Boost CR-LE-UL".  This switch is active when either the Crunch, Lead or Ultra channel and Boost is on.  (It actually neatly selects just "[Boost ON] AND [NOT Clean]").  A pretty modified curve now.  The gain is upped some 15dB and an upper mid range hump is introduced.

    Plot 14) "Boost UL".  Only selected along with 3) when the Ultra channel and Boost is selected.  A slight drop of about 5dB is introduced to the mid range.  Overall gain at each end remains pretty much the same.

    The lower end seems to be less badly butchered in this stage but it isn't putting anything back that the Input Buffer slashed out.  At the top end the 3dB break point is still over 20kHz.



    EDIT: I have run into a situation where I have used up all of my file attachment allowance. I'm removing the direct downloads and putting them in a zip file on my Dropbox site. I'll make sure to put a link to this every few posts and keep it up to date.

    GM36 Analysis Plots


    Last edited by bordonbert on Wed Nov 02, 2016 9:45 am; edited 1 time in total
    avatar
    bordonbert

    Posts : 745
    Join date : 2015-01-28
    Age : 97
    Location : Southern England

    Re: Spice simulation and analysis of the amp's audio performance

    Post by bordonbert on Thu Oct 27, 2016 9:48 am

    Just thinking about what you said Namklak. To get a controlled degree of assymetry across the board you could just stick a cheap little 1N4148 class diode across one of the zeners (in the opposite direction) with its own series resistor. That way, in one direction the other zener acts as normal with its opposite number and limits just below supply voltage, in the other direction the small signal diode simply kicks in at a very low voltage and the resistor drops the gain of the stage for that side of the signal according to the value you choose (in parallel with the existing feedback resistor which this whole network is slung across). The larger zener is still there to limit this side of the signal to just below supply voltage as well if it should ever get that big. So the gain is different for both sides of the signal but there is no actual clipping until just under the supply voltage on either side.

    My imagination always runs away with me at this stage. I'm a firm believer in the idea of stacking parallel diodes with their own resistor one by one so they come in at different signal levels to gradually bring the gain down over a much wider range. That's really getting closer to modelling the relatively wide bottoming out of a valve. You can also produce effects more like compression than clipping too. Beats the pants off a pair of back to back diodes in every way.
    avatar
    namklak

    Posts : 185
    Join date : 2015-01-30
    Location : Denver, CO

    Re: Spice simulation and analysis of the amp's audio performance

    Post by namklak on Thu Oct 27, 2016 11:03 am

    Gain stage and the twin digi pots - we don't know for sure that they are tracking. They are independent digipots controlled by the uC via I2C. That being said, they probably are tracking, I'm just being Capt Obvious I guess.

    This stage has soft limiting around the op-amp with two ordinary diodes in combo with a series resistor, so adjusting the gain and limiting of the input stage could reduce this soft limiting. The Gain stage also runs on a single ended supply due to digipots and digital switches, so half the head room. That should enable us to safely reduce the gain of the first stage?
    avatar
    bordonbert

    Posts : 745
    Join date : 2015-01-28
    Age : 97
    Location : Southern England

    Re: Spice simulation and analysis of the amp's audio performance

    Post by bordonbert on Thu Oct 27, 2016 11:12 am

    No, they definitely are tracking Namklak, I have the datasheet on the unit and it is a stereo type approach. It's an off the shelf unit not something with a special function tweaked for them. There's only one digital control signal which activates both halves of the pot the same. Here is the datasheet: GM36 Digipot
    avatar
    namklak

    Posts : 185
    Join date : 2015-01-30
    Location : Denver, CO

    Re: Spice simulation and analysis of the amp's audio performance

    Post by namklak on Thu Oct 27, 2016 12:51 pm

    I had already looked at the data sheet before I posted that.  Notice there is an RDAC register for each pot, and a block called Address Code.  This allows the Master uP to independently address them via I2C.  Quote from the spec, " Each VR offers a completely programmable value of resistance between the A terminal and the wiper or the B terminal and the wiper".  
    Then way down in the section DIGITAL INTERFACE 2 Wire Serial Bus is this statement, " The most significant bit (MSB) of the instruction byte labeled A/B is the RDAC subaddress select. A low selects RDAC1 and a high selects RDAC2 for the dual channel AD5282. "
    All this being said, the gm probably sends the same data to both RDACs.

    Modifying about what I said about Plot 8 - the Red mod would be good enough if we can mod the Treble to be useful, which I think was one of your plans.  Patience Grasshopper said my Master.
    avatar
    ignantios

    Posts : 44
    Join date : 2015-10-09

    Re: Spice simulation and analysis of the amp's audio performance

    Post by ignantios on Fri Oct 28, 2016 5:51 am

    Don't want to interrupt your conversation....just one simple question...is it posdible to modify this amp to sound warmer and not hifish?I have left my amp to a well known technician here in Greece to ask his opinion about modifying it..in order to become warmer and not so sterile!His first impression was that the eq of the amp doesn't react well to the changes you imply!I'll give you report in about a week!He wasn't keen on the sound of the amp at all...
    avatar
    bordonbert

    Posts : 745
    Join date : 2015-01-28
    Age : 97
    Location : Southern England

    Re: Spice simulation and analysis of the amp's audio performance

    Post by bordonbert on Fri Oct 28, 2016 7:00 am

    What you are asking is just what we are trying to do Ignantios.  Without wishing to be at all snobbish, this is not work that your average tech could do, but your man may well be better grounded than most so in his case it may be ok.  I'll be interested to hear why he thinks this amp won't like the changes we are discussing, it's only a collection of components and they can be made to do whatever you want within reason.  Good sound comes from solid engineering principles not magic pixie dust.  I hope this isn't a case of having to keep the "mojo"!  Mojo is just engineering you haven't identified or understood yet.

    Techs generally know how to pull a huge variety of amps apart and fix them quickly far better than an engineer could, their job is not to design them in the first place.  That's why I'm not going to play around too much with the valve stages which are not my area of expertise though I can see what is going on there.  I'm hoping they will be more or less good enough as is, they are very similar if not identical in places to existing gear such as Marshall's. I hope I only need to alter the solid state stuff which is fairly standard if you have the experience and having software modelling tools makes a proper job possible in the first place.  For one thing there are not many techs with the right background to carry out this sort of work, for another it would take too much of their time to be viable.  I'm pulling a good few all-nighters on this at the moment, (look at the timing of my posts).  You can't just look at the schematic, guess what could be changed, pull the amp apart, change it, put the amp back together again and expect it to be right, or even close.  It's given me some surprises already, and you have such a huge set of combinations of setting specific tweaks via the SSrelays and JFETs it has to be analysed in total and stage by stage, then decisions made.  It's a big big task.  If you do it anything like properly!

    His idea would most likely be what is always proposed in these cases, to mod the tonestack to try to change things, up a couple of the coupling caps and a cathode bypass cap or two, and that's exactly what you can't do.  The amp has its "problems" as we see them because of design decisions made by the H&K engineers on the drawing board.  They are not wrong, they just have a different goal to achieve than the one we would like them to reach for us.  To get to where they decided they have built in complex resetting of the responses of the Input Buffer/Overdrive stage and the Gain stage and perhaps others I haven't reached yet.  I first thought that the tonestack was weak until I started to model it and the other stages in Spice.  The tonestack actually behaves very well and only needs a little minor jiggling around to tweak its break points once the other responses have been sorted out.  It's the changes elsewhere which are what could alter the character of the overall amp.

    This may turn out to be a completely fruitless exercise.  (I did wonder if H&K are actually following this giggling into their Steins of German beer.  Smile  )  There is every chance that our changes, when we come to make them, will not make the amp any better and it may become too lifeless to work with.  That's one reason that I'm doing this the way I am, painfully and pedantically. pale  Does your tech guy have enough design experience to do that, and the love for the amp to spend the right amount of time to get it right?

    And this isn't a conversation between Namklak and myself, it just doesn't seem to interest anyone else enough for them to chip in. (Whic surprised me a little.) Please keep posting in here if you have any thoughts to offer or questions that occur to you, you don't have to be an engineering genius to be able to have your say. I for one would welcome more voices, and more eyes and brains checking what I'm up to. It's very easy to make a mistake and miss it when you are the only guy working on a project. That's what teams were invented for. Wink
    avatar
    ignantios

    Posts : 44
    Join date : 2015-10-09

    Re: Spice simulation and analysis of the amp's audio performance

    Post by ignantios on Fri Oct 28, 2016 7:43 am

    bordonbert wrote:What you are asking is just what we are trying to do Ignantios.  Without wishing to be at all snobbish, this is not work that your average tech could do, but your man may well be better grounded than most so in his case it may be ok.  I'll be interested to hear why he thinks this amp won't like the changes we are discussing, it's only a collection of components and they can be made to do whatever you want within reason.  Good sound comes from solid engineering principles not magic pixie dust.  I hope this isn't a case of having to keep the "mojo"!  Mojo is just engineering you haven't identified or understood yet.

    Techs generally know how to pull a huge variety of amps apart and fix them quickly far better than an engineer could, their job is not to design them in the first place.  That's why I'm not going to play around too much with the valve stages which are not my area of expertise though I can see what is going on there.  I'm hoping they will be more or less good enough as is, they are very similar if not identical in places to existing gear such as Marshall's.  I hope I only need to alter the solid state stuff which is fairly standard if you have the experience and having software modelling tools makes a proper job possible in the first place.  For one thing there are not many techs with the right background to carry out this sort of work, for another it would take too much of their time to be viable.  I'm pulling a good few all-nighters on this at the moment, (look at the timing of my posts).  You can't just look at the schematic, guess what could be changed, pull the amp apart, change it, put the amp back together again and expect it to be right, or even close.  It's given me some surprises already, and you have such a huge set of combinations of setting specific tweaks via the SSrelays and JFETs it has to be analysed in total and stage by stage, then decisions made.  It's a big big task.  If you do it anything like properly!

    His idea would most likely be what is always proposed in these cases, to mod the tonestack to try to change things, up a couple of the coupling caps and a cathode bypass cap or two, and that's exactly what you can't do.  The amp has its "problems" as we see them because of design decisions made by the H&K engineers on the drawing board.  They are not wrong, they just have a different goal to achieve than the one we would like them to reach for us.  To get to where they decided they have built in complex resetting of the responses of the Input Buffer/Overdrive stage and the Gain stage and perhaps others I haven't reached yet.  I first thought that the tonestack was weak until I started to model it and the other stages in Spice.  The tonestack actually behaves very well and only needs a little minor jiggling around to tweak its break points once the other responses have been sorted out.  It's the changes elsewhere which are what could alter the character of the overall amp.

    This may turn out to be a completely fruitless exercise.  (I did wonder if H&K are actually following this giggling into their Steins of German beer.  Smile  )  There is every chance that our changes, when we come to make them, will not make the amp any better and it may become too lifeless to work with.  That's one reason that I'm doing this the way I am, painfully and pedantically. pale  Does your tech guy have enough design experience to do that, and the love for the amp to spend the right amount of time to get it right?

    And this isn't a conversation between Namklak and myself, it just doesn't seem to interest anyone else enough for them to chip in.  (Whic surprised me a little.)  Please keep posting in here if you have any thoughts to offer or questions that occur to you, you don't have to be an engineering genius to be able to have your say.  I for one would welcome more voices, and more eyes and brains checking what I'm up to.  It's very easy to make a mistake and miss it when you are the only guy working on a project.  That's what teams were invented for. Wink
    i really wonder if you read my message carefully,cause i do read yours....where did you read that "my tech"doesn't like your ideas - observations?????? Please mate read carefully my message!I said he doesn't like the way the eq of the amp is working from the factory..these are his observations without opening the chasis ,only by tweaking the amp,it has nothing to do with your ideas.Also you don't know if he is an engineer or not....technician here in Greece might include (means)several degrees of education...anyway.We are here to help eachother ,i'll keep you informed for the progress...please keep us also informed!
    avatar
    bordonbert

    Posts : 745
    Join date : 2015-01-28
    Age : 97
    Location : Southern England

    Re: Spice simulation and analysis of the amp's audio performance

    Post by bordonbert on Fri Oct 28, 2016 7:56 am

    Ignantios wrote:His first impression was that the eq of the amp doesn't react well to the changes you imply!
    Nuff said?

    Ignantios wrote:I have left my amp to a well known technician here in Greece...
    Your word not mine.

    And I take your point that he may very well be highly educated, I deliberately left room in what I said to take that into account so as not to put the guy down.
    Bordonbert wrote:Without wishing to be at all snobbish, this is not work that your average tech could do, but your man may well be better grounded than most so in his case it may be ok.
     I was not putting him down, just describing where most "technicians" have their superior skills and their lesser skills in the normal electronics world.

    Maybe you should take your own advice and read my posts more carefully, as I do read yours!
    avatar
    ignantios

    Posts : 44
    Join date : 2015-10-09

    Re: Spice simulation and analysis of the amp's audio performance

    Post by ignantios on Fri Oct 28, 2016 8:04 am

    By "you imply"was meant for the user of the amp,for the owner of the amp mate not YOU as a specific person...that was a bad use of a word .You misunderstood it or i didn't use the right word...
    avatar
    bordonbert

    Posts : 745
    Join date : 2015-01-28
    Age : 97
    Location : Southern England

    Re: Spice simulation and analysis of the amp's audio performance

    Post by bordonbert on Fri Oct 28, 2016 8:05 am

    Gotcha!  I bow to your superior knowledge of these digital devices Namklak.  I take your point, I only took a very cursory glance at the datasheet, (and I didn't really know what I was seeing too). Laughing   Looking for this in the GM36 data, there only appears to be one Gain control on the 'uC and Digi Pot board' on the Slave controller.  Does that mean we can safely assume they both share control signals?  I'm sure we're right on that score but you also have a point, we shouldn't assume it has to be so.

    Yes, in the Input Stage it is fairly easy to alter the lower half of the curve and the upper half separately, the upper curve only takes one low value (standardised size) capacitor to be changed so you can make that anything you want.  The overall gain is set by one resistor so that is easily trimmed.  I'm with you on the dropping of overall gain a bit and I prefer to do it here for reasons which will become clear later Wink .

    The lower frequency half of the curve is a simple breakpoint for Clean and Crunch, but there is that slight step in it for Lead and Ultra.  It's only a few dB but I think they were maybe paranoid about low end boom for the high gain channels.  They are metal boys after all.  We can keep that pretty close to the original setting by adjusting the two resistor values which leaves that biggish 1uF poly capacitor alone.  We would have needed to go up in value and that's about as big as you can sensibly squeeze into the PCB in poly.

    As to the latest thoughts on the Gain stage....  As you pointed out, it only has a 15V supply, 7.5V each side, so headroom is limited - very.  The sim shows that the Gain stage actually clips at fairly normal input signal levels.  And what is worse, it's happening inside the opamp, not by any action of those diodes.  The inputs and output from the opamp show it and removing the diodes from the circuit doesn't affect it, in fact those diodes seem to do nothing really noticeable.  The stage is set up exactly the same for all 4 channels without Boost and the clipping level in this state is about 3.5V to the stage which means about 470mV to the input jack in Clean/Crunch (4x) and 235mV input in Lead/Ultra (8x).  That could be one contributory factor for the high input high gain harshness.

    Plot 15) This shows the Gain stage response with the amp set for any channel with the Boost off.  We are stepping the amp Gain control, (I've had to assume both of the pots simultaneously and equally), from 10% to 100% in steps of 10% with a 3.5V input from the preceding stage.  It looks absolutely clean right up to just below full Gain, 3.5V is just enough to show the onset of clipping.  (Nigel from Spinal Tap would go into the bad zone here).  In any state of the amp's controls, with inputs into the stage before the Gain control which are large enough, the Gain stage output clips sharply and cleanly on both sides as demonstrated in this case.  The FFT shows that distortion is just starting to increase as low as 40% Gain control travel.

    Plot 16) This shows the same thing but with a higher input voltage to the stage of 6.0V from the Input Buffer.  Notice the clever thing I hinted at earlier.  Not only does an increase in Gain control create more clipping of the signal, it lifts the level that the clipping occurs in terms of the output signal.  We could maybe keep a little of that.

    Plot 17) I did a quick run through putting a couple of back to back zeners across the feedback to introduce a limiting action which does not involve the opamp internals.  Here is the same plot as 16) with two 5.1V zeners.  The maximum output has dropped a little but the clipping is a more gradual and doesn't involve the opamp, the signals on its inputs now don't have the characteristic spikes.  That is one idea to keep up our sleeves if we need it.

    I now need to look at how this is affected when the Boost is kicked in for each of the options.  That idea of the zeners may be useful here as the internal opamp clipping will probably get more extreme with Boost of course.



    EDIT: I have run into a situation where I have used up all of my file attachment allowance. I'm removing the direct downloads and putting them in a zip file on my Dropbox site. I'll make sure to put a link to this every few posts and keep it up to date.

    GM36 Analysis Plots


    Last edited by bordonbert on Wed Nov 02, 2016 9:47 am; edited 1 time in total
    avatar
    bordonbert

    Posts : 745
    Join date : 2015-01-28
    Age : 97
    Location : Southern England

    Re: Spice simulation and analysis of the amp's audio performance

    Post by bordonbert on Fri Oct 28, 2016 9:09 am

    Wow!  I'm impressing myself now.  There are another 4 plots on Dropbox.  My automation of this is improving every time I do a bit more modelling.  For a free bit of kit LTSpice is pretty thorough and powerful.

    This time I've plotted the Gain stage frequency responses for the different channels with Boost applied.  I've made sure that we are below the signal level where there is any clipping at any frequency, another little nugget to come on that later. Wink

    Plot 18) Gain stage frequency response shared by all channels without Boost.  Pretty much what we would have expected except for the upper frequency limit and with a sensible lower cutoff too.  They really love their wide bandwidth.  Ignantios just used a great word in this area, "hifi".  I can't help agreeing with him that this is a hifi approach.  I'm not at all convinced that this wide bandwidth is a good thing.  They worry so much about restricting the extension at the bottom, why do they think it won't cause problems at the top? Distortion in our case is mainly the generation of harmonics.  These are by definition higher in frequency than the fundamental, and as they get passed from stage to stage each one then distorts the harmonics of the previous stages too generating higher and higher discordant harmonics.  I know from my hifi work how sounds above hearing create non-harmonic intermodulation effects within the audio band.  It's the same process for guitar amps too though they are much much less sensitive to it of course.  Looks almost like a degree of Loudness application doesn't it?

    Plot 19) Gain stage frequency response Clean channel with Boost.  Similar to without Boost and at the same level but with the upper mid/treble lifted in the lower settings.

    Plot 20) Gain stage frequency response Crunch/Lead channels with Boost.  Looks a bit different now.  There's a 6dB boost at the top end over the lower mid.  Don't like the look of that too much at first sight.

    Plot 21) Gain stage frequency response Ultra channel with Boost.  It's starting to look a bit more as I would have expected it, a simple hump in the mid range, but that's still at the top end of what could be described as mid range.

    Remember, these are all at the 0.1V level so there is no clipping within this stage.  If I increase this to 0.3V so that the Lead and Ultra go into clipping (Clean and Crunch still don't), a great thing happens.  Those diodes kick in and Bob's your uncle, the high level clipping in the opamp is prevented.  Looks like they just hadn't got enough voltage to bother about until now.

    Plot 22) Gain stage Ultra channel with Boost overdriven.  We are stepping the amp Gain control from 10% to 100% in steps of 10% with a 0.5V input from the preceding stage.  You can easily see the clipping these diodes produce.  Look at the signal level and remember this is the output of the stage.  It's well below the 5.5V slipping level in the opamp.



    EDIT: I have run into a situation where I have used up all of my file attachment allowance. I'm removing the direct downloads and putting them in a zip file on my Dropbox site. I'll make sure to put a link to this every few posts and keep it up to date.

    GM36 Analysis Plots


    Last edited by bordonbert on Wed Nov 02, 2016 9:48 am; edited 1 time in total
    avatar
    ignantios

    Posts : 44
    Join date : 2015-10-09

    Re: Spice simulation and analysis of the amp's audio performance

    Post by ignantios on Fri Oct 28, 2016 9:29 am

    bordonbert wrote:

    This time I've plotted the Gain stage frequency responses for the different channels with Boost applied.  I've made sure that we are below the signal level where there is any clipping at any frequency, another little nugget to come on that later. Wink

    Plot 18) Gain stage frequency response shared by all channels without Boost.  Pretty much what we would have expected except for the upper frequency limit and with a sensible lower cutoff too.  They really love their wide bandwidth.  Ignantios just used a great word in this area, "hifi".  I can't help agreeing with him that this is a hifi approach.  I'm not at all convinced that this wide bandwidth is a good thing.  They worry so much about restricting the extension at the bottom, why do they think it won't cause problems at the top? Distortion in our case is mainly the generation of harmonics.  These are by definition higher in frequency than the fundamental, and as they get passed from stage to stage each one then distorts the harmonics of the previous stages too generating higher and higher discordant harmonics.  I know from my hifi work how sounds above hearing create non-harmonic intermodulation effects within the audio band.  It's the same process for guitar amps too though they are much much less sensitive to it of course.  Looks almost like a degree of Loudness application doesn't it?



    Plot 20) Gain stage frequency response Crunch/Lead channels with Boost.  Looks a bit different now.  There's a 6dB boost at the top end over the lower mid.  Don't like the look of that too much at first sight.

    .
    you nailed it mate! I think in my humble opinion that this might explain the harsh sounding clean/crunch /lead channels.
    avatar
    bordonbert

    Posts : 745
    Join date : 2015-01-28
    Age : 97
    Location : Southern England

    Re: Spice simulation and analysis of the amp's audio performance

    Post by bordonbert on Fri Oct 28, 2016 10:10 am

    The trouble is I'm finding that there is so much coming out of this that it will be difficult to decide where to start. And where to stop of course. Very Happy

    When I've looked into what is left in terms of other stages, it seems logical to make the Input Buffer my first area to actually mod and the way that knocks on into the Gain stage again suggests that as a good starting point. Namklak has some good thoughts on that too. I think he is chomping at the bit to get modding too now. For myself, I've already said that I don't want to butcher the amp, just make a few simple reversible changes to resistors wherever possible. I prefer to leave the caps alone where it is possible as you run into problems with pin spacing and fitting on the board physically. It's actually reliability that is at the back of that not aesthetics (I should say "just" Wink ).

    avatar
    namklak

    Posts : 185
    Join date : 2015-01-30
    Location : Denver, CO

    Re: Spice simulation and analysis of the amp's audio performance

    Post by namklak on Fri Oct 28, 2016 10:20 am

    So my turn to bow - I'm ignorant as to how much voltage a pickup puts out.  I generally use passive lower output pickups - definitely my #1 Strat is lower output than my SG with SD Alnico II Pro pickups (damn near PAF output), and that is probably lower than average.

    Edit...
    Brainstorming here - say we reduce R13 on the first op-amp to 4.7k or even 1k (and change C11 appropriately), so that a signal from a normal passive pickup won't hit large value protection clipping diodes in all the op-amps before the first tube.  We should be able to recover that gain with a resistor change in one of the pre-amp tube stages eh?

    Sponsored content

    Re: Spice simulation and analysis of the amp's audio performance

    Post by Sponsored content


      Current date/time is Sat Jul 22, 2017 5:49 pm