designing smart meters for the smart grid - nxp … · designing smart meters for the smart grid...

34
TM Designing Smart Meters for the Smart Grid Meera Balakrishnan Global Segment MarketingSmart Metering Martin Mienkina System Application Engineer

Upload: buidien

Post on 03-Jul-2018

230 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Designing Smart Meters for the Smart Grid - NXP … · Designing Smart Meters for the Smart Grid Meera Balakrishnan ... Grid Power Protection, Relay/Switch Control and Monitoring

TM

Designing Smart Meters for the Smart GridMeera BalakrishnanGlobal Segment Marketing– Smart Metering

Martin MienkinaSystem Application Engineer

Page 2: Designing Smart Meters for the Smart Grid - NXP … · Designing Smart Meters for the Smart Grid Meera Balakrishnan ... Grid Power Protection, Relay/Switch Control and Monitoring

TM

Agenda

• Intro to Freescale in Smart Grids

• Energy Metering – Technology and Solution Trends

• An Effective Metering System on Chip Based Solutions

• Enablement

• Summary

Designing Smart Meters for the Smart Grid

1

Page 3: Designing Smart Meters for the Smart Grid - NXP … · Designing Smart Meters for the Smart Grid Meera Balakrishnan ... Grid Power Protection, Relay/Switch Control and Monitoring

TM

Freescale Solutions Enable the “Smart Grid”

#1 Appliances

Home Automation

#1 in Automotive Building Control

Metering

Lighting

Industrial Control

Motor Drives

Communications

2

Page 4: Designing Smart Meters for the Smart Grid - NXP … · Designing Smart Meters for the Smart Grid Meera Balakrishnan ... Grid Power Protection, Relay/Switch Control and Monitoring

TM

Freescale in Smart Energy

Distribution HANNAN

• 802.15.4g

• OFDM

• WiMax

• Zigbee

• WiFi

• M-Bus

• PLM

HAN (Home Area Network):

Wireless or wired network used for load control and dynamic

response by utilities

• Electric meter communicating with T-Stats, appliances, water

heaters, pool pumps, electric hybrids, etc. (Load Control)

• Send pricing signals to consumers for smarter energy

consumption (Demand Response)

Metrology:

Hardware that

measures and

controls flow of

energy to/from

building

Hot

Water

HeaterThermostat

Renewable

Energy

• GPRS

• WiMax

Electric

Car

Broad-range Smart Energy Solutions Provider:• Metrology and home gateway solutions closer to home

• Data aggregators, grid routers, grid protection on grid end

• Secure, easy-to-use wireless networks

• Energy savings, Reduced costs

• Increasing security, reliability & transparency

NAN HAN

Metrology

WAN

WAN NAN

Data Concentrator

(Aggregator)Energy Gateway

HAN

Zigbee

Zigbee

Data Concentrator (Aggregator):

Sends data collected (or commands)

to and from Neighbor Area Network

(NAN) or Home Area Network (HAN)

to utility

Appliances

Grid Power Protection,

Relay/Switch Control and

Monitoring

Grid Power supervision, control

and network protection system

solutions; Protective Relays and

Switches control for Power Grid

3

Page 5: Designing Smart Meters for the Smart Grid - NXP … · Designing Smart Meters for the Smart Grid Meera Balakrishnan ... Grid Power Protection, Relay/Switch Control and Monitoring

TM

NANUtility

• 802.15.4g

• OFDM

• WiMax

• GPRS

• WiMax

Low End Metering Microcontrollers

9S08LL/LH/ACWater, Gas & Heat

9S08LL, 9S08GW

Smart 1-3ph Metering MCF51EM256 Kinetis MK30 Kinetis MK10

Data Concentrator (Aggregator) P20x0 P10xx MPC831x MPC8308 i.MX

Interfaces to NAN 802.15.4g Radio WiMax

Interfaces to Utility WiMax GPRS DLMS/COSEM library

Smart Energy Gateway MPC8308 i.MX

HAN Interfaces ZigBee WiFi GPRS M-Bus HomePlug Green PHY

Appliance Technology 8-32bit MCUs & DSPs Touch Sensor

RF4CE (wireless control)

Utility / NAN Metrology Home Area Network (HAN)

WAN NAN

Data Concentrator

(Aggregator)

NAN HAN

Metrology HAN

• Zigbee

• WiFi

• M-Bus

• PLM

Water

HeaterThermostat

Renewable

EnergyElectric

Car

Energy Gateway

HAN

Zigbee

Zigbee

Smart

Appliance

s

Freescale Solutions for Smart Energy

4

Page 6: Designing Smart Meters for the Smart Grid - NXP … · Designing Smart Meters for the Smart Grid Meera Balakrishnan ... Grid Power Protection, Relay/Switch Control and Monitoring

TM

Agenda

• Intro to Freescale in Smart Grids

• Energy Metering – Technology and Solution Trends

• An Effective Metering System on Chip Based Solutions

• Enablement

• Summary

Designing Smart Meters for the Smart Grid

5

Page 7: Designing Smart Meters for the Smart Grid - NXP … · Designing Smart Meters for the Smart Grid Meera Balakrishnan ... Grid Power Protection, Relay/Switch Control and Monitoring

TM

Market Trend Trend Description Portfolio Alignment

Peripherals Integration

Focus on cost driving higher levels of integration. Cost Reduction is forcing integration - Integration of high-resolution Analog Front End (ADC) into a single processor

Kinetis MK30, ADC with PGA

MCF51EM256 with ADC integrated;

Increasing Memory Size and Security Needs

Larger Flash memory (up to 1MB) driven by Communications + Metrology for an AMR Meter

Need for Security throughout the Smart Grid

Kinetis Portfolio

CAU and support of Anti-Tampering

Wired and Wireless Protocols

Wired and Wireless communications are the key technologies used in today’s AMI and AMR designs

MC1322x Zigbee SEP and HAP

Greater Accuracy with Low Power Consumption

With the shift to electrical gas and water meters, power consumption is a key decision factor due to battery life requirements and costs

9S08GW family suitable for gas, water meter applications.

Communication Within Home

Home energy gateway will be key for consumers to keep track of and control energy usage

i.MX283 and MPC8308 Energy gateway

Emerging Applications that need interface to smart grids

Intelligent appliances within the home, micro-grid generation (solar cells), Plug-in Hybrid vehicles require appropriate interface and measurement technologies

Digital Signal Controller portfolio . Working closely with industry leaders to further develop solutions in this space.

Smart Grids Infrastructure development

Protocols emerging for control and communication of various components in Smart Grids

High-end Networking products (MPC83xx, QoRIQ support IEEE 1588, Ethernet, Security

Key Technology and Solution Trends in Metering

6

Page 8: Designing Smart Meters for the Smart Grid - NXP … · Designing Smart Meters for the Smart Grid Meera Balakrishnan ... Grid Power Protection, Relay/Switch Control and Monitoring

TM

Energy Meter Types and Measurements

Electromechanical meters

• Limited accuracy

• Manual reading

• Contains moving parts (aluminum ring)

Electronic meters

• MCUs, DSPs and ASICs based

• Accurate measurement

• Enhanced security

• Equipped with AMR

• No moving parts

Electricity Meter Types

Single phase

• Common in EU residential meters

• One voltage and one current measurement

• Use of shunt resistors prevail due to system low-cost

Dual phase

• Common in US residential meters

• Two voltage and two current measurement

• Use of current transformers and Rogowski coils prevail

Three phase

• Used in industrial and commercial meters

• Three voltage and three current measurement

• Use of current transformers and Rogowski coils prevail

Measurement Types

• Active, Reactive, Apparent Energy

• Active, Reactive, Apparent Power

• RMS, Peak Values (voltage/current)

• Line frequency

• Power Factor

• Temperature

Measured Quantities

7

Page 9: Designing Smart Meters for the Smart Grid - NXP … · Designing Smart Meters for the Smart Grid Meera Balakrishnan ... Grid Power Protection, Relay/Switch Control and Monitoring

TM

Agenda

• Intro to Freescale in Smart Grids

• Energy Metering – Technology and Solution Trends

• An Effective Metering System on Chip Based Solutions

• Enablement

• Summary

Designing Smart Meters for the Smart Grid

8

Page 10: Designing Smart Meters for the Smart Grid - NXP … · Designing Smart Meters for the Smart Grid Meera Balakrishnan ... Grid Power Protection, Relay/Switch Control and Monitoring

TM

3-P

hase

Flo

w1-P

hase

99

Connectivity

1Q11 1Q111Q11

1-Phase Meter

MCF51EM256

Integrated AFE

Low Cost Meter

9RS08KA8/LA8

Simulation

DEMOEM

MCF51EM256

Low Cost Meter

9S08LL/LG32Low Cost Meter

9S08LH64

Integrated AFE

Water Meter

9S08LL16/

9S08GW64

Gas Meter

9S08LL16/

9S08GW64

Heat Meter

9S08LL16/

9S08GW64

1-Phase Meter

9S08GW64

Ga

tew

ay/

Concentr

ato

r

802.15.4/Zigbee

MC1322x

1-Phase Meter

MZ60

3-Phase Meter

MCF51EM256

1-Phase Meter

MK30X256

see next

slides…

Smart Grid & Metering

Reference Designs

Data concentrator

MPC8308

Data Concentrator

MC5441xEnergy Gateway

MPC8308

Energy Gateway

i.MX28

Page 11: Designing Smart Meters for the Smart Grid - NXP … · Designing Smart Meters for the Smart Grid Meera Balakrishnan ... Grid Power Protection, Relay/Switch Control and Monitoring

TM

10

3-Phase MCF51EM256 Electricity Meter – Features

Configurable to operate in:• Three phase, 4 wire (3Ф-4W)

• One phase, 1 wire (1Ф-2W)

• One phase, 1 wire (1 Ф-3W)

Measurement & LCD display: • US and European voltage: 120V+/- 20%, 230V +/- 10%

• US and European current: 100A US, 60A Europe

• Phase RMS Voltage (Accuracy ±1% of full Scale)

• Phase RMS Currents (Accuracy ±1% of full scale)

• Active Power (Accuracy ±1% of full Scale)

• Reactive Power (Accuracy ±1% of full Scale)

• Apparent Power (Accuracy ±1% of full Scale)

• Power Factor (Accuracy ± 0.1PF or better)

• Line Frequency (Accuracy ± 0.5Hz or better)

• Tamper Count

• Active Energy - Class 0.5 or better

• Reactive energy - Class 2 or better

• Apparent Energy - Class 2 or better

Operating frequency range 50Hz ±3Hz or 60Hz ±3Hz

Tamper Detection

Optical Port Interface (IEC62056-21, ANSI C12.18)

Serial port for calibration and diagnostics

Navigation using 3 keys (UP, DOWN & ACK/RESET)

Expansion port for AMR via SCI and SPI

Find the poly-phase reference design at www.freescale.com/metering

RS-232

Diagnostic/Debug

Port

Optical

Port

Te

rmin

al B

lock

(Vo

ltag

e &

Cu

rre

nt In

pu

ts)

CTs

Potential

Divider

Battery

(RTC)

Door Open

Tamper Detect

Input

Power

ON

LED

Tamper

Detect

LED Level

Shifter

kWh

LED

kVARh

LED

3.3V

Key PadEnter/

Save

Up

IV

Down

IV

Power Fail

Interrupt

3.3V

LCD

OSC 1

32.768

kHz

RS-232

Transceiver

Opto Isolator

Iso1_3.3V

OSC 2

1- 16 MHz

REF

REF

Voltage Signal

Conditioning Circuit

(ADC Inputs)

3.3V

Optical Drive

Circuit

3.3V

MCU

(100 Pin)

KBILCD ModuleIRTC

AD

C

ICS

GP

IO

SC

I2S

CI1

SC

I3 &

SP

I3

SPI1 GPIO TPMCH1

GP

IO

3.3V

BD M

BDM

Port

Op

to Iso

lato

r

ZCD

3.3V

Op

to

Isola

tor

Iso1_3.3V

Iso1_3.3V

Reference

Generator

3.3V

LEGENDPGNDDGND

Battery

LEDs

Iso2_3.3VIso1_3.3V

3.3V

Power Supply

AC-DC Converter

Iso1_3.3V Iso2_3.3V

Gain Control

3.3V

Iso2_3.3V

Current Signal

Conditioning Circuit

(ADC Inputs)

3.3V

OFDM Power Line

MODEM & 802.15.4

RF Interface

With AMR Interface

Connector

Iso2_3.3V

MRAM/

EEPROM

(Serial)

3.3V

Level

Shifter

3.3V

3.3V

Page 12: Designing Smart Meters for the Smart Grid - NXP … · Designing Smart Meters for the Smart Grid Meera Balakrishnan ... Grid Power Protection, Relay/Switch Control and Monitoring

TM

11

Processing Steps:• Phase voltages and currents are sampled 128

times per cycle.

• First buffer used for storing samples and the second for samples post processing.

• At any given point of time, one buffer is collecting measured samples while data from the second buffer are processed by the “Metering Algorithms”.

• Wherever 128 samples are measured and stored in the buffer the Metering Algorithms are initiated.

• Routines of the Metering Algorithms:

• Sum of squares of phase voltage samples

• Sum of squares of phase current samples

• Dot Product of phase voltage and current samples

• Dot Product of quarter cycle shifted phase voltage and current samples.

• Finally accumulated quantities are used for calculation Line to neutral phase voltages, Phase currents, Active and Reactive powers, Apparent power, Power Factor, Active and Reactive energies.

3-Phase MCF51EM256 Electricity Meter – Metrology

0 1 2 3 4 5 6 7

u(0) u(1) ……. u(127)

Voltage cycle

Page 13: Designing Smart Meters for the Smart Grid - NXP … · Designing Smart Meters for the Smart Grid Meera Balakrishnan ... Grid Power Protection, Relay/Switch Control and Monitoring

TM

MCF51EM256/128 Overview ColdFire V1 32-bit Core with Multiply Accumulate unit

• Up to 50.33 MHz system clock

• 32-bit MAC (16x16 signed/unsigned)

• Provides enough throughput for application and connectivity

Independent Real Time Clock (RTC)

• Operates from an independent power supply, even during power outages when other MCU systems are not powered

• Consumes very little power, down to < 1.5µA

Robust Firmware Update

• Meter continues to operate from one Flash block, while other is updated and verified with new firmware

• Flash block swap reliably completes firmware update

Tamper Detection

• Detects and records tamper attempt even during power off

• Detects and records attempts to disconnect backup battery

Four 16-bit high speed SAR ADCs

• Support simultaneous sampling of four analogue inputs

• 1 differential and 4 to 7 single ended inputs per ADC

• Include phase shift compensation needed with reactive load

LCD Controller

• Supports a wide range of displays, up to 288 segments

• Up to 8 backplanes reduces number of pins and system cost

MCF51EM256 documentation: www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MCF51EM

12

Page 14: Designing Smart Meters for the Smart Grid - NXP … · Designing Smart Meters for the Smart Grid Meera Balakrishnan ... Grid Power Protection, Relay/Switch Control and Monitoring

TM

ADC1

ADC2

ADC3

ADC4

Ch

1C

h2

Ch

3C

h4

PreTriggerA

PreTriggerB

COCOA

COCOB

DADP1DADP1DADM1DADM1 Reg. A: Live 1 CTResult A

Result B

Result AResult B

Result AResult B

Result AResult B

AD3AD3

AD4AD4

Reg. B: Live 1 Voltage

Reg. C: auxiliary 1.

DADP2DADP2DADM2DADM2 Reg. A: Live 2 CT

AD5AD5 Reg. B: Live 2 Voltage

DADP0DADP0DADM0DADM0 Reg. A: Live 3 CT

AD6AD6 Reg. B: Live 3 Voltage

DADP3DADP3DADM3DADM3 Reg. A: Neutral CT

AD7AD7 Reg. B: auxiliary 2.

VREF0VREFHVREFLBandgapTemp Sensor

Trigger

PDB

TriggerA

TriggerB

PreTriggerA

PreTriggerB

COCOA

COCOB

TriggerA

TriggerB

PreTriggerA

PreTriggerB

COCOA

COCOB

TriggerA

TriggerB

PreTriggerA

PreTriggerB

COCOA

COCOB

TriggerA

TriggerB

Programmable Delay Block – Usage in Application

PDB - ADC Integration

Duration of the first ADC conversion (Reg. A)Start possible for second ADC (Reg. B)

13

Page 15: Designing Smart Meters for the Smart Grid - NXP … · Designing Smart Meters for the Smart Grid Meera Balakrishnan ... Grid Power Protection, Relay/Switch Control and Monitoring

TM

14

Secure Flash Update – New Firmware Update

Application

0

Power calculation

Comms Routine

Interrupt Vectors

128K

Update

Application

space

Power calculation - copy

Comms Routine - copy

Interrupt Vectors - copy

256K

Flash Selector = 0

Old

Application

Power calculation

Comms Routine

Interrupt Vectors

256K

Updated

Application

Power calculation - copy

Comms Routine - copy

Interrupt Vectors - copy

128K

Flash Selector = 1

0

Notes

• After MCU POR & RTC POR, flash selector = 0

• Flash selector is powered by RTC power supply

• MCU reset does NOT change state

• Power is maintained through MCU power cycles

• Only upper flash block is erased / written

• Software controlled switch between blocks, instantaneous (~40nS)

• Flash can be used as a single code space

Blo

ck 1

Blo

ck 0

Blo

ck 0

Blo

ck 1

Non volatile Non volatile

Page 16: Designing Smart Meters for the Smart Grid - NXP … · Designing Smart Meters for the Smart Grid Meera Balakrishnan ... Grid Power Protection, Relay/Switch Control and Monitoring

TM

MCF51EM256 - Features for E-metering

Needs MCF51EM256 Solution

Computational

Power

ColdFire V1 core with MAC unit.

(core speeds up to 50.33 MHz 3.6 V to 2.5 V and 20 MHz at

2.5 V to 1.8 V)

Low Power Less than 1.09mA/MHz Run Current (all modules off)

Typical 1.5 μA power consumption in battery mode

Data Storage From 128KB to 256KB of Flash (Dual Flash Bank)

From 8KB to 16KB of RAM

Flash Update Flash Swap, Security and Protection.

User Interface Embedded 4x40 LCD display driver (3V or 5V glass).

Communication Up to 3 UARTS, 3 SPIs and 1 IIC.

Time Keeping Independent RTC with separate time base, power domain,

32 bytes of RAM and crystal compensation (correction

range ~ ±.12ppm .. ~ ±3900ppm)

Analog

Modules

Integrated four 16-bit analog-to-digital converters (14.5

ENOB @ differential mode).

Two HSCMP.

Built-in 1.2 V reference 33 ppm/C with dedicated output pin.

Other HW CRC module supporting fast cyclic redundancy checks.

Programmable Delay Block supporting current sensor

phase shift compensation.

Built-in temperature sensor.

Built-in clock check test mechanism.

Watchdog clocked from independent internal clock (1kHz).

15

Page 17: Designing Smart Meters for the Smart Grid - NXP … · Designing Smart Meters for the Smart Grid Meera Balakrishnan ... Grid Power Protection, Relay/Switch Control and Monitoring

TM

3-P

hase

Flo

w1-P

hase

1-Phase Meter

MK30X256

1616

Connectivity

1Q11 1Q111Q11

1-Phase Meter

MCF51EM256

Integrated AFE

Low Cost Meter

9RS08KA8/LA8

Simulation

DEMOEM

MCF51EM256

Low Cost Meter

9S08LL/LG32Low Cost Meter

9S08LH64

Integrated AFE

Water Meter

9S08LL16/

9S08GW64

Gas Meter

9S08LL16/

9S08GW64

Heat Meter

9S08LL16/

9S08GW64

1-Phase Meter

9S08GW64

Ga

tew

ay/

Concentr

ato

r

802.15.4/Zigbee

MC1322x

1-Phase Meter

MZ60

3-Phase Meter

MCF51EM256

see next

slides…

Smart Grid & Metering

Reference Designs

Data concentrator

MPC8308

Data Concentrator

MC5441xEnergy Gateway

MPC8308

Energy Gateway

i.MX28

Page 18: Designing Smart Meters for the Smart Grid - NXP … · Designing Smart Meters for the Smart Grid Meera Balakrishnan ... Grid Power Protection, Relay/Switch Control and Monitoring

TM

Precision (accuracy): IEC50470-3 class B, 1%

Voltage range 85…264 VRMS

Current Range 0…120 ARMS

Frequency range 47…63 Hz

Functionality V, A, kW, kVAR, kVA, kWh, kVARh, Hz, cosφ, real-time clock

Voltage sensor Voltage divider

Current sensor (according to ordering code) Shunt 120 μΩ

Energy output pulse interface two red LEDs (active and reactive)

Opto-isolated pulse output (optional) opto-coupler (active energy)

User interface (HMI) LCD, 3 buttons (tamper, 2 users), 1 user LED (yellow)

Infrared interface (optional) for metering data reading (IEC1107)

RS232 serial interface Opto-isolated, 19200 Bd, 8 data bit, 1 stop bit, no parity

ZigBee interface (optional) 2.4GHz RF 1322x-SRB internal module. Other protocols supported too.

Internal battery 3V, CR2032 type

In preparation – available from www.freescale.com/metering in Q1/2011

1-Phase MK30X256 Based Electricity Meter - Features

by courtesy ofZhongshan Weiqi Electronic

17

Page 19: Designing Smart Meters for the Smart Grid - NXP … · Designing Smart Meters for the Smart Grid Meera Balakrishnan ... Grid Power Protection, Relay/Switch Control and Monitoring

TM

1-Phase MK30X256 Based Electricity Meter –Metrology 1 of 2.

Using FFT algorithm for power computing.• Fourier analysis is based on the concept that real world signals can be approximated

by a sum of sinusoids, each at a different frequency (basic DFT)• The more sinusoids included in the sum, the better the approximation

Algorithm requirements.• Number of measured samples (N) must be power-of-two sizes (…,64,128,etc.)• Sampling frequency must be higher (min. 2x) then maximum frequency included in

input signal, otherwise the frequency spectrum overlaps (Nyquist theorem)• Anti-aliasing filter (HW) must be use for filtering frequencies above Nyquist frequency

FFT example (N=8):

0 1 2 3 4 5 6 7

0 1 2 3 4 5 6 7

X

FFT window

time domain

0 1 2 3 4 5 6 7k

Ymagnitude

N/2

k

Yphase

0 1 2 3 4 5 6 7

N/2

frequency domain

))()()( 22 kYkYkY IMREmagnitude

)(

)(arctan)(

kY

kYkY

RE

IMphase

FFT

Y(0)

Y(1)

Y(2)

Y(3)

Y(4)

Y(5)

Y(6)

Y(7)

x(0..7)

N/2 … Nyquist frequency

k … number of k-th harmonics

n .. n-th sample of input signal

N… total number of samples

1

0

)()(N

n

kn

NWnxkY N

j

N eW2

10 Nk

Complex Numbers

Input samples

18

Page 20: Designing Smart Meters for the Smart Grid - NXP … · Designing Smart Meters for the Smart Grid Meera Balakrishnan ... Grid Power Protection, Relay/Switch Control and Monitoring

TM

1-Phase MK30X256 Based Electricity Meter –Metrology 2 of 2.

Complex power is defined as:

12

1

12

1

)()()()()()()()()()()()(

N

k

IMREREIMIMIMREREIMRE

N

k

IMRE kIkjUkIkjUkUkIkUkIkjUkUkjIkI

Real part of complex power:

Active powerImaginary part of complex power:

Reactive power

Where: IRE(k),URE(k) are real parts of k-th harmonics of input current/voltage

IIM(k),UIM(k) are imaginary parts of k-th harmonics of input current/voltage

Apparent power is defined as: VRMS *IRMS

12

1

2

12

1

22 )()()(

N

k

magnitude

N

k

IMRERMS kIkIkII

12

1

2

12

1

22 )()()(

N

k

magnitude

N

k

IMRERMS kUkUkUU

Where: IRE(k),URE(k) are real parts of k-th harmonics of input current/voltage

Imagnitude(k),Umagnitude(k) are magnitudes of k-th harmonics of input current/voltage

19

Page 21: Designing Smart Meters for the Smart Grid - NXP … · Designing Smart Meters for the Smart Grid Meera Balakrishnan ... Grid Power Protection, Relay/Switch Control and Monitoring

TM

20

Kinetis Product Family Features

Development

Tools

Bundled IDE

w/ Processor

Expert

Bundled OS

USB, TCP/IP,

Security

Modular Tower

H/ware

Development

System

Application

Software

Stacks,

Peripheral

Drivers & App.

Libraries

(Motor Control,

HMI, USB)

Broad 3rd party

ecosystem

Common

Digital IP

CRC

I2C

SAI (I2S)

UART/SPI

Programmable

Delay Block

External Bus

Interface

Motor Control

Timers

eSDHC

RTC

Common

Analog IP

16-bit ADC

Programmable

Gain Amplifiers

12-bit DAC

High-speed

Comparators

Low-power

Touch Sensing

Common

System IP

32-bit ARM

Cortex-M4 Core

w/ DSP Instructions

Next Generation

Flash Memory

High Reliability,

Fast Access

FlexMemory w/

EEPROM capability

SRAM

Memory

Protection Unit

Low Voltage,

Low Power Multiple

Operating Modes,

Clock Gating

(1.71V-3.6V with 5V

tolerant I/O)

DMA

-40 to 105C

K70 Family

512KB-1MB,

196-256pin

K60 Family

256KB-1MB,

100-256pin

K50 Family

128-512KB,

64-144pin

K40 Family

64-512KB,

64-144pin

K30 Family

64-512KB,

64-144pin

K20 Family

32KB-1MB,

32-144pin

K10 Family

32KB-1MB,

32-144pin

Page 22: Designing Smart Meters for the Smart Grid - NXP … · Designing Smart Meters for the Smart Grid Meera Balakrishnan ... Grid Power Protection, Relay/Switch Control and Monitoring

TM

21

Kinetis K30/K40 Family Overview

Flexible, low power LCD Interface

• Segment LCD Blink mode lowers average power

• Segment Fail Detect prevents erroneous readouts and

reduces LCD test cost

• Front/back plane reassignment provides pin-out flexibility

and allows configuration changes in firmware

Diverse communications suite

• A multitude of serial interfaces, with UART support for

ISO7816 SIM/Smart Cards & IrDA interfaces

• Dual CAN for industrial network bridging

System reliability & safety

• Hardware Cyclic Redundancy Check safeguards memory

contents and communication data

• Memory Protection Unit – increase SW reliability

• Independently-clocked watchdog prevents code runaway

for fail-safe applications e.g. IEC60730

Hardware and software compatibility

• Common packages & peripherals across families enable

rapid feature growth with minimal hardware & software

disruption

Built-in voltage regulator (K40)

• 5V regulator input with 3.3V regulated output

• 3.3V regulated output can power MCU and also external

components (source current up to 120mA)

Family USB OTG + DCD Segment LCD

K30 - X

K40 X X

For Segment LCD Applications

Up to 512KB Flash

Memory

Up to 128KB

SRAM

FlexMemory:

up to 4KB EEPROM

or 256KBFlash

CrossBar Switch (XBS)

16-ch

DMA

(K40 Only)

Full-Speed USB

(H/D/OTG)

with DCD

FlexBus

Peripheral Bus Controllers (x2)

Up to 100MHz ARM Cortex-M4 Core

DSP

1.25DMIPs/MHz

Clock Module:2 Crystal inputs

2 internal oscillators

PLL and FLL

Secure DigitalHost

Controller

Memory Protection Unit

K30/K40 Family Block Diagram

Timers

3x FlexTimers

Carrier Modulator Timer,

Programmable Interrupt Timer,

Low Power Timer,

Programmable Delay Block

Analog

2x 16-bit SAR ADC 2x 12-bit DAC

3x High Speed Comparators

2x Programmable Gain Amplifiers

Internal Voltage Ref (1.2V)

Communications

2x I2C 6x UART3x DSPI2x CAN

IIS

32-bit Cyclic Redundancy

Check

Segment LCD (8x40 /4x44)

Low Power Xtrinsic

Touch Sensing

Interface

Watchdog +

External Watchdog

Monitor

Up to 98 GPIO

Kinetis documentation: www.freescale.com/webapp/sps/site/homepage.jsp?code=KINETIS

Page 23: Designing Smart Meters for the Smart Grid - NXP … · Designing Smart Meters for the Smart Grid Meera Balakrishnan ... Grid Power Protection, Relay/Switch Control and Monitoring

TM

ARM Cortex-M4 Processor Microarchitecture

Backwards compatible with ARM Cortex-M3

New features• Single cycle MAC (Up to 32 x 32 + 64 -> 64)• DSP extensions• Single Precision Floating Point Unit

Freescale IP and Innovation• On-chip cache for instructions and data• Cross-Bar Switch for concurrent multi-master/slave

accessing • On-chip DMA for CPU off-load • Low-leakage Wake-up Unit adds flexibility for low power

operation

Architected for Digital Signal Processing • Motor Control - advanced algorithms, longer lifespan,

power efficiency• Automation - high calculation and algorithm bandwidth

at a low cost• Power management – designed for low/battery

powered systems• Audio and Video – 5x performance improvement over

software, making batteries last longer

Dotted boxes denote optional blocks

22

Page 24: Designing Smart Meters for the Smart Grid - NXP … · Designing Smart Meters for the Smart Grid Meera Balakrishnan ... Grid Power Protection, Relay/Switch Control and Monitoring

TM

23

Kinetis Support For Legally Relevant vs. Non-Legally Relevant Code Separation

• Task Separation (Supported by Cortex-M4 core)[1]

• Privilege execution has full access rights handler & thread modes

• Unprivileged execution has limited access rights thread mode only

• Main and Process stack Switching

• Memory Protection (Supported by MPU) [2]

• Provides memory protection and task protection in

multi-master platform (System RAM, Flash and

FlexBus)

• Memory references with sufficient access control rights

are allowed to complete.

• Up to 16 region descriptors (granularity for region sizes

from 32 bytes to 4 Gbytes)

• References not mapped to any region descriptor or with

insufficient rights are terminated with a protection error

• Peripheral Protection (Supported by Peripheral

Bridge AIPS-LITE)[3]

• Can only be accessed in privileged mode.

• Interface and protect majority of peripherals including

MPU

• Peripherals protection scheme with access control

options: Peripheral requires supervisor privilege level for accesses

Peripheral is write protected

Peripheral accesses from un-trusted master are not allowed

References:

[1] Joseph Yiu, The Definitive Guide to the ARM Cortex-

M3, Second Edition, 2009, ISBN: 185617963X

[2] www.freescale.com/files/32bit/doc/ref_manual/

K30P81M100SF2RM.pdf, Chapter 18 - Memory

Protection Unit (MPU).

[3] www.freescale.com/files/32bit/doc/ref_manual/

K30P81M100SF2RM.pdf, Chapter 19 - Peripheral

Bridge (AIPS-Lite)

Page 25: Designing Smart Meters for the Smart Grid - NXP … · Designing Smart Meters for the Smart Grid Meera Balakrishnan ... Grid Power Protection, Relay/Switch Control and Monitoring

TM

• Performance• Up to 100 MHz Cortex-M4 w embedded DSP ; less than 420uA/MHz run current (all modules off)

• Memory Management (512kB Flash/128Kbytes RAM)• Support for robust code update on Flash

• Memory Protection Unit (MPU) to provide hardware access control for all memory references

• Single-Phase Analogue Front End (AFE)• 240 to 1 meter dynamic range with 1.0% accuracy with fixed gain setting [Class 1.0; 0.5 -

10(120)A]

• Interfacing various sensors such as shunt resistor (50uOhm, one-phase meter), Rogowski coils

and current transformers

• Up to 2 Programmable Gain Amplifier (PGA) with 1x-64x gain

• Programmable Delay Block supporting current sensor phase shift compensation.

• 1.2V Voltage Reference (33 PPM)

• Low Power• 1.71V to 3.6V Operating voltage

• Ultra low power RTC operation (<0.55uA when CPU not accessing RTC registers)

• 10 low power modes

• 90nm thin film flash storage process technology with high performance and low power• IEC 60730 compliant watchdog monitor

• Independent Real Time Clock (IRTC) with independent power domain (Battery)

• IRTC with Crystal & Temperature Frequency Compensation (Correction range ~ ±.12ppm .. ~

±3900ppm)

• Data Encryption Support for Secure Communication (K50-K70 only)• Memory-mapped Cryptographic Acceleration Unit (MMCAU)

• Significantly improves performance of security algorithms

• AES-128,-192,-256, DES, MD5, SHA-1,-256

• 32x32 multiply with 64-bit result for ECC & RSA acceleration

• Random Number Generator with NIST Compliant SP800-90 (DRGB)

Kinetis Key Features

Page 26: Designing Smart Meters for the Smart Grid - NXP … · Designing Smart Meters for the Smart Grid Meera Balakrishnan ... Grid Power Protection, Relay/Switch Control and Monitoring

TM

Agenda

• Intro to Freescale in Smart Grids

• Energy Metering – Technology and Solution Trends

• An Effective Metering System on Chip Based Solutions

• Enablement

• Summary

Designing Smart Meters for the Smart Grid

25

Page 27: Designing Smart Meters for the Smart Grid - NXP … · Designing Smart Meters for the Smart Grid Meera Balakrishnan ... Grid Power Protection, Relay/Switch Control and Monitoring

TM

2626

Freescale’s Microcontroller Enablement BundleFreescale MQX + MCU + Tower System + CodeWarrior IDE

Comprehensive solution for

embedded control and connectivity

Open source hardware platform for

prototyping application development

Visual and automated framework

to accelerate development time

• Modular, expandable and cost-

effective development platform for

8/16/32-bit MCUs and MPUs

• Rapid eval and prototyping with

maximum HW reuse.

• Supported by a diverse range of

MCU and peripheral plug-in

boards and a growing web

community

• Eclipse environment

• Processor Expert code

generation wizard

• Build, debug and flash tools

• Software analysis

• Kernel-aware debug

• Host platform support

Complimentary MQX RTOS

MQX Core

PSP & BSP

+

• Full-featured, scalable, proven

RTOS

• Simplifies HW management,

streamlines SW development

• Reduces development costs while

speeding time to market

Save time, cost, and effort.

Page 28: Designing Smart Meters for the Smart Grid - NXP … · Designing Smart Meters for the Smart Grid Meera Balakrishnan ... Grid Power Protection, Relay/Switch Control and Monitoring

TM

FreeMaster Monitoring Tool

Download from: www.freescale.com/webapp/sps/site/prod_summary.jsp?code=FREEMASTER

Application control

and monitor

Real-time eTPU

operation monitor

Live graphs,

variable watches,

and graphical

control page

Supports:- HCS08, HC12, HCS12 and HCS12X BDM

- 56F8000, 56F8100 and 56F8300 JTAG

- SCI driver (FMASTERSCIDRV) for all

platforms

27

Page 29: Designing Smart Meters for the Smart Grid - NXP … · Designing Smart Meters for the Smart Grid Meera Balakrishnan ... Grid Power Protection, Relay/Switch Control and Monitoring

TM

2828

Freescale MQX RTOS Solution Scalable, fully-featured and proven

RTOS bundled with 32-bit MCUs

• Full-featured and powerful BSPs incorporate tightly integrated RTOS, Middleware (USB,

TCP/IP stacks), file system, and I/O drivers

Designed for speed and size efficiency

• Market proven MQX has been available on Freescale processors for > 15 years

MQX has been used in millions of products including Medical and

Heavy Industrial areas

• Simple and scalable Can be as small as ~10KB for smallest implementation, or scale

up to support sophisticated networking and threading

Intuitive API & modular architecture enables straight-forward

feature fine-tuning

Production source code provided

• Similar to other “pay-for” software OS

Software Integration headache

Integrated MQX Solution

$95,000of software

bundled with

Freescale

MCU’s!

MQX Software speeds time to

market with support from Freescale

Download from: www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MQX

Page 30: Designing Smart Meters for the Smart Grid - NXP … · Designing Smart Meters for the Smart Grid Meera Balakrishnan ... Grid Power Protection, Relay/Switch Control and Monitoring

TM

2929

CodeWarrior Development Studio for Microcontrollers v10.1

Integrated development tool suite for ColdFire, Kinetis and S08 architectures based on the Eclipse open development platform• Project Wizard creates a new project in as few as 9

clicks

• MCU Change Wizard retargets a project to a new processor in as few as 6 clicks

• CodeWarrior optimizing C/C ++ compilers for ColdFire and Kinetis Microcontrollers included

• Extensions to Eclipse CDT to provide sophisticated features to troubleshoot and repair embedded applications

• Processor Expert combines easy-to-use component-based application creation with an expert knowledge system

• Trace and profile support for on-chip trace buffers to provide emulator-like debug capability without additional hardware

• Kernel-aware debug for MQX, Linux and OSEK

• CodeWarrior Special Edition is a complimentary version up to 128KB code size

Accelerate the development of the most

complex embedded applications

Free

Compiler

up to

128KB!

www.freescale.com/codewarrior

to download

Page 32: Designing Smart Meters for the Smart Grid - NXP … · Designing Smart Meters for the Smart Grid Meera Balakrishnan ... Grid Power Protection, Relay/Switch Control and Monitoring

TM

Agenda

• Intro to Freescale in Smart Grids

• Energy Metering – Technology and Solution Trends

• An Effective Metering System on Chip Based Solutions

• Enablement

• Summary

Designing Smart Meters for the Smart Grid

31

Page 33: Designing Smart Meters for the Smart Grid - NXP … · Designing Smart Meters for the Smart Grid Meera Balakrishnan ... Grid Power Protection, Relay/Switch Control and Monitoring

TM

Summary Metering ASSP products can help solve key customer problems for

metering systems

• Maximize battery life ultra low power 8bit & 32bit MCUs

• Reliable readings fast & accurate on-chip ADCs

• Integration memory, LCD ctrl, analog

• Communication I/F ZigBee, 802.15.4, and Ethernet

• Standards IEEE 802.15.4, ZigBee Alliance

Commitment to the market with products and solutions that have characteristics important to the metering segment:

• Longevity of product available

• Quality

Breath of products spanning from RF to Sensors to MCUs to MPUs

Mix & match IP allowing specific metering solutions

Enablement

• Reduce product development cost

• Improve time-to-market and time-in-market

Learn more about Freescale Solutions in Smart Metering: freescale.com/metering

32

Page 34: Designing Smart Meters for the Smart Grid - NXP … · Designing Smart Meters for the Smart Grid Meera Balakrishnan ... Grid Power Protection, Relay/Switch Control and Monitoring

TM