Move rendered laser wobble notebook
This commit is contained in:
parent
1243b02136
commit
47c001529a
15 changed files with 108 additions and 16 deletions
BIN
Calculations/Laser-Wobble/output_14_0.png
(Stored with Git LFS)
BIN
Calculations/Laser-Wobble/output_14_0.png
(Stored with Git LFS)
Binary file not shown.
|
@ -87,66 +87,66 @@ print(f"Video processing took {processing_time:.2f} seconds ({processing_time /
|
||||||
Snapshot capture of frame 2331 at 77.70s: Intensity 12.612
|
Snapshot capture of frame 2331 at 77.70s: Intensity 12.612
|
||||||
Snapshot capture of frame 2664 at 88.80s: Intensity 12.257
|
Snapshot capture of frame 2664 at 88.80s: Intensity 12.257
|
||||||
Snapshot capture of frame 2997 at 99.90s: Intensity 12.728
|
Snapshot capture of frame 2997 at 99.90s: Intensity 12.728
|
||||||
Video processing took 257.32 seconds (0.086 seconds per frame).
|
Video processing took 300.84 seconds (0.100 seconds per frame).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -194,7 +194,7 @@ pass
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -231,22 +231,111 @@ for a in ax:
|
||||||
a.grid(axis="x", which="both")
|
a.grid(axis="x", which="both")
|
||||||
a.grid(axis="y", which="major")
|
a.grid(axis="y", which="major")
|
||||||
|
|
||||||
|
a.axvline(x=1.317, color="red")
|
||||||
|
a.annotate(" pendulum mode", xy=(1.317, 1080 / 2 - 150))
|
||||||
|
|
||||||
pass
|
pass
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Of note is the highlighted _theoretical spring resonance_ which we had previously calculated using the known spring constant and mass of the system. Seeing a very visible peak at this frequency along the Y axis (the axis of the springs) is very nice.
|
Of note is the highlighted _theoretical spring resonance_ which we had previously calculated using the known spring constant and mass of the system. Seeing a very visible peak at this frequency along the Y axis (the axis of the springs) is very nice.
|
||||||
|
|
||||||
|
In addition, the pendulum swinging resonance of the assembly was also roughly calculated and drawn into the diagrams. A peak is visible near this frequency as well.
|
||||||
|
|
||||||
|
|
||||||
```python
|
```python
|
||||||
|
# If you wish to save the extracted displacement data, use this:
|
||||||
# np.save("./laser-results/2025-09-07-011400-analyzed.npy", laser_position)
|
# np.save("./laser-results/2025-09-07-011400-analyzed.npy", laser_position)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Theoretical Transmissibility vs. Measurement
|
||||||
|
As a further step, the code below calculates the theoretical transmissibility curve and then plots it overlayed with the laser displacement amplitude spectral density in Y direction.
|
||||||
|
|
||||||
|
This gives a nice comparison, but the results should be interpreted with care: We do not have information on the spectrum of the excitation that was present during the measurement. For sure it was not even density broadband noise. Additionally, towards lower amplitudes, the measurement data gets increasingly noisy because the signal reaches the limit of the camera resolution.
|
||||||
|
|
||||||
|
|
||||||
|
```python
|
||||||
|
import math
|
||||||
|
import numpy as np
|
||||||
|
from pint import UnitRegistry
|
||||||
|
unit = UnitRegistry()
|
||||||
|
unit.formatter.default_format = "~"
|
||||||
|
|
||||||
|
# Parameters
|
||||||
|
spring_constant = 1.1 * 4 * unit.N / unit.mm
|
||||||
|
spring_length_resting = 112 * unit.mm
|
||||||
|
|
||||||
|
weight_total = 14 * unit.kg
|
||||||
|
|
||||||
|
dampening = 1 * unit.N / (unit.m / unit.s)
|
||||||
|
|
||||||
|
def spring_length_at(weight):
|
||||||
|
return (weight * unit.standard_gravity / spring_constant + spring_length_resting).to(unit.mm)
|
||||||
|
|
||||||
|
def resonant_freq_at(weight):
|
||||||
|
return (1 / (2 * math.pi) * np.sqrt(spring_constant / weight)).to(unit.Hz)
|
||||||
|
|
||||||
|
spring_length = spring_length_at(weight_total)
|
||||||
|
f0 = resonant_freq_at(weight_total)
|
||||||
|
|
||||||
|
print(f"Length: {spring_length:~.1f}")
|
||||||
|
print(f"Freq: {f0:~.3f}")
|
||||||
|
|
||||||
|
def lehr_dampening_factor(d, k, m):
|
||||||
|
return d / (2 * np.sqrt(m * k))
|
||||||
|
|
||||||
|
lehr_dampening = lehr_dampening_factor(dampening, spring_constant, weight_total)
|
||||||
|
lehr_dampening.ito_reduced_units()
|
||||||
|
|
||||||
|
def amplitude_ratio(lehr, f0, f):
|
||||||
|
eta = f / f0
|
||||||
|
return 1 / np.sqrt((1 - eta**2)**2 + (2 * eta * lehr)**2)
|
||||||
|
|
||||||
|
f_in = np.geomspace(0.5, 90, 100) * unit.Hz
|
||||||
|
ratio = amplitude_ratio(lehr_dampening, f0, f_in)
|
||||||
|
```
|
||||||
|
|
||||||
|
Length: 143.2 mm
|
||||||
|
Freq: 2.822 Hz
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```python
|
||||||
|
fig, ax = plt.subplots()
|
||||||
|
|
||||||
|
ax.axvline(x=2.822, color="red")
|
||||||
|
# ax.annotate(" theoretical spring resonance", xy=(2.822, 1080 / 2 - 150))
|
||||||
|
|
||||||
|
ax.loglog(frequency_y, amplitude_spectral_density_y, label="laser")
|
||||||
|
ax.loglog(f_in, ratio * 8, label="transmissibility")
|
||||||
|
|
||||||
|
a = ax
|
||||||
|
a.set_xlabel("frequency / Hz")
|
||||||
|
# a.set_ylabel("amplitude spectral density")
|
||||||
|
a.set_xlim(0.5, 15)
|
||||||
|
a.set_ylim(0.1, 1080 / 2)
|
||||||
|
a.legend()
|
||||||
|
a.grid(axis="x", which="both")
|
||||||
|
a.grid(axis="y", which="major")
|
||||||
|
|
||||||
|
pass
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
One more note about this graph: As the input amplitude is unknown, the theoretical curve was roughly scaled to sit ontop of the measurement data (`ratio * 8` in the code above). This is not a proper curve fit.
|
||||||
|
|
||||||
|
Also keep in mind that the measurement data gets pretty meaningless below an amplitude of 1 (pixel) due to the resolution limit of the camera.
|
||||||
|
|
||||||
|
|
||||||
```python
|
```python
|
||||||
|
|
BIN
Calculations/rendered/Laser-Wobble_files/Laser-Wobble_14_0.png
(Stored with Git LFS)
Normal file
BIN
Calculations/rendered/Laser-Wobble_files/Laser-Wobble_14_0.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Calculations/rendered/Laser-Wobble_files/Laser-Wobble_19_0.png
(Stored with Git LFS)
Normal file
BIN
Calculations/rendered/Laser-Wobble_files/Laser-Wobble_19_0.png
(Stored with Git LFS)
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue