33
Technologies emerging at the Edge John Milios CEO Sendyne Corp.

Technologies emerging at the Edge · • In the general case an analytical solution is either not known or does not exist ... 2 5 3 22 f f ww w x w w w x ∂ ... F. Casella, F. Donida,

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

  • Technologies emerging at the Edge

    John MiliosCEO

    Sendyne Corp.

  • • Focused initially on technologies for battery system design and management, expanding into other markets

    • Fabless semiconductor and technology company

    • Privately held, founded in 2010, headquartered in NYC

    • Award winning products

    Core Converging Technologies

    About Sendyne

  • Sendyne in the Internet of Things

  • “Model Based” is key concept in control apps• Used in a majority of existing multivariable control applications

    • Technology of choice for new complex control systems

    • Success of the technology rides on MCU computing power increase

    • Technology has become multidisciplinary

    • Many advantages• Straightforward, science-based formulation• Development time much shorter than competing advanced control

    methods• Easier to maintain

    • Changing model or specs does not require a complete redesign

    • MCU advances open the field forembedded applications

  • “PDEs, ODEs & DAE

    • Physics based models are described generally with a set of non-linear Differential Algebraic Equations

    • In the general case an analytical solution is either not known or does not exist

    • For systems described by a set of Partial Differential Equations (PDEs) spatial discretization schemes are employed to transform them into a set of DAEs

    • Real-time control methods require such models to be ported into an embedded processor and solved in “real time” relative to the time constants of the controlled process

    • These DAEs need to be solved using modern numerical techniques

    “There is only one precise way of presenting the (..physics) laws, and that is by means of differential equations. They have the advantage of being fundamental and, so far as we know, precise.”The Feynman lectures on Physics

  • Model Concepts – ODEs & DAEs

    • In order to advance the model in time, the solver requires information related to the derivatives of the model equations with respect to the state variables. This is the so-called Jacobian matrix of the model

    • The Jacobian can be calculated automatically with the AD module

    Explicit ODE( , ; )t=∂

    =∂

    y F y pFJFy

    DAE or implicit ODE( , , ; ) 0t

    γ

    =∂ ∂

    = +∂ ∂

    G y y pG GJGy y

    - independent variable ( . ., time or position)( ) - state variables( ) - state variables derivatives - parameters

    t i ett

    yyp

  • How models are embedded today

    • Two step process• Model is developed and tested in

    Computer Aided Engineering environment (CAE)

    • Code is generated for the embedded environment

    • This code does not contain useful features of the CAE environment

    • Model changes require a high-cost repetition of the process

  • The Sendyne dtSolve™ paradigm

    • One step process• A complete solver resides in

    the embedded controller

    • “Model Based” control becomes a one step process

    • You only need to enter the DAEs of the model

    • You solve the model with all the essential capabilities of the CAE environment

  • dtSolve™ structure

  • Numerical Model Solver

    • Solve all model equationsconcurrently

    • Solver obtains values of state variables for different values of independent variables

    • The process is iterative• User obtains new values by advancing

    the model in time• One step process

    Explicit ODE( , ; )t=y F y p

    DAE or implicit ODE( , , ; ) 0t =G y y p

    - independent variable ( . ., time or position)( ) - state variables( ) - state variables derivatives - parameters

    t i ett

    yyp

    initialtime

    finaltime

  • Numerical Model Optimizer

    • A collection of tools provides model optimization

    • Gradient-based, derivative free and global optimizers can be coupled with AD and sensitivity analysis

    • Optimizers can be used for online optimization in control applications, such as Model Reference Adaptive Control

  • Automatic Differentiation

    • Automatic differentiation (AD) makes it possible to exactly evaluate the derivatives of any numerical function

    • Removes the need for the user to deal with the tedious and error-prone task of implementing such computations

    • AD is built on C++ operator overloading features and introduces only a minimal overhead in terms of performance (memory and speed of execution)

    • ReliabilityAccurate to machine precision

    • Computational CostForward mode: 2 ~3n x cost(f)

    • Human EffortNo time spent in preparing code for differentiation

  • Automatic Differentiation concept1 2 1 2 1

    1 2

    1 1

    2 2

    3 1 2

    4 1

    5 3 4

    ( , ) sin( )Computer code for ( , ) will read Original progra

    like:

    s

    m

    in( )

    f x x x x xf x x

    w xw xw w ww ww w w

    = +

    ===== +

    1

    2

    3 1 2 1 2

    4 1 1

    5

    2 1 1

    13

    1

    14

    Dual progra

    co

    01

    0 1cos()

    0s

    m

    ) 0( 0x

    www w w w ww w ww w

    xw

    x x

    x x

    ==

    = ⋅ + ⋅ == ⋅ =

    = +== + = + =

    12

    f xx

    ∂=

    5 3 2

    2 5 3 2 2

    w w wf fx w w w x

    ∂ ∂ ∂∂ ∂=

    ∂ ∂ ∂ ∂ ∂

    Chain rule

    • A set of techniques to numerically evaluate the derivative of a function specified by a computer program

    • AD exploits the fact that every computer program, no matter how complicated, executes a sequence of elementary arithmetic operations (addition, subtraction, multiplication, division, etc.) and elementary functions (exp, log, sin, cos, etc.)

    • dtSolve™ implements operator overloading in C++

    • No changes in original code• Flexible when changing code or

    platform

  • dtSolve™ base• dtSolve™ Base is the foundation of

    dtSolve™ and contains all the essential features for the model optimizer and the model solver

    • The implementation details of each components are encapsulated so that the user benefits transparently of those features

    • Memory management unit provides predictable and conflict free memory pools

  • Memory management• Memory management unit provides

    predictable and conflict free memory poolsMemory allocated at initialization and instantiation phase

    • No conflicts or unbounded delays among contending solver processes

    • Different types of memory pools to accommodate most requirements of embedded software

    • C++ STL allocators based on those memory pools are also provided to make it possible to use efficient high level algorithms

  • Memory management

  • The issue with dynamic allocation

    Dynamic memory allocation dtSolve™ memoryhandling

  • Memory management• Current interface implemented in

    C++

    • FMI for co-simulation

    • XML interface in the works

  • Sensitivities• Sensitivities can be used to assess the

    effect of selected parameters to the model output

    • Useful in control problems or model optimization

    • dtSolve™ can automatically update the sensitivity matrix

    Sensitivity matrix∂

    =∂s

    yyp

    initialtime

    finaltime

    change in a given parameterinduces changes in the state variables values.

  • Van der Pol Oscillator Example• Hallmark example of nonlinear self-

    oscillation

    • 2 equations and 1 parameter

    • ODE model

    • Classic example of a “stiff” problem

    2

    1 2

    22 1 2 1

    (1 ) 0

    (1 )

    µ

    µ

    − − − =

    =

    = − −

    x x x x

    y y

    y y y yydot_vector[Y1]= y_vector[Y2];

    ydot_vector[Y2]=sens_parameters[MU]*

    (1-y_vector[Y1]*y_vector[Y1])*y_vector[Y2]-

    y_vector[Y1];

    Balthasar Van der Pol

  • Embedding the code• One board is loaded with dtSolve™

    code

    • A second board is loaded with Matlab™ Embedded Coder (ode 23)

    • Both boards solve the Van der Pol model equations

    • Solver outputs are collected in real timethrough a serial port

    Sendyne test platformNXP ARM Cortex-M4 MK64FN1M0VLL12: 120MHz, 256KB RAM, 1MB FlashGCC ARM 5.3 Compiler

  • Performance benchmarkdtSolve™

    Matlab™ Embedded Coder (ode23) v.R2016a

  • Current state of BMS control

    • Simple Equivalent Circuit ModelsPhenomenological modelingof time constants

    Dependence of element values on T, SOC, ILoad

  • “Pseudo” multi-scale (P2D)

    M. Doyle, T. F. Fuller, and J. Newman, “Modeling of galvanostatic charge and discharge of the lithium/polymer/insertion cell,” Journal of the Electrochemical Society, vol. 140, p. 1526, 1993.

    ( ) ( )pC T T qt

    ρλ

    ∂= ∇⋅ ∇ +

    Energy balance

    ( )reaction phase

    S j j k k kj k

    q a Fj η ε φ= + Π − ⋅∇∑ ∑ i

    Materials balance

    22

    1s

    s sc cD rt r rr

    ∂ ∂∂ = ∂ ∂ ∂

    0( ) ( )

    exp expa n SEI cs e s n SEenIa F U i R a F U i Ri

    RT Ri

    Tϕ ϕ ϕ ϕ − − − − − − = − −

    Reaction kinetics

    Charge balance

    ( )eff s naiσ ϕ∇⋅ ∇ =( )eff D,eff ln 0e nc aiκ φ κ∇⋅ ∇ + ∇ + =

    RepresentativeElementary Volume

    r

    c, cs , φs , φe , inDependent variables

    00ln1

    ln nai

    c tc cc

    Dt F

    ε ε −

    +

    ∂∂ = ∇⋅ − ∇∂ ∂

    • Captures solid & electrolyte dynamics across the cell sandwich

  • Internal cell views

    Negative electrode reaction zone Negative electrode solid surface concentrations

    6C constant current dischargeSendyne CellMod™Implemented in dtSolve™

  • Dynamic simulation-reaction zone

    MCMB/LiCoO2 Li-ion, parameters given at:J. Mao, W. Tiedemann, and J. Newman, “Simulation of temperature rise in Li-ion cells at very high currents,” Journal of Power Sources, vol. 271, pp. 444–454, 2014.

  • Enhanced control capabilities

    cs(x,t) < cs,max Lithiation, stress Fast-charging

    0 < cs(x,t) Sudden power loss Power prediction

    0 < ce(x,t) Sudden power loss Power prediction

    USEI < φs-e(x,t) Fade preventionφs-e(x,t) < USEI SEI formation

    Phenomenon Benefit

    Optimum cell utilization

    +Better & Lower CostBatteries

    T(x,t) < Tmax Heat generation Safety

  • Temperature estimation in motor control

    • Heat sources• “Copper” losses in the windings

    • Joule effect (DC-resistance)• Skin and proximity effect (AC-resistance)

    • “Iron” losses due to magnetic flux• Hysteresis and eddy current losses• Stator & rotor losses

    • Permanent magnet losses• Negligible in most cases

    • Joint project with Engineering Dept. Columbia University

  • Robotic systems

    ( ) ( , ) ( )( )p

    v

    + + ==

    ∂=

    B q q H q q q E q τy K q

    Ky qq

    F. Casella, F. Donida, and J. Åkesson, “An XML representation of DAE systems obtained from Modelica models,” in Proceedings of the 7th International Modelica Conference, 2009.

    Index-3 DAE -> index-1 DAE

  • Hardware requirements

    • Floating point capabilities

    • C++11 compiler support

    • Memory requirements dependent on size of model and activated features

    • Memory allocations are handled by dtSolve™ within the environment created during model initialization

    • After initialization no more dynamic allocation is performed

    • dtSolve™ can be used within an RTOS environment to perform real time model simulations with deterministic response time

  • Size

  • dtSolveTM in action

  • For more information

    • www.sendyne.com• [email protected]

    http://www.sendyne.com/mailto:[email protected]

    Technologies emerging at the EdgeAbout SendyneSendyne in the Internet of Things“Model Based” is key concept in control apps“PDEs, ODEs & DAEModel Concepts – ODEs & DAEsHow models are embedded todayThe Sendyne dtSolve™ paradigmdtSolve™ structureNumerical Model SolverNumerical Model OptimizerAutomatic DifferentiationAutomatic Differentiation conceptdtSolve™ baseMemory managementMemory managementThe issue with dynamic allocationMemory managementSensitivitiesVan der Pol Oscillator ExampleEmbedding the codePerformance benchmarkCurrent state of BMS control“Pseudo” multi-scale (P2D)Internal cell viewsDynamic simulation-reaction zoneEnhanced control capabilitiesTemperature estimation in motor controlRobotic systemsHardware requirementsSizedtSolveTM in actionFor more information