Main Content

펄스 및 천이 특성 측정

이 예제에서는 펄스 및 천이를 분석하고 상승 시간, 하강 시간, 슬루 레이트, 오버슈트, 언더슈트, 펄스 폭, 듀티 사이클, 펄스 주기와 같은 메트릭을 계산하는 방법을 보여줍니다.

잡음이 있는 클록 신호

먼저 잡음이 있는 클록 신호의 샘플을 살펴보겠습니다.

load clocksig clock1 time1 Fs

plot(time1,clock1)
xlabel('Time (seconds)')
ylabel('Voltage')

Figure contains an axes object. The axes object with xlabel Time (seconds), ylabel Voltage contains an object of type line.

상태 레벨 추정하기

출력 인수 없이 statelevels를 사용하여 상태 레벨을 시각화합니다. 다음과 같은 단계에 따라 상태 레벨을 추정하기 위해 히스토그램 방법이 사용됩니다.

  1. 데이터의 최소 진폭과 최대 진폭을 확인합니다.

  2. 지정된 히스토그램 Bin 개수에 대해 Bin 너비를 확인합니다. 이는 Bin 개수에 대한 진폭 범위의 비율입니다. 선택적 입력 인수를 사용하여 히스토그램 Bin의 개수와 히스토그램 범위를 지정합니다.

  3. 데이터 값을 히스토그램 Bin으로 정렬합니다.

  4. 0이 아닌 도수를 가진 히스토그램 Bin 중 가장 낮은 인덱스가 지정된 히스토그램 Bin과 가장 높은 인덱스가 지정된 히스토그램 Bin을 식별합니다.

  5. 히스토그램을 두 개의 하위 히스토그램으로 나눕니다.

  6. 상부 히스토그램과 하부 히스토그램의 최빈값 또는 평균값을 확인하여 상태 레벨을 계산합니다.

statelevels(clock1)

Figure State Level Information contains 2 axes objects. Axes object 1 with title Histogram of signal levels (100 bins), xlabel Level (Volts), ylabel Count contains an object of type line. Axes object 2 with title Signal, xlabel Samples, ylabel Level (Volts) contains 3 objects of type line.

ans = 1×2

    0.0138    5.1848

계산된 히스토그램은 첫 번째 Bin과 마지막 Bin 사이에 두 개의 동일한 크기의 영역으로 나뉩니다. 히스토그램 각 영역의 최빈값은 명령 창에서 추정된 상태 레벨 값으로 반환됩니다.

상승 시간, 하강 시간 및 슬루 레이트 측정하기

상승 시간은 각 펄스의 상승 천이가 하부 기준 레벨에서 상부 기준 레벨을 지나가는 시점 사이의 지속 시간입니다. 하강 시간은 각 펄스의 하강 천이가 상부 기준 레벨에서 하부 기준 레벨을 지나가는 시점 사이의 지속 시간입니다. 상승 시간 및 하강 시간의 계산을 위한 디폴트 기준 레벨은 파형 진폭의 10%와 90%로 설정되어 있습니다.

출력 인수 없이 risetime을 사용하여 양의 방향으로 진행하는 경계의 상승 시간을 시각화합니다. 그런 다음 출력 인수 없이 falltime을 사용하여 음의 방향으로 진행하는 경계의 하강 시간을 시각화합니다. 기준 레벨을 [20 80]으로, 상태 레벨을 [0 5]로 지정합니다.

risetime(clock1,time1)

Figure Rise Time Plot contains an axes object. The axes object with xlabel Time (seconds), ylabel Level (Volts) contains 12 objects of type patch, line. One or more of the lines displays its values using only markers These objects represent rise time, signal, upper cross, lower cross, upper boundary, upper state, lower boundary, upper reference, lower reference, lower state.

ans = 5×1
10-4 ×

    0.5919
    0.8344
    0.7185
    0.8970
    0.6366

falltime(clock1,time1,'PercentReferenceLevels',[20 80],'StateLevels',[0 5])

Figure Fall Time Plot contains an axes object. The axes object with xlabel Time (seconds), ylabel Level (Volts) contains 12 objects of type patch, line. One or more of the lines displays its values using only markers These objects represent fall time, signal, upper cross, lower cross, upper boundary, upper state, lower boundary, upper reference, lower reference, lower state.

ans = 4×1
10-4 ×

    0.4294
    0.5727
    0.5032
    0.4762

하나 이상의 출력 인수와 함께 함수를 호출하여 프로그래밍 방식으로 측정값을 얻습니다. 균일하게 샘플링된 데이터의 경우 시간 벡터 대신 샘플 레이트를 제공할 수 있습니다. slewrate를 사용하여 양의 방향 또는 음의 방향으로 진행하는 각 경계의 기울기를 측정합니다.

sr = slewrate(clock1(1:100),Fs)
sr = 7.0840e+04

오버슈트와 언더슈트 분석하기

이번에는 상당한 오버슈트와 언더슈트를 갖는 클록 신호에서 데이터를 살펴봅니다.

load clocksig clock2 time2 Fs

plot(time2,clock2)
xlabel('Time (seconds)')
ylabel('Voltage')

Figure Fall Time Plot contains an axes object. The axes object with xlabel Time (seconds), ylabel Voltage contains an object of type line.

부족감쇠된 클록 신호는 오버슈트를 갖습니다. 오버슈트는 상태 레벨 간 차이의 백분율로 표현됩니다. 오버슈트는 경계 직후, 천이 후 수차 영역이 시작되는 지점에서 발생할 수 있습니다. overshoot 함수를 사용하여 이러한 포스트슈트 오버슈트를 측정합니다.

overshoot(clock2(95:270),Fs)
ans = 2×1

    4.9451
    2.5399

legend('Location','NorthEast')

Figure Overshoot Plot contains an axes object. The axes object with xlabel Time (seconds), ylabel Level (Volts) contains 12 objects of type line. One or more of the lines displays its values using only markers These objects represent signal, upper cross, lower cross, post-overshoot, upper boundary, upper state, lower boundary, upper reference, lower reference, lower state.

오버슈트는 경계 직전, 천이 전 수차 영역이 끝나는 지점에서도 발생할 수 있습니다. 이를 프리슈트 오버슈트라고 합니다.

마찬가지로, 수차 전 영역과 수차 후 영역에서 언더슈트를 측정할 수 있습니다. 언더슈트도 상태 레벨 간 차이의 백분율로 표현됩니다. 선택적 입력 인수를 사용하여 수차를 측정할 영역을 지정합니다.

undershoot(clock2(95:270),Fs,'Region','Postshoot')
ans = 2×1

    3.8499
    4.9451

legend('Location','NorthEast')

Figure Undershoot Plot contains an axes object. The axes object with xlabel Time (seconds), ylabel Level (Volts) contains 12 objects of type line. One or more of the lines displays its values using only markers These objects represent signal, upper cross, lower cross, post-undershoot, upper boundary, upper state, lower boundary, upper reference, lower reference, lower state.

펄스 폭과 듀티 사이클 측정하기

은 각 펄스의 첫 번째 천이 및 두 번째 천이와 교차하는 중간 기준 레벨 사이의 지속 시간입니다. 출력 인수 없이 pulsewidth를 사용하여 강조 표시된 펄스 폭을 플로팅합니다. 정극성을 지정합니다.

pulsewidth(clock2, time2,'Polarity','Positive');

Figure Pulse Width Plot contains an axes object. The axes object with xlabel Time (seconds), ylabel Level (Volts) contains 10 objects of type patch, line. One or more of the lines displays its values using only markers These objects represent pulse width, signal, mid cross, upper boundary, upper state, lower boundary, mid reference, lower state.

dutycycle을 사용하여 각 부극성 펄스에 대한 펄스 주기 대 펄스 폭의 비율을 계산합니다.

d = dutycycle(clock2,time2,'Polarity','negative')
d = 3×1

    0.4979
    0.5000
    0.5000

pulseperiod를 사용하여 파형의 각 사이클의 주기를 구합니다. 주기는 현재 펄스의 첫 번째 천이와 다음 펄스의 첫 번째 천이 사이의 지속 시간입니다. 이 정보를 사용하여 파형의 평균 주파수나 관측된 총 지터와 같은 기타 메트릭을 계산합니다.

pp = pulseperiod(clock2, time2);

avgFreq = 1./mean(pp)
avgFreq = 1.2500e+03
totalJitter = std(pp)
totalJitter = 1.9866e-06

참고 항목

| | | | | | | |