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 x(t) is converted to digital form x(n) by an A/D converter with sampling ratio f_{s1} and b_{1}-bit resolution. In the next stage, a digital control algorithm using DSP is executed. The algorithm is calculated with b_{2}-bit resolution and sampling ratio f_{s2}. Finally, output control signal y(n) is transferred to a digital PWM with b_{3}-bit resolution sampling ratio f_{s3}. The PWM controls output power switches S_{1} and S_{2}. The switches work with switching frequency. The digital PWM with two power switches S_{1} and S_{2} and an analog output filter L_{C} and C_{C} 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:

  • f_{s1}, f_{s2}, f_{s3} — signal sampling ratios
  • b_{1}, b_{2}, b_{3}— signal resolution in bits.
  • f_{C} — 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 b_{1}, b_{2}, f_{s1} and f_{s2}. 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 : f_{s3}=44.1kHz and f_{s3}=44.1kHz and b_{3}=16 bit, the clock frequency of PWM counters can be calculated using the equation:

f_{h} =f_{s3}2^{b3} \approx 2.8GHz.

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:

y(t) = a_{1}x(t) + a_{2}x(t)^{2}+a_{3}x(t)^{3}+ \ldots + a_{k}x(t)^{k}

In linear circuits, only a_{1} 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

THD = \frac{\sqrt{\sum_{k=2}^{N}U_{k}^{2}}}{U_{1}}

where U_{1} — 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.


Nalin Pithwa