96 kHz.org
Advanced Audio Recording

Physical Modeling with DSPs

Physical modeling currently is a big subject in engineering. One the one hand, it might be used for simulating mechanical or electronical behavior to analyze such systems optimize surrounding components to cooperate with such systems. Electronic circuits like e.g. PLCs which are often used to control electromechanical systems, can be tested with the HIL (hardware in the loop) concept, since they run in real time (up to a given speed limit). Various test cases and the behavior of the environment or the user are applied and the response of the system is simulated.

Typically, such HIL systems for real time simulation and emulation are created with micro processor units or digital signal processors. For example, a current DSP operating at 80MHz performs a classic 2nd order differential equation which describes a sinus oscillation in about 1us because it needs more than 100 clock cycles for RAM access, wait states, summation, multiplication and storing the three basic parameters position, speed and acceleration. For an appropriate real time operation, around 100 kHz of sample frequency are used to model a 10-20kHz bandwidth system correctly enough to simulate a regulator's behavior which is controlling this system. More than 10 such equations can be solved without exceeding the real time border.

 

Apart from simulating circuits for analysis, physical modeling can be used to generate output of such systems by intention. Physical models of electrical circuits are used to perform virtual analog modeling of old music synthesizers. Now, this page shows how virtual analog modeling can be used for sound synthesis in modern musical instruments:

 

A Virtual Analog Synthesizer


The technique of VA synthesis is a known concept for nowadays' music synthesizers which initially worked with electrical circuits. Since sound synthesis requires "only" 44100 samples per seconds to go with audio CD productions, DSP based devices appear suitable to generate all the required information for VCOs, LFOs, modulators, filters and modifiers to produce virtual analog sound.

 

My first approach of a VA-Synthesizer was done in 1998 with a TMS320-System from Texas Instruments formerly used for video applications.

    

Basic algorithms were introduced to generate some VCOs (which are NCOs in numerical systems of course), some LFOs and some filtering to tweak and manipulate the voices. The first synth on the TMS-platform had 32 voices with 2 Oscillators and 2 LFOs per channel, some global filtering, compressing and limiting. Oscillators were DDS like controlled from the outside. All operated in 16 bit in C language.

 

pSpice Shematic of the electrical oscillator for SST


Afterwards, algorithms had been transported to 24 bit being more compatible to the digital audio standard using Motorola's DSP 56301 digital signal processor. The system was simply doubled, having 64 voices now. Getting it more complex exceeded the operation speed, so the number of voices were reduced to 16 again, having 4 LFOs and 4 oscillators per channel, and some better filters instead. Filtering is essential for digital sound synthesis, otherwise it will sound boring. The big difference were the oscillators: Unlike with the TMS, all OSCs were self oscillating like a mechanical system with acceleration and damping parameters and a well defined energy loss. Rather than controlling the oscillators' phase from a pointer like with DDS circuits, the OCSs were fed by virtual energy increasing both phase and amplitude which leads to a more natural behavior. The DSP 56301 and it's successors are widely used in digital audio processing.

 

A DSP 56302 is used to test some new algorithms:

 

DSP Kit for Virtual Analog Modelling


Read more about the DSP 56302 board HERE.

 

Virtual Musical Instruments

Read more about that in this article Limits of VA-Modeling.

 

 

© 2002 Jürgen Schuhmacher