# Sine/Sqr/Tri Wave Response of a 2 complex conjugate poles system, Resonance.

Cuthbert Nyack
The applet shows the discrete version of a second order resonant system.
Because of the rapid variation in amplitude near resonance, the output is normalised and its maximum numerical value is shown.

The complex conjugate poles are at r e±jq in the Z plane. Resonance occurs at frequency w/ ws = q. The Q of the resonance is determined by r, the position of the poles relative to the unit circle.

Different responses are obtained by changing Fn.
Fn = 0, Sinusoidal response.
Fn = 1, Square wave response.
Fn = 2, Rectangular Pulse response.
Fn = 3, Triangle Pulse response.
Sinusoidal Wave Response.
eg parameters(0.1, 1.0, 0.0, 0, 80, 0.99, 0.1, 700.0, 0.15, 0.08)
This shows resonance at high Q, maximum value = 45.28. If r > 1.0, the system is unstable.
Reducing r to 0.82 reduces the Q and brings the maximum value down to 5.0987.

eg parameters(0.12, 1.0, 0.0, 0, 152, 0.99, 0.1, 700.0, 0.1, 0.08)
This is the off resonance response, the output shows beating between the resonant frequency and the input frequency. DTFT spectrum shows 2 peaks.

eg parameters(0.01, 1.0, 0.0, 0,, 152, 0.98, 0.1, 700.0, 0.1, 0.08)
Low frequency response.

eg parameters(0.47, 1.0, 0.0, 0, 152, 0.96, 0.1, 700.0, 0.1, 0.08)
Response near ws/2.

eg parameters(0.499, 1.0, 0.0, 0, 152, 1.02, 0.1, 700.0, 0.1, 0.08)
Instability near ws/2.

The Square, Rectangle and Triangular pulses show responses similar to continuous 2 pole systems.

eg parameters(na, 1.0, 0.0, 1, 100, 0.86, 0.1, 700.0, 0.1, 0.08)
Characteristic transient behaviour of 2nd order systems to a square wave input.

eg parameters(na, 1.0, 0.0, 2, 100, 0.94, 0.1, 700.0, 0.1, 0.08)
Characteristic transient behaviour of 2nd order systems to a rectangular pulse input.

eg parameters(na, 1.0, 0.0, 3, 100, 0.99, 0.1, 700.0, 0.1, 0.08)
Characteristic transient behaviour of 2nd order systems to a triangular pulse input.

eg parameters(na, 1.0, 0.0, 3, 100, 1.04, 0.25, 187.0, 0.1, 0.08)
System is unstable at ~ 0.25ws.