# Simulation Beyond Volts and Amps (Part 1)

Using simulation, engineers can analyze a system’s performance prior to building and testing a hardware prototype. Doing more simulation at the front end of the design process reduces prototype and test costs at the back end. Simulating an electrical design, for example, means tracking voltages across, and currents through, system components – just like testing a hardware prototype. But improving system performance and reliability often requires understanding more than the voltage and current profiles tell us. Getting at these additional details, however, can be a challenge – unless you are using a modeling language that allows you to move beyond volts and amps to investigate the finer details of your design.

I have posted a few commentaries on VHDL-AMS, the IEEE standard language for modeling analog and mixed-signal system behavior. VHDL-AMS gives engineers increased flexibility in what they can model, and therefore analyze, about their systems. As a simple example, let’s take a quick look at a basic incandescent lamp model.

A basic incandescent lamp consists of a sealed glass bulb containing a filament suspended between two electrodes. The glass bulb is typically evacuated, or contains an inert gas, to prevent filament oxidization. When current passes through the filament, it heats up and glows, giving off both light and heat. As it turns out, the majority of energy consumed by an incandescent lamp is emitted as heat, while very little is turned into visible light. Since most of the energy is lost as heat, it is useful to understand the lamp’s thermal profile.  VHDL-AMS is well suited for this task.

Electrically, the lamp filament behaves like a temperature dependent resistance. Thermally, current flows through the filament and power is dissipated as a combination of thermal conductance, thermal capacitance, and radiation. The following portion of a VHDL-AMS based lamp model declares important lamp quantities, or analog unknowns, for which the simulator finds a solution. Note that I’ve added the line numbers for ease of reference.

(1) quantity v_lamp across i_lamp through p1 to p2;

(2) quantity r_temp : resistance;

(3) quantity temp_fil : temperature;

(4) quantity hflow : heat_flow;

Line (1) declares two branch quantities, v_lamp and i_lamp, which are associated with pins p1 and p2 of the model. In this case, v_lamp represents the voltage across, and i_lamp the current through, the lamp’s filament. Lines (2) through (4) declare free quantities which the simulator calculates to give additional information about the lamp’s operation. Line (2) declares r_temp, the temperature dependent resistance of the filament. Line (3) declares temp_fil, the temperature of the filament. And finally, line (4) declares hflow, the heat flow from the filament. Note the terms following the [ : ] in lines (2) through (4). These are type declarations which define the units used to plot the simulation results for each of the free quantities (r_temp is of type resistance and is plotted in Ohms; temp_fil is of type temperature and is plotted in degrees Celsius, and hflow is of type heat_flow and is plotted in Watts). The units for the v_lamp and i_lamp branch quantities are determined by the definitions for pins p1 and p2, which are assigned electrical natures elsewhere in the model.

In addition to the typical voltage and current relationships for the lamp, the simulator uses these free quantities to calculate the lamp’s thermal performance.  In my next few posts I will use this lamp model in a simple automotive emergency flasher system to analyze the circuit’s thermal behavior.

## Post Author

Posted November 3rd, 2010, by