DampedHarmonicVibration
- class hcipy.optics.DampedHarmonicVibration(mode, natural_frequency, damping_ratio, driving_psd, refractive_index=1.0, seed=None)[source]
Bases:
DynamicSurfaceAberrationA damped harmonic oscillator vibration model driven by white noise.
This class models a damped harmonic oscillator with natural frequency and damping ratio, driven by white noise with a given power spectral density. The model uses a continuous-time state space representation with exact covariance evolution.
- Parameters:
- modeField
The spatial mode of the vibration. This mode is assumed to be normalized to an RMS of one.
- natural_frequencyscalar
The natural frequency of the oscillator in Hz. Must be positive.
- damping_ratioscalar
The damping ratio (dimensionless). Must be positive.
- driving_psdscalar
The power spectral density of the driving acceleration noise in m^2 s^-4 per rad/s. This represents the strength of the external disturbance. Must be non-negative.
- refractive_indexfloat or callable, optional
Refractive index of the medium. Can be a constant (float) or a callable that takes wavelength and returns refractive index. Default is 1.0.
- seedint, optional
Random seed for reproducibility. Default is None.
Attributes Summary
The damping ratio of the oscillator.
The current displacement of the oscillator in meters.
The power spectral density of the driving white noise.
The spatial mode of the vibration.
The natural resonant frequency in Hz.
The frequency of the damped oscillation in Hz.
The quality factor of the oscillator.
The stationary RMS displacement in meters.
Attributes Documentation
- damping_ratio
The damping ratio of the oscillator.
- displacement
The current displacement of the oscillator in meters.
- Returns:
- float
The displacement in meters.
- driving_psd
The power spectral density of the driving white noise.
- mode
The spatial mode of the vibration.
- natural_frequency
The natural resonant frequency in Hz.
- oscillation_frequency
The frequency of the damped oscillation in Hz.
For critically damped (damping_ratio = 1) and overdamped (damping_ratio > 1) systems, the oscillator does not oscillate and this returns NaN.
- quality_factor
The quality factor of the oscillator.
- rms_displacement
The stationary RMS displacement in meters.
For a damped harmonic oscillator driven by white noise with PSD S_0, the stationary RMS displacement is sqrt(S_0 / (4*zeta*omega_0^3)).
- Returns:
- float
The stationary RMS displacement in meters.