US English (US)
JP Japanese
CN Chinese
KR Korean

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Knowledge Base Home
  • Contact Us
Japanese
US English (US)
JP Japanese
CN Chinese
KR Korean
  • Home
  • Python API

Mokuロックインアンプの復調信号の位相を変更する方法

Mokuロックイン アンプの復調信号の位相を調整して、信号処理を最適化し、より正確な測定を実現する方法を学びます。

Written by Paul Cracknell

Updated at April 9th, 2025

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Moku:Lab
    Moku:Lab に関するよくある質問 Moku:Labロジックアナライザ/パターンジェネレータ Moku:Lab時間および周波数アナライザー Moku:Labスペクトラムアナライザー Moku:Lab PID コントローラ Moku:Labオシロスコープ Moku:Lab位相計 Moku:Labレーザーロックボックス Moku:Labデジタルフィルターボックス Moku:Lab任意波形ジェネレータ Moku:Lab波形ジェネレーター Moku:Lab周波数応答アナライザー Moku:Lab FIR フィルター ビルダー Moku:Labロックインアンプ Moku:Labデータロガー
  • Moku:Go
    Moku:Goに関するよくある質問 Moku:Goロックインアンプ Moku:Goロジックアナライザ & パターンジェネレータ Moku:Goオシロスコープ & 電圧計 Moku:Goスペクトラムアナライザー Moku:Go波形ジェネレータ Moku:Go時間・周波数アナライザー Moku:Goデジタルフィルターボックス Moku:Go FIR フィルター ビルダー Moku:Goレーザーロックボックス Moku:Go任意波形ジェネレータ Moku:Go周波数応答アナライザー Moku:Goデータロガー Moku:Go計 Moku:Go電源 Moku:Go
  • Moku:Pro
    Moku:Proに関するよくある質問 Moku:Pro波形発生器 Moku:Proタイム&周波数アナライザ Moku:Proロジックアナライザ/パターンジェネレーター Moku:Proレレーザーロックボックス Moku:Proロックインアンプ Moku:Proスペクトラムアナライザ Moku:Proデータロガー Moku:Pro任意波形発生器 Moku:Proマルチ機器モード Moku:Pro位相計 Moku:Pro FIRフィルタービルダー Moku:Pro PIDコントローラー Moku:Proオシロスコープ Moku:Pro周波数応答アナライザ Moku:Proデジタルフィルターボックス
  • Python API
  • MATLAB API
  • 任意波形発生器
  • データロガー
  • デジタルフィルターボックス
  • FIR フィルタ ビルダー
  • 周波数応答アナライザー
  • レーザーロックボックス
  • ロックインアンプ
  • オシロスコープ
  • 位相計
  • PIDコントローラー
  • スペクトラムアナライザー
  • 時間と周波数アナライザー
  • 波形発生器
  • ロジックアナライザ/パターンジェネレーター
  • マルチ機器モード
  • Mokuクラウドコンパイル
  • Mokuに関するよくある質問
  • LabVIEW API
+ More

Mokuロックイン アンプは、デュアル位相復調を使用して信号の X 成分と Y 成分を決定します。復調信号の位相は、復調信号のプロパティを調整することで Python でシフトできます。

この例では、復調信号の位相を調整する方法を示します。

#
# Moku example: Phase change in Moku Lock-In Amplifier
#
# This example demonstrates how you can shift the phase of the demodulation signal
# in the Lock-In Amplifier instrument
#
# (c) 2024 Liquid Pty. Ltd.
#
# This is configured for Moku:Lab and is compatible with Moku:Go and Moku:Pro
#
# Setup : loopback Moku output 2 to input 1 with a BNC cable.
#
# The phase of the demodulation signal is then swept
# a full 360 degrees and the resulting LIA output DC signal 
# reflects the phase offset between the PLL and input 1.
#
from moku.instruments import LockInAmp
import statistics
import matplotlib.pyplot as plt

# Launch Lock In Amplifier and connect to your device via IP
i = LockInAmp('192.168.2.74', force_connect=True)
try:
   # Configure analog input port 1 as 50 Ohm and 0 dB attenuation
   i.set_frontend(1, coupling='DC', impedance='50Ohm', attenuation='0dB')   
   # Output a 1MHz sine wave and demodulate at same
   i.set_demodulation(mode='Internal', frequency=1e6)
   i.set_filter(corner_frequency=1e1, slope="Slope6dB")
   # Output the 'X' (I) signal and the local-oscillator sine wave on the two
   # DAC channels. 
   i.set_aux_output(frequency=1e6, amplitude=1)
   i.set_outputs(main='X', aux='Aux', main_offset=0, aux_offset=0)
   
   i.use_pid("Off")
   i.set_gain(main=0, aux=0)
   # Monitor the I and Q signals from the mixer, before filtering
   i.set_monitor(1, 'Input1')
   i.set_monitor(2, 'MainOutput')
   # Trigger on Monitor 'B' ('I' signal), rising edge, 0V with 0.1V hysteresis
   i.set_trigger(source='ProbeB', edge='Rising', hysteresis=0.1)
   # View +- 0.1 second, ie trigger in the centre
   i.set_timebase(-2e-6, 2e-6)
   
   # Set up the plotting parameters
   plt.figure(num="Moku Lock-in Amplifier")
   plt.ylabel("Voltage (V)")
   plt.xlabel("Time [s]")

   line1, = plt.plot([], label='Input 1')
   line2, = plt.plot([], label='LIA X out')

   # Configure labels for axes
   ax = plt.gca()
   plt.pause(1)
   # This loops through a phase range of 0 to 350 degrees with a step size of 10
   for a in range(0, 351, 10):
       # Set a demodulation phase
       i.set_demodulation(mode='Internal', phase=a)
       data = i.get_data(wait_complete=True, wait_reacquire=True)
       dc2 = data['ch2']
       # Print out the demodulation phase and mean value of the output
       print(f'New Phase: {a}')
       print(f'Mean: {statistics.mean(dc2)}')
       # Update the Plotting
       line1.set_ydata(data['ch1'])
       line1.set_xdata(data['time'])
       
       line2.set_ydata(data['ch2'])
       line2.set_xdata(data['time'])
       
       plt.pause(0.1)
       plt.legend(loc='upper left')
       # Ensure frequency axis is a tight fit
       ax.relim()
       ax.autoscale_view()
finally:
   # Close the connection to the Moku device
   # This ensures network resources and released correctly
   i.relinquish_ownership()

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • Python スペクトラム アナライザの「最大ホールド」機能
  • Pythonを使用して出力信号を観察しながら任意の波形を生成する
  • ディープメモリモードでのデータ収集
  • 「pkg_resources という名前のモジュールがありません」というエラーを修正
  • PythonのインストールとMokuパッケージを確認する

Sitemap

  • Moku:Lab
  • Instruments
  • Software
  • Company
  • Support
  • Store
  • Terms & Conditions
  • Privacy Policy

Offices

United States
+1 (619) 332-6230
12526 High Bluff Dr
Suite 150
San Diego, CA 92130

Australia
+61 2 6171 9730
243 Northbourne Avenue
Suite 2
Lyneham, ACT 2602

Australia
+61 03 7073 3594
700 Swanston Street
Suite 5E, Level 5
Carlton, VIC 3053

Follow us

Youtube LinkedIn

官方微信

Contact us
© 2025 Liquid Instruments. All rights reserved.

Knowledge Base Software powered by Helpjuice

Definition by Author

0
0
Expand