OCPP 2.0.1 SetChargingProfile 메시지

 

SetChargingProfile 개요

SetChargingProfile은 중앙 시스템(CSMS)이 충전소에게 새로운 충전 프로파일을 설정하도록 요청하는 메시지입니다. 이는 충전 전력 제한, 충전 스케줄 관리, 부하 분산, 그리드 안정성 확보 등의 목적으로 충전소의 동작을 제어하고자 할 때 사용됩니다.

메시지 구조

Request (CSMS → 충전소)

{
  "evseId": 1,
  "chargingProfile": {
    "id": 101,
    "stackLevel": 1,
    "chargingProfilePurpose": "TxProfile",
    "chargingProfileKind": "Absolute",
    "recurrencyKind": "Daily",
    "validFrom": "2024-08-14T00:00:00.000Z",
    "validTo": "2024-08-21T00:00:00.000Z",
    "chargingSchedule": [
      {
        "id": 1,
        "startSchedule": "2024-08-14T06:00:00.000Z",
        "duration": 28800,
        "chargingRateUnit": "A",
        "chargingSchedulePeriod": [
          {
            "startPeriod": 0,
            "limit": 32.0,
            "numberPhases": 3
          }
        ]
      }
    ]
  }
}

Response (충전소 → CSMS)

{
  "status": "Accepted",
  "statusInfo": {
    "reasonCode": "ProfileInstalled",
    "additionalInfo": "Charging profile 101 installed successfully"
  }
}

주요 필드 설명

Request 필드들

evseId 필드 (필수)

필드명 필수여부 타입 설명
evseId 필수 Integer 프로파일이 적용될 EVSE ID (0이면 충전소 레벨)

chargingProfile 필드 (필수)

필드명 필수여부 타입 설명
id 필수 Integer 충전 프로파일 고유 식별자
stackLevel 필수 Integer 프로파일 우선순위 (높을수록 우선)
chargingProfilePurpose 필수 Enum 프로파일의 목적
chargingProfileKind 필수 Enum 프로파일 종류
recurrencyKind 선택사항 Enum 반복 패턴
validFrom 선택사항 DateTime 프로파일 유효 시작 시간
validTo 선택사항 DateTime 프로파일 유효 종료 시간
chargingSchedule 필수 Array 충전 스케줄 목록

chargingProfilePurpose 값

설명
ChargingStationMaxProfile 충전소 최대 전력 제한 프로파일
TxDefaultProfile 트랜잭션 기본 프로파일
TxProfile 특정 트랜잭션 프로파일

chargingProfileKind 값

설명
Absolute 절대 시간 기준 스케줄
Recurring 반복 스케줄
Relative 상대 시간 기준 스케줄

recurrencyKind 값

설명
Daily 일일 반복
Weekly 주간 반복

chargingSchedule 필드들

필드명 필수여부 타입 설명
id 필수 Integer 스케줄 고유 식별자
startSchedule 선택사항 DateTime 스케줄 시작 시간
duration 선택사항 Integer 스케줄 지속 시간 (초)
chargingRateUnit 필수 Enum 충전 제한 단위 (A, W, kW)
chargingSchedulePeriod 필수 Array 충전 기간별 제한값

chargingSchedulePeriod 필드들

필드명 필수여부 타입 설명
startPeriod 필수 Integer 기간 시작 시점 (초)
limit 필수 Decimal 충전 제한값
numberPhases 선택사항 Integer 사용할 상 수

Response 필드들

필드명 필수여부 타입 설명
status 필수 Enum 프로파일 설정 요청 처리 상태
statusInfo 선택사항 Object 추가 상태 정보

status 필드 값

설명
Accepted 승인됨 - 프로파일이 성공적으로 설정됨
Rejected 거부됨 - 프로파일 설정 실패

실제 사용 예제

예제 1: 트랜잭션 프로파일 설정 (절대 시간)

// Request
{
  "evseId": 1,
  "chargingProfile": {
    "id": 201,
    "stackLevel": 2,
    "chargingProfilePurpose": "TxProfile",
    "chargingProfileKind": "Absolute",
    "validFrom": "2024-08-14T00:00:00.000Z",
    "validTo": "2024-08-15T00:00:00.000Z",
    "chargingSchedule": [
      {
        "id": 1,
        "startSchedule": "2024-08-14T22:00:00.000Z",
        "duration": 21600,
        "chargingRateUnit": "kW",
        "chargingSchedulePeriod": [
          {
            "startPeriod": 0,
            "limit": 7.4,
            "numberPhases": 1
          },
          {
            "startPeriod": 7200,
            "limit": 11.0,
            "numberPhases": 1
          }
        ]
      }
    ]
  }
}

// Response
{
  "status": "Accepted",
  "statusInfo": {
    "reasonCode": "TxProfileSet",
    "additionalInfo": "Transaction profile 201 set for night charging"
  }
}

예제 2: 일일 반복 충전소 최대 프로파일

// Request
{
  "evseId": 0,
  "chargingProfile": {
    "id": 301,
    "stackLevel": 0,
    "chargingProfilePurpose": "ChargingStationMaxProfile",
    "chargingProfileKind": "Recurring",
    "recurrencyKind": "Daily",
    "validFrom": "2024-08-14T00:00:00.000Z",
    "validTo": "2024-12-31T23:59:59.000Z",
    "chargingSchedule": [
      {
        "id": 1,
        "startSchedule": "2024-08-14T00:00:00.000Z",
        "duration": 86400,
        "chargingRateUnit": "kW",
        "chargingSchedulePeriod": [
          {
            "startPeriod": 0,
            "limit": 50.0
          },
          {
            "startPeriod": 28800,
            "limit": 30.0
          },
          {
            "startPeriod": 64800,
            "limit": 50.0
          }
        ]
      }
    ]
  }
}

// Response
{
  "status": "Accepted",
  "statusInfo": {
    "reasonCode": "StationMaxProfileSet",
    "additionalInfo": "Daily recurring max profile installed"
  }
}

예제 3: 상대 시간 기반 프로파일

// Request
{
  "evseId": 2,
  "chargingProfile": {
    "id": 401,
    "stackLevel": 1,
    "chargingProfilePurpose": "TxProfile",
    "chargingProfileKind": "Relative",
    "chargingSchedule": [
      {
        "id": 1,
        "duration": 14400,
        "chargingRateUnit": "A",
        "chargingSchedulePeriod": [
          {
            "startPeriod": 0,
            "limit": 16.0,
            "numberPhases": 3
          },
          {
            "startPeriod": 3600,
            "limit": 32.0,
            "numberPhases": 3
          },
          {
            "startPeriod": 10800,
            "limit": 16.0,
            "numberPhases": 3
          }
        ]
      }
    ]
  }
}

// Response
{
  "status": "Accepted",
  "statusInfo": {
    "reasonCode": "RelativeProfileSet",
    "additionalInfo": "Relative charging profile 401 installed"
  }
}

예제 4: 프로파일 설정 거부

// Request
{
  "evseId": 3,
  "chargingProfile": {
    "id": 501,
    "stackLevel": 10,
    "chargingProfilePurpose": "TxProfile",
    "chargingProfileKind": "Absolute",
    "chargingSchedule": [
      {
        "id": 1,
        "startSchedule": "2024-08-13T00:00:00.000Z",
        "chargingRateUnit": "kW",
        "chargingSchedulePeriod": [
          {
            "startPeriod": 0,
            "limit": 100.0
          }
        ]
      }
    ]
  }
}

// Response
{
  "status": "Rejected",
  "statusInfo": {
    "reasonCode": "ExceedsMaxPower",
    "additionalInfo": "Requested limit exceeds EVSE maximum capacity"
  }
}

예제 5: 주간 반복 프로파일

// Request
{
  "evseId": 1,
  "chargingProfile": {
    "id": 601,
    "stackLevel": 3,
    "chargingProfilePurpose": "TxDefaultProfile",
    "chargingProfileKind": "Recurring",
    "recurrencyKind": "Weekly",
    "validFrom": "2024-08-14T00:00:00.000Z",
    "chargingSchedule": [
      {
        "id": 1,
        "startSchedule": "2024-08-14T00:00:00.000Z",
        "duration": 604800,
        "chargingRateUnit": "A",
        "chargingSchedulePeriod": [
          {
            "startPeriod": 0,
            "limit": 32.0
          },
          {
            "startPeriod": 172800,
            "limit": 16.0
          },
          {
            "startPeriod": 432000,
            "limit": 32.0
          }
        ]
      }
    ]
  }
}

// Response
{
  "status": "Accepted",
  "statusInfo": {
    "reasonCode": "WeeklyProfileSet",
    "additionalInfo": "Weekly recurring default profile installed"
  }
}

처리 흐름

  1. 프로파일 요청: CSMS가 충전소에 새로운 충전 프로파일 설정을 요청
  2. 유효성 검증: 충전소가 프로파일의 유효성과 적용 가능성을 검증
  3. 프로파일 저장: 유효한 프로파일을 메모리에 저장하고 기존 프로파일과 통합
  4. 즉시 응답: 설정 성공/실패 상태를 CSMS에 응답
  5. 프로파일 적용: 설정된 프로파일에 따라 충전 제한을 즉시 적용
  6. 스케줄 관리: 시간 기반 스케줄에 따라 지속적으로 제한값 업데이트

프로파일 우선순위 규칙

  1. stackLevel이 높을수록 우선순위가 높음
  2. 동일한 stackLevel에서는 나중에 설정된 프로파일이 우선
  3. ChargingStationMaxProfile이 전체적인 최대 한계 설정
  4. TxProfile이 TxDefaultProfile보다 우선

중요 포인트

  • SetChargingProfile은 CSMS에서 충전소로만 전송됩니다
  • evseId가 0이면 충전소 전체 레벨, 양수면 특정 EVSE에 적용됩니다
  • stackLevel을 통해 여러 프로파일의 우선순위를 관리할 수 있습니다
  • chargingProfileKind에 따라 시간 기준이 달라집니다 (절대/상대/반복)
  • 설정된 프로파일은 즉시 적용되어 진행 중인 충전에도 영향을 줄 수 있습니다
  • chargingRateUnit에 따라 제한값의 의미가 달라집니다 (A, W, kW)
  • 유효 기간(validFrom, validTo)을 통해 프로파일의 생명주기를 관리할 수 있습니다
  • 여러 개의 chargingSchedulePeriod를 통해 시간대별로 다른 제한값을 설정할 수 있습니다

이 메시지를 통해 중앙 시스템은 동적으로 충전 전력을 제어하고, 그리드 상황이나 전력 요금에 따른 최적화된 충전 스케줄을 구현할 수 있습니다.