100 likes | 182 Views
EE513 Audio Signals and Systems. Complex Oscillator Kevin D. Donohue Electrical and Computer Engineering University of Kentucky. Oscillator Design.
E N D
EE513Audio Signals and Systems Complex Oscillator Kevin D. DonohueElectrical and Computer EngineeringUniversity of Kentucky
Oscillator Design Marginally Stable approach: Design a system by placing poles so that a marginally stable system results, which oscillates with a fundamental frequency of f0 when excited by a unit impulse. Show that TF and difference equation of oscillator system are given by: where K scales the input and relates to the amplitude of oscillations, and relates to the frequency of oscillation fo and sampling frequency fs by:
Oscillator Design Trig-Identity Approach: Design a system by selecting values of A and B in the trig-identity below so that y[n] can substitute out the cos(nT0) function (T is sampling period) and result in a second order autoregressive difference equation. Show that difference equation of oscillator system is given by: Oscillator is initiated with non-zero initial conditions. For n=0, let
Analyze Design Consider Z transform of general second order system: Show that Z transform can be expressed as: Input term Initial condition term
Multiple Frequency Oscillator Excite a bank of oscillators (in parallel) tuned to different frequencies Each term represents a separate difference equation (second order system) where their outputs can be added together:
Multiple-Frequency Oscillator To obtain a direct form implementation for use with the filter function in Matlab, each parallel term must be combined to obtain a higher order, but single term, transfer function The numerator and denominator coefficients can be used directly in the direct-form I or II implementation of a complex (multiple-frequency) oscillator. The left hand side represents a parallel implementation. See Matlab functions residuez, filter, fdatool, dfilt
z-1 z-1 z-1 z-1 z-1 z-1 b1 bM-1 b0 bM 1/a0 -a2 -a1 x[n] y[n] w[n] -aN-1 Direct Form I Implementations Direct form I implementation of an IIR filter. The square blocks represent unit delays, the triangles represent multiplies, and the circles represent accumulators. The variable w[n] is an intermediate value output from the all-zero component and the input to the all-pole component of the filter, as suggested by the factorization in the equation.
z-1 G0 y[n] w[n] x[n] 1/a0 z-1 b0 b1 -a1 bM -aN Direct Form II Implementation Direct form II implementation of an IIR filter. Note: 1. The difference from direct form I is that the input and w[n] are associated with the all-pole component of the filter while the output and w[n] are associated with the all-zero part as suggested by the equation below. • 2. The filter coefficients are the same for either direct form I or II implementations.
Cascade Implementation From a direct form implementation a cascaded series of second order filters can be also be derived for another implementation of second order systems. Note in this case the coefficient are no longer the same as for the direct form implementations. In Matlab see method convert and sos and filter for dfilt, and tf2sos, sos2tf.
Parallel Implementation A parallel bank of second order filters can be also be derived (obtained directly from the oscillator design procedures described in these notes). Note in this case the coefficient are not the same as in the direct form or cascade implementations. In Matlab see method convert and parallel for dfilt.