## [Ktechlab-devel] Better modeling of properties.

 [Ktechlab-devel] Better modeling of properties. From: Alan Grimes - 2006-06-14 22:19:53 Attachments: simple.circuit ```It seems I've accidentally been sending messages to Dan instead of to the list. If anyone wants to hear about my experience trying to use an inductor, my current schematics, or my build problems, speak up... I've been studying the implementation of element, which seems to be the base class for just about everything, and I have a number of concerns about various design decisions. 1, probably most important: _EVERY_ part has at least three static properties and three dynamic properties. these are: STATIC DYNAMIC Resistance voltage potential Impedance current Capacitance charge (stored energy) Lets consider the attached circuit, It's power supply can be expressed in terms of the above, No battery I know of is a perfect conductor, so it has an internal resistance. In the case of a current SOURCE, the resistance is NEGATIVE. Lets say it has a negative impedance of -100ohms. (meaning it will only supply 2.5V to a 100 ohm load...) It can't produce an infinite current immediately (or at all!), so it has some inductance. And finally it has a capacitance, which is, for the duration of its service life, equal to its output voltage. The capacitor has two kinds of resistances, the resistance of it's plates and the leakage resistance, (R_leak). In audio, it is often necessary to use capacitors with low ESL to provide power for high-frequency waves and, in power supplies, capacitors with low ESR to handle demanding loads in a rectifier. Often these capacitors can cost \$70-\$120. It is important that these properties be well modeled so that the designer can know what his design really requires. In the amp I'm working on, the interstage coupling capacitors need low ESL and ESR so that the power stage is adiquitely driven. I require low ESR capacitors in the power supply to handle the incomming waveform and turn it into nice clean DC. The capacitor that I put around my dummy power section is called a snubbing capacitor, it is a low ESL capacitor that complements the low ESR capacitor in the filter. It's job is to handle instantanious voltage changes. For example, I'd tend to snub a "JENSEN 68091" with an "AURICAP-64233" 2. I notice that the element class seems to have a lot of information about the selection of components available. I don't think this is a good design decision because it makes the code more brittle. Ideally, it will be possible to add arbitrary new components without changing the base class... 3. Elements should not know about "ElementSet", they only need to know about their most immediate connections and a few environmental parameters such as the temperature of the chassis (which I noticed was implemented as a constant! =0 ) -- what is a constant, should be a constant, what isn't a constant, shouldn't. ```

 [Ktechlab-devel] Better modeling of properties. From: Alan Grimes - 2006-06-14 22:19:53 Attachments: simple.circuit ```It seems I've accidentally been sending messages to Dan instead of to the list. If anyone wants to hear about my experience trying to use an inductor, my current schematics, or my build problems, speak up... I've been studying the implementation of element, which seems to be the base class for just about everything, and I have a number of concerns about various design decisions. 1, probably most important: _EVERY_ part has at least three static properties and three dynamic properties. these are: STATIC DYNAMIC Resistance voltage potential Impedance current Capacitance charge (stored energy) Lets consider the attached circuit, It's power supply can be expressed in terms of the above, No battery I know of is a perfect conductor, so it has an internal resistance. In the case of a current SOURCE, the resistance is NEGATIVE. Lets say it has a negative impedance of -100ohms. (meaning it will only supply 2.5V to a 100 ohm load...) It can't produce an infinite current immediately (or at all!), so it has some inductance. And finally it has a capacitance, which is, for the duration of its service life, equal to its output voltage. The capacitor has two kinds of resistances, the resistance of it's plates and the leakage resistance, (R_leak). In audio, it is often necessary to use capacitors with low ESL to provide power for high-frequency waves and, in power supplies, capacitors with low ESR to handle demanding loads in a rectifier. Often these capacitors can cost \$70-\$120. It is important that these properties be well modeled so that the designer can know what his design really requires. In the amp I'm working on, the interstage coupling capacitors need low ESL and ESR so that the power stage is adiquitely driven. I require low ESR capacitors in the power supply to handle the incomming waveform and turn it into nice clean DC. The capacitor that I put around my dummy power section is called a snubbing capacitor, it is a low ESL capacitor that complements the low ESR capacitor in the filter. It's job is to handle instantanious voltage changes. For example, I'd tend to snub a "JENSEN 68091" with an "AURICAP-64233" 2. I notice that the element class seems to have a lot of information about the selection of components available. I don't think this is a good design decision because it makes the code more brittle. Ideally, it will be possible to add arbitrary new components without changing the base class... 3. Elements should not know about "ElementSet", they only need to know about their most immediate connections and a few environmental parameters such as the temperature of the chassis (which I noticed was implemented as a constant! =0 ) -- what is a constant, should be a constant, what isn't a constant, shouldn't. ```