Signal generation
[Basic]


Detailed Description

All the signal generation functions currently supported by the DSP library.


Sinusoidal

signal_generation_sinusoidal.gif
This function generates a sinusoidal signal with a specified frequency, sampling frequency and phase.
Note:
The amplitude of the signal fits in the range [-1; 1].

The phase is scaled to fit in the range [-1; 1], where -1 corresponds to -pi and 1 to pi.

Relative functions:


Cosinusoidal

signal_generation_cosinusoidal.gif
This function generates a cosinusoidal signal with a specified frequency, sampling frequency and phase.
Note:
The amplitude of the signal fits in the range [-1; 1].

The phase is scaled to fit in the range [-1; 1], where -1 corresponds to -pi and 1 to pi.

Relative functions:


Noise

signal_generation_noise.gif
This function generates a noise with a specified amplitude.
Note:
The amplitude of the signal fits in the range [-1; 1].
Relative functions:


Rectangular

signal_generation_rectangular.gif
This function generates a rectangular signal.
Note:
The amplitude of the signal fits in the range [-1; 1].
Relative functions:


Square

signal_generation_square.gif
This function generates a square signal.
Note:
The amplitude of the signal fits in the range [-1; 1].
Relative functions:


Saw tooth

signal_generation_saw_tooth.gif
This function generates a saw tooth signal.
Note:
The amplitude of the signal fits in the range [-1; 1].
Relative functions:


Dirac comb

signal_generation_dirac_comb.gif
This function generates a dirac comb signal.
Note:
The amplitude of the signal fits in the range [0; 1].
Relative functions:


Ramp

signal_generation_ramp.gif
This function generates a ramp.
Note:
The amplitude of the signal fits in the range [0; 1].
Relative functions:


Step

signal_generation_step.gif
This function generates a step.

Relative functions:


Dirac

signal_generation_dirac.gif
This function generates a dirac.
Note:
The amplitude of the signal fits in the range [0; 1].
Relative functions:


Benchmark on the AT32UC targets



Functions

dsp16_t dsp16_gen_cos (dsp16_t *vect1, int size, int f, int fs, dsp16_t phase)
 16-bit fixed point version of the cosinusoidal signal generation.
void dsp16_gen_dcomb (dsp16_t *vect1, int size, int f, int fs, dsp16_t delay)
 16-bit fixed point version of the dirac comb signal generation.
void dsp16_gen_dirac (dsp16_t *vect1, int size, int dirac_index)
 16-bit fixed point version of the dirac comb signal generation.
void dsp16_gen_noise (dsp16_t *vect1, int size, dsp16_t amp)
 16-bit fixed point version of the noise generation.
void dsp16_gen_ramp (dsp16_t *vect1, int size, dsp16_t increment)
 16-bit fixed point version of the ramp signal generation.
void dsp16_gen_rect (dsp16_t *vect1, int size, int f, int fs, dsp16_t duty, dsp16_t delay)
 16-bit fixed point version of the rectangular signal generation.
dsp16_t dsp16_gen_saw (dsp16_t *vect1, int size, int f, int fs, dsp16_t duty, dsp16_t delay)
 16-bit fixed point version of the saw tooth signal generation.
dsp16_t dsp16_gen_sin (dsp16_t *vect1, int size, int f, int fs, dsp16_t phase)
 16-bit fixed point version of the sinusoidal signal generation.
static void dsp16_gen_sqr (dsp16_t *vect1, int size, int f, int fs, dsp16_t delay)
 16-bit fixed point version of the square signal generation.
void dsp16_gen_step (dsp16_t *vect1, int size, dsp16_t intial_value, dsp16_t final_value, int step_index)
 16-bit fixed point version of the dirac comb signal generation.
dsp32_t dsp32_gen_cos (dsp32_t *vect1, int size, int f, int fs, dsp32_t phase)
 32-bit fixed point version of the cosinusoidal signal generation.
void dsp32_gen_dcomb (dsp32_t *vect1, int size, int f, int fs, dsp32_t delay)
 32-bit fixed point version of the dirac comb signal generation.
void dsp32_gen_dirac (dsp32_t *vect1, int size, int dirac_index)
 32-bit fixed point version of the dirac comb signal generation.
void dsp32_gen_noise (dsp32_t *vect1, int size, dsp32_t amp)
 32-bit fixed point version of the noise generation.
void dsp32_gen_ramp (dsp32_t *vect1, int size, dsp32_t increment)
 32-bit fixed point version of the ramp signal generation.
void dsp32_gen_rect (dsp32_t *vect1, int size, int f, int fs, dsp32_t duty, dsp32_t delay)
 32-bit fixed point version of the rectangular signal generation.
dsp32_t dsp32_gen_saw (dsp32_t *vect1, int size, int f, int fs, dsp32_t duty, dsp32_t delay)
 32-bit fixed point version of the saw tooth signal generation.
dsp32_t dsp32_gen_sin (dsp32_t *vect1, int size, int f, int fs, dsp32_t phase)
 32-bit fixed point version of the sinusoidal signal generation.
static void dsp32_gen_sqr (dsp32_t *vect1, int size, int f, int fs, dsp32_t delay)
 32-bit fixed point version of the square signal generation.
void dsp32_gen_step (dsp32_t *vect1, int size, dsp32_t intial_value, dsp32_t final_value, int step_index)
 32-bit fixed point version of the dirac comb signal generation.


Function Documentation

dsp16_t dsp16_gen_cos ( dsp16_t vect1,
int  size,
int  f,
int  fs,
dsp16_t  phase 
)

16-bit fixed point version of the cosinusoidal signal generation.

Parameters:
vect1 A pointer on a 16-bit vector which is the output buffer of this function.
size The number of elements of the output vector.
f The frequency of the output signal.
fs The sampling frequency of the output signal.
phase The phase of the output signal.
Returns:
The phase of the signal generated.

void dsp16_gen_dcomb ( dsp16_t vect1,
int  size,
int  f,
int  fs,
dsp16_t  delay 
)

16-bit fixed point version of the dirac comb signal generation.

Parameters:
vect1 A pointer on a 16-bit vector which is the output buffer of this function.
size The number of elements of the output vector.
f The frequency of the output signal.
fs The sampling frequency of the output signal.
delay The delay of the periodic waveform. The delay must feet in the range [0; 1] where 1 to T.

void dsp16_gen_dirac ( dsp16_t vect1,
int  size,
int  dirac_index 
)

16-bit fixed point version of the dirac comb signal generation.

Parameters:
vect1 A pointer on a 16-bit vector which is the output buffer of this function.
size The number of elements of the output vector.
dirac_index The index in the buffer, where the dirac appears.

void dsp16_gen_noise ( dsp16_t vect1,
int  size,
dsp16_t  amp 
)

16-bit fixed point version of the noise generation.

Parameters:
vect1 A pointer on a 16-bit vector which is the output buffer of this function.
size The number of elements of the output vector.
amp The amplitude of the signal.

void dsp16_gen_ramp ( dsp16_t vect1,
int  size,
dsp16_t  increment 
)

16-bit fixed point version of the ramp signal generation.

Parameters:
vect1 A pointer on a 16-bit vector which is the output buffer of this function.
size The number of elements of the output vector.
increment The incrementation of the signal per vector's element.

void dsp16_gen_rect ( dsp16_t vect1,
int  size,
int  f,
int  fs,
dsp16_t  duty,
dsp16_t  delay 
)

16-bit fixed point version of the rectangular signal generation.

Parameters:
vect1 A pointer on a 16-bit vector which is the output buffer of this function.
size The number of elements of the output vector.
f The frequency of the output signal.
fs The sampling frequency of the output signal.
duty The duty cycle of the output signal. The duty cycle is a number in the range ]0; 1] which is the ratio between the pulse duration and the period of the waveform.
delay The delay of the periodic waveform. The delay must feet in the range [0; 1] where 1 to T.

Referenced by dsp16_gen_sqr().

dsp16_t dsp16_gen_saw ( dsp16_t vect1,
int  size,
int  f,
int  fs,
dsp16_t  duty,
dsp16_t  delay 
)

16-bit fixed point version of the saw tooth signal generation.

Parameters:
vect1 A pointer on a 16-bit vector which is the output buffer of this function.
size The number of elements of the output vector.
f The frequency of the output signal.
fs The sampling frequency of the output signal.
duty The duty cycle of the output signal. The duty cycle is a number in the range ]0; 1] which is the ratio between the pulse duration and the period of the waveform.
delay The delay of the periodic waveform. The delay must feet in the range [0; 1] where 1 to T.
Returns:
The phase of the signal generated.

dsp16_t dsp16_gen_sin ( dsp16_t vect1,
int  size,
int  f,
int  fs,
dsp16_t  phase 
)

16-bit fixed point version of the sinusoidal signal generation.

Parameters:
vect1 A pointer on a 16-bit vector which is the output buffer of this function.
size The number of elements of the output vector.
f The frequency of the output signal.
fs The sampling frequency of the output signal.
phase The phase of the output signal.
Returns:
The phase of the signal generated.

static void dsp16_gen_sqr ( dsp16_t vect1,
int  size,
int  f,
int  fs,
dsp16_t  delay 
) [inline, static]

16-bit fixed point version of the square signal generation.

Parameters:
vect1 A pointer on a 16-bit vector which is the output buffer of this function.
size The number of elements of the output vector.
f The frequency of the output signal.
fs The sampling frequency of the output signal.
delay The delay of the periodic waveform. The delay must feet in the range [0; 1] where 1 to T.

Definition at line 244 of file dsp_signal_generation.h.

References dsp16_gen_rect(), and DSP16_Q.

00244 { dsp16_gen_rect(vect1, size, f, fs, DSP16_Q(0.5), delay); }

void dsp16_gen_step ( dsp16_t vect1,
int  size,
dsp16_t  intial_value,
dsp16_t  final_value,
int  step_index 
)

16-bit fixed point version of the dirac comb signal generation.

Parameters:
vect1 A pointer on a 16-bit vector which is the output buffer of this function.
size The number of elements of the output vector.
intial_value The initial value of the signal.
final_value The final value of the signal.
step_index The index in the buffer, where the step appears.

dsp32_t dsp32_gen_cos ( dsp32_t vect1,
int  size,
int  f,
int  fs,
dsp32_t  phase 
)

32-bit fixed point version of the cosinusoidal signal generation.

Parameters:
vect1 A pointer on a 32-bit vector which is the output buffer of this function.
size The number of elements of the output vector.
f The frequency of the output signal.
fs The sampling frequency of the output signal.
phase The phase of the output signal.
Returns:
The phase of the signal generated.

void dsp32_gen_dcomb ( dsp32_t vect1,
int  size,
int  f,
int  fs,
dsp32_t  delay 
)

32-bit fixed point version of the dirac comb signal generation.

Parameters:
vect1 A pointer on a 32-bit vector which is the output buffer of this function.
size The number of elements of the output vector.
f The frequency of the output signal.
fs The sampling frequency of the output signal.
delay The delay of the periodic waveform. The delay must feet in the range [0; 1] where 1 to T.

void dsp32_gen_dirac ( dsp32_t vect1,
int  size,
int  dirac_index 
)

32-bit fixed point version of the dirac comb signal generation.

Parameters:
vect1 A pointer on a 32-bit vector which is the output buffer of this function.
size The number of elements of the output vector.
dirac_index The index in the buffer, where the dirac appears.

void dsp32_gen_noise ( dsp32_t vect1,
int  size,
dsp32_t  amp 
)

32-bit fixed point version of the noise generation.

Parameters:
vect1 A pointer on a 32-bit vector which is the output buffer of this function.
size The number of elements of the output vector.
amp The amplitude of the signal.

void dsp32_gen_ramp ( dsp32_t vect1,
int  size,
dsp32_t  increment 
)

32-bit fixed point version of the ramp signal generation.

Parameters:
vect1 A pointer on a 32-bit vector which is the output buffer of this function.
size The number of elements of the output vector.
increment The incrementation of the signal per vector's element.

void dsp32_gen_rect ( dsp32_t vect1,
int  size,
int  f,
int  fs,
dsp32_t  duty,
dsp32_t  delay 
)

32-bit fixed point version of the rectangular signal generation.

Parameters:
vect1 A pointer on a 32-bit vector which is the output buffer of this function.
size The number of elements of the output vector.
f The frequency of the output signal.
fs The sampling frequency of the output signal.
duty The duty cycle of the output signal. The duty cycle is a number in the range ]0; 1] which is the ratio between the pulse duration and the period of the waveform.
delay The delay of the periodic waveform. The delay must feet in the range [0; 1] where 1 to T.

Referenced by dsp32_gen_sqr().

dsp32_t dsp32_gen_saw ( dsp32_t vect1,
int  size,
int  f,
int  fs,
dsp32_t  duty,
dsp32_t  delay 
)

32-bit fixed point version of the saw tooth signal generation.

Parameters:
vect1 A pointer on a 32-bit vector which is the output buffer of this function.
size The number of elements of the output vector.
f The frequency of the output signal.
fs The sampling frequency of the output signal.
duty The duty cycle of the output signal. The duty cycle is a number in the range ]0; 1] which is the ratio between the pulse duration and the period of the waveform.
delay The delay of the periodic waveform. The delay must feet in the range [0; 1] where 1 to T.
Returns:
The phase of the signal generated.

dsp32_t dsp32_gen_sin ( dsp32_t vect1,
int  size,
int  f,
int  fs,
dsp32_t  phase 
)

32-bit fixed point version of the sinusoidal signal generation.

Parameters:
vect1 A pointer on a 32-bit vector which is the output buffer of this function.
size The number of elements of the output vector.
f The frequency of the output signal.
fs The sampling frequency of the output signal.
phase The phase of the output signal.
Returns:
The phase of the signal generated.

static void dsp32_gen_sqr ( dsp32_t vect1,
int  size,
int  f,
int  fs,
dsp32_t  delay 
) [inline, static]

32-bit fixed point version of the square signal generation.

Parameters:
vect1 A pointer on a 32-bit vector which is the output buffer of this function.
size The number of elements of the output vector.
f The frequency of the output signal.
fs The sampling frequency of the output signal.
delay The delay of the periodic waveform. The delay must feet in the range [0; 1] where 1 to T.

Definition at line 254 of file dsp_signal_generation.h.

References dsp32_gen_rect(), and DSP32_Q.

00254 { dsp32_gen_rect(vect1, size, f, fs, DSP32_Q(0.5), delay); }

void dsp32_gen_step ( dsp32_t vect1,
int  size,
dsp32_t  intial_value,
dsp32_t  final_value,
int  step_index 
)

32-bit fixed point version of the dirac comb signal generation.

Parameters:
vect1 A pointer on a 32-bit vector which is the output buffer of this function.
size The number of elements of the output vector.
intial_value The initial value of the signal.
final_value The final value of the signal.
step_index The index in the buffer, where the step appears.


Generated on Fri Feb 19 02:28:00 2010 for AVR32 - Fixed point DSP Library by  doxygen 1.5.5