## An application of math to biology

Stanislaw Ulam also had an interest in the application of math to biology. One example that may have relevance is the subfield of cellular automata founded by von Neumann and Ulam. As an example of this class of problems imagine dividing a plane into a several small squares like a checkerboard with several objects placed in nearby squares. Then specify rules for the appearance of new objects or the disappearance of old objects in new squares depending on whether adjacent squares are occupied or not. With each application of the rules to all the squares, the pattern of occupied squares evolves with time. Depending on the initial configuration and the rules of growth, some computer generated cellular automata evolve into patterns of snowflakes or crystals and others seem to have an everchanging motion as if they are alive. In some cases, colonies of self replicating patterns expand to fill the available space like the growth of coral or bacteria in a petri dish.

Reference: Adventures of a mathematician, S. Ulam, 1991 edition.

Cheers, cheers, cheers,

Nalin Pithwa

## Conversion of analog to digital signal

There are several sources of errors during conversion of analog signal to digital signal. Control and prediction/quantification of these errors is very important for the overall quality of a digital control system. However, in practical control systems, the price is also one of the most important limiting factors and the designer is forced to compromise solution. Also, it seems to me, apart from the three P’s (price, power, performance),another very important parameter is security including protection of the IP of the company.

In control systems, it is necessary to observe the work of the controlled object. This is usually achieved in power electronics systems by measuring currents and voltages. So, essentially such a digital control system processes analog currents and voltage signals by converting them to digital form.

Typical circuits of analog inputs for measuring voltages and currents :- in the voltage measurement circuit, voltage from the voltage divider goes through the amplifier input and the antialiasing filter to the sample-and-hold circuit and ADC. Finally digital signal corresponding to the measured voltage is sent to the processor control system. A similar process takes place in the current measurement circuit, where instead of a voltage divider, current transducer is applied. (Current and voltage measurement issues will be discussed later on this blog).

Let us consider a very simple example of a power electronic circuit.with an open loop/multi rate digital control. (this circuit may be part of the control system for DC/DC, DC/AC, AC/DC, AC/AC converters or active power filters etc). An open system is chosen here for study purposes as a feedback system anslysis is much more involved.

Analog input signal is converted to digital form by an A/D converter with sampling ratio and -bit resolution. In the next stage, a digital control algorithm using DSP is executed. The algorithm is calculated with -bit resolution and sampling ratio . Finally, output control signal is transferred to a digital PWM with -bit resolution sampling ratio . The PWM controls output power switches and . The switches work with switching frequency. The digital PWM with two power switches and and an analog output filter and works as a digital to analog D/A power converter. It converts energy from a direct current source (DC) to the output. Typically the main issue is the quality of the output voltage and current. Therefore, the following signal parameters should be considered:

- — signal sampling ratios
- — signal resolution in bits.
- — transistor switching frequency
- THD — total harmonic distortion ratio.
- SNR — output signal to noise ratio.
- SINAD — output signal to noise and distortion ratio.

Finally, the required SINAD value of output current or voltage of power electronics circuit are dependent on the application. For example, for battery charger SINAD value equal to 30 dB is sufficient. However, for the high quality audio power amplifier the SINAD value should be bigger than 100 dB. As we can see the spread of these parameters of digital control systems for power electronics circuits is very high. Now-a-days there is a huge offer of A/D converters and DSPs, so it is easy to choose circuits with adequate parameters , , and . The only considerable limitation may be the cost of these circuits. The last stage, with digital PWM may be a bottleneck of the whole system, especially for high resolution, for example, high quality power audio amplifier with parameters : kHz and kHz and bit, the clock frequency of PWM counters can be calculated using the equation:

GHz.

The calculated value of clock frequency is too high for ordinary digital circuits, therefore, resolution of digital PWM should be reduced. However, it will result in deterioration of the signal-to-ratio.

Total Harmonic Distortion:

Total harmonic distortion THD ratio is a form of nonlinear distortion in circuits in which harmonics (signals whose frequency is an integer multiple of the input signal) are generated. A wide-class of non-linear circuits can be described by the equation:

In linear circuits, only coefficient is nonzero.

THD ratio is measured in percents or in decibels (dB) and harmonic distortion is calculated as the ratio of the level of the harmonic to the level of the original frequency

where — amplitude of first or fundamental harmonic and so on.

A/D converters of TMS320F2837xD

TI is permanently engaged in the design of a wide range of microcontrollers/DSPs intended for use in power electronics systems. One of the most advanced is the TMS320F2837xD microcontroller/DSP family. The TMS320F2837xD includes four independent high performance A/D converters (with a total input of 24 channels possible), allowing the device to efficiently manage multiple analog signals for enhanced overall system throughput. Each ADC has a single SH circuit, and using multiple ADC modules enables it to perform simultaneous sampling or independent operation. The ADC is implemented using a successive approximation and it has the configurable resolution of either 16 bits or 12 bits. These ADC’s have many modes of operation. The most important is the possibility to sample four analog signals. So we cannot, quite clearly, sample 8 analog signals at a time.

Cheers,

Nalin Pithwa